vanilla-breeze 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9527 -9580
- package/dist/cdn/components/accordion-wc.js +1 -1
- package/dist/cdn/components/activity-feed.js +1 -1
- package/dist/cdn/components/ai-chat.js +6 -6
- package/dist/cdn/components/ai-summary.js +2 -2
- package/dist/cdn/components/analytics-panel.js +2 -2
- package/dist/cdn/components/audio-player.js +4 -4
- package/dist/cdn/components/audio-visualizer.js +2 -2
- package/dist/cdn/components/author-index.js +2 -2
- package/dist/cdn/components/brand-mark.js +1 -1
- package/dist/cdn/components/bread-crumb.js +1 -1
- package/dist/cdn/components/calendar-wc.js +2 -2
- package/dist/cdn/components/card-list.js +1 -1
- package/dist/cdn/components/carousel-wc.js +1 -1
- package/dist/cdn/components/change-set.js +1 -1
- package/dist/cdn/components/chart-wc.js +13 -13
- package/dist/cdn/components/chat-input.js +1 -1
- package/dist/cdn/components/chat-window.js +1 -1
- package/dist/cdn/components/color-picker.js +1 -1
- package/dist/cdn/components/combo-box.js +1 -1
- package/dist/cdn/components/command-palette.js +1 -1
- package/dist/cdn/components/comment-box.js +35 -35
- package/dist/cdn/components/comment-thread.js +38 -38
- package/dist/cdn/components/comment-wc.js +1 -1
- package/dist/cdn/components/compare-surface.js +1 -1
- package/dist/cdn/components/consent-banner.js +1 -1
- package/dist/cdn/components/content-lens.js +1 -1
- package/dist/cdn/components/content-swap.js +1 -1
- package/dist/cdn/components/context-menu.js +1 -1
- package/dist/cdn/components/data-table.js +1 -1
- package/dist/cdn/components/date-picker.js +1 -1
- package/dist/cdn/components/day-view.js +1 -1
- package/dist/cdn/components/diagram-wc.js +2 -2
- package/dist/cdn/components/drag-surface.js +1 -1
- package/dist/cdn/components/drop-down.js +1 -1
- package/dist/cdn/components/emoji-picker.js +1 -1
- package/dist/cdn/components/flow-diagram.js +1 -1
- package/dist/cdn/components/foot-notes.js +1 -1
- package/dist/cdn/components/form-field.js +1 -1
- package/dist/cdn/components/geo-map.js +3 -3
- package/dist/cdn/components/glossary-index.js +1 -1
- package/dist/cdn/components/glossary-wc.js +1 -1
- package/dist/cdn/components/heading-links.js +1 -1
- package/dist/cdn/components/highlight-wc.js +2 -2
- package/dist/cdn/components/icon-wc.js +2 -2
- package/dist/cdn/components/image-gallery.js +1 -1
- package/dist/cdn/components/image-map.js +1 -1
- package/dist/cdn/components/include-file.js +1 -1
- package/dist/cdn/components/manifest.json +60 -56
- package/dist/cdn/components/markdown-editor.js +25 -25
- package/dist/cdn/components/markdown-viewer.js +27 -27
- package/dist/cdn/components/nav-bar.js +1 -1
- package/dist/cdn/components/note-wc.js +2 -2
- package/dist/cdn/components/notification-wc.js +23 -22
- package/dist/cdn/components/page-info.js +6 -6
- package/dist/cdn/components/page-stats.js +1 -1
- package/dist/cdn/components/page-toc.js +1 -1
- package/dist/cdn/components/page-tools.js +1 -1
- package/dist/cdn/components/page-tour.js +1 -1
- package/dist/cdn/components/pager-wc.js +1 -1
- package/dist/cdn/components/poll-wc.js +1 -1
- package/dist/cdn/components/pop-over.js +1 -1
- package/dist/cdn/components/popularity-index.js +1 -1
- package/dist/cdn/components/print-page.js +1 -1
- package/dist/cdn/components/progress-tracker.js +1 -1
- package/dist/cdn/components/qr-code.js +1 -1
- package/dist/cdn/components/reaction-bar.js +1 -1
- package/dist/cdn/components/reading-progress.js +1 -1
- package/dist/cdn/components/recently-visited.js +1 -1
- package/dist/cdn/components/score-card.js +2 -2
- package/dist/cdn/components/selection-menu.js +1 -1
- package/dist/cdn/components/settings-panel.js +6 -6
- package/dist/cdn/components/share-wc.js +2 -2
- package/dist/cdn/components/short-cuts.js +1 -1
- package/dist/cdn/components/site-index.js +1 -1
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/site-search.js +1 -1
- package/dist/cdn/components/slide-accept.js +1 -1
- package/dist/cdn/components/social-embed.js +1 -1
- package/dist/cdn/components/social-links.js +2 -0
- package/dist/cdn/components/split-surface.js +1 -1
- package/dist/cdn/components/star-rating.js +1 -1
- package/dist/cdn/components/status-wc.js +1 -1
- package/dist/cdn/components/stepper-wc.js +1 -1
- package/dist/cdn/components/tab-set.js +1 -1
- package/dist/cdn/components/text-reader.js +2 -2
- package/dist/cdn/components/theme-picker.js +44 -212
- package/dist/cdn/components/time-index.js +1 -1
- package/dist/cdn/components/time-picker.js +1 -1
- package/dist/cdn/components/toast-msg.js +2 -2
- package/dist/cdn/components/tool-tip.js +1 -1
- package/dist/cdn/components/topic-map.js +4 -4
- package/dist/cdn/components/trust-filter.js +1 -1
- package/dist/cdn/components/version-switcher.js +6 -6
- package/dist/cdn/components/video-player.js +4 -4
- package/dist/cdn/components/watch-wc.js +2 -2
- package/dist/cdn/components/week-view.js +1 -1
- package/dist/cdn/components/youtube-player.js +1 -1
- package/dist/cdn/fonts/barlow-condensed-OFL.txt +93 -0
- package/dist/cdn/fonts/barlow-condensed-latin-400-italic.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-500-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-600-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-700-italic.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-400-italic.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-500-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-600-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-700-italic.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/big-shoulders-display-OFL.txt +93 -0
- package/dist/cdn/fonts/big-shoulders-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/big-shoulders-display-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/caveat-OFL.txt +93 -0
- package/dist/cdn/fonts/caveat-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/caveat-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-OFL.txt +93 -0
- package/dist/cdn/fonts/courier-prime-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/dm-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-OFL.txt +93 -0
- package/dist/cdn/fonts/dm-serif-display-latin-400-italic.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-latin-ext-400-italic.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-OFL.txt +93 -0
- package/dist/cdn/fonts/exo-2-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fira-code-OFL.txt +93 -0
- package/dist/cdn/fonts/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fira-code-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/flow-block-OFL.txt +93 -0
- package/dist/cdn/fonts/flow-block-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/flow-block-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/fraunces-OFL.txt +93 -0
- package/dist/cdn/fonts/fraunces-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fraunces-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/inter-OFL.txt +93 -0
- package/dist/cdn/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/inter-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/josefin-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/lora-OFL.txt +93 -0
- package/dist/cdn/fonts/lora-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/lora-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/lora-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/lora-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-OFL.txt +93 -0
- package/dist/cdn/fonts/merriweather-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-OFL.txt +93 -0
- package/dist/cdn/fonts/newsreader-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/nunito-OFL.txt +93 -0
- package/dist/cdn/fonts/nunito-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/nunito-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/nunito-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/nunito-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/orbitron-OFL.txt +93 -0
- package/dist/cdn/fonts/orbitron-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/playfair-display-OFL.txt +93 -0
- package/dist/cdn/fonts/playfair-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/playfair-display-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/press-start-2p-OFL.txt +93 -0
- package/dist/cdn/fonts/press-start-2p-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/press-start-2p-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-OFL.txt +93 -0
- package/dist/cdn/fonts/redacted-script-latin-300-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-300-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/shantell-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/share-tech-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/share-tech-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/source-code-pro-OFL.txt +93 -0
- package/dist/cdn/fonts/source-code-pro-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/space-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/vt323-OFL.txt +93 -0
- package/dist/cdn/fonts/vt323-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/vt323-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/packs/effects.full.js +1 -1
- package/dist/cdn/packs/kawaii/fonts/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/fira-code-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii.full.css +1 -1
- package/dist/cdn/packs/kawaii.theme.css +1 -1
- package/dist/cdn/packs/manifest.json +5 -5
- package/dist/cdn/packs/prototype.full.js +1 -1
- package/dist/cdn/packs/ui.full.css +1 -1
- package/dist/cdn/packs/ui.full.js +44 -212
- package/dist/cdn/themes/8bit.css +1 -1
- package/dist/cdn/themes/8bit.tokens.json +8 -37
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.css +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +3 -6
- package/dist/cdn/themes/art-deco-dark.tokens.json +3 -27
- package/dist/cdn/themes/art-deco.css +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +5 -11
- package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus.css +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +13 -7
- package/dist/cdn/themes/brutalist-dark.tokens.json +3 -27
- package/dist/cdn/themes/brutalist.tokens.json +5 -11
- package/dist/cdn/themes/catppuccin-frappe.css +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte.css +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.css +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.css +1 -1
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
- package/dist/cdn/themes/classic-dark.tokens.json +41 -41
- package/dist/cdn/themes/classic.tokens.json +25 -31
- package/dist/cdn/themes/claymorphism-dark.tokens.json +533 -161
- package/dist/cdn/themes/claymorphism.css +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +531 -135
- package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
- package/dist/cdn/themes/clinical.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore.css +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.css +1 -1
- package/dist/cdn/themes/cyber.tokens.json +5 -11
- package/dist/cdn/themes/dawn-dark.tokens.json +3 -27
- package/dist/cdn/themes/dawn.css +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.css +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.css +1 -1
- package/dist/cdn/themes/dusk.tokens.json +10 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.css +1 -1
- package/dist/cdn/themes/editorial.tokens.json +19 -16
- package/dist/cdn/themes/financial-dark.tokens.json +1 -1
- package/dist/cdn/themes/financial.css +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.css +1 -1
- package/dist/cdn/themes/genai.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +233 -116
- package/dist/cdn/themes/glassmorphism.css +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +233 -116
- package/dist/cdn/themes/government-dark.tokens.json +1 -1
- package/dist/cdn/themes/government.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox.css +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +3 -2
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.css +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +10 -1
- package/dist/cdn/themes/journal-dark.tokens.json +3 -27
- package/dist/cdn/themes/journal.css +1 -1
- package/dist/cdn/themes/journal.tokens.json +21 -21
- package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
- package/dist/cdn/themes/kawaii.css +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +1 -1
- package/dist/cdn/themes/magna-dark.tokens.json +1 -1
- package/dist/cdn/themes/magna.css +1 -1
- package/dist/cdn/themes/magna.tokens.json +2 -14
- package/dist/cdn/themes/manifest.json +37 -37
- package/dist/cdn/themes/midnight.css +1 -1
- package/dist/cdn/themes/midnight.tokens.json +9 -1
- package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
- package/dist/cdn/themes/minimal.tokens.json +25 -27
- package/dist/cdn/themes/modern-dark.tokens.json +41 -41
- package/dist/cdn/themes/modern.css +1 -1
- package/dist/cdn/themes/modern.tokens.json +21 -21
- package/dist/cdn/themes/nes-dark.tokens.json +3 -27
- package/dist/cdn/themes/nes.css +1 -1
- package/dist/cdn/themes/nes.tokens.json +10 -39
- package/dist/cdn/themes/neumorphism-dark.tokens.json +266 -134
- package/dist/cdn/themes/neumorphism.css +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +266 -134
- package/dist/cdn/themes/nord-dark.tokens.json +3 -27
- package/dist/cdn/themes/nord.css +1 -1
- package/dist/cdn/themes/nord.tokens.json +3 -2
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.css +1 -1
- package/dist/cdn/themes/organic.tokens.json +5 -14
- package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine.css +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +3 -2
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.css +1 -1
- package/dist/cdn/themes/rough.tokens.json +1 -1
- package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
- package/dist/cdn/themes/solarized.css +1 -1
- package/dist/cdn/themes/solarized.tokens.json +1 -1
- package/dist/cdn/themes/startup-dark.tokens.json +1 -1
- package/dist/cdn/themes/startup.css +1 -1
- package/dist/cdn/themes/startup.tokens.json +1 -1
- package/dist/cdn/themes/super2026-dark.tokens.json +6 -30
- package/dist/cdn/themes/super2026.css +1 -1
- package/dist/cdn/themes/super2026.tokens.json +1 -1
- package/dist/cdn/themes/swiss-dark.tokens.json +4 -40
- package/dist/cdn/themes/swiss.tokens.json +34 -68
- package/dist/cdn/themes/terminal.css +1 -1
- package/dist/cdn/themes/terminal.tokens.json +286 -120
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +3 -27
- package/dist/cdn/themes/tokyo-night.css +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +3 -2
- package/dist/cdn/themes/vaporwave-dark.tokens.json +3 -27
- package/dist/cdn/themes/vaporwave.css +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +9 -1
- package/dist/cdn/themes/win9x-dark.tokens.json +5 -29
- package/dist/cdn/themes/win9x.tokens.json +9 -9
- package/dist/cdn/vanilla-breeze-autoload.js +113 -107
- package/dist/cdn/vanilla-breeze-charts.js +13 -13
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +86 -80
- package/dist/cdn/vanilla-breeze-dev.css +1 -1
- package/dist/cdn/vanilla-breeze-extras.js +33 -33
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +158 -325
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;function b(a,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=v.get(a);if(customElements.get(a)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${a}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=i){s.priority===i&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}v.set(a,r),customElements.define(a,t)}var l=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,r){t.addEventListener(e,i,r),this.#t.push(()=>t.removeEventListener(e,i,r))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{e?i.add(t):i.delete(t)}catch{let r=`--${t}`;e?i.add(r):i.delete(r)}}_adoptInternals(t){this.#e||(this.#e=t)}#i(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#i()?.validity}get validationMessage(){return this.#i()?.validationMessage??""}get willValidate(){return this.#i()?.willValidate??!1}get form(){return this.#i()?.form??null}checkValidity(){return this.#i()?.checkValidity()??!0}reportValidity(){return this.#i()?.reportValidity()??!0}};function m(a){return k(a&&a.closest("[lang]")?.lang||document.documentElement.lang||navigator.language||"en")}function k(a,t="en-US"){try{if(a)return Intl.getCanonicalLocales(a),a}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}var x=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),g=new WeakMap;function A(a,t){let e=g.get(t);e||g.set(t,e=new Map);let i=e.get(a);if(!i||!i.region.isConnected){let s=(t.ownerDocument||document).createElement("span");s.setAttribute("data-vb-announcer",a),s.setAttribute("role",a==="assertive"?"alert":"status"),s.setAttribute("aria-live",a),s.setAttribute("aria-atomic","true"),s.style.cssText=x,t.appendChild(s),i={region:s},e.set(a,i)}return i}function y(a,{politeness:t="polite",root:e}={}){let i=String(a??"").trim();if(!i||typeof document>"u")return null;let r=e||document.body;if(!r)return null;let n=A(t==="assertive"?"assertive":"polite",r);return clearTimeout(n.write),clearTimeout(n.clear),n.region.textContent="",n.write=setTimeout(()=>{n.region.textContent=i,n.clear=setTimeout(()=>{n.region.textContent=""},7e3)},50),n.region}var d=[.5,.75,1,1.25,1.5,2],w=3e3,c=10,S=5,E='input, button, a[href], summary, select, textarea, video[controls], [contenteditable]:not([contenteditable="false"])',T={player:"Video player",controls:"Video controls","play-video":"Play video",play:"Play",pause:"Pause",seek:"Seek","skip-back":"Skip back 10 seconds","skip-forward":"Skip forward 10 seconds",mute:"Mute",volume:"Volume",speed:"Playback speed {rate}",captions:"Captions",fullscreen:"Fullscreen","exit-fullscreen":"Exit fullscreen",playing:"Playing",paused:"Paused",ended:"Ended",buffering:"Buffering","time-of":"{current} of {duration}"},p=class extends l{#t=null;#e=null;#i=!1;#p=null;#c=null;#b=null;#u=null;#q=null;#B=null;#h=null;#V=null;#P=null;#f=null;#o=null;#m=null;#G=null;#_=null;#s=null;#g=2;#F=null;#H=null;#y=null;#I=!1;#w="en";#k=null;#x=null;setup(){if(this.#t=this.querySelector("video"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls"),this.#Y(),this.#W(),this.#Q(),this.#Z(),this.#et(),this.#tt(),this.#J(),this.#R(),this.hasAttribute("muted")&&(this.#t.muted=!0),this.#l(),!this.#e&&this.hasAttribute("loop")&&(this.#t.loop=!0),this.#I||(this.#I=!0,globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches?this.#t.autoplay&&(this.#t.autoplay=!1,this.#t.pause()):this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{})),this.#n(),this.#F=()=>{let e=this.shadowRoot?.querySelector(".player");e&&(e.style.display="none",e.offsetHeight,e.style.display="")},this.listen(window,"vb:theme-change",this.#F),this.#H=()=>{let e=this.#E();e!==this.hasAttribute("data-fullscreen")&&(this.#K(e),this.#m.setAttribute("aria-label",this.#r(e?"exit-fullscreen":"fullscreen")),this.#a("video-player:fullscreen",{active:e}))},this.listen(document,"fullscreenchange",this.#H),this.#K(this.#E());let t=this.#z();return t&&this.hasAttribute("captions")&&(t.mode="showing"),this.#U(),this.listen(this.#t.textTracks,"change",()=>this.#U()),this.#i=!this.#t.paused&&!this.#t.ended,this.#d(this.#t.ended?"ended":this.#i?"playing":this.#t.currentTime>0?"paused":"idle"),this.#c.setAttribute("aria-label",this.#r(this.#i?"pause":"play")),this.#L(),this.#S(),!0}teardown(){this.#t&&this.#t.setAttribute("controls",""),this.#s!=null&&clearTimeout(this.#s),this.#s=null}get src(){return this.#t?.getAttribute("src")||this.#t?.currentSrc||""}set src(t){if(!this.#t)return;let e=t==null?"":String(t);this.#t.getAttribute("src")!==e&&(this.#t.setAttribute("src",e),this.#t.load?.(),this.#a("video-player:src-changed",{src:e,source:"property"}))}get currentTime(){return this.#t?.currentTime??0}set currentTime(t){this.#t&&(this.#t.currentTime=Number(t)||0)}#Y(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
2
2
|
<style>${this.#X()}</style>
|
|
3
3
|
<div part="player" class="player">
|
|
4
4
|
<slot></slot>
|
|
@@ -63,7 +63,7 @@ var A=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;functi
|
|
|
63
63
|
</span>
|
|
64
64
|
<span class="spacer"></span>
|
|
65
65
|
<button part="speed-button" class="speed-btn" type="button" aria-label="Playback speed 1x">
|
|
66
|
-
<span
|
|
66
|
+
<span>1x</span>
|
|
67
67
|
</button>
|
|
68
68
|
<button part="captions-button" class="captions-btn" type="button" aria-label="Captions" aria-pressed="false">
|
|
69
69
|
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" width="20" height="20">
|
|
@@ -82,7 +82,7 @@ var A=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;functi
|
|
|
82
82
|
</div>
|
|
83
83
|
<div class="sr-status" role="status" aria-live="polite"></div>
|
|
84
84
|
</div>
|
|
85
|
-
`,this.#p=t.querySelector(".controls"),this.#c=t.querySelector(".play-btn"),this.#
|
|
85
|
+
`,this.#p=t.querySelector(".controls"),this.#c=t.querySelector(".play-btn"),this.#b=t.querySelector(".play-overlay"),this.#u=t.querySelector(".timeline"),this.#q=t.querySelector(".timeline-fill"),this.#B=t.querySelector(".timeline-buffer"),this.#h=t.querySelector(".volume"),this.#V=t.querySelector(".current-time"),this.#P=t.querySelector(".duration"),this.#f=t.querySelector(".speed-btn"),this.#o=t.querySelector(".captions-btn"),this.#m=t.querySelector(".fullscreen-btn"),this.#G=t.querySelector(".buffer-indicator"),this.#_=t.querySelector(".sr-status"),this.#y=t.querySelector(".mute-btn")}#R(){let t=this.#t.querySelector('track[kind="captions"], track[kind="subtitles"]');this.#o.hidden=!t}#r(t,e={}){let i=this.getAttribute(`data-label-${t}`)??T[t]??t;for(let[r,s]of Object.entries(e))i=i.replaceAll(`{${r}}`,s);return i}#W(){this.#w=m(this);try{this.#k=new Intl.NumberFormat(this.#w,{useGrouping:!1})}catch{this.#k=new Intl.NumberFormat("en",{useGrouping:!1})}let t=Intl.DurationFormat;try{this.#x=t?new t(this.#w,{style:"digital",hoursDisplay:"auto"}):null}catch{this.#x=null}}#J(){let t=this.shadowRoot,e=(i,r)=>t.querySelector(i)?.setAttribute("aria-label",this.#r(r));e(".controls","controls"),e(".play-overlay","play-video"),e(".timeline","seek"),e(".skip-back-btn","skip-back"),e(".skip-forward-btn","skip-forward"),e(".mute-btn","mute"),e(".volume","volume"),e(".captions-btn","captions"),this.#m.setAttribute("aria-label",this.#r(this.#E()?"exit-fullscreen":"fullscreen")),this.#D(),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","group"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label",this.#r("player")),this.hasAttribute("aria-keyshortcuts")||this.setAttribute("aria-keyshortcuts","Space k ArrowLeft ArrowRight ArrowUp ArrowDown m f c")}#D(){let t=d[this.#g],e=`${this.#k?.format(t)??t}x`,i=this.#f.querySelector("span");i.textContent=e,this.#f.setAttribute("aria-label",this.#r("speed",{rate:e}))}#X(){return`
|
|
86
86
|
:host {
|
|
87
87
|
display: block;
|
|
88
88
|
--_accent: var(--video-player-accent, var(--color-primary, oklch(55% 0.2 260)));
|
|
@@ -566,5 +566,5 @@ var A=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;functi
|
|
|
566
566
|
cursor: auto;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
`}#Q(){let t=this.#t;this.listen(t,"timeupdate",()=>this.#S()),this.listen(t,"loadedmetadata",()=>{this.#
|
|
569
|
+
`}#Q(){let t=this.#t;this.listen(t,"timeupdate",()=>this.#S()),this.listen(t,"loadedmetadata",()=>{this.#L(),this.#S()}),this.listen(t,"durationchange",()=>this.#L()),this.listen(t,"progress",()=>this.#st()),this.listen(t,"volumechange",()=>this.#l()),this.listen(t,"play",()=>{this.#i=!0,this.#d("playing"),this.#c.setAttribute("aria-label",this.#r("pause")),this.#C(this.#r("playing")),this.#a("video-player:play",{currentTime:t.currentTime,src:t.currentSrc})}),this.listen(t,"pause",()=>{this.#i=!1,t.ended||this.#d("paused"),this.#c.setAttribute("aria-label",this.#r("play")),this.#n(),this.#C(this.#r("paused")),this.#a("video-player:pause",{currentTime:t.currentTime})}),this.listen(t,"ended",()=>{this.#i=!1,this.#d("ended"),this.#c.setAttribute("aria-label",this.#r("play")),this.#n();let e=this.#e?.querySelector("li[data-video-active]");e&&e.setAttribute("data-video-played",""),this.#e&&this.#rt(),this.#C(this.#r("ended")),this.#a("video-player:ended",{src:t.currentSrc})}),this.listen(t,"waiting",()=>{this.#i&&(this.#d("buffering"),this.#C(this.#r("buffering")))}),this.listen(t,"playing",()=>{this.getAttribute("state")==="buffering"&&this.#d("playing")})}#d(t){this.setAttribute("state",t),this.#b&&(this.#b.inert=!(t==="idle"||t==="ended"))}#Z(){let t=this.shadowRoot,e=()=>{this.#i?this.#t.pause():this.#t.play().catch(()=>{})};this.listen(this.#b,"click",r=>{r.stopPropagation(),this.#t.play().catch(()=>{})});let i=t.querySelector(".player");this.listen(i,"click",r=>{let s=r.target;s.closest(".controls")||s.closest(".play-overlay")||s!==this.#t&&s!==i||e()}),this.listen(this.#c,"click",e),this.listen(this.#u,"input",()=>{this.#t.duration&&(this.#t.currentTime=Number(this.#u.value)/100*this.#t.duration,this.#$())}),this.listen(this.#u,"keydown",r=>{let s=r;if(s.altKey||s.ctrlKey||s.metaKey)return;let n={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1}[s.key];n&&(s.preventDefault(),this.#v(n*S))}),this.listen(t.querySelector(".skip-back-btn"),"click",()=>this.#v(-c)),this.listen(t.querySelector(".skip-forward-btn"),"click",()=>this.#v(c)),this.listen(this.#h,"input",()=>{this.#t.volume=Number(this.#h.value),this.#t.muted=!1,this.#l()}),this.listen(this.#y,"click",()=>{this.#t.muted=!this.#t.muted,this.#l()}),this.listen(this.#f,"click",()=>{this.#g=(this.#g+1)%d.length;let r=d[this.#g];this.#t.playbackRate=r,this.#D(),y(this.#f.getAttribute("aria-label")||""),this.#a("video-player:speed",{rate:r})}),this.listen(this.#o,"click",()=>{let r=this.#z();if(!r)return;let s=r.mode==="showing";r.mode=s?"hidden":"showing";let n=!s;this.toggleAttribute("captions",n),this.#o.setAttribute("aria-pressed",String(n)),this.#a("video-player:captions",{active:n,label:r.label})}),this.listen(this.#m,"click",()=>this.#O()),this.listen(this,"keydown",r=>this.#nt(r))}#N(t){for(let e of t.composedPath()){if(e===this)return!1;if(e instanceof Element&&e.matches(E))return!0}return!1}#v(t){let e=this.#t.duration||0;this.#t.currentTime=Math.min(e,Math.max(0,this.#t.currentTime+t)),this.#n(),this.#S()}#tt(){let t=this.shadowRoot?.querySelector(".player"),e=()=>{this.#n(),this.#M(w)};this.listen(t,"mousemove",e),this.listen(t,"mouseenter",e),this.listen(t,"mouseleave",()=>this.#M(500)),this.listen(t,"touchstart",()=>{this.hasAttribute("controls")?this.#j():e()},{passive:!0}),this.listen(this.#p,"mouseenter",()=>{this.#s!=null&&clearTimeout(this.#s),this.#n()}),this.listen(this.#p,"focusin",()=>{this.#s!=null&&clearTimeout(this.#s),this.#n()}),this.listen(this.#p,"focusout",()=>this.#M(w))}#M(t){this.#s!=null&&clearTimeout(this.#s),this.#s=null,this.#i&&(this.#s=setTimeout(()=>this.#j(),t))}#n(){this.setAttribute("controls","")}#j(){let t=this.shadowRoot?.activeElement;t&&this.#p?.contains(t)||this.removeAttribute("controls")}#et(){this.#e&&this.listen(this.#e,"click",t=>{let e=t.target.closest("a[href]");e&&(t.preventDefault(),this.#A(e.href,e.closest("li"),e))})}#A(t,e,i){this.#e.querySelectorAll("li").forEach(o=>o.removeAttribute("data-video-active")),e&&e.setAttribute("data-video-active",""),this.#t.src=t;let s=i?.getAttribute("data-poster");s&&(this.#t.poster=s);let n=i?.getAttribute("data-captions");this.#it(n),this.#t.play().catch(()=>{}),this.#a("video-player:track-change",{src:t,title:i?.textContent??""})}#it(t){if(this.#t.querySelectorAll("track[data-dynamic]").forEach(i=>i.remove()),t){let i=document.createElement("track");i.kind="captions",i.src=t,i.default=!0,i.setAttribute("data-dynamic",""),this.#t.appendChild(i),this.hasAttribute("captions")&&(i.track.mode="showing")}this.#R()}#rt(){if(!this.#e)return;let t=[...this.#e.querySelectorAll("li")],e=t.findIndex(r=>r.hasAttribute("data-video-active"));if(this.hasAttribute("shuffle")){let r=t.filter((s,n)=>n!==e);if(r.length){let s=r[Math.floor(Math.random()*r.length)],n=s.querySelector("a[href]");n&&this.#A(n.href,s,n)}return}let i=e+1;if(i<t.length){let r=t[i].querySelector("a[href]");r&&this.#A(r.href,t[i],r)}else if(this.hasAttribute("loop")){let r=t[0]?.querySelector("a[href]");r&&this.#A(r.href,t[0],r)}}#S(){let t=this.#t.currentTime,e=this.#t.duration||0,i=e?t/e*100:0;this.#V.textContent=this.#T(t),this.#u.value=String(i),this.#$(),this.#q.style.width=`${i}%`}#$(){this.#u.setAttribute("aria-valuetext",this.#r("time-of",{current:this.#T(this.#t.currentTime),duration:this.#T(this.#t.duration||0)}))}#L(){let t=this.#t.duration||0;this.#P.textContent=this.#T(t),this.#$()}#st(){let t=this.#t.buffered,e=this.#t.duration||0;if(t.length>0&&e){let i=t.end(t.length-1);this.#B.style.width=`${i/e*100}%`}}#E(){let t=document.fullscreenElement;return!!t&&(t===this||t===this.#t)}#K(t){t?this.setAttribute("data-fullscreen",""):this.removeAttribute("data-fullscreen")}#O(){this.#E()?document.exitFullscreen().catch(()=>{}):this.requestFullscreen().catch(()=>{this.#t.requestFullscreen?.().catch(()=>{})})}#U(){let t=this.#z();if(!t||!this.#o)return;let e=t.mode==="showing";this.toggleAttribute("captions",e),this.#o.setAttribute("aria-pressed",String(e))}#z(){let t=this.#t.textTracks;for(let e=0;e<t.length;e++)if(t[e].kind==="captions"||t[e].kind==="subtitles")return t[e];return null}#nt(t){if(!(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey)&&!this.#N(t))switch(t.key){case" ":case"k":case"K":t.preventDefault(),this.#i?this.#t.pause():this.#t.play().catch(()=>{});break;case"ArrowLeft":t.preventDefault(),this.#v(-c);break;case"ArrowRight":t.preventDefault(),this.#v(c);break;case"ArrowUp":t.preventDefault(),this.#t.volume=Math.min(1,this.#t.volume+.05),this.#l(),this.#n();break;case"ArrowDown":t.preventDefault(),this.#t.volume=Math.max(0,this.#t.volume-.05),this.#l(),this.#n();break;case"m":case"M":this.#t.muted=!this.#t.muted,this.#l();break;case"f":case"F":this.#O();break;case"c":case"C":this.#o.click();break}}#l(){if(!this.#t||!this.#y)return;let t=this.#t.muted;this.toggleAttribute("muted",t),this.#y.setAttribute("aria-pressed",String(t));let e=this.#t.volume;this.#h.value=String(e),this.#h.style.setProperty("--_vol",t?"0":String(e));let i;try{i=new Intl.NumberFormat(this.#w,{style:"percent"}).format(e)}catch{i=`${Math.round(e*100)}%`}this.#h.setAttribute("aria-valuetext",i)}#T(t){let e=Number.isFinite(t)&&t>0?Math.floor(t):0,i=Math.floor(e/3600),r=Math.floor(e%3600/60),s=e%60,n=this.#k??new Intl.NumberFormat("en",{useGrouping:!1});if(this.#x)try{let u=this.#x.formatToParts({hours:i,minutes:r,seconds:s}),f=!0;return u.map(h=>f&&h.type==="integer"?(f=!1,n.format(h.unit==="hour"?i:r)):h.value).join("")}catch{}let o=u=>n.format(u).padStart(2,n.format(0));return i>0?`${n.format(i)}:${o(r)}:${o(s)}`:`${n.format(r)}:${o(s)}`}#C(t){this.#_&&(this.#_.textContent=t)}#a(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}};b("video-player",p);export{p as VideoPlayerElement};
|
|
570
570
|
//# sourceMappingURL=video-player.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Mt=Object.defineProperty;var b=(n,t)=>()=>(n&&(t=n(n=0)),t);var Rt=(n,t)=>{for(var e in t)Mt(n,e,{get:t[e],enumerable:!0})};function Bt(){let n=globalThis.localStorage;if(!n)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return n.getItem(t)},async setRaw(t,e){n.setItem(t,e)},async removeRaw(t){n.removeItem(t)},async keys(t){let e=[];for(let i=0;i<n.length;i++){let r=n.key(i);r&&r.startsWith(t)&&e.push(r)}return e}}}function u(){return O[T]||(O[T]=Bt()),O[T]}function N(n,t){if(typeof n!="string"||!n)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${n}:${t}`}function nt(n){if(typeof n!="string"||!n)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${n}:`}function it(n){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var T,O,h,D=b(()=>{T="__vbStoreBackend",O=globalThis;h={configure(n={}){O[T]=n.backend??null},async set(n,t,e){let i={data:e,timestamp:Date.now()};await u().setRaw(N(n,t),JSON.stringify(i))},async get(n,t,e){let i=await u().getRaw(N(n,t));if(i==null)return null;let r=it(i);return!r||e?.maxAge!=null&&Date.now()-r.timestamp>e.maxAge?null:r.data},async remove(n,t){await u().removeRaw(N(n,t))},async list(n){let t=nt(n),e=await u().keys(t),i=[];for(let r of e){let s=await u().getRaw(r);if(s==null)continue;let o=it(s);o&&i.push({key:r.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(n){let t=nt(n),e=await u().keys(t);for(let i of e)await u().removeRaw(i)},async clearAll(){let n=await u().keys("vb:");for(let t of n)await u().removeRaw(t)},async setMany(n,t){for(let[e,i]of t)await h.set(n,e,i)}};if(typeof window<"u"){let n=window.VB??(window.VB={});n.store??=h}});function _t(n,t){if(!t)return n;let e=n??new URLSearchParams;for(let[i,r]of Object.entries(t))r!=null&&e.set(i,String(r));return e}async function Pt(n){if((n.headers.get("content-type")??"").includes("application/json"))try{return await n.json()}catch{return null}try{return await n.text()}catch{return null}}function rt(n){return n.endsWith("/")?n.slice(0,-1):n}var E,S,st,q,g,w,ot=b(()=>{E="__vbServiceConfig",S=globalThis,st=()=>({baseUrl:"/go",headers:{},services:{}});S[E]||(S[E]=st());q=()=>S[E],g=class extends Error{constructor(t,e,i,r){super(`VBService(${i}): ${t} ${r}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=i,this.path=r}};w=class n{static configure(t={}){let e=q();S[E]={baseUrl:t.baseUrl??e.baseUrl,headers:{...e.headers,...t.headers??{}},services:{...e.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let e=q();return e.services[t]?rt(e.services[t]):e.baseUrl?`${rt(e.baseUrl)}/${t}`:`/go/${t}`}static _reset(){S[E]=st()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#t("GET",t,{params:e})}async post(t,e){return this.#t("POST",t,{body:e})}async patch(t,e){return this.#t("PATCH",t,{body:e})}async delete(t){return this.#t("DELETE",t,{})}async#t(t,e,i){let r=n.resolve(this.role),s=e?e.startsWith("/")?e:`/${e}`:"",o=new URL(`${r}${s}`,globalThis.location?.origin??"http://localhost"),a=_t(o.searchParams,i.params);a&&(o.search=a.toString());let c={method:t,headers:{...q().headers}};i.body!==void 0&&(c.body=JSON.stringify(i.body),c.headers["content-type"]="application/json");let l=o.toString(),d=await fetch(l,c),v=await Pt(d);if(!d.ok)throw new g(d.status,v,this.role,`${s||"/"}`);return v}};if(typeof window<"u"){let n=window.VB??(window.VB={});n.service??=w,n.ServiceError??=g}});function Ht(n,t){let e=at.get(t);e||at.set(t,e=new Map);let i=e.get(n);if(!i||!i.region.isConnected){let s=(t.ownerDocument||document).createElement("span");s.setAttribute("data-vb-announcer",n),s.setAttribute("role",n==="assertive"?"alert":"status"),s.setAttribute("aria-live",n),s.setAttribute("aria-atomic","true"),s.style.cssText=It,t.appendChild(s),i={region:s},e.set(n,i)}return i}function L(n,{politeness:t="polite",root:e}={}){let i=String(n??"").trim();if(!i||typeof document>"u")return null;let r=e||document.body;if(!r)return null;let o=Ht(t==="assertive"?"assertive":"polite",r);return clearTimeout(o.write),clearTimeout(o.clear),o.region.textContent="",o.write=setTimeout(()=>{o.region.textContent=i,o.clear=setTimeout(()=>{o.region.textContent=""},7e3)},50),o.region}var It,at,ct=b(()=>{It=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),at=new WeakMap});function Nt(n,t){let e=0;for(;e<n.length&&e<t.length&&n[n.length-1-e]===t[t.length-1-e];)e++;return e}function Dt(n,t){let e=0;for(;e<n.length&&e<t.length&&n[e]===t[e];)e++;return e}function M(n,t,e){return{prefix:n.slice(Math.max(0,t-32),t),suffix:n.slice(e,e+32)}}function ht(n,t){let e=lt(t.text??"");if(!e)return null;if(t.endOffset<=n.length&<(n.slice(t.startOffset,t.endOffset))===e)return{start:t.startOffset,end:t.endOffset};let i=new RegExp(t.text.trim().split(/\s+/).map(Ft).join("\\s*"),"g"),r=t.prefix??"",s=t.suffix??"",o=null,a=-1,c=1/0;for(let l of n.matchAll(i)){let d=l.index,v=d+l[0].length,Q=M(n,d,v),F=Nt(Q.prefix,r)+Dt(Q.suffix,s),Z=Math.abs(d-t.startOffset);(F>a||F===a&&Z<c)&&(o={start:d,end:v},a=F,c=Z)}return o}var lt,Ft,dt=b(()=>{lt=n=>n.replace(/\s+/g,""),Ft=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});function P(n){let t=2166136261;for(let e=0;e<n.length;e++)t^=n.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function wt(){return"hn-"+crypto.randomUUID().slice(0,8)}function R(n,t){let e="highlightsLabel"+t[0].toUpperCase()+t.slice(1);return n.dataset[e]||Ut[t]}function jt(n,{textLength:t,colors:e}){if(!n||typeof n!="object")return null;let i=n,{startOffset:r,endOffset:s,color:o}=i;if(!Number.isInteger(r)||!Number.isInteger(s))return null;let a=r,c=s;return a<0||c<=a||c>t||!U(o)||!e.includes(o)||i.id!=null&&(typeof i.id!="string"||!/^[\w-]{1,64}$/.test(i.id))||i.text!=null&&typeof i.text!="string"||i.note!=null&&typeof i.note!="string"||i.prefix!=null&&typeof i.prefix!="string"||i.suffix!=null&&typeof i.suffix!="string"?null:{id:i.id||wt(),startOffset:a,endOffset:c,text:i.text??"",prefix:(i.prefix??"").slice(-32),suffix:(i.suffix??"").slice(0,32),color:o,note:i.note??"",created:Number.isFinite(i.created)?i.created:Date.now()}}function U(n){return typeof n=="string"&&Wt.test(n)}function yt(){if(m.size===0){p&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==p),p=null);return}p||(p=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,p]);let n=[...m.keys()],t=n.map(i=>`::highlight(hn-${i}) { background-color: var(--highlight-${i}); color: var(--highlight-${i}-ink, var(--highlight-ink, CanvasText)); text-decoration-line: underline; text-decoration-color: var(--highlight-${i}); text-underline-offset: 2px; }`),e=n.map((i,r)=>`::highlight(hn-${i}) { background-color: Mark; color: MarkText; text-decoration-line: underline; text-decoration-color: MarkText; text-decoration-style: ${gt[r%gt.length]}; text-decoration-thickness: 2px; }`);p.replaceSync(`${t.join(`
|
|
2
2
|
`)}
|
|
3
3
|
@media (forced-colors: active) {
|
|
4
4
|
${e.join(`
|
|
5
5
|
`)}
|
|
6
|
-
}`)}function Mt(n){for(let t of n)m.set(t,(m.get(t)??0)+1);lt()}function Bt(n){for(let t of n){let e=(m.get(t)??0)-1;e>0?m.set(t,e):m.delete(t)}lt()}function It(n){let t=E.get(n),e=t?[...t.values()].flat():[];e.length===0?(CSS.highlights.delete(`hn-${n}`),E.delete(n)):CSS.highlights.set(`hn-${n}`,new Highlight(...e))}function st(n,t){let e=new Set(t.keys());for(let[i,r]of E)r.has(n)&&e.add(i);for(let i of e){let r=t.get(i)??[],s=E.get(i);r.length?(s||E.set(i,s=new Map),s.set(n,r)):s?.delete(n),It(i)}}function ot(n,t,e){let i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),r=0;for(;i.nextNode();){if(i.currentNode===t)return r+e;r+=(i.currentNode.textContent??"").length}return-1}function L(n,t,e){let i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT),r=0,s=null,o=0,c=null,a=0;for(;i.nextNode();){let h=i.currentNode,f=(h.textContent??"").length;if(!s&&r+f>t&&(s=h,o=t-r),r+f>=e){c=h,a=e-r;break}r+=f}if(!s||!c)return null;try{let h=document.createRange();return h.setStart(s,Math.min(o,(s.textContent??"").length)),h.setEnd(c,Math.min(a,(c.textContent??"").length)),h}catch{return null}}function q(n){let t=R.get(n);if(t&&!t.destroyed)return t;let e=new V(n);return R.set(n,e),e}function at(n=document){n.querySelectorAll(H).forEach(t=>{t.hasAttribute("data-highlights-init")||q(t)})}var H,it,Ot,Tt,R,Nt,rt,Lt,p,m,E,V,_t,ht=b(()=>{D();nt();H="[data-highlights]",it="highlights",Ot=["yellow","green","blue","pink"],Tt=typeof CSS<"u"&&"highlights"in CSS,R=new WeakMap;Nt=/^[a-z0-9_-]+$/i,rt=["solid","double","dotted","dashed","wavy"],Lt={annotation:"You highlighted",added:"Highlight added",removed:"Highlight removed",noteSaved:"Note saved"};p=null,m=new Map,E=new Map;V=class{#t;#i;#n;#h;#e=[];#s=!Tt;#d;#u;#l=!1;#f=[];#o=new Map;constructor(t){this.#t=t,this.#h=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#i=e&&e!==""?e:location.pathname;let i=t.dataset.highlightsColors,r=i?i.split(",").map(s=>s.trim()).filter(F):[...Ot];this.#n=[...new Set(r)],this.#s||Mt(this.#n),this.#c(),this.#h||(this.#d=this.#y.bind(this),this.#u=this.#b.bind(this),t.addEventListener("pointerup",this.#d),t.addEventListener("click",this.#u)),t.setAttribute("data-highlights-init",""),this.#E().then(()=>{this.#l||this.#c()})}get colors(){return[...this.#n]}get destroyed(){return this.#l}get element(){return this.#t}getHighlights(){return this.#e.map(t=>({...t}))}removeHighlight(t){let e=this.#e.findIndex(i=>i.id===t);e<0||(this.#e.splice(e,1),this.#a(),this.#c(),this.#r("highlights:removed",{id:t}),T(N(this.#t,"removed")))}clearAll(){this.#e=[],this.#a(),this.#c()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#e})}importHighlights(t){let e;try{e=typeof t=="string"?JSON.parse(t):t}catch{return{imported:0,rejected:0}}if(!e||!Array.isArray(e.highlights))return{imported:0,rejected:0};let i=this.#g(e.highlights);return this.#e=i,this.#a(),this.#c(),{imported:i.length,rejected:e.highlights.length-i.length}}#g(t){let e={textLength:(this.#t.textContent??"").length,colors:this.#n},i=new Set,r=[];for(let s of t){let o=Rt(s,e);!o||i.has(o.id)||(i.add(o.id),r.push(o))}return r}destroy(){this.#l||(this.#l=!0,this.#d&&this.#t.removeEventListener("pointerup",this.#d),this.#u&&this.#t.removeEventListener("click",this.#u),this.#s?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()}):(st(this,new Map),Bt(this.#n)),this.#m(),this.#o.clear(),this.#t.removeAttribute("data-highlights-init"),R.get(this.#t)===this&&R.delete(this.#t))}#y(){requestAnimationFrame(()=>{if(this.#l)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#t.contains(e.commonAncestorContainer)&&this.#r("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#b(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let r=e.dataset.hnId,s=this.#e.find(o=>o.id===r);if(s){this.#r("highlights:clicked",{id:r,highlight:{...s}}),this.#r("highlights:request-note",{id:r,highlight:{...s},controller:this});return}}let i=t.target.closest?.("mark[data-hn-id]");if(i){let r=i.dataset.hnId,s=this.#e.find(o=>o.id===r);if(s){this.#r("highlights:clicked",{id:r,highlight:{...s}});return}}if(!this.#s){let r=this.#S(t.clientX,t.clientY);r&&this.#r("highlights:clicked",{id:r.id,highlight:{...r}})}}findHighlightRect(t){let e=this.#e.find(s=>s.id===t);if(!e)return null;let i=this.#v(e);if(!i)return null;let r=i.getClientRects();return r.length?r[0]:null}#v(t){return this.#o.get(t.id)??L(this.#t,t.startOffset,t.endOffset)}#p(){this.#o.clear();for(let t of this.#e){let e=L(this.#t,t.startOffset,t.endOffset);e&&this.#o.set(t.id,e)}}#S(t,e){for(let i of this.#e){let r=this.#o.get(i.id);if(!r)continue;let s=r.getClientRects();for(let o of s)if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)return i}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let i=e.getRangeAt(0);if(!this.#t.contains(i.commonAncestorContainer))return;let r=ot(this.#t,i.startContainer,i.startOffset),s=ot(this.#t,i.endContainer,i.endOffset);if(r<0||s<0||r>=s)return;let o=e.toString().trim(),c={id:ct(),startOffset:r,endOffset:s,text:o,color:t,note:"",created:Date.now()};this.#e.push(c),this.#a(),this.#c(),e.removeAllRanges(),this.#r("highlights:added",{id:c.id,text:o,color:t,note:""}),T(N(this.#t,"added"))}_changeColor(t,e){let i=this.#e.find(r=>r.id===t);i&&(i.color=e,this.#a(),this.#c())}_updateNote(t,e){let i=this.#e.find(r=>r.id===t);i&&(i.note=e,this.#a(),this.#w(),this.#r("highlights:note-changed",{id:t,note:e}),T(N(this.#t,"noteSaved")))}async#E(){let t=await l.get(it,this.#i);if(!t||!Array.isArray(t.highlights)||this.#l)return;let e=this.#g(t.highlights),i=M(this.#t.textContent);t.contentHash&&t.contentHash!==i?(this.#e=e.filter(r=>{let s=L(this.#t,r.startOffset,r.endOffset);return s?s.toString().trim()===r.text:!1}),this.#a()):this.#e=e}#a(){let t={version:1,contentHash:M(this.#t.textContent),highlights:this.#e};l.set(it,this.#i,t).catch(()=>{})}#c(){this.#s?(this.#C(),this.#p()):(this.#p(),this.#A()),this.#w()}#A(){let t=new Map;for(let e of this.#n)t.set(e,[]);for(let e of this.#e){let i=this.#o.get(e.id);i&&t.has(e.color)&&t.get(e.color).push(i)}st(this,t)}#C(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(e=>{let i=e.parentNode;for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}),this.#t.normalize();let t=[...this.#e].sort((e,i)=>i.startOffset-e.startOffset);for(let e of t){let i=L(this.#t,e.startOffset,e.endOffset);if(!i)continue;let r=document.createElement("mark");r.dataset.hnId=e.id,F(e.color)&&(r.dataset.hnColor=e.color,r.style.setProperty("--_hn-color",`var(--highlight-${e.color})`),r.style.setProperty("--_hn-ink",`var(--highlight-${e.color}-ink, var(--highlight-ink))`));try{i.surroundContents(r)}catch{let s=i.extractContents();r.appendChild(s),i.insertNode(r)}}}#m(){for(let t of this.#f)t.remove();this.#f=[]}#w(){if(this.#m(),this.#e.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");let e=this.#t.getBoundingClientRect(),i=N(this.#t,"annotation");for(let r of this.#e){let s=this.#o.get(r.id);if(!s)continue;let o=s.getClientRects();if(o.length===0)continue;let c=o[0].top-e.top,a=document.createElement("span");if(a.className="hn-margin-annotation",a.dataset.hnId=r.id,a.setAttribute("aria-hidden","true"),a.style.insetBlockStart=`${c}px`,r.note){let h=document.createElement("span");h.className="hn-note-indicator",h.textContent="*",a.append(h,` ${i}`),a.classList.add("hn-has-note")}else a.textContent=i;this.#t.appendChild(a),this.#f.push(a)}}#r(t,e={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>at()):at();_t=new MutationObserver(n=>{for(let t of n)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(H)&&q(i),i.querySelectorAll(H).forEach(r=>{r.hasAttribute("data-highlights-init")||q(r)})}});_t.observe(document.documentElement,{childList:!0,subtree:!0})});var bt={};Et(bt,{currentHash:()=>j,initPageWatch:()=>U,normalisePath:()=>wt,pageKey:()=>y,readWatch:()=>C,removeWatch:()=>yt,writeWatch:()=>k});function pt(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Dt(n){if(!pt())return null;try{let t=new w("notify"),e={url:n.url,type:"page-watch",notify:["panel"]},i=await t.post("/subscribe",e);return typeof i?.id=="string"?i.id:null}catch(t){let e=t instanceof g?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",e),null}}async function mt(n){if(!(!n||!pt()))try{await new w("notify").delete(`/subscribe/${encodeURIComponent(n)}`)}catch(t){let e=t instanceof g?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",e)}}function Pt(){return document.querySelector("main")||document.querySelector("article")||document.body}function wt(n){let t=(n||"/").replace(/\/index\.html?$/i,"/");return t.length>1&&(t=t.replace(/\/+$/,"")),t||"/"}function y(){return wt(location.pathname)}async function Ht(){let n=y(),t=location.pathname||"/",e=n==="/"?"":n,i=new Set([t,`${e}/`,`${e}/index.html`]);if(i.delete(n),await l.get(u,n)){for(let r of i)await l.remove(u,r);return}for(let r of i){let s=await l.get(u,r);if(s){await l.set(u,n,s),await l.remove(u,r);return}}}function j(){let n=Pt();return n?M(n.textContent||""):""}function Ft(){return document.title||y()}async function C(){return dt??=Ht().catch(()=>{}),await dt,await l.get(u,y())}async function k(n){await l.set(u,y(),n)}async function yt(){await l.remove(u,y())}function B(n,t,e){return n.getAttribute(`data-label-${t}`)??e}function I(n,t){n.setAttribute("aria-pressed",t?"true":"false"),n.dataset.watching="",t||delete n.dataset.watching;let e=n.querySelector("icon-wc");if(e&&e.setAttribute("name",t?"bookmark-check":"bookmark"),n.hasAttribute("data-watch-label-locked"))return;let i=[...n.childNodes].find(r=>r.nodeType===Node.TEXT_NODE&&(r.textContent||"").trim());i&&(i.textContent=t?B(n,"watching","Watching"):B(n,"watch","Watch for updates")),n.setAttribute("title",t?B(n,"stop","Stop watching this page"):B(n,"action","Watch this page for content updates"))}async function Vt(){let n=!!await C();for(let t of document.querySelectorAll(`${A}[data-watch-page-init]`))I(t,n)}async function W(n){if(n.hasAttribute("data-watch-page-init"))return;n.setAttribute("data-watch-page-init",""),n.setAttribute("type",n.getAttribute("type")||"button");let t=await C();I(n,!!t),n.addEventListener("click",async e=>{e.preventDefault();let i=await C();if(i)await yt(),I(n,!1),n.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:i.url,subscriptionId:i.subscriptionId}})),mt(i.subscriptionId);else{let r={url:location.pathname||"/",title:Ft(),contentHash:j(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await k(r),I(n,!0),n.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:r}}));let s=await Dt(r);s&&await k({...r,subscriptionId:s})}})}async function qt(){let n=await C();if(!n)return;let t=j(),e=new Date().toISOString(),i=n.contentHash,r={...n,lastChecked:e};if(t&&t!==i){r.contentHash=t,r.lastChanged=e,await k(r);let s={id:`page-watch:${n.url}:${t}`,type:"watch",title:`Updated: ${n.title}`,body:"Content changed since your last visit.",url:n.url,date:e,read:!1,dismissed:!1,priority:"normal"};document.querySelector("notification-wc")&&!customElements.get("notification-wc")&&await customElements.whenDefined("notification-wc"),document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:s}}))}else await k(r)}function U(n=document){for(let t of n.querySelectorAll(A))W(t);qt()}function ut(n){if(Vt(),n.type!=="page-watch:remove")return;if(!(n.target instanceof Element&&n.target.matches(A))){let e=n.detail;mt(e?.subscriptionId??null)}}var A,u,dt,ft,gt,vt=b(()=>{D();tt();ht();A="[data-watch-page]",u="watches";dt=null;ft=Symbol.for("vb.page-watch-init"),gt=globalThis;gt[ft]||(gt[ft]=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>U()):U(),document.addEventListener("page-watch:add",ut),document.addEventListener("page-watch:remove",ut),new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=i;r.matches?.(A)&&W(r),r.querySelectorAll?.(A).forEach(s=>W(s))}}).observe(document.documentElement,{childList:!0,subtree:!0}))});var jt=window.matchMedia("(prefers-reduced-motion: reduce)");var K=new Map;function Y(n,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=K.get(n);if(customElements.get(n)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=i){s.priority===i&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}K.set(n,r),customElements.define(n,t)}var x=class extends HTMLElement{#t=[];#i;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,r){t.addEventListener(e,i,r),this.#t.push(()=>t.removeEventListener(e,i,r))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#i||(this.#i=this.attachInternals());let i=this.#i.states;try{e?i.add(t):i.delete(t)}catch{let r=`--${t}`;e?i.add(r):i.delete(r)}}_adoptInternals(t){this.#i||(this.#i=t)}#n(){return this.constructor.formAssociated&&this.#i?this.#i:null}get validity(){return this.#n()?.validity}get validationMessage(){return this.#n()?.validationMessage??""}get willValidate(){return this.#n()?.willValidate??!1}get form(){return this.#n()?.form??null}checkValidity(){return this.#n()?.checkValidity()??!0}reportValidity(){return this.#n()?.reportValidity()??!0}};var Wt={watch:"Watch for updates",watching:"Watching",action:"Watch this page for updates",stop:"Stop watching this page"},z=class extends x{static observedAttributes=["variant","label","data-label-watch","data-label-watching","data-label-action","data-label-stop"];#t=null;#i=null;setup(){if(this.hasAttribute("server-sync")){let i=window;i.vbPageWatch={...i.vbPageWatch??{},serverSync:!0}}let t=this.#h();this.dataset.variant=t,this.querySelectorAll(":scope > [data-watch-wc]").forEach(i=>i.remove());let e=this.#e(t);this.#t=e,this.appendChild(e),this.#s(),this.#i=new MutationObserver(()=>this.#s()),this.#i.observe(e,{attributes:!0,attributeFilter:["aria-pressed"]}),Promise.resolve().then(()=>(vt(),bt)).catch(()=>{})}teardown(){this.#i?.disconnect(),this.#i=null,this.#t?.remove(),this.#t=null}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||this._reinit()}#n(t){return this.getAttribute(`data-label-${t}`)??Wt[t]}#h(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#e(t){let e=document.createElement("button");e.type="button",e.className="ghost",e.setAttribute("data-watch-page",""),e.setAttribute("data-watch-wc",""),e.setAttribute("data-watch-label-locked",""),e.setAttribute("aria-pressed","false");let i=document.createElement("icon-wc");return i.setAttribute("name","bookmark"),i.setAttribute("size",t==="icon"?"sm":"xs"),i.setAttribute("aria-hidden","true"),e.appendChild(i),t==="icon"?e.setAttribute("aria-label",this.#n("action")):e.appendChild(document.createElement("span")),e}#s(){let t=this.#t;if(!t)return;let e=t.getAttribute("aria-pressed")==="true";t.querySelector("icon-wc")?.setAttribute("name",e?"bookmark-check":"bookmark");let i=t.querySelector(":scope > span");i?(i.textContent=this.getAttribute("label")??this.#n(e?"watching":"watch"),t.removeAttribute("title")):t.setAttribute("title",e?this.#n("stop"):this.#n("action"))}};Y("watch-wc",z);export{z as WatchWc};
|
|
6
|
+
}`)}function Xt(n){for(let t of n)m.set(t,(m.get(t)??0)+1);yt()}function zt(n){for(let t of n){let e=(m.get(t)??0)-1;e>0?m.set(t,e):m.delete(t)}yt()}function Gt(n){let t=A.get(n),e=t?[...t.values()].flat():[];e.length===0?(CSS.highlights.delete(`hn-${n}`),A.delete(n)):CSS.highlights.set(`hn-${n}`,new Highlight(...e))}function pt(n,t){let e=new Set(t.keys());for(let[i,r]of A)r.has(n)&&e.add(i);for(let i of e){let r=t.get(i)??[],s=A.get(i);r.length?(s||A.set(i,s=new Map),s.set(n,r)):s?.delete(n),Gt(i)}}function z(n){return document.createTreeWalker(n,NodeFilter.SHOW_TEXT,t=>t.parentElement?.closest(".hn-margin-annotation")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT)}function B(n){let t=z(n),e="";for(;t.nextNode();)e+=t.currentNode.textContent??"";return e}function mt(n,t,e){let i=z(n),r=0;for(;i.nextNode();){if(i.currentNode===t)return r+e;r+=(i.currentNode.textContent??"").length}return-1}function V(n,t,e){let i=z(n),r=0,s=null,o=0,a=null,c=0;for(;i.nextNode();){let l=i.currentNode,d=(l.textContent??"").length;if(!s&&r+d>t&&(s=l,o=t-r),r+d>=e){a=l,c=e-r;break}r+=d}if(!s||!a)return null;try{let l=document.createRange();return l.setStart(s,Math.min(o,(s.textContent??"").length)),l.setEnd(a,Math.min(c,(a.textContent??"").length)),l}catch{return null}}function X(n){let t=_.get(n);if(t&&!t.destroyed)return t;let e=new j(n);return _.set(n,e),e}function bt(n=document){n.querySelectorAll(W).forEach(t=>{t.hasAttribute("data-highlights-init")||X(t)})}var W,ft,qt,Vt,_,Wt,gt,Ut,p,m,A,j,Kt,vt=b(()=>{D();ct();dt();W="[data-highlights]",ft="highlights",qt=["yellow","green","blue","pink"],Vt=typeof CSS<"u"&&"highlights"in CSS,_=new WeakMap;Wt=/^[a-z0-9_-]+$/i,gt=["solid","double","dotted","dashed","wavy"],Ut={annotation:"You highlighted",added:"Highlight added",removed:"Highlight removed",noteSaved:"Note saved"};p=null,m=new Map,A=new Map;j=class{#t;#i;#n;#h;#e=[];#r=[];#d=!Vt;#u;#f;#l=!1;#g=[];#o=new Map;constructor(t){this.#t=t,this.#h=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#i=e&&e!==""?e:location.pathname;let i=t.dataset.highlightsColors,r=i?i.split(",").map(s=>s.trim()).filter(U):[...qt];this.#n=[...new Set(r)],this.#d||Xt(this.#n),this.#c(),this.#h||(this.#u=this.#y.bind(this),this.#f=this.#v.bind(this),t.addEventListener("pointerup",this.#u),t.addEventListener("click",this.#f)),t.setAttribute("data-highlights-init",""),this.#A().then(()=>{this.#l||(this.#c(),this.#C())})}get colors(){return[...this.#n]}get destroyed(){return this.#l}get element(){return this.#t}getHighlights(){return this.#e.map(t=>({...t}))}getUnplaced(){return this.#r.map(t=>({...t}))}removeHighlight(t){let e=this.#e.findIndex(r=>r.id===t),i=this.#r.findIndex(r=>r.id===t);e<0&&i<0||(e>=0?this.#e.splice(e,1):this.#r.splice(i,1),this.#a(),this.#c(),this.#s("highlights:removed",{id:t}),L(R(this.#t,"removed")))}clearAll(){this.#e=[],this.#r=[],this.#a(),this.#c()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#e})}importHighlights(t){let e;try{e=typeof t=="string"?JSON.parse(t):t}catch{return{imported:0,rejected:0}}if(!e||!Array.isArray(e.highlights))return{imported:0,rejected:0};let i=this.#p(e.highlights);return this.#e=i,this.#r=[],this.#a(),this.#c(),{imported:i.length,rejected:e.highlights.length-i.length}}#p(t,e=B(this.#t).length){let i={textLength:e,colors:this.#n},r=new Set,s=[];for(let o of t){let a=jt(o,i);!a||r.has(a.id)||(r.add(a.id),s.push(a))}return s}destroy(){this.#l||(this.#l=!0,this.#u&&this.#t.removeEventListener("pointerup",this.#u),this.#f&&this.#t.removeEventListener("click",this.#f),this.#d?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()}):(pt(this,new Map),zt(this.#n)),this.#b(),this.#o.clear(),this.#t.removeAttribute("data-highlights-init"),_.get(this.#t)===this&&_.delete(this.#t))}#y(){requestAnimationFrame(()=>{if(this.#l)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);this.#t.contains(e.commonAncestorContainer)&&this.#s("highlights:selected",{text:t.toString().trim(),rect:e.getBoundingClientRect()})})}#v(t){let e=t.target.closest?.(".hn-margin-annotation");if(e){let r=e.dataset.hnId,s=this.#e.find(o=>o.id===r);if(s){this.#s("highlights:clicked",{id:r,highlight:{...s}}),this.#s("highlights:request-note",{id:r,highlight:{...s},controller:this});return}}let i=t.target.closest?.("mark[data-hn-id]");if(i){let r=i.dataset.hnId,s=this.#e.find(o=>o.id===r);if(s){this.#s("highlights:clicked",{id:r,highlight:{...s}});return}}if(!this.#d){let r=this.#S(t.clientX,t.clientY);r&&this.#s("highlights:clicked",{id:r.id,highlight:{...r}})}}findHighlightRect(t){let e=this.#e.find(s=>s.id===t);if(!e)return null;let i=this.#E(e);if(!i)return null;let r=i.getClientRects();return r.length?r[0]:null}#E(t){return this.#o.get(t.id)??V(this.#t,t.startOffset,t.endOffset)}#m(){this.#o.clear();for(let t of this.#e){let e=V(this.#t,t.startOffset,t.endOffset);e&&this.#o.set(t.id,e)}}#S(t,e){for(let i of this.#e){let r=this.#o.get(i.id);if(!r)continue;let s=r.getClientRects();for(let o of s)if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)return i}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let i=e.getRangeAt(0);if(!this.#t.contains(i.commonAncestorContainer))return;let r=mt(this.#t,i.startContainer,i.startOffset),s=mt(this.#t,i.endContainer,i.endOffset);if(r<0||s<0||r>=s)return;let o=e.toString().trim(),a={id:wt(),startOffset:r,endOffset:s,text:o,...M(B(this.#t),r,s),color:t,note:"",created:Date.now()};this.#e.push(a),this.#a(),this.#c(),e.removeAllRanges(),this.#s("highlights:added",{id:a.id,text:o,color:t,note:""}),L(R(this.#t,"added"))}_changeColor(t,e){let i=this.#e.find(r=>r.id===t);i&&(i.color=e,this.#a(),this.#c())}_updateNote(t,e){let i=this.#e.find(r=>r.id===t);i&&(i.note=e,this.#a(),this.#w(),this.#s("highlights:note-changed",{id:t,note:e}),L(R(this.#t,"noteSaved")))}async#A(){let t=await h.get(ft,this.#i);if(!t||!Array.isArray(t.highlights)||this.#l)return;let e=Array.isArray(t.unplaced)?t.unplaced:[],i=this.#p([...t.highlights,...e],1/0),r=B(this.#t);if(e.length===0&&t.contentHash===P(r)){this.#e=i;return}this.#e=[],this.#r=[];for(let s of i){let o=ht(r,s);o?this.#e.push({...s,startOffset:o.start,endOffset:o.end,...M(r,o.start,o.end)}):this.#r.push(s)}this.#a()}#C(){this.#r.length!==0&&(console.warn(`[highlights] ${this.#r.length} stored highlight(s) could not be found in the current text. They are kept in storage.`,this.#t),this.#s("highlights:unplaced",{highlights:this.getUnplaced()}))}#a(){let t={version:1,contentHash:P(B(this.#t)),highlights:this.#e,...this.#r.length?{unplaced:this.#r}:{}};h.set(ft,this.#i,t).catch(()=>{})}#c(){this.#d?(this.#k(),this.#m()):(this.#m(),this.#x()),this.#w()}#x(){let t=new Map;for(let e of this.#n)t.set(e,[]);for(let e of this.#e){let i=this.#o.get(e.id);i&&t.has(e.color)&&t.get(e.color).push(i)}pt(this,t)}#k(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(e=>{let i=e.parentNode;for(;e.firstChild;)i.insertBefore(e.firstChild,e);i.removeChild(e)}),this.#t.normalize();let t=[...this.#e].sort((e,i)=>i.startOffset-e.startOffset);for(let e of t){let i=V(this.#t,e.startOffset,e.endOffset);if(!i)continue;let r=document.createElement("mark");r.dataset.hnId=e.id,U(e.color)&&(r.dataset.hnColor=e.color,r.style.setProperty("--_hn-color",`var(--highlight-${e.color})`),r.style.setProperty("--_hn-ink",`var(--highlight-${e.color}-ink, var(--highlight-ink))`));try{i.surroundContents(r)}catch{let s=i.extractContents();r.appendChild(s),i.insertNode(r)}}}#b(){for(let t of this.#g)t.remove();this.#g=[]}#w(){if(this.#b(),this.#e.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");let e=this.#t.getBoundingClientRect(),i=R(this.#t,"annotation");for(let r of this.#e){let s=this.#o.get(r.id);if(!s)continue;let o=s.getClientRects();if(o.length===0)continue;let a=o[0].top-e.top,c=document.createElement("span");if(c.className="hn-margin-annotation",c.dataset.hnId=r.id,c.setAttribute("aria-hidden","true"),c.style.insetBlockStart=`${a}px`,r.note){let l=document.createElement("span");l.className="hn-note-indicator",l.textContent="*",c.append(l,` ${i}`),c.classList.add("hn-has-note")}else c.textContent=i;this.#t.appendChild(c),this.#g.push(c)}}#s(t,e={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>bt()):bt();Kt=new MutationObserver(n=>{for(let t of n)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(W)&&X(i),i.querySelectorAll(W).forEach(r=>{r.hasAttribute("data-highlights-init")||X(r)})}});Kt.observe(document.documentElement,{childList:!0,subtree:!0})});var Ot={};Rt(Ot,{currentHash:()=>Y,initPageWatch:()=>K,normalisePath:()=>$t,pageKey:()=>y,readWatch:()=>x,removeWatch:()=>Tt,writeWatch:()=>k});function xt(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Yt(n){if(!xt())return null;try{let t=new w("notify"),e={url:n.url,type:"page-watch",notify:["panel"]},i=await t.post("/subscribe",e);return typeof i?.id=="string"?i.id:null}catch(t){let e=t instanceof g?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",e),null}}async function kt(n){if(!(!n||!xt()))try{await new w("notify").delete(`/subscribe/${encodeURIComponent(n)}`)}catch(t){let e=t instanceof g?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",e)}}function Jt(){return document.querySelector("main")||document.querySelector("article")||document.body}function $t(n){let t=(n||"/").replace(/\/index\.html?$/i,"/");return t.length>1&&(t=t.replace(/\/+$/,"")),t||"/"}function y(){return $t(location.pathname)}async function Qt(){let n=y(),t=location.pathname||"/",e=n==="/"?"":n,i=new Set([t,`${e}/`,`${e}/index.html`]);if(i.delete(n),await h.get(f,n)){for(let r of i)await h.remove(f,r);return}for(let r of i){let s=await h.get(f,r);if(s){await h.set(f,n,s),await h.remove(f,r);return}}}function Y(){let n=Jt();return n?P(n.textContent||""):""}function Zt(){return document.title||y()}async function x(){return Et??=Qt().catch(()=>{}),await Et,await h.get(f,y())}async function k(n){await h.set(f,y(),n)}async function Tt(){await h.remove(f,y())}function I(n,t,e){return n.getAttribute(`data-label-${t}`)??e}function H(n,t){n.setAttribute("aria-pressed",t?"true":"false"),n.dataset.watching="",t||delete n.dataset.watching;let e=n.querySelector("icon-wc");if(e&&e.setAttribute("name",t?"bookmark-check":"bookmark"),n.hasAttribute("data-watch-label-locked"))return;let i=[...n.childNodes].find(r=>r.nodeType===Node.TEXT_NODE&&(r.textContent||"").trim());i&&(i.textContent=t?I(n,"watching","Watching"):I(n,"watch","Watch for updates")),n.setAttribute("title",t?I(n,"stop","Stop watching this page"):I(n,"action","Watch this page for content updates"))}async function te(){let n=!!await x();for(let t of document.querySelectorAll(`${C}[data-watch-page-init]`))H(t,n)}async function G(n){if(n.hasAttribute("data-watch-page-init"))return;n.setAttribute("data-watch-page-init",""),n.setAttribute("type",n.getAttribute("type")||"button");let t=await x();H(n,!!t),n.addEventListener("click",async e=>{e.preventDefault();let i=await x();if(i)await Tt(),H(n,!1),n.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:i.url,subscriptionId:i.subscriptionId}})),kt(i.subscriptionId);else{let r={url:location.pathname||"/",title:Zt(),contentHash:Y(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await k(r),H(n,!0),n.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:r}}));let s=await Yt(r);s&&await k({...r,subscriptionId:s})}})}async function ee(){let n=await x();if(!n)return;let t=Y(),e=new Date().toISOString(),i=n.contentHash,r={...n,lastChecked:e};if(t&&t!==i){r.contentHash=t,r.lastChanged=e,await k(r);let s={id:`page-watch:${n.url}:${t}`,type:"watch",title:`Updated: ${n.title}`,body:"Content changed since your last visit.",url:n.url,date:e,read:!1,dismissed:!1,priority:"normal"};document.querySelector("notification-wc")&&!customElements.get("notification-wc")&&await customElements.whenDefined("notification-wc"),document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:s}}))}else await k(r)}function K(n=document){for(let t of n.querySelectorAll(C))G(t);ee()}function St(n){if(te(),n.type!=="page-watch:remove")return;if(!(n.target instanceof Element&&n.target.matches(C))){let e=n.detail;kt(e?.subscriptionId??null)}}var C,f,Et,At,Ct,Lt=b(()=>{D();ot();vt();C="[data-watch-page]",f="watches";Et=null;At=Symbol.for("vb.page-watch-init"),Ct=globalThis;Ct[At]||(Ct[At]=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>K()):K(),document.addEventListener("page-watch:add",St),document.addEventListener("page-watch:remove",St),new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let r=i;r.matches?.(C)&&G(r),r.querySelectorAll?.(C).forEach(s=>G(s))}}).observe(document.documentElement,{childList:!0,subtree:!0}))});var ae=window.matchMedia("(prefers-reduced-motion: reduce)");var tt=new Map;function et(n,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=tt.get(n);if(customElements.get(n)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=i){s.priority===i&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}tt.set(n,r),customElements.define(n,t)}var $=class extends HTMLElement{#t=[];#i;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,r){t.addEventListener(e,i,r),this.#t.push(()=>t.removeEventListener(e,i,r))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#i||(this.#i=this.attachInternals());let i=this.#i.states;try{e?i.add(t):i.delete(t)}catch{let r=`--${t}`;e?i.add(r):i.delete(r)}}_adoptInternals(t){this.#i||(this.#i=t)}#n(){return this.constructor.formAssociated&&this.#i?this.#i:null}get validity(){return this.#n()?.validity}get validationMessage(){return this.#n()?.validationMessage??""}get willValidate(){return this.#n()?.willValidate??!1}get form(){return this.#n()?.form??null}checkValidity(){return this.#n()?.checkValidity()??!0}reportValidity(){return this.#n()?.reportValidity()??!0}};var ne={watch:"Watch for updates",watching:"Watching",action:"Watch this page for updates",stop:"Stop watching this page"},J=class extends ${static observedAttributes=["variant","label","data-label-watch","data-label-watching","data-label-action","data-label-stop"];#t=null;#i=null;setup(){if(this.hasAttribute("server-sync")){let i=window;i.vbPageWatch={...i.vbPageWatch??{},serverSync:!0}}let t=this.#h();this.dataset.variant=t,this.querySelectorAll(":scope > [data-watch-wc]").forEach(i=>i.remove());let e=this.#e(t);this.#t=e,this.appendChild(e),this.#r(),this.#i=new MutationObserver(()=>this.#r()),this.#i.observe(e,{attributes:!0,attributeFilter:["aria-pressed"]}),Promise.resolve().then(()=>(Lt(),Ot)).catch(()=>{})}teardown(){this.#i?.disconnect(),this.#i=null,this.#t?.remove(),this.#t=null}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||this._reinit()}#n(t){return this.getAttribute(`data-label-${t}`)??ne[t]}#h(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#e(t){let e=document.createElement("button");e.type="button",e.className="ghost",e.setAttribute("data-watch-page",""),e.setAttribute("data-watch-wc",""),e.setAttribute("data-watch-label-locked",""),e.setAttribute("aria-pressed","false");let i=document.createElement("icon-wc");return i.setAttribute("name","bookmark"),i.setAttribute("size",t==="icon"?"sm":"xs"),i.setAttribute("aria-hidden","true"),e.appendChild(i),t==="icon"?e.setAttribute("aria-label",this.#n("action")):e.appendChild(document.createElement("span")),e}#r(){let t=this.#t;if(!t)return;let e=t.getAttribute("aria-pressed")==="true";t.querySelector("icon-wc")?.setAttribute("name",e?"bookmark-check":"bookmark");let i=t.querySelector(":scope > span");i?(i.textContent=this.getAttribute("label")??this.#n(e?"watching":"watch"),t.removeAttribute("title")):t.setAttribute("title",e?this.#n("stop"):this.#n("action"))}};et("watch-wc",J);export{J as WatchWc};
|
|
7
7
|
//# sourceMappingURL=watch-wc.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var I=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,s){t.addEventListener(n,e,s),this.#t.push(()=>t.removeEventListener(n,e,s))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,n){this.#e||(this.#e=this.attachInternals());let e=this.#e.states;try{n?e.add(t):e.delete(t)}catch{let s=`--${t}`;n?e.add(s):e.delete(s)}}_adoptInternals(t){this.#e||(this.#e=t)}#n(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#n()?.validity}get validationMessage(){return this.#n()?.validationMessage??""}get willValidate(){return this.#n()?.willValidate??!1}get form(){return this.#n()?.form??null}checkValidity(){return this.#n()?.checkValidity()??!0}reportValidity(){return this.#n()?.reportValidity()??!0}};var dt=window.matchMedia("(prefers-reduced-motion: reduce)");var Y=new Map;function j(o,t,n={}){let e=n.priority??10,s={impl:t,bundle:n.bundle,contract:n.contract,priority:e},r=Y.get(o);if(customElements.get(o)){if(!r||r.priority>=e){r&&r.priority===e&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=e){r.priority===e&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${r.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}Y.set(o,s),customElements.define(o,t)}function z(o,t="en-US"){try{if(o)return Intl.getCanonicalLocales(o),o}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}function x(o){if(!o)return null;let t=/(?:^|T|\s)(\d{1,2}):(\d{2})/.exec(String(o).trim());if(!t)return null;let n=Math.min(23,Math.max(0,parseInt(t[1],10))),e=Math.min(59,Math.max(0,parseInt(t[2],10)));return{hour:n,minute:e}}var G=60,k="(\\d+(?:\\.\\d+)?)",tt=new RegExp(`^PT(?:${k}H)?(?:${k}M)?(?:${k}S)?$`,"i"),et=new RegExp(`^(?:${k}\\s*h(?:ours?|rs?)?)?\\s*(?:${k}\\s*m(?:in(?:utes?|s)?)?)?$`,"i"),nt=new RegExp(`^${k}$`);function K(o){if(o==null)return null;let t=String(o).trim();if(!t)return null;let n=null,e;return(e=nt.exec(t))?n=parseFloat(e[1]):(e=tt.exec(t))&&(e[1]||e[2]||e[3])?n=(e[1]?parseFloat(e[1])*60:0)+(e[2]?parseFloat(e[2]):0)+(e[3]?parseFloat(e[3])/60:0):(e=et.exec(t))&&(e[1]||e[2])&&(n=(e[1]?parseFloat(e[1])*60:0)+(e[2]?parseFloat(e[2]):0)),n===null||!Number.isFinite(n)?null:(n=Math.round(n),n>0?n:null)}function _(o){let t=[...o].sort((c,l)=>c.start-l.start||l.end-c.end),n=[],e=[],s=[],r=-1/0,d=()=>{for(let c of e)c.columns=s.length;e=[],s=[]};for(let c of t){c.start>=r&&(d(),r=-1/0);let l=s.findIndex(f=>f<=c.start);l===-1?(l=s.length,s.push(c.end)):s[l]=c.end;let b={...c,column:l,columns:1};e.push(b),n.push(b),r=Math.max(r,c.end)}return d(),n}function W(o){let t=o.filter(n=>!n.dataset.duration).map(n=>{let e=n.dataset.start==="30"?30:0;return{start:e,end:e+30}});return _(t).some(n=>n.columns>1)}function J(o){let t=o.cloneNode(!0);return t.querySelectorAll('details, time[datetime^="PT"]').forEach(n=>n.remove()),(t.textContent||"").replace(/\s+/g," ").trim()}var X=["position","top","height","inset-inline-start","inset-inline-end"];var st=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"],rt=["data-start-date","data-days","data-start-hour","data-end-hour","data-label-time","data-label-continues"],ot=new Set(["US","CA","MX","BR","JP","KR","TW","HK","PH","IL","IN","ZA","SA","PE","CO","VE","GT","HN","NI","PA","PR","DO","AR"]);function P(o){let t=o.getFullYear(),n=String(o.getMonth()+1).padStart(2,"0"),e=String(o.getDate()).padStart(2,"0");return`${t}-${n}-${e}`}function it(o){try{let t=new Intl.Locale(o),n=typeof t.getWeekInfo=="function"?t.getWeekInfo():t.weekInfo;if(n&&Number.isInteger(n.firstDay))return n.firstDay;let e=t.maximize?.().region;return e&&ot.has(e)?7:1}catch{return 1}}function at(o,t){let n=it(o)%7,e=new Date(t.getFullYear(),t.getMonth(),t.getDate());return e.setDate(e.getDate()-(e.getDay()-n+7)%7),e}function ct(o){let t=parseInt(o??"",10);return Number.isNaN(t)?7:Math.min(14,Math.max(1,t))}function Z(o,t){let n=parseInt(o??"",10);return Number.isNaN(n)?t:Math.min(23,Math.max(0,n))}var L=new WeakMap,U=class extends I{static observedAttributes=rt;#t=null;#e=0;#n=null;setup(){if(this.#t=this.querySelector(":scope > table"),this.#t||this.#m(),!this.#t)return!1;let t=this.#t;return this.#h(),this.listen(t,"click",n=>{let e=this.#i(n.target);e&&this.#a(e)}),this.#f(),typeof ResizeObserver<"u"&&(this.#n=new ResizeObserver(()=>this.#c()),this.#n.observe(t)),this.#c(),!0}attributeChangedCallback(t,n,e){n===e||!this.hasAttribute("data-upgraded")||this.#t?.hasAttribute("data-wv-generated")&&(this.#u(),this._reinit())}#u(){let t=this.#t;if(t){this.#r();for(let n of this.#s())this.appendChild(n);t.remove(),this.#t=null}}teardown(){this.#e&&cancelAnimationFrame(this.#e),this.#e=0,this.#n?.disconnect(),this.#n=null,this.#r()}refresh(){this.#e&&cancelAnimationFrame(this.#e),this.#e=0,this.#l()}get events(){return[...this.querySelectorAll("calendar-event")].filter(n=>n.closest("week-view")===this).map(n=>({date:n.dataset.date||void 0,time:n.querySelector("time[datetime]")?.getAttribute("datetime")||void 0,text:n.textContent?.trim()??"",category:n.dataset.category||void 0,duration:n.dataset.duration||void 0}))}set events(t){let n=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let e=new Intl.DateTimeFormat(this.#o(),{hour:"numeric",minute:"2-digit"});for(let s of n){let r=document.createElement("calendar-event"),d=s.date||/^\d{4}-\d{2}-\d{2}(?=T)/.exec(s.time||"")?.[0];if(d&&(r.dataset.date=d),s.category&&(r.dataset.category=s.category),s.duration&&(r.dataset.duration=String(s.duration)),s.time){let c=document.createElement("time");c.setAttribute("datetime",s.time);let l=x(s.time);c.textContent=l?e.format(new Date(2026,0,1,l.hour,l.minute)):s.time,r.appendChild(c),r.appendChild(document.createTextNode(" "))}r.appendChild(document.createTextNode(s.text||"")),this.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("week-view:events-changed",{detail:{events:n,source:"property"},bubbles:!0}))}#o(){return z(this.closest("[lang]")?.lang||navigator.language)}#s(){return[...(this.#t??this).querySelectorAll("calendar-event")].filter(n=>n.closest("week-view")===this)}#i(t){let e=(t instanceof Element?t:null)?.closest("calendar-event")??null;return e&&e.closest("week-view")===this?e:null}#a(t){let e=t.closest("tr")?.querySelector("th time[datetime]");this.dispatchEvent(new CustomEvent("week-view:event-click",{bubbles:!0,detail:{date:t.dataset.date,time:t.querySelector("time[datetime]")?.getAttribute("datetime")||e?.getAttribute("datetime"),text:t.textContent?.trim()??"",element:t,category:t.dataset.category,duration:t.dataset.duration}}))}#h(){let t=this.#s(),n=t.find(s=>s.getAttribute("tabindex")==="0");for(let s of t){if(s.hasAttribute("role")||s.setAttribute("role","group"),!s.hasAttribute("aria-label")||L.has(s)){let r=J(s);L.set(s,r),s.setAttribute("aria-label",r)}s.setAttribute("tabindex","-1")}let e=n??this.#d()[0]?.el;e&&e.setAttribute("tabindex","0")}#m(){let t=[...this.querySelectorAll(":scope > calendar-event")],n=this.#o(),e=new Date,s=ct(this.dataset.days),r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.dataset.startDate||""),d=r?new Date(Number(r[1]),Number(r[2])-1,Number(r[3])):at(n,e),c=P(e),l=[];for(let u=0;u<s;u++){let h=new Date(d);h.setDate(h.getDate()+u),l.push(h)}let b=l.map(P),f=new Map,C=new Set;for(let u of t){let h=u.dataset.date;if(!h||!b.includes(h))continue;let E=x(u.querySelector("time[datetime]")?.getAttribute("datetime"));if(!E)continue;E.minute>=30&&!u.dataset.start&&(u.dataset.start="30");let v=`${h}:${String(E.hour).padStart(2,"0")}`,S=f.get(v)??[];S.push(u),f.set(v,S),C.add(E.hour)}let a=[...C].sort((u,h)=>u-h),i=a[0],y=a[a.length-1],p=this.dataset.startHour==="auto"||!this.dataset.startHour,g,w;p?(g=a.length>0?Math.max(0,i-1):7,w=a.length>0?Math.min(23,y+1):19):(g=Z(this.dataset.startHour,7),w=Math.max(g,Z(this.dataset.endHour,19)),a.length>0&&(g=Math.min(g,i),w=Math.max(w,y)));let A=l[0].getMonth()!==l[l.length-1].getMonth(),N=new Intl.DateTimeFormat(n,A?{weekday:"short",day:"numeric",month:"short"}:{weekday:"short",day:"numeric"}),M=new Intl.DateTimeFormat(n,{dateStyle:"full"}),D=new Intl.DateTimeFormat(n,{hour:"numeric"});this.style.setProperty("--wv-days",String(s));let m=document.createElement("table");m.setAttribute("data-wv-generated","");let T=document.createElement("thead"),R=document.createElement("tr"),F=document.createElement("th");F.setAttribute("scope","col");let q=document.createElement("span");q.className="visually-hidden",q.textContent=this.dataset.labelTime||"Time",F.appendChild(q),R.appendChild(F),l.forEach(u=>{let h=document.createElement("th");h.setAttribute("scope","col");let E=P(u);E===c&&h.setAttribute("aria-current","date");let v=document.createElement("time");v.setAttribute("datetime",E);let S=document.createElement("span");S.setAttribute("aria-hidden","true"),S.textContent=N.format(u);let $=document.createElement("span");$.className="visually-hidden",$.textContent=M.format(u),v.append(S,$),h.appendChild(v),R.appendChild(h)}),T.appendChild(R),m.appendChild(T);let B=document.createElement("tbody");for(let u=g;u<=w;u++){let h=document.createElement("tr"),E=document.createElement("th");E.setAttribute("scope","row");let v=document.createElement("time"),S=String(u).padStart(2,"0");v.setAttribute("datetime",`${S}:00`),v.textContent=D.format(new Date(2026,0,1,u)),E.appendChild(v),h.appendChild(E),b.forEach($=>{let V=document.createElement("td"),H=f.get(`${$}:${S}`)||[];if(H.length>0){let O=document.createElement("hour-view");W(H)&&(O.dataset.overlap=""),H.forEach(Q=>O.appendChild(Q)),V.appendChild(O)}h.appendChild(V)}),B.appendChild(h)}m.appendChild(B),this.appendChild(m),this.#t=m}#c(){this.#e||(this.#e=requestAnimationFrame(()=>{this.#e=0,this.#l()}))}#r(){this.querySelectorAll("calendar-event.wv-spanning").forEach(t=>{let n=t;for(let s of X)n.style.removeProperty(s);n.classList.remove("wv-spanning"),n.removeAttribute("data-continues");let e=L.get(n);e!==void 0&&n.setAttribute("aria-label",e)})}#l(){this.#r();let t=this.#t?.querySelector("tbody");if(!t||!t.isConnected)return;let n=[...t.querySelectorAll("calendar-event[data-duration]")];if(n.length===0)return;let e=t.getBoundingClientRect(),s=getComputedStyle(t).direction==="rtl",r=new Map,d=-1,c=0;if(t.querySelectorAll(":scope > tr").forEach(a=>{let i=x(a.querySelector("th time[datetime]")?.getAttribute("datetime"));if(!i)return;let y=a.getBoundingClientRect(),p=y.top-e.top;r.set(i.hour,{top:p,height:y.height}),i.hour>d&&(d=i.hour,c=p+y.height)}),r.size===0)return;let l=(d+1)*60,b=a=>{let i=r.get(Math.floor(a/60));return i?i.top+i.height*(a%60/60):null},f=new Map;for(let a of n){let i=a.closest("td"),y=i?.closest("tr");if(!i||!y)continue;let p=x(y.querySelector("th time[datetime]")?.getAttribute("datetime"));if(!p||!r.has(p.hour))continue;let g=x(a.querySelector("time[datetime]")?.getAttribute("datetime")),w=a.dataset.start?parseInt(a.dataset.start,10)||0:g&&g.hour===p.hour?g.minute:0,A=p.hour*60+Math.min(59,Math.max(0,w)),N=K(a.dataset.duration)??G,M=f.get(i.cellIndex)??[];M.push({event:a,td:i,start:A,end:A+N}),f.set(i.cellIndex,M)}let C=this.dataset.labelContinues||"continues after the visible hours";for(let a of f.values())for(let i of _(a)){let y=r.get(Math.floor(i.start/60)),p=b(i.start),g=i.end>l,w=g||i.end===l?c:b(i.end);w===null&&(w=p+y.height*((i.end-i.start)/60));let A=i.td.getBoundingClientRect(),N=(s?e.right-A.right:A.left-e.left)+2,M=(s?A.left-e.left:e.right-A.right)+2,D=Math.max(0,A.width-4)/i.columns,{event:m}=i;if(m.style.position="absolute",m.style.top=`${p}px`,m.style.height=`${Math.max(w-p,1)}px`,m.style.insetInlineStart=`${N+i.column*D}px`,m.style.insetInlineEnd=`${M+(i.columns-1-i.column)*D}px`,m.classList.add("wv-spanning"),g){m.setAttribute("data-continues","");let T=L.get(m);T!==void 0&&m.setAttribute("aria-label",`${T}, ${C}`)}}}#d(){return this.#s().map((t,n)=>{let e=t.closest("td"),s=x(e?.closest("tr")?.querySelector("th time[datetime]")?.getAttribute("datetime")),r=x(t.querySelector("time[datetime]")?.getAttribute("datetime")),d=r?r.hour*60+r.minute:(s?s.hour*60:0)+(parseInt(t.dataset.start||"0",10)||0);return{el:t,col:e?.cellIndex??0,min:d,i:n}}).sort((t,n)=>t.col-n.col||t.min-n.min||t.i-n.i).map(({el:t,col:n,min:e})=>({el:t,col:n,min:e}))}#f(){let t=this.#t;t&&this.listen(t,"keydown",n=>{let e=n,s=this.#i(e.target);if(!s)return;if((e.key==="Enter"||e.key===" ")&&e.target===s){e.preventDefault(),this.#a(s);return}if(!st.includes(e.key))return;let r=null,d=this.#d(),c=d.find(l=>l.el===s);if(c){if(e.key==="Home"||e.key==="End")r=(e.key==="Home"?d[0]:d[d.length-1])?.el;else if(e.key==="ArrowDown"||e.key==="ArrowUp"){let l=d.filter(f=>f.col===c.col),b=l.indexOf(c)+(e.key==="ArrowDown"?1:-1);r=l[b]?.el}else{let l=getComputedStyle(t).direction==="rtl",b=e.key==="ArrowRight"!==l,f=[...new Set(d.map(a=>a.col))],C=b?f.find(a=>a>c.col):f.filter(a=>a<c.col).pop();if(C!==void 0){let a=null;for(let i of d)i.col===C&&(!a||Math.abs(i.min-c.min)<Math.abs(a.min-c.min))&&(a=i);r=a?.el}}r&&r!==s&&(e.preventDefault(),s.setAttribute("tabindex","-1"),r.setAttribute("tabindex","0"),r.focus())}})}};j("week-view",U);export{U as WeekView};
|
|
1
|
+
var D=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,r){t.addEventListener(n,e,r),this.#t.push(()=>t.removeEventListener(n,e,r))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,n){this.#e||(this.#e=this.attachInternals());let e=this.#e.states;try{n?e.add(t):e.delete(t)}catch{let r=`--${t}`;n?e.add(r):e.delete(r)}}_adoptInternals(t){this.#e||(this.#e=t)}#n(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#n()?.validity}get validationMessage(){return this.#n()?.validationMessage??""}get willValidate(){return this.#n()?.willValidate??!1}get form(){return this.#n()?.form??null}checkValidity(){return this.#n()?.checkValidity()??!0}reportValidity(){return this.#n()?.reportValidity()??!0}};var mt=window.matchMedia("(prefers-reduced-motion: reduce)");var N=new Map;function z(o,t,n={}){let e=n.priority??10,r={impl:t,bundle:n.bundle,contract:n.contract,priority:e},s=N.get(o);if(customElements.get(o)){if(!s||s.priority>=e){s&&s.priority===e&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=e){s.priority===e&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${s.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}N.set(o,r),customElements.define(o,t)}function Y(o,t="en-US"){try{if(o)return Intl.getCanonicalLocales(o),o}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}function x(o){if(!o)return null;let t=/(?:^|T|\s)(\d{1,2}):(\d{2})/.exec(String(o).trim());if(!t)return null;let n=Math.min(23,Math.max(0,parseInt(t[1],10))),e=Math.min(59,Math.max(0,parseInt(t[2],10)));return{hour:n,minute:e}}var G=60,M="(\\d+(?:\\.\\d+)?)",tt=new RegExp(`^PT(?:${M}H)?(?:${M}M)?(?:${M}S)?$`,"i"),et=new RegExp(`^(?:${M}\\s*h(?:ours?|rs?)?)?\\s*(?:${M}\\s*m(?:in(?:utes?|s)?)?)?$`,"i"),nt=new RegExp(`^${M}$`);function K(o){if(o==null)return null;let t=String(o).trim();if(!t)return null;let n=null,e;return(e=nt.exec(t))?n=parseFloat(e[1]):(e=tt.exec(t))&&(e[1]||e[2]||e[3])?n=(e[1]?parseFloat(e[1])*60:0)+(e[2]?parseFloat(e[2]):0)+(e[3]?parseFloat(e[3])/60:0):(e=et.exec(t))&&(e[1]||e[2])&&(n=(e[1]?parseFloat(e[1])*60:0)+(e[2]?parseFloat(e[2]):0)),n===null||!Number.isFinite(n)?null:(n=Math.round(n),n>0?n:null)}function O(o){let t=[...o].sort((c,l)=>c.start-l.start||l.end-c.end),n=[],e=[],r=[],s=-1/0,d=()=>{for(let c of e)c.columns=r.length;e=[],r=[]};for(let c of t){c.start>=s&&(d(),s=-1/0);let l=r.findIndex(m=>m<=c.start);l===-1?(l=r.length,r.push(c.end)):r[l]=c.end;let g={...c,column:l,columns:1};e.push(g),n.push(g),s=Math.max(s,c.end)}return d(),n}function W(o){let t=o.filter(n=>!n.dataset.duration).map(n=>{let e=n.dataset.start==="30"?30:0;return{start:e,end:e+30}});return O(t).some(n=>n.columns>1)}function J(o){let t=o.cloneNode(!0);return t.querySelectorAll('details, time[datetime^="PT"]').forEach(n=>n.remove()),(t.textContent||"").replace(/\s+/g," ").trim()}var X=["position","top","height","inset-inline-start","inset-inline-end"];var rt=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"],st=["data-start-date","data-days","data-start-hour","data-end-hour","data-label-time","data-label-continues"],ot=new Set(["US","CA","MX","BR","JP","KR","TW","HK","PH","IL","IN","ZA","SA","PE","CO","VE","GT","HN","NI","PA","PR","DO","AR"]);function B(o){let t=o.getFullYear(),n=String(o.getMonth()+1).padStart(2,"0"),e=String(o.getDate()).padStart(2,"0");return`${t}-${n}-${e}`}function it(o){try{let t=new Intl.Locale(o),n=typeof t.getWeekInfo=="function"?t.getWeekInfo():t.weekInfo;if(n&&Number.isInteger(n.firstDay))return n.firstDay;let e=t.maximize?.().region;return e&&ot.has(e)?7:1}catch{return 1}}function at(o,t){let n=it(o)%7,e=new Date(t.getFullYear(),t.getMonth(),t.getDate());return e.setDate(e.getDate()-(e.getDay()-n+7)%7),e}function ct(o){let t=parseInt(o??"",10);return Number.isNaN(t)?7:Math.min(14,Math.max(1,t))}function Z(o,t){let n=parseInt(o??"",10);return Number.isNaN(n)?t:Math.min(23,Math.max(0,n))}var R=new WeakMap,lt="a[href], button, input, select, textarea, summary, audio[controls], video[controls], [tabindex], [contenteditable]",U=class extends D{static observedAttributes=st;#t=null;#e=0;#n=null;setup(){if(this.#t=this.querySelector(":scope > table"),this.#t||this.#f(),!this.#t)return!1;let t=this.#t;return this.#h(),this.listen(t,"click",n=>{let e=this.#i(n.target);e&&this.#a(e)}),this.#m(),typeof ResizeObserver<"u"&&(this.#n=new ResizeObserver(()=>this.#c()),this.#n.observe(t)),this.#c(),!0}attributeChangedCallback(t,n,e){n===e||!this.hasAttribute("data-upgraded")||this.#t?.hasAttribute("data-wv-generated")&&(this.#u(),this._reinit())}#u(){let t=this.#t;if(t){this.#s();for(let n of this.#r())this.appendChild(n);t.remove(),this.#t=null}}teardown(){this.#e&&cancelAnimationFrame(this.#e),this.#e=0,this.#n?.disconnect(),this.#n=null,this.#s()}refresh(){this.#e&&cancelAnimationFrame(this.#e),this.#e=0,this.#l()}get events(){return[...this.querySelectorAll("calendar-event")].filter(n=>n.closest("week-view")===this).map(n=>({date:n.dataset.date||void 0,time:n.querySelector("time[datetime]")?.getAttribute("datetime")||void 0,text:n.textContent?.trim()??"",category:n.dataset.category||void 0,duration:n.dataset.duration||void 0}))}set events(t){let n=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let e=new Intl.DateTimeFormat(this.#o(),{hour:"numeric",minute:"2-digit"});for(let r of n){let s=document.createElement("calendar-event"),d=r.date||/^\d{4}-\d{2}-\d{2}(?=T)/.exec(r.time||"")?.[0];if(d&&(s.dataset.date=d),r.category&&(s.dataset.category=r.category),r.duration&&(s.dataset.duration=String(r.duration)),r.time){let c=document.createElement("time");c.setAttribute("datetime",r.time);let l=x(r.time);c.textContent=l?e.format(new Date(2026,0,1,l.hour,l.minute)):r.time,s.appendChild(c),s.appendChild(document.createTextNode(" "))}s.appendChild(document.createTextNode(r.text||"")),this.appendChild(s)}this._reinit(),this.dispatchEvent(new CustomEvent("week-view:events-changed",{detail:{events:n,source:"property"},bubbles:!0}))}#o(){return Y(this.closest("[lang]")?.lang||navigator.language)}#r(){return[...(this.#t??this).querySelectorAll("calendar-event")].filter(n=>n.closest("week-view")===this)}#i(t){let e=(t instanceof Element?t:null)?.closest("calendar-event")??null;return e&&e.closest("week-view")===this?e:null}#a(t){let e=t.closest("tr")?.querySelector("th time[datetime]");this.dispatchEvent(new CustomEvent("week-view:event-click",{bubbles:!0,detail:{date:t.dataset.date,time:t.querySelector("time[datetime]")?.getAttribute("datetime")||e?.getAttribute("datetime"),text:t.textContent?.trim()??"",element:t,category:t.dataset.category,duration:t.dataset.duration}}))}#h(){let t=this.#r(),n=t.find(r=>r.getAttribute("tabindex")==="0");for(let r of t){if(r.hasAttribute("role")||r.setAttribute("role",r.querySelector(lt)?"group":"button"),!r.hasAttribute("aria-label")||R.has(r)){let s=J(r);R.set(r,s),r.setAttribute("aria-label",s)}r.setAttribute("tabindex","-1")}let e=n??this.#d()[0]?.el;e&&e.setAttribute("tabindex","0")}#f(){let t=[...this.querySelectorAll(":scope > calendar-event")],n=this.#o(),e=new Date,r=ct(this.dataset.days),s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.dataset.startDate||""),d=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):at(n,e),c=B(e),l=[];for(let u=0;u<r;u++){let h=new Date(d);h.setDate(h.getDate()+u),l.push(h)}let g=l.map(B),m=new Map,C=new Set;for(let u of t){let h=u.dataset.date;if(!h||!g.includes(h))continue;let v=x(u.querySelector("time[datetime]")?.getAttribute("datetime"));if(!v)continue;v.minute>=30&&!u.dataset.start&&(u.dataset.start="30");let A=`${h}:${String(v.hour).padStart(2,"0")}`,S=m.get(A)??[];S.push(u),m.set(A,S),C.add(v.hour)}let a=[...C].sort((u,h)=>u-h),i=a[0],y=a[a.length-1],p=this.dataset.startHour==="auto"||!this.dataset.startHour,b,w;p?(b=a.length>0?Math.max(0,i-1):7,w=a.length>0?Math.min(23,y+1):19):(b=Z(this.dataset.startHour,7),w=Math.max(b,Z(this.dataset.endHour,19)),a.length>0&&(b=Math.min(b,i),w=Math.max(w,y)));let E=l[0].getMonth()!==l[l.length-1].getMonth(),T=new Intl.DateTimeFormat(n,E?{weekday:"short",day:"numeric",month:"short"}:{weekday:"short",day:"numeric"}),$=new Intl.DateTimeFormat(n,{dateStyle:"full"}),I=new Intl.DateTimeFormat(n,{hour:"numeric"});this.style.setProperty("--wv-days",String(r));let f=document.createElement("table");f.setAttribute("data-wv-generated","");let k=document.createElement("thead"),_=document.createElement("tr"),F=document.createElement("th");F.setAttribute("scope","col");let H=document.createElement("span");H.className="visually-hidden",H.textContent=this.dataset.labelTime||"Time",F.appendChild(H),_.appendChild(F),l.forEach(u=>{let h=document.createElement("th");h.setAttribute("scope","col");let v=B(u);v===c&&h.setAttribute("aria-current","date");let A=document.createElement("time");A.setAttribute("datetime",v);let S=document.createElement("span");S.setAttribute("aria-hidden","true"),S.textContent=T.format(u);let L=document.createElement("span");L.className="visually-hidden",L.textContent=$.format(u),A.append(S,L),h.appendChild(A),_.appendChild(h)}),k.appendChild(_),f.appendChild(k);let V=document.createElement("tbody");for(let u=b;u<=w;u++){let h=document.createElement("tr"),v=document.createElement("th");v.setAttribute("scope","row");let A=document.createElement("time"),S=String(u).padStart(2,"0");A.setAttribute("datetime",`${S}:00`),A.textContent=I.format(new Date(2026,0,1,u)),v.appendChild(A),h.appendChild(v),g.forEach(L=>{let j=document.createElement("td"),P=m.get(`${L}:${S}`)||[];if(P.length>0){let q=document.createElement("hour-view");W(P)&&(q.dataset.overlap=""),P.forEach(Q=>q.appendChild(Q)),j.appendChild(q)}h.appendChild(j)}),V.appendChild(h)}f.appendChild(V),this.appendChild(f),this.#t=f}#c(){this.#e||(this.#e=requestAnimationFrame(()=>{this.#e=0,this.#l()}))}#s(){this.querySelectorAll("calendar-event.wv-spanning").forEach(t=>{let n=t;for(let r of X)n.style.removeProperty(r);n.classList.remove("wv-spanning"),n.removeAttribute("data-continues");let e=R.get(n);e!==void 0&&n.setAttribute("aria-label",e)})}#l(){this.#s();let t=this.#t?.querySelector("tbody");if(!t||!t.isConnected)return;let n=[...t.querySelectorAll("calendar-event[data-duration]")];if(n.length===0)return;let e=t.getBoundingClientRect(),r=getComputedStyle(t).direction==="rtl",s=new Map,d=-1,c=0;if(t.querySelectorAll(":scope > tr").forEach(a=>{let i=x(a.querySelector("th time[datetime]")?.getAttribute("datetime"));if(!i)return;let y=a.getBoundingClientRect(),p=y.top-e.top;s.set(i.hour,{top:p,height:y.height}),i.hour>d&&(d=i.hour,c=p+y.height)}),s.size===0)return;let l=(d+1)*60,g=a=>{let i=s.get(Math.floor(a/60));return i?i.top+i.height*(a%60/60):null},m=new Map;for(let a of n){let i=a.closest("td"),y=i?.closest("tr");if(!i||!y)continue;let p=x(y.querySelector("th time[datetime]")?.getAttribute("datetime"));if(!p||!s.has(p.hour))continue;let b=x(a.querySelector("time[datetime]")?.getAttribute("datetime")),w=a.dataset.start?parseInt(a.dataset.start,10)||0:b&&b.hour===p.hour?b.minute:0,E=p.hour*60+Math.min(59,Math.max(0,w)),T=K(a.dataset.duration)??G,$=m.get(i.cellIndex)??[];$.push({event:a,td:i,start:E,end:E+T}),m.set(i.cellIndex,$)}let C=this.dataset.labelContinues||"continues after the visible hours";for(let a of m.values())for(let i of O(a)){let y=s.get(Math.floor(i.start/60)),p=g(i.start),b=i.end>l,w=b||i.end===l?c:g(i.end);w===null&&(w=p+y.height*((i.end-i.start)/60));let E=i.td.getBoundingClientRect(),T=(r?e.right-E.right:E.left-e.left)+2,$=(r?E.left-e.left:e.right-E.right)+2,I=Math.max(0,E.width-4)/i.columns,{event:f}=i;if(f.style.position="absolute",f.style.top=`${p}px`,f.style.height=`${Math.max(w-p,1)}px`,f.style.insetInlineStart=`${T+i.column*I}px`,f.style.insetInlineEnd=`${$+(i.columns-1-i.column)*I}px`,f.classList.add("wv-spanning"),b){f.setAttribute("data-continues","");let k=R.get(f);k!==void 0&&f.setAttribute("aria-label",`${k}, ${C}`)}}}#d(){return this.#r().map((t,n)=>{let e=t.closest("td"),r=x(e?.closest("tr")?.querySelector("th time[datetime]")?.getAttribute("datetime")),s=x(t.querySelector("time[datetime]")?.getAttribute("datetime")),d=s?s.hour*60+s.minute:(r?r.hour*60:0)+(parseInt(t.dataset.start||"0",10)||0);return{el:t,col:e?.cellIndex??0,min:d,i:n}}).sort((t,n)=>t.col-n.col||t.min-n.min||t.i-n.i).map(({el:t,col:n,min:e})=>({el:t,col:n,min:e}))}#m(){let t=this.#t;t&&this.listen(t,"keydown",n=>{let e=n,r=this.#i(e.target);if(!r)return;if((e.key==="Enter"||e.key===" ")&&e.target===r){e.preventDefault(),this.#a(r);return}if(!rt.includes(e.key))return;let s=null,d=this.#d(),c=d.find(l=>l.el===r);if(c){if(e.key==="Home"||e.key==="End")s=(e.key==="Home"?d[0]:d[d.length-1])?.el;else if(e.key==="ArrowDown"||e.key==="ArrowUp"){let l=d.filter(m=>m.col===c.col),g=l.indexOf(c)+(e.key==="ArrowDown"?1:-1);s=l[g]?.el}else{let l=getComputedStyle(t).direction==="rtl",g=e.key==="ArrowRight"!==l,m=[...new Set(d.map(a=>a.col))],C=g?m.find(a=>a>c.col):m.filter(a=>a<c.col).pop();if(C!==void 0){let a=null;for(let i of d)i.col===C&&(!a||Math.abs(i.min-c.min)<Math.abs(a.min-c.min))&&(a=i);s=a?.el}}s&&s!==r&&(e.preventDefault(),r.setAttribute("tabindex","-1"),s.setAttribute("tabindex","0"),s.focus())}})}};z("week-view",U);export{U as WeekView};
|
|
2
2
|
//# sourceMappingURL=week-view.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var o=class extends HTMLElement{#e=[];#t;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,r,
|
|
1
|
+
var o=class extends HTMLElement{#e=[];#t;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,r,i){t.addEventListener(e,r,i),this.#e.push(()=>t.removeEventListener(e,r,i))}_reinit(){for(let t of this.#e)t();this.#e=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let r=this.#t.states;try{e?r.add(t):r.delete(t)}catch{let i=`--${t}`;e?r.add(i):r.delete(i)}}_adoptInternals(t){this.#t||(this.#t=t)}#r(){return this.constructor.formAssociated&&this.#t?this.#t:null}get validity(){return this.#r()?.validity}get validationMessage(){return this.#r()?.validationMessage??""}get willValidate(){return this.#r()?.willValidate??!1}get form(){return this.#r()?.form??null}checkValidity(){return this.#r()?.checkValidity()??!0}reportValidity(){return this.#r()?.reportValidity()??!0}};var $=window.matchMedia("(prefers-reduced-motion: reduce)");var c=new Map;function d(s,t,e={}){let r=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:r},n=c.get(s);if(customElements.get(s)){if(!n||n.priority>=r){n&&n.priority===r&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=r){n.priority===r&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}c.set(s,i),customElements.define(s,t)}var p='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',b={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},u="YouTube video",m="Play {title}",y=/^\d+$/;function l(s){return String(s).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function v(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced")}var a=class extends o{#e="";#t=u;setup(){let t=this.getAttribute("video-id");return this.#t=this.getAttribute("title")||u,t?/^[A-Za-z0-9_-]{6,20}$/.test(t)?(this.#e=t,this.hasAttribute("autoplay")&&!v()?this.#i(!1):this.#a(),!0):(console.warn(`youtube-player: invalid video-id ${JSON.stringify(t)}`),!1):(console.warn("youtube-player: missing required video-id attribute"),!1)}#r(t){let e=this.getAttribute(t);return e===null||e===""?null:y.test(e.trim())?e.trim():(console.warn(`youtube-player: ${t} must be whole seconds, got ${JSON.stringify(e)}`),null)}#s(){let t=new URLSearchParams({autoplay:"1"}),e=this.#r("start");e&&t.set("start",e);let r=this.#r("end");r&&t.set("end",r);let i=this.getAttribute("list");i&&t.set("list",i);let n=this.getAttribute("params");return n&&new URLSearchParams(n).forEach((f,h)=>t.set(h,f)),`https://www.youtube-nocookie.com/embed/${this.#e}?${t}`}#n(t){return`https://i.ytimg.com/vi/${this.#e}/${b[t]??"hqdefault"}.jpg`}#o(){return(this.getAttribute("data-label-play")||m).replace(/\{title\}/g,this.#t)}#a(){this.setAttribute("state","ready");let t=document.createElement("img");t.alt="",t.loading="lazy",t.decoding="async";let e=this.getAttribute("poster");if(e)t.src=e;else{let i=this.getAttribute("thumbnail")??"hq";if(t.referrerPolicy="no-referrer",t.src=this.#n(i),i==="sd"||i==="maxres"){let n=()=>{t.src=this.#n("hq")};t.addEventListener("error",n,{once:!0}),t.addEventListener("load",()=>{t.naturalWidth<=120&&n()},{once:!0})}}let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",this.#o()),r.innerHTML=p,r.addEventListener("click",()=>this.#i(!0),{once:!0}),this.replaceChildren(t,r)}#i(t){this.setAttribute("state","active"),this.innerHTML=`<iframe src="${l(this.#s())}" title="${l(this.#t)}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen loading="lazy"></iframe>`,t&&this.querySelector("iframe")?.focus(),this.dispatchEvent(new CustomEvent("youtube-player:activate",{bubbles:!0,detail:{videoId:this.#e,fromUser:t}}))}};d("youtube-player",a);export{a as YouTubePlayer};
|
|
2
2
|
//# sourceMappingURL=youtube-player.js.map
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-ThinItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-ExtraLight.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-ExtraLightItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Light.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-LightItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Regular.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Italic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Medium.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-MediumItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-SemiBold.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-SemiBoldItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Bold.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-BoldItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-ExtraBold.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-ExtraBoldItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-Black.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) BarlowCondensed-BlackItalic.ttf: Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Google Inc.
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|