@alfadocs/ui-kit 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{accordion-B6fyINUk.js → accordion-BEnrZmAn.js} +34 -32
- package/dist/_chunks/accordion.agent-BTjeO1Sx.js +52 -0
- package/dist/_chunks/{agenda-card-DIWDvWum.js → agenda-card-DwLIxgi7.js} +2 -1
- package/dist/_chunks/agenda-card.agent-B_R47-c9.js +22 -0
- package/dist/_chunks/agenda-tray-DUvengGQ.js +178 -0
- package/dist/_chunks/ai-prompt-input.agent-0NHYLTWD.js +476 -0
- package/dist/_chunks/{aspect-ratio-CxsdG8vk.js → aspect-ratio-DeSNzASA.js} +12 -12
- package/dist/_chunks/audio-recorder.agent--VKeykUp.js +458 -0
- package/dist/_chunks/autocomplete.agent-Dh7KioS6.js +432 -0
- package/dist/_chunks/{balance-cell-renderer-BWm3knY9.js → balance-cell-renderer-5CA7zpAi.js} +3 -3
- package/dist/_chunks/breadcrumb.agent-GM2hAKFX.js +371 -0
- package/dist/_chunks/{chart.agent-BdS-_8MO.js → chart.agent-_pRYS17d.js} +112 -105
- package/dist/_chunks/{chat-container-Cm3SlR2p.js → chat-container-Dl0Kfy5a.js} +33 -32
- package/dist/_chunks/{chat-container.agent-Dhw9xCJt.js → chat-container.agent-CM4WModE.js} +9 -4
- package/dist/_chunks/{chat-input-DreOPP8A.js → chat-input-C_tMQv92.js} +108 -82
- package/dist/_chunks/chat-input.agent-Bsz3ckGa.js +69 -0
- package/dist/_chunks/checkbox-CtPM6Rup.js +196 -0
- package/dist/_chunks/checkbox-group-BTdEB6Yo.js +208 -0
- package/dist/_chunks/collapsible.agent-DkS1jVyn.js +149 -0
- package/dist/_chunks/{color-picker-e9PmpaGH.js → color-picker-94qcBZqZ.js} +234 -184
- package/dist/_chunks/combobox.agent-CAvUkkIe.js +410 -0
- package/dist/_chunks/{command-palette.agent-js2rxgeR.js → command-palette.agent-HatEt_EM.js} +161 -121
- package/dist/_chunks/date-picker-BqPTn7bO.js +1813 -0
- package/dist/_chunks/date-range-picker-B2hGsffw.js +274 -0
- package/dist/_chunks/date-time-picker-Bzt0S8yO.js +293 -0
- package/dist/_chunks/dialog.agent-Daf1TTko.js +179 -0
- package/dist/_chunks/{dropdown-menu-Cw3EyPZv.js → dropdown-menu-C7AZipNz.js} +75 -71
- package/dist/_chunks/dropdown-menu.agent-BcxIKOjK.js +43 -0
- package/dist/_chunks/{file-upload.agent-B9AN82LA.js → file-upload.agent-DJaH2dHg.js} +275 -243
- package/dist/_chunks/freemium-paywall.agent-_nQqLyRF.js +260 -0
- package/dist/_chunks/{leo-sidebar-nbHib2D-.js → leo-sidebar-BwINPdix.js} +6 -6
- package/dist/_chunks/link-QheANk74.js +121 -0
- package/dist/_chunks/list.agent-D0iWt4VI.js +420 -0
- package/dist/_chunks/{message-card-qAp2-WQK.js → message-card-qhoGv947.js} +2 -1
- package/dist/_chunks/message-card.agent-4IeIgrnJ.js +22 -0
- package/dist/_chunks/message-tray-xHUCra-Y.js +419 -0
- package/dist/_chunks/{multi-select.agent-CNsyW3n9.js → multi-select.agent-Do6CeQUT.js} +239 -179
- package/dist/_chunks/navigation-menu.agent-D69ND6Qq.js +266 -0
- package/dist/_chunks/{notification-card-BF2_veHy.js → notification-card-CsVEYJE-.js} +13 -12
- package/dist/_chunks/notification-card.agent-Rqt3ofk9.js +22 -0
- package/dist/_chunks/notification-tray-DTXMq42J.js +444 -0
- package/dist/_chunks/number-input-fvGmnRy9.js +333 -0
- package/dist/_chunks/otp-input-EglXOUue.js +257 -0
- package/dist/_chunks/pagination.agent-BkZQl45y.js +422 -0
- package/dist/_chunks/password-input-D6kuYXmr.js +304 -0
- package/dist/_chunks/{patient-shell-7cXqIMFg.js → patient-shell-BRmrrUUW.js} +3 -3
- package/dist/_chunks/{payment-form-hcl-gGrp.js → payment-form-BWaXas8z.js} +120 -118
- package/dist/_chunks/{payment-form.agent-BkEnRerR.js → payment-form.agent-kuIfodCj.js} +7 -2
- package/dist/_chunks/{pdf-viewer.agent-CfIHhcHx.js → pdf-viewer.agent-BaGEDheA.js} +358 -351
- package/dist/_chunks/phone-input-C8Op4sEc.js +513 -0
- package/dist/_chunks/popover-kFN8s84V.js +229 -0
- package/dist/_chunks/popover.agent-K_d1cfbj.js +39 -0
- package/dist/_chunks/privacy-lock.agent-C1i1-T58.js +185 -0
- package/dist/_chunks/progress-wNsqkw8I.js +253 -0
- package/dist/_chunks/progress.agent-C68rDOXL.js +27 -0
- package/dist/_chunks/{radio-cs8N1wJi.js → radio-DvF59ThA.js} +14 -13
- package/dist/_chunks/radio-group-Cz1a4QCA.js +152 -0
- package/dist/_chunks/recaptcha-widget.agent-BGHpU5zD.js +183 -0
- package/dist/_chunks/resizable.agent-CMwZzvsi.js +456 -0
- package/dist/_chunks/{rich-text-editor.agent-COSb5_2D.js → rich-text-editor.agent-DnE125Tz.js} +221 -214
- package/dist/_chunks/search-bar.agent-DxFAxctc.js +562 -0
- package/dist/_chunks/search-input-Xw3cdWXW.js +227 -0
- package/dist/_chunks/search-input.agent-CfZvViOd.js +69 -0
- package/dist/_chunks/select-DY1Cb2Tg.js +410 -0
- package/dist/_chunks/{sheet-BhNpLHc9.js → sheet-B9kH9pcI.js} +55 -54
- package/dist/_chunks/sheet.agent-QAyTOxgk.js +46 -0
- package/dist/_chunks/{sidebar-OVzwN3jE.js → sidebar-CHF5xr_P.js} +188 -185
- package/dist/_chunks/sidebar.agent-C9TM_ZDZ.js +49 -0
- package/dist/_chunks/{signature-capture.agent-C38VPXxg.js → signature-capture.agent-BpeDwFht.js} +127 -120
- package/dist/_chunks/slider-CcsQTZTA.js +322 -0
- package/dist/_chunks/sparkline.agent-56Sj7nOP.js +245 -0
- package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js +322 -0
- package/dist/_chunks/stepper-calendar.agent-9iT3ClIB.js +646 -0
- package/dist/_chunks/stepper-progress-Bmen-YXB.js +149 -0
- package/dist/_chunks/stepper-progress.agent-q9InWca4.js +61 -0
- package/dist/_chunks/suggestion-chip-DhFrkRPj.js +169 -0
- package/dist/_chunks/suggestion-chip.agent-6sNWFj7m.js +46 -0
- package/dist/_chunks/switch-BYEH8I53.js +196 -0
- package/dist/_chunks/{tabs.agent-BpbVA-Zh.js → tabs.agent-h7NvsTR1.js} +146 -123
- package/dist/_chunks/{task-card-yW7tKlG4.js → task-card-CY5ztNkU.js} +2 -1
- package/dist/_chunks/task-card.agent-CUPKYd7w.js +22 -0
- package/dist/_chunks/task-tray-CCoUdorl.js +194 -0
- package/dist/_chunks/text-area-C_M8wliK.js +239 -0
- package/dist/_chunks/text-input-BX39e6T6.js +272 -0
- package/dist/_chunks/theme-toggle.agent-btmXTWdW.js +394 -0
- package/dist/_chunks/time-picker-B8AMIrX7.js +410 -0
- package/dist/_chunks/timeline.agent-CRPza9wc.js +279 -0
- package/dist/_chunks/{toast-lOhJDKOH.js → toast.agent-BjEGuq1Z.js} +403 -342
- package/dist/_chunks/{tooth-scheme.agent-BlDyu-Gx.js → tooth-scheme.agent-CWrQBjJM.js} +218 -211
- package/dist/_chunks/transcript-panel.agent-BXEYP6w-.js +337 -0
- package/dist/_chunks/{workflow-map-XeqHDFvp.js → workflow-map-D2A7rTEG.js} +465 -368
- package/dist/agent-catalog.json +2929 -268
- package/dist/components/accordion/accordion.agent.d.ts +2 -1
- package/dist/components/accordion/accordion.d.ts +6 -0
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/agenda-card/agenda-card.agent.d.ts +3 -0
- package/dist/components/agenda-card/index.d.ts +1 -0
- package/dist/components/agenda-card/index.js +3 -1
- package/dist/components/agenda-tray/agenda-tray.agent.d.ts +4 -0
- package/dist/components/agenda-tray/agenda-tray.d.ts +19 -2
- package/dist/components/agenda-tray/index.d.ts +2 -1
- package/dist/components/agenda-tray/index.js +3 -2
- package/dist/components/ai-prompt-input/ai-prompt-input.agent.d.ts +4 -0
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +18 -1
- package/dist/components/ai-prompt-input/index.d.ts +2 -1
- package/dist/components/ai-prompt-input/index.js +3 -2
- package/dist/components/aspect-ratio/index.js +1 -1
- package/dist/components/audio-recorder/audio-recorder.agent.d.ts +4 -0
- package/dist/components/audio-recorder/audio-recorder.d.ts +10 -1
- package/dist/components/audio-recorder/index.d.ts +2 -1
- package/dist/components/audio-recorder/index.js +3 -2
- package/dist/components/autocomplete/autocomplete.agent.d.ts +2 -1
- package/dist/components/autocomplete/autocomplete.d.ts +10 -0
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.agent.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +21 -2
- package/dist/components/breadcrumb/index.d.ts +2 -1
- package/dist/components/breadcrumb/index.js +5 -4
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +2 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +3 -1
- package/dist/components/chat-container/index.js +2 -2
- package/dist/components/chat-input/chat-input.agent.d.ts +4 -0
- package/dist/components/chat-input/chat-input.d.ts +10 -1
- package/dist/components/chat-input/index.d.ts +2 -1
- package/dist/components/chat-input/index.js +4 -2
- package/dist/components/checkbox/checkbox.agent.d.ts +4 -0
- package/dist/components/checkbox/checkbox.d.ts +6 -0
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.agent.d.ts +4 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +8 -0
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/collapsible.agent.d.ts +4 -0
- package/dist/components/collapsible/collapsible.d.ts +8 -1
- package/dist/components/collapsible/index.d.ts +2 -1
- package/dist/components/collapsible/index.js +4 -3
- package/dist/components/color-picker/color-picker.agent.d.ts +4 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.agent.d.ts +2 -1
- package/dist/components/combobox/combobox.d.ts +10 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.agent.d.ts +2 -1
- package/dist/components/command-palette/command-palette.d.ts +7 -0
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.agent.d.ts +4 -0
- package/dist/components/date-picker/date-picker.d.ts +16 -1
- package/dist/components/date-picker/index.d.ts +2 -1
- package/dist/components/date-picker/index.js +3 -2
- package/dist/components/date-range-picker/date-range-picker.agent.d.ts +4 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +16 -1
- package/dist/components/date-range-picker/index.d.ts +2 -1
- package/dist/components/date-range-picker/index.js +3 -2
- package/dist/components/date-time-picker/date-time-picker.agent.d.ts +4 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +16 -1
- package/dist/components/date-time-picker/index.d.ts +2 -1
- package/dist/components/date-time-picker/index.js +3 -2
- package/dist/components/dialog/dialog.agent.d.ts +5 -6
- package/dist/components/dialog/dialog.d.ts +11 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.agent.d.ts +2 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +10 -2
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/file-upload/file-upload.agent.d.ts +2 -1
- package/dist/components/file-upload/file-upload.d.ts +12 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.agent.d.ts +4 -0
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +8 -1
- package/dist/components/freemium-paywall/index.d.ts +2 -1
- package/dist/components/freemium-paywall/index.js +3 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/index.js +5 -0
- package/dist/components/link/link.d.ts +39 -0
- package/dist/components/list/index.d.ts +2 -1
- package/dist/components/list/index.js +3 -2
- package/dist/components/list/list.agent.d.ts +4 -0
- package/dist/components/list/list.d.ts +8 -2
- package/dist/components/message-card/index.d.ts +1 -0
- package/dist/components/message-card/index.js +5 -3
- package/dist/components/message-card/message-card.agent.d.ts +3 -0
- package/dist/components/message-tray/index.d.ts +2 -1
- package/dist/components/message-tray/index.js +3 -2
- package/dist/components/message-tray/message-tray.agent.d.ts +4 -0
- package/dist/components/message-tray/message-tray.d.ts +27 -2
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.agent.d.ts +2 -1
- package/dist/components/multi-select/multi-select.d.ts +10 -0
- package/dist/components/navigation-menu/index.d.ts +2 -1
- package/dist/components/navigation-menu/index.js +7 -6
- package/dist/components/navigation-menu/navigation-menu.agent.d.ts +4 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +28 -2
- package/dist/components/notification-card/index.d.ts +1 -0
- package/dist/components/notification-card/index.js +5 -3
- package/dist/components/notification-card/notification-card.agent.d.ts +3 -0
- package/dist/components/notification-tray/index.d.ts +2 -1
- package/dist/components/notification-tray/index.js +3 -2
- package/dist/components/notification-tray/notification-tray.agent.d.ts +4 -0
- package/dist/components/notification-tray/notification-tray.d.ts +27 -2
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.agent.d.ts +4 -0
- package/dist/components/number-input/number-input.d.ts +7 -0
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.agent.d.ts +4 -0
- package/dist/components/otp-input/otp-input.d.ts +10 -0
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/pagination.agent.d.ts +2 -1
- package/dist/components/pagination/pagination.d.ts +7 -0
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/password-input/password-input.agent.d.ts +4 -0
- package/dist/components/password-input/password-input.d.ts +9 -0
- package/dist/components/payment-form/index.js +2 -2
- package/dist/components/payment-form/payment-form.d.ts +2 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +2 -0
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.agent.d.ts +4 -0
- package/dist/components/phone-input/phone-input.d.ts +7 -0
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.agent.d.ts +2 -1
- package/dist/components/popover/popover.d.ts +8 -1
- package/dist/components/privacy-lock/index.d.ts +2 -1
- package/dist/components/privacy-lock/index.js +3 -2
- package/dist/components/privacy-lock/privacy-lock.agent.d.ts +4 -0
- package/dist/components/privacy-lock/privacy-lock.d.ts +7 -1
- package/dist/components/progress/index.js +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group.agent.d.ts +4 -0
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/recaptcha-widget/index.d.ts +3 -0
- package/dist/components/recaptcha-widget/index.js +6 -0
- package/dist/components/recaptcha-widget/recaptcha-widget.agent.d.ts +4 -0
- package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +56 -0
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/resizable/resizable.agent.d.ts +2 -1
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +2 -0
- package/dist/components/search-bar/index.d.ts +2 -1
- package/dist/components/search-bar/index.js +3 -2
- package/dist/components/search-bar/search-bar.agent.d.ts +4 -0
- package/dist/components/search-bar/search-bar.d.ts +27 -1
- package/dist/components/search-input/index.d.ts +2 -1
- package/dist/components/search-input/index.js +4 -2
- package/dist/components/search-input/search-input.agent.d.ts +4 -0
- package/dist/components/search-input/search-input.d.ts +27 -0
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.agent.d.ts +4 -0
- package/dist/components/select/select.d.ts +9 -0
- package/dist/components/sheet/index.js +2 -2
- package/dist/components/sheet/sheet.agent.d.ts +2 -1
- package/dist/components/sheet/sheet.d.ts +11 -2
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/sidebar/sidebar.agent.d.ts +2 -1
- package/dist/components/sidebar/sidebar.d.ts +6 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/signature-capture/signature-capture.d.ts +2 -0
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/slider.agent.d.ts +4 -0
- package/dist/components/slider/slider.d.ts +5 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-accordion/index.d.ts +2 -1
- package/dist/components/stepper-accordion/index.js +3 -2
- package/dist/components/stepper-accordion/stepper-accordion.agent.d.ts +4 -0
- package/dist/components/stepper-accordion/stepper-accordion.d.ts +19 -1
- package/dist/components/stepper-calendar/index.d.ts +2 -1
- package/dist/components/stepper-calendar/index.js +3 -2
- package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts +4 -0
- package/dist/components/stepper-calendar/stepper-calendar.d.ts +19 -1
- package/dist/components/stepper-progress/index.d.ts +2 -1
- package/dist/components/stepper-progress/index.js +4 -2
- package/dist/components/stepper-progress/stepper-progress.agent.d.ts +4 -0
- package/dist/components/stepper-progress/stepper-progress.d.ts +26 -1
- package/dist/components/suggestion-chip/index.d.ts +2 -1
- package/dist/components/suggestion-chip/index.js +5 -3
- package/dist/components/suggestion-chip/suggestion-chip.agent.d.ts +4 -0
- package/dist/components/suggestion-chip/suggestion-chip.d.ts +7 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/switch.agent.d.ts +4 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tabs.agent.d.ts +2 -1
- package/dist/components/tabs/tabs.d.ts +4 -0
- package/dist/components/task-card/index.d.ts +1 -0
- package/dist/components/task-card/index.js +5 -3
- package/dist/components/task-card/task-card.agent.d.ts +3 -0
- package/dist/components/task-tray/index.d.ts +2 -1
- package/dist/components/task-tray/index.js +3 -2
- package/dist/components/task-tray/task-tray.agent.d.ts +4 -0
- package/dist/components/task-tray/task-tray.d.ts +25 -2
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-area/text-area.agent.d.ts +4 -0
- package/dist/components/text-area/text-area.d.ts +7 -0
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/text-input/text-input.agent.d.ts +4 -0
- package/dist/components/text-input/text-input.d.ts +10 -0
- package/dist/components/theme-toggle/index.d.ts +2 -1
- package/dist/components/theme-toggle/index.js +3 -2
- package/dist/components/theme-toggle/theme-toggle.agent.d.ts +4 -0
- package/dist/components/theme-toggle/theme-toggle.d.ts +9 -2
- package/dist/components/time-picker/index.d.ts +2 -1
- package/dist/components/time-picker/index.js +3 -2
- package/dist/components/time-picker/time-picker.agent.d.ts +4 -0
- package/dist/components/time-picker/time-picker.d.ts +16 -1
- package/dist/components/timeline/index.d.ts +2 -1
- package/dist/components/timeline/index.js +3 -2
- package/dist/components/timeline/timeline.agent.d.ts +4 -0
- package/dist/components/timeline/timeline.d.ts +8 -1
- package/dist/components/toast/index.d.ts +3 -2
- package/dist/components/toast/index.js +7 -5
- package/dist/components/toast/toast.agent.d.ts +4 -0
- package/dist/components/toast/toast.d.ts +8 -0
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +2 -0
- package/dist/components/transcript-panel/index.d.ts +2 -1
- package/dist/components/transcript-panel/index.js +3 -2
- package/dist/components/transcript-panel/transcript-panel.agent.d.ts +4 -0
- package/dist/components/transcript-panel/transcript-panel.d.ts +10 -1
- package/dist/components/workflow/index.d.ts +2 -1
- package/dist/components/workflow/index.js +10 -7
- package/dist/components/workflow/workflow-editor.d.ts +7 -1
- package/dist/components/workflow/workflow-map.d.ts +2 -0
- package/dist/components/workflow/workflow.agent.d.ts +6 -0
- package/dist/i18n/config.js +24 -11
- package/dist/i18n/resources.d.ts +7 -0
- package/dist/index.js +471 -423
- package/dist/locales/en.json +7 -0
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +18 -2
- package/dist/_chunks/accordion.agent-Cz-yglRa.js +0 -17
- package/dist/_chunks/agenda-tray-BqQZwiHc.js +0 -120
- package/dist/_chunks/ai-prompt-input-CI27KmZ1.js +0 -380
- package/dist/_chunks/audio-recorder-B-8SKgKn.js +0 -376
- package/dist/_chunks/autocomplete.agent-DqOy0_1P.js +0 -372
- package/dist/_chunks/breadcrumb-D6xpsP7n.js +0 -293
- package/dist/_chunks/checkbox-DNK4qS2_.js +0 -116
- package/dist/_chunks/checkbox-group-CWpGZEF6.js +0 -146
- package/dist/_chunks/collapsible-D4LOdLxp.js +0 -67
- package/dist/_chunks/combobox.agent-ByobCLJ_.js +0 -350
- package/dist/_chunks/date-picker-DYXNsWmM.js +0 -1726
- package/dist/_chunks/date-range-picker-BcNDJI7m.js +0 -183
- package/dist/_chunks/date-time-picker-CmGiTU__.js +0 -202
- package/dist/_chunks/dialog.agent-DEG_fVzG.js +0 -147
- package/dist/_chunks/dropdown-menu.agent-Cry4Nmes.js +0 -17
- package/dist/_chunks/freemium-paywall-CkefGLM_.js +0 -198
- package/dist/_chunks/list-B1ozIjQe.js +0 -359
- package/dist/_chunks/message-tray-VaLpQU5t.js +0 -303
- package/dist/_chunks/navigation-menu-EVFau1O2.js +0 -180
- package/dist/_chunks/notification-tray-B7U5YZYg.js +0 -328
- package/dist/_chunks/number-input-DjpT_RXJ.js +0 -249
- package/dist/_chunks/otp-input-De5_Ih7B.js +0 -189
- package/dist/_chunks/pagination.agent-oEaqmtx5.js +0 -380
- package/dist/_chunks/password-input-DJDVznWH.js +0 -193
- package/dist/_chunks/phone-input-DE_39q65.js +0 -428
- package/dist/_chunks/popover-C3CTUsqh.js +0 -227
- package/dist/_chunks/popover.agent-C0qOx9WT.js +0 -13
- package/dist/_chunks/privacy-lock-CQpgkLec.js +0 -132
- package/dist/_chunks/progress-B4Of_pzz.js +0 -252
- package/dist/_chunks/progress.agent-CXkHURjX.js +0 -22
- package/dist/_chunks/radio-group-BIUbpWml.js +0 -89
- package/dist/_chunks/resizable.agent-DBpPGNdy.js +0 -435
- package/dist/_chunks/search-bar-fcGqDFW3.js +0 -397
- package/dist/_chunks/search-input-BVMCONyN.js +0 -197
- package/dist/_chunks/select-IY_JQa-F.js +0 -321
- package/dist/_chunks/sheet.agent-DwQlBqK9.js +0 -13
- package/dist/_chunks/sidebar.agent-B0fnH9CC.js +0 -17
- package/dist/_chunks/slider-DjyRt3Mp.js +0 -274
- package/dist/_chunks/sparkline.agent-C_xp3NRB.js +0 -238
- package/dist/_chunks/stepper-accordion-CGog0JSF.js +0 -233
- package/dist/_chunks/stepper-calendar-_fLOAjus.js +0 -570
- package/dist/_chunks/stepper-progress-rE7tn7WY.js +0 -129
- package/dist/_chunks/suggestion-chip-BNJ2M8Os.js +0 -158
- package/dist/_chunks/switch-aN2EYxHh.js +0 -138
- package/dist/_chunks/task-tray-BzahI5FQ.js +0 -100
- package/dist/_chunks/text-area-DmKSd2DG.js +0 -152
- package/dist/_chunks/text-input-CRHvl5zk.js +0 -188
- package/dist/_chunks/theme-toggle-BHiMMEQN.js +0 -329
- package/dist/_chunks/time-picker-D-EueWUG.js +0 -322
- package/dist/_chunks/timeline-RgAIzpMd.js +0 -220
- package/dist/_chunks/transcript-panel-CNbVGG9L.js +0 -266
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsx as a, jsxs as Z } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
2
|
+
import { forwardRef as Re, useId as Oe, useMemo as je, useState as m, useEffect as w, useRef as A, useCallback as L, useImperativeHandle as Ve } from "react";
|
|
3
|
+
import * as de from "pdfjs-dist";
|
|
4
4
|
import { c as W } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as ce } from "react-i18next";
|
|
6
6
|
import * as X from "@radix-ui/react-popover";
|
|
7
|
-
import
|
|
8
|
-
import { S as
|
|
9
|
-
import { A as
|
|
10
|
-
import { X as
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
13
|
-
import { c as
|
|
14
|
-
import { S as
|
|
15
|
-
import { P as
|
|
7
|
+
import ze from "pdfjs-dist/build/pdf.worker.min.mjs?url";
|
|
8
|
+
import { S as Fe } from "./spinner-GCcv67vh.js";
|
|
9
|
+
import { A as ve } from "./alert-BlOUMkXj.js";
|
|
10
|
+
import { X as Ee } from "./x-CCcI3eJp.js";
|
|
11
|
+
import { C as _e } from "./chevron-left-CX1jqD2M.js";
|
|
12
|
+
import { C as Le } from "./chevron-right-BrpYejk0.js";
|
|
13
|
+
import { c as Pe } from "./createLucideIcon-CrFbzy84.js";
|
|
14
|
+
import { S as Ze } from "./search-BonnQsHv.js";
|
|
15
|
+
import { P as Be } from "./printer-CeVEWfQq.js";
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v1.8.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const Ke = [
|
|
23
23
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
24
24
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
25
25
|
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
26
26
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
27
|
-
],
|
|
27
|
+
], He = Pe("zoom-in", Ke);
|
|
28
28
|
/**
|
|
29
29
|
* @license lucide-react v1.8.0 - ISC
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the ISC license.
|
|
32
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
33
|
*/
|
|
34
|
-
const
|
|
34
|
+
const Qe = [
|
|
35
35
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
36
36
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
37
37
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
38
|
-
],
|
|
39
|
-
|
|
40
|
-
const
|
|
38
|
+
], We = Pe("zoom-out", Qe);
|
|
39
|
+
de.GlobalWorkerOptions.workerSrc = ze;
|
|
40
|
+
const be = W(
|
|
41
41
|
[
|
|
42
42
|
"ds:pdf-viewer-alfadocs ds:flex ds:flex-col",
|
|
43
43
|
"ds:gap-[var(--spacing-sm)]",
|
|
@@ -49,7 +49,7 @@ const ve = W(
|
|
|
49
49
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
50
50
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
51
51
|
].join(" ")
|
|
52
|
-
),
|
|
52
|
+
), qe = W(
|
|
53
53
|
[
|
|
54
54
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
55
55
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -57,7 +57,7 @@ const ve = W(
|
|
|
57
57
|
"ds:bg-[var(--background)]",
|
|
58
58
|
"ds:border-b ds:border-[color:var(--border)]"
|
|
59
59
|
].join(" ")
|
|
60
|
-
),
|
|
60
|
+
), ye = W(
|
|
61
61
|
[
|
|
62
62
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
63
63
|
"ds:min-block-size-[var(--min-target-size)]",
|
|
@@ -74,7 +74,7 @@ const ve = W(
|
|
|
74
74
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
75
75
|
"ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
|
|
76
76
|
].join(" ")
|
|
77
|
-
),
|
|
77
|
+
), xe = W(
|
|
78
78
|
[
|
|
79
79
|
"ds:min-block-size-[var(--min-target-size)]",
|
|
80
80
|
"ds:inline-size-[4rem] ds:text-center",
|
|
@@ -86,7 +86,7 @@ const ve = W(
|
|
|
86
86
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
87
87
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
88
88
|
].join(" ")
|
|
89
|
-
),
|
|
89
|
+
), Ue = W(
|
|
90
90
|
[
|
|
91
91
|
"ds:min-block-size-[var(--min-target-size)]",
|
|
92
92
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -97,7 +97,7 @@ const ve = W(
|
|
|
97
97
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
98
98
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
99
99
|
].join(" ")
|
|
100
|
-
),
|
|
100
|
+
), Je = W(
|
|
101
101
|
[
|
|
102
102
|
"ds:relative ds:flex ds:flex-col ds:items-center",
|
|
103
103
|
"ds:gap-[var(--spacing-md)]",
|
|
@@ -107,14 +107,14 @@ const ve = W(
|
|
|
107
107
|
"ds:min-block-size-[30rem]",
|
|
108
108
|
"ds:max-block-size-[80vh]"
|
|
109
109
|
].join(" ")
|
|
110
|
-
),
|
|
110
|
+
), $e = W(
|
|
111
111
|
[
|
|
112
112
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
113
113
|
"ds:bg-[var(--background)]",
|
|
114
114
|
"ds:shadow-[var(--shadow-md)]",
|
|
115
115
|
"ds:rounded-[var(--radius-sm)]"
|
|
116
116
|
].join(" ")
|
|
117
|
-
),
|
|
117
|
+
), Xe = [
|
|
118
118
|
"fit-width",
|
|
119
119
|
"fit-page",
|
|
120
120
|
"actual-size",
|
|
@@ -125,232 +125,233 @@ const ve = W(
|
|
|
125
125
|
1.5,
|
|
126
126
|
2
|
|
127
127
|
];
|
|
128
|
-
function J(
|
|
129
|
-
return typeof
|
|
128
|
+
function J(i) {
|
|
129
|
+
return typeof i == "number";
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
if (J(
|
|
133
|
-
if (
|
|
134
|
-
const
|
|
135
|
-
return
|
|
131
|
+
function we(i, t, u) {
|
|
132
|
+
if (J(i)) return i;
|
|
133
|
+
if (i === "actual-size" || !u) return 1;
|
|
134
|
+
const h = window.getComputedStyle(u), f = parseFloat(h.paddingInlineStart || "0") + parseFloat(h.paddingInlineEnd || "0"), g = parseFloat(h.paddingBlockStart || "0") + parseFloat(h.paddingBlockEnd || "0"), k = Math.max(u.clientWidth - f, 1), p = Math.max(u.clientHeight - g, 1), N = t.width, P = t.height;
|
|
135
|
+
return i === "fit-width" ? k / N : Math.min(k / N, p / P);
|
|
136
136
|
}
|
|
137
|
-
const
|
|
137
|
+
const Ge = Re(
|
|
138
138
|
({
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
id: i,
|
|
140
|
+
src: t,
|
|
141
|
+
initialPage: u = 1,
|
|
142
|
+
initialZoom: h = "fit-width",
|
|
142
143
|
onPageChange: f,
|
|
143
|
-
onLoadComplete:
|
|
144
|
-
onError:
|
|
145
|
-
toolbar:
|
|
146
|
-
ariaLabel:
|
|
147
|
-
className:
|
|
148
|
-
},
|
|
149
|
-
const { t:
|
|
150
|
-
() => `pdf-${
|
|
151
|
-
[
|
|
152
|
-
), [z,
|
|
153
|
-
|
|
144
|
+
onLoadComplete: g,
|
|
145
|
+
onError: k,
|
|
146
|
+
toolbar: p = !0,
|
|
147
|
+
ariaLabel: N,
|
|
148
|
+
className: P
|
|
149
|
+
}, R) => {
|
|
150
|
+
const { t: S } = ce(), V = Oe(), B = je(
|
|
151
|
+
() => `pdf-${V.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
152
|
+
[V]
|
|
153
|
+
), [z, q] = m(!1), [v, K] = m(!1);
|
|
154
|
+
w(() => {
|
|
154
155
|
if (typeof document > "u") return;
|
|
155
|
-
|
|
156
|
-
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), r = () =>
|
|
156
|
+
q(document.documentElement.dir === "rtl");
|
|
157
|
+
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), r = () => K(e.matches);
|
|
157
158
|
return r(), e.addEventListener("change", r), () => e.removeEventListener("change", r);
|
|
158
159
|
}, []);
|
|
159
|
-
const [
|
|
160
|
-
{ start: Math.max(1,
|
|
161
|
-
), [
|
|
160
|
+
const [s, F] = m(null), [c, b] = m(null), [l, E] = m(u), [O, y] = m(h), [I, M] = m(
|
|
161
|
+
{ start: Math.max(1, u - 1), end: u + 1 }
|
|
162
|
+
), [n, x] = m(""), [j, G] = m(!1), [le, ue] = m(""), [Se, Me] = m(
|
|
162
163
|
{ current: 0, total: 0 }
|
|
163
|
-
),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}, [f,
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}, [
|
|
164
|
+
), Y = A(f), ee = A(g), te = A(k);
|
|
165
|
+
w(() => {
|
|
166
|
+
Y.current = f, ee.current = g, te.current = k;
|
|
167
|
+
}, [f, g, k]);
|
|
168
|
+
const se = A(null);
|
|
169
|
+
w(() => {
|
|
170
|
+
se.current = s;
|
|
171
|
+
}, [s]), w(() => {
|
|
171
172
|
let e = !1;
|
|
172
|
-
F(null),
|
|
173
|
+
F(null), b(null);
|
|
173
174
|
const r = {
|
|
174
175
|
disableJavaScript: !0,
|
|
175
176
|
isEvalSupported: !1
|
|
176
|
-
},
|
|
177
|
-
typeof
|
|
177
|
+
}, d = de.getDocument(
|
|
178
|
+
typeof t == "string" ? { url: t, ...r } : t instanceof Uint8Array ? { data: t, ...r } : { data: new Uint8Array(t), ...r }
|
|
178
179
|
);
|
|
179
|
-
return
|
|
180
|
-
async (
|
|
180
|
+
return d.promise.then(
|
|
181
|
+
async (o) => {
|
|
181
182
|
var H;
|
|
182
183
|
if (e) return;
|
|
183
184
|
let C;
|
|
184
185
|
try {
|
|
185
|
-
const Q = await
|
|
186
|
-
C =
|
|
186
|
+
const Q = await o.getMetadata(), T = Q == null ? void 0 : Q.info;
|
|
187
|
+
C = T == null ? void 0 : T.Title;
|
|
187
188
|
} catch {
|
|
188
189
|
C = void 0;
|
|
189
190
|
}
|
|
190
191
|
if (e) {
|
|
191
192
|
try {
|
|
192
|
-
await
|
|
193
|
+
await o.destroy();
|
|
193
194
|
} catch {
|
|
194
195
|
}
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
|
-
const _ = { doc:
|
|
198
|
-
F(_), (H =
|
|
198
|
+
const _ = { doc: o, numPages: o.numPages, title: C };
|
|
199
|
+
F(_), (H = ee.current) == null || H.call(ee, { numPages: o.numPages, title: C });
|
|
199
200
|
},
|
|
200
|
-
(
|
|
201
|
+
(o) => {
|
|
201
202
|
var _;
|
|
202
203
|
if (e) return;
|
|
203
|
-
const C =
|
|
204
|
-
|
|
204
|
+
const C = o instanceof Error ? o : new Error(String(o));
|
|
205
|
+
b(C), (_ = te.current) == null || _.call(te, C);
|
|
205
206
|
}
|
|
206
207
|
), () => {
|
|
207
|
-
e = !0,
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
208
|
+
e = !0, d.destroy();
|
|
209
|
+
const o = se.current;
|
|
210
|
+
if (o) {
|
|
210
211
|
try {
|
|
211
|
-
|
|
212
|
+
o.doc.destroy();
|
|
212
213
|
} catch {
|
|
213
214
|
}
|
|
214
|
-
|
|
215
|
+
se.current = null;
|
|
215
216
|
}
|
|
216
217
|
};
|
|
217
|
-
}, [
|
|
218
|
+
}, [t]), w(() => {
|
|
218
219
|
var e;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
), (e =
|
|
222
|
-
}, [
|
|
223
|
-
const
|
|
220
|
+
s && (x(
|
|
221
|
+
S("pdf.pageOf", { current: l, total: s.numPages })
|
|
222
|
+
), (e = Y.current) == null || e.call(Y, l));
|
|
223
|
+
}, [l, s, S]);
|
|
224
|
+
const re = A(null), oe = A([]), D = L(
|
|
224
225
|
(e) => {
|
|
225
|
-
if (!
|
|
226
|
-
const r = Math.max(1, Math.min(e,
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
226
|
+
if (!s) return;
|
|
227
|
+
const r = Math.max(1, Math.min(e, s.numPages));
|
|
228
|
+
E(r);
|
|
229
|
+
const d = oe.current[r - 1];
|
|
230
|
+
d && d.scrollIntoView({
|
|
230
231
|
behavior: "auto",
|
|
231
232
|
block: "start"
|
|
232
233
|
});
|
|
233
234
|
},
|
|
234
|
-
[
|
|
235
|
-
),
|
|
236
|
-
|
|
235
|
+
[s, v]
|
|
236
|
+
), fe = L((e) => {
|
|
237
|
+
y(e);
|
|
237
238
|
}, []), $ = L(() => {
|
|
238
239
|
typeof window < "u" && window.print();
|
|
239
|
-
}, []),
|
|
240
|
-
|
|
240
|
+
}, []), pe = L((e) => {
|
|
241
|
+
ue(e), G(e.length > 0);
|
|
241
242
|
}, []);
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
Ve(
|
|
244
|
+
R,
|
|
244
245
|
() => ({
|
|
245
|
-
goToPage:
|
|
246
|
-
setZoom:
|
|
247
|
-
search:
|
|
246
|
+
goToPage: D,
|
|
247
|
+
setZoom: fe,
|
|
248
|
+
search: pe,
|
|
248
249
|
print: $
|
|
249
250
|
}),
|
|
250
|
-
[
|
|
251
|
+
[D, fe, pe, $]
|
|
251
252
|
);
|
|
252
|
-
const
|
|
253
|
+
const Ce = L(
|
|
253
254
|
(e) => {
|
|
254
|
-
if (!
|
|
255
|
+
if (!s) return;
|
|
255
256
|
const r = e.metaKey || e.ctrlKey;
|
|
256
257
|
if (e.key === "PageDown") {
|
|
257
|
-
e.preventDefault(),
|
|
258
|
+
e.preventDefault(), D(l + 1);
|
|
258
259
|
return;
|
|
259
260
|
}
|
|
260
261
|
if (e.key === "PageUp") {
|
|
261
|
-
e.preventDefault(),
|
|
262
|
+
e.preventDefault(), D(l - 1);
|
|
262
263
|
return;
|
|
263
264
|
}
|
|
264
265
|
if (e.key === "Home") {
|
|
265
|
-
e.preventDefault(),
|
|
266
|
+
e.preventDefault(), D(1);
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
269
|
if (e.key === "End") {
|
|
269
|
-
e.preventDefault(),
|
|
270
|
+
e.preventDefault(), D(s.numPages);
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
272
273
|
if (r && e.key.toLowerCase() === "f") {
|
|
273
|
-
e.preventDefault(),
|
|
274
|
+
e.preventDefault(), G(!0);
|
|
274
275
|
return;
|
|
275
276
|
}
|
|
276
277
|
if (r && (e.key === "+" || e.key === "=")) {
|
|
277
|
-
e.preventDefault(),
|
|
278
|
+
e.preventDefault(), y((d) => J(d) ? Math.min(d * 1.25, 4) : 1.25);
|
|
278
279
|
return;
|
|
279
280
|
}
|
|
280
281
|
if (r && e.key === "-") {
|
|
281
|
-
e.preventDefault(),
|
|
282
|
+
e.preventDefault(), y((d) => J(d) ? Math.max(d / 1.25, 0.25) : 0.75);
|
|
282
283
|
return;
|
|
283
284
|
}
|
|
284
285
|
if (r && e.key === "0") {
|
|
285
|
-
e.preventDefault(),
|
|
286
|
+
e.preventDefault(), y("fit-width");
|
|
286
287
|
return;
|
|
287
288
|
}
|
|
288
289
|
r && e.key.toLowerCase() === "p" && (e.preventDefault(), $());
|
|
289
290
|
},
|
|
290
|
-
[
|
|
291
|
-
),
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}, [
|
|
295
|
-
if (!
|
|
296
|
-
const e =
|
|
291
|
+
[l, D, $, s]
|
|
292
|
+
), ie = A(l);
|
|
293
|
+
w(() => {
|
|
294
|
+
ie.current = l;
|
|
295
|
+
}, [l]), w(() => {
|
|
296
|
+
if (!s) return;
|
|
297
|
+
const e = re.current;
|
|
297
298
|
if (!e) return;
|
|
298
|
-
const r = /* @__PURE__ */ new Map(),
|
|
299
|
-
(
|
|
300
|
-
for (const
|
|
301
|
-
const U =
|
|
299
|
+
const r = /* @__PURE__ */ new Map(), d = new IntersectionObserver(
|
|
300
|
+
(o) => {
|
|
301
|
+
for (const T of o) {
|
|
302
|
+
const U = T.target.dataset.pageNumber;
|
|
302
303
|
if (!U) continue;
|
|
303
|
-
const
|
|
304
|
-
r.set(
|
|
304
|
+
const Ae = Number(U);
|
|
305
|
+
r.set(Ae, T.intersectionRatio);
|
|
305
306
|
}
|
|
306
|
-
let C =
|
|
307
|
-
for (const [
|
|
308
|
-
U > _ && (C =
|
|
309
|
-
_ > 0 && C !==
|
|
307
|
+
let C = ie.current, _ = 0, H = 1 / 0, Q = -1 / 0;
|
|
308
|
+
for (const [T, U] of r.entries())
|
|
309
|
+
U > _ && (C = T, _ = U), U > 0 && (H = Math.min(H, T), Q = Math.max(Q, T));
|
|
310
|
+
_ > 0 && C !== ie.current && E(C), H !== 1 / 0 && M({
|
|
310
311
|
start: Math.max(1, H - 1),
|
|
311
|
-
end: Math.min(
|
|
312
|
+
end: Math.min(s.numPages, Q + 1)
|
|
312
313
|
});
|
|
313
314
|
},
|
|
314
315
|
{ root: e, threshold: [0, 0.25, 0.5, 0.75, 1] }
|
|
315
316
|
);
|
|
316
|
-
return
|
|
317
|
-
|
|
318
|
-
}), () =>
|
|
319
|
-
}, [
|
|
320
|
-
const [
|
|
321
|
-
|
|
322
|
-
const e =
|
|
317
|
+
return oe.current.forEach((o) => {
|
|
318
|
+
o && d.observe(o);
|
|
319
|
+
}), () => d.disconnect();
|
|
320
|
+
}, [s]);
|
|
321
|
+
const [Ne, Ie] = m(0);
|
|
322
|
+
w(() => {
|
|
323
|
+
const e = re.current;
|
|
323
324
|
if (!e || typeof ResizeObserver > "u") return;
|
|
324
325
|
const r = new ResizeObserver(() => {
|
|
325
|
-
(
|
|
326
|
+
(O === "fit-width" || O === "fit-page") && Ie((d) => d + 1);
|
|
326
327
|
});
|
|
327
328
|
return r.observe(e), () => r.disconnect();
|
|
328
|
-
}, [
|
|
329
|
-
const
|
|
329
|
+
}, [O]);
|
|
330
|
+
const me = A([]), [ne, he] = m(0), De = L(
|
|
330
331
|
(e) => (r) => {
|
|
331
|
-
|
|
332
|
+
me.current[e] = r;
|
|
332
333
|
},
|
|
333
334
|
[]
|
|
334
|
-
),
|
|
335
|
-
const r =
|
|
335
|
+
), ge = L((e) => {
|
|
336
|
+
const r = me.current[e];
|
|
336
337
|
r && r.focus();
|
|
337
|
-
}, []),
|
|
338
|
+
}, []), ae = 8, Te = L(
|
|
338
339
|
(e) => {
|
|
339
|
-
const r = z ? "ArrowLeft" : "ArrowRight",
|
|
340
|
-
let
|
|
341
|
-
e.key === r ?
|
|
340
|
+
const r = z ? "ArrowLeft" : "ArrowRight", d = z ? "ArrowRight" : "ArrowLeft";
|
|
341
|
+
let o = null;
|
|
342
|
+
e.key === r ? o = (ne + 1) % ae : e.key === d ? o = (ne - 1 + ae) % ae : e.key === "Home" ? o = 0 : e.key === "End" && (o = ae - 1), o !== null && (e.preventDefault(), he(o), ge(o));
|
|
342
343
|
},
|
|
343
|
-
[
|
|
344
|
+
[ge, z, ne]
|
|
344
345
|
);
|
|
345
|
-
return
|
|
346
|
+
return c ? /* @__PURE__ */ a(
|
|
346
347
|
"div",
|
|
347
348
|
{
|
|
348
|
-
className: [
|
|
349
|
-
"aria-label":
|
|
350
|
-
children: /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(
|
|
351
|
-
|
|
349
|
+
className: [be(), P].filter(Boolean).join(" "),
|
|
350
|
+
"aria-label": N ?? S("pdf.error"),
|
|
351
|
+
children: /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(ve, { variant: "error", live: "polite", children: /* @__PURE__ */ Z(ve.Description, { children: [
|
|
352
|
+
S("pdf.error"),
|
|
352
353
|
": ",
|
|
353
|
-
|
|
354
|
+
c.message
|
|
354
355
|
] }) }) })
|
|
355
356
|
}
|
|
356
357
|
) : /* @__PURE__ */ Z(
|
|
@@ -358,47 +359,48 @@ const Xe = Ae(
|
|
|
358
359
|
{
|
|
359
360
|
id: B,
|
|
360
361
|
role: "region",
|
|
361
|
-
"aria-label":
|
|
362
|
-
className: [
|
|
362
|
+
"aria-label": N ?? S("pdf.toolbarLabel"),
|
|
363
|
+
className: [be(), P].filter(Boolean).join(" "),
|
|
363
364
|
dir: z ? "rtl" : void 0,
|
|
364
|
-
onKeyDown:
|
|
365
|
+
onKeyDown: Ce,
|
|
365
366
|
tabIndex: -1,
|
|
366
367
|
"data-component": "pdf-viewer",
|
|
367
|
-
"data-
|
|
368
|
+
"data-component-id": i,
|
|
369
|
+
"data-pdfjs-worker-src": ze,
|
|
368
370
|
children: [
|
|
369
|
-
|
|
370
|
-
|
|
371
|
+
p ? /* @__PURE__ */ a(
|
|
372
|
+
Ye,
|
|
371
373
|
{
|
|
372
|
-
currentPage:
|
|
373
|
-
numPages: (
|
|
374
|
-
zoom:
|
|
375
|
-
onPrev: () =>
|
|
376
|
-
onNext: () =>
|
|
377
|
-
onJump: (e) =>
|
|
374
|
+
currentPage: l,
|
|
375
|
+
numPages: (s == null ? void 0 : s.numPages) ?? 0,
|
|
376
|
+
zoom: O,
|
|
377
|
+
onPrev: () => D(l - 1),
|
|
378
|
+
onNext: () => D(l + 1),
|
|
379
|
+
onJump: (e) => D(e),
|
|
378
380
|
onZoomIn: () => {
|
|
379
|
-
|
|
381
|
+
y(
|
|
380
382
|
(e) => J(e) ? Math.min(e * 1.25, 4) : 1.25
|
|
381
383
|
);
|
|
382
384
|
},
|
|
383
385
|
onZoomOut: () => {
|
|
384
|
-
|
|
386
|
+
y(
|
|
385
387
|
(e) => J(e) ? Math.max(e / 1.25, 0.25) : 0.75
|
|
386
388
|
);
|
|
387
389
|
},
|
|
388
|
-
onZoomPreset: (e) =>
|
|
389
|
-
onOpenSearch: () =>
|
|
390
|
+
onZoomPreset: (e) => y(e),
|
|
391
|
+
onOpenSearch: () => G(!0),
|
|
390
392
|
onPrint: $,
|
|
391
|
-
searchOpen:
|
|
392
|
-
onSearchOpenChange:
|
|
393
|
-
searchQuery:
|
|
393
|
+
searchOpen: j,
|
|
394
|
+
onSearchOpenChange: G,
|
|
395
|
+
searchQuery: le,
|
|
394
396
|
onSearchQueryChange: (e) => {
|
|
395
|
-
|
|
397
|
+
ue(e);
|
|
396
398
|
},
|
|
397
|
-
searchMatches:
|
|
399
|
+
searchMatches: Se,
|
|
398
400
|
register: De,
|
|
399
|
-
focusIndex:
|
|
400
|
-
setFocusIndex:
|
|
401
|
-
onToolbarKeyDown:
|
|
401
|
+
focusIndex: ne,
|
|
402
|
+
setFocusIndex: he,
|
|
403
|
+
onToolbarKeyDown: Te,
|
|
402
404
|
isRtl: z
|
|
403
405
|
}
|
|
404
406
|
) : null,
|
|
@@ -408,34 +410,34 @@ const Xe = Ae(
|
|
|
408
410
|
"aria-live": "polite",
|
|
409
411
|
"aria-atomic": "true",
|
|
410
412
|
className: "ds:sr-only",
|
|
411
|
-
children:
|
|
413
|
+
children: n
|
|
412
414
|
}
|
|
413
415
|
),
|
|
414
416
|
/* @__PURE__ */ a(
|
|
415
417
|
"div",
|
|
416
418
|
{
|
|
417
|
-
ref:
|
|
418
|
-
className:
|
|
419
|
+
ref: re,
|
|
420
|
+
className: Je(),
|
|
419
421
|
"data-testid": "pdf-pages-container",
|
|
420
|
-
children:
|
|
422
|
+
children: s ? Array.from({ length: s.numPages }, (e, r) => r + 1).map(
|
|
421
423
|
(e) => /* @__PURE__ */ a(
|
|
422
|
-
|
|
424
|
+
et,
|
|
423
425
|
{
|
|
424
426
|
pageNumber: e,
|
|
425
|
-
totalPages:
|
|
426
|
-
doc:
|
|
427
|
-
zoom:
|
|
428
|
-
container:
|
|
429
|
-
resizeTick:
|
|
430
|
-
shouldRender: e >=
|
|
427
|
+
totalPages: s.numPages,
|
|
428
|
+
doc: s.doc,
|
|
429
|
+
zoom: O,
|
|
430
|
+
container: re.current,
|
|
431
|
+
resizeTick: Ne,
|
|
432
|
+
shouldRender: e >= I.start && e <= I.end,
|
|
431
433
|
registerRef: (r) => {
|
|
432
|
-
|
|
434
|
+
oe.current[e - 1] = r;
|
|
433
435
|
},
|
|
434
|
-
searchQuery:
|
|
436
|
+
searchQuery: le,
|
|
435
437
|
onMatchCount: (r) => {
|
|
436
|
-
|
|
437
|
-
current: Math.min(
|
|
438
|
-
total: Math.max(
|
|
438
|
+
Me((d) => r === 0 && d.total === 0 ? d : {
|
|
439
|
+
current: Math.min(d.current || 1, r || 1),
|
|
440
|
+
total: Math.max(d.total, r)
|
|
439
441
|
});
|
|
440
442
|
}
|
|
441
443
|
},
|
|
@@ -446,8 +448,8 @@ const Xe = Ae(
|
|
|
446
448
|
{
|
|
447
449
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:text-[var(--muted-foreground)] ds:p-[var(--spacing-lg)]",
|
|
448
450
|
children: [
|
|
449
|
-
/* @__PURE__ */ a(
|
|
450
|
-
/* @__PURE__ */ a("span", { children:
|
|
451
|
+
/* @__PURE__ */ a(Fe, { size: "sm", label: S("pdf.loading") }),
|
|
452
|
+
/* @__PURE__ */ a("span", { children: S("pdf.loading") })
|
|
451
453
|
]
|
|
452
454
|
}
|
|
453
455
|
)
|
|
@@ -458,58 +460,58 @@ const Xe = Ae(
|
|
|
458
460
|
);
|
|
459
461
|
}
|
|
460
462
|
);
|
|
461
|
-
|
|
462
|
-
function
|
|
463
|
-
const { t } =
|
|
463
|
+
Ge.displayName = "PDFViewer";
|
|
464
|
+
function Ye(i) {
|
|
465
|
+
const { t } = ce(), {
|
|
464
466
|
currentPage: u,
|
|
465
|
-
numPages:
|
|
466
|
-
zoom:
|
|
467
|
+
numPages: h,
|
|
468
|
+
zoom: f,
|
|
467
469
|
onPrev: g,
|
|
468
|
-
onNext:
|
|
470
|
+
onNext: k,
|
|
469
471
|
onJump: p,
|
|
470
|
-
onZoomIn:
|
|
471
|
-
onZoomOut:
|
|
472
|
-
onZoomPreset:
|
|
473
|
-
onOpenSearch:
|
|
474
|
-
onPrint:
|
|
475
|
-
searchOpen:
|
|
476
|
-
onSearchOpenChange:
|
|
477
|
-
searchQuery:
|
|
478
|
-
onSearchQueryChange:
|
|
479
|
-
searchMatches:
|
|
480
|
-
register:
|
|
481
|
-
focusIndex:
|
|
482
|
-
setFocusIndex:
|
|
483
|
-
onToolbarKeyDown:
|
|
484
|
-
} =
|
|
485
|
-
|
|
486
|
-
|
|
472
|
+
onZoomIn: N,
|
|
473
|
+
onZoomOut: P,
|
|
474
|
+
onZoomPreset: R,
|
|
475
|
+
onOpenSearch: S,
|
|
476
|
+
onPrint: V,
|
|
477
|
+
searchOpen: B,
|
|
478
|
+
onSearchOpenChange: z,
|
|
479
|
+
searchQuery: q,
|
|
480
|
+
onSearchQueryChange: v,
|
|
481
|
+
searchMatches: K,
|
|
482
|
+
register: s,
|
|
483
|
+
focusIndex: F,
|
|
484
|
+
setFocusIndex: c,
|
|
485
|
+
onToolbarKeyDown: b
|
|
486
|
+
} = i, [l, E] = m(String(u));
|
|
487
|
+
w(() => {
|
|
488
|
+
E(String(u));
|
|
487
489
|
}, [u]);
|
|
488
|
-
const
|
|
489
|
-
function
|
|
490
|
-
const n = Number(
|
|
491
|
-
Number.isFinite(n) && n >= 1 ? p(Math.min(n,
|
|
490
|
+
const O = u <= 1, y = u >= h;
|
|
491
|
+
function I() {
|
|
492
|
+
const n = Number(l);
|
|
493
|
+
Number.isFinite(n) && n >= 1 ? p(Math.min(n, h)) : E(String(u));
|
|
492
494
|
}
|
|
493
495
|
function M(n) {
|
|
494
496
|
return /* @__PURE__ */ a(
|
|
495
497
|
"button",
|
|
496
498
|
{
|
|
497
499
|
type: "button",
|
|
498
|
-
ref:
|
|
499
|
-
tabIndex: n.index ===
|
|
500
|
-
onFocus: () =>
|
|
501
|
-
onKeyDown:
|
|
500
|
+
ref: s(n.index),
|
|
501
|
+
tabIndex: n.index === F ? 0 : -1,
|
|
502
|
+
onFocus: () => c(n.index),
|
|
503
|
+
onKeyDown: b,
|
|
502
504
|
"aria-label": n.label,
|
|
503
505
|
"aria-disabled": n.disabled || void 0,
|
|
504
506
|
title: n.label,
|
|
505
|
-
onClick: (
|
|
507
|
+
onClick: (x) => {
|
|
506
508
|
if (n.disabled) {
|
|
507
|
-
|
|
509
|
+
x.preventDefault();
|
|
508
510
|
return;
|
|
509
511
|
}
|
|
510
512
|
n.onActivate();
|
|
511
513
|
},
|
|
512
|
-
className:
|
|
514
|
+
className: ye(),
|
|
513
515
|
children: n.icon
|
|
514
516
|
}
|
|
515
517
|
);
|
|
@@ -519,15 +521,15 @@ function Ge(s) {
|
|
|
519
521
|
{
|
|
520
522
|
role: "toolbar",
|
|
521
523
|
"aria-label": t("pdf.toolbarLabel"),
|
|
522
|
-
className:
|
|
524
|
+
className: qe(),
|
|
523
525
|
children: [
|
|
524
526
|
M({
|
|
525
527
|
index: 0,
|
|
526
528
|
label: t("pdf.previousPage"),
|
|
527
|
-
disabled:
|
|
529
|
+
disabled: O,
|
|
528
530
|
onActivate: g,
|
|
529
531
|
icon: /* @__PURE__ */ a(
|
|
530
|
-
|
|
532
|
+
_e,
|
|
531
533
|
{
|
|
532
534
|
"aria-hidden": "true",
|
|
533
535
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
@@ -537,10 +539,10 @@ function Ge(s) {
|
|
|
537
539
|
M({
|
|
538
540
|
index: 1,
|
|
539
541
|
label: t("pdf.nextPage"),
|
|
540
|
-
disabled:
|
|
541
|
-
onActivate:
|
|
542
|
+
disabled: y,
|
|
543
|
+
onActivate: k,
|
|
542
544
|
icon: /* @__PURE__ */ a(
|
|
543
|
-
|
|
545
|
+
Le,
|
|
544
546
|
{
|
|
545
547
|
"aria-hidden": "true",
|
|
546
548
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
@@ -552,18 +554,18 @@ function Ge(s) {
|
|
|
552
554
|
{
|
|
553
555
|
type: "number",
|
|
554
556
|
min: 1,
|
|
555
|
-
max: Math.max(
|
|
556
|
-
value:
|
|
557
|
-
onChange: (n) =>
|
|
557
|
+
max: Math.max(h, 1),
|
|
558
|
+
value: l,
|
|
559
|
+
onChange: (n) => E(n.target.value),
|
|
558
560
|
onKeyDown: (n) => {
|
|
559
|
-
n.key === "Enter" && (n.preventDefault(),
|
|
561
|
+
n.key === "Enter" && (n.preventDefault(), I());
|
|
560
562
|
},
|
|
561
|
-
onBlur:
|
|
562
|
-
onFocus: () =>
|
|
563
|
-
ref:
|
|
564
|
-
tabIndex:
|
|
563
|
+
onBlur: I,
|
|
564
|
+
onFocus: () => c(2),
|
|
565
|
+
ref: s(2),
|
|
566
|
+
tabIndex: F === 2 ? 0 : -1,
|
|
565
567
|
"aria-label": t("pdf.currentPageInput"),
|
|
566
|
-
className:
|
|
568
|
+
className: xe()
|
|
567
569
|
}
|
|
568
570
|
),
|
|
569
571
|
/* @__PURE__ */ a(
|
|
@@ -571,7 +573,7 @@ function Ge(s) {
|
|
|
571
573
|
{
|
|
572
574
|
"aria-hidden": "true",
|
|
573
575
|
className: "type-body-sm ds:text-[var(--muted-foreground)]",
|
|
574
|
-
children: t("pdf.pageOf", { current: u, total:
|
|
576
|
+
children: t("pdf.pageOf", { current: u, total: h || 0 })
|
|
575
577
|
}
|
|
576
578
|
),
|
|
577
579
|
/* @__PURE__ */ a(
|
|
@@ -584,48 +586,48 @@ function Ge(s) {
|
|
|
584
586
|
M({
|
|
585
587
|
index: 3,
|
|
586
588
|
label: t("pdf.zoom.out"),
|
|
587
|
-
onActivate:
|
|
588
|
-
icon: /* @__PURE__ */ a(
|
|
589
|
+
onActivate: P,
|
|
590
|
+
icon: /* @__PURE__ */ a(We, { "aria-hidden": "true", className: "ds:block-size-4 ds:inline-size-4" })
|
|
589
591
|
}),
|
|
590
592
|
M({
|
|
591
593
|
index: 4,
|
|
592
594
|
label: t("pdf.zoom.in"),
|
|
593
|
-
onActivate:
|
|
594
|
-
icon: /* @__PURE__ */ a(
|
|
595
|
+
onActivate: N,
|
|
596
|
+
icon: /* @__PURE__ */ a(He, { "aria-hidden": "true", className: "ds:block-size-4 ds:inline-size-4" })
|
|
595
597
|
}),
|
|
596
598
|
/* @__PURE__ */ Z(
|
|
597
599
|
"select",
|
|
598
600
|
{
|
|
599
601
|
"aria-label": t("pdf.zoom.preset"),
|
|
600
|
-
value: typeof
|
|
602
|
+
value: typeof f == "number" ? String(f) : f,
|
|
601
603
|
onChange: (n) => {
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
|
|
604
|
+
const x = n.target.value;
|
|
605
|
+
if (x === "fit-width" || x === "fit-page" || x === "actual-size")
|
|
606
|
+
R(x);
|
|
605
607
|
else {
|
|
606
|
-
const
|
|
607
|
-
Number.isFinite(
|
|
608
|
+
const j = Number(x);
|
|
609
|
+
Number.isFinite(j) && R(j);
|
|
608
610
|
}
|
|
609
611
|
},
|
|
610
|
-
ref:
|
|
611
|
-
tabIndex:
|
|
612
|
-
onFocus: () =>
|
|
613
|
-
onKeyDown:
|
|
614
|
-
className:
|
|
612
|
+
ref: s(5),
|
|
613
|
+
tabIndex: F === 5 ? 0 : -1,
|
|
614
|
+
onFocus: () => c(5),
|
|
615
|
+
onKeyDown: b,
|
|
616
|
+
className: Ue(),
|
|
615
617
|
children: [
|
|
616
618
|
/* @__PURE__ */ a("option", { value: "fit-width", children: t("pdf.zoom.fitWidth") }),
|
|
617
619
|
/* @__PURE__ */ a("option", { value: "fit-page", children: t("pdf.zoom.fitPage") }),
|
|
618
620
|
/* @__PURE__ */ a("option", { value: "actual-size", children: t("pdf.zoom.actualSize") }),
|
|
619
|
-
|
|
621
|
+
Xe.filter(J).map((n) => /* @__PURE__ */ a("option", { value: String(n), children: `${Math.round(n * 100)}%` }, n))
|
|
620
622
|
]
|
|
621
623
|
}
|
|
622
624
|
),
|
|
623
|
-
/* @__PURE__ */ Z(X.Root, { open:
|
|
625
|
+
/* @__PURE__ */ Z(X.Root, { open: B, onOpenChange: z, children: [
|
|
624
626
|
/* @__PURE__ */ a(X.Trigger, { asChild: !0, children: M({
|
|
625
627
|
index: 6,
|
|
626
628
|
label: t("pdf.search.open"),
|
|
627
|
-
onActivate:
|
|
628
|
-
icon: /* @__PURE__ */ a(
|
|
629
|
+
onActivate: S,
|
|
630
|
+
icon: /* @__PURE__ */ a(Ze, { "aria-hidden": "true", className: "ds:block-size-4 ds:inline-size-4" })
|
|
629
631
|
}) }),
|
|
630
632
|
/* @__PURE__ */ a(X.Portal, { children: /* @__PURE__ */ Z(
|
|
631
633
|
X.Content,
|
|
@@ -645,11 +647,11 @@ function Ge(s) {
|
|
|
645
647
|
{
|
|
646
648
|
type: "search",
|
|
647
649
|
autoFocus: !0,
|
|
648
|
-
value:
|
|
649
|
-
onChange: (n) =>
|
|
650
|
+
value: q,
|
|
651
|
+
onChange: (n) => v(n.target.value),
|
|
650
652
|
placeholder: t("pdf.search.placeholder"),
|
|
651
653
|
"aria-label": t("pdf.search.placeholder"),
|
|
652
|
-
className:
|
|
654
|
+
className: xe({ className: "ds:inline-size-[16rem] ds:text-start" })
|
|
653
655
|
}
|
|
654
656
|
),
|
|
655
657
|
/* @__PURE__ */ a(
|
|
@@ -657,10 +659,10 @@ function Ge(s) {
|
|
|
657
659
|
{
|
|
658
660
|
"aria-live": "polite",
|
|
659
661
|
className: "type-meta ds:text-[var(--muted-foreground)]",
|
|
660
|
-
children:
|
|
661
|
-
current:
|
|
662
|
-
total:
|
|
663
|
-
}) :
|
|
662
|
+
children: K.total > 0 ? t("pdf.search.countOfTotal", {
|
|
663
|
+
current: K.current,
|
|
664
|
+
total: K.total
|
|
665
|
+
}) : q ? t("pdf.search.noResults") : ""
|
|
664
666
|
}
|
|
665
667
|
),
|
|
666
668
|
/* @__PURE__ */ a(X.Close, { asChild: !0, children: /* @__PURE__ */ a(
|
|
@@ -668,8 +670,8 @@ function Ge(s) {
|
|
|
668
670
|
{
|
|
669
671
|
type: "button",
|
|
670
672
|
"aria-label": t("pdf.search.close"),
|
|
671
|
-
className:
|
|
672
|
-
children: /* @__PURE__ */ a(
|
|
673
|
+
className: ye(),
|
|
674
|
+
children: /* @__PURE__ */ a(Ee, { "aria-hidden": "true", className: "ds:block-size-4 ds:inline-size-4" })
|
|
673
675
|
}
|
|
674
676
|
) })
|
|
675
677
|
]
|
|
@@ -679,67 +681,67 @@ function Ge(s) {
|
|
|
679
681
|
M({
|
|
680
682
|
index: 7,
|
|
681
683
|
label: t("pdf.print"),
|
|
682
|
-
onActivate:
|
|
683
|
-
icon: /* @__PURE__ */ a(
|
|
684
|
+
onActivate: V,
|
|
685
|
+
icon: /* @__PURE__ */ a(Be, { "aria-hidden": "true", className: "ds:block-size-4 ds:inline-size-4" })
|
|
684
686
|
})
|
|
685
687
|
]
|
|
686
688
|
}
|
|
687
689
|
);
|
|
688
690
|
}
|
|
689
|
-
function
|
|
691
|
+
function et(i) {
|
|
690
692
|
const {
|
|
691
693
|
pageNumber: t,
|
|
692
694
|
totalPages: u,
|
|
693
|
-
doc:
|
|
694
|
-
zoom:
|
|
695
|
+
doc: h,
|
|
696
|
+
zoom: f,
|
|
695
697
|
container: g,
|
|
696
|
-
resizeTick:
|
|
698
|
+
resizeTick: k,
|
|
697
699
|
shouldRender: p,
|
|
698
|
-
registerRef:
|
|
699
|
-
searchQuery:
|
|
700
|
-
onMatchCount:
|
|
701
|
-
} =
|
|
700
|
+
registerRef: N,
|
|
701
|
+
searchQuery: P,
|
|
702
|
+
onMatchCount: R
|
|
703
|
+
} = i, { t: S } = ce(), V = A(null), B = A(null), [z, q] = m({
|
|
702
704
|
width: 612,
|
|
703
705
|
height: 792
|
|
704
|
-
}), [
|
|
705
|
-
|
|
706
|
-
let
|
|
707
|
-
return
|
|
708
|
-
|
|
706
|
+
}), [v, K] = m(null);
|
|
707
|
+
w(() => {
|
|
708
|
+
let c = !1;
|
|
709
|
+
return h.getPage(t).then((b) => {
|
|
710
|
+
c || K(b);
|
|
709
711
|
}), () => {
|
|
710
|
-
|
|
712
|
+
c = !0;
|
|
711
713
|
};
|
|
712
|
-
}, [
|
|
713
|
-
if (!
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
}, [
|
|
717
|
-
if (!
|
|
718
|
-
const
|
|
719
|
-
|
|
714
|
+
}, [h, t]), w(() => {
|
|
715
|
+
if (!v) return;
|
|
716
|
+
const c = v.getViewport({ scale: 1 }), b = we(f, c, g), l = v.getViewport({ scale: b });
|
|
717
|
+
q({ width: Math.floor(l.width), height: Math.floor(l.height) });
|
|
718
|
+
}, [v, f, g, k]), w(() => {
|
|
719
|
+
if (!v || !p) {
|
|
720
|
+
const j = V.current;
|
|
721
|
+
j && !p && (j.width = 0);
|
|
720
722
|
return;
|
|
721
723
|
}
|
|
722
|
-
const
|
|
724
|
+
const c = V.current, b = B.current;
|
|
725
|
+
if (!c) return;
|
|
726
|
+
const l = c.getContext("2d");
|
|
723
727
|
if (!l) return;
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
canvasContext: w,
|
|
731
|
-
viewport: O
|
|
728
|
+
const E = v.getViewport({ scale: 1 }), O = we(f, E, g), y = v.getViewport({ scale: O }), I = Math.max(1, window.devicePixelRatio || 1);
|
|
729
|
+
c.width = Math.floor(y.width * I), c.height = Math.floor(y.height * I), l.setTransform(I, 0, 0, I, 0, 0);
|
|
730
|
+
const M = v.render({
|
|
731
|
+
canvas: c,
|
|
732
|
+
canvasContext: l,
|
|
733
|
+
viewport: y
|
|
732
734
|
});
|
|
733
|
-
let n = !1,
|
|
735
|
+
let n = !1, x = null;
|
|
734
736
|
return M.promise.then(async () => {
|
|
735
|
-
if (n || !
|
|
736
|
-
|
|
737
|
-
const
|
|
738
|
-
n || (
|
|
739
|
-
textContentSource:
|
|
740
|
-
container:
|
|
741
|
-
viewport:
|
|
742
|
-
}), await
|
|
737
|
+
if (n || !b) return;
|
|
738
|
+
b.textContent = "";
|
|
739
|
+
const j = await v.getTextContent();
|
|
740
|
+
n || (x = new de.TextLayer({
|
|
741
|
+
textContentSource: j,
|
|
742
|
+
container: b,
|
|
743
|
+
viewport: y
|
|
744
|
+
}), await x.render(), ke(b, P, R));
|
|
743
745
|
}).catch(() => {
|
|
744
746
|
}), () => {
|
|
745
747
|
n = !0;
|
|
@@ -747,40 +749,40 @@ function Ye(s) {
|
|
|
747
749
|
M.cancel();
|
|
748
750
|
} catch {
|
|
749
751
|
}
|
|
750
|
-
if (
|
|
752
|
+
if (x)
|
|
751
753
|
try {
|
|
752
|
-
|
|
754
|
+
x.cancel();
|
|
753
755
|
} catch {
|
|
754
756
|
}
|
|
755
757
|
};
|
|
756
|
-
}, [
|
|
758
|
+
}, [v, p, f, g, k, P, R]), w(() => {
|
|
757
759
|
if (!p) return;
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
}, [
|
|
761
|
-
const
|
|
762
|
-
width:
|
|
763
|
-
height:
|
|
764
|
-
},
|
|
765
|
-
width:
|
|
766
|
-
height:
|
|
760
|
+
const c = B.current;
|
|
761
|
+
c && ke(c, P, R);
|
|
762
|
+
}, [P, p, R]);
|
|
763
|
+
const s = {
|
|
764
|
+
width: z.width,
|
|
765
|
+
height: z.height
|
|
766
|
+
}, F = {
|
|
767
|
+
width: z.width,
|
|
768
|
+
height: z.height
|
|
767
769
|
};
|
|
768
770
|
return /* @__PURE__ */ Z(
|
|
769
771
|
"article",
|
|
770
772
|
{
|
|
771
|
-
ref: (
|
|
772
|
-
|
|
773
|
+
ref: (c) => {
|
|
774
|
+
N(c);
|
|
773
775
|
},
|
|
774
776
|
"data-page-number": t,
|
|
775
|
-
"aria-label":
|
|
776
|
-
className:
|
|
777
|
-
style:
|
|
777
|
+
"aria-label": S("pdf.pageOf", { current: t, total: u }),
|
|
778
|
+
className: $e(),
|
|
779
|
+
style: F,
|
|
778
780
|
children: [
|
|
779
|
-
/* @__PURE__ */ a("canvas", { ref:
|
|
781
|
+
/* @__PURE__ */ a("canvas", { ref: V, style: s }),
|
|
780
782
|
/* @__PURE__ */ a(
|
|
781
783
|
"div",
|
|
782
784
|
{
|
|
783
|
-
ref:
|
|
785
|
+
ref: B,
|
|
784
786
|
"aria-hidden": "false",
|
|
785
787
|
className: [
|
|
786
788
|
"ds:absolute ds:inset-0",
|
|
@@ -798,20 +800,20 @@ function Ye(s) {
|
|
|
798
800
|
}
|
|
799
801
|
);
|
|
800
802
|
}
|
|
801
|
-
function
|
|
802
|
-
if (
|
|
803
|
+
function ke(i, t, u) {
|
|
804
|
+
if (i.querySelectorAll("[data-match]").forEach((p) => {
|
|
803
805
|
p.removeAttribute("data-match");
|
|
804
806
|
}), !t) {
|
|
805
807
|
u(0);
|
|
806
808
|
return;
|
|
807
809
|
}
|
|
808
|
-
const
|
|
810
|
+
const f = t.toLowerCase();
|
|
809
811
|
let g = 0;
|
|
810
|
-
|
|
811
|
-
(p.textContent ?? "").toLowerCase().includes(
|
|
812
|
+
i.querySelectorAll("span").forEach((p) => {
|
|
813
|
+
(p.textContent ?? "").toLowerCase().includes(f) && (p.setAttribute("data-match", "true"), g += 1);
|
|
812
814
|
}), u(g);
|
|
813
815
|
}
|
|
814
|
-
const
|
|
816
|
+
const mt = {
|
|
815
817
|
id: "pdf-viewer",
|
|
816
818
|
capabilities: ["paginate", "view_change", "filter"],
|
|
817
819
|
state: {},
|
|
@@ -820,40 +822,45 @@ const pt = {
|
|
|
820
822
|
safety: "read",
|
|
821
823
|
argsType: "{ page: number }",
|
|
822
824
|
description: "Navigate to a specific 1-indexed page.",
|
|
823
|
-
invoke: (
|
|
824
|
-
|
|
825
|
+
invoke: (i, t) => {
|
|
826
|
+
i.goToPage(t.page);
|
|
825
827
|
}
|
|
826
828
|
},
|
|
827
829
|
set_zoom: {
|
|
828
830
|
safety: "read",
|
|
829
831
|
argsType: "{ zoom: PDFZoomPreset }",
|
|
830
832
|
description: "Apply a zoom preset.",
|
|
831
|
-
invoke: (
|
|
832
|
-
|
|
833
|
+
invoke: (i, t) => {
|
|
834
|
+
i.setZoom(t.zoom);
|
|
833
835
|
}
|
|
834
836
|
},
|
|
835
837
|
search: {
|
|
836
838
|
safety: "read",
|
|
837
839
|
argsType: "{ query: string }",
|
|
838
840
|
description: "Search the document for the given query and highlight matches.",
|
|
839
|
-
invoke: (
|
|
840
|
-
|
|
841
|
+
invoke: (i, t) => {
|
|
842
|
+
i.search(t.query);
|
|
841
843
|
}
|
|
842
844
|
},
|
|
843
845
|
print: {
|
|
844
846
|
safety: "read",
|
|
845
847
|
description: "Open the browser print dialog for the document.",
|
|
846
|
-
invoke: (
|
|
847
|
-
|
|
848
|
+
invoke: (i) => {
|
|
849
|
+
i.print();
|
|
848
850
|
}
|
|
849
851
|
}
|
|
850
852
|
},
|
|
851
853
|
domHooks: {
|
|
852
|
-
root: { attr: "data-component", value: "pdf-viewer" }
|
|
854
|
+
root: { attr: "data-component", value: "pdf-viewer" },
|
|
855
|
+
instanceId: {
|
|
856
|
+
attr: "data-component-id",
|
|
857
|
+
sourceProp: "id",
|
|
858
|
+
description: "Sourced from the id prop."
|
|
859
|
+
}
|
|
853
860
|
}
|
|
854
861
|
};
|
|
855
862
|
export {
|
|
856
|
-
|
|
857
|
-
|
|
863
|
+
Ge as P,
|
|
864
|
+
mt as p
|
|
858
865
|
};
|
|
859
|
-
//# sourceMappingURL=pdf-viewer.agent-
|
|
866
|
+
//# sourceMappingURL=pdf-viewer.agent-BaGEDheA.js.map
|