@pontive/pontkit-core 1.0.1 → 1.1.1
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/catalog.json +1 -1
- package/custom-elements.json +1 -0
- package/dist/assets/icons/account.icon.d.ts +1 -1
- package/dist/assets/icons/badge-check-icon.d.ts +1 -1
- package/dist/assets/icons/burger-menu.icon.d.ts +1 -1
- package/dist/assets/icons/check.d.ts +1 -1
- package/dist/assets/icons/clock-icon.d.ts +1 -1
- package/dist/assets/icons/close.icon.d.ts +1 -1
- package/dist/assets/icons/copy.icon.d.ts +1 -1
- package/dist/assets/icons/edit.icon.d.ts +1 -1
- package/dist/assets/icons/email.d.ts +1 -1
- package/dist/assets/icons/image-icon.d.ts +1 -1
- package/dist/assets/icons/link-icon.d.ts +1 -1
- package/dist/assets/icons/location.icon.d.ts +1 -1
- package/dist/assets/icons/members-icon.d.ts +1 -1
- package/dist/assets/icons/personal-info.icon.d.ts +1 -1
- package/dist/assets/icons/plusIcon.d.ts +1 -1
- package/dist/assets/icons/refresh-cw-icon.d.ts +1 -1
- package/dist/assets/icons/search-icon.d.ts +1 -1
- package/dist/assets/icons/triangle-alert.d.ts +1 -1
- package/dist/assets/icons/url.icon.d.ts +1 -1
- package/dist/assets/icons/user-round-check-icon.d.ts +1 -1
- package/dist/components/renderers/auth/button/_passkey-button.d.ts +2 -2
- package/dist/components/renderers/auth/button/_provider-button.d.ts +2 -2
- package/dist/components/renderers/auth/button/_submit-button.d.ts +2 -2
- package/dist/components/renderers/auth/button/button.defs.d.ts +1 -1
- package/dist/components/renderers/auth/edit-identifier/_edit-identifier.d.ts +2 -2
- package/dist/components/renderers/auth/field/_confirm-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_email-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_identifier-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_name-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_password-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_phone-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/_username-field.d.ts +2 -2
- package/dist/components/renderers/auth/field/field.stories/helpers.d.ts +2 -2
- package/dist/components/renderers/auth/form/_form.d.ts +2 -2
- package/dist/components/renderers/auth/otp/_otp-resend.d.ts +2 -2
- package/dist/components/renderers/auth/otp/_otp.d.ts +1 -1
- package/dist/components/renderers/auth/provider-field/_provider-field.d.ts +2 -2
- package/dist/components/renderers/auth/qr-code/_qr-code.d.ts +2 -2
- package/dist/components/renderers/auth/recovery-codes/_recovery-codes.d.ts +1 -1
- package/dist/components/renderers/auth/secret/_secret.d.ts +1 -1
- package/dist/components/renderers/feedback/alert/_alert.d.ts +2 -2
- package/dist/components/renderers/feedback/alert/alert.defs.d.ts +1 -1
- package/dist/components/renderers/feedback/countdown/_countdown.d.ts +1 -1
- package/dist/components/renderers/layout/block/_block.d.ts +1 -1
- package/dist/components/renderers/layout/container/_container.d.ts +1 -1
- package/dist/components/renderers/layout/divider/_divider.d.ts +2 -2
- package/dist/components/renderers/layout/gap/_gap.d.ts +1 -1
- package/dist/components/renderers/layout/header/_header.d.ts +1 -1
- package/dist/components/renderers/navigation/link/_link.d.ts +2 -2
- package/dist/components/renderers/typography/subtitle/_subtitle.d.ts +1 -1
- package/dist/components/renderers/typography/title/_title.d.ts +1 -1
- package/dist/components/renderers/visuals/logo/_logo.d.ts +1 -1
- package/dist/components/renderers/visuals/watermark/_watermark.d.ts +2 -2
- package/dist/components/ui/badge-selector/badge-selector.d.ts +2 -2
- package/dist/components/ui/hint/index.d.ts +2 -2
- package/dist/components/ui/modal/index.d.ts +2 -2
- package/dist/components/ui/multi-email-input/multi-email-input.d.ts +2 -2
- package/dist/components/ui/multi-select-filter/pont-multi-select-filter.d.ts +2 -2
- package/dist/components/ui/paginator/paginator.d.ts +3 -3
- package/dist/components/ui/pont-sidedrawer/pont-sidedrawer.d.ts +2 -2
- package/dist/components/widgets/pont-account-settings/pont-account-settings.d.ts +3 -3
- package/dist/components/widgets/pont-account-settings/profile/components/account-info.d.ts +1 -1
- package/dist/components/widgets/pont-account-settings/profile/components/location-info.d.ts +1 -1
- package/dist/components/widgets/pont-account-settings/profile/components/personal-info.d.ts +1 -1
- package/dist/components/widgets/pont-account-settings/profile/components/urls-info.d.ts +1 -1
- package/dist/components/widgets/pont-account-settings/profile/pont-profile.d.ts +1 -1
- package/dist/components/widgets/pont-account-settings/security-settings/security-settings.d.ts +2 -2
- package/dist/components/widgets/pont-account-settings/sidebar/sidebar.d.ts +1 -1
- package/dist/components/widgets/pont-member-management/components/action-modal.d.ts +1 -1
- package/dist/components/widgets/pont-member-management/components/invitations-panel.d.ts +2 -2
- package/dist/components/widgets/pont-member-management/components/invite-members-form.d.ts +2 -2
- package/dist/components/widgets/pont-member-management/components/manage-roles-form.d.ts +2 -2
- package/dist/components/widgets/pont-member-management/components/members-panel.d.ts +2 -2
- package/dist/components/widgets/pont-member-management/components/monitoring-cards.d.ts +1 -1
- package/dist/components/widgets/pont-member-management/pont-member-management.d.ts +1 -1
- package/dist/components/widgets/pont-nav-user/pont-nav-user.d.ts +7 -1
- package/dist/components/widgets/pont-preview/pont-preview.d.ts +1 -1
- package/dist/components/widgets/pont-signin/pont-signin.d.ts +2 -2
- package/dist/components/widgets/pont-signup/pont-signup.d.ts +2 -2
- package/dist/components/wrappers/base-element/base-element.d.ts +1 -1
- package/dist/components/wrappers/layout/layout.d.ts +2 -2
- package/dist/components/wrappers/pont-auth-state/pont-auth-state.d.ts +2 -2
- package/dist/components/wrappers/pont-authenticated/pont-authenticated.d.ts +2 -2
- package/dist/components/wrappers/pont-provider/pont-provider.d.ts +1 -1
- package/dist/components/wrappers/pont-signed-in/pont-signed-in.d.ts +2 -2
- package/dist/components/wrappers/pont-signed-out/pont-signed-out.d.ts +2 -2
- package/dist/context/branding-context.d.ts +1 -1
- package/dist/context/design-context.d.ts +1 -1
- package/dist/element-tag-map.d.ts +94 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +159 -159
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/primitives/assets/icons/anchor.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/app-window.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/arrow-right.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/arrow-up-circle.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/arrow-up-right.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/arrow-up.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/arrows.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/asterisk.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/badge-alert.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/badge-check.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/badge-info.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/badge-x.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/bell.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/bookmark.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/brand-javascript.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/captions.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/carousel-arrow-left.d.ts +1 -1
- package/dist/primitives/assets/icons/carousel-arrow-right.d.ts +1 -1
- package/dist/primitives/assets/icons/chart.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/check.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/chevron-right.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/chorven-down.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/circle-alert.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/circle-check.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/circle-fading-arrow-up.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/circle-x.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/circle.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/close.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/cloud.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/code.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/copy.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/corner-down-left.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/credit-card.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/decrease.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/dot.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/down.d.ts +1 -1
- package/dist/primitives/assets/icons/external-link.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/eye-off.d.ts +1 -1
- package/dist/primitives/assets/icons/eye-off.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/eye-on.d.ts +1 -1
- package/dist/primitives/assets/icons/file-code.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/folder-code.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/git-branch-minus.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/git-branch-plus.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/help-circle.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/house.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/inbox.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/info.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/loader-circle.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/mail-warning.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/mail.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/minus.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/plus.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/rabbit.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/radio-group.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/radio.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/refresh-ccw.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/refresh-cw.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/search.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/settings.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/shield-alert.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/shopping-bag.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/star.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/tick.icon.d.ts +1 -1
- package/dist/primitives/assets/icons/up-down.d.ts +1 -1
- package/dist/primitives/assets/icons/up.d.ts +1 -1
- package/dist/primitives/assets/icons/wand.icon.d.ts +1 -1
- package/dist/primitives/components/ui/accordion/accordion-content.d.ts +2 -2
- package/dist/primitives/components/ui/accordion/accordion-item.d.ts +1 -1
- package/dist/primitives/components/ui/accordion/accordion-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/accordion/accordion.d.ts +2 -2
- package/dist/primitives/components/ui/alert/_alert-action.d.ts +2 -2
- package/dist/primitives/components/ui/alert/_alert-description.d.ts +2 -2
- package/dist/primitives/components/ui/alert/_alert-title.d.ts +2 -2
- package/dist/primitives/components/ui/alert/_alert.d.ts +2 -2
- package/dist/primitives/components/ui/aspect-ratio/aspect-ratio.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar-badge.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar-fallback.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar-group-count.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar-group.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar-image.d.ts +2 -2
- package/dist/primitives/components/ui/avatar/_avatar.d.ts +2 -2
- package/dist/primitives/components/ui/badge/_badge.d.ts +2 -2
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-ellipsis.d.ts +1 -1
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-link.d.ts +2 -2
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-list.d.ts +2 -2
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-separator.d.ts +1 -1
- package/dist/primitives/components/ui/breadcrumb/breadcrumb-text.d.ts +2 -2
- package/dist/primitives/components/ui/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/primitives/components/ui/button/_button.d.ts +2 -2
- package/dist/primitives/components/ui/calendar/calendar.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-action.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-content.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-description.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-footer.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-header.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card-title.d.ts +2 -2
- package/dist/primitives/components/ui/card/_card.d.ts +2 -2
- package/dist/primitives/components/ui/carousel/carousel.d.ts +2 -2
- package/dist/primitives/components/ui/checkbox/_checkbox.d.ts +2 -2
- package/dist/primitives/components/ui/collapsible/collapsible-content.d.ts +2 -2
- package/dist/primitives/components/ui/collapsible/collapsible-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/collapsible/collapsible.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-empty.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-group.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-input.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-item.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box-value.d.ts +2 -2
- package/dist/primitives/components/ui/combobox/combo-box.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-empty.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-group.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-input.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-item.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-list.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command-separator.atom.d.ts +2 -2
- package/dist/primitives/components/ui/command/command.d.ts +2 -2
- package/dist/primitives/components/ui/command/command.helpers.d.ts +6 -6
- package/dist/primitives/components/ui/context-menu/context-menu-checkbox-Item.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-content.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-group.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-item.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-radio-item.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-seperator.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-shortcut.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu.d.ts +2 -2
- package/dist/primitives/components/ui/context-menu/context-menu.helpers.d.ts +1 -1
- package/dist/primitives/components/ui/data-table/data-table.d.ts +2 -2
- package/dist/primitives/components/ui/date-picker/date-picker.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-close.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-content.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-footer.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-header.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-overly.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/dialog/dialog.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-close.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-content.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-description.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-footer.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-header.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-overlay.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-title.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/drawer/drawer.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-checkbox-Item.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-content.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-group.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-item.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-radio-item.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-seperator.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-shortcut.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/dist/primitives/components/ui/dropdown-menu/dropdown-menu.helpers.d.ts +3 -3
- package/dist/primitives/components/ui/empty/_empty-content.d.ts +2 -2
- package/dist/primitives/components/ui/empty/_empty-description.d.ts +2 -2
- package/dist/primitives/components/ui/empty/_empty-header.d.ts +2 -2
- package/dist/primitives/components/ui/empty/_empty-media.d.ts +2 -2
- package/dist/primitives/components/ui/empty/_empty-title.d.ts +2 -2
- package/dist/primitives/components/ui/empty/_empty.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-content.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-description.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-error.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-group.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-label.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-legend.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-separator.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-set.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field-title.d.ts +2 -2
- package/dist/primitives/components/ui/field/_field.d.ts +2 -2
- package/dist/primitives/components/ui/form/pont-form-controller.d.ts +2 -2
- package/dist/primitives/components/ui/form/pont-form-description.d.ts +1 -1
- package/dist/primitives/components/ui/form/pont-form-field.d.ts +1 -1
- package/dist/primitives/components/ui/form/pont-form-item.d.ts +1 -1
- package/dist/primitives/components/ui/form/pont-form-label.d.ts +1 -1
- package/dist/primitives/components/ui/form/pont-form-message.d.ts +2 -2
- package/dist/primitives/components/ui/form/pont-form.d.ts +3 -3
- package/dist/primitives/components/ui/hoverCard/hover-card-content.d.ts +2 -2
- package/dist/primitives/components/ui/hoverCard/hover-card-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/hoverCard/hover-card.d.ts +2 -2
- package/dist/primitives/components/ui/input/_input.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group-addon.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group-button.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group-input.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group-text.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group-textarea.d.ts +2 -2
- package/dist/primitives/components/ui/input-group/_input-group.d.ts +2 -2
- package/dist/primitives/components/ui/input-otp/_input-otp-group.d.ts +2 -2
- package/dist/primitives/components/ui/input-otp/_input-otp-separator.d.ts +2 -2
- package/dist/primitives/components/ui/input-otp/_input-otp-slot.d.ts +2 -2
- package/dist/primitives/components/ui/input-otp/_input-otp.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-actions.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-content.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-description.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-footer.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-group.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-header.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-media.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-separator.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item-title.d.ts +2 -2
- package/dist/primitives/components/ui/item/_item.d.ts +2 -2
- package/dist/primitives/components/ui/kbd/_kbd-group.d.ts +2 -2
- package/dist/primitives/components/ui/kbd/_kbd.d.ts +2 -2
- package/dist/primitives/components/ui/label/_label.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-checkbox.item.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-content.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-group.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-item.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-menu.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-radio-item.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-separator.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-shortcut.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar.d.ts +2 -2
- package/dist/primitives/components/ui/menubar/menubar.helpers.d.ts +3 -3
- package/dist/primitives/components/ui/navigation-menu/navigation-menu-content.d.ts +2 -2
- package/dist/primitives/components/ui/navigation-menu/navigation-menu-item.d.ts +2 -2
- package/dist/primitives/components/ui/navigation-menu/navigation-menu-link.d.ts +2 -2
- package/dist/primitives/components/ui/navigation-menu/navigation-menu-list.d.ts +2 -2
- package/dist/primitives/components/ui/navigation-menu/navigation-menu-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/navigation-menu/navigation-menu.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-content.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-ellipsis.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-item.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-link.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-next.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination-previous.d.ts +2 -2
- package/dist/primitives/components/ui/pagination/pagination.d.ts +2 -2
- package/dist/primitives/components/ui/password-input/_password-input.d.ts +2 -2
- package/dist/primitives/components/ui/popover/popover-content.d.ts +2 -2
- package/dist/primitives/components/ui/popover/popover-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/popover/popover.d.ts +2 -2
- package/dist/primitives/components/ui/progress/progress.d.ts +2 -2
- package/dist/primitives/components/ui/radio-group/radio-group-item.d.ts +2 -2
- package/dist/primitives/components/ui/radio-group/radio-group.d.ts +2 -2
- package/dist/primitives/components/ui/scroll-area/scroll-area.d.ts +1 -1
- package/dist/primitives/components/ui/select/select-group.d.ts +1 -1
- package/dist/primitives/components/ui/select/select-item.d.ts +2 -2
- package/dist/primitives/components/ui/select/select-label.d.ts +2 -2
- package/dist/primitives/components/ui/select/select-list.d.ts +2 -2
- package/dist/primitives/components/ui/select/select-seperator.d.ts +2 -2
- package/dist/primitives/components/ui/select/select-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/select/select-value.d.ts +1 -1
- package/dist/primitives/components/ui/select/select.d.ts +2 -2
- package/dist/primitives/components/ui/separator/_separator.d.ts +2 -2
- package/dist/primitives/components/ui/skeleton/skeleton.d.ts +1 -1
- package/dist/primitives/components/ui/spinner/_spinner.d.ts +2 -2
- package/dist/primitives/components/ui/switch/switch.d.ts +2 -2
- package/dist/primitives/components/ui/table/table.d.ts +2 -2
- package/dist/primitives/components/ui/tabs/_tabs-content.d.ts +2 -2
- package/dist/primitives/components/ui/tabs/_tabs-list.d.ts +2 -2
- package/dist/primitives/components/ui/tabs/_tabs-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/tabs/_tabs.d.ts +2 -2
- package/dist/primitives/components/ui/textarea/_textarea.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast-action.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast-description.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast-title.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast-trigger.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast-view-port.d.ts +2 -2
- package/dist/primitives/components/ui/toast/toast.d.ts +2 -2
- package/dist/primitives/components/ui/toggle/toggle.d.ts +2 -2
- package/dist/primitives/components/ui/toggle-group/toggle-group-item.d.ts +2 -2
- package/dist/primitives/components/ui/toggle-group/toggle-group.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-blockquote.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-code.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-h.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-large.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-lead.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-list.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-muted.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-p.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-small.d.ts +2 -2
- package/dist/primitives/components/ui/typography/_typography-table.d.ts +1 -1
- package/dist/primitives/helpers/base-element.d.ts +1 -1
- package/dist/primitives/helpers/mouse-conroller.helper.d.ts +1 -1
- package/dist/primitives/helpers/shadow-wrapper.d.ts +3 -3
- package/dist/primitives/helpers/widget-controller.d.ts +1 -1
- package/dist/types/components/user-profile.d.ts +1 -1
- package/package.json +9 -5
package/dist/index.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const Vn=globalThis,
|
|
5
|
+
*/const Vn=globalThis,Ea=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xa=Symbol(),Sl=new WeakMap;let sp=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==xa)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(Ea&&t===void 0){const n=r!==void 0&&r.length===1;n&&(t=Sl.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Sl.set(r,t))}return t}toString(){return this.cssText}};const Yh=e=>new sp(typeof e=="string"?e:e+"",void 0,xa),ap=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,o,i)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[i+1],e[0]);return new sp(r,e,xa)},Qh=(e,t)=>{if(Ea)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const n=document.createElement("style"),o=Vn.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=r.cssText,e.appendChild(n)}},El=Ea?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return Yh(r)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Zh,defineProperty:Jh,getOwnPropertyDescriptor:Xh,getOwnPropertyNames:tu,getOwnPropertySymbols:eu,getPrototypeOf:ru}=Object,ir=globalThis,xl=ir.trustedTypes,ou=xl?xl.emptyScript:"",
|
|
9
|
+
*/const{is:Zh,defineProperty:Jh,getOwnPropertyDescriptor:Xh,getOwnPropertyNames:tu,getOwnPropertySymbols:eu,getPrototypeOf:ru}=Object,ir=globalThis,xl=ir.trustedTypes,ou=xl?xl.emptyScript:"",Yi=ir.reactiveElementPolyfillSupport,tn=(e,t)=>e,Kn={toAttribute(e,t){switch(t){case Boolean:e=e?ou:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Oa=(e,t)=>!Zh(e,t),Ol={attribute:!0,type:String,converter:Kn,reflect:!1,useDefault:!1,hasChanged:Oa};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ir.litPropertyMetadata??(ir.litPropertyMetadata=new WeakMap);let uo=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Ol){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,r);o!==void 0&&Jh(this.prototype,t,o)}}static getPropertyDescriptor(t,r,n){const{get:o,set:i}=Xh(this.prototype,t)??{get(){return this[r]},set(s){this[r]=s}};return{get:o,set(s){const d=o==null?void 0:o.call(this);i==null||i.call(this,s),this.requestUpdate(t,d,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ol}static _$Ei(){if(this.hasOwnProperty(tn("elementProperties")))return;const t=ru(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tn("properties"))){const r=this.properties,n=[...tu(r),...eu(r)];for(const o of n)this.createProperty(o,r[o])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[n,o]of r)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const o=this._$Eu(r,n);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)r.unshift(El(o))}else t!==void 0&&r.push(El(t));return r}static _$Eu(t,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qh(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$ET(t,r){var i;const n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){const s=(((i=n.converter)==null?void 0:i.toAttribute)!==void 0?n.converter:Kn).toAttribute(r,n.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,r){var i,s;const n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const d=n.getPropertyOptions(o),c=typeof d.converter=="function"?{fromAttribute:d.converter}:((i=d.converter)==null?void 0:i.fromAttribute)!==void 0?d.converter:Kn;this._$Em=o;const m=c.fromAttribute(r,d.type);this[o]=m??((s=this._$Ej)==null?void 0:s.get(o))??m,this._$Em=null}}requestUpdate(t,r,n,o=!1,i){var s;if(t!==void 0){const d=this.constructor;if(o===!1&&(i=this[t]),n??(n=d.getPropertyOptions(t)),!((n.hasChanged??Oa)(i,r)||n.useDefault&&n.reflect&&i===((s=this._$Ej)==null?void 0:s.get(t))&&!this.hasAttribute(d._$Eu(t,n))))return;this.C(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:n,reflect:o,wrapped:i},s){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??r??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(r=void 0),this._$AL.set(t,r)),o===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[i,s]of o){const{wrapped:d}=s,c=this[i];d!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(o=>{var i;return(i=o.hostUpdate)==null?void 0:i.call(o)}),this.update(r)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};uo.elementStyles=[],uo.shadowRootOptions={mode:"open"},uo[tn("elementProperties")]=new Map,uo[tn("finalized")]=new Map,Yi==null||Yi({ReactiveElement:uo}),(ir.reactiveElementVersions??(ir.reactiveElementVersions=[])).push("2.1.2");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const en=globalThis,Rl=e=>e,Wn=en.trustedTypes,Il=Wn?Wn.createPolicy("lit-html",{createHTML:e=>e}):void 0,lp="$lit$",nr=`lit$${Math.random().toFixed(9).slice(2)}$`,dp="?"+nr,nu=`<${dp}>`,Ir=document,nn=()=>Ir.createComment(""),sn=e=>e===null||typeof e!="object"&&typeof e!="function",
|
|
14
|
-
\f\r]`,Go=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Al=/-->/g,Tl=/>/g,Pr=RegExp(`>|${
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dl=/'/g,Ll=/"/g,cp=/^(?:script|style|textarea|title)$/i,pp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=pp(1),U=pp(2),ar=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Fl=new WeakMap,xr=Ir.createTreeWalker(Ir,129);function hp(e,t){if(!
|
|
13
|
+
*/const en=globalThis,Rl=e=>e,Wn=en.trustedTypes,Il=Wn?Wn.createPolicy("lit-html",{createHTML:e=>e}):void 0,lp="$lit$",nr=`lit$${Math.random().toFixed(9).slice(2)}$`,dp="?"+nr,nu=`<${dp}>`,Ir=document,nn=()=>Ir.createComment(""),sn=e=>e===null||typeof e!="object"&&typeof e!="function",Ra=Array.isArray,iu=e=>Ra(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Qi=`[
|
|
14
|
+
\f\r]`,Go=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Al=/-->/g,Tl=/>/g,Pr=RegExp(`>|${Qi}(?:([^\\s"'>=/]+)(${Qi}*=${Qi}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dl=/'/g,Ll=/"/g,cp=/^(?:script|style|textarea|title)$/i,pp=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),l=pp(1),U=pp(2),ar=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Fl=new WeakMap,xr=Ir.createTreeWalker(Ir,129);function hp(e,t){if(!Ra(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Il!==void 0?Il.createHTML(t):t}const su=(e,t)=>{const r=e.length-1,n=[];let o,i=t===2?"<svg>":t===3?"<math>":"",s=Go;for(let d=0;d<r;d++){const c=e[d];let m,v,b=-1,w=0;for(;w<c.length&&(s.lastIndex=w,v=s.exec(c),v!==null);)w=s.lastIndex,s===Go?v[1]==="!--"?s=Al:v[1]!==void 0?s=Tl:v[2]!==void 0?(cp.test(v[2])&&(o=RegExp("</"+v[2],"g")),s=Pr):v[3]!==void 0&&(s=Pr):s===Pr?v[0]===">"?(s=o??Go,b=-1):v[1]===void 0?b=-2:(b=s.lastIndex-v[2].length,m=v[1],s=v[3]===void 0?Pr:v[3]==='"'?Ll:Dl):s===Ll||s===Dl?s=Pr:s===Al||s===Tl?s=Go:(s=Pr,o=void 0);const _=s===Pr&&e[d+1].startsWith("/>")?" ":"";i+=s===Go?c+nu:b>=0?(n.push(m),c.slice(0,b)+lp+c.slice(b)+nr+_):c+nr+(b===-2?d:_)}return[hp(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class an{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let i=0,s=0;const d=t.length-1,c=this.parts,[m,v]=su(t,r);if(this.el=an.createElement(m,n),xr.currentNode=this.el.content,r===2||r===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(o=xr.nextNode())!==null&&c.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(const b of o.getAttributeNames())if(b.endsWith(lp)){const w=v[s++],_=o.getAttribute(b).split(nr),C=/([.?@])?(.*)/.exec(w);c.push({type:1,index:i,name:C[2],strings:_,ctor:C[1]==="."?lu:C[1]==="?"?du:C[1]==="@"?cu:Si}),o.removeAttribute(b)}else b.startsWith(nr)&&(c.push({type:6,index:i}),o.removeAttribute(b));if(cp.test(o.tagName)){const b=o.textContent.split(nr),w=b.length-1;if(w>0){o.textContent=Wn?Wn.emptyScript:"";for(let _=0;_<w;_++)o.append(b[_],nn()),xr.nextNode(),c.push({type:2,index:++i});o.append(b[w],nn())}}}else if(o.nodeType===8)if(o.data===dp)c.push({type:2,index:i});else{let b=-1;for(;(b=o.data.indexOf(nr,b+1))!==-1;)c.push({type:7,index:i}),b+=nr.length-1}i++}}static createElement(t,r){const n=Ir.createElement("template");return n.innerHTML=t,n}}function go(e,t,r=e,n){var s,d;if(t===ar)return t;let o=n!==void 0?(s=r._$Co)==null?void 0:s[n]:r._$Cl;const i=sn(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==i&&((d=o==null?void 0:o._$AO)==null||d.call(o,!1),i===void 0?o=void 0:(o=new i(e),o._$AT(e,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=o:r._$Cl=o),o!==void 0&&(t=go(e,o._$AS(e,t.values),o,n)),t}class au{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:n}=this._$AD,o=((t==null?void 0:t.creationScope)??Ir).importNode(r,!0);xr.currentNode=o;let i=xr.nextNode(),s=0,d=0,c=n[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new fn(i,i.nextSibling,this,t):c.type===1?m=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(m=new pu(i,this,t)),this._$AV.push(m),c=n[++d]}s!==(c==null?void 0:c.index)&&(i=xr.nextNode(),s++)}return xr.currentNode=Ir,o}p(t){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}}class fn{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,n,o){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=go(this,t,r),sn(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==ar&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):iu(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==h&&sn(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ir.createTextNode(t)),this._$AH=t}$(t){var i;const{values:r,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=an.createElement(hp(n.h,n.h[0]),this.options)),n);if(((i=this._$AH)==null?void 0:i._$AD)===o)this._$AH.p(r);else{const s=new au(o,this),d=s.u(this.options);s.p(r),this.T(d),this._$AH=s}}_$AC(t){let r=Fl.get(t.strings);return r===void 0&&Fl.set(t.strings,r=new an(t)),r}k(t){Ra(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,o=0;for(const i of t)o===r.length?r.push(n=new fn(this.O(nn()),this.O(nn()),this,this.options)):n=r[o],n._$AI(i),o++;o<r.length&&(this._$AR(n&&n._$AB.nextSibling,o),r.length=o)}_$AR(t=this._$AA.nextSibling,r){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,r);t!==this._$AB;){const o=Rl(t).nextSibling;Rl(t).remove(),t=o}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class Si{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,o,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=r,this._$AM=o,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=h}_$AI(t,r=this,n,o){const i=this.strings;let s=!1;if(i===void 0)t=go(this,t,r,0),s=!sn(t)||t!==this._$AH&&t!==ar,s&&(this._$AH=t);else{const d=t;let c,m;for(t=i[0],c=0;c<i.length-1;c++)m=go(this,d[n+c],r,c),m===ar&&(m=this._$AH[c]),s||(s=!sn(m)||m!==this._$AH[c]),m===h?t=h:t!==h&&(t+=(m??"")+i[c+1]),this._$AH[c]=m}s&&!o&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class lu extends Si{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class du extends Si{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class cu extends Si{constructor(t,r,n,o,i){super(t,r,n,o,i),this.type=5}_$AI(t,r=this){if((t=go(this,t,r,0)??h)===ar)return;const n=this._$AH,o=t===h&&n!==h||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==h&&(n===h||o);o&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class pu{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){go(this,t)}}const Zi=en.litHtmlPolyfillSupport;Zi==null||Zi(an,fn),(en.litHtmlVersions??(en.litHtmlVersions=[])).push("3.3.3");const hu=(e,t,r)=>{const n=(r==null?void 0:r.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const i=(r==null?void 0:r.renderBefore)??null;n._$litPart$=o=new fn(t.insertBefore(nn(),i),i,void 0,r??{})}return o._$AI(e),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const Or=globalThis;let f=class extends uo{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=hu(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return ar}};var ip;f._$litElement$=!0,f.finalized=!0,(ip=Or.litElementHydrateSupport)==null||ip.call(Or,{LitElement:f});const
|
|
19
|
+
*/const Or=globalThis;let f=class extends uo{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=hu(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return ar}};var ip;f._$litElement$=!0,f.finalized=!0,(ip=Or.litElementHydrateSupport)==null||ip.call(Or,{LitElement:f});const Ji=Or.litElementPolyfillSupport;Ji==null||Ji({LitElement:f});(Or.litElementVersions??(Or.litElementVersions=[])).push("4.2.2");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const uu={attribute:!0,type:String,converter:Kn,reflect:!1,hasChanged:
|
|
27
|
+
*/const uu={attribute:!0,type:String,converter:Kn,reflect:!1,hasChanged:Oa},mu=(e=uu,t,r)=>{const{kind:n,metadata:o}=r;let i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),n==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(r.name,e),n==="accessor"){const{name:s}=r;return{set(d){const c=t.get.call(this);t.set.call(this,d),this.requestUpdate(s,c,e,!0,d)},init(d){return d!==void 0&&this.C(s,void 0,e,d),d}}}if(n==="setter"){const{name:s}=r;return function(d){const c=this[s];t.call(this,d),this.requestUpdate(s,c,e,!0,d)}}throw Error("Unsupported decorator location: "+n)};function a(e){return(t,r)=>typeof r=="object"?mu(e,t,r):((n,o,i)=>{const s=o.hasOwnProperty(i);return o.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(o,i):void 0})(e,t,r)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function vn(e,t){return(r,n,o)=>{const i=s=>{var d;return((d=s.renderRoot)==null?void 0:d.querySelector(e))??null};return gu(r,n,{get(){return i(this)}})}}var fu=Object.defineProperty,up=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&fu(t,r,o),o};let y=class extends f{constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.mutationObserver)==null||t.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(r=>{r==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),r==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(r)&&this.removeAttribute(r)})}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var i,s;let o="";t.some(d=>this.isCustomPropertySet(d))&&(o=n),o&&((s=(i=this.shadowRoot)==null?void 0:i.querySelector(r))==null||s.classList.add(o))}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{s.parentNode&&(console.log("Removing duplicate:",s),s.parentNode.removeChild(s))})}moveLightDomChildrenInto(t,r){let n;if(r&&r.length>0){n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t));for(const o of n){const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)}}else n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t));for(const o of n)t.appendChild(o)}normalizeEnum(t,r,n){if(!t)return n;const o=Object.values(r),i=Object.keys(r);return o.includes(t)?t:i.includes(t)?r[t]:n}observeStyleAndClassSync(t){this.mutationObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"){if(n.attributeName==="style"){const o=this.getAttribute("style")||"";o&&(this.customStyle=o,this.removeAttribute("style"))}if(n.attributeName==="class"){const o=this.getAttribute("class")||"";o&&(t.className=o,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}};up([a({type:String,reflect:!0})],y.prototype,"customClass");up([a({type:String,reflect:!0})],y.prototype,"customStyle");function
|
|
39
|
+
*/function vn(e,t){return(r,n,o)=>{const i=s=>{var d;return((d=s.renderRoot)==null?void 0:d.querySelector(e))??null};return gu(r,n,{get(){return i(this)}})}}var fu=Object.defineProperty,up=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&fu(t,r,o),o};let y=class extends f{constructor(){super(),this.customClass="",this.customStyle=""}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class"]}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.mutationObserver)==null||t.disconnect()}removeParentAttributes(){this.getAttributesToRemoveFromParent().forEach(r=>{r==="class"&&this.hasAttribute("class")&&(this.customClass=this.getAttribute("class")||""),r==="style"&&this.hasAttribute("style")&&(this.customStyle=this.getAttribute("style")||""),this.hasAttribute(r)&&this.removeAttribute(r)})}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var i,s;let o="";t.some(d=>this.isCustomPropertySet(d))&&(o=n),o&&((s=(i=this.shadowRoot)==null?void 0:i.querySelector(r))==null||s.classList.add(o))}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{s.parentNode&&(console.log("Removing duplicate:",s),s.parentNode.removeChild(s))})}moveLightDomChildrenInto(t,r){let n;if(r&&r.length>0){n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t));for(const o of n){const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)}}else n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t));for(const o of n)t.appendChild(o)}normalizeEnum(t,r,n){if(!t)return n;const o=Object.values(r),i=Object.keys(r);return o.includes(t)?t:i.includes(t)?r[t]:n}observeStyleAndClassSync(t){this.mutationObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"){if(n.attributeName==="style"){const o=this.getAttribute("style")||"";o&&(this.customStyle=o,this.removeAttribute("style"))}if(n.attributeName==="class"){const o=this.getAttribute("class")||"";o&&(t.className=o,this.removeAttribute("class"))}}}),this.mutationObserver.observe(this,{attributes:!0,attributeFilter:["style","class"]})}};up([a({type:String,reflect:!0})],y.prototype,"customClass");up([a({type:String,reflect:!0})],y.prototype,"customStyle");function Ia(){const e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){const n=(e+Math.random()*16)%16|0;return(r=="x"?n:n&3|8).toString(16)})}const vu=new CSSStyleSheet,wl=class wl extends f{constructor(){super()}connectedCallback(){super.connectedCallback(),this.shadowRoot?this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,vu]:console.error("Shadow root not available in ShadowWrapper")}render(){return l`<div><slot></slot></div>`}};wl.styles=ap`
|
|
40
40
|
:host {
|
|
41
41
|
display: block;
|
|
42
42
|
border: 2px solid black;
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
.wrapper {
|
|
46
46
|
display: block;
|
|
47
47
|
}
|
|
48
|
-
`;let Is=wl;customElements.define("pont-shadow-wrapper",Is);function mp(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=mp(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ia(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=mp(e))&&(n&&(n+=" "),n+=t);return n}const Aa="-",bu=e=>{const t=_u(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const d=s.split(Aa);return d[0]===""&&d.length!==1&&d.shift(),gp(d,t)||yu(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&n[s]?[...c,...n[s]]:c}}},gp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?gp(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Aa);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},kl=/^\[(.+)\]$/,yu=e=>{if(kl.test(e)){const t=kl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_u=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return $u(Object.entries(e.classGroups),r).forEach(([i,s])=>{As(s,n,i,t)}),n},As=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Nl(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(wu(o)){As(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{As(s,Nl(t,i),r,n)})})},Nl=(e,t)=>{let r=e;return t.split(Aa).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},wu=e=>e.isThemeGetter,$u=(e,t)=>t?e.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,o]}):e,Pu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}},fp="!",Cu=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],i=t.length,s=d=>{const c=[];let m=0,v=0,b;for(let x=0;x<d.length;x++){let S=d[x];if(m===0){if(S===o&&(n||d.slice(x,x+i)===t)){c.push(d.slice(v,x)),v=x+i;continue}if(S==="/"){b=x;continue}}S==="["?m++:S==="]"&&m--}const w=c.length===0?d:d.substring(v),_=w.startsWith(fp),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Su=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Eu=e=>({cache:Pu(e.cacheSize),parseClassName:Cu(e),...bu(e)}),xu=/\s+/,Ou=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(xu);let d="";for(let c=s.length-1;c>=0;c-=1){const m=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(m);let C=!!_,P=n(C?w.substring(0,_):w);if(!P){if(!C){d=m+(d.length>0?" "+d:d);continue}if(P=n(w),!P){d=m+(d.length>0?" "+d:d);continue}C=!1}const x=Su(v).join(":"),S=b?x+fp:x,D=S+P;if(i.includes(D))continue;i.push(D);const L=o(P,C);for(let R=0;R<L.length;++R){const K=L[R];i.push(S+K)}d=m+(d.length>0?" "+d:d)}return d};function Ru(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=vp(t))&&(n&&(n+=" "),n+=r);return n}const vp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=vp(e[n]))&&(r&&(r+=" "),r+=t);return r};function Iu(e,...t){let r,n,o,i=s;function s(c){const m=t.reduce((v,b)=>b(v),e());return r=Eu(m),n=r.cache.get,o=r.cache.set,i=d,d(c)}function d(c){const m=n(c);if(m)return m;const v=Ou(c,r);return o(c,v),v}return function(){return i(Ru.apply(null,arguments))}}const W=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Au=/^\d+\/\d+$/,Tu=new Set(["px","full","screen"]),Du=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ku=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>mo(e)||Tu.has(e)||Au.test(e),tr=e=>So(e,"length",Hu),mo=e=>!!e&&!Number.isNaN(Number(e)),Ji=e=>So(e,"number",mo),Ko=e=>!!e&&Number.isInteger(Number(e)),Mu=e=>e.endsWith("%")&&mo(e.slice(0,-1)),B=e=>bp.test(e),er=e=>Du.test(e),Bu=new Set(["length","size","percentage"]),Uu=e=>So(e,Bu,yp),ju=e=>So(e,"position",yp),qu=new Set(["image","url"]),zu=e=>So(e,qu,Ku),Vu=e=>So(e,"",Gu),Wo=()=>!0,So=(e,t,r)=>{const n=bp.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Hu=e=>Lu.test(e)&&!Fu.test(e),yp=()=>!1,Gu=e=>ku.test(e),Ku=e=>Nu.test(e),Wu=()=>{const e=W("colors"),t=W("spacing"),r=W("blur"),n=W("brightness"),o=W("borderColor"),i=W("borderRadius"),s=W("borderSpacing"),d=W("borderWidth"),c=W("contrast"),m=W("grayscale"),v=W("hueRotate"),b=W("invert"),w=W("gap"),_=W("gradientColorStops"),C=W("gradientColorStopPositions"),P=W("inset"),x=W("margin"),S=W("opacity"),D=W("padding"),L=W("saturate"),R=W("scale"),K=W("sepia"),O=W("skew"),A=W("space"),T=W("translate"),E=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",je,tr],M=()=>["auto",mo,B],Xt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Fn=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eo=()=>["start","end","center","between","around","evenly","stretch"],$r=()=>["","0",B],ro=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[mo,B];return{cacheSize:500,separator:":",theme:{colors:[Wo],spacing:[je,tr],blur:["none","",er,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",er,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:$r(),hueRotate:It(),invert:$r(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Mu,tr],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:$r(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[er]}],"break-after":[{"break-after":ro()}],"break-before":[{"break-before":ro()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Xt(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ko,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:$r()}],shrink:[{shrink:$r()}],order:[{order:["first","last","none",Ko,B]}],"grid-cols":[{"grid-cols":[Wo]}],"col-start-end":[{col:["auto",{span:["full",Ko,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Wo]}],"row-start-end":[{row:["auto",{span:[Ko,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...eo()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...eo(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...eo(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[er]},er]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",er,tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ji]}],"font-family":[{font:[Wo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",mo,Ji]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",je,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",je,tr]}],"underline-offset":[{"underline-offset":["auto",je,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xt(),ju]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zu]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:pe()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[je,B]}],"outline-w":[{outline:[je,tr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[je,tr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",er,Vu]}],"shadow-color":[{shadow:[Wo]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Fn(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Fn()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",er,B]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Ko,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[je,tr,Ji]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_p=Iu(Wu);function u(...e){return _p(Ia(e))}/**
|
|
48
|
+
`;let As=wl;customElements.define("pont-shadow-wrapper",As);function mp(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=mp(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Aa(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=mp(e))&&(n&&(n+=" "),n+=t);return n}const Ta="-",bu=e=>{const t=_u(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const d=s.split(Ta);return d[0]===""&&d.length!==1&&d.shift(),gp(d,t)||yu(s)},getConflictingClassGroupIds:(s,d)=>{const c=r[s]||[];return d&&n[s]?[...c,...n[s]]:c}}},gp=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?gp(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ta);return(s=t.validators.find(({validator:d})=>d(i)))==null?void 0:s.classGroupId},kl=/^\[(.+)\]$/,yu=e=>{if(kl.test(e)){const t=kl.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_u=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return $u(Object.entries(e.classGroups),r).forEach(([i,s])=>{Ts(s,n,i,t)}),n},Ts=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Nl(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(wu(o)){Ts(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{Ts(s,Nl(t,i),r,n)})})},Nl=(e,t)=>{let r=e;return t.split(Ta).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},wu=e=>e.isThemeGetter,$u=(e,t)=>t?e.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,d])=>[t+s,d])):i);return[r,o]}):e,Pu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}},fp="!",Cu=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],i=t.length,s=d=>{const c=[];let m=0,v=0,b;for(let x=0;x<d.length;x++){let S=d[x];if(m===0){if(S===o&&(n||d.slice(x,x+i)===t)){c.push(d.slice(v,x)),v=x+i;continue}if(S==="/"){b=x;continue}}S==="["?m++:S==="]"&&m--}const w=c.length===0?d:d.substring(v),_=w.startsWith(fp),C=_?w.substring(1):w,P=b&&b>v?b-v:void 0;return{modifiers:c,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:P}};return r?d=>r({className:d,parseClassName:s}):s},Su=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Eu=e=>({cache:Pu(e.cacheSize),parseClassName:Cu(e),...bu(e)}),xu=/\s+/,Ou=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(xu);let d="";for(let c=s.length-1;c>=0;c-=1){const m=s[c],{modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:_}=r(m);let C=!!_,P=n(C?w.substring(0,_):w);if(!P){if(!C){d=m+(d.length>0?" "+d:d);continue}if(P=n(w),!P){d=m+(d.length>0?" "+d:d);continue}C=!1}const x=Su(v).join(":"),S=b?x+fp:x,D=S+P;if(i.includes(D))continue;i.push(D);const L=o(P,C);for(let R=0;R<L.length;++R){const K=L[R];i.push(S+K)}d=m+(d.length>0?" "+d:d)}return d};function Ru(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=vp(t))&&(n&&(n+=" "),n+=r);return n}const vp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=vp(e[n]))&&(r&&(r+=" "),r+=t);return r};function Iu(e,...t){let r,n,o,i=s;function s(c){const m=t.reduce((v,b)=>b(v),e());return r=Eu(m),n=r.cache.get,o=r.cache.set,i=d,d(c)}function d(c){const m=n(c);if(m)return m;const v=Ou(c,r);return o(c,v),v}return function(){return i(Ru.apply(null,arguments))}}const W=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},bp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Au=/^\d+\/\d+$/,Tu=new Set(["px","full","screen"]),Du=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ku=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>mo(e)||Tu.has(e)||Au.test(e),tr=e=>So(e,"length",Hu),mo=e=>!!e&&!Number.isNaN(Number(e)),Xi=e=>So(e,"number",mo),Ko=e=>!!e&&Number.isInteger(Number(e)),Mu=e=>e.endsWith("%")&&mo(e.slice(0,-1)),B=e=>bp.test(e),er=e=>Du.test(e),Bu=new Set(["length","size","percentage"]),Uu=e=>So(e,Bu,yp),ju=e=>So(e,"position",yp),qu=new Set(["image","url"]),zu=e=>So(e,qu,Ku),Vu=e=>So(e,"",Gu),Wo=()=>!0,So=(e,t,r)=>{const n=bp.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Hu=e=>Lu.test(e)&&!Fu.test(e),yp=()=>!1,Gu=e=>ku.test(e),Ku=e=>Nu.test(e),Wu=()=>{const e=W("colors"),t=W("spacing"),r=W("blur"),n=W("brightness"),o=W("borderColor"),i=W("borderRadius"),s=W("borderSpacing"),d=W("borderWidth"),c=W("contrast"),m=W("grayscale"),v=W("hueRotate"),b=W("invert"),w=W("gap"),_=W("gradientColorStops"),C=W("gradientColorStopPositions"),P=W("inset"),x=W("margin"),S=W("opacity"),D=W("padding"),L=W("saturate"),R=W("scale"),K=W("sepia"),O=W("skew"),A=W("space"),T=W("translate"),E=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",B,t],$=()=>[B,t],k=()=>["",je,tr],M=()=>["auto",mo,B],Xt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Fn=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eo=()=>["start","end","center","between","around","evenly","stretch"],$r=()=>["","0",B],ro=()=>["auto","avoid","all","avoid-page","page","left","right","column"],It=()=>[mo,B];return{cacheSize:500,separator:":",theme:{colors:[Wo],spacing:[je,tr],blur:["none","",er,B],brightness:It(),borderColor:[e],borderRadius:["none","","full",er,B],borderSpacing:$(),borderWidth:k(),contrast:It(),grayscale:$r(),hueRotate:It(),invert:$r(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Mu,tr],inset:F(),margin:F(),opacity:It(),padding:$(),saturate:It(),scale:It(),sepia:$r(),skew:It(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[er]}],"break-after":[{"break-after":ro()}],"break-before":[{"break-before":ro()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Xt(),B]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ko,B]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",B]}],grow:[{grow:$r()}],shrink:[{shrink:$r()}],order:[{order:["first","last","none",Ko,B]}],"grid-cols":[{"grid-cols":[Wo]}],"col-start-end":[{col:["auto",{span:["full",Ko,B]},B]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Wo]}],"row-start-end":[{row:["auto",{span:[Ko,B]},B]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...eo()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...eo(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...eo(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[er]},er]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",er,tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xi]}],"font-family":[{font:[Wo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",B]}],"line-clamp":[{"line-clamp":["none",mo,Xi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",je,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",je,tr]}],"underline-offset":[{"underline-offset":["auto",je,B]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xt(),ju]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uu]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zu]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:pe()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[je,B]}],"outline-w":[{outline:[je,tr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[je,tr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",er,Vu]}],"shadow-color":[{shadow:[Wo]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...Fn(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Fn()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",er,B]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[L]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:It()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:It()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Ko,B]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[je,tr,Xi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_p=Iu(Wu);function u(...e){return _p(Aa(e))}/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/const
|
|
52
|
+
*/const Da={ATTRIBUTE:1,CHILD:2},Eo=e=>(...t)=>({_$litDirective$:e,values:t});let Ei=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this._$Ct=t,this._$AM=r,this._$Ci=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/**
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2020 Google LLC
|
|
55
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright 2017 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
|
-
*/const rn=(e,t)=>{var n;const r=e._$AN;if(r===void 0)return!1;for(const o of r)(n=o._$AO)==null||n.call(o,t,!1),rn(o,t);return!0},Yn=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},wp=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),tm(t)}};function Ju(e){this._$AN!==void 0?(Yn(this),this._$AM=e,wp(this)):this._$AM=e}function Xu(e,t=!1,r=0){const n=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(n))for(let i=r;i<n.length;i++)rn(n[i],!1),Yn(n[i]);else n!=null&&(rn(n,!1),Yn(n));else rn(this,e)}const tm=e=>{e.type==
|
|
60
|
+
*/const rn=(e,t)=>{var n;const r=e._$AN;if(r===void 0)return!1;for(const o of r)(n=o._$AO)==null||n.call(o,t,!1),rn(o,t);return!0},Yn=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},wp=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),tm(t)}};function Ju(e){this._$AN!==void 0?(Yn(this),this._$AM=e,wp(this)):this._$AM=e}function Xu(e,t=!1,r=0){const n=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(n))for(let i=r;i<n.length;i++)rn(n[i],!1),Yn(n[i]);else n!=null&&(rn(n,!1),Yn(n));else rn(this,e)}const tm=e=>{e.type==Da.CHILD&&(e._$AP??(e._$AP=Xu),e._$AQ??(e._$AQ=Ju))};class $p extends Ei{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,n){super._$AT(t,r,n),wp(this),this.isConnected=t._$AU}_$AO(t,r=!0){var n,o;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(o=this.disconnected)==null||o.call(this)),r&&(rn(this,t),Yn(this))}setValue(t){if(Yu(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}class em extends $p{constructor(){super(...arguments),this.prevData={}}render(t){return h}update(t,[r]){var n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(r),this.groom(r),this.prevData={...r}}apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const o in t){const i=t[o];i!==r[o]&&(n[o]=i)}}groom(t){const{prevData:r,element:n}=this;if(r)for(const o in r)(!t||!(o in t)&&n[o]===r[o])&&(n[o]=void 0)}}class rm extends em{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const r in t){const n=t[r];n!==this.eventData[r]&&this.applyEvent(r,n)}}applyEvent(t,r){const{prevData:n,element:o}=this;this.eventData[t]=r,n[t]&&o.removeEventListener(t,this,r),o.addEventListener(t,this,r)}groom(t){const{prevData:r,element:n}=this;if(r)for(const o in r)(!t||!(o in t)&&n[o]===r[o])&&this.groomEvent(o,r[o])}groomEvent(t,r){const{element:n}=this;delete this.eventData[t],n.removeEventListener(t,this,r)}handleEvent(t){const r=this.eventData[t.type];typeof r=="function"?r.call(this.host,t):r.handleEvent(t)}disconnected(){const{eventData:t,element:r}=this;for(const n in t){const o=n.slice(1),i=t[n];r.removeEventListener(o,this,i)}}reconnected(){const{eventData:t,element:r}=this;for(const n in t){const o=n.slice(1),i=t[n];r.addEventListener(o,this,i)}}}class om extends rm{apply(t){if(!t)return;const{prevData:r,element:n}=this;for(const o in t){const i=t[o];if(i===r[o])continue;const s=o.slice(1);switch(o[0]){case"@":this.eventData[s]=i,this.applyEvent(s,i);break;case".":n[s]=i;break;case"?":i?n.setAttribute(s,""):n.removeAttribute(s);break;default:i!=null?n.setAttribute(o,String(i)):n.removeAttribute(o);break}}}groom(t){const{prevData:r,element:n}=this;if(r)for(const o in r){const i=o.slice(1);if(!t||!(o in t)&&n[i]===r[o])switch(o[0]){case"@":this.groomEvent(i,r[o]);break;case".":n[i]=void 0;break;case"?":n.removeAttribute(i);break;default:n.removeAttribute(o);break}}}}const xt=Eo(om);/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
|
-
*/let Qn=class extends Ei{constructor(t){if(super(t),this.it=h,t.type!==
|
|
64
|
+
*/let Qn=class extends Ei{constructor(t){if(super(t),this.it=h,t.type!==Da.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===ar)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Qn.directiveName="unsafeHTML",Qn.resultType=1;const Pp=Eo(Qn),ln={base:[""],item:["pont-border-b-accordion-item-width-border pont-border-b-accordion-item-color-border"],trigger:["pont-flex pont-flex-1 pont-gap-accordion-trigger-space-gap pont-justify-between pont-items-start","pont-py-accordion-trigger-space-py","pont-w-accordion-trigger-space-w","pont-rounded-accordion-trigger-radius pont-outline-none","pont-text-accordion-trigger-font pont-font-accordion-trigger-font-weight pont-text-left","pont-transition-all","hover:pont-underline","focus-visible:pont-border-accordion-trigger-width-border-focus focus-visible:pont-border-accordion-trigger-color-border-focus","focus-visible:pont-ring-accordion-trigger-width-ring-focus focus-visible:pont-ring-accordion-trigger-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-50","[&[data-state=open]>svg]:pont-rotate-180"],chevron:["pont-shrink-0","pont-size-accordion-trigger-icon-space-size","pont-text-accordion-trigger-icon-color-text","pont-translate-y-0.5 pont-transition-transform pont-duration-200","pont-pointer-events-none"],content:["pont-overflow-hidden","pont-text-accordion-content-font pont-font-accordion-content-font-weight","data-[state=closed]:pont-h-accordion-content-space-h-closed","data-[state=closed]:pont-animate-accordion-content-animate-closed","data-[state=open]:pont-animate-accordion-content-animate-open","data-[state=open]:pont-h-fit","[&>div]:pont-pt-accordion-content-div-space-pt [&>div]:pont-pb-accordion-content-div-space-pb"]};var nm=Object.getOwnPropertyDescriptor,im=(e,t,r,n)=>{for(var o=n>1?void 0:n?nm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ds=class extends y{constructor(){super(...arguments),this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof fo);)e=e.parentElement;return e}get _item(){let e=this.parentElement;for(;e&&!(e instanceof ge);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
|
|
65
65
|
<div
|
|
66
66
|
part="accordion-content"
|
|
67
67
|
role="region"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
>
|
|
73
73
|
<div>${Pp(((t=this.textContent)==null?void 0:t.trim())||"")}</div>
|
|
74
74
|
</div>
|
|
75
|
-
`}};
|
|
75
|
+
`}};Ds=im([p("pont-accordion-content")],Ds);var sm=Object.defineProperty,am=Object.getOwnPropertyDescriptor,La=(e,t,r,n)=>{for(var o=n>1?void 0:n?am(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&sm(t,r,o),o};let ge=class extends y{constructor(){super(...arguments),this.value="",this.tabindex=0,this._initialChildren=[],this._onClick=e=>{const t=e.target.closest("pont-accordion-trigger");!t||!this._accordion||(e.preventDefault(),e.stopPropagation(),this._accordion.raiseEvent(this.value),t.requestUpdate(),setTimeout(()=>this.requestUpdate(),0))},this._onAccordionClick=()=>{this.requestUpdate()}}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof fo);)e=e.parentElement;return e}getAttributesToExclude(){return["aria-orientation","role","data-orientation","data-testid"]}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._initialChildren=this.filterChildren(),this.addEventListener("click",this._onClick),(e=this._accordion)==null||e.addEventListener("clicked-accordion",this._onAccordionClick)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this._onClick),(e=this._accordion)==null||e.removeEventListener("clicked-accordion",this._onAccordionClick)}filterChildren(){return Array.from(this.children).filter(e=>e instanceof Ls||e instanceof Ds)}render(){var r;const e=(r=this._accordion)==null?void 0:r.selectedItems.includes(this.value),t=this._initialChildren.length?this._initialChildren:this.filterChildren();return l`
|
|
76
76
|
<div
|
|
77
77
|
data-state=${e?"open":"closed"}
|
|
78
78
|
class="${u(ln.item,this.className)}"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
>
|
|
84
84
|
${t}
|
|
85
85
|
</div>
|
|
86
|
-
`}};
|
|
86
|
+
`}};La([a({type:String})],ge.prototype,"value",2);La([a({type:Number})],ge.prototype,"tabindex",2);ge=La([p("pont-accordion-item")],ge);var lm=Object.getOwnPropertyDescriptor,dm=(e,t,r,n)=>{for(var o=n>1?void 0:n?lm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ls=class extends y{get _item(){let e=this.parentElement;for(;e&&!(e instanceof ge);)e=e.parentElement;return e}get _accordion(){let e=this.parentElement;for(;e&&!(e instanceof fo);)e=e.parentElement;return e}getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}hasActiveState(){var e,t;return!!((e=this._item)!=null&&e.value)&&!!((t=this._accordion)!=null&&t.selectedItems.includes(this._item.value))}render(){var t;const e=this.hasActiveState();return l`
|
|
87
87
|
<button
|
|
88
88
|
type="button"
|
|
89
89
|
part="accordion-trigger"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<path d="m6 9 6 6 6-6" />
|
|
113
113
|
</svg>
|
|
114
114
|
</button>
|
|
115
|
-
`}};
|
|
115
|
+
`}};Ls=dm([p("pont-accordion-trigger")],Ls);var Er=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(Er||{}),cm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,Cp=(e,t,r,n)=>{for(var o=n>1?void 0:n?pm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cm(t,r,o),o};let fo=class extends y{constructor(){super(...arguments),this.type=Er.MULTIPLE,this.selectedItems=[],this._initialChildren=[]}getAttributesToExclude(){return["variant","data-testid"]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._initialChildren=Array.from(this.children).filter(e=>e instanceof ge)}willUpdate(e){e.has("type")&&(this.type===Er.SINGLE&&this.selectedItems.length>1&&(this.selectedItems=this.selectedItems.slice(0,1)),this._initialChildren.forEach(t=>{t instanceof ge&&t.requestUpdate()}))}updated(e){e.has("type")&&this._initialChildren.forEach(t=>{t instanceof ge&&t.requestUpdate()})}setSelectedItems(e){const t=this.selectedItems.indexOf(e);if(t>-1)if(this.type===Er.SINGLE)this.selectedItems=[];else if(this.type===Er.MULTIPLE)this.selectedItems.splice(t,1);else throw new Error("Invalid accordion type");else if(this.type===Er.SINGLE)this.selectedItems=[e];else if(this.type===Er.MULTIPLE)this.selectedItems.push(e);else throw new Error("Invalid accordion type")}raiseEvent(e){this.setSelectedItems(e),this.dispatchEvent(new CustomEvent("clicked-accordion",{bubbles:!0,composed:!0,detail:{selectedItems:this.selectedItems}}))}render(){const e=this._initialChildren.length?this._initialChildren:Array.from(this.children).filter(t=>t instanceof ge);return l`
|
|
116
116
|
<div
|
|
117
117
|
data-orientation="vertical"
|
|
118
118
|
${xt(this.getFilteredAttributes())}
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
>
|
|
122
122
|
${e}
|
|
123
123
|
</div>
|
|
124
|
-
`}};Cp([a({type:String})],fo.prototype,"type",2);fo=Cp([p("pont-accordion")],fo);var hm=Object.defineProperty,um=Object.getOwnPropertyDescriptor,Sp=(e,t,r,n)=>{for(var o=n>1?void 0:n?um(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hm(t,r,o),o};let
|
|
124
|
+
`}};Cp([a({type:String})],fo.prototype,"type",2);fo=Cp([p("pont-accordion")],fo);var hm=Object.defineProperty,um=Object.getOwnPropertyDescriptor,Sp=(e,t,r,n)=>{for(var o=n>1?void 0:n?um(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&hm(t,r,o),o};let Fs=class extends f{constructor(){super(...arguments),this.variant="default"}get _rootSlot(){return this.querySelector('[data-slot="alert"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="alert" data-variant=${this.variant}></div>`}};Sp([a({type:String})],Fs.prototype,"variant",2);Fs=Sp([p("pont-callout")],Fs);var mm=Object.getOwnPropertyDescriptor,gm=(e,t,r,n)=>{for(var o=n>1?void 0:n?mm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ml=class extends f{get _titleSlot(){return this.querySelector('[data-slot="alert-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="alert-title"></div>`}};Ml=gm([p("pont-callout-title")],Ml);var fm=Object.getOwnPropertyDescriptor,vm=(e,t,r,n)=>{for(var o=n>1?void 0:n?fm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Bl=class extends f{get _descriptionSlot(){return this.querySelector('[data-slot="alert-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="alert-description"></div>`}};Bl=vm([p("pont-callout-description")],Bl);var bm=Object.getOwnPropertyDescriptor,ym=(e,t,r,n)=>{for(var o=n>1?void 0:n?bm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ul=class extends f{get _actionSlot(){return this.querySelector('[data-slot="alert-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="alert-action"></div>`}};Ul=ym([p("pont-callout-action")],Ul);const jl={host:["pont-block pont-relative pont-w-full"],self:["pont-absolute pont-inset-0"]};var _m=Object.defineProperty,wm=Object.getOwnPropertyDescriptor,Ep=(e,t,r,n)=>{for(var o=n>1?void 0:n?wm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_m(t,r,o),o};let ks=class extends f{constructor(){super(...arguments),this.ratio=1/1,this._userClass="",this._userStyle=""}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._userClass=this.getAttribute("class")??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=u(this.className,jl.host)}updated(e){e.has("ratio")&&(this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%")}firstUpdated(){var t;this.style.paddingBottom=this.ratio>0?`${100/this.ratio}%`:"0%";const e=this.querySelector(".aspect-ratio");if(e){if(this._userClass&&(e.className=u(e.className,this._userClass)),this._userStyle){const r=(t=e.getAttribute("style"))==null?void 0:t.trim(),n=this._userStyle.trim();e.setAttribute("style",[r,n].filter(Boolean).join("; "))}Array.from(this.childNodes).forEach(r=>{r!==e&&e.appendChild(r)})}}render(){return l`
|
|
125
125
|
<div class="${u("aspect-ratio",jl.self)}"></div>
|
|
126
|
-
`}};Ep([a({type:Number,reflect:!0})],
|
|
126
|
+
`}};Ep([a({type:Number,reflect:!0})],ks.prototype,"ratio",2);ks=Ep([p("pont-aspect-ratio")],ks);var $m=Object.defineProperty,Pm=Object.getOwnPropertyDescriptor,xi=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$m(t,r,o),o};let dn=class extends f{constructor(){super(...arguments),this.size="default",this._imageLoaded=!1,this._imageError=!1}get _rootSlot(){return this.querySelector('[data-slot="avatar"]')}get _avatarImageChild(){return this.querySelector("pont-avatar-image")}get _avatarFallbackChild(){return this.querySelector("pont-avatar-fallback")}_syncChildren(){const e=this._imageError||!this._imageLoaded;this._avatarImageChild&&(this._avatarImageChild.style.display=e?"none":""),this._avatarFallbackChild&&(this._avatarFallbackChild.style.display=e?"":"none")}_onImageLoad(){this._imageLoaded=!0,this._imageError=!1,this._syncChildren()}_onImageError(){this._imageLoaded=!1,this._imageError=!0,this._syncChildren()}connectedCallback(){super.connectedCallback(),this.addEventListener("pont-avatar:image-load",this._onImageLoad),this.addEventListener("pont-avatar:image-error",this._onImageError)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pont-avatar:image-load",this._onImageLoad),this.removeEventListener("pont-avatar:image-error",this._onImageError)}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<span data-slot="avatar" data-size=${this.size}></span>`}};xi([a({type:String})],dn.prototype,"size",2);xi([g()],dn.prototype,"_imageLoaded",2);xi([g()],dn.prototype,"_imageError",2);dn=xi([p("pont-avatar")],dn);var Cm=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,Fa=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Cm(t,r,o),o};let Zn=class extends f{_onLoad(){this.dispatchEvent(new CustomEvent("pont-avatar:image-load",{bubbles:!0,composed:!0}))}_onError(){this.dispatchEvent(new CustomEvent("pont-avatar:image-error",{bubbles:!0,composed:!0}))}createRenderRoot(){return this}render(){return l`
|
|
127
127
|
<img
|
|
128
128
|
data-slot="avatar-image"
|
|
129
129
|
src=${this.src??""}
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
@load=${this._onLoad}
|
|
132
132
|
@error=${this._onError}
|
|
133
133
|
/>
|
|
134
|
-
`}};
|
|
134
|
+
`}};Fa([a({type:String})],Zn.prototype,"src",2);Fa([a({type:String})],Zn.prototype,"alt",2);Zn=Fa([p("pont-avatar-image")],Zn);var Em=Object.getOwnPropertyDescriptor,xm=(e,t,r,n)=>{for(var o=n>1?void 0:n?Em(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let ql=class extends f{get _fallbackSlot(){return this.querySelector('[data-slot="avatar-fallback"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._fallbackSlot&&((r=this._fallbackSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<span data-slot="avatar-fallback"></span>`}};ql=xm([p("pont-avatar-fallback")],ql);var Om=Object.getOwnPropertyDescriptor,Rm=(e,t,r,n)=>{for(var o=n>1?void 0:n?Om(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let zl=class extends f{get _badgeSlot(){return this.querySelector('[data-slot="avatar-badge"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._badgeSlot&&((r=this._badgeSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<span data-slot="avatar-badge"></span>`}};zl=Rm([p("pont-avatar-badge")],zl);var Im=Object.getOwnPropertyDescriptor,Am=(e,t,r,n)=>{for(var o=n>1?void 0:n?Im(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Vl=class extends f{get _groupSlot(){return this.querySelector('[data-slot="avatar-group"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupSlot&&((r=this._groupSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="avatar-group"></div>`}};Vl=Am([p("pont-avatar-group")],Vl);var Tm=Object.getOwnPropertyDescriptor,Dm=(e,t,r,n)=>{for(var o=n>1?void 0:n?Tm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Hl=class extends f{get _groupCountSlot(){return this.querySelector('[data-slot="avatar-group-count"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._groupCountSlot&&((r=this._groupCountSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="avatar-group-count"></div>`}};Hl=Dm([p("pont-avatar-group-count")],Hl);var Lm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,bn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lm(t,r,o),o};let vo=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="badge"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.href?l`
|
|
135
135
|
<a
|
|
136
136
|
data-slot="badge"
|
|
137
137
|
data-variant=${this.variant}
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
class="${u(xo.item,this.className)}"
|
|
179
179
|
part="breadcrumb-item"
|
|
180
180
|
></li>
|
|
181
|
-
`}};Kl=Bm([p("pont-bread-crumb-item")],Kl);var Um=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,xp=(e,t,r,n)=>{for(var o=n>1?void 0:n?jm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Um(t,r,o),o};let
|
|
181
|
+
`}};Kl=Bm([p("pont-bread-crumb-item")],Kl);var Um=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,xp=(e,t,r,n)=>{for(var o=n>1?void 0:n?jm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Um(t,r,o),o};let Ns=class extends y{constructor(){super(...arguments),this.href="/"}get _containerElement(){return this.querySelector("a[part=breadcrumb-link]")}getAttributesToExclude(){return[""]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
182
182
|
<a
|
|
183
183
|
${xt(e)}
|
|
184
184
|
id="pont-bread-crumb-link"
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
part="breadcrumb-link"
|
|
188
188
|
>
|
|
189
189
|
</a>
|
|
190
|
-
`}};xp([a({type:String})],
|
|
190
|
+
`}};xp([a({type:String})],Ns.prototype,"href",2);Ns=xp([p("pont-bread-crumb-link")],Ns);var qm=Object.getOwnPropertyDescriptor,zm=(e,t,r,n)=>{for(var o=n>1?void 0:n?qm(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Wl=class extends y{get _containerElement(){return this.querySelector("ol[part=breadcrumb-list]")}getAttributesToExclude(){return["variant"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
191
191
|
<ol
|
|
192
192
|
${xt(e)}
|
|
193
193
|
id="pont-bread-crumb-list"
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
|
|
257
257
|
@click=${this._handleClick}
|
|
258
258
|
></button>
|
|
259
|
-
`}};Qe([a({type:String})],_e.prototype,"variant",2);Qe([a({type:String})],_e.prototype,"size",2);Qe([a({type:String})],_e.prototype,"type",2);Qe([a({type:Boolean})],_e.prototype,"disabled",2);Qe([a({type:Boolean})],_e.prototype,"invalid",2);Qe([a({type:String})],_e.prototype,"href",2);Qe([a({type:String})],_e.prototype,"target",2);Qe([a({attribute:!1,type:Function})],_e.prototype,"onClick",2);_e=Qe([p("pont-button")],_e);const Jm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Xm(e){const t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function tg(e){const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),n=e.getDate(),o=e.getFullYear();return`${t}, ${r} ${n}${Xm(n)}, ${o}`}const Jl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xl=Ia,Fa=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Xl(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(m=>{const v=r==null?void 0:r[m],b=i==null?void 0:i[m];if(v===null)return null;const w=Jl(v)||Jl(b);return o[m][w]}),d=r&&Object.entries(r).reduce((m,v)=>{let[b,w]=v;return w===void 0||(m[b]=w),m},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((m,v)=>{let{class:b,className:w,..._}=v;return Object.entries(_).every(C=>{let[P,x]=C;return Array.isArray(x)?x.includes({...i,...d}[P]):{...i,...d}[P]===x})?[...m,b,w]:m},[]);return Xl(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},on=Fa(["pont-inline-flex pont-items-center pont-justify-center pont-shrink-0","pont-text-button-font-size pont-font-button-font-weight pont-whitespace-nowrap","pont-rounded-button-radius pont-outline-none","pont-transition-all","disabled:pont-opacity-button-opacity-disabled disabled:pont-pointer-events-none","focus-visible:pont-border-button-width-border-focus focus-visible:pont-border-button-color-border-focus focus-visible:pont-ring-button-width-ring-focus","aria-invalid:pont-border-button-width-border-invalid aria-invalid:pont-border-button-color-border-invalid","aria-invalid:pont-ring-button-width-ring-invalid aria-invalid:pont-ring-button-color-ring-invalid",'[&_svg]:pont-pointer-events-none [&_svg:not([class*="pont-size-"])]:pont-size-button-icon-space-size [&_svg]:pont-shrink-0'],{variants:{variant:{default:["pont-bg-button-default-color-bg pont-text-button-default-color-text","hover:pont-bg-button-default-color-bg-hover","focus-visible:pont-ring-button-default-color-ring-focus"],destructive:["pont-bg-button-destructive-color-bg pont-text-button-destructive-color-text","hover:pont-bg-button-destructive-color-bg-hover","focus-visible:pont-ring-button-destructive-color-ring-focus"],outline:["pont-bg-button-outline-color-bg","pont-border-button-outline-width-border pont-border-button-outline-color-border","hover:pont-bg-button-outline-color-bg-hover hover:pont-text-button-outline-color-text-hover","focus-visible:pont-ring-button-outline-color-ring-focus"],secondary:["pont-bg-button-secondary-color-bg pont-text-button-secondary-color-text","hover:pont-bg-button-secondary-color-bg-hover","focus-visible:pont-ring-button-secondary-color-ring-focus"],ghost:["hover:pont-bg-button-ghost-color-bg-hover hover:pont-text-button-ghost-color-text-hover","focus-visible:pont-ring-button-ghost-color-ring-focus"],link:["pont-text-button-link-color-text pont-underline-offset-4","hover:pont-underline","focus-visible:pont-ring-button-link-color-ring-focus"]},size:{default:["pont-h-button-space-h-default","pont-gap-button-space-gap-default pont-px-button-space-px-default pont-py-button-space-py-default","has-[>svg]:pont-px-button-space-px-default-has-icon"],sm:["pont-h-button-space-h-sm","pont-gap-button-space-gap-sm pont-px-button-space-px-sm","has-[>svg]:pont-px-button-space-px-sm-has-icon"],lg:["pont-h-button-space-h-lg","pont-gap-button-space-gap-lg pont-px-button-space-px-lg","has-[>svg]:pont-px-button-space-px-lg-has-icon"],icon:"pont-size-button-space-size-icon","icon-sm":"pont-size-button-space-size-icon-sm","icon-lg":"pont-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["pont-contents"],root:["group/calendar","pont-relative","pont-p-calendar-space-p","pont-w-fit","pont-bg-calendar-color-bg"],months:["pont-flex pont-relative","pont-flex-col md:pont-flex-row pont-gap-calendar-months-space-gap"],nav:["pont-flex pont-absolute pont-top-0 pont-inset-x-0","pont-gap-calendar-nav-space-gap pont-justify-between pont-items-center","pont-w-full"],month:["pont-flex","pont-flex-col pont-gap-calendar-month-space-gap","pont-w-full"],buttonPrevious:[u(on({variant:"ghost",size:"icon-sm"})),"pont-select-none","aria-disabled:pont-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[u(on({variant:"ghost",size:"icon-sm"})),"pont-select-none","aria-disabled:pont-opacity-calendar-button-next-opacity-disabled"],chevron:["pont-size-calendar-chevron-space-size"],monthCaption:["pont-flex pont-justify-center pont-items-center","pont-px-calendar-month-caption-space-px","pont-w-full pont-h-calendar-month-caption-space-h"],captionLabel:["pont-text-calendar-caption-label-font pont-font-calendar-caption-label-font-weight","pont-select-none"],monthGrid:["pont-w-full","pont-border-collapse"],weekdays:["pont-flex"],weekday:["pont-flex-1","pont-text-calendar-weekday-font pont-font-calendar-weekday-font-weight pont-text-calendar-weekday-color-text","pont-rounded-calendar-weekday-radius","pont-select-none"],weeks:[""],week:["pont-flex","pont-mt-calendar-week-space-mt","pont-w-full"],day:{base:["group/day","pont-aspect-square pont-relative","pont-w-full pont-h-full","pont-p-calendar-day-space-p","pont-text-center","pont-select-none"],today:["pont-bg-calendar-day-today-color-bg","pont-rounded-calendar-day-radius"],selected:{common:["pont-bg-calendar-day-color-bg-selected"],single:["pont-rounded-calendar-day-radius"],range:{start:["pont-rounded-l-calendar-day-radius"],middle:["pont-rounded-none"],end:["pont-rounded-r-calendar-day-radius"]}},index:{first:["pont-rounded-l-calendar-day-radius"],last:["pont-rounded-r-calendar-day-radius"]}},dayButton:{base:[on({variant:"ghost",size:"icon"}),"pont-aspect-square pont-flex","pont-flex-col pont-gap-calendar-day-button-space-gap","pont-size-auto pont-w-full pont-min-w-calendar-day-button-space-min-w","pont-text-calendar-day-button-font pont-font-calendar-day-button-font-weight","disabled:pont-text-calendar-day-button-color-text-disabled disabled:pont-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:pont-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:pont-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:pont-text-calendar-day-button-color-text-range-start data-[range-start=true]:pont-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:pont-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:pont-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:pont-text-calendar-day-button-color-text-range-end data-[range-end=true]:pont-bg-calendar-day-button-color-bg-range-end","[&>span]:pont-text-calendar-day-button-span-font [&>span]:pont-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:pont-relative group-data-[focused=true]/day:pont-z-10","group-data-[focused=true]/day:pont-border-calendar-day-width-border-focus group-data-[focused=true]/day:pont-border-calendar-day-color-border-focus","group-data-[focused=true]/day:pont-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:pont-ring-calendar-day-color-ring-focus"],outside:["pont-text-calendar-day-button-outside-color-text"],today:["pont-text-calendar-day-button-today-color-text","pont-bg-calendar-day-button-today-color-bg"]}};var eg=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,yn=(e,t,r,n)=>{for(var o=n>1?void 0:n?rg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&eg(t,r,o),o};let bo=class extends f{constructor(){super(...arguments),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){const r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(u(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=u(q.host)}firstUpdated(e){var r;const t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=u("calendar",q.root,this._userClass)),this._userStyle)){const n=(r=t.getAttribute("style"))==null?void 0:r.trim(),o=this._userStyle.trim();t.setAttribute("style",[n,o].filter(Boolean).join("; "))}}render(){const e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),n=new Date(e,t,1).getDay(),o=new Date(e,t,0).getDate(),i=[];for(let m=n-1;m>=0;m--)i.push({day:String(o-m),month:t-1,isOutside:!0});for(let m=1;m<=r;m++)i.push({day:String(m),month:t,isOutside:!1});const s=i.length%7;if(s!==0){const m=7-s;for(let v=1;v<=m;v++)i.push({day:String(v),month:t+1,isOutside:!0})}const d=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),c=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return l`
|
|
259
|
+
`}};Qe([a({type:String})],_e.prototype,"variant",2);Qe([a({type:String})],_e.prototype,"size",2);Qe([a({type:String})],_e.prototype,"type",2);Qe([a({type:Boolean})],_e.prototype,"disabled",2);Qe([a({type:Boolean})],_e.prototype,"invalid",2);Qe([a({type:String})],_e.prototype,"href",2);Qe([a({type:String})],_e.prototype,"target",2);Qe([a({attribute:!1,type:Function})],_e.prototype,"onClick",2);_e=Qe([p("pont-button")],_e);const Jm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Xm(e){const t=e%100;if(t>=11&&t<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function tg(e){const t=new Intl.DateTimeFormat("en-US",{weekday:"long"}).format(e),r=new Intl.DateTimeFormat("en-US",{month:"long"}).format(e),n=e.getDate(),o=e.getFullYear();return`${t}, ${r} ${n}${Xm(n)}, ${o}`}const Jl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xl=Aa,ka=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Xl(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(m=>{const v=r==null?void 0:r[m],b=i==null?void 0:i[m];if(v===null)return null;const w=Jl(v)||Jl(b);return o[m][w]}),d=r&&Object.entries(r).reduce((m,v)=>{let[b,w]=v;return w===void 0||(m[b]=w),m},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((m,v)=>{let{class:b,className:w,..._}=v;return Object.entries(_).every(C=>{let[P,x]=C;return Array.isArray(x)?x.includes({...i,...d}[P]):{...i,...d}[P]===x})?[...m,b,w]:m},[]);return Xl(e,s,c,r==null?void 0:r.class,r==null?void 0:r.className)},on=ka(["pont-inline-flex pont-items-center pont-justify-center pont-shrink-0","pont-text-button-font-size pont-font-button-font-weight pont-whitespace-nowrap","pont-rounded-button-radius pont-outline-none","pont-transition-all","disabled:pont-opacity-button-opacity-disabled disabled:pont-pointer-events-none","focus-visible:pont-border-button-width-border-focus focus-visible:pont-border-button-color-border-focus focus-visible:pont-ring-button-width-ring-focus","aria-invalid:pont-border-button-width-border-invalid aria-invalid:pont-border-button-color-border-invalid","aria-invalid:pont-ring-button-width-ring-invalid aria-invalid:pont-ring-button-color-ring-invalid",'[&_svg]:pont-pointer-events-none [&_svg:not([class*="pont-size-"])]:pont-size-button-icon-space-size [&_svg]:pont-shrink-0'],{variants:{variant:{default:["pont-bg-button-default-color-bg pont-text-button-default-color-text","hover:pont-bg-button-default-color-bg-hover","focus-visible:pont-ring-button-default-color-ring-focus"],destructive:["pont-bg-button-destructive-color-bg pont-text-button-destructive-color-text","hover:pont-bg-button-destructive-color-bg-hover","focus-visible:pont-ring-button-destructive-color-ring-focus"],outline:["pont-bg-button-outline-color-bg","pont-border-button-outline-width-border pont-border-button-outline-color-border","hover:pont-bg-button-outline-color-bg-hover hover:pont-text-button-outline-color-text-hover","focus-visible:pont-ring-button-outline-color-ring-focus"],secondary:["pont-bg-button-secondary-color-bg pont-text-button-secondary-color-text","hover:pont-bg-button-secondary-color-bg-hover","focus-visible:pont-ring-button-secondary-color-ring-focus"],ghost:["hover:pont-bg-button-ghost-color-bg-hover hover:pont-text-button-ghost-color-text-hover","focus-visible:pont-ring-button-ghost-color-ring-focus"],link:["pont-text-button-link-color-text pont-underline-offset-4","hover:pont-underline","focus-visible:pont-ring-button-link-color-ring-focus"]},size:{default:["pont-h-button-space-h-default","pont-gap-button-space-gap-default pont-px-button-space-px-default pont-py-button-space-py-default","has-[>svg]:pont-px-button-space-px-default-has-icon"],sm:["pont-h-button-space-h-sm","pont-gap-button-space-gap-sm pont-px-button-space-px-sm","has-[>svg]:pont-px-button-space-px-sm-has-icon"],lg:["pont-h-button-space-h-lg","pont-gap-button-space-gap-lg pont-px-button-space-px-lg","has-[>svg]:pont-px-button-space-px-lg-has-icon"],icon:"pont-size-button-space-size-icon","icon-sm":"pont-size-button-space-size-icon-sm","icon-lg":"pont-size-button-space-size-icon-lg"}},defaultVariants:{variant:"default",size:"default"}}),q={host:["pont-contents"],root:["group/calendar","pont-relative","pont-p-calendar-space-p","pont-w-fit","pont-bg-calendar-color-bg"],months:["pont-flex pont-relative","pont-flex-col md:pont-flex-row pont-gap-calendar-months-space-gap"],nav:["pont-flex pont-absolute pont-top-0 pont-inset-x-0","pont-gap-calendar-nav-space-gap pont-justify-between pont-items-center","pont-w-full"],month:["pont-flex","pont-flex-col pont-gap-calendar-month-space-gap","pont-w-full"],buttonPrevious:[u(on({variant:"ghost",size:"icon-sm"})),"pont-select-none","aria-disabled:pont-opacity-calendar-button-previous-opacity-disabled"],buttonNext:[u(on({variant:"ghost",size:"icon-sm"})),"pont-select-none","aria-disabled:pont-opacity-calendar-button-next-opacity-disabled"],chevron:["pont-size-calendar-chevron-space-size"],monthCaption:["pont-flex pont-justify-center pont-items-center","pont-px-calendar-month-caption-space-px","pont-w-full pont-h-calendar-month-caption-space-h"],captionLabel:["pont-text-calendar-caption-label-font pont-font-calendar-caption-label-font-weight","pont-select-none"],monthGrid:["pont-w-full","pont-border-collapse"],weekdays:["pont-flex"],weekday:["pont-flex-1","pont-text-calendar-weekday-font pont-font-calendar-weekday-font-weight pont-text-calendar-weekday-color-text","pont-rounded-calendar-weekday-radius","pont-select-none"],weeks:[""],week:["pont-flex","pont-mt-calendar-week-space-mt","pont-w-full"],day:{base:["group/day","pont-aspect-square pont-relative","pont-w-full pont-h-full","pont-p-calendar-day-space-p","pont-text-center","pont-select-none"],today:["pont-bg-calendar-day-today-color-bg","pont-rounded-calendar-day-radius"],selected:{common:["pont-bg-calendar-day-color-bg-selected"],single:["pont-rounded-calendar-day-radius"],range:{start:["pont-rounded-l-calendar-day-radius"],middle:["pont-rounded-none"],end:["pont-rounded-r-calendar-day-radius"]}},index:{first:["pont-rounded-l-calendar-day-radius"],last:["pont-rounded-r-calendar-day-radius"]}},dayButton:{base:[on({variant:"ghost",size:"icon"}),"pont-aspect-square pont-flex","pont-flex-col pont-gap-calendar-day-button-space-gap","pont-size-auto pont-w-full pont-min-w-calendar-day-button-space-min-w","pont-text-calendar-day-button-font pont-font-calendar-day-button-font-weight","disabled:pont-text-calendar-day-button-color-text-disabled disabled:pont-opacity-calendar-day-button-opacity-disabled","data-[selected-single=true]:pont-text-calendar-day-button-color-text-single-selected data-[selected-single=true]:pont-bg-calendar-day-button-color-bg-single-selected","data-[range-start=true]:pont-text-calendar-day-button-color-text-range-start data-[range-start=true]:pont-bg-calendar-day-button-color-bg-range-start","data-[range-middle=true]:pont-text-calendar-day-button-color-text-range-middle data-[range-middle=true]:pont-bg-calendar-day-button-color-bg-range-middle","data-[range-end=true]:pont-text-calendar-day-button-color-text-range-end data-[range-end=true]:pont-bg-calendar-day-button-color-bg-range-end","[&>span]:pont-text-calendar-day-button-span-font [&>span]:pont-opacity-calendar-day-button-span-opacity","group-data-[focused=true]/day:pont-relative group-data-[focused=true]/day:pont-z-10","group-data-[focused=true]/day:pont-border-calendar-day-width-border-focus group-data-[focused=true]/day:pont-border-calendar-day-color-border-focus","group-data-[focused=true]/day:pont-ring-calendar-day-width-ring-focus group-data-[focused=true]/day:pont-ring-calendar-day-color-ring-focus"],outside:["pont-text-calendar-day-button-outside-color-text"],today:["pont-text-calendar-day-button-today-color-text","pont-bg-calendar-day-button-today-color-bg"]}};var eg=Object.defineProperty,rg=Object.getOwnPropertyDescriptor,yn=(e,t,r,n)=>{for(var o=n>1?void 0:n?rg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&eg(t,r,o),o};let bo=class extends f{constructor(){super(...arguments),this.currentDate=new Date,this.selectedStartDate=null,this.selectedEndDate=null,this.mode="single",this._userClass="",this._userStyle=""}getDaysInMonth(e,t){return new Date(e,t+1,0).getDate()}previousMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()-1)}nextMonth(){this.currentDate=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth()+1)}selectDate(e,t){if(!t){const r=new Date(this.currentDate.getFullYear(),this.currentDate.getMonth(),e);r.getMonth()===this.currentDate.getMonth()&&(this.mode==="single"?(this.selectedStartDate=r,this.selectedEndDate=null):this.mode==="range"&&(!this.selectedStartDate||this.selectedEndDate?(this.selectedStartDate=r,this.selectedEndDate=null):r>=this.selectedStartDate?this.selectedEndDate=r:(this.selectedEndDate=this.selectedStartDate,this.selectedStartDate=r)),this.dispatchEvent(new CustomEvent("date-selected",{detail:{startDate:this.selectedStartDate,endDate:this.selectedEndDate},bubbles:!0,composed:!0})))}}isDayInRange(e,t){return!this.selectedStartDate||!this.selectedEndDate||e.getMonth()!==this.currentDate.getMonth()?!1:t?e>this.selectedStartDate&&e<this.selectedEndDate:e>=this.selectedStartDate&&e<=this.selectedEndDate}createRenderRoot(){return this}connectedCallback(){var e;super.connectedCallback(),this._userClass=((e=this.getAttribute("class"))==null?void 0:e.replace(u(q.host),""))??"",this._userStyle=this.getAttribute("style")??"",this._userClass&&this.removeAttribute("class"),this._userStyle&&this.removeAttribute("style"),this.className=u(q.host)}firstUpdated(e){var r;const t=this.querySelector(".calendar");if(t&&(this._userClass&&(t.className=u("calendar",q.root,this._userClass)),this._userStyle)){const n=(r=t.getAttribute("style"))==null?void 0:r.trim(),o=this._userStyle.trim();t.setAttribute("style",[n,o].filter(Boolean).join("; "))}}render(){const e=this.currentDate.getFullYear(),t=this.currentDate.getMonth(),r=this.getDaysInMonth(e,t),n=new Date(e,t,1).getDay(),o=new Date(e,t,0).getDate(),i=[];for(let m=n-1;m>=0;m--)i.push({day:String(o-m),month:t-1,isOutside:!0});for(let m=1;m<=r;m++)i.push({day:String(m),month:t,isOutside:!1});const s=i.length%7;if(s!==0){const m=7-s;for(let v=1;v<=m;v++)i.push({day:String(v),month:t+1,isOutside:!0})}const d=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"}),c=this.currentDate.toLocaleString("default",{month:"long",year:"numeric"});return l`
|
|
260
260
|
<div
|
|
261
261
|
class=${u("calendar",q.root,this._userClass)}
|
|
262
262
|
data-slot="calendar"
|
|
@@ -385,11 +385,11 @@
|
|
|
385
385
|
</div>
|
|
386
386
|
</div>
|
|
387
387
|
</div>
|
|
388
|
-
`}};yn([a({type:Object})],bo.prototype,"currentDate",2);yn([a({type:Object})],bo.prototype,"selectedStartDate",2);yn([a({type:Object})],bo.prototype,"selectedEndDate",2);yn([a({type:String})],bo.prototype,"mode",2);bo=yn([p("pont-calendar")],bo);var og=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,Op=(e,t,r,n)=>{for(var o=n>1?void 0:n?ng(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&og(t,r,o),o};let
|
|
388
|
+
`}};yn([a({type:Object})],bo.prototype,"currentDate",2);yn([a({type:Object})],bo.prototype,"selectedStartDate",2);yn([a({type:Object})],bo.prototype,"selectedEndDate",2);yn([a({type:String})],bo.prototype,"mode",2);bo=yn([p("pont-calendar")],bo);var og=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,Op=(e,t,r,n)=>{for(var o=n>1?void 0:n?ng(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&og(t,r,o),o};let Ms=class extends f{constructor(){super(...arguments),this.size="default"}get _rootSlot(){return this.querySelector('[data-slot="card"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="card" data-size=${this.size}></div>`}};Op([a({type:String})],Ms.prototype,"size",2);Ms=Op([p("pont-card")],Ms);var ig=Object.defineProperty,sg=Object.getOwnPropertyDescriptor,Rp=(e,t,r,n)=>{for(var o=n>1?void 0:n?sg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ig(t,r,o),o};let Bs=class extends f{get _headerSlot(){return this.querySelector('[data-slot="card-header"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._headerSlot&&((r=this._headerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
389
389
|
<div data-slot="card-header" ?data-border=${this.border}></div>
|
|
390
|
-
`}};Rp([a({type:Boolean})],
|
|
390
|
+
`}};Rp([a({type:Boolean})],Bs.prototype,"border",2);Bs=Rp([p("pont-card-header")],Bs);var ag=Object.getOwnPropertyDescriptor,lg=(e,t,r,n)=>{for(var o=n>1?void 0:n?ag(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let td=class extends f{get _titleSlot(){return this.querySelector('[data-slot="card-title"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._titleSlot&&((r=this._titleSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="card-title"></div>`}};td=lg([p("pont-card-title")],td);var dg=Object.getOwnPropertyDescriptor,cg=(e,t,r,n)=>{for(var o=n>1?void 0:n?dg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let ed=class extends f{get _descriptionSlot(){return this.querySelector('[data-slot="card-description"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._descriptionSlot&&((r=this._descriptionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="card-description"></div>`}};ed=cg([p("pont-card-description")],ed);var pg=Object.getOwnPropertyDescriptor,hg=(e,t,r,n)=>{for(var o=n>1?void 0:n?pg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let rd=class extends f{get _actionSlot(){return this.querySelector('[data-slot="card-action"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._actionSlot&&((r=this._actionSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="card-action"></div>`}};rd=hg([p("pont-card-action")],rd);var ug=Object.getOwnPropertyDescriptor,mg=(e,t,r,n)=>{for(var o=n>1?void 0:n?ug(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let od=class extends f{get _contentSlot(){return this.querySelector('[data-slot="card-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<div data-slot="card-content"></div>`}};od=mg([p("pont-card-content")],od);var gg=Object.defineProperty,fg=Object.getOwnPropertyDescriptor,Ip=(e,t,r,n)=>{for(var o=n>1?void 0:n?fg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gg(t,r,o),o};let Us=class extends f{get _footerSlot(){return this.querySelector('[data-slot="card-footer"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._footerSlot&&((r=this._footerSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`
|
|
391
391
|
<div data-slot="card-footer" ?data-border=${this.border}></div>
|
|
392
|
-
`}};Ip([a({type:Boolean})],
|
|
392
|
+
`}};Ip([a({type:Boolean})],Us.prototype,"border",2);Us=Ip([p("pont-card-footer")],Us);function vg(){return U` <svg
|
|
393
393
|
class="shrink-0 size-3.5 text-gray-500 dark:text-neutral-500"
|
|
394
394
|
xmlns="http://www.w3.org/2000/svg"
|
|
395
395
|
width="24"
|
|
@@ -592,7 +592,7 @@
|
|
|
592
592
|
class="${u("",this.className)}"
|
|
593
593
|
part="collapsible"
|
|
594
594
|
></div>
|
|
595
|
-
`}};Ap([a({type:Boolean})],Jn.prototype,"open",2);Jn=Ap([p("pont-collapsible")],Jn);const Ro={empty:["pont-py-combo-box-empty-space-py","pont-text-center","pont-text-combo-box-empty-font"],group:{base:["pont-pointer-events-none","pont-invisible","pont-absolute","pont-z-50","pont-mt-combo-box-group-space-mt","pont-max-h-combo-box-group-space-max-h","pont-w-combo-box-group-space-w","pont-origin-top","pont-scale-y-0","pont-transform","pont-overflow-hidden","pont-overflow-y-auto","pont-rounded-combo-box-group-radius","pont-border-combo-box-group-width-border","pont-border-combo-box-group-color-border","pont-bg-combo-box-group-color-bg","pont-px-combo-box-group-space-px","pont-py-combo-box-group-space-py","pont-opacity-0","pont-shadow-combo-box-group-shadow","pont-transition-opacity","pont-duration-combo-box-group-motion-duration","pont-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:pont-w-0"]},input:["pont-flex","pont-h-combo-box-input-space-h","pont-w-combo-box-input-space-w","pont-rounded-combo-box-input-radius","pont-border-0","pont-bg-combo-box-input-color-bg","pont-px-combo-box-input-space-px","pont-py-combo-box-input-space-py","pont-text-combo-box-input-font","pont-text-combo-box-input-color-text","pont-shadow-none","placeholder:pont-text-combo-box-input-color-text-placeholder","focus:pont-outline-none","focus-visible:pont-ring-0"],trigger:{base:["pont-z-20","pont-flex","pont-h-combo-box-trigger-space-h","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-trigger-radius","pont-border-combo-box-trigger-width-border","pont-border-combo-box-trigger-color-border","pont-bg-combo-box-trigger-color-bg","pont-px-combo-box-trigger-space-px","pont-py-combo-box-trigger-space-py","pont-text-combo-box-trigger-font","focus:pont-outline-none","focus:pont-ring-combo-box-trigger-width-ring-focus","focus:pont-ring-combo-box-trigger-color-ring-focus","focus:pont-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:pont-cursor-not-allowed","disabled:pont-opacity-combo-box-trigger-opacity-disabled"]},value:["pont-line-clamp-1","pont-flex","pont-w-combo-box-value-space-w"],item:{base:["pont-flex","pont-w-combo-box-item-space-w","pont-cursor-pointer","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-item-radius","pont-px-combo-box-item-space-px","pont-py-combo-box-item-space-py","hover:pont-bg-accent","focus:pont-bg-combo-box-item-color-bg-hover","focus:pont-outline-none"]}};var Fg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,Tp=(e,t,r,n)=>{for(var o=n>1?void 0:n?kg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fg(t,r,o),o};let
|
|
595
|
+
`}};Ap([a({type:Boolean})],Jn.prototype,"open",2);Jn=Ap([p("pont-collapsible")],Jn);const Ro={empty:["pont-py-combo-box-empty-space-py","pont-text-center","pont-text-combo-box-empty-font"],group:{base:["pont-pointer-events-none","pont-invisible","pont-absolute","pont-z-50","pont-mt-combo-box-group-space-mt","pont-max-h-combo-box-group-space-max-h","pont-w-combo-box-group-space-w","pont-origin-top","pont-scale-y-0","pont-transform","pont-overflow-hidden","pont-overflow-y-auto","pont-rounded-combo-box-group-radius","pont-border-combo-box-group-width-border","pont-border-combo-box-group-color-border","pont-bg-combo-box-group-color-bg","pont-px-combo-box-group-space-px","pont-py-combo-box-group-space-py","pont-opacity-0","pont-shadow-combo-box-group-shadow","pont-transition-opacity","pont-duration-combo-box-group-motion-duration","pont-ease-combo-box-group-motion-fn","[&::-webkit-scrollbar]:pont-w-0"]},input:["pont-flex","pont-h-combo-box-input-space-h","pont-w-combo-box-input-space-w","pont-rounded-combo-box-input-radius","pont-border-0","pont-bg-combo-box-input-color-bg","pont-px-combo-box-input-space-px","pont-py-combo-box-input-space-py","pont-text-combo-box-input-font","pont-text-combo-box-input-color-text","pont-shadow-none","placeholder:pont-text-combo-box-input-color-text-placeholder","focus:pont-outline-none","focus-visible:pont-ring-0"],trigger:{base:["pont-z-20","pont-flex","pont-h-combo-box-trigger-space-h","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-trigger-radius","pont-border-combo-box-trigger-width-border","pont-border-combo-box-trigger-color-border","pont-bg-combo-box-trigger-color-bg","pont-px-combo-box-trigger-space-px","pont-py-combo-box-trigger-space-py","pont-text-combo-box-trigger-font","focus:pont-outline-none","focus:pont-ring-combo-box-trigger-width-ring-focus","focus:pont-ring-combo-box-trigger-color-ring-focus","focus:pont-ring-offset-combo-box-trigger-width-ring-offset-focus","disabled:pont-cursor-not-allowed","disabled:pont-opacity-combo-box-trigger-opacity-disabled"]},value:["pont-line-clamp-1","pont-flex","pont-w-combo-box-value-space-w"],item:{base:["pont-flex","pont-w-combo-box-item-space-w","pont-cursor-pointer","pont-flex-row-reverse","pont-items-center","pont-justify-between","pont-rounded-combo-box-item-radius","pont-px-combo-box-item-space-px","pont-py-combo-box-item-space-py","hover:pont-bg-accent","focus:pont-bg-combo-box-item-color-bg-hover","focus:pont-outline-none"]}};var Fg=Object.defineProperty,kg=Object.getOwnPropertyDescriptor,Tp=(e,t,r,n)=>{for(var o=n>1?void 0:n?kg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fg(t,r,o),o};let js=class extends y{constructor(){super(...arguments),this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)}}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this.buttonElement),this.addEventListener("click",t=>{t.stopPropagation()})}render(){return l`
|
|
596
596
|
<button
|
|
597
597
|
type="button"
|
|
598
598
|
part="combo-box-trigger-button"
|
|
@@ -605,21 +605,21 @@
|
|
|
605
605
|
>
|
|
606
606
|
${vg()}
|
|
607
607
|
</button>
|
|
608
|
-
`}};Tp([vn("button")],
|
|
608
|
+
`}};Tp([vn("button")],js.prototype,"buttonElement",2);js=Tp([p("pont-combo-box-trigger")],js);var Ng=Object.defineProperty,Mg=Object.getOwnPropertyDescriptor,Dp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ng(t,r,o),o};let qs=class extends f{constructor(){super(...arguments),this.placeholder="select a value",this.handleClick=()=>{this._comboBox&&([...document.getElementsByTagName("pont-combo-box")].forEach(t=>{var r;t.uuid!==((r=this._comboBox)==null?void 0:r.uuid)&&(t.isOpen=!1)}),this._comboBox.isOpen=!this._comboBox.isOpen)},this.renderLabel=()=>this._comboBox&&this._comboBox.selectedValue.length>0?this._comboBox.selectedValue:this.placeholder}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",()=>{this.requestUpdate()})}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",t=>{t.stopPropagation()})}createRenderRoot(){return this}render(){return l`
|
|
609
609
|
<span
|
|
610
610
|
part="combo-box-value"
|
|
611
611
|
class="${u(Ro.value,this.className)}"
|
|
612
612
|
@click=${this.handleClick}
|
|
613
613
|
>${this.renderLabel()}</span
|
|
614
614
|
>
|
|
615
|
-
`}};Dp([a({type:String})],
|
|
615
|
+
`}};Dp([a({type:String})],qs.prototype,"placeholder",2);qs=Dp([p("pont-combo-box-value")],qs);var Bg=Object.defineProperty,Ug=Object.getOwnPropertyDescriptor,Na=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ug(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bg(t,r,o),o};let Xn=class extends f{constructor(){super(...arguments),this.orientation="horizontal"}createRenderRoot(){return this}render(){return l`
|
|
616
616
|
<div
|
|
617
617
|
data-slot="separator"
|
|
618
618
|
data-orientation=${this.orientation}
|
|
619
619
|
role=${this.decorative?"none":"separator"}
|
|
620
620
|
aria-orientation=${this.decorative?h:this.orientation}
|
|
621
621
|
></div>
|
|
622
|
-
`}};
|
|
622
|
+
`}};Na([a({type:String})],Xn.prototype,"orientation",2);Na([a({type:Boolean})],Xn.prototype,"decorative",2);Xn=Na([p("pont-separator")],Xn);var jg=Object.defineProperty,qg=Object.getOwnPropertyDescriptor,_n=(e,t,r,n)=>{for(var o=n>1?void 0:n?qg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jg(t,r,o),o};let Tr=class extends y{constructor(){super(...arguments),this.searchKey="",this.focusedIndex=0,this.selectedValue="",this.isOpen=!1,this.handleItemClicked=()=>{this.requestUpdate()},this.handleTriggerComboBox=e=>{var t,r;e.detail.isOpen!==((t=this._comboBox)==null?void 0:t.isOpen)&&this.requestUpdate(),e.detail.isOpen&&((r=this._comboBox)!=null&&r.selectedValue)&&(this.focusedIndex=this.comboBoxItems.findIndex(n=>{var o;return n.getAttribute("value")===((o=this._comboBox)==null?void 0:o.selectedValue)}),this.requestUpdate())},this.handleKeyDown=e=>{var r;if(!((r=this._comboBox)!=null&&r.isOpen))return;e.preventDefault();const t=this.filteredItems;switch(e.key){case"ArrowDown":if(t.length===0)return;this.focusedIndex=(this.focusedIndex+1)%t.length;break;case"ArrowUp":if(t.length===0)return;this.focusedIndex=(this.focusedIndex-1+t.length)%t.length;break;case"Enter":if(this.focusedIndex>=0&&this.focusedIndex<t.length){const n=t[this.focusedIndex].getAttribute("value");this.dispatchEvent(new CustomEvent("clicked-combo-box-item",{bubbles:!0,composed:!0,detail:{selectedItem:n}}))}break}},this.handleMouseOver=(e,t)=>{e.preventDefault(),this.focusedIndex=t},this.onSelectedValue=(e,t)=>{this.focusedIndex=t,this.selectedValue=e},this.boundHandleComboBoxStateChanged=this.handleComboBoxStateChanged.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}get comboBoxItems(){return Array.from(this.querySelectorAll('[data-managed="true"][tag="pont-combo-box-item"], pont-combo-box-item')).filter(e=>e.hasAttribute("value"))}get comboBoxInput(){return this.querySelector("pont-combo-box-input")}get comboBoxEmpty(){return this.querySelector("pont-combo-box-empty")}get hasResults(){return!this.filteredItems.length}get filteredItems(){var t;const e=(t=this.searchKey)==null?void 0:t.toLowerCase();return this.comboBoxItems.filter(r=>{var n;return(n=r.getAttribute("value"))==null?void 0:n.toLowerCase().includes(e)})}get _comboBox(){let e=this.parentElement;for(;e&&!(e instanceof Dt);)e=e.parentElement;return e}handleComboBoxStateChanged(e){var o;const{isOpen:t,targetComboBoxId:r}=e.detail;if(this.isOpen=t,r!==((o=this._comboBox)==null?void 0:o.uuid))return;const n=this.renderRoot.querySelector('[part="select-group"]');n&&(t?(clearTimeout(n._hideTimeout),n.classList.remove("pont-scale-y-0","pont-opacity-0"),n.classList.add("pont-scale-y-100","pont-opacity-100"),n.classList.remove("pont-invisible","pont-pointer-events-none"),n.classList.add("pont-visible","pont-pointer-events-auto")):(n.classList.remove("pont-opacity-100"),n.classList.add("pont-opacity-0"),n._hideTimeout=setTimeout(()=>{n.classList.remove("pont-visible","pont-pointer-events-auto","pont-scale-y-100"),n.classList.add("pont-invisible","pont-pointer-events-none","pont-scale-y-0")},300)))}moveChildren(){const e=this.renderRoot.querySelector('[part="select-group"]');if(!e)return;const t={top:e.querySelector("#topSlot"),empty:e.querySelector("#emptySlot"),list:e.querySelector("#listSlot")},r={"pont-combo-box-input":"top","pont-combo-box-empty":"empty","pont-combo-box-item":"list"};Array.from(this.children).forEach(n=>{var s;const o=n.tagName.toLowerCase(),i=r[o];i&&(n.setAttribute("data-managed","true"),(s=t[i])==null||s.appendChild(n))})}renderFilteredItems(){return this.comboBoxItems.forEach(e=>e.setAttribute("hidden","true")),this.filteredItems.map((e,t)=>{var i;const r=e.getAttribute("value")??"",n=t===this.focusedIndex,o=r.toLowerCase()===((i=this._comboBox)==null?void 0:i.selectedValue.toLowerCase());return l`
|
|
623
623
|
<pont-combo-box-item
|
|
624
624
|
@mouseover="${s=>this.handleMouseOver(s,t)}"
|
|
625
625
|
.value=${r}
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
${Pg()}
|
|
663
663
|
</span>
|
|
664
664
|
</div>
|
|
665
|
-
`}};ae([a({type:String})],Ht.prototype,"value",2);ae([a({type:String})],Ht.prototype,"key",2);ae([a({type:Number})],Ht.prototype,"tabindex",2);ae([a({type:Boolean})],Ht.prototype,"isSelected",2);ae([a({type:Boolean})],Ht.prototype,"isFocus",2);ae([a({type:String})],Ht.prototype,"class",2);ae([a({type:Number})],Ht.prototype,"selectItemIndex",2);ae([a({type:Function})],Ht.prototype,"onSelect",2);ae([a({type:Function})],Ht.prototype,"onMouseOver",2);ae([vn("#pont-combo-box-item")],Ht.prototype,"itemDivContainer",2);Ht=ae([p("pont-combo-box-item")],Ht);var Hg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,
|
|
665
|
+
`}};ae([a({type:String})],Ht.prototype,"value",2);ae([a({type:String})],Ht.prototype,"key",2);ae([a({type:Number})],Ht.prototype,"tabindex",2);ae([a({type:Boolean})],Ht.prototype,"isSelected",2);ae([a({type:Boolean})],Ht.prototype,"isFocus",2);ae([a({type:String})],Ht.prototype,"class",2);ae([a({type:Number})],Ht.prototype,"selectItemIndex",2);ae([a({type:Function})],Ht.prototype,"onSelect",2);ae([a({type:Function})],Ht.prototype,"onMouseOver",2);ae([vn("#pont-combo-box-item")],Ht.prototype,"itemDivContainer",2);Ht=ae([p("pont-combo-box-item")],Ht);var Hg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,Ma=(e,t,r,n)=>{for(var o=n>1?void 0:n?Gg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Hg(t,r,o),o};let ti=class extends f{constructor(){super(...arguments),this.placeholder="Search Item ...",this.searchValue=""}get _comboBoxGroup(){let e=this.parentElement;for(;e&&!(e instanceof Tr);)e=e.parentElement;return e}handleSearch(e){e.stopPropagation();const t=e.target;this.searchValue=t.value,this._comboBoxGroup&&(this._comboBoxGroup.searchKey=this.searchValue)}handleKeyDown(e){e.stopPropagation()}createRenderRoot(){return this}render(){return l`
|
|
666
666
|
<div class="pont-flex pont-items-center pont-px-2">
|
|
667
667
|
${$g()}
|
|
668
668
|
<input
|
|
@@ -680,21 +680,21 @@
|
|
|
680
680
|
@keydown="${this.handleKeyDown}"
|
|
681
681
|
/>
|
|
682
682
|
</div>
|
|
683
|
-
`}};
|
|
683
|
+
`}};Ma([a({type:String})],ti.prototype,"placeholder",2);Ma([g()],ti.prototype,"searchValue",2);ti=Ma([p("pont-combo-box-input")],ti);var Kg=Object.getOwnPropertyDescriptor,Wg=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let ad=class extends y{createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.removeDuplicateContent()}render(){return l`
|
|
684
684
|
<div
|
|
685
685
|
class="${u(Ro.empty,this.className)}"
|
|
686
686
|
role="presentation"
|
|
687
687
|
>
|
|
688
688
|
${Array.from(this.childNodes)[0].textContent}
|
|
689
689
|
</div>
|
|
690
|
-
`}};ad=Wg([p("pont-combo-box-empty")],ad);var Yg=Object.defineProperty,Qg=Object.getOwnPropertyDescriptor,xe=(e,t,r,n)=>{for(var o=n>1?void 0:n?Qg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Yg(t,r,o),o};let Dt=class extends y{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=
|
|
690
|
+
`}};ad=Wg([p("pont-combo-box-empty")],ad);var Yg=Object.defineProperty,Qg=Object.getOwnPropertyDescriptor,xe=(e,t,r,n)=>{for(var o=n>1?void 0:n?Qg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Yg(t,r,o),o};let Dt=class extends y{constructor(){super(),this.isOpen=!1,this.selectedValue="",this.searchTerm="",this.focusedIndex=-1,this.filteredItems=[],this.uuid=Ia(),this.label="Select an item",this.items=[],this.handleClickOutside=e=>{var n;const t=(n=this.renderRoot)==null?void 0:n.querySelector("[data-combo-box-uuid]"),r=e.target;if(!r.tagName.includes("RTG-COMBO")&&!(r.shadowRoot&&r.shadowRoot.innerHTML.includes(t==null?void 0:t.innerHTML))){if(this.isOpen&&!t||!(t!=null&&t.contains(r)))this.isOpen=!1;else if(!(r==null?void 0:r.firstElementChild))return}}}connectedCallback(){super.connectedCallback(),document.addEventListener("clicked-combo-box-item",e=>{this.isOpen&&(this.selectedValue=e.detail.selectedItem,this.isOpen=!1,this.requestUpdate())})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.parentDiveElement),this.items&&this.items.length>0&&(this.filteredItems=this.items.filter(t=>t.toLowerCase().includes(this.searchTerm)))}updated(e){super.updated(e),e.has("isOpen")&&(this.dispatchEvent(new CustomEvent("pont-combo-box-state-changed",{detail:{isOpen:this.isOpen,targetComboBoxId:this.uuid},bubbles:!0,composed:!0})),this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}selectItem(e){const t=e.target;if(t instanceof HTMLElement){const r=t.closest("pont-combo-box-item");r?(this.selectedValue=r.getAttribute("data-hs-combo-box-value")||"",this.isOpen=!1):console.log("No valid pont-combo-box-item found")}else console.log("Event target is not an HTMLElement")}render(){return l`
|
|
691
691
|
<div
|
|
692
692
|
class="${u("pont-relative",this.className)}"
|
|
693
693
|
data-hs-combo-box=""
|
|
694
694
|
data-combo-box-uuid=${this.uuid}
|
|
695
695
|
part="combo-box"
|
|
696
696
|
></div>
|
|
697
|
-
`}};xe([a({type:Boolean})],Dt.prototype,"isOpen",2);xe([g()],Dt.prototype,"selectedValue",2);xe([g()],Dt.prototype,"searchTerm",2);xe([g()],Dt.prototype,"focusedIndex",2);xe([g()],Dt.prototype,"filteredItems",2);xe([g()],Dt.prototype,"uuid",2);xe([a({type:String})],Dt.prototype,"label",2);xe([a({type:Array})],Dt.prototype,"items",2);xe([vn('[part="combo-box"]')],Dt.prototype,"parentDiveElement",2);Dt=xe([p("pont-combo-box")],Dt);const ye={root:["pont-flex pont-overflow-hidden","pont-flex-col","pont-w-command-space-w pont-h-command-space-h","pont-text-command-color-text","pont-bg-command-color-bg","pont-rounded-command-radius"],input:{wrapper:["pont-flex","pont-gap-command-input-wrapper-space-gap pont-items-center","pont-px-command-input-wrapper-space-px","pont-h-command-input-wrapper-space-h","pont-border-b-command-input-wrapper-width-border pont-border-b-command-input-wrapper-color-border"],icon:["pont-shrink-0","pont-size-command-input-icon-space-size","pont-opacity-command-input-icon-opacity"],input:["pont-flex","pont-py-command-input-space-py","pont-w-command-input-space-w pont-h-command-input-space-h","pont-text-command-input-font","pont-bg-command-input-color-bg","pont-rounded-command-input-radius pont-outline-hidden","focus:pont-outline-none","disabled:pont-opacity-command-input-opacity-disabled disabled:pont-cursor-not-allowed","placeholder:pont-text-command-input-placeholder-color-text"]},list:["pont-overflow-x-hidden pont-overflow-y-auto","pont-max-h-command-list-space-max-h","pont-scroll-py-1"],empty:["pont-py-command-empty-space-py","pont-text-command-empty-font pont-text-center"],group:["pont-overflow-hidden","pont-p-command-group-space-p","pont-text-command-group-color-text"],heading:["pont-px-command-heading-space-px pont-py-command-heading-space-py","pont-text-command-heading-font pont-font-command-heading-font-weight pont-text-command-heading-color-text"],separator:["pont-command-separator-space-mx","pont-h-command-separator-space-h","pont-bg-command-separator-color-bg"],item:["pont-flex pont-relative","pont-gap-command-item-space-gap pont-items-center","pont-px-command-item-space-px pont-py-command-item-space-py","pont-text-command-item-font","pont-rounded-command-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-command-item-color-text-hover hover:pont-bg-command-item-color-bg-hover","aria-selected:pont-text-command-item-color-text-selected aria-selected:pont-bg-command-item-color-bg-selected",'data-[disabled="true"]:pont-opacity-command-item-opacity-disabled data-[disabled="true"]:pont-pointer-events-none','[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-command-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-command-item-icon-color-text [&_svg]:pont-pointer-events-none']};var Zg=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,
|
|
697
|
+
`}};xe([a({type:Boolean})],Dt.prototype,"isOpen",2);xe([g()],Dt.prototype,"selectedValue",2);xe([g()],Dt.prototype,"searchTerm",2);xe([g()],Dt.prototype,"focusedIndex",2);xe([g()],Dt.prototype,"filteredItems",2);xe([g()],Dt.prototype,"uuid",2);xe([a({type:String})],Dt.prototype,"label",2);xe([a({type:Array})],Dt.prototype,"items",2);xe([vn('[part="combo-box"]')],Dt.prototype,"parentDiveElement",2);Dt=xe([p("pont-combo-box")],Dt);const ye={root:["pont-flex pont-overflow-hidden","pont-flex-col","pont-w-command-space-w pont-h-command-space-h","pont-text-command-color-text","pont-bg-command-color-bg","pont-rounded-command-radius"],input:{wrapper:["pont-flex","pont-gap-command-input-wrapper-space-gap pont-items-center","pont-px-command-input-wrapper-space-px","pont-h-command-input-wrapper-space-h","pont-border-b-command-input-wrapper-width-border pont-border-b-command-input-wrapper-color-border"],icon:["pont-shrink-0","pont-size-command-input-icon-space-size","pont-opacity-command-input-icon-opacity"],input:["pont-flex","pont-py-command-input-space-py","pont-w-command-input-space-w pont-h-command-input-space-h","pont-text-command-input-font","pont-bg-command-input-color-bg","pont-rounded-command-input-radius pont-outline-hidden","focus:pont-outline-none","disabled:pont-opacity-command-input-opacity-disabled disabled:pont-cursor-not-allowed","placeholder:pont-text-command-input-placeholder-color-text"]},list:["pont-overflow-x-hidden pont-overflow-y-auto","pont-max-h-command-list-space-max-h","pont-scroll-py-1"],empty:["pont-py-command-empty-space-py","pont-text-command-empty-font pont-text-center"],group:["pont-overflow-hidden","pont-p-command-group-space-p","pont-text-command-group-color-text"],heading:["pont-px-command-heading-space-px pont-py-command-heading-space-py","pont-text-command-heading-font pont-font-command-heading-font-weight pont-text-command-heading-color-text"],separator:["pont-command-separator-space-mx","pont-h-command-separator-space-h","pont-bg-command-separator-color-bg"],item:["pont-flex pont-relative","pont-gap-command-item-space-gap pont-items-center","pont-px-command-item-space-px pont-py-command-item-space-py","pont-text-command-item-font","pont-rounded-command-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-command-item-color-text-hover hover:pont-bg-command-item-color-bg-hover","aria-selected:pont-text-command-item-color-text-selected aria-selected:pont-bg-command-item-color-bg-selected",'data-[disabled="true"]:pont-opacity-command-item-opacity-disabled data-[disabled="true"]:pont-pointer-events-none','[&_svg]:pont-shrink-0 [&_svg:not([class*="pont-size-"])]:pont-size-command-item-icon-space-size [&_svg:not([class*="pont-text-"])]:pont-text-command-item-icon-color-text [&_svg]:pont-pointer-events-none']};var Zg=Object.defineProperty,Jg=Object.getOwnPropertyDescriptor,Ba=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jg(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zg(t,r,o),o};let Dr=class extends y{constructor(){super(...arguments),this._id="",this._hidden="true"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}e${Dr._counter++}`:this._id=`rtgcmdrxlxe${Dr._counter++}`,this._id}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}render(){return l`
|
|
698
698
|
<div
|
|
699
699
|
rtgcmd-empty
|
|
700
700
|
id="${this.identifier}"
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
role="presentation"
|
|
703
703
|
class=${u(ye.empty,this._hidden==="true"&&"pont-hidden",this.className)}
|
|
704
704
|
></div>
|
|
705
|
-
`}};Dr._counter=0;
|
|
705
|
+
`}};Dr._counter=0;Ba([a({type:String})],Dr.prototype,"_id",2);Ba([a({attribute:"aria-hidden",type:String})],Dr.prototype,"_hidden",2);Dr=Ba([p("pont-command-empty")],Dr);var Xg=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,Oi=(e,t,r,n)=>{for(var o=n>1?void 0:n?tf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Xg(t,r,o),o};let lr=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get itemsContainerElement(){return this.querySelector(`#${this.identifier}g`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}g${lr._counter++}`:this._id=`rtgcmdrxlxg${lr._counter++}`,this._id}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){const t=this.itemsContainerElement;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);this.moveLightDomChildrenInto(t)}}render(){return l`
|
|
706
706
|
<div
|
|
707
707
|
rtgcmd-group
|
|
708
708
|
id="${this.identifier}"
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
aria-labelledby="${this.identifier}h"
|
|
726
726
|
></div>
|
|
727
727
|
</div>
|
|
728
|
-
`}};lr._counter=0;Oi([a({type:String})],lr.prototype,"heading",2);Oi([a({attribute:"id",type:String})],lr.prototype,"_id",2);Oi([a({attribute:"aria-hidden",type:String})],lr.prototype,"_hidden",2);lr=Oi([p("pont-command-group")],lr);var ef=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,
|
|
728
|
+
`}};lr._counter=0;Oi([a({type:String})],lr.prototype,"heading",2);Oi([a({attribute:"id",type:String})],lr.prototype,"_id",2);Oi([a({attribute:"aria-hidden",type:String})],lr.prototype,"_hidden",2);lr=Oi([p("pont-command-group")],lr);var ef=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,Ua=(e,t,r,n)=>{for(var o=n>1?void 0:n?rf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ef(t,r,o),o};let ei=class extends f{constructor(){super(...arguments),this.placeholder="Type a command or search...",this._value=""}get identifier(){const e=this.parentElement;return e?`${e.getAttribute("id")}i`:"rtgcmdrxi"}filterItems(){const e=this.parentElement;if(e){let t=!0;const r=e.querySelectorAll("pont-command-group");r&&r.forEach(o=>{var c,m;let i=!0;const s=o.querySelectorAll("pont-command-item");s&&s.forEach(v=>{(v.value||"").toLowerCase().includes(this._value.toLowerCase())?(i=!1,t=!1,v._hidden="false"):v._hidden="true"}),o._hidden=i?"true":"false";let d=o.previousElementSibling;d&&(d._hidden=i||((c=d.previousElementSibling)==null?void 0:c.getAttribute("aria-hidden"))==="true"?"true":"false"),d=o.nextElementSibling,d&&(d._hidden=i||((m=d.nextElementSibling)==null?void 0:m.getAttribute("aria-hidden"))==="true"?"true":"false")});const n=e.querySelector("pont-command-empty");n&&n.setAttribute("aria-hidden",t?"false":"true")}}handleChange(e){const t=e.target;t&&(this._value=t.value,this.filterItems())}createRenderRoot(){return this}render(){return l`
|
|
729
729
|
<div
|
|
730
730
|
part="command-input"
|
|
731
731
|
class=${u(ye.input.wrapper,this.className)}
|
|
@@ -766,7 +766,7 @@
|
|
|
766
766
|
class=${u(ye.input.input)}
|
|
767
767
|
/>
|
|
768
768
|
</div>
|
|
769
|
-
`}};
|
|
769
|
+
`}};Ua([a({type:String})],ei.prototype,"placeholder",2);Ua([a({attribute:"value",type:String})],ei.prototype,"_value",2);ei=Ua([p("pont-command-input")],ei);var of=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,Io=(e,t,r,n)=>{for(var o=n>1?void 0:n?nf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&of(t,r,o),o};let we=class extends y{constructor(){super(...arguments),this.selected=!1,this._id="",this._hidden="false",this.onSelect=()=>{},this.disabled="false"}get containerElement(){return this.querySelector(`#${this.identifier}`)}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}li${we._counter++}`:this._id=`rtgcmdrxgxli${we._counter++}`,this._id}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.containerElement)}updated(e){}render(){return l`
|
|
770
770
|
<div
|
|
771
771
|
rtgcmd-item
|
|
772
772
|
id="${this.identifier}"
|
|
@@ -793,7 +793,7 @@
|
|
|
793
793
|
>
|
|
794
794
|
<div></div>
|
|
795
795
|
</div>
|
|
796
|
-
`}};ld=af([p("pont-command-list")],ld);var lf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,
|
|
796
|
+
`}};ld=af([p("pont-command-list")],ld);var lf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,ja=(e,t,r,n)=>{for(var o=n>1?void 0:n?df(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&lf(t,r,o),o};let Lr=class extends f{constructor(){super(...arguments),this._id="",this._hidden=""}get identifier(){if(this._id!=="")return this._id;const e=this.parentElement;return e?this._id=`${e.getAttribute("id")}s${Lr._counter++}`:this._id=`rtgcmdrxlxs${Lr._counter++}`,this._id}createRenderRoot(){return this}render(){return l`${this._hidden==="true"?h:l`
|
|
797
797
|
<div
|
|
798
798
|
rtgcmd-separator
|
|
799
799
|
id="${this.identifier}"
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
role="separator"
|
|
802
802
|
class=${u(ye.separator,this.className)}
|
|
803
803
|
></div>
|
|
804
|
-
`}`}};Lr._counter=0;
|
|
804
|
+
`}`}};Lr._counter=0;ja([a({type:String})],Lr.prototype,"_id",2);ja([a({attribute:"aria-hidden",type:String})],Lr.prototype,"_hidden",2);Lr=ja([p("pont-command-separator")],Lr);var cf=Object.getOwnPropertyDescriptor,pf=(e,t,r,n)=>{for(var o=n>1?void 0:n?cf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let dd=class extends y{get containerElement(){return this.querySelector("div[rtgcmd-root]")}getAttributesToExclude(){return[]}getAttributesToRemoveFromParent(){return["class","style"]}createRenderRoot(){return this}firstUpdated(e){this.removeParentAttributes(),this.moveLightDomChildrenInto(this.containerElement),this.containerElement&&this.observeStyleAndClassSync(this.containerElement)}render(){const e=this.customClass||"",t=this.customStyle||"";return l`
|
|
805
805
|
<div
|
|
806
806
|
part="command"
|
|
807
807
|
class="${u(ye.root,e)}"
|
|
@@ -844,12 +844,12 @@
|
|
|
844
844
|
</span>
|
|
845
845
|
<div part="context-menu-checkbox-item-container"></div>
|
|
846
846
|
</div>
|
|
847
|
-
`}};Ao([a({type:String})],Fr.prototype,"_id",2);Ao([a({attribute:"data-value",type:String})],Fr.prototype,"value",1);Ao([a({type:Boolean})],Fr.prototype,"selected",2);Ao([a({type:Boolean})],Fr.prototype,"checked",2);Ao([a({attribute:"data-disabled",type:Boolean})],Fr.prototype,"disabled",2);Fr=Ao([p("pont-context-menu-checkbox-item")],Fr);var mf=Object.defineProperty,gf=Object.getOwnPropertyDescriptor,Lp=(e,t,r,n)=>{for(var o=n>1?void 0:n?gf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&mf(t,r,o),o};let
|
|
847
|
+
`}};Ao([a({type:String})],Fr.prototype,"_id",2);Ao([a({attribute:"data-value",type:String})],Fr.prototype,"value",1);Ao([a({type:Boolean})],Fr.prototype,"selected",2);Ao([a({type:Boolean})],Fr.prototype,"checked",2);Ao([a({attribute:"data-disabled",type:Boolean})],Fr.prototype,"disabled",2);Fr=Ao([p("pont-context-menu-checkbox-item")],Fr);var mf=Object.defineProperty,gf=Object.getOwnPropertyDescriptor,Lp=(e,t,r,n)=>{for(var o=n>1?void 0:n?gf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&mf(t,r,o),o};let zs=class extends y{constructor(){super(),this.isOpen=!1,this.handleClickOutside=this.handleClickOutside.bind(this)}get _containerElement(){return this.querySelector("div[part=context-menu-content")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}handleClickOutside(e){const t=this==null?void 0:this.querySelector("button");!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&requestAnimationFrame(()=>{this._containerElement.style.display="none",this._containerElement.style.position="absolute",this._containerElement.dataset.state="closed",this.isOpen=!1})}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
848
848
|
<div
|
|
849
849
|
part="context-menu-content"
|
|
850
850
|
class=${u(At.content,this.className)}
|
|
851
851
|
></div>
|
|
852
|
-
`}};Lp([g()],
|
|
852
|
+
`}};Lp([g()],zs.prototype,"isOpen",2);zs=Lp([p("pont-context-menu-content")],zs);var ff=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,Fp=(e,t,r,n)=>{for(var o=n>1?void 0:n?vf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ff(t,r,o),o};let Vs=class extends y{constructor(){super(...arguments),this.heading=""}get _containerElement(){return this.querySelector("div[ rtgcontext-group-items]")}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
853
853
|
<div
|
|
854
854
|
rtgcmd-group
|
|
855
855
|
part="context-menu-group"
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
|
|
863
863
|
<div rtgcontext-group-items role="group"></div>
|
|
864
864
|
</div>
|
|
865
|
-
`}};Fp([a({type:String})],
|
|
865
|
+
`}};Fp([a({type:String})],Vs.prototype,"heading",2);Vs=Fp([p("pont-context-menu-group")],Vs);var bf=Object.defineProperty,yf=Object.getOwnPropertyDescriptor,qa=(e,t,r,n)=>{for(var o=n>1?void 0:n?yf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&bf(t,r,o),o};let ri=class extends y{constructor(){super(...arguments),this.disabled=!1}get _containerElement(){return this.querySelector("div[part=context-menu-item]")}getAttributesToExclude(){return[]}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",()=>{this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("close-context-menu",{bubbles:!0,composed:!0}))})}connectedCallback(){super.connectedCallback()}disconnectedCallback(){}createRenderRoot(){return this}render(){return l`
|
|
866
866
|
<div
|
|
867
867
|
part="context-menu-item"
|
|
868
868
|
role="option"
|
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
?data-disabled=${this.disabled}
|
|
871
871
|
class=${u(At.item,this.className)}
|
|
872
872
|
></div>
|
|
873
|
-
`}};
|
|
873
|
+
`}};qa([a({attribute:"data-value",type:String})],ri.prototype,"value",1);qa([a({attribute:"data-disabled",type:Boolean})],ri.prototype,"disabled",2);ri=qa([p("pont-context-menu-item")],ri);var _f=Object.defineProperty,wf=Object.getOwnPropertyDescriptor,To=(e,t,r,n)=>{for(var o=n>1?void 0:n?wf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&_f(t,r,o),o};let kr=class extends y{constructor(){super(...arguments),this._id="",this.selected=!1,this.checked=!1,this.disabled=!1}get value(){var e;return((e=this.textContent)==null?void 0:e.trim())||""}get _containerElement(){return this.querySelector("div[part=context-menu-radio-item-container]")}getAttributesToExclude(){return["data-testid"]}handleMouseEvent(e){(e.type==="mouseover"||e.type==="focus")&&(this.selected=!0),e.type==="mouseleave"&&(this.selected=!1)}toggleChecked(){this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
874
874
|
<div
|
|
875
875
|
rtgcmd-item
|
|
876
876
|
part="context-menu-radio"
|
|
@@ -903,39 +903,39 @@
|
|
|
903
903
|
</span>
|
|
904
904
|
<div part="context-menu-radio-item-container"></div>
|
|
905
905
|
</div>
|
|
906
|
-
`}};To([a({type:String})],kr.prototype,"_id",2);To([a({attribute:"data-value",type:String})],kr.prototype,"value",1);To([a({type:Boolean})],kr.prototype,"selected",2);To([a({type:Boolean})],kr.prototype,"checked",2);To([a({attribute:"data-disabled",type:Boolean})],kr.prototype,"disabled",2);kr=To([p("pont-context-menu-radio-item")],kr);var $f=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,kp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$f(t,r,o),o};let
|
|
906
|
+
`}};To([a({type:String})],kr.prototype,"_id",2);To([a({attribute:"data-value",type:String})],kr.prototype,"value",1);To([a({type:Boolean})],kr.prototype,"selected",2);To([a({type:Boolean})],kr.prototype,"checked",2);To([a({attribute:"data-disabled",type:Boolean})],kr.prototype,"disabled",2);kr=To([p("pont-context-menu-radio-item")],kr);var $f=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,kp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$f(t,r,o),o};let Hs=class extends f{constructor(){super(...arguments),this._id=""}createRenderRoot(){return this}render(){return l`
|
|
907
907
|
<div
|
|
908
908
|
rtgcmd-separator
|
|
909
909
|
part="context-menu-separator"
|
|
910
910
|
role="separator"
|
|
911
911
|
class=${u(At.separator,this.className)}
|
|
912
912
|
></div>
|
|
913
|
-
`}};kp([a({type:String})],
|
|
913
|
+
`}};kp([a({type:String})],Hs.prototype,"_id",2);Hs=kp([p("pont-context-menu-separator")],Hs);var Cf=Object.getOwnPropertyDescriptor,Sf=(e,t,r,n)=>{for(var o=n>1?void 0:n?Cf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let cd=class extends y{get _containerElement(){return this.querySelector("span[part=context-menu-shortcut]")}getAttributesToExclude(){return[]}createRenderRoot(){return this.classList=u(At.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
914
914
|
<span
|
|
915
915
|
part="context-menu-shortcut"
|
|
916
916
|
class=${u(At.shortcut,this.className)}
|
|
917
917
|
>
|
|
918
918
|
</span>
|
|
919
|
-
`}};cd=Sf([p("pont-context-menu-shortcut")],cd);var Ef=Object.getOwnPropertyDescriptor,xf=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ef(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let pd=class extends f{createRenderRoot(){return this}render(){return l``}};pd=xf([p("pont-context-menu-trigger")],pd);var Of=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Np=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Of(t,r,o),o};let
|
|
919
|
+
`}};cd=Sf([p("pont-context-menu-shortcut")],cd);var Ef=Object.getOwnPropertyDescriptor,xf=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ef(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let pd=class extends f{createRenderRoot(){return this}render(){return l``}};pd=xf([p("pont-context-menu-trigger")],pd);var Of=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Np=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Of(t,r,o),o};let Gs=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.handleClickOutside=e=>{const t=e.target;this!=null&&this.contains(t)||(this.isOpen=!1)}}get _containerElement(){return this.querySelector("div[part=context-menu]")}get _triggerElement(){return this.querySelector("pont-context-menu-trigger")}get _content(){return this==null?void 0:this.querySelector("div[part=context-menu-content]")}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside),this.addEventListener("radio-selected",this._handleRadioSelected),this.addEventListener("close-context-menu",()=>{this.isOpen=!1,requestAnimationFrame(()=>{const e=this._content;e&&(e.style.display="none")})})}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),super.disconnectedCallback()}toggleDropdown(e){e.preventDefault(),e.stopPropagation();const{clientX:t,clientY:r}=e,n=e.target.getBoundingClientRect();requestAnimationFrame(()=>{const o=this._content;o&&(o.style.display="",o.style.position="absolute",o.style.left=`${t-n.left}px`,o.style.top=`${r-n.top}px`,o.dataset.state="open",this.isOpen=!0)})}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}_handleRadioSelected(e){this.querySelectorAll("pont-context-menu-radio-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}getAttributesToExclude(){return[]}firstUpdated(e){var t;this.moveLightDomChildrenInto(this._containerElement),(t=this._triggerElement)==null||t.addEventListener("contextmenu",r=>{this.toggleDropdown(r)}),this.style.position="relative"}createRenderRoot(){return this}render(){return l`
|
|
920
920
|
<div
|
|
921
921
|
part="context-menu"
|
|
922
922
|
class=${u(At.root,this.className)}
|
|
923
923
|
></div>
|
|
924
|
-
`}};Np([g()],
|
|
924
|
+
`}};Np([g()],Gs.prototype,"isOpen",2);Gs=Np([p("pont-context-menu")],Gs);const za={root:["pont-relative"],trigger:[""],content:["pont-fixed pont-z-50","pont-p-popover-content-space-p","pont-w-popover-content-space-w","pont-text-popover-content-color-text","pont-bg-popover-content-color-bg","pont-rounded-popover-content-radius pont-border-popover-content-width-border pont-border-popover-content-color-border pont-outline-hidden","pont-shadow-popover-content-shadow",'data-[state="open"]:pont-block data-[state="closed"]:pont-hidden','data-[state="open"]:pont-animate-in data-[state="open"]:pont-fade-in-0 data-[state="open"]:pont-zoom-in-95','data-[state="closed"]:pont-animate-out data-[state="closed"]:pont-fade-out-0 data-[state="closed"]:pont-zoom-out-95',"pont-translate-y-0.5"]};var If=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,wn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Af(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&If(t,r,o),o};let yo=class extends y{constructor(){super(...arguments),this.enableDefaultStyle=!0,this.styleContent=!0,this.side="bottom",this.state="closed"}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof cn);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-content]")}handleClickOutside(e){const t=this._popover;t&&!t.contains(e.target)&&(t.isOpen=!1)}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement),window.addEventListener("click",this.handleClickOutside.bind(this))}updated(e){var t;(t=this._popover)!=null&&t.isOpen||window.removeEventListener("click",this.handleClickOutside.bind(this))}preventClickPropagation(e){e.stopPropagation()}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
925
925
|
<div
|
|
926
926
|
part="popover-content"
|
|
927
927
|
data-state=${this.state}
|
|
928
|
-
class=${u(
|
|
928
|
+
class=${u(za.content,this.className)}
|
|
929
929
|
@click="${this.preventClickPropagation}"
|
|
930
930
|
></div>
|
|
931
931
|
`}};wn([a({type:Boolean})],yo.prototype,"enableDefaultStyle",2);wn([a({type:Boolean})],yo.prototype,"styleContent",2);wn([a({type:String})],yo.prototype,"side",2);wn([a({attribute:"data-state",type:String})],yo.prototype,"state",2);yo=wn([p("pont-popover-content")],yo);var Tf=Object.getOwnPropertyDescriptor,Df=(e,t,r,n)=>{for(var o=n>1?void 0:n?Tf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let hd=class extends y{constructor(){super(...arguments),this.handleClick=()=>{const e=this._popover;e&&(e.isOpen=!e.isOpen)}}get _popover(){let e=this.parentElement;for(;e&&!(e instanceof cn);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=popover-trigger]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",t=>{this.handleClick(),t.stopPropagation()})}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
932
932
|
<div
|
|
933
933
|
part="popover-trigger"
|
|
934
|
-
class=${u(
|
|
934
|
+
class=${u(za.trigger,this.className)}
|
|
935
935
|
></div>
|
|
936
936
|
`}};hd=Df([p("pont-popover-trigger")],hd);var Lf=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Mp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ff(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lf(t,r,o),o};let cn=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=popover]")}get _contentElement(){return this.querySelector("pont-popover-content")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){this._contentElement.state=this.isOpen?"open":"closed",this._contentElement.requestUpdate()}render(){return l`
|
|
937
|
-
<div part="popover" class=${u(
|
|
938
|
-
`}};Mp([g()],cn.prototype,"isOpen",2);cn=Mp([p("pont-popover")],cn);const kn={root:[""],trigger:[""],triggerButton:[on({variant:"outline"}).replace("pont-justify-center",""),"pont-justify-start","pont-w-date-picker-trigger-button-space-w","pont-text-left pont-font-date-picker-trigger-button-font-weight","data-[empty=true]:pont-text-date-picker-trigger-button-color-text-empty"],content:["pont-p-date-picker-content-space-p","pont-w-auto"]};var kf=Object.defineProperty,Nf=Object.getOwnPropertyDescriptor,Bp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Nf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kf(t,r,o),o};let
|
|
937
|
+
<div part="popover" class=${u(za.root,this.className)}></div>
|
|
938
|
+
`}};Mp([g()],cn.prototype,"isOpen",2);cn=Mp([p("pont-popover")],cn);const kn={root:[""],trigger:[""],triggerButton:[on({variant:"outline"}).replace("pont-justify-center",""),"pont-justify-start","pont-w-date-picker-trigger-button-space-w","pont-text-left pont-font-date-picker-trigger-button-font-weight","data-[empty=true]:pont-text-date-picker-trigger-button-color-text-empty"],content:["pont-p-date-picker-content-space-p","pont-w-auto"]};var kf=Object.defineProperty,Nf=Object.getOwnPropertyDescriptor,Bp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Nf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kf(t,r,o),o};let Ks=class extends f{constructor(){super(...arguments),this.selectedDate=null}handleDateSelected(e){this.selectedDate=e.detail.startDate,this.requestUpdate()}createRenderRoot(){return this}render(){return l`
|
|
939
939
|
<pont-popover
|
|
940
940
|
class=${u("date-picker",kn.root,this.className)}
|
|
941
941
|
@date-selected=${this.handleDateSelected}
|
|
@@ -978,12 +978,12 @@
|
|
|
978
978
|
<pont-calendar mode="single"></pont-calendar>
|
|
979
979
|
</pont-popover-content>
|
|
980
980
|
</pont-popover>
|
|
981
|
-
`}};Bp([a({type:Object})],
|
|
981
|
+
`}};Bp([a({type:Object})],Ks.prototype,"selectedDate",2);Ks=Bp([p("pont-date-picker")],Ks);const te={root:[""],trigger:[""],close:[""],overlay:["pont-fixed pont-inset-0 pont-z-50","pont-bg-dialog-overlay-color-bg","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0"],content:{base:["pont-fixed pont-top-[50%] pont-left-[50%] pont-z-50","pont-grid pont-gap-dialog-content-space-gap","pont-p-dialog-content-space-p","pont-w-dialog-content-space-w pont-max-w-dialog-content-space-max-w-sm sm:pont-max-w-dialog-content-space-max-w","pont-bg-dialog-content-color-bg","pont-rounded-dialog-content-radius pont-border-dialog-content-width-border pont-border-dialog-content-color-border pont-outline-none","pont-shadow-dialog-content-shadow","pont-duration-200","pont-translate-x-[-50%] pont-translate-y-[-50%]","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],close:{base:["pont-absolute pont-top-4 pont-right-4","pont-rounded-dialog-close-radius","pont-ring-offset-dialog-close-color-ring-offset","pont-transition-opacity","focus:pont-ring-dialog-close-width-ring-focus focus:pont-ring-dialog-close-color-ring-focus focus:pont-ring-offset-dialog-close-width-ring-offset focus:pont-outline-hidden","disabled:pont-pointer-events-none","data-[state=open]:pont-bg-dialog-close-color-bg data-[state=open]:pont-text-dialog-close-color-text"],icon:["pont-shrink-0","pont-size-dialog-close-icon-space-size","pont-pointer-events-none"]}},header:["pont-flex pont-flex-col pont-gap-dialog-header-space-gap","pont-text-center","sm:pont-text-left"],footer:["pont-flex pont-flex-col-reverse pont-gap-dialog-footer-space-gap","sm:pont-flex-row sm:pont-justify-end"],title:["pont-text-dialog-title-font pont-font-dialog-title-font-weight"],description:["pont-text-dialog-description-font pont-font-dialog-description-font-weight pont-text-dialog-description-color-text"]};var Mf=Object.getOwnPropertyDescriptor,Bf=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};const Uf="closed";let ud=class extends y{get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof _o)return e;e=e.parentElement}return e}get _containerElement(){return this.querySelector("div[part=dialog-close]")}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),this.addEventListener("click",()=>{const t=this._dialog;t&&(t.dataset.state=Uf)})}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}render(){return l`
|
|
982
982
|
<div
|
|
983
983
|
part="dialog-close"
|
|
984
984
|
class=${u(te.close,this.className)}
|
|
985
985
|
></div>
|
|
986
|
-
`}};ud=Bf([p("pont-dialog-close")],ud);var jf=Object.defineProperty,qf=Object.getOwnPropertyDescriptor,
|
|
986
|
+
`}};ud=Bf([p("pont-dialog-close")],ud);var jf=Object.defineProperty,qf=Object.getOwnPropertyDescriptor,Va=(e,t,r,n)=>{for(var o=n>1?void 0:n?qf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jf(t,r,o),o};const ts="closed";let oi=class extends y{constructor(){super(...arguments),this.state=ts,this.showCloseButton=!1,this.handleCloseButtonClick=()=>{const e=this._dialog;e&&(e.dataset.state=ts)}}get _containerElement(){return this.querySelector("div[part=dialog-content-slot]")}get ـcomponentElement(){return this.querySelector("div[part=dialog-content]")}get _dialog(){let e=this.parentElement;for(;e;){if(e instanceof _o)return e;e=e.parentElement}return e}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}updated(e){requestAnimationFrame(()=>{e.get("state")===ts?this.ـcomponentElement.style.display="grid":this.ـcomponentElement.style.display="none"})}render(){return l`
|
|
987
987
|
<div
|
|
988
988
|
rtgdlg-content
|
|
989
989
|
part="dialog-content"
|
|
@@ -1018,12 +1018,12 @@
|
|
|
1018
1018
|
</button>
|
|
1019
1019
|
`:""}
|
|
1020
1020
|
</div>
|
|
1021
|
-
`}};
|
|
1021
|
+
`}};Va([a({attribute:"data-state",type:String})],oi.prototype,"state",2);Va([a({attribute:"show-close-button",type:Boolean})],oi.prototype,"showCloseButton",2);oi=Va([p("pont-dialog-content")],oi);var zf=Object.getOwnPropertyDescriptor,Vf=(e,t,r,n)=>{for(var o=n>1?void 0:n?zf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let md=class extends y{get _containerElement(){return this.querySelector("div[part=dialog-footer]")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1022
1022
|
<div
|
|
1023
1023
|
part="dialog-footer"
|
|
1024
1024
|
class=${u(te.footer,this.className)}
|
|
1025
1025
|
></div>
|
|
1026
|
-
`}};md=Vf([p("pont-dialog-footer")],md);var Hf=Object.defineProperty,Gf=Object.getOwnPropertyDescriptor,
|
|
1026
|
+
`}};md=Vf([p("pont-dialog-footer")],md);var Hf=Object.defineProperty,Gf=Object.getOwnPropertyDescriptor,Ha=(e,t,r,n)=>{for(var o=n>1?void 0:n?Gf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Hf(t,r,o),o};let ni=class extends f{constructor(){super(...arguments),this._title="",this.description=""}createRenderRoot(){return this}render(){return l`
|
|
1027
1027
|
<div
|
|
1028
1028
|
part="dialog-header"
|
|
1029
1029
|
class=${u(te.header,this.className)}
|
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
${this.description}
|
|
1035
1035
|
</p>
|
|
1036
1036
|
</div>
|
|
1037
|
-
`}};
|
|
1037
|
+
`}};Ha([a({attribute:"title",type:String})],ni.prototype,"_title",2);Ha([a({type:String})],ni.prototype,"description",2);ni=Ha([p("pont-dialog-header")],ni);var Kf=Object.getOwnPropertyDescriptor,Wf=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kf(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let gd=class extends f{createRenderRoot(){return this}render(){return l`
|
|
1038
1038
|
<div
|
|
1039
1039
|
part="dialog-overly"
|
|
1040
1040
|
class=${u(te.overlay,this.className)}
|
|
@@ -1057,7 +1057,7 @@
|
|
|
1057
1057
|
part="drawer-close"
|
|
1058
1058
|
class=${u($e.close,this.className)}
|
|
1059
1059
|
></div>
|
|
1060
|
-
`}};vd=ov([p("pont-drawer-close")],vd);var nv=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,jp=(e,t,r,n)=>{for(var o=n>1?void 0:n?iv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&nv(t,r,o),o};let
|
|
1060
|
+
`}};vd=ov([p("pont-drawer-close")],vd);var nv=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,jp=(e,t,r,n)=>{for(var o=n>1?void 0:n?iv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&nv(t,r,o),o};let Ws=class extends y{constructor(){super(...arguments),this.state=ue.closed}connectedCallback(){super.connectedCallback();const e=document.createElement("style");e.textContent=`
|
|
1061
1061
|
@keyframes slideInUp {
|
|
1062
1062
|
from { transform: translateY(100%); }
|
|
1063
1063
|
to { transform: translateY(0); }
|
|
@@ -1086,7 +1086,7 @@
|
|
|
1086
1086
|
<div part="drawer-thumb" class=${u($e.content.thumb)}></div>
|
|
1087
1087
|
<div part="drawer-content-slot"></div>
|
|
1088
1088
|
</div>
|
|
1089
|
-
`}};jp([a({attribute:"data-state",type:String})],
|
|
1089
|
+
`}};jp([a({attribute:"data-state",type:String})],Ws.prototype,"state",2);Ws=jp([p("pont-drawer-content")],Ws);var sv=Object.getOwnPropertyDescriptor,av=(e,t,r,n)=>{for(var o=n>1?void 0:n?sv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let bd=class extends y{get _containerElement(){return this.querySelector("p[part=drawer-description")}getAttributesToExclude(){return[]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1090
1090
|
<p
|
|
1091
1091
|
part="drawer-description"
|
|
1092
1092
|
class=${u($e.description,this.className)}
|
|
@@ -1161,14 +1161,14 @@
|
|
|
1161
1161
|
</span>
|
|
1162
1162
|
<div part="dropdown-menu-checkbox-item-container"></div>
|
|
1163
1163
|
</div>
|
|
1164
|
-
`}};Do([a({type:String})],Nr.prototype,"_id",2);Do([a({attribute:"data-value",type:String})],Nr.prototype,"value",1);Do([a({type:Boolean})],Nr.prototype,"selected",2);Do([a({type:Boolean})],Nr.prototype,"checked",2);Do([a({attribute:"data-disabled",type:Boolean})],Nr.prototype,"disabled",2);Nr=Do([p("pont-dropdown-menu-checkbox-item")],Nr);const
|
|
1164
|
+
`}};Do([a({type:String})],Nr.prototype,"_id",2);Do([a({attribute:"data-value",type:String})],Nr.prototype,"value",1);Do([a({type:Boolean})],Nr.prototype,"selected",2);Do([a({type:Boolean})],Nr.prototype,"checked",2);Do([a({attribute:"data-disabled",type:Boolean})],Nr.prototype,"disabled",2);Nr=Do([p("pont-dropdown-menu-checkbox-item")],Nr);const Ga="closed";var $v=Object.defineProperty,Pv=Object.getOwnPropertyDescriptor,Ka=(e,t,r,n)=>{for(var o=n>1?void 0:n?Pv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$v(t,r,o),o};let ii=class extends y{constructor(){super(),this.state=Ga,this.isOpen=!1,this.handleWindowChange=this.handleWindowChange.bind(this)}get _dropdownMenu(){let e=this.parentElement;for(;e&&!(e instanceof Ct);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=dropdown-menu-content]")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.handleWindowChange),window.addEventListener("scroll",this.handleWindowChange,!0)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowChange),window.removeEventListener("scroll",this.handleWindowChange,!0),super.disconnectedCallback()}handleWindowChange(){this.isOpen&&requestAnimationFrame(()=>this.positionContent())}updated(e){super.updated(e),this.state==="open"?(this.isOpen=!0,requestAnimationFrame(()=>this.positionContent())):this.isOpen=!1}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}positionContent(){const e=this._dropdownMenu,t=this._containerElement,r=e==null?void 0:e._triggerElement;if(!e||!t||!r||!this.isOpen)return;const n=document.documentElement.clientWidth,o=document.documentElement.clientHeight,i=8,s=r.getBoundingClientRect();t.style.position="fixed",t.style.minWidth=`${Math.max(s.width,t.offsetWidth)}px`,t.style.maxWidth=`${Math.min(t.offsetWidth,n-i*2)}px`;let d=s.left,c=s.bottom;const m=t.getBoundingClientRect(),v=n-d>=m.width+i,b=s.right>=m.width+i,w=o-c>=m.height+i,_=s.top>=m.height+i;v||!b&&w?(t.style.left=`${d}px`,t.style.right="auto"):(t.style.left="auto",t.style.right=`${n-s.right}px`),w||!_&&v?(t.style.top=`${c}px`,t.style.bottom="auto"):(t.style.top="auto",t.style.bottom=`${o-s.top}px`),requestAnimationFrame(()=>{const C=t.getBoundingClientRect();if(C.right>n-i){const P=C.right-(n-i),x=parseFloat(t.style.left||"0");Number.isNaN(x)||(t.style.left=`${Math.max(0,x-P)}px`)}if(C.left<i){const P=i-C.left,x=parseFloat(t.style.left||"0");Number.isNaN(x)||(t.style.left=`${Math.max(0,x+P)}px`)}if(C.bottom>o-i){const P=C.bottom-(o-i),x=parseFloat(t.style.bottom||"0");Number.isNaN(x)||(t.style.bottom=`${Math.max(0,x+P)}px`)}if(C.top<i){const P=i-C.top,x=parseFloat(t.style.top||"0");Number.isNaN(x)||(t.style.top=`${Math.max(0,x+P)}px`)}})}render(){return l`
|
|
1165
1165
|
<div
|
|
1166
1166
|
data-slot="dropdown-menu-content"
|
|
1167
1167
|
part="dropdown-menu-content"
|
|
1168
1168
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1169
1169
|
class=${u(Tt.content,this.className)}
|
|
1170
1170
|
></div>
|
|
1171
|
-
`}};
|
|
1171
|
+
`}};Ka([a({attribute:"data-state",type:String})],ii.prototype,"state",2);Ka([g()],ii.prototype,"isOpen",2);ii=Ka([p("pont-dropdown-menu-content")],ii);var Cv=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,Ri=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Cv(t,r,o),o};let hn=class extends y{constructor(){super(...arguments),this.heading="",this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[rtgcmd-group-items]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1172
1172
|
<div
|
|
1173
1173
|
rtgcmd-group
|
|
1174
1174
|
part="dropdown-menu-group"
|
|
@@ -1248,11 +1248,11 @@
|
|
|
1248
1248
|
part="dropdown-menu"
|
|
1249
1249
|
class=${u(Tt.root,this.className)}
|
|
1250
1250
|
></div>
|
|
1251
|
-
`}};Ct._openInstance=null;zp([g()],Ct.prototype,"isOpen",2);Ct=zp([p("pont-dropdown-menu")],Ct);var Mv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,Vp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Bv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Mv(t,r,o),o};let
|
|
1251
|
+
`}};Ct._openInstance=null;zp([g()],Ct.prototype,"isOpen",2);Ct=zp([p("pont-dropdown-menu")],Ct);var Mv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,Vp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Bv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Mv(t,r,o),o};let Ys=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="empty"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty" ?data-border="${this.border}"></div>`}};Vp([a({type:Boolean})],Ys.prototype,"border",2);Ys=Vp([p("pont-empty")],Ys);var Uv=Object.getOwnPropertyDescriptor,jv=(e,t,r,n)=>{for(var o=n>1?void 0:n?Uv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let xd=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="empty-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-content"></div>`}};xd=jv([p("pont-empty-content")],xd);var qv=Object.getOwnPropertyDescriptor,zv=(e,t,r,n)=>{for(var o=n>1?void 0:n?qv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Od=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="empty-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-description"></div>`}};Od=zv([p("pont-empty-description")],Od);var Vv=Object.getOwnPropertyDescriptor,Hv=(e,t,r,n)=>{for(var o=n>1?void 0:n?Vv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Rd=class extends f{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="empty-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-header"></div>`}};Rd=Hv([p("pont-empty-header")],Rd);var Gv=Object.defineProperty,Kv=Object.getOwnPropertyDescriptor,Hp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Gv(t,r,o),o};let Qs=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="empty-media"]')}firstUpdated(){const e=this._mediaSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1252
1252
|
<div data-slot="empty-media" data-variant="${this.variant}"></div>
|
|
1253
|
-
`}};Hp([a({type:String})],
|
|
1253
|
+
`}};Hp([a({type:String})],Qs.prototype,"variant",2);Qs=Hp([p("pont-empty-media")],Qs);var Wv=Object.getOwnPropertyDescriptor,Yv=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Id=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="empty-title"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="empty-title"></div>`}};Id=Yv([p("pont-empty-title")],Id);var Qv=Object.getOwnPropertyDescriptor,Zv=(e,t,r,n)=>{for(var o=n>1?void 0:n?Qv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ad=class extends f{createRenderRoot(){return this}get _setSlot(){return this.querySelector('[data-slot="field-set"]')}firstUpdated(){const e=this._setSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<fieldset data-slot="field-set"></fieldset>`}};Ad=Zv([p("pont-field-set")],Ad);var Jv=Object.defineProperty,Xv=Object.getOwnPropertyDescriptor,Gp=(e,t,r,n)=>{for(var o=n>1?void 0:n?Xv(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Jv(t,r,o),o};let Zs=class extends f{constructor(){super(...arguments),this.variant="legend"}createRenderRoot(){return this}get _legendSlot(){return this.querySelector('[data-slot="field-legend"]')}firstUpdated(){const e=this._legendSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1254
1254
|
<legend data-slot="field-legend" data-variant=${this.variant}></legend>
|
|
1255
|
-
`}};Gp([a({type:String})],
|
|
1255
|
+
`}};Gp([a({type:String})],Zs.prototype,"variant",2);Zs=Gp([p("pont-field-legend")],Zs);var tb=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,Kp=(e,t,r,n)=>{for(var o=n>1?void 0:n?eb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&tb(t,r,o),o};let Js=class extends f{constructor(){super(...arguments),this.type="field"}createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="field-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-group" data-type=${this.type}></div>`}};Kp([a({type:String})],Js.prototype,"type",2);Js=Kp([p("pont-field-group")],Js);var rb=Object.defineProperty,ob=Object.getOwnPropertyDescriptor,Ii=(e,t,r,n)=>{for(var o=n>1?void 0:n?ob(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&rb(t,r,o),o};let un=class extends f{constructor(){super(...arguments),this.orientation="vertical"}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="field"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1256
1256
|
<div
|
|
1257
1257
|
data-slot="field"
|
|
1258
1258
|
data-orientation=${this.orientation}
|
|
@@ -1260,18 +1260,18 @@
|
|
|
1260
1260
|
data-invalid=${this.invalid?"true":h}
|
|
1261
1261
|
role="group"
|
|
1262
1262
|
></div>
|
|
1263
|
-
`}};Ii([a({type:String})],un.prototype,"orientation",2);Ii([a({type:Boolean})],un.prototype,"disabled",2);Ii([a({type:Boolean})],un.prototype,"invalid",2);un=Ii([p("pont-field")],un);var nb=Object.getOwnPropertyDescriptor,ib=(e,t,r,n)=>{for(var o=n>1?void 0:n?nb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Td=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-content"></div>`}};Td=ib([p("pont-field-content")],Td);var sb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,Wp=(e,t,r,n)=>{for(var o=n>1?void 0:n?ab(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&sb(t,r,o),o};let
|
|
1263
|
+
`}};Ii([a({type:String})],un.prototype,"orientation",2);Ii([a({type:Boolean})],un.prototype,"disabled",2);Ii([a({type:Boolean})],un.prototype,"invalid",2);un=Ii([p("pont-field")],un);var nb=Object.getOwnPropertyDescriptor,ib=(e,t,r,n)=>{for(var o=n>1?void 0:n?nb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Td=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="field-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-content"></div>`}};Td=ib([p("pont-field-content")],Td);var sb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,Wp=(e,t,r,n)=>{for(var o=n>1?void 0:n?ab(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&sb(t,r,o),o};let Xs=class extends f{get _rootSlot(){return this.querySelector('[data-slot="label"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._rootSlot&&((r=this._rootSlot)==null||r.appendChild(t))})}createRenderRoot(){return this}render(){return l`<label data-slot="label" for=${this.for??h}></label>`}};Wp([a({type:String})],Xs.prototype,"for",2);Xs=Wp([p("pont-label")],Xs);var lb=Object.defineProperty,db=Object.getOwnPropertyDescriptor,Yp=(e,t,r,n)=>{for(var o=n>1?void 0:n?db(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&lb(t,r,o),o};let ta=class extends f{createRenderRoot(){return this}get _labelSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){const e=this._labelSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1264
1264
|
<pont-label data-slot="field-label" for=${this.for??h}></pont-label>
|
|
1265
|
-
`}};Yp([a({type:String})],
|
|
1265
|
+
`}};Yp([a({type:String})],ta.prototype,"for",2);ta=Yp([p("pont-field-label")],ta);var cb=Object.getOwnPropertyDescriptor,pb=(e,t,r,n)=>{for(var o=n>1?void 0:n?cb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Dd=class extends f{createRenderRoot(){return this}get _titleSlot(){return this.querySelector('[data-slot="field-label"]')}firstUpdated(){const e=this._titleSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="field-label"></div>`}};Dd=pb([p("pont-field-title")],Dd);var hb=Object.getOwnPropertyDescriptor,ub=(e,t,r,n)=>{for(var o=n>1?void 0:n?hb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ld=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="field-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="field-description"></p>`}};Ld=ub([p("pont-field-description")],Ld);var mb=Object.getOwnPropertyDescriptor,gb=(e,t,r,n)=>{for(var o=n>1?void 0:n?mb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Fd=class extends f{constructor(){super(...arguments),this._observer=null}createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="field-separator"]')}get _contentSlot(){return this.querySelector('[data-slot="field-separator-content"]')}_getExternalNodes(){const e=this._separatorSlot;return Array.from(this.childNodes).filter(t=>{var r;return!(t===e||t.nodeType===Node.COMMENT_NODE||t.nodeType===Node.TEXT_NODE&&!((r=t.textContent)!=null&&r.trim()))})}_processChildren(){const e=this._separatorSlot;if(!e)return;const t=this._getExternalNodes();if(t.length>0){let r=this._contentSlot;r||(r=document.createElement("span"),r.setAttribute("data-slot","field-separator-content"),e.appendChild(r)),t.forEach(n=>r.appendChild(n)),e.setAttribute("data-content","true")}else{const r=this._contentSlot;r&&e.removeChild(r),e.setAttribute("data-content","false")}}firstUpdated(){this._processChildren(),this._observer=new MutationObserver(()=>{this._observer.disconnect(),this._processChildren(),this._observer.observe(this,{childList:!0})}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._observer)==null||e.disconnect(),this._observer=null}render(){return l`
|
|
1266
1266
|
<div data-slot="field-separator">
|
|
1267
1267
|
<pont-separator></pont-separator>
|
|
1268
1268
|
<span data-slot="field-separator-content"></span>
|
|
1269
1269
|
</div>
|
|
1270
|
-
`}};Fd=gb([p("pont-field-separator")],Fd);var fb=Object.defineProperty,vb=Object.getOwnPropertyDescriptor,Qp=(e,t,r,n)=>{for(var o=n>1?void 0:n?vb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&fb(t,r,o),o};let
|
|
1270
|
+
`}};Fd=gb([p("pont-field-separator")],Fd);var fb=Object.defineProperty,vb=Object.getOwnPropertyDescriptor,Qp=(e,t,r,n)=>{for(var o=n>1?void 0:n?vb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&fb(t,r,o),o};let ea=class extends f{constructor(){super(...arguments),this._hasUserContent=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._hasUserContent=this.innerHTML.trim().length>0}_renderContent(){var t,r;if(!((t=this.errors)!=null&&t.length))return null;const e=[...new Map(this.errors.map(n=>[n==null?void 0:n.message,n])).values()];return e.length===1?(r=e[0])!=null&&r.message?e[0].message:null:l`
|
|
1271
1271
|
<ul data-slot="field-error-content">
|
|
1272
1272
|
${e.map((n,o)=>n!=null&&n.message?l`<li key=${o}>${n.message}</li>`:h)}
|
|
1273
1273
|
</ul>
|
|
1274
|
-
`}render(){const e=this._hasUserContent,t=this._renderContent();if(e){const r=Array.from(this.childNodes);return l` <div data-slot="field-error" role="alert">${r}</div>`}return t?l` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",h)}};Qp([a({type:Array})],
|
|
1274
|
+
`}render(){const e=this._hasUserContent,t=this._renderContent();if(e){const r=Array.from(this.childNodes);return l` <div data-slot="field-error" role="alert">${r}</div>`}return t?l` <div data-slot="field-error" role="alert">${t}</div>`:(this.style.display="none",h)}};Qp([a({type:Array})],ea.prototype,"errors",2);ea=Qp([p("pont-field-error")],ea);/**
|
|
1275
1275
|
* @license
|
|
1276
1276
|
* Copyright 2021 Google LLC
|
|
1277
1277
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1299,72 +1299,72 @@
|
|
|
1299
1299
|
* @license
|
|
1300
1300
|
* Copyright 2022 Google LLC
|
|
1301
1301
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1302
|
-
*/function ct({context:e,subscribe:t}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new si(this,{context:e,callback:o=>{r.set.call(this,o)},subscribe:t})})):r.constructor.addInitializer((o=>{new si(o,{context:e,callback:i=>{o[n]=i},subscribe:t})}))}}class Jp{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:n}){t in this.values||(this.values[t]=r),n&&(this.validators[t]=n)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],n=this.values[t],o=r?r(n):null;return this.errors[t]=o,this.notify(),!o}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const $n="pont-form-context",
|
|
1302
|
+
*/function ct({context:e,subscribe:t}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new si(this,{context:e,callback:o=>{r.set.call(this,o)},subscribe:t})})):r.constructor.addInitializer((o=>{new si(o,{context:e,callback:i=>{o[n]=i},subscribe:t})}))}}class Jp{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:n}){t in this.values||(this.values[t]=r),n&&(this.validators[t]=n)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],n=this.values[t],o=r?r(n):null;return this.errors[t]=o,this.notify(),!o}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const $n="pont-form-context",es=new WeakMap,_b=Eo(class extends $p{render(e){return h}update(e,[t]){var n;const r=t!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(n=e.options)==null?void 0:n.host,this.rt(this.ct=e.element)),h}rt(e){if(this.G!==void 0)if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=es.get(t);r===void 0&&(r=new WeakMap,es.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=es.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var wb=Object.defineProperty,$b=Object.getOwnPropertyDescriptor,Xp=(e,t,r,n)=>{for(var o=n>1?void 0:n?$b(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&wb(t,r,o),o};let ra=class extends y{constructor(){super(...arguments),this.form=new Jp,this.handleSubmit=e=>{if(e.preventDefault(),this.form.validateAll()){const r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("pont-form-field").forEach(t=>{const r=t.getAttribute("name"),n=t.validators,o=n==null?void 0:n[0];this.form.registerField({name:r,validator:o})})}render(){return l`
|
|
1303
1303
|
<form
|
|
1304
1304
|
part="form-controller"
|
|
1305
1305
|
class="${u("",this.className)}"
|
|
1306
1306
|
@submit=${this.handleSubmit}
|
|
1307
1307
|
${_b(e=>this.formElement=e)}
|
|
1308
1308
|
></form>
|
|
1309
|
-
`}};Xp([g(),Wt({context:$n})],
|
|
1309
|
+
`}};Xp([g(),Wt({context:$n})],ra.prototype,"form",2);ra=Xp([p("pont-form-controller")],ra);const th="pont-form-item-context",Pb="pont-space-form-space-y",Cb="pont-text-form-description-font pont-text-form-description-color-text pont-mt-form-description-space-mt",Sb="pont-space-y-form-field-space-y",Eb="pont-space-y-form-item-space-y",xb="pont-text-form-label-font pont-mb-form-label-space-mb pont-font-form-label-font-weight pont-peer-disabled:pont-cursor-not-allowed peer-disabled:pont-opacity-form-label-opacity-peer-disabled",Ob="pont-text-form-label-color-text-error",Rb="pont-text-form-message-font-size pont-text-form-message-color-text";var Ib=Object.defineProperty,Ab=Object.getOwnPropertyDescriptor,eh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ab(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ib(t,r,o),o};let oa=class extends y{createRenderRoot(){return this}get _desc(){return this.querySelector("p[part=form-description]")}firstUpdated(){this.moveLightDomChildrenInto(this._desc)}render(){return l`
|
|
1310
1310
|
<p
|
|
1311
1311
|
id="${this.itemContext.id}-description"
|
|
1312
1312
|
part="form-description"
|
|
1313
1313
|
class="${u(Cb,this.className)}"
|
|
1314
1314
|
></p>
|
|
1315
|
-
`}};eh([ct({context:th})],
|
|
1315
|
+
`}};eh([ct({context:th})],oa.prototype,"itemContext",2);oa=eh([p("pont-form-description")],oa);const Tb="pont-form-field-context";var Db=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,Fo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Lb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Db(t,r,o),o};let He=class extends y{constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name)return;this.form.registerField({name:this.name,validator:r=>{for(const n of this.validators??[]){const o=n(r);if(o)return o}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const e=(t=this._container)==null?void 0:t.querySelector("pont-input, input, textarea, select");e&&(e.value=this.defaultValue??"",this.form.setValue(this.name,this.defaultValue??""),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return l`<div
|
|
1316
1316
|
part="form-field"
|
|
1317
1317
|
class="${u(Sb,this.className)}"
|
|
1318
|
-
></div>`}};Fo([ct({context:$n})],He.prototype,"form",2);Fo([a({type:String})],He.prototype,"name",2);Fo([a({type:Array})],He.prototype,"validators",2);Fo([a({type:String})],He.prototype,"defaultValue",2);Fo([Wt({context:Tb})],He.prototype,"fieldName",2);He=Fo([p("pont-form-field")],He);var Fb=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fb(t,r,o),o};let
|
|
1318
|
+
></div>`}};Fo([ct({context:$n})],He.prototype,"form",2);Fo([a({type:String})],He.prototype,"name",2);Fo([a({type:Array})],He.prototype,"validators",2);Fo([a({type:String})],He.prototype,"defaultValue",2);Fo([Wt({context:Tb})],He.prototype,"fieldName",2);He=Fo([p("pont-form-field")],He);var Fb=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fb(t,r,o),o};let na=class extends y{constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return l`<div
|
|
1319
1319
|
part="form-item"
|
|
1320
1320
|
class="${u(Eb,this.className)}"
|
|
1321
|
-
></div>`}};rh([Wt({context:th})],
|
|
1321
|
+
></div>`}};rh([Wt({context:th})],na.prototype,"itemContext",2);na=rh([p("pont-form-item")],na);var Nb=Object.defineProperty,Mb=Object.getOwnPropertyDescriptor,Wa=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Nb(t,r,o),o};let ai=class extends y{constructor(){super(...arguments),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof He);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();const e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{const t=this.form.getError(e);this.hasError=!!t,this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return l`
|
|
1322
1322
|
<label
|
|
1323
1323
|
part="form-label"
|
|
1324
1324
|
for="${this._field.name}"
|
|
1325
1325
|
class="${u(xb,this.hasError&&Ob,this.className)}"
|
|
1326
1326
|
></label>
|
|
1327
|
-
`}};
|
|
1327
|
+
`}};Wa([ct({context:$n})],ai.prototype,"form",2);Wa([g()],ai.prototype,"hasError",2);ai=Wa([p("pont-form-label")],ai);var Bb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,Ya=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ub(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bb(t,r,o),o};let li=class extends f{constructor(){super(...arguments),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof He);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?l`<p
|
|
1328
1328
|
id="${this._field.name}-message"
|
|
1329
1329
|
class="${u(Rb,this.className)}"
|
|
1330
1330
|
>
|
|
1331
1331
|
${this.error}
|
|
1332
|
-
</p>`:null}};
|
|
1332
|
+
</p>`:null}};Ya([ct({context:$n})],li.prototype,"form",2);Ya([g()],li.prototype,"error",2);li=Ya([p("pont-form-message")],li);var jb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,Qa=(e,t,r,n)=>{for(var o=n>1?void 0:n?qb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jb(t,r,o),o};let di=class extends y{constructor(){super(...arguments),this.form=new Jp,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&this.onSubmit(this.form.getValues())}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return l`
|
|
1333
1333
|
<form
|
|
1334
1334
|
part="form-root"
|
|
1335
1335
|
id="pont-form-root"
|
|
1336
1336
|
@submit=${this.handleSubmit}
|
|
1337
1337
|
class="${u(Pb,this.className)}"
|
|
1338
1338
|
></form>
|
|
1339
|
-
`}};
|
|
1339
|
+
`}};Qa([Wt({context:$n})],di.prototype,"form",2);Qa([a({type:Function})],di.prototype,"onSubmit",2);di=Qa([p("pont-form-root")],di);const Za={root:[""],trigger:[""],content:["pont-fixed pont-z-50","pont-p-hover-card-content-space-p","pont-w-hover-card-content-space-w","pont-text-hover-card-content-color-text","pont-bg-hover-card-content-color-bg","pont-rounded-hover-card-content-radius pont-border-hover-card-content-width-border pont-border-hover-card-content-color-border pont-outline-hidden","pont-shadow-hover-card-content-shadow","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95","data-[side=bottom]:pont-slide-in-from-top-2 data-[side=left]:pont-slide-in-from-right-2 data-[side=right]:pont-slide-in-from-left-2 data-[side=top]:pont-slide-in-from-bottom-2"]};var zb=Object.defineProperty,Vb=Object.getOwnPropertyDescriptor,Ja=(e,t,r,n)=>{for(var o=n>1?void 0:n?Vb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zb(t,r,o),o};let ci=class extends y{constructor(){super(...arguments),this.state="closed",this.isOpen=!1,this.onStateChange=e=>{const t=e.detail.isOpen;this.state=t?"open":"closed"},this.handlePointerLeaveCheck=e=>{this.contains(e.relatedTarget)||(this.isOpen=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("hover-card-state-change",this.onStateChange),this.addEventListener("mouseenter",this.handlePointerLeaveCheck),this.addEventListener("mouseleave",this.handlePointerLeaveCheck)}disconnectedCallback(){document.removeEventListener("hover-card-state-change",this.onStateChange),this.removeEventListener("mouseenter",this.handlePointerLeaveCheck),this.removeEventListener("mouseleave",this.handlePointerLeaveCheck),super.disconnectedCallback()}updated(e){super.updated(e),this.isOpen=this.state==="open"}createRenderRoot(){return this}getAttributesToExclude(){return[]}firstUpdated(e){this.moveLightDomChildrenInto(this.renderRoot.querySelector("#pont-hover-card-content"))}render(){return l`
|
|
1340
1340
|
<div
|
|
1341
1341
|
id="pont-hover-card-content"
|
|
1342
1342
|
part="hover-card-content"
|
|
1343
|
-
class=${u(
|
|
1343
|
+
class=${u(Za.content,this.className)}
|
|
1344
1344
|
style="display: ${this.isOpen?"block":"none"};"
|
|
1345
1345
|
></div>
|
|
1346
|
-
`}};
|
|
1346
|
+
`}};Ja([a({attribute:"data-state",type:String})],ci.prototype,"state",2);Ja([g()],ci.prototype,"isOpen",2);ci=Ja([p("pont-hover-card-content")],ci);var Hb=Object.getOwnPropertyDescriptor,Gb=(e,t,r,n)=>{for(var o=n>1?void 0:n?Hb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Nd=class extends y{getAttributesToExclude(){return["value","defaultValue"]}createRenderRoot(){return this}firstUpdated(e){this.removeDuplicateContent()}render(){return l`
|
|
1347
1347
|
<div
|
|
1348
1348
|
id="pont-hover-card-trigger"
|
|
1349
1349
|
part="pont-hover-card-trigger"
|
|
1350
|
-
class=${u(
|
|
1350
|
+
class=${u(Za.trigger,this.className)}
|
|
1351
1351
|
>
|
|
1352
1352
|
${Array.from(this.children)}
|
|
1353
1353
|
</div>
|
|
1354
|
-
`}};Nd=Gb([p("pont-hover-card-trigger")],Nd);var Kb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,oh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Kb(t,r,o),o};let
|
|
1354
|
+
`}};Nd=Gb([p("pont-hover-card-trigger")],Nd);var Kb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor,oh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Kb(t,r,o),o};let ia=class extends y{constructor(){super(...arguments),this.isOpen=!1,this.hoverTimeout=null,this.openCard=()=>{var e;this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.isOpen||(this.isOpen=!0,(e=this._content)==null||e.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!0}})))},this.closeCard=()=>{this.hoverTimeout=setTimeout(()=>{var e;this.isOpen=!1,(e=this._content)==null||e.dispatchEvent(new CustomEvent("hover-card-state-change",{detail:{isOpen:!1}}))},150)}}get _containerElement(){return this.renderRoot.querySelector("#pont-hover-card-container")}get _content(){return this.renderRoot.querySelector("pont-hover-card-content")}get _trigger(){return this.renderRoot.querySelector("pont-hover-card-trigger")}getAttributesToExclude(){return[]}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}connectedCallback(){super.connectedCallback()}disconnectedCallback(){const e=this._trigger,t=this._content;e==null||e.removeEventListener("mouseenter",this.openCard),e==null||e.removeEventListener("mouseleave",this.closeCard),t==null||t.removeEventListener("mouseenter",this.openCard),t==null||t.removeEventListener("mouseleave",this.closeCard),this.hoverTimeout&&clearTimeout(this.hoverTimeout),super.disconnectedCallback()}createRenderRoot(){return this}firstUpdated(e){const t=this._containerElement;this.moveLightDomChildrenInto(t);const r=this._trigger,n=this._content;r==null||r.addEventListener("mouseenter",this.openCard),r==null||r.addEventListener("mouseleave",this.closeCard),n==null||n.addEventListener("mouseenter",this.openCard),n==null||n.addEventListener("mouseleave",this.closeCard)}render(){return l`
|
|
1355
1355
|
<div
|
|
1356
1356
|
id="pont-hover-card-container"
|
|
1357
1357
|
part="hover-card"
|
|
1358
|
-
class=${u(
|
|
1358
|
+
class=${u(Za.root,this.className)}
|
|
1359
1359
|
></div>
|
|
1360
|
-
`}};oh([g()],
|
|
1360
|
+
`}};oh([g()],ia.prototype,"isOpen",2);ia=oh([p("pont-hover-card")],ia);var Yb=Object.getOwnPropertyDescriptor,Qb=(e,t,r,n)=>{for(var o=n>1?void 0:n?Yb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Md=class extends f{createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="input-group"]')}firstUpdated(){const e=this._rootSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-group" role="group"></div>`}};Md=Qb([p("pont-input-group")],Md);var Zb=Object.defineProperty,Jb=Object.getOwnPropertyDescriptor,Xa=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zb(t,r,o),o};let pi=class extends f{constructor(){super(...arguments),this.align="inline-start"}createRenderRoot(){return this}get _addonSlot(){return this.querySelector('[data-slot="input-group-addon"]')}firstUpdated(){const e=this._addonSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1361
1361
|
<div
|
|
1362
1362
|
data-slot="input-group-addon"
|
|
1363
1363
|
data-align="${this.align}"
|
|
1364
1364
|
?data-border="${this.border}"
|
|
1365
1365
|
role="group"
|
|
1366
1366
|
></div>
|
|
1367
|
-
`}};
|
|
1367
|
+
`}};Xa([a({type:String})],pi.prototype,"align",2);Xa([a({type:Boolean})],pi.prototype,"border",2);pi=Xa([p("pont-input-group-addon")],pi);var Xb=Object.defineProperty,ty=Object.getOwnPropertyDescriptor,Ze=(e,t,r,n)=>{for(var o=n>1?void 0:n?ty(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Xb(t,r,o),o};let Pe=class extends f{constructor(){super(...arguments),this.variant="ghost",this.size="xs",this.type="button"}createRenderRoot(){return this}get _buttonSlot(){return this.querySelector('[data-slot="input-group-button"]')}firstUpdated(){const e=this._buttonSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1368
1368
|
<pont-button
|
|
1369
1369
|
data-slot="input-group-button"
|
|
1370
1370
|
.variant=${this.variant}
|
|
@@ -1513,13 +1513,13 @@
|
|
|
1513
1513
|
/>
|
|
1514
1514
|
</div>
|
|
1515
1515
|
</div>
|
|
1516
|
-
`}};pt([a({type:String})],rt.prototype,"autocomplete",2);pt([a({attribute:"default-value",type:String})],rt.prototype,"defaultValue",2);pt([a({type:Boolean})],rt.prototype,"disabled",2);pt([a({type:String})],rt.prototype,"form",2);pt([a({type:String})],rt.prototype,"id",2);pt([a({type:String})],rt.prototype,"inputmode",2);pt([a({type:Number})],rt.prototype,"maxlength",2);pt([a({type:String})],rt.prototype,"name",2);pt([a({type:String})],rt.prototype,"pattern",2);pt([a({type:Boolean})],rt.prototype,"required",2);pt([a({type:String})],rt.prototype,"value",2);pt([a({attribute:!1})],rt.prototype,"onChange",2);pt([a({attribute:!1})],rt.prototype,"onComplete",2);pt([a({attribute:!1})],rt.prototype,"onBlur",2);pt([a({attribute:!1})],rt.prototype,"onFocus",2);pt([a({attribute:!1})],rt.prototype,"onPaste",2);pt([a({attribute:!1})],rt.prototype,"pasteTransformer",2);pt([g()],rt.prototype,"_activeSlot",2);pt([g()],rt.prototype,"_hasFocus",2);pt([g()],rt.prototype,"_value",2);rt=pt([p("pont-input-otp")],rt);var uy=Object.getOwnPropertyDescriptor,my=(e,t,r,n)=>{for(var o=n>1?void 0:n?uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ud=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-otp-group"></div>`}};Ud=my([p("pont-input-otp-group")],Ud);var gy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,
|
|
1516
|
+
`}};pt([a({type:String})],rt.prototype,"autocomplete",2);pt([a({attribute:"default-value",type:String})],rt.prototype,"defaultValue",2);pt([a({type:Boolean})],rt.prototype,"disabled",2);pt([a({type:String})],rt.prototype,"form",2);pt([a({type:String})],rt.prototype,"id",2);pt([a({type:String})],rt.prototype,"inputmode",2);pt([a({type:Number})],rt.prototype,"maxlength",2);pt([a({type:String})],rt.prototype,"name",2);pt([a({type:String})],rt.prototype,"pattern",2);pt([a({type:Boolean})],rt.prototype,"required",2);pt([a({type:String})],rt.prototype,"value",2);pt([a({attribute:!1})],rt.prototype,"onChange",2);pt([a({attribute:!1})],rt.prototype,"onComplete",2);pt([a({attribute:!1})],rt.prototype,"onBlur",2);pt([a({attribute:!1})],rt.prototype,"onFocus",2);pt([a({attribute:!1})],rt.prototype,"onPaste",2);pt([a({attribute:!1})],rt.prototype,"pasteTransformer",2);pt([g()],rt.prototype,"_activeSlot",2);pt([g()],rt.prototype,"_hasFocus",2);pt([g()],rt.prototype,"_value",2);rt=pt([p("pont-input-otp")],rt);var uy=Object.getOwnPropertyDescriptor,my=(e,t,r,n)=>{for(var o=n>1?void 0:n?uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ud=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-otp-group"></div>`}};Ud=my([p("pont-input-otp-group")],Ud);var gy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,tl=(e,t,r,n)=>{for(var o=n>1?void 0:n?fy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gy(t,r,o),o};let hi=class extends f{constructor(){super(...arguments),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("pont-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return l`
|
|
1517
1517
|
<div
|
|
1518
1518
|
data-slot="input-otp-slot"
|
|
1519
1519
|
aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
|
|
1520
1520
|
@click=${this._handleClick}
|
|
1521
1521
|
></div>
|
|
1522
|
-
`}};
|
|
1522
|
+
`}};tl([a({type:Number})],hi.prototype,"index",2);tl([a({type:Boolean})],hi.prototype,"invalid",2);hi=tl([p("pont-input-otp-slot")],hi);var vy=Object.getOwnPropertyDescriptor,by=(e,t,r,n)=>{for(var o=n>1?void 0:n?vy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let jd=class extends f{createRenderRoot(){return this}render(){return l`
|
|
1523
1523
|
<div data-slot="input-otp-separator" role="separator">
|
|
1524
1524
|
${wg()}
|
|
1525
1525
|
</div>
|
|
@@ -1537,9 +1537,9 @@
|
|
|
1537
1537
|
data-variant="${this.variant}"
|
|
1538
1538
|
data-size="${this.size}"
|
|
1539
1539
|
></div>
|
|
1540
|
-
`}};Pn([a({type:String})],wo.prototype,"variant",2);Pn([a({type:String})],wo.prototype,"size",2);Pn([a({type:String})],wo.prototype,"href",2);Pn([a({type:String})],wo.prototype,"target",2);wo=Pn([p("pont-item")],wo);var wy=Object.getOwnPropertyDescriptor,$y=(e,t,r,n)=>{for(var o=n>1?void 0:n?wy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let qd=class extends f{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){const e=this._actionsSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-actions"></div>`}};qd=$y([p("pont-item-actions")],qd);var Py=Object.getOwnPropertyDescriptor,Cy=(e,t,r,n)=>{for(var o=n>1?void 0:n?Py(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let zd=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-content"></div>`}};zd=Cy([p("pont-item-content")],zd);var Sy=Object.getOwnPropertyDescriptor,Ey=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Vd=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="item-description"></p>`}};Vd=Ey([p("pont-item-description")],Vd);var xy=Object.getOwnPropertyDescriptor,Oy=(e,t,r,n)=>{for(var o=n>1?void 0:n?xy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Hd=class extends f{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){const e=this._footerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-footer"></div>`}};Hd=Oy([p("pont-item-footer")],Hd);var Ry=Object.getOwnPropertyDescriptor,Iy=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ry(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Gd=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-group" role="list"></div>`}};Gd=Iy([p("pont-item-group")],Gd);var Ay=Object.getOwnPropertyDescriptor,Ty=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ay(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Kd=class extends f{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="item-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-header"></div>`}};Kd=Ty([p("pont-item-header")],Kd);var Dy=Object.defineProperty,Ly=Object.getOwnPropertyDescriptor,nh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ly(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Dy(t,r,o),o};let
|
|
1540
|
+
`}};Pn([a({type:String})],wo.prototype,"variant",2);Pn([a({type:String})],wo.prototype,"size",2);Pn([a({type:String})],wo.prototype,"href",2);Pn([a({type:String})],wo.prototype,"target",2);wo=Pn([p("pont-item")],wo);var wy=Object.getOwnPropertyDescriptor,$y=(e,t,r,n)=>{for(var o=n>1?void 0:n?wy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let qd=class extends f{createRenderRoot(){return this}get _actionsSlot(){return this.querySelector('[data-slot="item-actions"]')}firstUpdated(){const e=this._actionsSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-actions"></div>`}};qd=$y([p("pont-item-actions")],qd);var Py=Object.getOwnPropertyDescriptor,Cy=(e,t,r,n)=>{for(var o=n>1?void 0:n?Py(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let zd=class extends f{createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="item-content"]')}firstUpdated(){const e=this._contentSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-content"></div>`}};zd=Cy([p("pont-item-content")],zd);var Sy=Object.getOwnPropertyDescriptor,Ey=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Vd=class extends f{createRenderRoot(){return this}get _descriptionSlot(){return this.querySelector('[data-slot="item-description"]')}firstUpdated(){const e=this._descriptionSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="item-description"></p>`}};Vd=Ey([p("pont-item-description")],Vd);var xy=Object.getOwnPropertyDescriptor,Oy=(e,t,r,n)=>{for(var o=n>1?void 0:n?xy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Hd=class extends f{createRenderRoot(){return this}get _footerSlot(){return this.querySelector('[data-slot="item-footer"]')}firstUpdated(){const e=this._footerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-footer"></div>`}};Hd=Oy([p("pont-item-footer")],Hd);var Ry=Object.getOwnPropertyDescriptor,Iy=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ry(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Gd=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="item-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-group" role="list"></div>`}};Gd=Iy([p("pont-item-group")],Gd);var Ay=Object.getOwnPropertyDescriptor,Ty=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ay(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Kd=class extends f{createRenderRoot(){return this}get _headerSlot(){return this.querySelector('[data-slot="item-header"]')}firstUpdated(){const e=this._headerSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="item-header"></div>`}};Kd=Ty([p("pont-item-header")],Kd);var Dy=Object.defineProperty,Ly=Object.getOwnPropertyDescriptor,nh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ly(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Dy(t,r,o),o};let sa=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _mediaSlot(){return this.querySelector('[data-slot="item-media"]')}firstUpdated(){const e=this._mediaSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1541
1541
|
<div data-slot="item-media" data-variant="${this.variant}"></div>
|
|
1542
|
-
`}};nh([a({type:String})],
|
|
1542
|
+
`}};nh([a({type:String})],sa.prototype,"variant",2);sa=nh([p("pont-item-media")],sa);var Fy=Object.getOwnPropertyDescriptor,ky=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Wd=class extends f{createRenderRoot(){return this}get _separatorSlot(){return this.querySelector('[data-slot="item-separator"]')}firstUpdated(){const e=this._separatorSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`
|
|
1543
1543
|
<pont-separator
|
|
1544
1544
|
data-slot="item-separator"
|
|
1545
1545
|
orientation="horizontal"
|
|
@@ -1598,7 +1598,7 @@
|
|
|
1598
1598
|
|
|
1599
1599
|
<div part="menubar-menu-slot"></div>
|
|
1600
1600
|
</div>
|
|
1601
|
-
`}};ko([g()],cr.prototype,"isOpen",2);ko([g()],cr.prototype,"uniqueIds",2);ko([g()],cr.prototype,"selectedMenu",2);ko([g()],cr.prototype,"isHovering",2);ko([a({type:String})],cr.prototype,"id",2);cr=ko([p("pont-menubar-menu")],cr);var Ky=Object.defineProperty,Wy=Object.getOwnPropertyDescriptor,Cn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ky(t,r,o),o};let $o=class extends y{constructor(){super(...arguments),this.state=
|
|
1601
|
+
`}};ko([g()],cr.prototype,"isOpen",2);ko([g()],cr.prototype,"uniqueIds",2);ko([g()],cr.prototype,"selectedMenu",2);ko([g()],cr.prototype,"isHovering",2);ko([a({type:String})],cr.prototype,"id",2);cr=ko([p("pont-menubar-menu")],cr);var Ky=Object.defineProperty,Wy=Object.getOwnPropertyDescriptor,Cn=(e,t,r,n)=>{for(var o=n>1?void 0:n?Wy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ky(t,r,o),o};let $o=class extends y{constructor(){super(...arguments),this.state=Ga,this.id="",this.side="bottom",this.isOpen=!1}get _menubarMenu(){let e=this.parentElement;for(;e&&!(e instanceof cr);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("div[part=menubar-content]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}firstUpdated(e){requestAnimationFrame(()=>{this.moveLightDomChildrenInto(this._containerElement)})}connectedCallback(){super.connectedCallback(),this.isOpen&&document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}updated(e){super.updated(e),this.state==="open"?this.isOpen=!0:this.isOpen=!1,e.has("isOpen")&&(this.isOpen?document.addEventListener("mousedown",this.handleClickOutside):document.removeEventListener("mousedown",this.handleClickOutside))}handleClickOutside(e){const t=this.querySelector("button");this&&!this.contains(e.target)&&!(t!=null&&t.contains(e.target))&&(this.isOpen=!1)}render(){return l`
|
|
1602
1602
|
<div
|
|
1603
1603
|
class=${u(Et.content,this.className)}
|
|
1604
1604
|
id="${this.id}"
|
|
@@ -1680,7 +1680,7 @@
|
|
|
1680
1680
|
</svg>`:h}
|
|
1681
1681
|
</span>
|
|
1682
1682
|
</div>
|
|
1683
|
-
`}};ie._counter=0;Gr([a({type:String})],ie.prototype,"_id",2);Gr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Gr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Gr([a({type:Boolean})],ie.prototype,"selected",2);Gr([a({type:Boolean})],ie.prototype,"checked",2);Gr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Gr([p("pont-menubar-radio-item")],ie);var e_=Object.defineProperty,r_=Object.getOwnPropertyDescriptor,
|
|
1683
|
+
`}};ie._counter=0;Gr([a({type:String})],ie.prototype,"_id",2);Gr([a({attribute:"aria-hidden",type:String})],ie.prototype,"_hidden",2);Gr([a({attribute:"data-value",type:String})],ie.prototype,"value",1);Gr([a({type:Boolean})],ie.prototype,"selected",2);Gr([a({type:Boolean})],ie.prototype,"checked",2);Gr([a({type:Boolean})],ie.prototype,"disabled",2);ie=Gr([p("pont-menubar-radio-item")],ie);var e_=Object.defineProperty,r_=Object.getOwnPropertyDescriptor,el=(e,t,r,n)=>{for(var o=n>1?void 0:n?r_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&e_(t,r,o),o};let Br=class extends y{constructor(){super(...arguments),this._id="",this._hidden=""}get _containerElement(){return this.querySelector("div[part=menubar-separator]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this}get identifier(){var t;if(this._id!=="")return this._id;const e=(t=this.parentElement)==null?void 0:t.querySelector("div[rtgcmd-list]");return e?this._id=`${e.getAttribute("id")}s${Br._counter++}`:this._id=`rtgcmdrxlxs${Br._counter++}`,this._id}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`${this._hidden==="true"?h:l`
|
|
1684
1684
|
<div
|
|
1685
1685
|
class=${u(Et.separator,this.className)}
|
|
1686
1686
|
id="${this.identifier}"
|
|
@@ -1688,7 +1688,7 @@
|
|
|
1688
1688
|
part="menubar-separator"
|
|
1689
1689
|
rtgcmd-separator
|
|
1690
1690
|
></div>
|
|
1691
|
-
`}`}};Br._counter=0;
|
|
1691
|
+
`}`}};Br._counter=0;el([a({type:String})],Br.prototype,"_id",2);el([a({attribute:"aria-hidden",type:String})],Br.prototype,"_hidden",2);Br=el([p("pont-menubar-separator")],Br);var o_=Object.getOwnPropertyDescriptor,n_=(e,t,r,n)=>{for(var o=n>1?void 0:n?o_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Jd=class extends y{get _containerElement(){return this.querySelector("span[part=menubar-shortcut]")}getAttributesToExclude(){return["date-testid"]}createRenderRoot(){return this.classList=u(Et.shortcut),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1692
1692
|
<span
|
|
1693
1693
|
class=${u(Et.shortcut,this.className)}
|
|
1694
1694
|
part="menubar-shortcut"
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
></div>
|
|
1770
1770
|
</div>
|
|
1771
1771
|
</div>
|
|
1772
|
-
`}};Sn([a({attribute:"data-state",type:String})],Po.prototype,"state",2);Sn([a({type:String})],Po.prototype,"id",2);Sn([a({type:String})],Po.prototype,"side",2);Sn([g()],Po.prototype,"isOpen",2);Po=Sn([p("pont-navigation-menu-content")],Po);var g_=Object.defineProperty,f_=Object.getOwnPropertyDescriptor,ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?f_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&g_(t,r,o),o};let
|
|
1772
|
+
`}};Sn([a({attribute:"data-state",type:String})],Po.prototype,"state",2);Sn([a({type:String})],Po.prototype,"id",2);Sn([a({type:String})],Po.prototype,"side",2);Sn([g()],Po.prototype,"isOpen",2);Po=Sn([p("pont-navigation-menu-content")],Po);var g_=Object.defineProperty,f_=Object.getOwnPropertyDescriptor,ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?f_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&g_(t,r,o),o};let aa=class extends y{constructor(){super(...arguments),this.href="/"}get _containerElement(){return this.querySelector("a[part=navigation-menu-link]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1773
1773
|
<a
|
|
1774
1774
|
part="navigation-menu-link"
|
|
1775
1775
|
class="${u(Ur.link,this.className)}"
|
|
@@ -1779,7 +1779,7 @@
|
|
|
1779
1779
|
tabindex="-1"
|
|
1780
1780
|
>
|
|
1781
1781
|
</a>
|
|
1782
|
-
`}};ih([a({type:String})],
|
|
1782
|
+
`}};ih([a({type:String})],aa.prototype,"href",2);aa=ih([p("pont-navigation-menu-link")],aa);var v_=Object.getOwnPropertyDescriptor,b_=(e,t,r,n)=>{for(var o=n>1?void 0:n?v_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let rc=class extends y{get _containerElement(){return this.querySelector("div[part=navigation-menu-trigger]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getAttributesToExclude(){return["data-testid"]}render(){return l`
|
|
1783
1783
|
<div part="navigation-menu-trigger" class="${u(this.className)}"></div>
|
|
1784
1784
|
`}};rc=b_([p("pont-navigation-menu-trigger")],rc);var y_=Object.getOwnPropertyDescriptor,__=(e,t,r,n)=>{for(var o=n>1?void 0:n?y_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let oc=class extends y{get _containerElement(){return this.querySelector("nav[part=navigation-menu]")}createRenderRoot(){return this}firstUpdated(e){}render(){return l`
|
|
1785
1785
|
<nav
|
|
@@ -1832,14 +1832,14 @@
|
|
|
1832
1832
|
class=${u(ee.link({variant:this.isActive?"outline":"ghost",size:this.size}),this.className)}
|
|
1833
1833
|
>
|
|
1834
1834
|
</a>
|
|
1835
|
-
`}};En([a({attribute:"data-state",type:String})],jr.prototype,"state",2);En([a({type:Boolean})],jr.prototype,"isActive",2);En([a({type:String})],jr.prototype,"size",2);En([a({type:String})],jr.prototype,"href",2);jr=En([p("pont-pagination-link")],jr);var x_=Object.defineProperty,O_=Object.getOwnPropertyDescriptor,
|
|
1835
|
+
`}};En([a({attribute:"data-state",type:String})],jr.prototype,"state",2);En([a({type:Boolean})],jr.prototype,"isActive",2);En([a({type:String})],jr.prototype,"size",2);En([a({type:String})],jr.prototype,"href",2);jr=En([p("pont-pagination-link")],jr);var x_=Object.defineProperty,O_=Object.getOwnPropertyDescriptor,rl=(e,t,r,n)=>{for(var o=n>1?void 0:n?O_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&x_(t,r,o),o};let ui=class extends y{constructor(){super(...arguments),this.uniqueIds=[],this.isActive=!1}get _containerElement(){return this.querySelector("li[part=pagination-item]")}get _content(){var t;const e=(t=this._containerElement)==null?void 0:t.children;if(e){for(let r=0;r<e.length;r++)if(e[r]instanceof jr)return e[r]}return null}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isActive?"open":"close")}handleClick(e){e.stopPropagation(),document.querySelectorAll("pont-pagination-item").forEach(r=>{r!==this&&(r.isActive=!1)}),this.isActive=!this.isActive}firstUpdated(){var r;this.moveLightDomChildrenInto(this._containerElement);const e=(r=this._containerElement)==null?void 0:r.children,t=[];for(let n=0;n<e.length-1;n+=1){const o=e[n],i=crypto.randomUUID();t.push(i),o.dataset.pairId=i}this.uniqueIds=t,this._content&&this._content.removeEventListener("unique-ids-generated",()=>{this.requestUpdate()})}raiseEvent(){const e=new CustomEvent("unique-ids-generated",{detail:{ids:this.uniqueIds},bubbles:!0,composed:!0});this.dispatchEvent(e)}createRenderRoot(){return this}render(){return l`
|
|
1836
1836
|
<li
|
|
1837
1837
|
data-slot="pagination-item"
|
|
1838
1838
|
part="pagination-item"
|
|
1839
1839
|
class=${u(ee.item,this.className)}
|
|
1840
1840
|
@click="${this.handleClick}"
|
|
1841
1841
|
></li>
|
|
1842
|
-
`}};
|
|
1842
|
+
`}};rl([g()],ui.prototype,"uniqueIds",2);rl([a({type:Boolean})],ui.prototype,"isActive",2);ui=rl([p("pont-pagination-item")],ui);var R_=Object.defineProperty,I_=Object.getOwnPropertyDescriptor,sh=(e,t,r,n)=>{for(var o=n>1?void 0:n?I_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&R_(t,r,o),o};let la=class extends y{constructor(){super(...arguments),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-next]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1843
1843
|
<pont-pagination-link
|
|
1844
1844
|
aria-label="Go to next page"
|
|
1845
1845
|
size="default"
|
|
@@ -1865,7 +1865,7 @@
|
|
|
1865
1865
|
|
|
1866
1866
|
<div part="pagination-next"></div>
|
|
1867
1867
|
</pont-pagination-link>
|
|
1868
|
-
`}};sh([a({type:String})],
|
|
1868
|
+
`}};sh([a({type:String})],la.prototype,"href",2);la=sh([p("pont-pagination-next")],la);var A_=Object.defineProperty,T_=Object.getOwnPropertyDescriptor,ah=(e,t,r,n)=>{for(var o=n>1?void 0:n?T_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&A_(t,r,o),o};let da=class extends y{constructor(){super(...arguments),this.href="javascript:void(0)"}get _containerElement(){return this.querySelector("div[part=pagination-previous]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1869
1869
|
<pont-pagination-link
|
|
1870
1870
|
aria-label="Go to previous page"
|
|
1871
1871
|
size="default"
|
|
@@ -1891,7 +1891,7 @@
|
|
|
1891
1891
|
|
|
1892
1892
|
<div part="pagination-previous"></div>
|
|
1893
1893
|
</pont-pagination-link>
|
|
1894
|
-
`}};ah([a({type:String})],
|
|
1894
|
+
`}};ah([a({type:String})],da.prototype,"href",2);da=ah([p("pont-pagination-previous")],da);var D_=Object.getOwnPropertyDescriptor,L_=(e,t,r,n)=>{for(var o=n>1?void 0:n?D_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let sc=class extends y{get _containerElement(){return this.querySelector("nav[part=pagination]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
1895
1895
|
<nav
|
|
1896
1896
|
role="navigation"
|
|
1897
1897
|
aria-label="pagination"
|
|
@@ -1985,7 +1985,7 @@
|
|
|
1985
1985
|
</pont-input-group-button>
|
|
1986
1986
|
</pont-input-group-addon>
|
|
1987
1987
|
</pont-input-group>
|
|
1988
|
-
`}};vt([a({type:String})],lt.prototype,"autocomplete",2);vt([a({type:Boolean})],lt.prototype,"disabled",2);vt([a({type:String})],lt.prototype,"form",2);vt([a({type:String})],lt.prototype,"id",2);vt([a({type:Boolean})],lt.prototype,"invalid",2);vt([a({type:Number})],lt.prototype,"maxlength",2);vt([a({type:Number})],lt.prototype,"minlength",2);vt([a({type:String})],lt.prototype,"name",2);vt([a({type:String})],lt.prototype,"pattern",2);vt([a({type:String})],lt.prototype,"placeholder",2);vt([a({type:Boolean})],lt.prototype,"readonly",2);vt([a({type:Boolean})],lt.prototype,"required",2);vt([a({type:String})],lt.prototype,"value",2);vt([a({attribute:!1})],lt.prototype,"onClick",2);vt([a({attribute:!1})],lt.prototype,"onInput",2);vt([a({attribute:!1})],lt.prototype,"onChange",2);vt([a({attribute:!1})],lt.prototype,"onFocus",2);vt([a({attribute:!1})],lt.prototype,"onBlur",2);vt([g()],lt.prototype,"_showPassword",2);lt=vt([p("pont-password-input")],lt);const ac={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var N_=Object.defineProperty,M_=Object.getOwnPropertyDescriptor,lh=(e,t,r,n)=>{for(var o=n>1?void 0:n?M_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&N_(t,r,o),o};let
|
|
1988
|
+
`}};vt([a({type:String})],lt.prototype,"autocomplete",2);vt([a({type:Boolean})],lt.prototype,"disabled",2);vt([a({type:String})],lt.prototype,"form",2);vt([a({type:String})],lt.prototype,"id",2);vt([a({type:Boolean})],lt.prototype,"invalid",2);vt([a({type:Number})],lt.prototype,"maxlength",2);vt([a({type:Number})],lt.prototype,"minlength",2);vt([a({type:String})],lt.prototype,"name",2);vt([a({type:String})],lt.prototype,"pattern",2);vt([a({type:String})],lt.prototype,"placeholder",2);vt([a({type:Boolean})],lt.prototype,"readonly",2);vt([a({type:Boolean})],lt.prototype,"required",2);vt([a({type:String})],lt.prototype,"value",2);vt([a({attribute:!1})],lt.prototype,"onClick",2);vt([a({attribute:!1})],lt.prototype,"onInput",2);vt([a({attribute:!1})],lt.prototype,"onChange",2);vt([a({attribute:!1})],lt.prototype,"onFocus",2);vt([a({attribute:!1})],lt.prototype,"onBlur",2);vt([g()],lt.prototype,"_showPassword",2);lt=vt([p("pont-password-input")],lt);const ac={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var N_=Object.defineProperty,M_=Object.getOwnPropertyDescriptor,lh=(e,t,r,n)=>{for(var o=n>1?void 0:n?M_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&N_(t,r,o),o};let ca=class extends f{constructor(){super(...arguments),this.value=15}createRenderRoot(){return this}render(){return l`
|
|
1989
1989
|
<div
|
|
1990
1990
|
part="progress"
|
|
1991
1991
|
aria-valuenow="${this.value}"
|
|
@@ -2003,7 +2003,7 @@
|
|
|
2003
2003
|
style="transform: translateX(-${100-(this.value||0)}%);"
|
|
2004
2004
|
></div>
|
|
2005
2005
|
</div>
|
|
2006
|
-
`}};lh([a({type:Number})],
|
|
2006
|
+
`}};lh([a({type:Number})],ca.prototype,"value",2);ca=lh([p("pont-progress")],ca);const Xo={root:["pont-grid","pont-gap-radio-group-space-gap"],item:{wrapper:["pont-inline-flex","pont-justify-center pont-items-center","pont-size-radio-group-item-space-size"],item:["pont-aspect-square","pont-shrink-0","pont-size-radio-group-item-space-size","pont-bg-radio-group-item-color-bg","pont-rounded-radio-group-item-radius pont-border-radio-group-item-width-border pont-border-radio-group-item-color-border pont-outline-none","pont-transition-[color,box-shadow]","focus-visible:pont-border-radio-group-item-color-border-focus focus-visible:pont-ring-radio-group-item-width-ring-focus focus-visible:pont-ring-radio-group-item-color-ring-focus","disabled:pont-opacity-radio-group-item-opacity-disabled disabled:pont-cursor-not-allowed","aria-invalid:pont-border-radio-group-item-color-border-invalid aria-invalid:pont-ring-radio-group-item-width-ring-invalid aria-invalid:pont-ring-radio-group-item-color-ring-invalid"],indicator:["pont-flex pont-relative","pont-justify-center pont-items-center"],icon:["pont-absolute pont-top-1/2 pont-left-1/2","pont-size-radio-group-indicator-space-size","pont--translate-x-1/2 pont--translate-y-1/2","pont-fill-radio-group-indicator-color-fill"]}},B_="unChecked";var U_=Object.defineProperty,j_=Object.getOwnPropertyDescriptor,fr=(e,t,r,n)=>{for(var o=n>1?void 0:n?j_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&U_(t,r,o),o};let Ge=class extends y{constructor(){super(...arguments),this.checked=!1,this.tabindex=0,this.value="",this.id="radio-group-item",this.state=B_,this.disabled=!1,this.invalid=!1}get _containerElement(){return this.querySelector("button[part=radio-group-item]")}_onClick(e){e.defaultPrevented||this.checked||(this.checked=!0,this.dispatchEvent(new CustomEvent("radio-selected",{bubbles:!0,composed:!0})))}createRenderRoot(){return this.classList=u(Xo.item.wrapper),this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
|
|
2007
2007
|
<button
|
|
2008
2008
|
type="button"
|
|
2009
2009
|
part="radio-group-item"
|
|
@@ -2039,12 +2039,12 @@
|
|
|
2039
2039
|
</svg>
|
|
2040
2040
|
</span>`:h}
|
|
2041
2041
|
</button>
|
|
2042
|
-
`}};fr([a({type:Boolean,reflect:!0})],Ge.prototype,"checked",2);fr([a({type:Number})],Ge.prototype,"tabindex",2);fr([a({type:String})],Ge.prototype,"value",2);fr([a({type:String})],Ge.prototype,"id",2);fr([a({attribute:"data-state",type:String})],Ge.prototype,"state",2);fr([a({type:Boolean})],Ge.prototype,"disabled",2);fr([a({attribute:"aria-invalid",type:Boolean})],Ge.prototype,"invalid",2);Ge=fr([p("pont-radio-group-item")],Ge);var q_=Object.defineProperty,z_=Object.getOwnPropertyDescriptor,dh=(e,t,r,n)=>{for(var o=n>1?void 0:n?z_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&q_(t,r,o),o};let
|
|
2042
|
+
`}};fr([a({type:Boolean,reflect:!0})],Ge.prototype,"checked",2);fr([a({type:Number})],Ge.prototype,"tabindex",2);fr([a({type:String})],Ge.prototype,"value",2);fr([a({type:String})],Ge.prototype,"id",2);fr([a({attribute:"data-state",type:String})],Ge.prototype,"state",2);fr([a({type:Boolean})],Ge.prototype,"disabled",2);fr([a({attribute:"aria-invalid",type:Boolean})],Ge.prototype,"invalid",2);Ge=fr([p("pont-radio-group-item")],Ge);var q_=Object.defineProperty,z_=Object.getOwnPropertyDescriptor,dh=(e,t,r,n)=>{for(var o=n>1?void 0:n?z_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&q_(t,r,o),o};let pa=class extends y{constructor(){super(...arguments),this.defaultValue=""}get _containerElement(){return this.querySelector("div[part=radio-group]")}connectedCallback(){super.connectedCallback(),this.addEventListener("radio-selected",this._handleRadioSelected)}_handleRadioSelected(e){this.querySelectorAll("pont-radio-group-item").forEach(t=>{t!==e.target&&(t.checked=!1)})}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return this.querySelectorAll("pont-radio-group-item").forEach(e=>{e.checked=e.value==this.defaultValue}),l`
|
|
2043
2043
|
<div
|
|
2044
2044
|
part="radio-group"
|
|
2045
2045
|
class=${u(Xo.root,this.className)}
|
|
2046
2046
|
></div>
|
|
2047
|
-
`}};dh([a({type:String})],
|
|
2047
|
+
`}};dh([a({type:String})],pa.prototype,"defaultValue",2);pa=dh([p("pont-radio-group")],pa);const V_=["pont-relative","pont-border pont-border-scrollarea-color-border","pont-bg-scrollarea-color-bg"];var H_=Object.defineProperty,G_=Object.getOwnPropertyDescriptor,ch=(e,t,r,n)=>{for(var o=n>1?void 0:n?G_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&H_(t,r,o),o};let ha=class extends y{createRenderRoot(){return this}firstUpdated(){this.moveLightDomChildrenInto(this.viewportEl)}render(){return l`
|
|
2048
2048
|
<div
|
|
2049
2049
|
dir="ltr"
|
|
2050
2050
|
data-slot="scroll-area"
|
|
@@ -2081,17 +2081,17 @@
|
|
|
2081
2081
|
style="overflow: hidden scroll;"
|
|
2082
2082
|
></div>
|
|
2083
2083
|
</div>
|
|
2084
|
-
`}};ch([vn("[data-radix-scroll-area-viewport]")],
|
|
2084
|
+
`}};ch([vn("[data-radix-scroll-area-viewport]")],ha.prototype,"viewportEl",2);ha=ch([p("pont-scroll-area")],ha);class K_{constructor(){this.state={isOpen:!1,selectedValue:"",selectedText:""},this.listeners=new Set}subscribe(t){this.listeners.add(t)}unsubscribe(t){this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}get isOpen(){return this.state.isOpen}get selectedValue(){return this.state.selectedValue}get selectedText(){return this.state.selectedText}open(){this.state.isOpen||(this.state.isOpen=!0,this.notify())}close(){this.state.isOpen&&(this.state.isOpen=!1,this.notify())}toggle(){this.state.isOpen=!this.state.isOpen,this.notify()}select(t,r,n){this.state.selectedValue=t,this.state.selectedText=r,this.state.isOpen=!1,this.notify()}}const re={root:["pont-font-select-font-family"],value:["pont-flex","pont-gap-select-value-space-gap pont-items-center","pont-line-clamp-1"],trigger:{trigger:["pont-flex","pont-gap-select-trigger-space-gap pont-justify-between pont-items-center","pont-px-select-trigger-space-px pont-py-select-trigger-space-py","pont-w-full pont-h-select-trigger-space-h","pont-text-select-trigger-font pont-whitespace-nowrap","pont-bg-select-trigger-color-bg","pont-rounded-select-trigger-radius pont-border-select-trigger-width-border pont-border-select-trigger-color-border pont-outline-none","pont-transition-[color,box-shadow]","hover:pont-bg-select-trigger-color-bg-hover","focus-visible:pont-border-select-trigger-color-border-focus focus-visible:pont-ring-select-trigger-width-ring-focus focus-visible:pont-ring-select-trigger-color-ring-focus","pont-select-disabled:pont-opacity-select-trigger-opacity-disabled pont-select-disabled:pont-cursor-not-allowed","aria-invalid:pont-border-select-trigger-color-border-invalid aria-invalid:pont-ring-select-trigger-width-ring-invalid aria-invalid:pont-ring-select-trigger-color-ring-invalid","data-[placeholder]:pont-text-select-trigger-placeholder-color-text"],icon:["pont-shrink-0","pont-size-select-trigger-icon-space-size","pont-text-select-trigger-icon-color-text","pont-opacity-select-trigger-icon-opacity","pont-pointer-events-none"]},content:{content:["pont-fixed pont-overflow-x-hidden pont-overflow-y-auto pont-z-50","pont-w-fit","pont-text-select-content-color-text","pont-bg-select-content-color-bg","pont-rounded-select-content-radius pont-border-select-content-width-border pont-border-select-content-color-border","pont-shadow-select-content-shadow","pont-slide-in-from-top-2","pont-translate-y-1","data-[state=open]:pont-animate-in data-[state=open]:pont-fade-in-0 data-[state=open]:pont-zoom-in-95","data-[state=closed]:pont-animate-out data-[state=closed]:pont-fade-out-0 data-[state=closed]:pont-zoom-out-95"],viewport:["pont-p-select-content-viewport-space-p","pont-w-full","pont-scroll-my-1"]},label:["pont-px-select-label-space-px pont-py-select-label-space-py","pont-text-select-label-font pont-text-select-label-color-text"],item:{item:["pont-flex pont-relative","pont-gap-select-item-space-gap pont-items-center","pont-pl-select-item-space-pl pont-pr-select-item-space-pr pont-py-select-item-space-py","pont-w-full","pont-text-select-item-font","pont-rounded-select-item-radius pont-outline-hidden","pont-cursor-default pont-select-none","hover:pont-text-select-item-color-text-hover hover:pont-bg-select-item-color-bg-hover","focus:pont-text-select-item-color-text-focus focus:pont-bg-select-item-color-bg-focus","data-[disabled]:pont-opacity-select-item-opacity-disabled data-[disabled]:pont-pointer-events-none"],indicator:["pont-flex pont-absolute pont-right-2","pont-justify-center pont-items-center","pont-size-select-item-indicator-space-size"],icon:["pont-shrink-0","pont-size-select-item-icon-space-size","pont-text-select-item-icon-color-text","pont-pointer-events-none"]},separator:["pont-mx-select-separator-space-mx pont-my-select-separator-space-my","pont-h-select-separator-space-h","pont-bg-select-separator-color-bg","pont-pointer-events-none"]};var W_=Object.defineProperty,Y_=Object.getOwnPropertyDescriptor,ol=(e,t,r,n)=>{for(var o=n>1?void 0:n?Y_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&W_(t,r,o),o};let ur=class extends y{constructor(){super(...arguments),this.uuid=Ia(),this.selectStore=new K_,this.value="",this.disabled=!1,this.handleClickOutside=e=>{const t=this.querySelector("[data-select-uuid]"),r=e.target;t!=null&&t.contains(r)||this.selectStore.close()}}updated(e){super.updated(e),e.has("value")&&this.value!==this.selectStore.selectedValue&&this.syncValueToStore()}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback()}firstUpdated(){const e=this.querySelector("div[part=select]");this.moveLightDomChildrenInto(e),this.syncValueToStore()}syncValueToStore(){var e;if(this.value){const t=this.querySelector(`pont-select-item[value="${this.value}"]`),r=((e=t==null?void 0:t.textContent)==null?void 0:e.trim())||this.value;this.selectStore.select(this.value,r)}else this.selectStore.select("","")}createRenderRoot(){return this}render(){return l`
|
|
2085
2085
|
<div
|
|
2086
2086
|
part="select"
|
|
2087
2087
|
data-select-uuid=${this.uuid}
|
|
2088
2088
|
class=${u(re.root,this.className)}
|
|
2089
2089
|
></div>
|
|
2090
|
-
`}};
|
|
2090
|
+
`}};ol([a({type:String})],ur.prototype,"value",2);ol([a({type:Boolean,reflect:!0})],ur.prototype,"disabled",2);ur=ol([p("pont-select")],ur);/**
|
|
2091
2091
|
* @license
|
|
2092
2092
|
* Copyright 2018 Google LLC
|
|
2093
2093
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2094
|
-
*/const ph="important",Q_=" !"+ph,Z_=Eo(class extends Ei{constructor(e){var t;if(super(e),e.type!==
|
|
2094
|
+
*/const ph="important",Q_=" !"+ph,Z_=Eo(class extends Ei{constructor(e){var t;if(super(e),e.type!==Da.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return n==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const n of this.ft)t[n]==null&&(this.ft.delete(n),n.includes("-")?r.removeProperty(n):r[n]=null);for(const n in t){const o=t[n];if(o!=null){this.ft.add(n);const i=typeof o=="string"&&o.endsWith(Q_);n.includes("-")||i?r.setProperty(n,i?o.slice(0,-11):o,i?ph:""):r[n]=o}}return ar}});var J_=Object.defineProperty,X_=Object.getOwnPropertyDescriptor,nl=(e,t,r,n)=>{for(var o=n>1?void 0:n?X_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J_(t,r,o),o};let mi=class extends y{constructor(){super(...arguments),this.focusedIndex=0,this._dropdownStyle={display:"none",top:"0px",left:"0px",minWidth:"128px"},this.childrenArray=[],this._handleScrollResize=()=>{this._select.selectStore.isOpen&&this._updateDropdownPosition()},this.onStoreChange=()=>{const e=this._containerElement;e&&(e.style.display=this._select.selectStore.isOpen?"block":"none"),this._select.selectStore.isOpen?(requestAnimationFrame(()=>{this._updateDropdownPosition()}),window.addEventListener("scroll",this._handleScrollResize,!0),window.addEventListener("resize",this._handleScrollResize)):(window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),this._dropdownStyle={...this._dropdownStyle,display:"none"}),this._select.selectStore.isOpen&&this._select.selectStore.selectedValue&&(this.focusedIndex=this.childrenArray.findIndex(t=>t.value===this._select.selectStore.selectedValue)),this.updateFocusedItem(),this.requestUpdate()},this.handleKeyDown=e=>{var t;if(this._select.selectStore.isOpen)switch(e.preventDefault(),e.key){case"ArrowDown":this.focusedIndex=(this.focusedIndex+1)%this.childrenArray.length,this.updateFocusedItem();break;case"ArrowUp":this.focusedIndex=(this.focusedIndex-1+this.childrenArray.length)%this.childrenArray.length,this.updateFocusedItem();break;case"Enter":const r=this.childrenArray[this.focusedIndex],n=r.value,o=((t=r.textContent)==null?void 0:t.trim())||"";this._select.selectStore.select(n,o);break}}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof ur);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange),document.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("scroll",this._handleScrollResize,!0),window.removeEventListener("resize",this._handleScrollResize),super.disconnectedCallback()}getTriggerButton(){const e=this._select;return e?e.querySelector("button[part=select-trigger]"):null}_updateDropdownPosition(){const e=this.getTriggerButton();if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(128,t.width);this._dropdownStyle={display:this._select.selectStore.isOpen?"block":"none",top:`${t.bottom}px`,left:`${t.left}px`,minWidth:`${r}px`}}get _containerElement(){return this.querySelector("div[part=select-viewport]")}firstUpdated(){const e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="pont-select-item");this.childrenArray=e,e.forEach((t,r)=>{t.tabIndex=r,t.selectItemIndex=r,t.isFocus=r===this.focusedIndex||t.value===this._select.selectStore.selectedValue,t.addEventListener("mouseover",n=>this.handleMouseOver(n,r))}),this.moveLightDomChildrenInto(this._containerElement),this._select.selectStore.isOpen&&requestAnimationFrame(()=>{this._updateDropdownPosition()})}updateFocusedItem(){this.childrenArray.forEach((e,t)=>{var r;e.isFocus=t===this.focusedIndex,(r=e.requestUpdate)==null||r.call(e)})}handleMouseOver(e,t){e.preventDefault(),this.focusedIndex=t}createRenderRoot(){return this}render(){return l`
|
|
2095
2095
|
<div
|
|
2096
2096
|
part="select-group"
|
|
2097
2097
|
data-slot="select-content"
|
|
@@ -2103,7 +2103,7 @@
|
|
|
2103
2103
|
class="${u(re.content.viewport)}"
|
|
2104
2104
|
></div>
|
|
2105
2105
|
</div>
|
|
2106
|
-
`}};
|
|
2106
|
+
`}};nl([g()],mi.prototype,"focusedIndex",2);nl([g()],mi.prototype,"_dropdownStyle",2);mi=nl([p("pont-select-group")],mi);var tw=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Kr=(e,t,r,n)=>{for(var o=n>1?void 0:n?ew(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&tw(t,r,o),o};let mr=class extends y{constructor(){super(...arguments),this.value="",this.isSelected=!1,this.isFocus=!1,this.selectItemIndex=-1,this.onSelect=(e,t)=>{},this.class="",this._onStoreChange=()=>{var e,t;this.isSelected=this.value.toLowerCase()===((t=(e=this._select.selectStore.selectedValue)==null?void 0:e.toLowerCase)==null?void 0:t.call(e)),this.requestUpdate()},this.handleClick=e=>{e.stopPropagation();const t=this.getTextContent();this._select.selectStore.select(this.value,t),this.onSelect(this.value,this.selectItemIndex),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof ur);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this._onStoreChange)}disconnectedCallback(){this._select.selectStore.unsubscribe(this._onStoreChange),super.disconnectedCallback()}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get _containerElement(){return this.querySelector("div[part=select-item-container]")}createRenderRoot(){return this}getTextContent(){var n;const e=this._containerElement;if(e&&e.textContent)return e.textContent.trim();const t=this.querySelector("[part=select-item-indicator]"),r=this.cloneNode(!0);if(t){const o=r.querySelector("[part=select-item-indicator]");o==null||o.remove()}return((n=r.textContent)==null?void 0:n.trim())||""}render(){const e=this.getFilteredAttributes();return l`
|
|
2107
2107
|
<div
|
|
2108
2108
|
${xt(e)}
|
|
2109
2109
|
part="select-item"
|
|
@@ -2142,7 +2142,7 @@
|
|
|
2142
2142
|
part="select-label"
|
|
2143
2143
|
class=${u(re.label,this.className)}
|
|
2144
2144
|
></div>
|
|
2145
|
-
`}};lc=ow([p("pont-select-label")],lc);var nw=Object.defineProperty,iw=Object.getOwnPropertyDescriptor,
|
|
2145
|
+
`}};lc=ow([p("pont-select-label")],lc);var nw=Object.defineProperty,iw=Object.getOwnPropertyDescriptor,il=(e,t,r,n)=>{for(var o=n>1?void 0:n?iw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&nw(t,r,o),o};let gi=class extends y{constructor(){super(...arguments),this.state=Ga,this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=select-list]")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l`
|
|
2146
2146
|
<div
|
|
2147
2147
|
part="select-list"
|
|
2148
2148
|
class="${u("pont-absolute pont-z-50 pont-max-h-72 pont-w-full pont-overflow-hidden pont-overflow-y-auto pont-rounded-lg pont-border pont-border-input pont-bg-background p-1 [&::-webkit-scrollbar-thumb]:pont-rounded-full [&::-webkit-scrollbar-thumb]:pont-bg-accent [&::-webkit-scrollbar-track]:pont-bg-gray-100 [&::-webkit-scrollbar]:pont-w-2",this.className)}"
|
|
@@ -2150,14 +2150,14 @@
|
|
|
2150
2150
|
data-state="${this.state}"
|
|
2151
2151
|
style="display: ${this.isOpen?"block":"none"}; top:115%"
|
|
2152
2152
|
></div>
|
|
2153
|
-
`}};
|
|
2153
|
+
`}};il([a({attribute:"data-state",type:String})],gi.prototype,"state",2);il([g()],gi.prototype,"isOpen",2);gi=il([p("pont-select-list")],gi);var sw=Object.defineProperty,aw=Object.getOwnPropertyDescriptor,sl=(e,t,r,n)=>{for(var o=n>1?void 0:n?aw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&sw(t,r,o),o};let fi=class extends f{constructor(){super(...arguments),this._id="",this._hidden=""}createRenderRoot(){return this}render(){return l`
|
|
2154
2154
|
<div
|
|
2155
2155
|
rtgcmd-separator
|
|
2156
2156
|
part="select-separator"
|
|
2157
2157
|
role="separator"
|
|
2158
2158
|
class=${u(re.separator,this.className)}
|
|
2159
2159
|
></div>
|
|
2160
|
-
`}};
|
|
2160
|
+
`}};sl([a({type:String})],fi.prototype,"_id",2);sl([a({attribute:"aria-hidden",type:String})],fi.prototype,"_hidden",2);fi=sl([p("pont-select-separator")],fi);var lw=Object.getOwnPropertyDescriptor,dw=(e,t,r,n)=>{for(var o=n>1?void 0:n?lw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let dc=class extends y{constructor(){super(...arguments),this.onStoreChange=()=>{this.requestUpdate()},this.handleClick=e=>{e.stopPropagation(),!(this._select&&this._select.disabled)&&this._select&&this._select.selectStore.toggle()}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof ur);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),this.classObserver=new MutationObserver(()=>{this.requestUpdate()}),this.classObserver.observe(this,{attributes:!0,attributeFilter:["class"]}),this._select&&(this.parentObserver=new MutationObserver(()=>{this.requestUpdate()}),this.parentObserver.observe(this._select,{attributes:!0,attributeFilter:["disabled"]}))}disconnectedCallback(){var e,t;this._select.selectStore.unsubscribe(this.onStoreChange),(e=this.classObserver)==null||e.disconnect(),(t=this.parentObserver)==null||t.disconnect()}get _containerElement(){return this.querySelector("span[part=select-trigger-container]")}firstUpdated(e){var t;super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement),(t=this._containerElement)==null||t.addEventListener("click",this.handleClick)}createRenderRoot(){return this}getAttributesToExclude(){return["data-testid"]}getClassAttribute(){const e=this.getAttribute("class")||"",t=this.customClass||"",r=this.className||"";return e||t||r||""}filterConflictingWidthClasses(e,t){const r=/pont-w-[\w-[\]]+/;return r.test(t)?e.map(o=>o.split(/\s+/).filter(i=>!r.test(i)).join(" ")):e}render(){var n;const e=this.getClassAttribute(),t=this.filterConflictingWidthClasses(re.trigger.trigger,e),r=((n=this._select)==null?void 0:n.disabled)||!1;return l`
|
|
2161
2161
|
<button
|
|
2162
2162
|
type="button"
|
|
2163
2163
|
part="select-trigger"
|
|
@@ -2187,11 +2187,11 @@
|
|
|
2187
2187
|
<path d="m6 9 6 6 6-6" />
|
|
2188
2188
|
</svg>
|
|
2189
2189
|
</button>
|
|
2190
|
-
`}};dc=dw([p("pont-select-trigger")],dc);var cw=Object.defineProperty,pw=Object.getOwnPropertyDescriptor,hh=(e,t,r,n)=>{for(var o=n>1?void 0:n?pw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cw(t,r,o),o};let
|
|
2190
|
+
`}};dc=dw([p("pont-select-trigger")],dc);var cw=Object.defineProperty,pw=Object.getOwnPropertyDescriptor,hh=(e,t,r,n)=>{for(var o=n>1?void 0:n?pw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&cw(t,r,o),o};let ua=class extends y{constructor(){super(...arguments),this.placeholder="select a value",this.onStoreChange=()=>{this.requestUpdate()},this.renderLabel=()=>{var t;const e=(t=this._select)==null?void 0:t.selectStore;return e&&e.selectedValue!==void 0&&e.selectedValue!==""?e.selectedText||e.selectedValue:this.placeholder}}get _select(){let e=this.parentElement;for(;e&&!(e instanceof ur);)e=e.parentElement;return e}connectedCallback(){super.connectedCallback(),this._select.selectStore.subscribe(this.onStoreChange),document.addEventListener("clicked-select-item",()=>{this.requestUpdate()})}disconnectedCallback(){this._select.selectStore.unsubscribe(this.onStoreChange)}createRenderRoot(){return this}render(){return l`
|
|
2191
2191
|
<span part="select-value" class=${u(re.value,this.className)}>
|
|
2192
2192
|
${this.renderLabel()}
|
|
2193
2193
|
</span>
|
|
2194
|
-
`}};hh([a({type:String})],
|
|
2194
|
+
`}};hh([a({type:String})],ua.prototype,"placeholder",2);ua=hh([p("pont-select-value")],ua);const hw="pont-bg-skeleton-color-bg pont-animate-skeleton-animate pont-rounded-skeleton-radius";var uw=Object.getOwnPropertyDescriptor,mw=(e,t,r,n)=>{for(var o=n>1?void 0:n?uw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let cc=class extends y{createRenderRoot(){return this}render(){return l` <div class=${u(hw,this.className)}></div> `}};cc=mw([p("pont-skeleton")],cc);var gw=Object.defineProperty,fw=Object.getOwnPropertyDescriptor,uh=(e,t,r,n)=>{for(var o=n>1?void 0:n?fw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gw(t,r,o),o};let ma=class extends f{constructor(){super(...arguments),this.variant="circle"}createRenderRoot(){return this}render(){return this.variant==="basic"?l`
|
|
2195
2195
|
<svg
|
|
2196
2196
|
data-slot="spinner"
|
|
2197
2197
|
data-variant="basic"
|
|
@@ -2258,7 +2258,7 @@
|
|
|
2258
2258
|
>
|
|
2259
2259
|
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
2260
2260
|
</svg>
|
|
2261
|
-
`}};uh([a({type:String})],
|
|
2261
|
+
`}};uh([a({type:String})],ma.prototype,"variant",2);ma=uh([p("pont-spinner")],ma);const pc={root:["pont-inline-flex","pont-shrink-0 pont-items-center","pont-w-switch-space-w pont-h-switch-space-h","pont-rounded-switch-radius pont-border-switch-width-border pont-border-switch-color-border pont-outline-none","pont-transition-all","focus-visible:pont-border-switch-color-border-focus focus-visible:pont-ring-switch-width-ring-focus focus-visible:pont-ring-switch-color-ring-focus",'data-[state="checked"]:pont-bg-switch-color-bg-checked data-[state="unchecked"]:pont-bg-switch-color-bg-unchecked','data-[disabled="true"]:pont-opacity-switch-opacity-disabled data-[disabled="true"]:pont-cursor-not-allowed'],thumb:["pont-pointer-events-none","pont-block","pont-size-switch-thumb-space-size","pont-rounded-switch-thumb-radius","pont-ring-0","pont-transition-transform",'data-[state="checked"]:pont-bg-switch-thumb-color-bg-checked data-[state="unchecked"]:pont-bg-switch-thumb-color-bg-unchecked','data-[state="checked"]:pont-translate-x-[calc(100%-2px)] data-[state="unchecked"]:pont-translate-x-0']};var vw=Object.defineProperty,bw=Object.getOwnPropertyDescriptor,al=(e,t,r,n)=>{for(var o=n>1?void 0:n?bw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&vw(t,r,o),o};let vi=class extends f{constructor(){super(...arguments),this.disabled="false",this.state="unchecked"}_toggleChecked(){this.disabled==="false"&&(this.state=this.state==="checked"?"unchecked":"checked",this.dispatchEvent(new CustomEvent("change",{detail:this.state})))}createRenderRoot(){return this.classList="pont-w-switch-space-w pont-h-switch-space-h",this}render(){return l`
|
|
2262
2262
|
<div
|
|
2263
2263
|
part="switch"
|
|
2264
2264
|
role="switch"
|
|
@@ -2274,7 +2274,7 @@
|
|
|
2274
2274
|
class=${u(pc.thumb)}
|
|
2275
2275
|
></div>
|
|
2276
2276
|
</div>
|
|
2277
|
-
`}};
|
|
2277
|
+
`}};al([a({attribute:"data-disabled",type:String})],vi.prototype,"disabled",2);al([a({attribute:"data-state",type:String})],vi.prototype,"state",2);vi=al([p("pont-switch")],vi);const Pt={preview:["pont-flex pont-bg-table-preview-color-bg pont-w-table-preview-space-w pont-items-center pont-justify-center pont-px-table-preview-space-px pont-py-table-preview-space-py"],container:["pont-relative pont-w-table-container-space-w pont-overflow-auto"],table:["pont-w-table-space-w pont-caption-bottom pont-text-table-font"],caption:["pont-mt-table-caption-space-mt pont-text-table-caption-font pont-text-table-caption-color-text"],head:{root:["[&_tr]:pont-border-table-head-color-border [&_tr]:pont-border-b-table-head-width-border"],row:["pont-border-b-table-head-width-border pont-border-table-head-color-border pont-transition-colors hover:pont-bg-table-head-row-color-bg-hover"],cell:{base:["pont-h-table-head-cell-space-h pont-px-table-head-cell-space-px pont-align-middle pont-font-table-head-cell-font-weight pont-text-table-head-cell-color-text"],align:{left:"pont-text-left",right:"pont-text-right"}}},body:{root:["[&_tr:last-child]:pont-border-0"],row:["pont-border-b-table-body-width-border pont-border-table-body-color-border pont-transition-colors hover:pont-bg-table-body-row-color-bg-hover"],cell:{base:["pont-px-table-body-cell-space-px pont-py-table-body-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}},footer:{root:["pont-border-t-table-footer-width-border pont-border-table-footer-color-border pont-bg-table-footer-color-bg pont-font-table-footer-font-weight [&>tr]:pont-last:border-b-0"],row:["pont-border-b-table-footer-width-border pont-border-table-footer-color-border pont-transition-colors hover:pont-bg-table-footer-row-color-bg-hover"],cell:{base:["pont-px-table-footer-cell-space-px pont-py-table-footer-cell-space-py pont-align-middle"],align:{right:"pont-text-right"}}}};var yw=Object.defineProperty,_w=Object.getOwnPropertyDescriptor,Ti=(e,t,r,n)=>{for(var o=n>1?void 0:n?_w(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&yw(t,r,o),o};let mn=class extends y{constructor(){super(...arguments),this.dataTable=[],this.footerData=[],this.captionText=""}get _containerElement(){return this.querySelector("table[part=table]")}getAttributesToExclude(){return["data-testid"]}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}get columnKeys(){var t;const e=(t=this.dataTable)==null?void 0:t[0];return e?Object.keys(e).filter(r=>r!=="id"):[]}capitalizeLabel(e){return e.charAt(0).toUpperCase()+e.slice(1)}render(){const e=this.columnKeys;return l`
|
|
2278
2278
|
<div class=${u(Pt.preview)}>
|
|
2279
2279
|
<div class=${u(Pt.container)}>
|
|
2280
2280
|
<table part="table" class=${u(Pt.table)}>
|
|
@@ -2335,14 +2335,14 @@
|
|
|
2335
2335
|
data-orientation=${this.orientation}
|
|
2336
2336
|
dir=${this.dir}
|
|
2337
2337
|
></div>
|
|
2338
|
-
`}};vr([a({attribute:"default-value",type:String})],Ke.prototype,"defaultValue",2);vr([a({type:String})],Ke.prototype,"value",2);vr([a({attribute:!1})],Ke.prototype,"onValueChange",2);vr([a({type:String})],Ke.prototype,"orientation",2);vr([a({type:String})],Ke.prototype,"dir",2);vr([a({attribute:"activation-mode",type:String})],Ke.prototype,"activationMode",2);vr([g()],Ke.prototype,"_activeValue",2);Ke=vr([p("pont-tabs")],Ke);var Ew=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,mh=(e,t,r,n)=>{for(var o=n>1?void 0:n?xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ew(t,r,o),o};let
|
|
2338
|
+
`}};vr([a({attribute:"default-value",type:String})],Ke.prototype,"defaultValue",2);vr([a({type:String})],Ke.prototype,"value",2);vr([a({attribute:!1})],Ke.prototype,"onValueChange",2);vr([a({type:String})],Ke.prototype,"orientation",2);vr([a({type:String})],Ke.prototype,"dir",2);vr([a({attribute:"activation-mode",type:String})],Ke.prototype,"activationMode",2);vr([g()],Ke.prototype,"_activeValue",2);Ke=vr([p("pont-tabs")],Ke);var Ew=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,mh=(e,t,r,n)=>{for(var o=n>1?void 0:n?xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ew(t,r,o),o};let ga=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return l`
|
|
2339
2339
|
<div
|
|
2340
2340
|
data-slot="tabs-list"
|
|
2341
2341
|
data-variant=${this.variant}
|
|
2342
2342
|
role="tablist"
|
|
2343
2343
|
tabindex="0"
|
|
2344
2344
|
></div>
|
|
2345
|
-
`}};mh([a({type:String})],
|
|
2345
|
+
`}};mh([a({type:String})],ga.prototype,"variant",2);ga=mh([p("pont-tabs-list")],ga);var Ow=Object.defineProperty,Rw=Object.getOwnPropertyDescriptor,ll=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ow(t,r,o),o};let bi=class extends f{constructor(){super(...arguments),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("pont-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return l`
|
|
2346
2346
|
<button
|
|
2347
2347
|
data-slot="tabs-trigger"
|
|
2348
2348
|
?data-disabled=${this.disabled}
|
|
@@ -2352,14 +2352,14 @@
|
|
|
2352
2352
|
@click=${this._onClick}
|
|
2353
2353
|
@keydown=${this._onKeyDown}
|
|
2354
2354
|
></button>
|
|
2355
|
-
`}};
|
|
2355
|
+
`}};ll([a({type:String})],bi.prototype,"value",2);ll([a({type:Boolean})],bi.prototype,"disabled",2);bi=ll([p("pont-tabs-trigger")],bi);var Iw=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,gh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Aw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Iw(t,r,o),o};let fa=class extends f{constructor(){super(...arguments),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return l`
|
|
2356
2356
|
<div
|
|
2357
2357
|
data-slot="tabs-content"
|
|
2358
2358
|
role="tabpanel"
|
|
2359
2359
|
tabindex="0"
|
|
2360
2360
|
hidden
|
|
2361
2361
|
></div>
|
|
2362
|
-
`}};gh([a({type:String})],
|
|
2362
|
+
`}};gh([a({type:String})],fa.prototype,"value",2);fa=gh([p("pont-tabs-content")],fa);const xn={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var Tw=Object.defineProperty,Dw=Object.getOwnPropertyDescriptor,dl=(e,t,r,n)=>{for(var o=n>1?void 0:n?Dw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Tw(t,r,o),o};const hc="closed";let qr=class extends y{constructor(){super(...arguments),this.variant="default",this.state=hc}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` <ol
|
|
2363
2363
|
part="toast-view-port"
|
|
2364
2364
|
tabindex="-1"
|
|
2365
2365
|
@click="${e=>e.stopPropagation()}"
|
|
@@ -2377,7 +2377,7 @@
|
|
|
2377
2377
|
data-radix-collection-item=""
|
|
2378
2378
|
style="user-select: none; touch-action: none;"
|
|
2379
2379
|
></li>
|
|
2380
|
-
</ol>`}};qr.toastVariants=xn.viewportItem;
|
|
2380
|
+
</ol>`}};qr.toastVariants=xn.viewportItem;dl([a({type:String})],qr.prototype,"variant",2);dl([a({attribute:"data-state",type:String})],qr.prototype,"state",2);qr=dl([p("pont-toast-view-port")],qr);var Lw=Object.defineProperty,Fw=Object.getOwnPropertyDescriptor,fh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lw(t,r,o),o};let Co=class extends y{constructor(){super(...arguments),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){const e=this.getAttributesToExclude(),t={};for(const r of this.attributes)e.includes(r.name)||(t[r.name]=r.value);return t}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
|
|
2381
2381
|
<button
|
|
2382
2382
|
${xt(e)}
|
|
2383
2383
|
part="toast-action"
|
|
@@ -2402,7 +2402,7 @@
|
|
|
2402
2402
|
part="toast-trigger"
|
|
2403
2403
|
class="${u(this.className)}"
|
|
2404
2404
|
></div>
|
|
2405
|
-
`}};gc=jw([p("pont-toast-trigger")],gc);var qw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,vh=(e,t,r,n)=>{for(var o=n>1?void 0:n?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qw(t,r,o),o};let yi=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${u("",this.className)}" part="toast"></div> `}};vh([g()],yi.prototype,"isOpen",2);yi=vh([p("pont-toast")],yi);var _i=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(_i||{}),wi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(wi||{}),$i=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))($i||{});const Vw=
|
|
2405
|
+
`}};gc=jw([p("pont-toast-trigger")],gc);var qw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,vh=(e,t,r,n)=>{for(var o=n>1?void 0:n?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qw(t,r,o),o};let yi=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${u("",this.className)}" part="toast"></div> `}};vh([g()],yi.prototype,"isOpen",2);yi=vh([p("pont-toast")],yi);var _i=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(_i||{}),wi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(wi||{}),$i=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))($i||{});const Vw=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),Hw="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var Gw=Object.defineProperty,Kw=Object.getOwnPropertyDescriptor,Wr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Gw(t,r,o),o};let Se=class extends y{constructor(){super(),this.checked=!1,this.id=Ia(),this.variant=wi.DEFAULT,this.size=$i.SMALL,this.disabled=!1,this.type=_i.SINGLE,this.variant=wi.DEFAULT,this.size=$i.SMALL}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof We);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}syncFromParent(){const e=this._parent;if(!e)return;this.variant!==e.variant&&(this.variant=e.variant),this.size!==e.size&&(this.size=e.size);const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t),this.type!==e.type&&(this.type=e.type)}syncSelection(){const e=this._parent;if(!e)return;const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t)}toggleSelection(e){if(this.disabled||!this._parent)return;const t=this._parent,r=t.selectedItems.indexOf(e);this.type===_i.SINGLE?(r!==-1?t.selectedItems.splice(r,1):t.selectedItems[0]=e,this._siblings.forEach(n=>n.syncSelection())):r!==-1?t.selectedItems.splice(r,1):t.selectedItems.push(e),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),l`
|
|
2406
2406
|
<button
|
|
2407
2407
|
part="toggle-group-item"
|
|
2408
2408
|
id=${this.id}
|
|
@@ -2421,7 +2421,7 @@
|
|
|
2421
2421
|
class="${u(Hw,this.className)}"
|
|
2422
2422
|
?disable="${this.disabled}"
|
|
2423
2423
|
></div>
|
|
2424
|
-
`}};Yr([a({type:Boolean})],We.prototype,"disabled",2);Yr([a({type:String})],We.prototype,"type",2);Yr([a({attribute:!0,type:Boolean,reflect:!0})],We.prototype,"required",2);Yr([a()],We.prototype,"variant",2);Yr([a()],We.prototype,"size",2);Yr([a({type:Array})],We.prototype,"selectedItems",2);We=Yr([p("pont-toggle-group")],We);var Hn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Hn||{}),Gn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Gn||{});const Qw=
|
|
2424
|
+
`}};Yr([a({type:Boolean})],We.prototype,"disabled",2);Yr([a({type:String})],We.prototype,"type",2);Yr([a({attribute:!0,type:Boolean,reflect:!0})],We.prototype,"required",2);Yr([a()],We.prototype,"variant",2);Yr([a()],We.prototype,"size",2);Yr([a({type:Array})],We.prototype,"selectedItems",2);We=Yr([p("pont-toggle-group")],We);var Hn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Hn||{}),Gn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Gn||{});const Qw=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-radius pont-text-toggle-font pont-font-toggle-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-width-ring-focus focus-visible:pont-ring-toggle-color-ring-focus focus-visible:pont-ring-offset-toggle-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-opacity-disabled data-[state=on]:pont-bg-toggle-color-bg-on data-[state=on]:pont-text-toggle-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-default-color-bg-hover hover:pont-text-toggle-default-color-text-hover",outline:"pont-border pont-border-toggle-outline-color-border hover:pont-bg-toggle-outline-color-bg-hover hover:pont-text-toggle-outline-color-text-hover"},size:{sm:"pont-h-toggle-space-h-sm pont-px-toggle-space-px-sm",md:"pont-h-toggle-space-h-md pont-px-toggle-space-px-md",lg:"pont-h-toggle-space-h-lg pont-px-toggle-space-px-lg"}}});var Zw=Object.defineProperty,Jw=Object.getOwnPropertyDescriptor,Bo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zw(t,r,o),o};let Ye=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=Gn.DEFAULT,this.size=Hn.SMALL}willUpdate(e){e.has("variant")&&(this.variant=this.normalizeEnum(this.variant,Gn,Gn.DEFAULT)),e.has("size")&&(this.size=this.normalizeEnum(this.size,Hn,Hn.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
|
|
2425
2425
|
<button
|
|
2426
2426
|
type="button"
|
|
2427
2427
|
part="toggle"
|
|
@@ -2434,13 +2434,13 @@
|
|
|
2434
2434
|
?disabled=${this.disabled}
|
|
2435
2435
|
${xt(e)}
|
|
2436
2436
|
></button>
|
|
2437
|
-
`}};Ye.toggleVariants=Qw;Bo([a({type:Boolean})],Ye.prototype,"disabled",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"checked",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"required",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"variant",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"size",2);Ye=Bo([p("pont-toggle")],Ye);var Xw=Object.getOwnPropertyDescriptor,t$=(e,t,r,n)=>{for(var o=n>1?void 0:n?Xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let fc=class extends f{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};fc=t$([p("pont-typography-blockquote")],fc);var e$=Object.getOwnPropertyDescriptor,r$=(e,t,r,n)=>{for(var o=n>1?void 0:n?e$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let vc=class extends f{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};vc=r$([p("pont-typography-code")],vc);var o$=Object.defineProperty,n$=Object.getOwnPropertyDescriptor,bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?n$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o$(t,r,o),o};let
|
|
2437
|
+
`}};Ye.toggleVariants=Qw;Bo([a({type:Boolean})],Ye.prototype,"disabled",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"checked",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"required",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"variant",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"size",2);Ye=Bo([p("pont-toggle")],Ye);var Xw=Object.getOwnPropertyDescriptor,t$=(e,t,r,n)=>{for(var o=n>1?void 0:n?Xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let fc=class extends f{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};fc=t$([p("pont-typography-blockquote")],fc);var e$=Object.getOwnPropertyDescriptor,r$=(e,t,r,n)=>{for(var o=n>1?void 0:n?e$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let vc=class extends f{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};vc=r$([p("pont-typography-code")],vc);var o$=Object.defineProperty,n$=Object.getOwnPropertyDescriptor,bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?n$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o$(t,r,o),o};let va=class extends f{constructor(){super(...arguments),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){const e=this._hSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.level==="h2"?l`
|
|
2438
2438
|
<h2 data-slot="typography-h" data-level="${this.level}"></h2>
|
|
2439
2439
|
`:this.level==="h3"?l`
|
|
2440
2440
|
<h3 data-slot="typography-h" data-level="${this.level}"></h3>
|
|
2441
2441
|
`:this.level==="h4"?l`
|
|
2442
2442
|
<h4 data-slot="typography-h" data-level="${this.level}"></h4>
|
|
2443
|
-
`:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};bh([a({type:String})],
|
|
2443
|
+
`:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};bh([a({type:String})],va.prototype,"level",2);va=bh([p("pont-typography-h")],va);var i$=Object.getOwnPropertyDescriptor,s$=(e,t,r,n)=>{for(var o=n>1?void 0:n?i$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let bc=class extends f{createRenderRoot(){return this}get _largeSlot(){return this.querySelector('[data-slot="typography-large"]')}firstUpdated(){const e=this._largeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="typography-large"></div>`}};bc=s$([p("pont-typography-large")],bc);var a$=Object.getOwnPropertyDescriptor,l$=(e,t,r,n)=>{for(var o=n>1?void 0:n?a$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let yc=class extends f{createRenderRoot(){return this}get _leadSlot(){return this.querySelector('[data-slot="typography-lead"]')}firstUpdated(){const e=this._leadSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-lead"></p>`}};yc=l$([p("pont-typography-lead")],yc);var d$=Object.getOwnPropertyDescriptor,c$=(e,t,r,n)=>{for(var o=n>1?void 0:n?d$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let _c=class extends f{createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="typography-list"]')}firstUpdated(){const e=this._listSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<ul data-slot="typography-list"></ul>`}};_c=c$([p("pont-typography-list")],_c);var p$=Object.getOwnPropertyDescriptor,h$=(e,t,r,n)=>{for(var o=n>1?void 0:n?p$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let wc=class extends f{createRenderRoot(){return this}get _mutedSlot(){return this.querySelector('[data-slot="typography-muted"]')}firstUpdated(){const e=this._mutedSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-muted"></p>`}};wc=h$([p("pont-typography-muted")],wc);var u$=Object.getOwnPropertyDescriptor,m$=(e,t,r,n)=>{for(var o=n>1?void 0:n?u$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let $c=class extends f{createRenderRoot(){return this}get _pSlot(){return this.querySelector('[data-slot="typography-p"]')}firstUpdated(){const e=this._pSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-p"></p>`}};$c=m$([p("pont-typography-p")],$c);var g$=Object.getOwnPropertyDescriptor,f$=(e,t,r,n)=>{for(var o=n>1?void 0:n?g$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Pc=class extends f{createRenderRoot(){return this}get _smallSlot(){return this.querySelector('[data-slot="typography-small"]')}firstUpdated(){const e=this._smallSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<small data-slot="typography-small"></small>`}};Pc=f$([p("pont-typography-small")],Pc);var v$=Object.getOwnPropertyDescriptor,b$=(e,t,r,n)=>{for(var o=n>1?void 0:n?v$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Cc=class extends f{createRenderRoot(){return this}};Cc=b$([p("pont-typography-table")],Cc);var y$=Object.defineProperty,_$=Object.getOwnPropertyDescriptor,bt=(e,t,r,n)=>{for(var o=n>1?void 0:n?_$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&y$(t,r,o),o};let dt=class extends y{constructor(){super(...arguments),this.placeholder="Filter emails...",this.dataTable=[],this.hasDefaultSelect=!0,this.hasDefaultPagination=!0,this.hasDefaultSearch=!0,this.checkedRows={},this.searchTerm="",this.columnVisibility={},this.sortColumn=null,this.sortDirection="asc",this.cellRenderers={},this.rowActions=[],this.paginationLabels=["Previous","Next"],this.pageSize=5,this.currentPage=1,this.sortableColumns=["email"],this.columnOrder=[]}get _chevronDownIcon(){return l`
|
|
2444
2444
|
<svg
|
|
2445
2445
|
xmlns="http://www.w3.org/2000/svg"
|
|
2446
2446
|
width="24"
|
|
@@ -2625,8 +2625,8 @@
|
|
|
2625
2625
|
</div>
|
|
2626
2626
|
${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
|
|
2627
2627
|
</div>
|
|
2628
|
-
`}};bt([a({type:String})],dt.prototype,"placeholder",2);bt([a({type:Array})],dt.prototype,"dataTable",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);bt([a({type:Object})],dt.prototype,"checkedRows",2);bt([a({type:String})],dt.prototype,"searchTerm",2);bt([a({type:Object})],dt.prototype,"columnVisibility",2);bt([a({type:String})],dt.prototype,"sortColumn",2);bt([a({type:String})],dt.prototype,"sortDirection",2);bt([a({type:Object})],dt.prototype,"cellRenderers",2);bt([a({type:Object})],dt.prototype,"headerRenderers",2);bt([a({type:Array})],dt.prototype,"rowActions",2);bt([a({type:Array})],dt.prototype,"paginationLabels",2);bt([a({type:Number})],dt.prototype,"pageSize",2);bt([a({type:Number})],dt.prototype,"currentPage",2);bt([a({type:Array})],dt.prototype,"sortableColumns",2);bt([a({type:Array})],dt.prototype,"columnOrder",2);bt([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=bt([p("pont-data-table")],dt);var X=class extends Error{constructor(t,r,n,o){super(r);I(this,"code");I(this,"details");I(this,"status");this.name="LoginflowError",this.code=t,this.details=n,this.status=o}};function yh(e){const t=(e??"").trim();if(!t)throw new X("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new X("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Sc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${$$(w$(t))?"http":"https"}://`;try{return Sc(new URL(`${r}${t}`))}catch{throw new X("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Sc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function w$(e){return e.split("/")[0]}function $$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var fe,P$=(fe=class{constructor(){I(this,"data",new Map)}static get Instance(){return fe.instance||(fe.instance=new fe),fe.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return yh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},I(fe,"instance"),fe),it=P$.Instance,ve,Pi=(ve=class{constructor(){}static get Instance(){return ve.instance||(ve.instance=new ve),ve.instance}async request(t,r={}){const n=it.getConfig(),o=`${it.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(o,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...n.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new X(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof X?c:c instanceof Error?c.name==="AbortError"?new X("TIMEOUT","Request timeout"):new X("NETWORK_ERROR",c.message):new X("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},I(ve,"instance"),ve),_h="__Secure-pontive_session_state",es="__Secure-pontive_session_probe";function C$(){return wh(_h)?"present":S$()?"absent":"unknown"}function va(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...O$(location.hostname)])ba(_h,"",e,0)}function S$(){if(typeof document>"u"||typeof location>"u")return!1;const e=x$();try{ba(es,"1",e,60);const t=wh(es)==="1";return ba(es,"",e,0),t&&E$(e)}catch{return!1}}function E$(e){return e!==""||it.apiIsSameOrigin()}function x$(){let e;try{e=new URL(it.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),n=e.split(".");let o=0;for(;o<r.length&&o<n.length&&r[r.length-1-o].toLowerCase()===n[n.length-1-o].toLowerCase();)o+=1;return o<2?"":n.slice(n.length-o).join(".")}function O$(e){const t=e.split("."),r=[];for(let n=1;n+2<=t.length;n+=1)r.push(t.slice(n).join("."));return r}function ba(e,t,r,n){const o=R$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${n}; SameSite=Lax${i}${o}`}function R$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function wh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var St,zt=(St=class{constructor(){I(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");I(this,"memorySession",null);I(this,"refreshTimeoutId",null);I(this,"refreshPromise",null);I(this,"refreshRetryCount",0);I(this,"refreshBlockedUntil",0);I(this,"sessionGeneration",0);I(this,"channel",null);I(this,"channelName","");I(this,"applyingBroadcast",!1);I(this,"restorePromise",null)}static get Instance(){return St.instance||(St.instance=new St),St.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=it.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=n=>this.receive(n.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const n=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(n).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=r+o*1e3*.2;return n<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=n-r-o*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async refreshTokens(t){const r=this.sessionGeneration;try{const n=await this.requestTokens(t);return this.isCurrentGeneration(r)?n:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(n){return this.isCurrentGeneration(r)?I$(n)?(console.error("Token refresh rejected, signing out:",Yo(n)),va(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Yo(n)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Yo(n)),null)}}async fetchUserInfo(t){try{return await Pi.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Yo(r)),null}}async requestTokens(t){var o;const r={grant_type:"refresh_token",client_id:(o=it.getConfig())==null?void 0:o.appId};t!=null&&t.refresh_token&&(r.refresh_token=t.refresh_token);const n=await Pi.Instance.postForm("/oauth2/token",r);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:C$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const n=await this.requestTokens(null);return n.id_token||(n.user=await this.fetchUserInfo(n.access_token)??void 0),this.setCurrentSession(n),this.scheduleTokenRefresh(),n}catch(n){return T$(n)&&va(),console.debug("No session to restore:",Yo(n)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=St.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(St.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,St.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},I(St,"MAX_REFRESH_RETRIES",5),I(St,"REFRESH_RETRY_BASE_MS",5e3),I(St,"MAX_REFRESH_RETRY_DELAY_MS",6e4),I(St,"instance"),St);function I$(e){return!(e instanceof X)||e.status===void 0?!1:e.status===401?!0:e.status===400&&A$.has(e.code)}var A$=new Set(["invalid_grant","invalid_client"]);function T$(e){return e instanceof X&&e.status!==void 0&&e.status>=400&&e.status<500}function Yo(e){return e instanceof X?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var $h=class{constructor(e=sessionStorage){I(this,"storage");I(this,"FLOW_STATE_KEY","pontive_loginflow_state");I(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const n=Date.now(),o=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(o==null?void 0:o.startedAt)||n,lastUpdatedAt:n,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},Ci=class{static detect(e,t=window.location){const r=t.pathname.toLowerCase();return r.includes(e.signinUrl)?"signin":r.includes(e.signupUrl)?"signup":"custom"}},Ph=class{constructor(){I(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(n=>{try{n(t)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${e}:`,o)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},D$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},L$=class Ch{constructor(t,r,n=window.location,o,i){I(this,"httpClient",Pi.Instance);I(this,"flowId");I(this,"redirectTimeoutId",null);I(this,"flowStateManager");I(this,"flowEventBus");I(this,"location");I(this,"navigationTypeDetector");I(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]));const s=it.getConfig();if(!s.domain)throw new X("CONFIG_ERROR","Domain is required");if(!s.appId)throw new X("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=n,this.flowStateManager=o||new $h,this.flowEventBus=r||new Ph,this.navigationTypeDetector=i||new D$,zt.Instance.cleanExpiredSession(),zt.Instance.scheduleTokenRefresh()}static async init(t,r,n,o,i){const s=new Ch(t,r,n,o,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new X("VALIDATION_ERROR","Client ID is required");const n=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(n,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t){const r=`/auth/v1/authflows/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new X("VALIDATION_ERROR","Event type is required");const n=this.eventHandlers.get(t.event);return n?await n():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,n,o){try{const i=await t();return o&&await o(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof X?i:new X(r,n,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let n=this.flowStateManager.getFlowState();if(!n&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),n=this.flowStateManager.getFlowState(),!n))throw new X("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=n.state,i=`/auth/v1/authflows/${n.flowType}/events`,s=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!s.auth_result){this.flowStateManager.saveFlowState(n.flowType,n.flow_id,s);const d=this.flowStateManager.getFlowState();if(d){const c=o!==s.state;this.flowEventBus.emit("flow:updated",{flowState:d,isNewStep:c})}}return s}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};zt.Instance.setCurrentSession(r),zt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:n}=it.getConfig();if(n){n(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=it.getConfig(),r=Ci.detect(t,this.location);this.validateFlowType(r);const n=this.flowStateManager.getFlowState();return this.shouldResumeFlow(n,r)?await this.resumeExistingFlow(n,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=o?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const n=await this.resumeFlow(r);if(!n.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,n);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}}catch(n){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",n),await this.startNewFlow(r)}}async startNewFlow(t){const r=it.getConfig(),n=new URLSearchParams(this.location.search),o={};n.forEach((c,m)=>{o[m]=c}),console.log("metadata",o);const i=n.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:o},d=await this.startFlow(t,s);if(!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}async handleSwitchToSignin(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},F$=class{constructor(e){I(this,"delayMs");I(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},k$=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},N$=class{constructor(e,t,r=!1,n=window.location,o,i){I(this,"popstateListener",null);I(this,"pageshowListener",null);I(this,"debouncer");I(this,"isProcessing",!1);I(this,"isHandlingNavigationEvent",!1);I(this,"onFlowRestartNeeded",null);I(this,"skipHistoryTracking");I(this,"flowStateManager");I(this,"historyAdapter");I(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new F$(200),this.location=n,this.flowStateManager=o||new $h,this.historyAdapter=i||new k$,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),n=it.getConfig(),o=Ci.detect(n,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=it.getConfig(),n=Ci.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(n){console.error("[NavigationManager] Failed to update history:",n)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Cr=new AbortController,M$=class{constructor(){I(this,"httpClient",Pi.Instance);I(this,"capabilities",{webauthn:!1});I(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;n.mediation="conditional"}try{const o=await navigator.credentials.create(n);if(!o){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=o;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){rs("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){rs("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){rs("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;n.mediation="conditional",n.publicKey&&(n.publicKey.allowCredentials=[])}try{const o=await navigator.credentials.get(n);return this.toPublicKeyCredentialJSON(o)}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=t.padEnd(t.length+r,"="),o=atob(n),i=new ArrayBuffer(o.length),s=new Uint8Array(i);for(let d=0;d<o.length;d++)s[d]=o.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(n=>({alg:n.alg,type:n.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const n={};e.authenticatorSelection.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(n.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(n.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(n.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=n}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Sr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Sr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(B$(n)){if(r.rpId!==n)return new Sr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Sr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Cr.abort()}};function rs(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2629
|
-
`,t)}var Sr=class extends Error{constructor({message:t,code:r,cause:n,name:o}){super(t);I(this,"code");this.name=o??n.name,this.code=r}};function B$(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var be,U$=(be=class{constructor(){I(this,"configured",!1);I(this,"configuredResolve");I(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));I(this,"loginflow",null);I(this,"navigationManager",null);I(this,"flowEventBus",null);I(this,"webauthnService",null)}static get Instance(){return be.instance||(be.instance=new be),be.instance}ensureConfigured(){if(!this.configured)throw new X("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new X("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new M$,this.webauthnService.detectCapabilities(),this.flowEventBus=new Ph,this.navigationManager=new N$(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const n=await L$.init(t,this.flowEventBus),o=it.getConfig();this.startPasskeyAuthentication(n.flowType,!0),this.loginflow=n.sdk;const i={flowType:n.flowType,isResumed:n.isResumed,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:n.isResumed?"flow_resumed":"flow_started",flowType:n.flowType,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result,isResumed:n.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new X("CONFIG_ERROR","domain and appId are required");it.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),zt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),zt.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),zt.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),zt.Instance.getAuthenticatedUser()}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=it.getConfig(),n=Ci.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(n,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(n,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const o=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(n,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",o.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result})}return o}async getPasskeyCredential(t,r){var o,i;const n=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialRequestOptions(t,r));if(!n)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(n,r)),options:n}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const n=await this.getPasskeyCredential(t,r);if(!n||!n.cred){console.error("no credential found");return}const{cred:o,options:i}=n;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:o}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&o.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,o.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var n,o;try{const i=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(o=this.webauthnService)==null?void 0:o.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const n=await this.createPasskeyCredential(t,r),o=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:n,conditional:r}});return console.log("passkey creation res",o),o}catch(n){console.log("error",n)}}invalidateSession(){zt.Instance.clearSession()}async signOut(t){var o,i;this.ensureConfigured();const r=(o=zt.Instance.peekSession())==null?void 0:o.id_token,n=((i=it.getConfig())==null?void 0:i.appId)??"";if(va(),zt.Instance.clearSession(),zt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!it.apiIsSameOrigin()){window.location.assign(this.endSessionUrl(r,n,t==null?void 0:t.returnTo));return}await this.endServerSession(r,n),window.location.reload()}async endServerSession(t,r){try{await fetch(`${it.getApiBaseUrl()}/oauth2/end_session`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{id_token_hint:t}:{}}).toString()})}catch(n){console.warn("Could not end the session at the authorization server:",n)}}endSessionUrl(t,r,n){const o=new URLSearchParams({post_logout_redirect_uri:n??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&o.set("id_token_hint",t),`${it.getApiBaseUrl()}/oauth2/end_session?${o.toString()}`}},I(be,"instance"),be),tt=U$.Instance,j$=Object.defineProperty,q$=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&j$(t,r,o),o};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var o,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(o=this.shadowRoot)==null?void 0:o.querySelector(r))==null||i.classList.add(n))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(n=>{const o=this.getAttribute(n);o!==null&&(t.setAttribute(n,o),this.removeAttribute(n))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let n;r!=null&&r.length?(n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t)),n.forEach(o=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)})):n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t)),n.forEach(o=>t.appendChild(o))}}q$([a({type:Boolean})],jt.prototype,"shadow");const Qr="pont:auth",Uo={showWatermark:!0},On="pont:branding";class z${constructor(t){this.consumer=new si(t,{context:On,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Uo.showWatermark}}const Sh="pont:design-mode";class Rn{constructor(t){this.host=t,this.consumer=new si(t,{context:Sh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Eh="pont:env",dl=Symbol("renderSpecContext"),In="pont-user-context",cl="";var V$=Object.defineProperty,H$=Object.getOwnPropertyDescriptor,An=(e,t,r,n)=>{for(var o=n>1?void 0:n?H$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&V$(t,r,o),o};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Uo,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(n=>{n.localName.includes("-")&&!customElements.get(n.localName)?exports.PontKitLayout.reportUnregistered(n.localName):customElements.upgrade(n)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
|
|
2628
|
+
`}};bt([a({type:String})],dt.prototype,"placeholder",2);bt([a({type:Array})],dt.prototype,"dataTable",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);bt([a({type:Object})],dt.prototype,"checkedRows",2);bt([a({type:String})],dt.prototype,"searchTerm",2);bt([a({type:Object})],dt.prototype,"columnVisibility",2);bt([a({type:String})],dt.prototype,"sortColumn",2);bt([a({type:String})],dt.prototype,"sortDirection",2);bt([a({type:Object})],dt.prototype,"cellRenderers",2);bt([a({type:Object})],dt.prototype,"headerRenderers",2);bt([a({type:Array})],dt.prototype,"rowActions",2);bt([a({type:Array})],dt.prototype,"paginationLabels",2);bt([a({type:Number})],dt.prototype,"pageSize",2);bt([a({type:Number})],dt.prototype,"currentPage",2);bt([a({type:Array})],dt.prototype,"sortableColumns",2);bt([a({type:Array})],dt.prototype,"columnOrder",2);bt([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=bt([p("pont-data-table")],dt);var X=class extends Error{constructor(t,r,n,o){super(r);I(this,"code");I(this,"details");I(this,"status");this.name="LoginflowError",this.code=t,this.details=n,this.status=o}};function yh(e){const t=(e??"").trim();if(!t)throw new X("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new X("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Sc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${$$(w$(t))?"http":"https"}://`;try{return Sc(new URL(`${r}${t}`))}catch{throw new X("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Sc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function w$(e){return e.split("/")[0]}function $$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var fe,P$=(fe=class{constructor(){I(this,"data",new Map)}static get Instance(){return fe.instance||(fe.instance=new fe),fe.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return yh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},I(fe,"instance"),fe),it=P$.Instance,ve,Pi=(ve=class{constructor(){}static get Instance(){return ve.instance||(ve.instance=new ve),ve.instance}async request(t,r={}){const n=it.getConfig(),o=`${it.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(o,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...n.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new X(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof X?c:c instanceof Error?c.name==="AbortError"?new X("TIMEOUT","Request timeout"):new X("NETWORK_ERROR",c.message):new X("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},I(ve,"instance"),ve),_h="__Secure-pontive_session_state",rs="__Secure-pontive_session_probe";function C$(){return wh(_h)?"present":S$()?"absent":"unknown"}function ba(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...O$(location.hostname)])ya(_h,"",e,0)}function S$(){if(typeof document>"u"||typeof location>"u")return!1;const e=x$();try{ya(rs,"1",e,60);const t=wh(rs)==="1";return ya(rs,"",e,0),t&&E$(e)}catch{return!1}}function E$(e){return e!==""||it.apiIsSameOrigin()}function x$(){let e;try{e=new URL(it.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),n=e.split(".");let o=0;for(;o<r.length&&o<n.length&&r[r.length-1-o].toLowerCase()===n[n.length-1-o].toLowerCase();)o+=1;return o<2?"":n.slice(n.length-o).join(".")}function O$(e){const t=e.split("."),r=[];for(let n=1;n+2<=t.length;n+=1)r.push(t.slice(n).join("."));return r}function ya(e,t,r,n){const o=R$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${n}; SameSite=Lax${i}${o}`}function R$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function wh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var St,zt=(St=class{constructor(){I(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");I(this,"memorySession",null);I(this,"refreshTimeoutId",null);I(this,"refreshPromise",null);I(this,"refreshRetryCount",0);I(this,"refreshBlockedUntil",0);I(this,"sessionGeneration",0);I(this,"channel",null);I(this,"channelName","");I(this,"applyingBroadcast",!1);I(this,"restorePromise",null)}static get Instance(){return St.instance||(St.instance=new St),St.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=it.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=n=>this.receive(n.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const n=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(n).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=r+o*1e3*.2;return n<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=n-r-o*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async refreshTokens(t){const r=this.sessionGeneration;try{const n=await this.requestTokens(t);return this.isCurrentGeneration(r)?n:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(n){return this.isCurrentGeneration(r)?I$(n)?(console.error("Token refresh rejected, signing out:",Yo(n)),ba(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Yo(n)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Yo(n)),null)}}async fetchUserInfo(t){try{return await Pi.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Yo(r)),null}}async requestTokens(t){var o;const r={grant_type:"refresh_token",client_id:(o=it.getConfig())==null?void 0:o.appId};t!=null&&t.refresh_token&&(r.refresh_token=t.refresh_token);const n=await Pi.Instance.postForm("/oauth2/token",r);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:C$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const n=await this.requestTokens(null);return n.id_token||(n.user=await this.fetchUserInfo(n.access_token)??void 0),this.setCurrentSession(n),this.scheduleTokenRefresh(),n}catch(n){return T$(n)&&ba(),console.debug("No session to restore:",Yo(n)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=St.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(St.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,St.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},I(St,"MAX_REFRESH_RETRIES",5),I(St,"REFRESH_RETRY_BASE_MS",5e3),I(St,"MAX_REFRESH_RETRY_DELAY_MS",6e4),I(St,"instance"),St);function I$(e){return!(e instanceof X)||e.status===void 0?!1:e.status===401?!0:e.status===400&&A$.has(e.code)}var A$=new Set(["invalid_grant","invalid_client"]);function T$(e){return e instanceof X&&e.status!==void 0&&e.status>=400&&e.status<500}function Yo(e){return e instanceof X?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var $h=class{constructor(e=sessionStorage){I(this,"storage");I(this,"FLOW_STATE_KEY","pontive_loginflow_state");I(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const n=Date.now(),o=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(o==null?void 0:o.startedAt)||n,lastUpdatedAt:n,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},Ci=class{static detect(e,t=window.location){const r=t.pathname.toLowerCase();return r.includes(e.signinUrl)?"signin":r.includes(e.signupUrl)?"signup":"custom"}},Ph=class{constructor(){I(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(n=>{try{n(t)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${e}:`,o)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},D$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},L$=class Ch{constructor(t,r,n=window.location,o,i){I(this,"httpClient",Pi.Instance);I(this,"flowId");I(this,"redirectTimeoutId",null);I(this,"flowStateManager");I(this,"flowEventBus");I(this,"location");I(this,"navigationTypeDetector");I(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]));const s=it.getConfig();if(!s.domain)throw new X("CONFIG_ERROR","Domain is required");if(!s.appId)throw new X("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=n,this.flowStateManager=o||new $h,this.flowEventBus=r||new Ph,this.navigationTypeDetector=i||new D$,zt.Instance.cleanExpiredSession(),zt.Instance.scheduleTokenRefresh()}static async init(t,r,n,o,i){const s=new Ch(t,r,n,o,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new X("VALIDATION_ERROR","Client ID is required");const n=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(n,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t){const r=`/auth/v1/authflows/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new X("VALIDATION_ERROR","Event type is required");const n=this.eventHandlers.get(t.event);return n?await n():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,n,o){try{const i=await t();return o&&await o(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof X?i:new X(r,n,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let n=this.flowStateManager.getFlowState();if(!n&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),n=this.flowStateManager.getFlowState(),!n))throw new X("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=n.state,i=`/auth/v1/authflows/${n.flowType}/events`,s=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!s.auth_result){this.flowStateManager.saveFlowState(n.flowType,n.flow_id,s);const d=this.flowStateManager.getFlowState();if(d){const c=o!==s.state;this.flowEventBus.emit("flow:updated",{flowState:d,isNewStep:c})}}return s}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};zt.Instance.setCurrentSession(r),zt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:n}=it.getConfig();if(n){n(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=it.getConfig(),r=Ci.detect(t,this.location);this.validateFlowType(r);const n=this.flowStateManager.getFlowState();return this.shouldResumeFlow(n,r)?await this.resumeExistingFlow(n,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=o?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const n=await this.resumeFlow(r);if(!n.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,n);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}}catch(n){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",n),await this.startNewFlow(r)}}async startNewFlow(t){const r=it.getConfig(),n=new URLSearchParams(this.location.search),o={};n.forEach((c,m)=>{o[m]=c}),console.log("metadata",o);const i=n.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:o},d=await this.startFlow(t,s);if(!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}async handleSwitchToSignin(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},F$=class{constructor(e){I(this,"delayMs");I(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},k$=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},N$=class{constructor(e,t,r=!1,n=window.location,o,i){I(this,"popstateListener",null);I(this,"pageshowListener",null);I(this,"debouncer");I(this,"isProcessing",!1);I(this,"isHandlingNavigationEvent",!1);I(this,"onFlowRestartNeeded",null);I(this,"skipHistoryTracking");I(this,"flowStateManager");I(this,"historyAdapter");I(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new F$(200),this.location=n,this.flowStateManager=o||new $h,this.historyAdapter=i||new k$,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),n=it.getConfig(),o=Ci.detect(n,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=it.getConfig(),n=Ci.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(n){console.error("[NavigationManager] Failed to update history:",n)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Cr=new AbortController,M$=class{constructor(){I(this,"httpClient",Pi.Instance);I(this,"capabilities",{webauthn:!1});I(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;n.mediation="conditional"}try{const o=await navigator.credentials.create(n);if(!o){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=o;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){os("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){os("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){os("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;n.mediation="conditional",n.publicKey&&(n.publicKey.allowCredentials=[])}try{const o=await navigator.credentials.get(n);return this.toPublicKeyCredentialJSON(o)}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=t.padEnd(t.length+r,"="),o=atob(n),i=new ArrayBuffer(o.length),s=new Uint8Array(i);for(let d=0;d<o.length;d++)s[d]=o.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(n=>({alg:n.alg,type:n.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const n={};e.authenticatorSelection.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(n.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(n.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(n.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=n}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Sr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Sr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(B$(n)){if(r.rpId!==n)return new Sr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Sr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Cr.abort()}};function os(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
2629
|
+
`,t)}var Sr=class extends Error{constructor({message:t,code:r,cause:n,name:o}){super(t);I(this,"code");this.name=o??n.name,this.code=r}};function B$(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var be,U$=(be=class{constructor(){I(this,"configured",!1);I(this,"configuredResolve");I(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));I(this,"loginflow",null);I(this,"navigationManager",null);I(this,"flowEventBus",null);I(this,"webauthnService",null)}static get Instance(){return be.instance||(be.instance=new be),be.instance}ensureConfigured(){if(!this.configured)throw new X("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new X("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new M$,this.webauthnService.detectCapabilities(),this.flowEventBus=new Ph,this.navigationManager=new N$(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const n=await L$.init(t,this.flowEventBus),o=it.getConfig();this.startPasskeyAuthentication(n.flowType,!0),this.loginflow=n.sdk;const i={flowType:n.flowType,isResumed:n.isResumed,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:n.isResumed?"flow_resumed":"flow_started",flowType:n.flowType,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result,isResumed:n.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new X("CONFIG_ERROR","domain and appId are required");it.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),zt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),zt.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),zt.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),zt.Instance.getAuthenticatedUser()}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=it.getConfig(),n=Ci.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(n,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(n,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const o=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(n,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",o.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result})}return o}async getPasskeyCredential(t,r){var o,i;const n=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialRequestOptions(t,r));if(!n)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(n,r)),options:n}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const n=await this.getPasskeyCredential(t,r);if(!n||!n.cred){console.error("no credential found");return}const{cred:o,options:i}=n;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:o}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&o.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,o.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var n,o;try{const i=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(o=this.webauthnService)==null?void 0:o.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const n=await this.createPasskeyCredential(t,r),o=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:n,conditional:r}});return console.log("passkey creation res",o),o}catch(n){console.log("error",n)}}invalidateSession(){zt.Instance.clearSession()}async signOut(t){var o,i;this.ensureConfigured();const r=(o=zt.Instance.peekSession())==null?void 0:o.id_token,n=((i=it.getConfig())==null?void 0:i.appId)??"";if(ba(),zt.Instance.clearSession(),zt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!it.apiIsSameOrigin()){window.location.assign(this.endSessionUrl(r,n,t==null?void 0:t.returnTo));return}await this.endServerSession(r,n),window.location.reload()}async endServerSession(t,r){try{await fetch(`${it.getApiBaseUrl()}/oauth2/end_session`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{id_token_hint:t}:{}}).toString()})}catch(n){console.warn("Could not end the session at the authorization server:",n)}}endSessionUrl(t,r,n){const o=new URLSearchParams({post_logout_redirect_uri:n??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&o.set("id_token_hint",t),`${it.getApiBaseUrl()}/oauth2/end_session?${o.toString()}`}},I(be,"instance"),be),tt=U$.Instance,j$=Object.defineProperty,q$=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&j$(t,r,o),o};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var o,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(o=this.shadowRoot)==null?void 0:o.querySelector(r))==null||i.classList.add(n))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(n=>{const o=this.getAttribute(n);o!==null&&(t.setAttribute(n,o),this.removeAttribute(n))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let n;r!=null&&r.length?(n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t)),n.forEach(o=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)})):n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t)),n.forEach(o=>t.appendChild(o))}}q$([a({type:Boolean})],jt.prototype,"shadow");const Qr="pont:auth",Uo={showWatermark:!0},On="pont:branding";class z${constructor(t){this.consumer=new si(t,{context:On,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Uo.showWatermark}}const Sh="pont:design-mode";class Rn{constructor(t){this.host=t,this.consumer=new si(t,{context:Sh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Eh="pont:env",cl=Symbol("renderSpecContext"),In="pont-user-context",pl="";var V$=Object.defineProperty,H$=Object.getOwnPropertyDescriptor,An=(e,t,r,n)=>{for(var o=n>1?void 0:n?H$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&V$(t,r,o),o};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Uo,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(n=>{n.localName.includes("-")&&!customElements.get(n.localName)?exports.PontKitLayout.reportUnregistered(n.localName):customElements.upgrade(n)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
|
|
2630
2630
|
<pont-form
|
|
2631
2631
|
custom-id="pont-layout-form"
|
|
2632
2632
|
@pont-form:error=${this.handleError}
|
|
@@ -2635,7 +2635,7 @@
|
|
|
2635
2635
|
<div id="dynamic-content"></div>
|
|
2636
2636
|
</div>
|
|
2637
2637
|
</pont-form>
|
|
2638
|
-
`}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";An([g()],exports.PontKitLayout.prototype,"spec",2);An([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);An([a({type:Boolean,attribute:"design-mode"}),Wt({context:Sh})],exports.PontKitLayout.prototype,"designMode",2);An([a({attribute:!1}),Wt({context:On})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=An([p("pont-layout")],exports.PontKitLayout);let ya=null;function G$(e){ya=e}function K$(){return ya||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),ya}const W$="pont-account-settings-dashboard-width",Y$="pont-account-settings-modal-width",Q$="pont-account-settings-dashboard",Z$="pont-account-settings-page-reset-margin",J$="pont-account-settings-modal-root",ht="sb",Ec={xs:640,sm:768};function Vt(...e){return _p(Ia(e))}function X$(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function tP(e){document.documentElement.setAttribute("data-theme",e)}function eP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&tP("light")}function rP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function _a(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const xc="abcdefghijklmnopqrstuvwxyz0123456789",oP=6;function nP(e){let t="";for(let r=0;r<oP;r++)t+=xc.charAt(Math.floor(Math.random()*xc.length));return t}const wt=()=>nP();function pl(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const n=document.createElement("div");n.className="pont-grid pont-gap-1";const o=document.createElement("pont-toast-title");o.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,n.appendChild(o),n.appendChild(i),r.appendChild(n),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function xh(e,t=5e3){if(!e)return;let r;const n=new Promise(o=>{r=setTimeout(()=>o("timeout"),t)});try{await Promise.race([e.whenConfigured(),n])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function iP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function sP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Oe(){var e;return(e=tt.getCurrentSession())==null?void 0:e.access_token}function wa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((o.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function $a(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Oh(e){return e?e.slice(0,2).toUpperCase():""}var aP=Object.defineProperty,lP=Object.getOwnPropertyDescriptor,br=(e,t,r,n)=>{for(var o=n>1?void 0:n?lP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aP(t,r,o),o};exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Uo,this.autoRedirect=!0,this._handleLocaleEvent=n=>{var s;const i=(s=n.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),eP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=yh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const n=document.createElement("link");n.id=this.BRANDING_LINK_ID,n.rel="stylesheet";const o=Date.now(),i=t.includes("?")?"&":"?";n.href=`${t}${i}v=${o}`,n.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(n)}configureAuth(t){tt.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)},onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),G$(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if(![this.env.signinUrl,this.env.signupUrl].some(d=>t.includes(d)))return;const s=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";if(this.wasBouncedBackFrom(s)){this.clearRedirectAttempt(),tt.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(s),window.location.href=s}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const n=JSON.parse(r);return n.target!==t||typeof n.at!="number"?!1:Date.now()-n.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:tt.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await tt.restoreSession()}catch{}this.refreshAuthState()}};br([a({type:Object}),Wt({context:Eh})],exports.PontProvider.prototype,"env",2);br([a({type:String})],exports.PontProvider.prototype,"locales",2);br([g(),Wt({context:cl})],exports.PontProvider.prototype,"effectiveLocales",2);br([g(),Wt({context:Qr})],exports.PontProvider.prototype,"auth",2);br([g(),Wt({context:dl})],exports.PontProvider.prototype,"renderSpec",2);br([g(),Wt({context:On})],exports.PontProvider.prototype,"branding",2);br([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=br([p("pont-provider")],exports.PontProvider);var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,Rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dP(t,r,o),o};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Rh([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=Rh([p("pont-signed-out")],exports.SignedOut);var pP=Object.defineProperty,hP=Object.getOwnPropertyDescriptor,Ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?hP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pP(t,r,o),o};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Ih([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=Ih([p("pont-signed-in")],exports.SignedIn);var uP=Object.defineProperty,mP=Object.getOwnPropertyDescriptor,Di=(e,t,r,n)=>{for(var o=n>1?void 0:n?mP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uP(t,r,o),o};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Di([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Di([ct({context:Eh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Di([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Di([p("pont-authenticated")],exports.PontAuthenticated);var gP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,Ah=(e,t,r,n)=>{for(var o=n>1?void 0:n?fP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gP(t,r,o),o};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};Ah([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=Ah([p("pont-auth-state")],exports.AuthStateElement);var me=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(me||{}),sr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(sr||{}),Ve=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ve||{}),Rr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Rr||{}),et=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(et||{});function Li(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2638
|
+
`}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";An([g()],exports.PontKitLayout.prototype,"spec",2);An([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);An([a({type:Boolean,attribute:"design-mode"}),Wt({context:Sh})],exports.PontKitLayout.prototype,"designMode",2);An([a({attribute:!1}),Wt({context:On})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=An([p("pont-layout")],exports.PontKitLayout);let _a=null;function G$(e){_a=e}function K$(){return _a||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),_a}const W$="pont-account-settings-dashboard-width",Y$="pont-account-settings-modal-width",Q$="pont-account-settings-dashboard",Z$="pont-account-settings-page-reset-margin",J$="pont-account-settings-modal-root",ht="sb",Ec={xs:640,sm:768};function Vt(...e){return _p(Aa(e))}function X$(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function tP(e){document.documentElement.setAttribute("data-theme",e)}function eP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&tP("light")}function rP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function wa(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const xc="abcdefghijklmnopqrstuvwxyz0123456789",oP=6;function nP(e){let t="";for(let r=0;r<oP;r++)t+=xc.charAt(Math.floor(Math.random()*xc.length));return t}const wt=()=>nP();function hl(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const n=document.createElement("div");n.className="pont-grid pont-gap-1";const o=document.createElement("pont-toast-title");o.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,n.appendChild(o),n.appendChild(i),r.appendChild(n),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function xh(e,t=5e3){if(!e)return;let r;const n=new Promise(o=>{r=setTimeout(()=>o("timeout"),t)});try{await Promise.race([e.whenConfigured(),n])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function iP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function sP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Oe(){var e;return(e=tt.getCurrentSession())==null?void 0:e.access_token}function $a(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((o.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Pa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Oh(e){return e?e.slice(0,2).toUpperCase():""}var aP=Object.defineProperty,lP=Object.getOwnPropertyDescriptor,br=(e,t,r,n)=>{for(var o=n>1?void 0:n?lP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aP(t,r,o),o};exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Uo,this.autoRedirect=!0,this._handleLocaleEvent=n=>{var s;const i=(s=n.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),eP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=yh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const n=document.createElement("link");n.id=this.BRANDING_LINK_ID,n.rel="stylesheet";const o=Date.now(),i=t.includes("?")?"&":"?";n.href=`${t}${i}v=${o}`,n.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(n)}configureAuth(t){tt.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)},onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),G$(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if(![this.env.signinUrl,this.env.signupUrl].some(d=>t.includes(d)))return;const s=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";if(this.wasBouncedBackFrom(s)){this.clearRedirectAttempt(),tt.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(s),window.location.href=s}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const n=JSON.parse(r);return n.target!==t||typeof n.at!="number"?!1:Date.now()-n.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:tt.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await tt.restoreSession()}catch{}this.refreshAuthState()}};br([a({type:Object}),Wt({context:Eh})],exports.PontProvider.prototype,"env",2);br([a({type:String})],exports.PontProvider.prototype,"locales",2);br([g(),Wt({context:pl})],exports.PontProvider.prototype,"effectiveLocales",2);br([g(),Wt({context:Qr})],exports.PontProvider.prototype,"auth",2);br([g(),Wt({context:cl})],exports.PontProvider.prototype,"renderSpec",2);br([g(),Wt({context:On})],exports.PontProvider.prototype,"branding",2);br([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=br([p("pont-provider")],exports.PontProvider);var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,Rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dP(t,r,o),o};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Rh([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=Rh([p("pont-signed-out")],exports.SignedOut);var pP=Object.defineProperty,hP=Object.getOwnPropertyDescriptor,Ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?hP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pP(t,r,o),o};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Ih([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=Ih([p("pont-signed-in")],exports.SignedIn);var uP=Object.defineProperty,mP=Object.getOwnPropertyDescriptor,Di=(e,t,r,n)=>{for(var o=n>1?void 0:n?mP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uP(t,r,o),o};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Di([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Di([ct({context:Eh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Di([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Di([p("pont-authenticated")],exports.PontAuthenticated);var gP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,Ah=(e,t,r,n)=>{for(var o=n>1?void 0:n?fP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gP(t,r,o),o};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};Ah([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=Ah([p("pont-auth-state")],exports.AuthStateElement);var me=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(me||{}),sr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(sr||{}),Ve=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ve||{}),Rr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Rr||{}),et=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(et||{});function Li(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2639
2639
|
<path d="M6.66501 1.32926H1.99834C1.64472 1.32926 1.30558 1.46974 1.05553 1.71979C0.805484 1.96984 0.665009 2.30898 0.665009 2.6626V11.9959C0.665009 12.3496 0.805484 12.6887 1.05553 12.9387C1.30558 13.1888 1.64472 13.3293 1.99834 13.3293H11.3317C11.6853 13.3293 12.0244 13.1888 12.2745 12.9387C12.5245 12.6887 12.665 12.3496 12.665 11.9959V7.32926M10.9151 1.07925C11.1803 0.814036 11.54 0.665039 11.9151 0.665039C12.2901 0.665039 12.6499 0.814036 12.9151 1.07925C13.1803 1.34447 13.3293 1.70418 13.3293 2.07925C13.3293 2.45433 13.1803 2.81404 12.9151 3.07925L6.90641 9.08859C6.7481 9.24675 6.55254 9.36253 6.33774 9.42525L4.4224 9.98525C4.36504 10.002 4.30423 10.003 4.24634 9.98816C4.18846 9.97333 4.13562 9.94321 4.09337 9.90096C4.05112 9.8587 4.021 9.80587 4.00617 9.74798C3.99134 9.69009 3.99234 9.62929 4.00907 9.57192L4.56907 7.65659C4.63209 7.44195 4.74809 7.24662 4.9064 7.08859L10.9151 1.07925Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2640
2640
|
</svg>
|
|
2641
2641
|
`}function Mt(){return U`
|
|
@@ -2680,7 +2680,7 @@
|
|
|
2680
2680
|
`}function wP(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2681
2681
|
<path d="M3.33337 8.00004H12.6667M8.00004 3.33337V12.6667" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2682
2682
|
</svg>
|
|
2683
|
-
`}function
|
|
2683
|
+
`}function Ca(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2684
2684
|
<path d="M14.0001 14L11.1335 11.1333M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2685
2685
|
</svg>`}function Dh(){return U`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2686
2686
|
<path d="M2 8C2 6.4087 2.63214 4.88258 3.75736 3.75736C4.88258 2.63214 6.4087 2 8 2C9.67737 2.00631 11.2874 2.66082 12.4933 3.82667L14 5.33333M10.6667 5.33333H14V2M14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14C6.32263 13.9937 4.71265 13.3392 3.50667 12.1733L2 10.6667M2 14V10.6667H5.33333" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -2716,7 +2716,7 @@
|
|
|
2716
2716
|
${this._cachedChildren}
|
|
2717
2717
|
</div>
|
|
2718
2718
|
</div>
|
|
2719
|
-
`:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}async function Re(e,t={}){var b;const{token:r,headers:n,...o}=t,i=K$(),s=i==null?void 0:i.apiBaseUrl,d=(i==null?void 0:i.projectId)||"",c={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};n&&(n instanceof Headers?n.forEach((w,_)=>{c[_]=w}):Array.isArray(n)?n.forEach(([w,_])=>{c[w]=_}):Object.assign(c,n)),Object.prototype.hasOwnProperty.call(c,"x-pontive-project-id")||(c["x-pontive-project-id"]=d);const m=await fetch(`${s}${e}`,{...o,headers:c});let v=null;try{v=await m.json()}catch{}if(!m.ok)throw new xP(((b=v==null?void 0:v.error)==null?void 0:b.message)||m.statusText||"Something went wrong",m.status,v);return v}async function OP(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function Mi(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t),token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function RP(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/members${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function IP(e,t,r){const n=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await Re(n,{method:"PUT",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(r)})}async function AP(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await Re(r,{method:"DELETE",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function TP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(t)})}async function DP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function LP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function FP(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/invitations${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function
|
|
2719
|
+
`:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}async function Re(e,t={}){var b;const{token:r,headers:n,...o}=t,i=K$(),s=i==null?void 0:i.apiBaseUrl,d=(i==null?void 0:i.projectId)||"",c={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};n&&(n instanceof Headers?n.forEach((w,_)=>{c[_]=w}):Array.isArray(n)?n.forEach(([w,_])=>{c[w]=_}):Object.assign(c,n)),Object.prototype.hasOwnProperty.call(c,"x-pontive-project-id")||(c["x-pontive-project-id"]=d);const m=await fetch(`${s}${e}`,{...o,headers:c});let v=null;try{v=await m.json()}catch{}if(!m.ok)throw new xP(((b=v==null?void 0:v.error)==null?void 0:b.message)||m.statusText||"Something went wrong",m.status,v);return v}async function OP(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function Mi(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t),token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function RP(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/members${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function IP(e,t,r){const n=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await Re(n,{method:"PUT",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(r)})}async function AP(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await Re(r,{method:"DELETE",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function TP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(t)})}async function DP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function LP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function FP(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/invitations${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function ul(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),n=`/roles${r?`?${r}`:""}`;return Re(n,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}var kP=Object.defineProperty,NP=Object.getOwnPropertyDescriptor,ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?NP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kP(t,r,o),o};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=et.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this.formData={avatar:"",email:"",phone:""},this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Mi(this.userContextValue.identifier,{picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch{this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const n=t.firstElementChild;n&&n.hasAttribute("data-state")&&(this._attachAttributeObserver(n),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"&&n.attributeName==="data-state"){const o=t.getAttribute("data-state");o==="open"?this.openAvatarEditor():o==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderDisplayRow(t,r,n){const o=this.layout===et.COLUMN;return l`
|
|
2720
2720
|
<div
|
|
2721
2721
|
class=${Vt("pont-account-settings-display-row",o?"":"pont-grid pont-account-settings-account-grid pont-items-center")}
|
|
2722
2722
|
>
|
|
@@ -2937,7 +2937,7 @@
|
|
|
2937
2937
|
</pont-card-content>
|
|
2938
2938
|
</div>
|
|
2939
2939
|
</pont-card>
|
|
2940
|
-
`}createRenderRoot(){return this}};ot([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);ot([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);ot([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);ot([g()],exports.PontAccountInfo.prototype,"isMobile",2);ot([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);ot([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);ot([g()],exports.PontAccountInfo.prototype,"formData",2);ot([ct({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=ot([p("pont-account-info")],exports.PontAccountInfo);var MP=Object.defineProperty,BP=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var o=n>1?void 0:n?BP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&MP(t,r,o),o};exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r,n,o;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const i=await Mi(this.userContextValue.identifier,{address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=i.address)==null?void 0:r.locality)??"",zoneInfo:i.zoneinfo??""},this.isEditing=!1}catch(i){console.error("Failed to update location info",i);let s="Failed to update location information. Please try again.";if(i instanceof Error&&"status"in i){const d=i;s=((o=(n=d.data)==null?void 0:n.error)==null?void 0:o.message)??d.message??s}else i instanceof Error&&(s=i.message);
|
|
2940
|
+
`}createRenderRoot(){return this}};ot([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);ot([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);ot([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);ot([g()],exports.PontAccountInfo.prototype,"isMobile",2);ot([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);ot([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);ot([g()],exports.PontAccountInfo.prototype,"formData",2);ot([ct({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=ot([p("pont-account-info")],exports.PontAccountInfo);var MP=Object.defineProperty,BP=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var o=n>1?void 0:n?BP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&MP(t,r,o),o};exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r,n,o;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const i=await Mi(this.userContextValue.identifier,{address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=i.address)==null?void 0:r.locality)??"",zoneInfo:i.zoneinfo??""},this.isEditing=!1}catch(i){console.error("Failed to update location info",i);let s="Failed to update location information. Please try again.";if(i instanceof Error&&"status"in i){const d=i;s=((o=(n=d.data)==null?void 0:n.error)==null?void 0:o.message)??d.message??s}else i instanceof Error&&(s=i.message);hl(s)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r){return this.layout===et.ROW?l`
|
|
2941
2941
|
<div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
|
|
2942
2942
|
<pont-typography-p
|
|
2943
2943
|
><div
|
|
@@ -3094,7 +3094,7 @@
|
|
|
3094
3094
|
${this.isEditing?this.renderFooter():null}
|
|
3095
3095
|
</div>
|
|
3096
3096
|
</pont-card>
|
|
3097
|
-
`}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([ct({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var UP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var o=n>1?void 0:n?jP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&UP(t,r,o),o};exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:n.username??"",first:n.given_name??"",middle:n.middle_name??"",last:n.family_name??"",nickname:n.nickname??"",gender:n.gender??"",bio:n.profile??""},this.isEditing=!1}catch(n){console.error("Failed to update personal info",n);let o="Failed to update personal information. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);
|
|
3097
|
+
`}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([ct({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var UP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var o=n>1?void 0:n?jP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&UP(t,r,o),o};exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:n.username??"",first:n.given_name??"",middle:n.middle_name??"",last:n.family_name??"",nickname:n.nickname??"",gender:n.gender??"",bio:n.profile??""},this.isEditing=!1}catch(n){console.error("Failed to update personal info",n);let o="Failed to update personal information. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}handleEdit(){this.isSaving||(this.formData={...this.personal},this.errors={},this.isEditing=!0)}handleCancel(){this.isEditing=!1,this.errors={}}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}createRenderRoot(){return this}renderControl(t){return t==="gender"?l`
|
|
3098
3098
|
<pont-select
|
|
3099
3099
|
.value=${this.formData.gender}
|
|
3100
3100
|
?disabled=${this.isSaving}
|
|
@@ -3243,7 +3243,7 @@
|
|
|
3243
3243
|
${this.isEditing?this.renderFooter():null}
|
|
3244
3244
|
</div>
|
|
3245
3245
|
</pont-card>
|
|
3246
|
-
`}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([ct({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var qP=Object.defineProperty,zP=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var o=n>1?void 0:n?zP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qP(t,r,o),o};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{website:this.formData.website});this.URLsInfo={website:n.website??""},this.isEditing=!1}catch(n){console.error("Failed to update URLs info",n);let o="Failed to update website. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);
|
|
3246
|
+
`}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([ct({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var qP=Object.defineProperty,zP=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var o=n>1?void 0:n?zP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qP(t,r,o),o};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{website:this.formData.website});this.URLsInfo={website:n.website??""},this.isEditing=!1}catch(n){console.error("Failed to update URLs info",n);let o="Failed to update website. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.URLsInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r,n=!1){return this.layout===et.ROW?l`
|
|
3247
3247
|
<div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
|
|
3248
3248
|
<pont-typography-p
|
|
3249
3249
|
><div
|
|
@@ -3499,7 +3499,7 @@
|
|
|
3499
3499
|
</div>
|
|
3500
3500
|
|
|
3501
3501
|
${this.isBurger?this.renderMobileDrawer():null}
|
|
3502
|
-
`}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function
|
|
3502
|
+
`}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function ml(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Nh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Mh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Fh,window.__pontCoreSdk.closeAccountSettingsModal=ml,window.__pontCoreSdk.openMemberManagementModal=kh,window.__pontCoreSdk.closeMemberManagementModal=Nh,window.__pontCoreSdk.setLocales=Mh);var ZP=Object.defineProperty,qt=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&ZP(t,r,o),o};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.mobileDisplay=Ve.REGULAR,this.mode=sr.PAGE,this.widgetsLayout=et.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=me.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const n=(i=r.target.files)==null?void 0:i[0];if(!n)return;const o=new FileReader;o.onload=()=>{this.account.avatar=o.result,this.requestUpdate()},o.readAsDataURL(n)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,n=this.querySelector("pont-account-info"),o=this.querySelector("pont-card");n!=null&&n.contains(r)||o!=null&&o.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===sr.MODAL}get isVerticalOrientation(){return this.orientation===Rr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Rr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ve.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ve.REGULAR:Ve.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(Q$,this.isModal?J$:Z$,this.isModal?Y$:W$,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=tt.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await OP(this.userContextValue.identifier),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(n){console.error("[pont-account-settings] Failed loading user:",n)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<Ec.xs?"xs":t<Ec.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
|
|
3503
3503
|
<div class="pont-account-settings-watermark-container">
|
|
3504
3504
|
<pont-watermark custom-id="pont-watermark"></pont-watermark>
|
|
3505
3505
|
</div>
|
|
@@ -3558,7 +3558,7 @@
|
|
|
3558
3558
|
<pont-modal
|
|
3559
3559
|
.isOpen=${this.isOpen}
|
|
3560
3560
|
.showClose=${!this.isBurger}
|
|
3561
|
-
@close=${()=>
|
|
3561
|
+
@close=${()=>ml()}
|
|
3562
3562
|
>
|
|
3563
3563
|
<div
|
|
3564
3564
|
part=${this.isBurger?"burger-modal-container":"regular-content-modal"}
|
|
@@ -3611,7 +3611,7 @@
|
|
|
3611
3611
|
<pont-field-separator id="${this.rootId}" part="${exports.PontDivider.PARTS.root}">
|
|
3612
3612
|
${this.label??h}
|
|
3613
3613
|
</pont-field-separator>
|
|
3614
|
-
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${ht}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var r1=Object.defineProperty,
|
|
3614
|
+
`}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${ht}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var r1=Object.defineProperty,gl=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&r1(t,r,o),o};const $l=class $l extends f{constructor(){super(...arguments),this.totalPages=1,this.currentPage=1,this.hideGoTo=!1}createRenderRoot(){return this}get visiblePages(){if(this.totalPages<=0)return[];if(this.totalPages<=3)return Array.from({length:this.totalPages},(r,n)=>n+1);let t=Math.max(1,this.currentPage-1);return t+2>this.totalPages&&(t=this.totalPages-2),[t,t+1,t+2]}goTo(t){this.totalPages<=0||t===this.currentPage||t<1||t>this.totalPages||this.dispatchEvent(new CustomEvent("page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){const t=this.totalPages,r=this.currentPage,n=t>0,o=!n||r<=1,i=!n||r>=t,s=n?this.visiblePages:[];return l`
|
|
3615
3615
|
<nav
|
|
3616
3616
|
class="pont-flex pont-flex-wrap pont-items-center pont-justify-center pont-gap-1"
|
|
3617
3617
|
aria-label="Pagination"
|
|
@@ -3703,7 +3703,7 @@
|
|
|
3703
3703
|
:host {
|
|
3704
3704
|
display: block;
|
|
3705
3705
|
}
|
|
3706
|
-
`;let zr=$l;
|
|
3706
|
+
`;let zr=$l;gl([a({type:Number})],zr.prototype,"totalPages");gl([a({type:Number})],zr.prototype,"currentPage");gl([a({type:Boolean})],zr.prototype,"hideGoTo");customElements.define("pont-paginator",zr);class o1 extends f{createRenderRoot(){return this}generateBlockProps(t){switch(t){case"total-members":case"active-members":return{title:"Active Members",content:"100",icon:yP};case"pending-invites":return{title:"Pending Invites",content:"8",icon:Th};case"inactive-members":return{title:"Inactive Members",content:"1",icon:_P}}}statisticBlock({title:t,content:r,icon:n}){return l` <pont-card>
|
|
3707
3707
|
<pont-card-header>
|
|
3708
3708
|
<div class="pont-statistic-block-header">
|
|
3709
3709
|
<pont-typography-muted>${t}</pont-typography-muted>
|
|
@@ -3720,7 +3720,7 @@
|
|
|
3720
3720
|
${this.statisticBlock(this.generateBlockProps("pending-invites"))}
|
|
3721
3721
|
${this.statisticBlock(this.generateBlockProps("inactive-members"))}
|
|
3722
3722
|
</div>
|
|
3723
|
-
`}}customElements.define("pont-monitoring-cards",o1);var n1=Object.defineProperty,i1=Object.getOwnPropertyDescriptor,Yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?i1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n1(t,r,o),o};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await
|
|
3723
|
+
`}}customElements.define("pont-monitoring-cards",o1);var n1=Object.defineProperty,i1=Object.getOwnPropertyDescriptor,Yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?i1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n1(t,r,o),o};let Bt=class extends f{constructor(){super(...arguments),this.drawerId="pont-member-invite",this.organizationId="",this.emails=[],this.roles=[],this.availableRoles=[],this.expiryDays="7",this.customMessage="",this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await ul(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onEmailsChange(e){this.emails=e,this.errors={...this.errors,emails:void 0}}onRolesChange(e){this.roles=e,this.errors={...this.errors,roles:void 0}}handleExpiryInput(e){this.expiryDays=e.target.value}handleMessageInput(e){this.customMessage=e.target.value}async handleSend(){var r;const e={};if(this.emails.length===0&&(e.emails="Please enter at least one email address."),this.roles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}const t={emails:this.emails,roles:this.roles,invited_by:(r=tt.getAuthenticatedUser())==null?void 0:r.sub,message:this.customMessage||void 0};this.isLoading=!0;try{const n=await TP(this.organizationId,t);this.emails=[],this.roles=[],this.expiryDays="7",this.customMessage="",this.errors={},window.dispatchEvent(new CustomEvent("invite-members-success",{detail:{organizationId:this.organizationId,response:n}})),this.close()}catch(n){console.error("Failed to send invites:",n),this.errors={...this.errors,emails:"Failed to send invites. Please try again."}}finally{this.isLoading=!1}}render(){return l`
|
|
3724
3724
|
<pont-sidedrawer
|
|
3725
3725
|
id=${this.drawerId}
|
|
3726
3726
|
side="right"
|
|
@@ -3859,7 +3859,7 @@
|
|
|
3859
3859
|
</div>
|
|
3860
3860
|
</div>
|
|
3861
3861
|
</pont-sidedrawer>
|
|
3862
|
-
`}};Yt([a({type:String})],Bt.prototype,"drawerId",2);Yt([a({type:String})],Bt.prototype,"organizationId",2);Yt([g()],Bt.prototype,"emails",2);Yt([g()],Bt.prototype,"roles",2);Yt([g()],Bt.prototype,"availableRoles",2);Yt([g()],Bt.prototype,"expiryDays",2);Yt([g()],Bt.prototype,"customMessage",2);Yt([g()],Bt.prototype,"errors",2);Yt([g()],Bt.prototype,"open",2);Yt([g()],Bt.prototype,"isLoading",2);Yt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Yt([p("pont-invite-members-form")],Bt);var s1=Object.defineProperty,a1=Object.getOwnPropertyDescriptor,De=(e,t,r,n)=>{for(var o=n>1?void 0:n?a1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s1(t,r,o),o};let se=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(n=>n.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await
|
|
3862
|
+
`}};Yt([a({type:String})],Bt.prototype,"drawerId",2);Yt([a({type:String})],Bt.prototype,"organizationId",2);Yt([g()],Bt.prototype,"emails",2);Yt([g()],Bt.prototype,"roles",2);Yt([g()],Bt.prototype,"availableRoles",2);Yt([g()],Bt.prototype,"expiryDays",2);Yt([g()],Bt.prototype,"customMessage",2);Yt([g()],Bt.prototype,"errors",2);Yt([g()],Bt.prototype,"open",2);Yt([g()],Bt.prototype,"isLoading",2);Yt([g()],Bt.prototype,"isLoadingRoles",2);Bt=Yt([p("pont-invite-members-form")],Bt);var s1=Object.defineProperty,a1=Object.getOwnPropertyDescriptor,De=(e,t,r,n)=>{for(var o=n>1?void 0:n?a1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s1(t,r,o),o};let se=class extends f{constructor(){super(...arguments),this.drawerId="pont-manage-roles",this.organizationId="",this.member=null,this.selectedRoles=[],this.availableRoles=[],this.errors={},this.open=!1,this.isLoading=!1,this.isLoadingRoles=!1,this._handleOpenDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!0,this.member&&(this.selectedRoles=(this.member.roles||[]).map(n=>n.key)),this.organizationId&&this.loadRoles())},this._handleCloseDrawer=e=>{const t=e.detail,r=(t==null?void 0:t.id)||(t==null?void 0:t.drawer_id);r&&r!==this.drawerId||(this.open=!1)},this._handleDrawerClosed=()=>{this.open=!1}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),document.addEventListener("open-sidedrawer",this._handleOpenDrawer),document.addEventListener("close-sidedrawer",this._handleCloseDrawer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("open-sidedrawer",this._handleOpenDrawer),document.removeEventListener("close-sidedrawer",this._handleCloseDrawer)}updated(e){e.has("member")&&this.member&&(console.log(this.member),this.selectedRoles=(this.member.roles||[]).map(t=>t.key))}async loadRoles(){try{this.isLoadingRoles=!0;const e={resource_id:this.organizationId,resource_type:"organization"},t=await ul(e);this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name,description:r.description||void 0,disabled:!1}))}catch(e){console.error("Failed to load roles:",e)}finally{this.isLoadingRoles=!1}}close(){this.open=!1,window.dispatchEvent(new CustomEvent("close-sidedrawer",{detail:{id:this.drawerId}}))}onRolesChange(e){this.selectedRoles=e,this.errors={...this.errors,roles:void 0}}async handleSave(){var r;const e={};if(this.selectedRoles.length===0&&(e.roles="Please select at least one role."),Object.keys(e).length>0){this.errors=e;return}if(!this.organizationId){console.error("Organization ID is required");return}if(!((r=this.member)!=null&&r.user.id)){console.error("User ID is required");return}const t={roles:this.selectedRoles};this.isLoading=!0;try{const n=await IP(this.organizationId,this.member.user.id,t);console.log("Member roles updated successfully:",n),this.errors={},window.dispatchEvent(new CustomEvent("update-members-role",{detail:{organizationId:this.organizationId,userId:this.member.user.id,roles:this.selectedRoles,response:n},bubbles:!0,composed:!0})),this.close()}catch(n){console.error("Failed to update member roles:",n),this.errors={...this.errors,roles:"Failed to update member roles. Please try again."}}finally{this.isLoading=!1}}render(){var e;return l`
|
|
3863
3863
|
<pont-sidedrawer
|
|
3864
3864
|
id=${this.drawerId}
|
|
3865
3865
|
side="right"
|
|
@@ -4040,7 +4040,7 @@
|
|
|
4040
4040
|
<pont-skeleton class="pont-h-4 pont-w-16"></pont-skeleton>
|
|
4041
4041
|
<pont-skeleton class="pont-h-3 pont-w-12"></pont-skeleton>
|
|
4042
4042
|
</div>
|
|
4043
|
-
`;const i
|
|
4043
|
+
`;const i=$a(o),s=Pa(o);return l`
|
|
4044
4044
|
<div class="pont-flex pont-flex-col">
|
|
4045
4045
|
<pont-typography-table part="joined_at"
|
|
4046
4046
|
>${i}</pont-typography-table
|
|
@@ -4118,7 +4118,7 @@
|
|
|
4118
4118
|
.value=${this.searchTerm}
|
|
4119
4119
|
@input=${this.handleMembersSearchChange}
|
|
4120
4120
|
></pont-input-group-input>
|
|
4121
|
-
<pont-input-group-addon>${
|
|
4121
|
+
<pont-input-group-addon>${Ca()}</pont-input-group-addon>
|
|
4122
4122
|
</pont-input-group>
|
|
4123
4123
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4124
4124
|
<pont-multi-select-filter
|
|
@@ -4208,7 +4208,7 @@
|
|
|
4208
4208
|
`:l`
|
|
4209
4209
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4210
4210
|
<pont-avatar size="default">
|
|
4211
|
-
<pont-avatar-fallback>${
|
|
4211
|
+
<pont-avatar-fallback>${Ca()}</pont-avatar-fallback>
|
|
4212
4212
|
</pont-avatar>
|
|
4213
4213
|
<pont-typography-table part="invitee_email"
|
|
4214
4214
|
>${o}</pont-typography-table
|
|
@@ -4245,7 +4245,7 @@
|
|
|
4245
4245
|
<pont-skeleton class="pont-h-4 pont-w-16"></pont-skeleton>
|
|
4246
4246
|
<pont-skeleton class="pont-h-3 pont-w-12"></pont-skeleton>
|
|
4247
4247
|
</div>
|
|
4248
|
-
`;const i
|
|
4248
|
+
`;const i=$a(o),s=Pa(o);return l`
|
|
4249
4249
|
<div class="pont-flex pont-flex-col">
|
|
4250
4250
|
<pont-typography-table part="joined_at"
|
|
4251
4251
|
>${i}</pont-typography-table
|
|
@@ -4259,7 +4259,7 @@
|
|
|
4259
4259
|
<pont-skeleton class="pont-h-4 pont-w-16"></pont-skeleton>
|
|
4260
4260
|
<pont-skeleton class="pont-h-3 pont-w-12"></pont-skeleton>
|
|
4261
4261
|
</div>
|
|
4262
|
-
`;const i
|
|
4262
|
+
`;const i=$a(o),s=Pa(o);return l`
|
|
4263
4263
|
<div class="pont-flex pont-flex-col">
|
|
4264
4264
|
<pont-typography-table part="joined_at"
|
|
4265
4265
|
>${i}</pont-typography-table
|
|
@@ -4319,7 +4319,7 @@
|
|
|
4319
4319
|
.value=${this.searchTerm}
|
|
4320
4320
|
@input=${this.handleInvitationsSearchChange}
|
|
4321
4321
|
></pont-input-group-input>
|
|
4322
|
-
<pont-input-group-addon>${
|
|
4322
|
+
<pont-input-group-addon>${Ca()}</pont-input-group-addon>
|
|
4323
4323
|
</pont-input-group>
|
|
4324
4324
|
<div class="pont-flex pont-items-center pont-gap-2">
|
|
4325
4325
|
<pont-multi-select-filter
|
|
@@ -4406,7 +4406,7 @@
|
|
|
4406
4406
|
</div>
|
|
4407
4407
|
</div>
|
|
4408
4408
|
`}
|
|
4409
|
-
`}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var or=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(or||{});function m1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Mn="2026-08-05T10:00:00Z",Bn="2026-08-04T10:00:00Z",g1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:Mn,last_active_at:Mn,created_at:Mn,updated_at:Mn,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Bn,last_active_at:Bn,created_at:Bn,updated_at:Bn,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function f1(e){let t=[...g1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,o=(r-1)*n,i=o+n;return{data:t.slice(o,i),object:"list",pagination:{page:r,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}const v1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function b1(e){let t=[...v1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const n=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,i=(n-1)*o,s=i+o;return{data:t.slice(i,s),object:"list",pagination:{page:n,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}var y1=Object.defineProperty,V=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&y1(t,r,o),o};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=m1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await hl(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,n,o){try{this.membersLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=f1(i):d=await RP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,n,o){try{this.invitationsLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=b1(i):c=await FP(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(n=>n!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(n=>n!==r),status:this.invitationFilters.status.filter(n=>n!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var n,o;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
|
|
4409
|
+
`}};Qt([a({attribute:!1})],Ut.prototype,"invitations",2);Qt([a({type:Boolean,attribute:!1})],Ut.prototype,"invitationsLoading",2);Qt([a({type:String})],Ut.prototype,"searchTerm",2);Qt([a({type:Object,attribute:!1})],Ut.prototype,"invitationFilters",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"availableRoles",2);Qt([a({type:Array,attribute:!1})],Ut.prototype,"statusOptions",2);Qt([a({type:Number})],Ut.prototype,"invitationsPage",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotalPages",2);Qt([a({type:Number})],Ut.prototype,"invitationsTotal",2);Qt([a({type:Number})],Ut.prototype,"rowsPerPage",2);Qt([g()],Ut.prototype,"_searchDebounceTimer",2);Ut=Qt([p("pont-member-management-invitations-panel")],Ut);var or=(e=>(e.MEMBERS="Members",e.INVITATIONS="Invitations",e))(or||{});function m1(e){const t=[{key:"admin",name:"Admin",description:"Full access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["*"],permission_count:10,assignment_count:2,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"manager",name:"Manager",description:"Can manage projects and members",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects","write:projects","read:members"],permission_count:3,assignment_count:4,inheritance:{parent_role_keys:["admin"],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"developer",name:"Developer",description:"Can read and write code",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:repos","write:repos"],permission_count:2,assignment_count:6,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3},{key:"viewer",name:"Viewer",description:"Read-only access",type:"system",resource_type:"organization",resource_id:"org_123",permissions:["read:projects"],permission_count:1,assignment_count:8,inheritance:{parent_role_keys:[],relation:""},metadata:{},object:"role",created_at:Date.now()/1e3,updated_at:Date.now()/1e3}];return{data:t,object:"list",pagination:{page:1,limit:20,total:t.length,total_pages:1}}}const Mn="2026-08-05T10:00:00Z",Bn="2026-08-04T10:00:00Z",g1=[{id:"mem_1",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"admin",name:"Admin"}],joined_at:"2026-08-04T10:00:00Z",last_active_at:"2024-12-01T08:30:00Z",created_at:"2024-01-15T10:00:00Z",updated_at:"2024-12-01T08:30:00Z",object:"member",user:{id:"user_1",email:"alice@example.com",email_verified:!0,family_name:"Smith",given_name:"Alice",name:"Alice Smith",picture:"",status:"active",username:"alice"}},{id:"mem_2",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:"2024-02-10T11:00:00Z",last_active_at:"2024-11-28T14:20:00Z",created_at:"2024-02-10T11:00:00Z",updated_at:"2024-11-28T14:20:00Z",object:"member",user:{id:"user_2",email:"bob@example.com",email_verified:!0,family_name:"Johnson",given_name:"Bob",name:"Bob Johnson",picture:"",status:"active",username:"bob"}},{id:"mem_3",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-03-20T09:00:00Z",last_active_at:"2024-12-02T16:45:00Z",created_at:"2024-03-20T09:00:00Z",updated_at:"2024-12-02T16:45:00Z",object:"member",user:{id:"user_3",email:"charlie@example.com",email_verified:!0,family_name:"Davis",given_name:"Charlie",name:"Charlie Davis",picture:"",status:"active",username:"charlie"}},{id:"mem_4",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:"2024-04-05T13:30:00Z",last_active_at:"2024-11-20T10:00:00Z",created_at:"2024-04-05T13:30:00Z",updated_at:"2024-11-20T10:00:00Z",object:"member",user:{id:"user_4",email:"diana@example.com",email_verified:!0,family_name:"Evans",given_name:"Diana",name:"Diana Evans",picture:"https://ui-avatars.com/api/?name=Diana+Evans&background=random",status:"active",username:"diana"}},{id:"mem_5",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"developer",name:"Developer"}],joined_at:"2024-05-12T08:00:00Z",last_active_at:"2024-12-03T09:15:00Z",created_at:"2024-05-12T08:00:00Z",updated_at:"2024-12-03T09:15:00Z",object:"member",user:{id:"user_5",email:"eve@example.com",email_verified:!0,family_name:"Foster",given_name:"Eve",name:"Eve Foster",picture:"https://ui-avatars.com/api/?name=Eve+Foster&background=random",status:"active",username:"eve"}},{id:"mem_6",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"manager",name:"Manager"}],joined_at:Mn,last_active_at:Mn,created_at:Mn,updated_at:Mn,object:"member",user:{id:"user_6",email:"fiona@example.com",email_verified:!0,family_name:"Green",given_name:"Fiona",name:"Fiona Green",picture:"https://ui-avatars.com/api/?name=Fiona+Green&background=random",status:"active",username:"fiona"}},{id:"mem_7",organization_id:"org_123",organization_name:"Acme Corp",organization_slug:"acme",project_id:"proj_1",roles:[{key:"viewer",name:"Viewer"}],joined_at:Bn,last_active_at:Bn,created_at:Bn,updated_at:Bn,object:"member",user:{id:"user_7",email:"george@example.com",email_verified:!0,family_name:"Hughes",given_name:"George",name:"George Hughes",picture:"https://ui-avatars.com/api/?name=George+Hughes&background=random",status:"active",username:"george"}}];function f1(e){let t=[...g1];if(e!=null&&e.search){const d=e.search.toLowerCase();t=t.filter(c=>c.user.name.toLowerCase().includes(d)||c.user.email.toLowerCase().includes(d))}if(e!=null&&e.roles){const d=e.roles.split(",");t=t.filter(c=>c.roles.some(m=>d.includes(m.key)))}const r=(e==null?void 0:e.page)||1,n=(e==null?void 0:e.limit)||5,o=(r-1)*n,i=o+n;return{data:t.slice(o,i),object:"list",pagination:{page:r,limit:n,total:t.length,total_pages:Math.ceil(t.length/n)}}}const v1=[{id:"inv_1",organization_id:"org_123",invitee_email:"frank@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*2,updated_at:Date.now()/1e3-86400*2,expires_at:Date.now()/1e3+86400*5,last_sent_at:Date.now()/1e3-86400*2,resend_count:0,object:"invitation"},{id:"inv_2",organization_id:"org_123",invitee_email:"grace@example.com",roles:[{key:"manager",name:"Manager"}],status:"pending",invited_by:{id:"user_2",name:"Bob Johnson"},created_at:Date.now()/1e3-86400*10,updated_at:Date.now()/1e3-86400*10,expires_at:Date.now()/1e3+86400*1,last_sent_at:Date.now()/1e3-86400*3,resend_count:2,object:"invitation"},{id:"inv_3",organization_id:"org_123",invitee_email:"henry@example.com",roles:[{key:"developer",name:"Developer"}],status:"accepted",invited_by:{id:"user_3",name:"Charlie Davis"},created_at:Date.now()/1e3-86400*30,updated_at:Date.now()/1e3-86400*28,expires_at:Date.now()/1e3-86400*10,last_sent_at:Date.now()/1e3-86400*30,resend_count:0,accepted_at:Date.now()/1e3-86400*28,object:"invitation"},{id:"inv_4",organization_id:"org_123",invitee_email:"irene@example.com",roles:[{key:"viewer",name:"Viewer"}],status:"expired",invited_by:{id:"user_4",name:"Diana Evans"},created_at:Date.now()/1e3-86400*15,updated_at:Date.now()/1e3-86400*15,expires_at:Date.now()/1e3-86400*5,last_sent_at:Date.now()/1e3-86400*15,resend_count:1,object:"invitation"},{id:"inv_5",organization_id:"org_123",invitee_email:"jack@example.com",roles:[{key:"admin",name:"Admin"}],status:"pending",invited_by:{id:"user_1",name:"Alice Smith"},created_at:Date.now()/1e3-86400*1,updated_at:Date.now()/1e3-86400*1,expires_at:Date.now()/1e3+86400*7,last_sent_at:Date.now()/1e3-86400*1,resend_count:0,object:"invitation"}];function b1(e){let t=[...v1];if(e!=null&&e.search){const c=e.search.toLowerCase();t=t.filter(m=>m.invitee_email.toLowerCase().includes(c))}if(e!=null&&e.roles){const c=e.roles.split(",");t=t.filter(m=>m.roles.some(v=>c.includes(v.key)))}let r=e!=null&&e.status?e.status.split(","):["pending"];r.length>0&&r[0]!==""&&(t=t.filter(c=>r.includes(c.status)));const n=(e==null?void 0:e.page)||1,o=(e==null?void 0:e.limit)||5,i=(n-1)*o,s=i+o;return{data:t.slice(i,s),object:"list",pagination:{page:n,limit:o,total:t.length,total_pages:Math.ceil(t.length/o)}}}var y1=Object.defineProperty,V=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&y1(t,r,o),o};class j extends f{constructor(){super(...arguments),this.mode="PAGE",this.title="Member Management",this.description="Manage member access, roles, and invitations",this.organizationId="",this.isOpen=!1,this.monitoringFlag=!1,this.membersSearchTerm="",this.invitationsSearchTerm="",this.members=[],this.invitations=[],this.membersLoading=!1,this.invitationsLoading=!1,this.useMockData=!1,this.membersPage=1,this.membersTotalPages=0,this.invitationsPage=1,this.invitationsTotalPages=0,this.membersTotal=0,this.invitationsTotal=0,this.rowsPerPage=5,this.inviteDrawerId="pont-member-invite",this.availableRoles=[],this.isLoadingRoles=!1,this._rolesLoaded=!1,this.memberFilters={roles:[]},this.invitationFilters={roles:[],status:[]},this.invitationStatusOptions=[{value:"pending",label:"Pending"},{value:"accepted",label:"Accepted"},{value:"expired",label:"Expired"}],this.selectedMember=null,this.actionModalOpen=!1,this.actionModalConfig={title:"",description:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:()=>{},warningText:""},this.manageRolesDrawerId="pont-manage-roles",this._handleOpen=()=>{this.mode==="MODAL"&&(this.isOpen=!0)},this._handleClose=()=>{this.mode==="MODAL"&&(this.isOpen=!1)},this.loadData=async()=>{this.organizationId&&(await this.loadMembers(),await this.loadInvitations(),this.tryRemoveFallback())}}async openActionModal(t){this.actionModalConfig={...this.actionModalConfig,...t},this.actionModalOpen=!1,this.requestUpdate(),await this.updateComplete,this.actionModalOpen=!0}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r?r.remove():console.warn("fallback not found")})}connectedCallback(){super.connectedCallback(),window.addEventListener("open-member-management",this._handleOpen),window.addEventListener("close-member-management",this._handleClose),document.addEventListener("open-member-management",this._handleOpen),document.addEventListener("close-member-management",this._handleClose),window.addEventListener("invite-members-success",this.loadData),window.addEventListener("update-members-role",this.loadData)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("open-member-management",this._handleOpen),window.removeEventListener("close-member-management",this._handleClose),document.removeEventListener("open-member-management",this._handleOpen),document.removeEventListener("close-member-management",this._handleClose),window.removeEventListener("invite-members-success",this.loadData),window.removeEventListener("update-members-role",this.loadData),this._membersSearchDebounceTimer&&window.clearTimeout(this._membersSearchDebounceTimer),this._invitationsSearchDebounceTimer&&window.clearTimeout(this._invitationsSearchDebounceTimer)}firstUpdated(){this.isOpen=this.mode==="PAGE",this.loadData(),this.organizationId&&!this._rolesLoaded&&this.loadRoles()}updated(t){t.has("mode")&&(this.isOpen=this.mode==="PAGE"),t.has("organizationId")&&this.organizationId&&!this._rolesLoaded&&this.loadRoles()}async loadRoles(){if(!(!this.organizationId||this._rolesLoaded))try{this.isLoadingRoles=!0;let t;if(this.useMockData)t=m1({resource_id:this.organizationId,resource_type:"organization"});else{const r={resource_id:this.organizationId,resource_type:"organization"};t=await ul(r)}this.availableRoles=t.data.map(r=>({value:r.key||r.name,label:r.name})),this._rolesLoaded=!0}catch(t){console.error("Failed to load roles:",t)}finally{this.isLoadingRoles=!1}}async loadMembers(t=1,r=this.rowsPerPage,n,o){try{this.membersLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.memberFilters;s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let d;this.useMockData?d=f1(i):d=await RP(this.organizationId,i),this.members=d.data,this.membersPage=d.pagination.page,this.membersTotalPages=d.pagination.total_pages,this.membersTotal=d.pagination.total,this.useMockData=!1}catch(i){console.error("[pont-member-management] Failed loading members:",i)}finally{this.membersLoading=!1}}async loadInvitations(t=1,r=this.rowsPerPage,n,o){try{this.invitationsLoading=!0;const i={page:t,limit:r};n&&(i.search=n);const s=o||this.invitationFilters;let d="pending";s.status&&s.status.length>0&&(d=s.status.join(",")),i.status=d,s.roles&&s.roles.length&&(i.roles=s.roles.join(","));let c;this.useMockData?c=b1(i):c=await FP(this.organizationId,i),this.invitations=c.data,this.invitationsPage=c.pagination.page,this.invitationsTotalPages=c.pagination.total_pages,this.invitationsTotal=c.pagination.total}catch(i){console.error("[pont-member-management] Failed loading invitations:",i)}finally{this.invitationsLoading=!1}}handleMembersPageChange(t){const r=t.detail.page;this.loadMembers(r,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsPageChange(t){const r=t.detail.page;this.loadInvitations(r,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersSearchChange(t){this.membersSearchTerm=t.detail.searchTerm||"",this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm.trim()?this.membersSearchTerm:void 0,this.memberFilters)}handleInvitationsSearchChange(t){this.invitationsSearchTerm=t.detail.searchTerm||"",this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm.trim()?this.invitationsSearchTerm:void 0,this.invitationFilters)}handleMembersFilterChange(t){const r=t.detail.roles||[];this.memberFilters={roles:r},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsFilterChange(t){const r=t.detail||{};this.invitationFilters={roles:r.roles||[],status:r.status||[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersClearFilters(){this.memberFilters={roles:[]},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsClearFilters(){this.invitationFilters={roles:[],status:[]},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRemoveFilter(t){const r=t.detail.filterValue;this.memberFilters={...this.memberFilters,roles:this.memberFilters.roles.filter(n=>n!==r)},this.loadMembers(1,this.rowsPerPage,this.membersSearchTerm,this.memberFilters)}handleInvitationsRemoveFilter(t){const r=t.detail.filterValue;this.invitationFilters={...this.invitationFilters,roles:this.invitationFilters.roles.filter(n=>n!==r),status:this.invitationFilters.status.filter(n=>n!==r)},this.loadInvitations(1,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}handleMembersRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadMembers(1,r,this.membersSearchTerm,this.memberFilters)}handleInvitationsRowsPerPageChange(t){const r=t.detail.rowsPerPage;this.rowsPerPage=r,this.loadInvitations(1,r,this.invitationsSearchTerm,this.invitationFilters)}handleRefresh(t){t==="members"?this.loadMembers(this.membersPage,this.rowsPerPage,this.membersSearchTerm,this.memberFilters):this.loadInvitations(this.invitationsPage,this.rowsPerPage,this.invitationsSearchTerm,this.invitationFilters)}openManageRoles(t){const r=t.detail;this.selectedMember=r,setTimeout(()=>{document.dispatchEvent(new CustomEvent("open-sidedrawer",{detail:{id:this.manageRolesDrawerId,side:"right"},bubbles:!0,composed:!0}))},50)}handleSuspendMember(t){var n,o;const r=t.detail;this.openActionModal({title:"Suspend User",description:l`
|
|
4410
4410
|
<p part="description">
|
|
4411
4411
|
Are you sure you want to suspend
|
|
4412
4412
|
<span part="highlight-name"
|
|
@@ -4584,10 +4584,10 @@
|
|
|
4584
4584
|
`}};Ui([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ui([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ui([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ui([p("pont-preview")],exports.PreviewComponent);var $1=Object.defineProperty,P1=Object.getOwnPropertyDescriptor,ji=(e,t,r,n)=>{for(var o=n>1?void 0:n?P1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$1(t,r,o),o};exports.PontSignIn=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signin-flow-passkey"),this.tryRemoveFallback()}catch(t){console.error("[pont-signin] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
|
|
4585
4585
|
.renderSpec=${this.renderSpec}
|
|
4586
4586
|
.branding=${this.branding}
|
|
4587
|
-
></pont-layout>`:l``}};ji([ct({context:
|
|
4587
|
+
></pont-layout>`:l``}};ji([ct({context:cl,subscribe:!0})],exports.PontSignIn.prototype,"renderSpec",2);ji([ct({context:On,subscribe:!0})],exports.PontSignIn.prototype,"branding",2);ji([ct({context:pl,subscribe:!0})],exports.PontSignIn.prototype,"locales",2);exports.PontSignIn=ji([p("pont-signin")],exports.PontSignIn);var C1=Object.defineProperty,S1=Object.getOwnPropertyDescriptor,qi=(e,t,r,n)=>{for(var o=n>1?void 0:n?S1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&C1(t,r,o),o};exports.PontSignUp=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signup-flow"),this.tryRemoveFallback()}catch(t){console.error("[pont-signup] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
|
|
4588
4588
|
.renderSpec=${this.renderSpec}
|
|
4589
4589
|
.branding=${this.branding}
|
|
4590
|
-
></pont-layout>`:l``}};qi([ct({context:
|
|
4590
|
+
></pont-layout>`:l``}};qi([ct({context:cl,subscribe:!0})],exports.PontSignUp.prototype,"renderSpec",2);qi([ct({context:On,subscribe:!0})],exports.PontSignUp.prototype,"branding",2);qi([ct({context:pl,subscribe:!0})],exports.PontSignUp.prototype,"locales",2);exports.PontSignUp=qi([p("pont-signup")],exports.PontSignUp);var E1=Object.defineProperty,Le=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&E1(t,r,o),o};class zi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:n}=this.user||{};return l`
|
|
4591
4591
|
<div
|
|
4592
4592
|
class=${Vt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
|
|
4593
4593
|
>
|
|
@@ -4607,7 +4607,7 @@
|
|
|
4607
4607
|
>`:""}
|
|
4608
4608
|
</div>
|
|
4609
4609
|
</div>
|
|
4610
|
-
`}}Le([a({type:Boolean})],
|
|
4610
|
+
`}}Le([a({type:Boolean})],zi.prototype,"isTrigger");Le([a({type:Object})],zi.prototype,"user");customElements.define("pont-user-snippet",zi);class Fe extends f{constructor(){super(...arguments),this.accountSettingsPath="",this.menuItems=[],this.user={},this.signedIn=!1,this.isLoading=!0,this._itemStates=new Map,this._subMenuOpen=new Map,this._handleAccountSettings=()=>{this.dispatchEvent(new CustomEvent("account-settings",{bubbles:!0,composed:!0})),this.accountSettingsPath&&this._navigate(this.accountSettingsPath)},this._handleLogout=()=>{this.dispatchEvent(new CustomEvent("logout",{bubbles:!0,composed:!0})),tt.signOut()}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._syncItemStates()}updated(t){t.has("auth")&&this.loadUser()}_syncItemStates(){for(const t of this.menuItems){const r=t.id??t.label;t.type==="toggle"?this._itemStates.set(r,{checked:t.checked??!1}):t.type==="select"&&(this._itemStates.set(r,{value:t.value??""}),this._subMenuOpen.set(r,!1))}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}async loadUser(){var t;if(!((t=this.auth)!=null&&t.resolved)){this.isLoading=!0;return}this.isLoading=!0;try{const r=this.auth.isAuthenticated;if(this.signedIn=r,r){const n=tt.getAuthenticatedUser();this.user={email:n==null?void 0:n.email,name:(n==null?void 0:n.name)||`${(n==null?void 0:n.given_name)||""} ${(n==null?void 0:n.family_name)||""}`.trim(),avatar_url:n==null?void 0:n.picture}}}catch(r){console.error("[pont-nav-user] Failed to load user:",r),this.signedIn=!1}finally{this.isLoading=!1,this.tryRemoveFallback()}}_handleToggle(t,r){const n=t.id??t.label;this._itemStates.set(n,{checked:r}),this.requestUpdate(),t.onToggle&&t.onToggle(r)}_handleSelect(t,r){const n=t.id??t.label;this._itemStates.set(n,{value:r}),this.requestUpdate(),this._subMenuOpen.set(n,!1),this.requestUpdate(),t.onSelect&&t.onSelect(r)}_toggleSubMenu(t,r){for(const[n,o]of this._subMenuOpen)n!==t&&this._subMenuOpen.set(n,!1);this._subMenuOpen.set(t,r),this.requestUpdate()}_renderActionItem(t){return l`
|
|
4611
4611
|
<pont-dropdown-menu-item
|
|
4612
4612
|
@click=${r=>this._handleMenuItemClick(r,t)}
|
|
4613
4613
|
data-id=${t.id||""}
|
|
@@ -5369,7 +5369,7 @@
|
|
|
5369
5369
|
</pont-field-description>
|
|
5370
5370
|
`:h}
|
|
5371
5371
|
</pont-field>
|
|
5372
|
-
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${ht}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const
|
|
5372
|
+
`}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${ht}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const ns={label:"Link",service:"auth"};var s0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,Me=(e,t,r,n)=>{for(var o=n>1?void 0:n?a0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s0(t,r,o),o};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=wt(),this._label=ns.label,this.service=ns.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:n,event:o}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:n,event:o},bubbles:!0,composed:!0}));try{if(o&&n==="auth"){const i=await tt.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:o,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:o,message:s},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ns.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
|
|
5373
5373
|
<div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
|
|
5374
5374
|
${(t=this.prompt)!=null&&t.length?l`
|
|
5375
5375
|
<p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
|
|
@@ -5393,7 +5393,7 @@
|
|
|
5393
5393
|
* @license
|
|
5394
5394
|
* Copyright 2020 Google LLC
|
|
5395
5395
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5396
|
-
*/const jh=Symbol.for(""),l0=e=>{if((e==null?void 0:e.r)===jh)return e==null?void 0:e._$litStatic$},d0=e=>({_$litStatic$:e,r:jh}),Rc=new Map,c0=e=>(t,...r)=>{const n=r.length;let o,i;const s=[],d=[];let c,m=0,v=!1;for(;m<n;){for(c=t[m];m<n&&(i=r[m],(o=l0(i))!==void 0);)c+=o+t[++m],v=!0;m!==n&&d.push(i),s.push(c),m++}if(m===n&&s.push(t[n]),v){const b=s.join("$$lit$$");(t=Rc.get(b))===void 0&&(s.raw=s,Rc.set(b,t=s)),r=d}return e(t,...r)},
|
|
5396
|
+
*/const jh=Symbol.for(""),l0=e=>{if((e==null?void 0:e.r)===jh)return e==null?void 0:e._$litStatic$},d0=e=>({_$litStatic$:e,r:jh}),Rc=new Map,c0=e=>(t,...r)=>{const n=r.length;let o,i;const s=[],d=[];let c,m=0,v=!1;for(;m<n;){for(c=t[m];m<n&&(i=r[m],(o=l0(i))!==void 0);)c+=o+t[++m],v=!0;m!==n&&d.push(i),s.push(c),m++}if(m===n&&s.push(t[n]),v){const b=s.join("$$lit$$");(t=Rc.get(b))===void 0&&(s.raw=s,Rc.set(b,t=s)),r=d}return e(t,...r)},is=c0(l);var p0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,_t=(e,t,r,n)=>{for(var o=n>1?void 0:n?h0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&p0(t,r,o),o};exports.PontOtp=class extends jt{constructor(){super(...arguments),this.excludeFromForm=!1,this.required=!1,this.requiredError="Code is required.",this.incompleteError="Please enter the complete verification code.",this.variant="with_separator",this.length=6,this.timeout=300,this.dataKey="code",this.name="",this.disabled=!1,this.autoSubmit=!1,this.event="",this.resendText="",this.resendButtonText="",this.resendEvent="",this.id="otp",this._invalid=!1,this._error="",this._value="",this.handleComplete=async t=>{if(this._value=t,this.autoSubmit&&this.event){const r={};r[this.dataKey]=t;try{await tt.processLoginflowEvent({event:this.event,data:r})}finally{this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:this.event})}return}this.emit("pont-otp:complete",{id:this.id,dataKey:this.dataKey,value:t,event:null})},this.handleFocus=()=>{this.emit("pont-otp:focus",{id:this.id,dataKey:this.dataKey})},this.handleBlur=()=>{this.emit("pont-otp:blur",{id:this.id,dataKey:this.dataKey})},this.handleResend=async()=>{if(this.resendEvent)try{await tt.processLoginflowEvent({event:this.resendEvent})}finally{this.emit("pont-otp:resend",{id:this.id,event:this.resendEvent})}}}get _containerElement(){return this.querySelector(`pont-input-otp[part=${this.id?this.id:"otp"}]`)}get isFormField(){return!this.excludeFromForm}createRenderRoot(){return this}get value(){return this._value}validate(){const t=this._value.trim();return this.required&&!t?(this._invalid=!0,this._error=this.requiredError,!1):t.length!==this.length?(this._invalid=!0,this._error=this.incompleteError,!1):(this._invalid=!1,this._error="",!0)}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}buildOTPContentHTML(){const t=this.variant,r=this.length,n=(s,d)=>Array.from({length:d-s},(c,m)=>`<pont-input-otp-slot index="${s+m}"></pont-input-otp-slot>`).join(""),o=s=>`<pont-input-otp-group>${s}</pont-input-otp-group>`,i="<pont-input-otp-separator></pont-input-otp-separator>";if(t==="simple"){const s=Math.ceil(r/2);return o(n(0,s))+i+o(n(s,r))}if(t==="with_separator"){const s=Math.ceil(r/3);return o(n(0,s))+i+o(n(s,s*2))+i+o(n(s*2,r))}return t==="with_spacing"?Array.from({length:r},(s,d)=>o(`<pont-input-otp-slot index="${d}"></pont-input-otp-slot>`)).join(""):o(n(0,r))}render(){const t=this.variant||"digits_only";return is`
|
|
5397
5397
|
<pont-field ?disabled=${this.disabled} ?invalid=${this._invalid}>
|
|
5398
5398
|
<pont-input-otp
|
|
5399
5399
|
part=${this.id?this.id:"otp"}
|
|
@@ -5410,13 +5410,13 @@
|
|
|
5410
5410
|
>
|
|
5411
5411
|
${d0(this.buildOTPContentHTML())}
|
|
5412
5412
|
</pont-input-otp>
|
|
5413
|
-
${this._invalid?
|
|
5413
|
+
${this._invalid?is`
|
|
5414
5414
|
<pont-field-error
|
|
5415
5415
|
.errors=${[{message:this._error}]}
|
|
5416
5416
|
></pont-field-error>
|
|
5417
5417
|
`:h}
|
|
5418
5418
|
</pont-field>
|
|
5419
|
-
${this.resendButtonText?
|
|
5419
|
+
${this.resendButtonText?is`
|
|
5420
5420
|
<div class="pont-flex pont-justify-center">
|
|
5421
5421
|
<pont-typography-p>${this.resendText}</pont-typography-p>
|
|
5422
5422
|
|
|
@@ -5490,14 +5490,14 @@
|
|
|
5490
5490
|
>
|
|
5491
5491
|
</div>
|
|
5492
5492
|
</div>
|
|
5493
|
-
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${ht}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function C0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ho={},
|
|
5494
|
-
]))+`;he.KANJI=new RegExp(r,"g"),he.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),he.BYTE=new RegExp(n,"g"),he.NUMERIC=new RegExp(e,"g"),he.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return he.testKanji=function(c){return o.test(c)},he.testNumeric=function(c){return i.test(c)},he.testAlphanumeric=function(c){return s.test(c)},he}var Vc;function to(){return Vc||(Vc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(
|
|
5495
|
-
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),n.put(i,13)}},
|
|
5496
|
-
Suggested mode is: `+t.toString(R));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new n(S);case t.KANJI:return new i(S);case t.BYTE:return new o(S)}}e.fromArray=function(D){return D.reduce(function(L,R){return typeof R=="string"?L.push(x(R,null)):R.data&&L.push(x(R.data,R.mode)),L},[])},e.fromString=function(D,L){const R=b(D,d.isKanjiModeEnabled()),K=C(R),O=P(K,L),A=c.find_path(O.map,"start","end"),T=[];for(let E=1;E<A.length-1;E++)T.push(O.table[A[E]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(
|
|
5493
|
+
`}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${ht}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function C0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ho={},ss,Ic;function S0(){return Ic||(Ic=1,ss=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ss}var as={},rr={},Ac;function Xr(){if(Ac)return rr;Ac=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return rr.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},rr.getSymbolTotalCodewords=function(n){return t[n]},rr.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},rr.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},rr.isKanjiModeEnabled=function(){return typeof e<"u"},rr.toSJIS=function(n){return e(n)},rr}var ls={},Tc;function fl(){return Tc||(Tc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(ls)),ls}var ds,Dc;function E0(){if(Dc)return ds;Dc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let n=0;n<r;n++)this.putBit((t>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ds=e,ds}var cs,Lc;function x0(){if(Lc)return cs;Lc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,n,o){const i=t*this.size+r;this.data[i]=n,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,n){this.data[t*this.size+r]^=n},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},cs=e,cs}var ps={},Fc;function O0(){return Fc||(Fc=1,(function(e){const t=Xr().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,i=t(n),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,d=[i-7];for(let c=1;c<o-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(n){const o=[],i=e.getRowColCoords(n),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||o.push([i[d],i[c]]);return o}})(ps)),ps}var hs={},kc;function R0(){if(kc)return hs;kc=1;const e=Xr().getSymbolSize,t=7;return hs.getPositions=function(n){const o=e(n);return[[0,0],[o-t,0],[0,o-t]]},hs}var us={},Nc;function I0(){return Nc||(Nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=o.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=o.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=o.get(d,c)+o.get(d,c+1)+o.get(d+1,c)+o.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|o.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|o.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let c=0;c<s;c++)i+=o.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(n,o,i){switch(n){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(o,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(o,c,d))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,o);const v=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),v<c&&(c=v,d=m)}return d}})(us)),us}var jn={},Mc;function qh(){if(Mc)return jn;Mc=1;const e=fl(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return jn.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},jn.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return r[(o-1)*4+0];case e.M:return r[(o-1)*4+1];case e.Q:return r[(o-1)*4+2];case e.H:return r[(o-1)*4+3];default:return}},jn}var ms={},Zo={},Bc;function A0(){if(Bc)return Zo;Bc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let n=1;for(let o=0;o<255;o++)e[o]=n,t[n]=o,n<<=1,n&256&&(n^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Zo.log=function(n){if(n<1)throw new Error("log("+n+")");return t[n]},Zo.exp=function(n){return e[n]},Zo.mul=function(n,o){return n===0||o===0?0:e[t[n]+t[o]]},Zo}var Uc;function T0(){return Uc||(Uc=1,(function(e){const t=A0();e.mul=function(n,o){const i=new Uint8Array(n.length+o.length-1);for(let s=0;s<n.length;s++)for(let d=0;d<o.length;d++)i[s+d]^=t.mul(n[s],o[d]);return i},e.mod=function(n,o){let i=new Uint8Array(n);for(;i.length-o.length>=0;){const s=i[0];for(let c=0;c<o.length;c++)i[c]^=t.mul(o[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let i=0;i<n;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(ms)),ms}var gs,jc;function D0(){if(jc)return gs;jc=1;const e=T0();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(n.length+this.degree);o.set(n);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},gs=t,gs}var fs={},vs={},bs={},qc;function zh(){return qc||(qc=1,bs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),bs}var he={},zc;function Vh(){if(zc)return he;zc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
|
|
5494
|
+
]))+`;he.KANJI=new RegExp(r,"g"),he.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),he.BYTE=new RegExp(n,"g"),he.NUMERIC=new RegExp(e,"g"),he.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return he.testKanji=function(c){return o.test(c)},he.testNumeric=function(c){return i.test(c)},he.testAlphanumeric=function(c){return s.test(c)},he}var Vc;function to(){return Vc||(Vc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(vs)),vs}var Hc;function L0(){return Hc||(Hc=1,(function(e){const t=Xr(),r=qh(),n=fl(),o=to(),i=zh(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function m(w,_){return o.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const x=m(P.mode,_);C+=x+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,o.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=o.BYTE);const x=t.getSymbolTotalCodewords(_),S=r.getTotalCodewordsCount(_,C),D=(x-S)*8;if(P===o.MIXED)return D;const L=D-m(P,_);switch(P){case o.NUMERIC:return Math.floor(L/10*3);case o.ALPHANUMERIC:return Math.floor(L/11*2);case o.KANJI:return Math.floor(L/13);case o.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const x=n.from(C,n.M);if(Array.isArray(_)){if(_.length>1)return b(_,x);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),x)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(fs)),fs}var ys={},Gc;function F0(){if(Gc)return ys;Gc=1;const e=Xr(),t=1335,r=21522,n=e.getBCHDigit(t);return ys.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-n>=0;)c^=t<<e.getBCHDigit(c)-n;return(d<<10|c)^r},ys}var _s={},ws,Kc;function k0(){if(Kc)return ws;Kc=1;const e=to();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let o,i,s;for(o=0;o+3<=this.data.length;o+=3)i=this.data.substr(o,3),s=parseInt(i,10),n.put(s,10);const d=this.data.length-o;d>0&&(i=this.data.substr(o),s=parseInt(i,10),n.put(s,d*3+1))},ws=t,ws}var $s,Wc;function N0(){if(Wc)return $s;Wc=1;const e=to(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=e.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[i]),6)},$s=r,$s}var Ps,Yc;function M0(){if(Yc)return Ps;Yc=1;const e=to();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(n){return n*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let n=0,o=this.data.length;n<o;n++)r.put(this.data[n],8)},Ps=t,Ps}var Cs,Qc;function B0(){if(Qc)return Cs;Qc=1;const e=to(),t=Xr();function r(n){this.mode=e.KANJI,this.data=n}return r.getBitsLength=function(o){return o*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o<this.data.length;o++){let i=t.toSJIS(this.data[o]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
5495
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),n.put(i,13)}},Cs=r,Cs}var Ss={exports:{}},Zc;function U0(){return Zc||(Zc=1,(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},s={};s[n]=0;var d=t.PriorityQueue.make();d.push(n,0);for(var c,m,v,b,w,_,C,P,x;!d.empty();){c=d.pop(),m=c.value,b=c.cost,w=r[m]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],x=typeof s[v]>"u",(x||P>C)&&(s[v]=C,d.push(v,C),i[v]=m))}if(typeof o<"u"&&typeof s[o]>"u"){var S=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ss)),Ss.exports}var Jc;function j0(){return Jc||(Jc=1,(function(e){const t=to(),r=k0(),n=N0(),o=M0(),i=B0(),s=Vh(),d=Xr(),c=U0();function m(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const R=[];let K;for(;(K=S.exec(L))!==null;)R.push({data:K[0],index:K.index,mode:D,length:K[0].length});return R}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let R,K;return d.isKanjiModeEnabled()?(R=v(s.BYTE,t.BYTE,S),K=v(s.KANJI,t.KANJI,S)):(R=v(s.BYTE_KANJI,t.BYTE,S),K=[]),D.concat(L,R,K).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return n.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return o.getBitsLength(S)}}function _(S){return S.reduce(function(D,L){const R=D.length-1>=0?D[D.length-1]:null;return R&&R.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(S){const D=[];for(let L=0;L<S.length;L++){const R=S[L];switch(R.mode){case t.NUMERIC:D.push([R,{data:R.data,mode:t.ALPHANUMERIC,length:R.length},{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.ALPHANUMERIC:D.push([R,{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.KANJI:D.push([R,{data:R.data,mode:t.BYTE,length:m(R.data)}]);break;case t.BYTE:D.push([{data:R.data,mode:t.BYTE,length:m(R.data)}])}}return D}function P(S,D){const L={},R={start:{}};let K=["start"];for(let O=0;O<S.length;O++){const A=S[O],T=[];for(let E=0;E<A.length;E++){const N=A[E],F=""+O+E;T.push(F),L[F]={node:N,lastCount:0},R[F]={};for(let $=0;$<K.length;$++){const k=K[$];L[k]&&L[k].node.mode===N.mode?(R[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),R[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}K=T}for(let O=0;O<K.length;O++)R[K[O]].end=0;return{map:R,table:L}}function x(S,D){let L;const R=t.getBestModeForData(S);if(L=t.from(D,R),L!==t.BYTE&&L.bit<R.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
|
|
5496
|
+
Suggested mode is: `+t.toString(R));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new n(S);case t.KANJI:return new i(S);case t.BYTE:return new o(S)}}e.fromArray=function(D){return D.reduce(function(L,R){return typeof R=="string"?L.push(x(R,null)):R.data&&L.push(x(R.data,R.mode)),L},[])},e.fromString=function(D,L){const R=b(D,d.isKanjiModeEnabled()),K=C(R),O=P(K,L),A=c.find_path(O.map,"start","end"),T=[];for(let E=1;E<A.length-1;E++)T.push(O.table[A[E]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(_s)),_s}var Xc;function q0(){if(Xc)return as;Xc=1;const e=Xr(),t=fl(),r=E0(),n=x0(),o=O0(),i=R0(),s=I0(),d=qh(),c=D0(),m=L0(),v=F0(),b=to(),w=j0();function _(O,A){const T=O.size,E=i.getPositions(A);for(let N=0;N<E.length;N++){const F=E[N][0],$=E[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?O.set(F+k,$+M,!0,!0):O.set(F+k,$+M,!1,!0))}}function C(O){const A=O.size;for(let T=8;T<A-8;T++){const E=T%2===0;O.set(T,6,E,!0),O.set(6,T,E,!0)}}function P(O,A){const T=o.getPositions(A);for(let E=0;E<T.length;E++){const N=T[E][0],F=T[E][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?O.set(N+$,F+k,!0,!0):O.set(N+$,F+k,!1,!0)}}function x(O,A){const T=O.size,E=m.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(E>>k&1)===1,O.set(N,F,$,!0),O.set(F,N,$,!0)}function S(O,A,T){const E=O.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?O.set(F,8,$,!0):F<8?O.set(F+1,8,$,!0):O.set(E-15+F,8,$,!0),F<8?O.set(8,E-F-1,$,!0):F<9?O.set(8,15-F-1+1,$,!0):O.set(8,15-F-1,$,!0);O.set(E-8,8,1,!0)}function D(O,A){const T=O.size;let E=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!O.isReserved(N,k-M)){let Xt=!1;$<A.length&&(Xt=(A[$]>>>F&1)===1),O.set(N,k-M,Xt),F--,F===-1&&($++,F=7)}if(N+=E,N<0||T<=N){N-=E,E=-E;break}}}function L(O,A,T){const E=new r;T.forEach(function(M){E.put(M.mode.bit,4),E.put(M.getLength(),b.getCharCountIndicator(M.mode,O)),M.write(E)});const N=e.getSymbolTotalCodewords(O),F=d.getTotalCodewordsCount(O,A),$=(N-F)*8;for(E.getLengthInBits()+4<=$&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const k=($-E.getLengthInBits())/8;for(let M=0;M<k;M++)E.put(M%2?17:236,8);return R(E,O,A)}function R(O,A,T){const E=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=E-N,$=d.getBlocksCount(A,T),k=E%$,M=$-k,Xt=Math.floor(E/$),pe=Math.floor(F/$),Fn=pe+1,eo=Xt-pe,$r=new c(eo);let ro=0;const It=new Array($),Pl=new Array($);let Gi=0;const Gh=new Uint8Array(O.buffer);for(let oo=0;oo<$;oo++){const Wi=oo<M?pe:Fn;It[oo]=Gh.slice(ro,ro+Wi),Pl[oo]=$r.encode(It[oo]),ro+=Wi,Gi=Math.max(Gi,Wi)}const Ki=new Uint8Array(E);let Cl=0,Be,Ue;for(Be=0;Be<Gi;Be++)for(Ue=0;Ue<$;Ue++)Be<It[Ue].length&&(Ki[Cl++]=It[Ue][Be]);for(Be=0;Be<eo;Be++)for(Ue=0;Ue<$;Ue++)Ki[Cl++]=Pl[Ue][Be];return Ki}function K(O,A,T,E){let N;if(Array.isArray(O))N=w.fromArray(O);else if(typeof O=="string"){let Xt=A;if(!Xt){const pe=w.rawSplit(O);Xt=m.getBestVersionForData(pe,T)}N=w.fromString(O,Xt||40)}else throw new Error("Invalid data");const F=m.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
|
|
5497
5497
|
The chosen QR Code version cannot contain this amount of data.
|
|
5498
5498
|
Minimum version required to store current data is: `+F+`.
|
|
5499
|
-
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new n(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&x(M,A),D(M,$),isNaN(E)&&(E=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(E,M),S(M,T,E),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:E,segments:N}}return
|
|
5500
|
-
`;return typeof d=="function"&&d(null,x),x},
|
|
5499
|
+
`);const $=L(A,T,N),k=e.getSymbolSize(A),M=new n(k);return _(M,A),C(M),P(M,A),S(M,T,0),A>=7&&x(M,A),D(M,$),isNaN(E)&&(E=s.getBestMask(M,S.bind(null,M,T))),s.applyMask(E,M),S(M,T,E),{modules:M,version:A,errorCorrectionLevel:T,maskPattern:E,segments:N}}return as.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let E=t.M,N,F;return typeof T<"u"&&(E=t.from(T.errorCorrectionLevel,t.M),N=m.from(T.version),F=s.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),K(A,N,E,F)},as}var Es={},xs={},tp;function Hh(){return tp||(tp=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){const i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){const s=o.modules.size,d=o.modules.data,c=e.getScale(s,i),m=Math.floor((s+i.margin*2)*c),v=i.margin*c,b=[i.color.light,i.color.dark];for(let w=0;w<m;w++)for(let _=0;_<m;_++){let C=(w*m+_)*4,P=i.color.light;if(w>=v&&_>=v&&w<m-v&&_<m-v){const x=Math.floor((w-v)/c),S=Math.floor((_-v)/c);P=b[d[x*s+S]?1:0]}n[C++]=P.r,n[C++]=P.g,n[C++]=P.b,n[C]=P.a}}})(xs)),xs}var ep;function z0(){return ep||(ep=1,(function(e){const t=Hh();function r(o,i,s){o.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=s,i.width=s,i.style.height=s+"px",i.style.width=s+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,s,d){let c=d,m=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(m=n()),c=t.getOptions(c);const v=t.getImageWidth(i.modules.size,c),b=m.getContext("2d"),w=b.createImageData(v,v);return t.qrToImageData(w.data,i,c),r(b,m,v),b.putImageData(w,0,0),m},e.renderToDataURL=function(i,s,d){let c=d;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const m=e.render(i,s,c),v=c.type||"image/png",b=c.rendererOpts||{};return m.toDataURL(v,b.quality)}})(Es)),Es}var Os={},rp;function V0(){if(rp)return Os;rp=1;const e=Hh();function t(o,i){const s=o.a/255,d=i+'="'+o.hex+'"';return s<1?d+" "+i+'-opacity="'+s.toFixed(2).slice(1)+'"':d}function r(o,i,s){let d=o+i;return typeof s<"u"&&(d+=" "+s),d}function n(o,i,s){let d="",c=0,m=!1,v=0;for(let b=0;b<o.length;b++){const w=Math.floor(b%i),_=Math.floor(b/i);!w&&!m&&(m=!0),o[b]?(v++,b>0&&w>0&&o[b-1]||(d+=m?r("M",w+s,.5+_+s):r("m",c,0),c=0,m=!1),w+1<i&&o[b+1]||(d+=r("h",v),v=0)):c++}return d}return Os.render=function(i,s,d){const c=e.getOptions(s),m=i.modules.size,v=i.modules.data,b=m+c.margin*2,w=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+b+"v"+b+'H0z"/>':"",_="<path "+t(c.color.dark,"stroke")+' d="'+n(v,m,c.margin)+'"/>',C='viewBox="0 0 '+b+" "+b+'"',x='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+C+' shape-rendering="crispEdges">'+w+_+`</svg>
|
|
5500
|
+
`;return typeof d=="function"&&d(null,x),x},Os}var op;function H0(){if(op)return ho;op=1;const e=S0(),t=q0(),r=z0(),n=V0();function o(i,s,d,c,m){const v=[].slice.call(arguments,1),b=v.length,w=typeof v[b-1]=="function";if(!w&&!e())throw new Error("Callback required as last argument");if(w){if(b<2)throw new Error("Too few arguments provided");b===2?(m=d,d=s,s=c=void 0):b===3&&(s.getContext&&typeof m>"u"?(m=c,c=void 0):(m=c,c=d,d=s,s=void 0))}else{if(b<1)throw new Error("Too few arguments provided");return b===1?(d=s,s=c=void 0):b===2&&!s.getContext&&(c=d,d=s,s=void 0),new Promise(function(_,C){try{const P=t.create(d,c);_(i(P,s,c))}catch(P){C(P)}})}try{const _=t.create(d,c);m(null,i(_,s,c))}catch(_){m(_)}}return ho.create=t.create,ho.toCanvas=o.bind(null,r.render),ho.toDataURL=o.bind(null,r.renderToDataURL),ho.toString=o.bind(null,function(i,s,d){return n.render(i,d)}),ho}var G0=H0();const K0=C0(G0),qn={url:"",timeout:10,reappearButtonText:"Show QR Code",errorCorrection:"M"};var W0=Object.defineProperty,Y0=Object.getOwnPropertyDescriptor,Je=(e,t,r,n)=>{for(var o=n>1?void 0:n?Y0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&W0(t,r,o),o};exports.PontQrCode=class extends f{constructor(){super(...arguments),this.seed=wt(),this.url=qn.url,this.timeout=qn.timeout,this.reappearButtonText=qn.reappearButtonText,this.disabled=!1,this.errorCorrection=qn.errorCorrection,this._obscured=!1,this._canvasElement=null,this._handleReappear=()=>{this.disabled||(this._obscured=!1,this._clearTimer(),this._startTimer(),this.emit("pont-qr:reappear",{id:this.rootId,url:this.url}))}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontQrCode.TAG}-${this.seed}`}get canvasId(){return`${this.rootId}-${exports.PontQrCode.QR_CANVAS}`}get overlayId(){return`${this.rootId}-${exports.PontQrCode.OVERLAY}`}get reappearButtonId(){return`${this.rootId}-${exports.PontQrCode.REAPPEAR_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startTimer()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}firstUpdated(){const t=this.querySelector(`#${this.canvasId}`);t&&(this._canvasElement=t,this._renderQR())}updated(t){(t.has("url")||t.has("errorCorrection"))&&(this._renderQR(),this._obscured=!1,this._clearTimer(),this._startTimer()),t.has("timeout")&&(this._clearTimer(),this._startTimer())}_startTimer(){this.timeout<=0||(this._clearTimer(),this._timer=window.setTimeout(()=>{this._obscured=!0,this._timer=void 0,this.emit("pont-qr:obscured",{id:this.rootId,url:this.url})},this.timeout*1e3))}_clearTimer(){this._timer&&(clearTimeout(this._timer),this._timer=void 0)}_renderQR(){if(!this._canvasElement||!this.url)return;const t=getComputedStyle(this),r=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-width"))||200,n=parseInt(t.getPropertyValue("--pont-qr-code-canvas-render-height"))||200;this._canvasElement.width=r,this._canvasElement.height=n;const o={errorCorrectionLevel:this.errorCorrection};K0.toCanvas(this._canvasElement,this.url,o,i=>{i&&(console.warn("QR generation failed:",i),this.emit("pont-qr:error",{error:i,url:this.url}))})}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this._obscured&&!this.disabled;return l`
|
|
5501
5501
|
<div
|
|
5502
5502
|
part=${exports.PontQrCode.PARTS.root}
|
|
5503
5503
|
id=${this.rootId}
|
|
@@ -5586,7 +5586,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5586
5586
|
</div>
|
|
5587
5587
|
</div>
|
|
5588
5588
|
</div>
|
|
5589
|
-
`}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${ht}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const
|
|
5589
|
+
`}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${ht}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const Rs={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var J0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,zo=(e,t,r,n)=>{for(var o=n>1?void 0:n?X0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J0(t,r,o),o};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=Rs.title,this.subtitle=Rs.subtitle,this.codes=Rs.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
|
|
5590
5590
|
`);try{await navigator.clipboard.writeText(t),this.emit("pont-recovery-codes:copied",{codes:this.codes}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(r){console.warn("Failed to copy codes:",r),this.emit("pont-recovery-codes:copy-error",{error:r})}},this._handleDownload=()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
|
|
5591
5591
|
`),r=new Blob([t],{type:"text/plain"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download="recovery-codes.txt",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n),this.emit("pont-recovery-codes:downloaded",{codes:this.codes})}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this.codes&&this.codes.length>0;return l`
|
|
5592
5592
|
<div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
|
|
@@ -5678,7 +5678,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5678
5678
|
<circle cx="12" cy="12" r="10"/>
|
|
5679
5679
|
<path d="M12 16v-4"/>
|
|
5680
5680
|
<path d="M12 8h.01"/>
|
|
5681
|
-
`},
|
|
5681
|
+
`},Is={status:"default",palette:"default",variant:"default"};var e2=Object.defineProperty,r2=Object.getOwnPropertyDescriptor,Xe=(e,t,r,n)=>{for(var o=n>1?void 0:n?r2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&e2(t,r,o),o};exports.PontAlert=class extends f{constructor(){super(...arguments),this.seed=wt(),this.status=Is.status,this.palette=Is.palette,this.variant=Is.variant}get _defaultTitle(){return this.status==="default"?"Alert":this.status.charAt(0).toUpperCase()+this.status.slice(1)}get title(){return this._title??this._defaultTitle}set title(t){const r=this.title;this._title=t||void 0,this.requestUpdate("title",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontAlert.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontAlert.ICON}`}get titleId(){return`${this.rootId}-${exports.PontAlert.TITLE}`}get descriptionId(){return`${this.rootId}-${exports.PontAlert.DESCRIPTION}`}get _rootVariant(){let t=this.palette==="base"?"default":this.palette==="brand"?"brand":this.status==="error"?"destructive":this.status;return this.variant==="tonal"&&t!=="default"&&(t+="-tonal"),t}_renderIcon(){if(!this.icon)return h;const t=t2[this.status];return l`
|
|
5682
5682
|
<svg
|
|
5683
5683
|
id="${this.iconId}"
|
|
5684
5684
|
part="${exports.PontAlert.PARTS.icon}"
|
|
@@ -5723,7 +5723,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5723
5723
|
<div part=${this.id?this.id:"countdown"}>
|
|
5724
5724
|
<pont-typography-p>${this.renderContent()}</pont-typography-p>
|
|
5725
5725
|
</div>
|
|
5726
|
-
`}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var i2=Object.defineProperty,s2=Object.getOwnPropertyDescriptor,
|
|
5726
|
+
`}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var i2=Object.defineProperty,s2=Object.getOwnPropertyDescriptor,Vi=(e,t,r,n)=>{for(var o=n>1?void 0:n?s2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&i2(t,r,o),o};exports.PontBlock=class extends jt{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new z$(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await wa()}async updated(){await this.updateComplete,await wa()}_renderWatermark(){return l`
|
|
5727
5727
|
<pont-card-footer border>
|
|
5728
5728
|
<pont-watermark variant="muted"></pont-watermark>
|
|
5729
5729
|
</pont-card-footer>
|
|
@@ -5736,16 +5736,16 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5736
5736
|
<pont-card-content></pont-card-content>
|
|
5737
5737
|
${this.branding.showWatermark?this._renderWatermark():h}
|
|
5738
5738
|
</pont-card>
|
|
5739
|
-
`}};
|
|
5739
|
+
`}};Vi([a()],exports.PontBlock.prototype,"id",2);Vi([a()],exports.PontBlock.prototype,"align",2);Vi([a()],exports.PontBlock.prototype,"justify",2);exports.PontBlock=Vi([p("pont-block")],exports.PontBlock);var a2=Object.defineProperty,l2=Object.getOwnPropertyDescriptor,vl=(e,t,r,n)=>{for(var o=n>1?void 0:n?l2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&a2(t,r,o),o};const d2="data-pont-design",c2="data-pont-design-empty",p2="data-pont-container";exports.PontContainer=class extends jt{constructor(){super(...arguments),this.id="",this.type="flex_column",this.design=new Rn(this)}createRenderRoot(){return this}get innerElement(){return this.querySelector(`:scope > [${p2}]`)}async firstUpdated(){await this.updateComplete;const t=this.innerElement;t&&this.moveLightDomChildrenInto(t),this.syncDesignState()}async updated(){await this.updateComplete,await wa(),this.syncDesignState()}syncDesignState(){var r;const t=this.design.active;this.toggleAttribute(d2,t),this.toggleAttribute(c2,t&&(((r=this.innerElement)==null?void 0:r.childElementCount)??0)===0)}render(){return l`<div
|
|
5740
5740
|
data-pont-container
|
|
5741
5741
|
part=${this.id?this.id:"container"}
|
|
5742
5742
|
data-type="${this.type}"
|
|
5743
|
-
></div>`}};vl([a()],exports.PontContainer.prototype,"id",2);vl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=vl([p("pont-container")],exports.PontContainer);var h2=Object.defineProperty,u2=Object.getOwnPropertyDescriptor,
|
|
5743
|
+
></div>`}};vl([a()],exports.PontContainer.prototype,"id",2);vl([a()],exports.PontContainer.prototype,"type",2);exports.PontContainer=vl([p("pont-container")],exports.PontContainer);var h2=Object.defineProperty,u2=Object.getOwnPropertyDescriptor,Hi=(e,t,r,n)=>{for(var o=n>1?void 0:n?u2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&h2(t,r,o),o};exports.PontGap=class extends jt{constructor(){super(...arguments),this.size="8px",this.type="vertical",this.id=""}createRenderRoot(){return this}render(){let t={width:"0px",height:"0px"};return this.type==="vertical"?t={width:"1px",height:this.size}:t={height:"1px",width:this.size},l`
|
|
5744
5744
|
<div
|
|
5745
5745
|
part=${this.id?this.id:"gap"}
|
|
5746
5746
|
style=${X$({...t})}
|
|
5747
5747
|
></div>
|
|
5748
|
-
`}};
|
|
5748
|
+
`}};Hi([a()],exports.PontGap.prototype,"size",2);Hi([a()],exports.PontGap.prototype,"type",2);Hi([a()],exports.PontGap.prototype,"id",2);exports.PontGap=Hi([p("pont-gap")],exports.PontGap);var m2=Object.defineProperty,g2=Object.getOwnPropertyDescriptor,bl=(e,t,r,n)=>{for(var o=n>1?void 0:n?g2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&m2(t,r,o),o};const f2="data-pont-header";exports.PontHeader=class extends jt{constructor(){super(...arguments),this.id="",this.align="center"}get innerElement(){return this.querySelector(`:scope > [${f2}]`)}createRenderRoot(){return this}firstUpdated(){const t=this.innerElement;t&&this.moveLightDomChildrenInto(t)}render(){return l`
|
|
5749
5749
|
<div
|
|
5750
5750
|
data-pont-header
|
|
5751
5751
|
part=${this.id?this.id:"header"}
|
|
@@ -5767,7 +5767,7 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5767
5767
|
* @license
|
|
5768
5768
|
* Copyright 2017 Google LLC
|
|
5769
5769
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5770
|
-
*/class
|
|
5770
|
+
*/class Sa extends Qn{}Sa.directiveName="unsafeSVG",Sa.resultType=2;const np=Eo(Sa);var w2=Object.defineProperty,$2=Object.getOwnPropertyDescriptor,wr=(e,t,r,n)=>{for(var o=n>1?void 0:n?$2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&w2(t,r,o),o};const P2=`
|
|
5771
5771
|
<svg viewBox="0 0 120 32" role="img" aria-label="Logo placeholder"
|
|
5772
5772
|
xmlns="http://www.w3.org/2000/svg" width="120" height="32">
|
|
5773
5773
|
<rect x="0.75" y="0.75" width="118.5" height="30.5" rx="6"
|
|
@@ -5826,5 +5826,5 @@ Minimum version required to store current data is: `+F+`.
|
|
|
5826
5826
|
>
|
|
5827
5827
|
${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
|
|
5828
5828
|
</span>
|
|
5829
|
-
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${ht}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function E2(){return tt}exports.BaseElement=jt;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontNavUser=Fe;exports.PontPaginator=zr;exports.closeAccountSettingsModal=
|
|
5829
|
+
`}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${ht}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function E2(){return tt}exports.BaseElement=jt;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontNavUser=Fe;exports.PontPaginator=zr;exports.PontUserSnippet=zi;exports.closeAccountSettingsModal=ml;exports.closeMemberManagementModal=Nh;exports.openAccountSettingsModal=Fh;exports.openMemberManagementModal=kh;exports.setLocales=Mh;exports.useAuthProvider=E2;
|
|
5830
5830
|
//# sourceMappingURL=index.js.map
|