vanilla-breeze 0.1.3 → 0.2.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.
Files changed (282) hide show
  1. package/custom-elements.json +25084 -6649
  2. package/dist/cdn/components/accessibility-specimen.js +11 -0
  3. package/dist/cdn/components/accordion-wc.js +1 -1
  4. package/dist/cdn/components/activity-feed.js +2 -0
  5. package/dist/cdn/components/adr-wc.js +17 -17
  6. package/dist/cdn/components/ai-chat.js +28 -0
  7. package/dist/cdn/components/ai-summary.js +10 -0
  8. package/dist/cdn/components/analytics-panel.js +5 -5
  9. package/dist/cdn/components/audio-player.js +3 -3
  10. package/dist/cdn/components/audio-visualizer.js +2 -2
  11. package/dist/cdn/components/author-index.js +2 -2
  12. package/dist/cdn/components/brand-mark.js +1 -1
  13. package/dist/cdn/components/bread-crumb.js +2 -0
  14. package/dist/cdn/components/breakpoint-specimen.js +26 -0
  15. package/dist/cdn/components/burndown-chart.js +2 -0
  16. package/dist/cdn/components/calendar-wc.js +2 -2
  17. package/dist/cdn/components/capacity-plan.js +25 -0
  18. package/dist/cdn/components/card-list.js +1 -1
  19. package/dist/cdn/components/carousel-wc.js +1 -1
  20. package/dist/cdn/components/change-set.js +2 -2
  21. package/dist/cdn/components/chart-wc.js +58 -36
  22. package/dist/cdn/components/chat-input.js +1 -1
  23. package/dist/cdn/components/chat-window.js +1 -1
  24. package/dist/cdn/components/color-palette.js +9 -9
  25. package/dist/cdn/components/color-picker.js +1 -1
  26. package/dist/cdn/components/combo-box.js +1 -1
  27. package/dist/cdn/components/command-palette.js +1 -1
  28. package/dist/cdn/components/comment-box.js +60 -0
  29. package/dist/cdn/components/comment-thread.js +60 -0
  30. package/dist/cdn/components/comment-wc.js +1 -1
  31. package/dist/cdn/components/compare-surface.js +1 -1
  32. package/dist/cdn/components/component-sampler.js +2 -2
  33. package/dist/cdn/components/consent-banner.js +1 -1
  34. package/dist/cdn/components/content-lens.js +1 -1
  35. package/dist/cdn/components/content-swap.js +1 -1
  36. package/dist/cdn/components/context-menu.js +1 -1
  37. package/dist/cdn/components/data-table.js +1 -1
  38. package/dist/cdn/components/date-picker.js +1 -1
  39. package/dist/cdn/components/day-view.js +1 -1
  40. package/dist/cdn/components/diagram-wc.js +3 -0
  41. package/dist/cdn/components/drag-surface.js +1 -1
  42. package/dist/cdn/components/drop-down.js +1 -1
  43. package/dist/cdn/components/emoji-picker.js +1 -1
  44. package/dist/cdn/components/empathy-map.js +41 -43
  45. package/dist/cdn/components/flow-diagram.js +1 -1
  46. package/dist/cdn/components/font-pairer.js +81 -81
  47. package/dist/cdn/components/foot-notes.js +1 -1
  48. package/dist/cdn/components/form-field.js +1 -1
  49. package/dist/cdn/components/gantt-chart.js +1 -1
  50. package/dist/cdn/components/geo-map.js +25 -23
  51. package/dist/cdn/components/glossary-index.js +1 -1
  52. package/dist/cdn/components/glossary-wc.js +1 -1
  53. package/dist/cdn/components/gradient-builder.js +29 -29
  54. package/dist/cdn/components/heading-links.js +1 -1
  55. package/dist/cdn/components/highlight-wc.js +2 -2
  56. package/dist/cdn/components/icon-wc.js +4 -4
  57. package/dist/cdn/components/image-gallery.js +1 -1
  58. package/dist/cdn/components/image-map.js +1 -1
  59. package/dist/cdn/components/impact-effort.js +1 -1
  60. package/dist/cdn/components/include-file.js +1 -1
  61. package/dist/cdn/components/iron-triangle.js +2 -0
  62. package/dist/cdn/components/kanban-board.js +1 -1
  63. package/dist/cdn/components/layout-specimen.js +35 -0
  64. package/dist/cdn/components/manifest.json +227 -103
  65. package/dist/cdn/components/markdown-editor.js +1 -1
  66. package/dist/cdn/components/markdown-viewer.js +12 -12
  67. package/dist/cdn/components/motion-specimen.js +12 -12
  68. package/dist/cdn/components/nav-bar.js +2 -0
  69. package/dist/cdn/components/note-wc.js +2 -2
  70. package/dist/cdn/components/notification-wc.js +4 -4
  71. package/dist/cdn/components/page-info.js +4 -4
  72. package/dist/cdn/components/page-stats.js +1 -1
  73. package/dist/cdn/components/page-toc.js +1 -1
  74. package/dist/cdn/components/page-tools.js +1 -1
  75. package/dist/cdn/components/page-tour.js +6 -6
  76. package/dist/cdn/components/pager-wc.js +2 -0
  77. package/dist/cdn/components/palette-generator.js +11 -11
  78. package/dist/cdn/components/poll-wc.js +2 -0
  79. package/dist/cdn/components/pop-over.js +2 -0
  80. package/dist/cdn/components/popularity-index.js +2 -2
  81. package/dist/cdn/components/print-page.js +1 -1
  82. package/dist/cdn/components/product-roadmap.js +3 -0
  83. package/dist/cdn/components/progress-tracker.js +2 -0
  84. package/dist/cdn/components/qr-code.js +1 -1
  85. package/dist/cdn/components/quadrant-grid.js +3 -0
  86. package/dist/cdn/components/quality-target.js +12 -0
  87. package/dist/cdn/components/reaction-bar.js +2 -0
  88. package/dist/cdn/components/reader-view.js +3 -3
  89. package/dist/cdn/components/reading-progress.js +2 -0
  90. package/dist/cdn/components/recently-visited.js +10 -10
  91. package/dist/cdn/components/requirement-card.js +122 -0
  92. package/dist/cdn/components/review-surface.js +34 -40
  93. package/dist/cdn/components/risk-register.js +25 -0
  94. package/dist/cdn/components/roadmap.js +3 -0
  95. package/dist/cdn/components/score-card.js +197 -0
  96. package/dist/cdn/components/selection-menu.js +1 -1
  97. package/dist/cdn/components/semantic-palette.js +15 -15
  98. package/dist/cdn/components/settings-panel.js +12 -12
  99. package/dist/cdn/components/share-wc.js +2 -2
  100. package/dist/cdn/components/short-cuts.js +1 -1
  101. package/dist/cdn/components/site-index.js +4 -4
  102. package/dist/cdn/components/site-map-wc.js +1 -1
  103. package/dist/cdn/components/site-map.js +1 -1
  104. package/dist/cdn/components/site-search.js +9 -9
  105. package/dist/cdn/components/slide-accept.js +1 -1
  106. package/dist/cdn/components/social-embed.js +1 -1
  107. package/dist/cdn/components/spacing-specimen.js +5 -5
  108. package/dist/cdn/components/split-surface.js +1 -1
  109. package/dist/cdn/components/star-rating.js +1 -1
  110. package/dist/cdn/components/status-wc.js +2 -0
  111. package/dist/cdn/components/stepper-wc.js +2 -0
  112. package/dist/cdn/components/story-map.js +1 -1
  113. package/dist/cdn/components/tab-set.js +1 -1
  114. package/dist/cdn/components/text-reader.js +2 -2
  115. package/dist/cdn/components/theme-catalog.js +28 -0
  116. package/dist/cdn/components/theme-export.js +20 -12
  117. package/dist/cdn/components/theme-import.js +44 -0
  118. package/dist/cdn/components/theme-picker.js +29 -26
  119. package/dist/cdn/components/time-index.js +2 -2
  120. package/dist/cdn/components/time-picker.js +1 -1
  121. package/dist/cdn/components/toast-msg.js +3 -3
  122. package/dist/cdn/components/token-specimen.js +14 -14
  123. package/dist/cdn/components/tool-tip.js +1 -1
  124. package/dist/cdn/components/topic-map.js +3 -3
  125. package/dist/cdn/components/traceability-matrix.js +3 -0
  126. package/dist/cdn/components/trust-filter.js +3 -3
  127. package/dist/cdn/components/type-specimen.js +15 -15
  128. package/dist/cdn/components/user-journey.js +63 -70
  129. package/dist/cdn/components/user-persona.js +75 -13
  130. package/dist/cdn/components/user-story.js +12 -11
  131. package/dist/cdn/components/version-switcher.js +17 -0
  132. package/dist/cdn/components/video-player.js +3 -3
  133. package/dist/cdn/components/watch-wc.js +2 -2
  134. package/dist/cdn/components/week-view.js +1 -1
  135. package/dist/cdn/components/work-item.js +29 -28
  136. package/dist/cdn/components/youtube-player.js +1 -1
  137. package/dist/cdn/icons/bold.css +17 -0
  138. package/dist/cdn/icons/bold.json +1 -0
  139. package/dist/cdn/icons/custom.css +6 -0
  140. package/dist/cdn/icons/custom.json +1 -0
  141. package/dist/cdn/icons/lucide.css +1914 -0
  142. package/dist/cdn/icons/lucide.json +1 -0
  143. package/dist/cdn/icons/mage.css +17 -0
  144. package/dist/cdn/icons/mage.json +1 -0
  145. package/dist/cdn/icons/phosphor.css +17 -0
  146. package/dist/cdn/icons/phosphor.json +1 -0
  147. package/dist/cdn/icons/tabler.css +17 -0
  148. package/dist/cdn/icons/tabler.json +1 -0
  149. package/dist/cdn/packs/design-system.full.js +59 -51
  150. package/dist/cdn/packs/effects.full.js +1 -1
  151. package/dist/cdn/packs/icons.effects.js +1 -1
  152. package/dist/cdn/packs/icons.full.js +1 -1
  153. package/dist/cdn/packs/kawaii.full.css +1 -1
  154. package/dist/cdn/packs/kawaii.full.js +6 -6
  155. package/dist/cdn/packs/kawaii.theme.css +1 -1
  156. package/dist/cdn/packs/manifest.json +11 -11
  157. package/dist/cdn/packs/ui.full.css +1 -1
  158. package/dist/cdn/packs/ui.full.js +54 -51
  159. package/dist/cdn/packs/ux-planning.full.css +1 -1
  160. package/dist/cdn/packs/ux-planning.full.js +318 -243
  161. package/dist/cdn/themes/8bit.css +1 -1
  162. package/dist/cdn/themes/8bit.tokens.json +662 -0
  163. package/dist/cdn/themes/alpha1999-dark.tokens.json +693 -0
  164. package/dist/cdn/themes/alpha1999.css +1 -1
  165. package/dist/cdn/themes/alpha1999.tokens.json +869 -0
  166. package/dist/cdn/themes/anthropic.css +2 -0
  167. package/dist/cdn/themes/anthropic.tokens.json +564 -0
  168. package/dist/cdn/themes/art-deco-dark.tokens.json +407 -0
  169. package/dist/cdn/themes/art-deco.css +1 -1
  170. package/dist/cdn/themes/art-deco.tokens.json +581 -0
  171. package/dist/cdn/themes/bauhaus-dark.tokens.json +260 -0
  172. package/dist/cdn/themes/bauhaus.css +1 -1
  173. package/dist/cdn/themes/bauhaus.tokens.json +589 -0
  174. package/dist/cdn/themes/brutalist-dark.tokens.json +503 -0
  175. package/dist/cdn/themes/brutalist.tokens.json +677 -0
  176. package/dist/cdn/themes/catalog/atlassian.tokens.json +303 -0
  177. package/dist/cdn/themes/catalog/bootstrap.tokens.json +304 -0
  178. package/dist/cdn/themes/catalog/carbon.tokens.json +301 -0
  179. package/dist/cdn/themes/catalog/catppuccin-mocha.tokens.json +301 -0
  180. package/dist/cdn/themes/catalog/govuk.tokens.json +301 -0
  181. package/dist/cdn/themes/catalog/manifest.json +132 -0
  182. package/dist/cdn/themes/catalog/material.tokens.json +289 -0
  183. package/dist/cdn/themes/catalog/salesforce.tokens.json +301 -0
  184. package/dist/cdn/themes/catalog/tailwind.tokens.json +302 -0
  185. package/dist/cdn/themes/catppuccin-frappe.css +1 -1
  186. package/dist/cdn/themes/catppuccin-frappe.tokens.json +608 -0
  187. package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +472 -0
  188. package/dist/cdn/themes/catppuccin-latte.css +1 -1
  189. package/dist/cdn/themes/catppuccin-latte.tokens.json +608 -0
  190. package/dist/cdn/themes/catppuccin-macchiato.css +1 -1
  191. package/dist/cdn/themes/catppuccin-macchiato.tokens.json +608 -0
  192. package/dist/cdn/themes/catppuccin-mocha.tokens.json +608 -0
  193. package/dist/cdn/themes/classic-dark.tokens.json +503 -0
  194. package/dist/cdn/themes/classic.tokens.json +640 -0
  195. package/dist/cdn/themes/claymorphism-dark.tokens.json +493 -0
  196. package/dist/cdn/themes/claymorphism.css +1 -1
  197. package/dist/cdn/themes/claymorphism.tokens.json +626 -0
  198. package/dist/cdn/themes/clinical-dark.tokens.json +472 -0
  199. package/dist/cdn/themes/clinical.tokens.json +608 -0
  200. package/dist/cdn/themes/cottagecore-dark.tokens.json +412 -0
  201. package/dist/cdn/themes/cottagecore.css +1 -1
  202. package/dist/cdn/themes/cottagecore.tokens.json +544 -0
  203. package/dist/cdn/themes/cyber.tokens.json +668 -0
  204. package/dist/cdn/themes/dawn-dark.tokens.json +472 -0
  205. package/dist/cdn/themes/dawn.css +1 -1
  206. package/dist/cdn/themes/dawn.tokens.json +608 -0
  207. package/dist/cdn/themes/dracula.tokens.json +534 -0
  208. package/dist/cdn/themes/dusk.tokens.json +533 -0
  209. package/dist/cdn/themes/editorial-dark.tokens.json +400 -0
  210. package/dist/cdn/themes/editorial.tokens.json +690 -0
  211. package/dist/cdn/themes/financial-dark.tokens.json +472 -0
  212. package/dist/cdn/themes/financial.css +1 -1
  213. package/dist/cdn/themes/financial.tokens.json +607 -0
  214. package/dist/cdn/themes/genai.tokens.json +534 -0
  215. package/dist/cdn/themes/glassmorphism-dark.tokens.json +489 -0
  216. package/dist/cdn/themes/glassmorphism.css +1 -1
  217. package/dist/cdn/themes/glassmorphism.tokens.json +632 -0
  218. package/dist/cdn/themes/government-dark.tokens.json +472 -0
  219. package/dist/cdn/themes/government.tokens.json +608 -0
  220. package/dist/cdn/themes/gruvbox-dark.tokens.json +472 -0
  221. package/dist/cdn/themes/gruvbox.tokens.json +608 -0
  222. package/dist/cdn/themes/high-noon-dark.tokens.json +397 -0
  223. package/dist/cdn/themes/high-noon.tokens.json +533 -0
  224. package/dist/cdn/themes/ibm.css +2 -0
  225. package/dist/cdn/themes/ibm.tokens.json +568 -0
  226. package/dist/cdn/themes/kawaii-dark.tokens.json +549 -0
  227. package/dist/cdn/themes/kawaii.css +1 -1
  228. package/dist/cdn/themes/kawaii.tokens.json +641 -0
  229. package/dist/cdn/themes/magna-dark.tokens.json +482 -0
  230. package/dist/cdn/themes/magna.css +1 -1
  231. package/dist/cdn/themes/magna.tokens.json +632 -0
  232. package/dist/cdn/themes/manifest.json +162 -62
  233. package/dist/cdn/themes/mcdonalds.css +2 -0
  234. package/dist/cdn/themes/mcdonalds.tokens.json +533 -0
  235. package/dist/cdn/themes/midnight.tokens.json +534 -0
  236. package/dist/cdn/themes/minimal-dark.tokens.json +294 -0
  237. package/dist/cdn/themes/minimal.tokens.json +494 -0
  238. package/dist/cdn/themes/modern-dark.tokens.json +490 -0
  239. package/dist/cdn/themes/modern.tokens.json +573 -0
  240. package/dist/cdn/themes/nes-dark.tokens.json +564 -0
  241. package/dist/cdn/themes/nes.css +1 -1
  242. package/dist/cdn/themes/nes.tokens.json +687 -0
  243. package/dist/cdn/themes/neumorphism-dark.tokens.json +471 -0
  244. package/dist/cdn/themes/neumorphism.css +1 -1
  245. package/dist/cdn/themes/neumorphism.tokens.json +589 -0
  246. package/dist/cdn/themes/nord-dark.tokens.json +484 -0
  247. package/dist/cdn/themes/nord.tokens.json +619 -0
  248. package/dist/cdn/themes/organic-dark.tokens.json +532 -0
  249. package/dist/cdn/themes/organic.tokens.json +685 -0
  250. package/dist/cdn/themes/rose-pine-dark.tokens.json +472 -0
  251. package/dist/cdn/themes/rose-pine.tokens.json +608 -0
  252. package/dist/cdn/themes/rough-dark.tokens.json +515 -0
  253. package/dist/cdn/themes/rough.css +1 -1
  254. package/dist/cdn/themes/rough.tokens.json +650 -0
  255. package/dist/cdn/themes/solarized-dark.tokens.json +397 -0
  256. package/dist/cdn/themes/solarized.tokens.json +532 -0
  257. package/dist/cdn/themes/starbucks.css +2 -0
  258. package/dist/cdn/themes/starbucks.tokens.json +593 -0
  259. package/dist/cdn/themes/startup-dark.tokens.json +522 -0
  260. package/dist/cdn/themes/startup.css +1 -1
  261. package/dist/cdn/themes/startup.tokens.json +607 -0
  262. package/dist/cdn/themes/super2026-dark.tokens.json +667 -0
  263. package/dist/cdn/themes/super2026.tokens.json +863 -0
  264. package/dist/cdn/themes/swiss-dark.tokens.json +390 -0
  265. package/dist/cdn/themes/swiss.tokens.json +750 -0
  266. package/dist/cdn/themes/terminal.css +1 -1
  267. package/dist/cdn/themes/terminal.tokens.json +689 -0
  268. package/dist/cdn/themes/tokyo-night-dark.tokens.json +472 -0
  269. package/dist/cdn/themes/tokyo-night.tokens.json +608 -0
  270. package/dist/cdn/themes/vaporwave-dark.tokens.json +413 -0
  271. package/dist/cdn/themes/vaporwave.tokens.json +549 -0
  272. package/dist/cdn/themes/win9x-dark.tokens.json +563 -0
  273. package/dist/cdn/themes/win9x.tokens.json +700 -0
  274. package/dist/cdn/vanilla-breeze-charts.css +1 -1
  275. package/dist/cdn/vanilla-breeze-charts.js +58 -36
  276. package/dist/cdn/vanilla-breeze-core.css +1 -1
  277. package/dist/cdn/vanilla-breeze-core.js +246 -51
  278. package/dist/cdn/vanilla-breeze-dev.js +1 -1
  279. package/dist/cdn/vanilla-breeze-extras.js +90 -80
  280. package/dist/cdn/vanilla-breeze.css +1 -1
  281. package/dist/cdn/vanilla-breeze.js +1370 -405
  282. package/package.json +12 -4
@@ -1,4 +1,4 @@
1
- var J=window.matchMedia("(prefers-reduced-motion: reduce)");var M=new Map;function N(t,e,n={}){let i=n.priority??10,o={impl:e,bundle:n.bundle,contract:n.contract,priority:i},r=M.get(t);if(customElements.get(t)){if(!r||r.priority>=i){r&&r.priority===i&&r.impl!==e&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=i){r.priority===i&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}M.set(t,o),customElements.define(t,e)}var y=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let e of this.#t)e();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,i,o){e.addEventListener(n,i,o),this.#t.push(()=>e.removeEventListener(n,i,o))}setup(){}teardown(){}};var B="https://vanilla-breeze.com/specs/canonical-document-v1",F=new Set(["SCRIPT","STYLE","TEMPLATE","NOSCRIPT","NAV","ASIDE","HEADER","FOOTER","FIGCAPTION","PAGE-INFO","CHANGE-SET","PAGE-TOC","PAGE-TOOLS","PAGE-STATS","CONTENT-LENS","BUTTON","DIALOG","MENU","FORM","DEL"]),U=new Set(["ARTICLE","SECTION","ASIDE","NAV","HEADER","FOOTER","DIV","MAIN","HGROUP","H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","HR","OL","UL","LI","DL","DT","DD","TABLE","THEAD","TBODY","TFOOT","TR","TD","TH","CAPTION","FIGURE","DETAILS","SUMMARY","ADDRESS","FORM","FIELDSET","LEGEND"]),V=new Set(["PRE","TEXTAREA"]);function _(t){return!t||t.nodeType!==1?!1:!!(F.has(t.tagName)||t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true"||t.getAttribute("data-signable")==="false")}function D(t,e,n){if(_(t))return;let i=U.has(t.tagName),o=n||V.has(t.tagName);for(let r of t.childNodes)if(r.nodeType===3){let s=r.nodeValue||"";if(!s)continue;if(o)x(e,s.normalize("NFC"));else{let a=s.normalize("NFC").replace(/\s+/g," ");if(a===""||a===" "&&(e.text===""||e.text.endsWith(" ")||e.text.endsWith(`
1
+ var J=window.matchMedia("(prefers-reduced-motion: reduce)");var M=new Map;function N(t,e,n={}){let i=n.priority??10,o={impl:e,bundle:n.bundle,contract:n.contract,priority:i},r=M.get(t);if(customElements.get(t)){if(!r||r.priority>=i){r&&r.priority===i&&r.impl!==e&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=i){r.priority===i&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}M.set(t,o),customElements.define(t,e)}var y=class extends HTMLElement{#n=[];#e;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 e of this.#n)e();this.#n=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,i,o){e.addEventListener(n,i,o),this.#n.push(()=>e.removeEventListener(n,i,o))}setup(){}teardown(){}setState(e,n){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{n?i.add(e):i.delete(e)}catch{let o=`--${e}`;n?i.add(o):i.delete(o)}}_adoptInternals(e){this.#e||(this.#e=e)}};var B="https://vanilla-breeze.com/specs/canonical-document-v1",F=new Set(["SCRIPT","STYLE","TEMPLATE","NOSCRIPT","NAV","ASIDE","HEADER","FOOTER","FIGCAPTION","PAGE-INFO","CHANGE-SET","PAGE-TOC","PAGE-TOOLS","PAGE-STATS","CONTENT-LENS","BUTTON","DIALOG","MENU","FORM","DEL"]),U=new Set(["ARTICLE","SECTION","ASIDE","NAV","HEADER","FOOTER","DIV","MAIN","HGROUP","H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","HR","OL","UL","LI","DL","DT","DD","TABLE","THEAD","TBODY","TFOOT","TR","TD","TH","CAPTION","FIGURE","DETAILS","SUMMARY","ADDRESS","FORM","FIELDSET","LEGEND"]),_=new Set(["PRE","TEXTAREA"]);function V(t){return!t||t.nodeType!==1?!1:!!(F.has(t.tagName)||t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true"||t.getAttribute("data-signable")==="false")}function D(t,e,n){if(V(t))return;let i=U.has(t.tagName),o=n||_.has(t.tagName);for(let r of t.childNodes)if(r.nodeType===3){let s=r.nodeValue||"";if(!s)continue;if(o)x(e,s.normalize("NFC"));else{let a=s.normalize("NFC").replace(/\s+/g," ");if(a===""||a===" "&&(e.text===""||e.text.endsWith(" ")||e.text.endsWith(`
2
2
  `)))continue;x(e,a)}}else if(r.nodeType===1){if(r.tagName==="BR"){w(e,`
3
3
  `);continue}D(r,e,o)}i&&w(e,`
4
4
 
@@ -12,7 +12,7 @@ var J=window.matchMedia("(prefers-reduced-motion: reduce)");var M=new Map;functi
12
12
  `;return}e===`
13
13
  `&&t.text.endsWith(`
14
14
 
15
- `)||(t.text+=e)}}function G(t){let e=[...t.querySelectorAll("[data-signable]")],n=e.filter(o=>!e.some(r=>r!==o&&r.contains(o))),i={text:""};for(let o of n)D(o,i,!1);return i.text.replace(/^\s+/,"").replace(/\s+$/,"")}function f(t,e){return t.querySelector(`meta[name="${$(e)}"]`)?.getAttribute("content")||""}function E(t,e){return t.querySelector(`meta[property="${$(e)}"]`)?.getAttribute("content")||""}function z(t,e){return t.querySelector(`meta[itemprop="${$(e)}"]`)?.getAttribute("content")||""}function R(t,e){return t.querySelector(`link[rel="${$(e)}"]`)?.getAttribute("href")||""}function $(t){return String(t).replace(/[^a-zA-Z0-9:_\-/]/g,"")}function j(t){if(!t)return"";try{let e=new URL(t);e.search="",e.hash="";let n=`${e.protocol}//${e.hostname.toLowerCase()}`;return e.port&&(n+=`:${e.port}`),n+=e.pathname,n}catch{return t}}function O(t){if(!t)return"";let e=String(t).match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:""}function K(t){return E(t,"og:title")||t.title||""}function W(t){let e=f(t,"keywords");return e?e.split(",").map(n=>n.trim()).filter(Boolean):[]}function X(t){let e=new Set;for(let n of t.querySelectorAll('meta[name="concept"]')){let i=(n.getAttribute("content")||"").trim();i&&e.add(i)}return[...e].sort()}function Y(t){return R(t,"license")||f(t,"license")}function H(t,e={}){let n=e.url??t?.location?.href??"",i=O(E(t,"article:published_time")),o=O(f(t,"last-modified")||E(t,"article:modified_time"));return{"@context":B,"@version":1,url:j(n),title:K(t),author:f(t,"author"),authorUrl:E(t,"article:author")||R(t,"author"),published:i,modified:o,version:z(t,"version"),keywords:W(t),concepts:X(t),provenance:f(t,"vb:provenance"),review:f(t,"vb:review"),status:f(t,"vb:status"),license:Y(t),content:G(t)}}function q(t){return JSON.stringify(t)}var C=class t extends y{setup(){this.hasAttribute("auto")&&this.#l(),this.#t(),this.#r(),this.#i(),this.#o()}#t(){for(let e of this.querySelectorAll("time[data-relative]")){let n=e.getAttribute("datetime");if(!n)continue;let i=t.#n(new Date(n));i&&(e.textContent=i)}}static#n(e){let i=Date.now()-e.getTime();if(i<0)return null;let o=Math.floor(i/1e3),r=Math.floor(o/60),s=Math.floor(r/60),a=Math.floor(s/24);return a>365?`${Math.floor(a/365)} year${Math.floor(a/365)!==1?"s":""} ago`:a>30?`${Math.floor(a/30)} month${Math.floor(a/30)!==1?"s":""} ago`:a>0?`${a} day${a!==1?"s":""} ago`:s>0?`${s} hour${s!==1?"s":""} ago`:r>0?`${r} minute${r!==1?"s":""} ago`:"just now"}#r(){let e=this.querySelector("[data-reading-time]");if(!e)return;let n=document.querySelectorAll("[data-signable]");if(!n.length)return;let i=0;for(let r of n){let s=r.textContent?.trim()||"";i+=s.split(/\s+/).filter(Boolean).length}let o=Math.max(1,Math.ceil(i/200));e.textContent=`~${o} min`}#i(){let e=!!document.querySelector('meta[name="vb:provenance"], meta[name="author"]'),n=e?"declared":"undeclared",i=this.querySelector(".page-info-badge");i&&i.setAttribute("data-trust",n),this.dispatchEvent(new CustomEvent("page-info:verified",{detail:{status:n,tier:e?1:0},bubbles:!0}))}async#o(){let n=document.querySelector('meta[name="vb:signature"]')?.content;if(!n)return;let i=document.querySelector('meta[name="vb:signature-algorithm"]')?.content;if(i&&i!=="ECDSA-P256-SHA256"){this.#e("failed",{reason:`unsupported-algorithm:${i}`});return}let o=document.querySelector('link[rel="author-key"]')?.getAttribute("href");if(!o){this.#e("failed",{reason:"missing-author-key"});return}let r;try{let c=new URL(o,document.baseURI),u=await fetch(c,{credentials:"omit"});if(!u.ok)throw new Error(`status ${u.status}`);let l=await u.json(),h={kty:l.kty,crv:l.crv,x:l.x,y:l.y,use:l.use||"sig",key_ops:["verify"]};r=await crypto.subtle.importKey("jwk",h,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"])}catch(c){this.#e("key-unavailable",{reason:c.message});return}let s;try{let c=document.querySelector('link[rel="canonical"]')?.href||document.location.href;s=q(H(document,{url:c}))}catch(c){this.#e("failed",{reason:`canonicalize:${c.message}`});return}let a;try{let c=new TextEncoder().encode(s),u=Uint8Array.from(atob(n),l=>l.charCodeAt(0));a=await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},r,u,c)}catch(c){this.#e("failed",{reason:`verify:${c.message}`});return}this.#e(a?"verified":"failed",{reason:a?"ok":"mismatch"})}#e(e,n={}){let o={undeclared:0,declared:1,"domain-anchored":2,verified:3,failed:-1,"key-unavailable":-2}[e]??0,r=this.querySelector(".page-info-badge");if(r){r.setAttribute("data-trust",e);let s=r.getAttribute("aria-label")||"";e==="verified"&&!s.includes("verified")?r.setAttribute("aria-label",`${s} \u2014 verified`.trim()):e==="failed"?r.setAttribute("aria-label",`${s} \u2014 verification failed`.trim()):e==="key-unavailable"&&r.setAttribute("aria-label",`${s} \u2014 author key unavailable`.trim())}this.dispatchEvent(new CustomEvent("page-info:verified",{detail:{status:e,tier:o,...n},bubbles:!0}))}static#a={human:"Human written","ai-assisted":"Human-written, AI-assisted","ai-generated":"AI-generated",translated:"Translated",synthesized:"Synthesized from sources",migrated:"Migrated content"};static#s={unreviewed:"Unreviewed","fact-checked":"Fact-checked","editor-reviewed":"Editor-reviewed"};static#c={draft:"Draft",published:"Published",archived:"Archived"};static#d(e){if(!e)return"";let n=String(e).trim().split(/\s+/).filter(Boolean);return n.length?n.map(o=>t.#a[o]||o).join(" \xB7 "):""}#l(){let e=d=>document.querySelector(`meta[name="${d}"]`)?.content,n=d=>document.querySelector(`meta[property="${d}"]`)?.content,i=d=>document.querySelector(`meta[itemprop="${d}"]`)?.content,o=d=>document.querySelector(`link[rel="${d}"]`)?.href,r=e("author"),s=n("article:author")||o("author"),a=e("last-modified")||n("article:modified_time"),c=n("article:published_time"),u=e("keywords"),l=e("license"),h=o("license"),p=i("version"),g=e("vb:provenance"),v=e("vb:review"),m=e("vb:status"),S=e("vb:ai-tools"),L=e("vb:version-url"),A=Array.from(document.querySelectorAll('meta[name="concept"]')).map(d=>d.getAttribute("content")?.trim()).filter(Boolean),b=t.#d(g),k=t.#s[v]||v||"",T=t.#c[m]||m||"",P=g||S||v||l,I=a||c||p;this.innerHTML=`
15
+ `)||(t.text+=e)}}function G(t){let e=[...t.querySelectorAll("[data-signable]")],n=e.filter(o=>!e.some(r=>r!==o&&r.contains(o))),i={text:""};for(let o of n)D(o,i,!1);return i.text.replace(/^\s+/,"").replace(/\s+$/,"")}function f(t,e){return t.querySelector(`meta[name="${E(e)}"]`)?.getAttribute("content")||""}function $(t,e){return t.querySelector(`meta[property="${E(e)}"]`)?.getAttribute("content")||""}function z(t,e){return t.querySelector(`meta[itemprop="${E(e)}"]`)?.getAttribute("content")||""}function R(t,e){return t.querySelector(`link[rel="${E(e)}"]`)?.getAttribute("href")||""}function E(t){return String(t).replace(/[^a-zA-Z0-9:_\-/]/g,"")}function j(t){if(!t)return"";try{let e=new URL(t);e.search="",e.hash="";let n=`${e.protocol}//${e.hostname.toLowerCase()}`;return e.port&&(n+=`:${e.port}`),n+=e.pathname,n}catch{return t}}function O(t){if(!t)return"";let e=String(t).match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:""}function K(t){return $(t,"og:title")||t.title||""}function W(t){let e=f(t,"keywords");return e?e.split(",").map(n=>n.trim()).filter(Boolean):[]}function X(t){let e=new Set;for(let n of t.querySelectorAll('meta[name="concept"]')){let i=(n.getAttribute("content")||"").trim();i&&e.add(i)}return[...e].sort()}function Y(t){return R(t,"license")||f(t,"license")}function H(t,e={}){let n=e.url??t?.location?.href??"",i=O($(t,"article:published_time")),o=O(f(t,"last-modified")||$(t,"article:modified_time"));return{"@context":B,"@version":1,url:j(n),title:K(t),author:f(t,"author"),authorUrl:$(t,"article:author")||R(t,"author"),published:i,modified:o,version:z(t,"version"),keywords:W(t),concepts:X(t),provenance:f(t,"vb:provenance"),review:f(t,"vb:review"),status:f(t,"vb:status"),license:Y(t),content:G(t)}}function q(t){return JSON.stringify(t)}var C=class t extends y{setup(){this.hasAttribute("auto")&&this.#l(),this.#n(),this.#r(),this.#i(),this.#o()}#n(){for(let e of this.querySelectorAll("time[data-relative]")){let n=e.getAttribute("datetime");if(!n)continue;let i=t.#e(new Date(n));i&&(e.textContent=i)}}static#e(e){let i=Date.now()-e.getTime();if(i<0)return null;let o=Math.floor(i/1e3),r=Math.floor(o/60),s=Math.floor(r/60),a=Math.floor(s/24);return a>365?`${Math.floor(a/365)} year${Math.floor(a/365)!==1?"s":""} ago`:a>30?`${Math.floor(a/30)} month${Math.floor(a/30)!==1?"s":""} ago`:a>0?`${a} day${a!==1?"s":""} ago`:s>0?`${s} hour${s!==1?"s":""} ago`:r>0?`${r} minute${r!==1?"s":""} ago`:"just now"}#r(){let e=this.querySelector("[data-reading-time]");if(!e)return;let n=document.querySelectorAll("[data-signable]");if(!n.length)return;let i=0;for(let r of n){let s=r.textContent?.trim()||"";i+=s.split(/\s+/).filter(Boolean).length}let o=Math.max(1,Math.ceil(i/200));e.textContent=`~${o} min`}#i(){let e=!!document.querySelector('meta[name="vb:provenance"], meta[name="author"]'),n=e?"declared":"undeclared",i=this.querySelector(".page-info-badge");i&&i.setAttribute("data-trust",n),this.dispatchEvent(new CustomEvent("page-info:verified",{detail:{status:n,tier:e?1:0},bubbles:!0}))}async#o(){let n=document.querySelector('meta[name="vb:signature"]')?.content;if(!n)return;let i=document.querySelector('meta[name="vb:signature-algorithm"]')?.content;if(i&&i!=="ECDSA-P256-SHA256"){this.#t("failed",{reason:`unsupported-algorithm:${i}`});return}let o=document.querySelector('link[rel="author-key"]')?.getAttribute("href");if(!o){this.#t("failed",{reason:"missing-author-key"});return}let r;try{let c=new URL(o,document.baseURI),u=await fetch(c,{credentials:"omit"});if(!u.ok)throw new Error(`status ${u.status}`);let l=await u.json(),h={kty:l.kty,crv:l.crv,x:l.x,y:l.y,use:l.use||"sig",key_ops:["verify"]};r=await crypto.subtle.importKey("jwk",h,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"])}catch(c){this.#t("key-unavailable",{reason:c.message});return}let s;try{let c=document.querySelector('link[rel="canonical"]')?.href||document.location.href;s=q(H(document,{url:c}))}catch(c){this.#t("failed",{reason:`canonicalize:${c.message}`});return}let a;try{let c=new TextEncoder().encode(s),u=Uint8Array.from(atob(n),l=>l.charCodeAt(0));a=await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},r,u,c)}catch(c){this.#t("failed",{reason:`verify:${c.message}`});return}this.#t(a?"verified":"failed",{reason:a?"ok":"mismatch"})}#t(e,n={}){let o={undeclared:0,declared:1,"domain-anchored":2,verified:3,failed:-1,"key-unavailable":-2}[e]??0,r=this.querySelector(".page-info-badge");if(r){r.setAttribute("data-trust",e);let s=r.getAttribute("aria-label")||"";e==="verified"&&!s.includes("verified")?r.setAttribute("aria-label",`${s} \u2014 verified`.trim()):e==="failed"?r.setAttribute("aria-label",`${s} \u2014 verification failed`.trim()):e==="key-unavailable"&&r.setAttribute("aria-label",`${s} \u2014 author key unavailable`.trim())}this.dispatchEvent(new CustomEvent("page-info:verified",{detail:{status:e,tier:o,...n},bubbles:!0}))}static#a={human:"Human written","ai-assisted":"Human-written, AI-assisted","ai-generated":"AI-generated",translated:"Translated",synthesized:"Synthesized from sources",migrated:"Migrated content"};static#s={unreviewed:"Unreviewed","fact-checked":"Fact-checked","editor-reviewed":"Editor-reviewed"};static#c={draft:"Draft",published:"Published",archived:"Archived"};static#d(e){if(!e)return"";let n=String(e).trim().split(/\s+/).filter(Boolean);return n.length?n.map(o=>t.#a[o]||o).join(" \xB7 "):""}#l(){let e=d=>document.querySelector(`meta[name="${d}"]`)?.content,n=d=>document.querySelector(`meta[property="${d}"]`)?.content,i=d=>document.querySelector(`meta[itemprop="${d}"]`)?.content,o=d=>document.querySelector(`link[rel="${d}"]`)?.href,r=e("author"),s=n("article:author")||o("author"),a=e("last-modified")||n("article:modified_time"),c=n("article:published_time"),u=e("keywords"),l=e("license"),h=o("license"),p=i("version"),g=e("vb:provenance"),v=e("vb:review"),m=e("vb:status"),S=e("vb:ai-tools"),L=e("vb:version-url"),A=Array.from(document.querySelectorAll('meta[name="concept"]')).map(d=>d.getAttribute("content")?.trim()).filter(Boolean),b=t.#d(g),k=t.#s[v]||v||"",T=t.#c[m]||m||"",I=g||S||v||l,P=a||c||p;this.innerHTML=`
16
16
  <details>
17
17
  <summary>
18
18
  ${r?`
@@ -45,7 +45,7 @@ var J=window.matchMedia("(prefers-reduced-motion: reduce)");var M=new Map;functi
45
45
  <p>${s?`<a href="${s}" rel="author">${r}</a>`:r}</p>
46
46
  </section>
47
47
  `:""}
48
- ${I?`
48
+ ${P?`
49
49
  <section>
50
50
  <h2 class="page-info-section-heading">History</h2>
51
51
  <dl>
@@ -55,7 +55,7 @@ var J=window.matchMedia("(prefers-reduced-motion: reduce)");var M=new Map;functi
55
55
  </dl>
56
56
  </section>
57
57
  `:""}
58
- ${P?`
58
+ ${I?`
59
59
  <section>
60
60
  <h2 class="page-info-section-heading">How this was made</h2>
61
61
  <dl>
@@ -1,2 +1,2 @@
1
- var y=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function h(i,n,t={}){let o=t.priority??10,r={impl:n,bundle:t.bundle,contract:t.contract,priority:o},e=m.get(i);if(customElements.get(i)){if(!e||e.priority>=o){e&&e.priority===o&&e.impl!==n&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${e.bundle}" (priority ${e.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${e.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(e&&e.priority>=o){e.priority===o&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${e.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}m.set(i,r),customElements.define(i,n)}var c=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let n of this.#e)n();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(n,t,o,r){n.addEventListener(t,o,r),this.#e.push(()=>n.removeEventListener(t,o,r))}setup(){}teardown(){}};var l=class i extends c{setup(){if(this.querySelector("dl"))return;let n=this.dataset.for;if(!n)return;let t=document.getElementById(n);if(!t)return;let o=parseInt(this.dataset.wpm,10)||238,r=(this.dataset.show||"reading-time").split(",").map(a=>a.trim()),u=(t.textContent?.trim()||"").split(/\s+/).filter(Boolean).length,f=Math.max(1,Math.ceil(u/o)),d=document.createElement("dl");if(d.className="page-stats-list",r.includes("reading-time")&&d.appendChild(this.#e("Reading time",`<time datetime="PT${f}M">${f} min read</time>`)),r.includes("word-count")&&d.appendChild(this.#e("Word count",`${u.toLocaleString()} words`)),r.includes("last-modified")){let a=this.#t();if(a){let p=a.toISOString().split("T")[0],b=i.#n(a);d.appendChild(this.#e("Last updated",`<time datetime="${p}" data-relative>${b}</time>`))}}this.appendChild(d)}#e(n,t){let o=document.createElement("dl-item"),r=document.createElement("dt");r.className="visually-hidden",r.textContent=n;let e=document.createElement("dd");return e.innerHTML=t,o.appendChild(r),o.appendChild(e),o}#t(){let n=document.querySelector('meta[name="last-modified"]');if(n?.content){let o=new Date(n.content);if(!isNaN(o))return o}let t=new Date(document.lastModified);return isNaN(t)?null:t}static#n(n){let t=Date.now()-n.getTime();if(t<0)return n.toLocaleDateString();let o=Math.floor(t/1e3),r=Math.floor(o/60),e=Math.floor(r/60),s=Math.floor(e/24);return s>365?`${Math.floor(s/365)} year${Math.floor(s/365)!==1?"s":""} ago`:s>30?`${Math.floor(s/30)} month${Math.floor(s/30)!==1?"s":""} ago`:s>0?`${s} day${s!==1?"s":""} ago`:e>0?`${e} hour${e!==1?"s":""} ago`:r>0?`${r} minute${r!==1?"s":""} ago`:"just now"}};h("page-stats",l);export{l as PageStats};
1
+ var b=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function h(i,e,n={}){let t=n.priority??10,r={impl:e,bundle:n.bundle,contract:n.contract,priority:t},o=m.get(i);if(customElements.get(i)){if(!o||o.priority>=t){o&&o.priority===t&&o.impl!==e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=t){o.priority===t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${o.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}m.set(i,r),customElements.define(i,e)}var c=class extends HTMLElement{#e=[];#t;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 e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,t,r){e.addEventListener(n,t,r),this.#e.push(()=>e.removeEventListener(n,t,r))}setup(){}teardown(){}setState(e,n){this.#t||(this.#t=this.attachInternals());let t=this.#t.states;try{n?t.add(e):t.delete(e)}catch{let r=`--${e}`;n?t.add(r):t.delete(r)}}_adoptInternals(e){this.#t||(this.#t=e)}};var l=class i extends c{setup(){if(this.querySelector("dl"))return;let e=this.dataset.for;if(!e)return;let n=document.getElementById(e);if(!n)return;let t=parseInt(this.dataset.wpm||"",10)||238,r=(this.dataset.show||"reading-time").split(",").map(d=>d.trim()),u=(n.textContent?.trim()||"").split(/\s+/).filter(Boolean).length,f=Math.max(1,Math.ceil(u/t)),a=document.createElement("dl");if(a.className="page-stats-list",r.includes("reading-time")&&a.appendChild(this.#e("Reading time",`<time datetime="PT${f}M">${f} min read</time>`)),r.includes("word-count")&&a.appendChild(this.#e("Word count",`${u.toLocaleString()} words`)),r.includes("last-modified")){let d=this.#t();if(d){let p=d.toISOString().split("T")[0],y=i.#n(d);a.appendChild(this.#e("Last updated",`<time datetime="${p}" data-relative>${y}</time>`))}}this.appendChild(a)}#e(e,n){let t=document.createElement("dl-item"),r=document.createElement("dt");r.className="visually-hidden",r.textContent=e;let o=document.createElement("dd");return o.innerHTML=n,t.appendChild(r),t.appendChild(o),t}#t(){let e=document.querySelector('meta[name="last-modified"]');if(e?.content){let t=new Date(e.content);if(!isNaN(t.getTime()))return t}let n=new Date(document.lastModified);return isNaN(n.getTime())?null:n}static#n(e){let n=Date.now()-e.getTime();if(n<0)return e.toLocaleDateString();let t=Math.floor(n/1e3),r=Math.floor(t/60),o=Math.floor(r/60),s=Math.floor(o/24);return s>365?`${Math.floor(s/365)} year${Math.floor(s/365)!==1?"s":""} ago`:s>30?`${Math.floor(s/30)} month${Math.floor(s/30)!==1?"s":""} ago`:s>0?`${s} day${s!==1?"s":""} ago`:o>0?`${o} hour${o!==1?"s":""} ago`:r>0?`${r} minute${r!==1?"s":""} ago`:"just now"}};h("page-stats",l);export{l as PageStats};
2
2
  //# sourceMappingURL=page-stats.js.map
@@ -1,2 +1,2 @@
1
- var w=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function y(a,e,t={}){let i=t.priority??10,s={impl:e,bundle:t.bundle,contract:t.contract,priority:i},n=g.get(a);if(customElements.get(a)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==e&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${a}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${n.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}g.set(a,s),customElements.define(a,e)}var f=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let e of this.#t)e();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,i,s){e.addEventListener(t,i,s),this.#t.push(()=>e.removeEventListener(t,i,s))}setup(){}teardown(){}};var p=class extends f{#t;#i=[];#n=new Map;#a;#e;#r;#o=!1;setup(){requestAnimationFrame(()=>this.#c())}teardown(){this.#t?.disconnect(),clearTimeout(this.#r)}#c(){this.#o=this.#h(),this.#o?this.#u():this.#y(),this.#w(),this.#f(),this.#b()}#h(){return this.querySelector("nav, details")!==null}#u(){this.#e=this.querySelector("details");let e=this.querySelectorAll('a[href^="#"]');for(let t of e){let i=t.getAttribute("href");if(!i)continue;let s=i.slice(1);if(s){let n=document.getElementById(s);n&&(this.#i.push(n),this.#n.set(s,t),t.classList.contains("link")||t.classList.add("link"),t.addEventListener("click",c=>{c.preventDefault(),this.#d(n)}))}}}#f(){this.#a=window.matchMedia("(min-width: 64rem)"),this.listen(this.#a,"change",this.#m),this.listen(window,"resize",this.#p)}#m=e=>{e.matches&&this.#e&&(this.#e.open=!0)};#p=()=>{clearTimeout(this.#r),this.#r=setTimeout(()=>this.#s(),150)};#b(){this.listen(window,"hashchange",this.#g),this.#s()}#g=()=>{this.#s()};#s(){let e=window.location.hash.slice(1);e&&this.#n.has(e)&&this.#l(e)}#l(e){for(let i of this.#n.values())i.classList.remove("active"),i.removeAttribute("aria-current");let t=this.#n.get(e);t&&(t.classList.add("active"),t.setAttribute("aria-current","true"))}#y(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(r=>r.trim().toLowerCase()),t=this.getAttribute("scope")||"main",i=this.getAttribute("title")||"On this page",s=document.querySelector(t);if(!s||(this.#i=Array.from(s.querySelectorAll(e.join(","))).filter(r=>r.id).filter(r=>!r.hasAttribute("data-toc-ignore")&&!r.closest("[data-toc-ignore]")),this.#i.length===0))return;let n={depth:-1,children:[]},c=[n];for(let r of this.#i){let l=e.indexOf(r.tagName.toLowerCase());for(;c[c.length-1].depth>=l;)c.pop();let o={heading:r,depth:l,children:[]};c[c.length-1].children.push(o),c.push(o)}let b=r=>{let l=document.createElement("ul");l.className="list";for(let o of r){let h=document.createElement("li");h.className="item",h.dataset.level=String(o.depth);let d=document.createElement("a");d.href=`#${o.heading.id}`,d.className="link",d.textContent=this.#v(o.heading),d.addEventListener("click",v=>{v.preventDefault(),this.#d(o.heading)}),h.appendChild(d),o.children.length&&h.appendChild(b(o.children)),l.appendChild(h),this.#n.set(o.heading.id,d)}return l};this.#e=document.createElement("details"),this.#e.className="details",this.#e.open=!0;let m=document.createElement("summary");m.className="summary",m.textContent=i,this.#e.appendChild(m);let u=document.createElement("nav");u.className="nav",u.setAttribute("aria-label",i),u.appendChild(b(n.children)),this.#e.appendChild(u),this.appendChild(this.#e)}#v(e){let t=e.cloneNode(!0);return t.querySelectorAll(".heading-anchor").forEach(s=>s.remove()),t.textContent.trim()}#d(e){let t=new URL(window.location.href);t.hash=e.id,window.history.pushState(null,"",t),e.scrollIntoView({behavior:"smooth",block:"start"}),e.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:e.id}}))}#w(){if(this.#i.length===0)return;let e=new Set;this.#t=new IntersectionObserver(t=>{for(let i of t)i.isIntersecting?e.add(i.target.id):e.delete(i.target.id);this.#E(e)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let t of this.#i)this.#t.observe(t)}#E(e){for(let t of this.#i)if(e.has(t.id)){this.#l(t.id);return}this.#s()}refresh(){this.#o||(this.innerHTML=""),this.#n.clear(),this.#i=[],this.#t?.disconnect(),this.#c()}};y("page-toc",p);export{p as PageToc};
1
+ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function y(a,e,t={}){let i=t.priority??10,n={impl:e,bundle:t.bundle,contract:t.contract,priority:i},s=g.get(a);if(customElements.get(a)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${a}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${t.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 "${t.bundle}" (first wins at equal priority).`);return}g.set(a,n),customElements.define(a,e)}var f=class extends HTMLElement{#i=[];#e;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 e of this.#i)e();this.#i=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,i,n){e.addEventListener(t,i,n),this.#i.push(()=>e.removeEventListener(t,i,n))}setup(){}teardown(){}setState(e,t){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{t?i.add(e):i.delete(e)}catch{let n=`--${e}`;t?i.add(n):i.delete(n)}}_adoptInternals(e){this.#e||(this.#e=e)}};var p=class extends f{#i;#e=[];#s=new Map;#a;#t;#r;#o=!1;setup(){requestAnimationFrame(()=>this.#c())}get entries(){return this.#e.map(e=>({id:e.id||void 0,text:e.textContent?.trim()||"",level:parseInt(e.tagName.slice(1),10)||0}))}teardown(){this.#i?.disconnect(),clearTimeout(this.#r)}#c(){this.#o=this.#h(),this.#o?this.#u():this.#y(),this.#w(),this.#f(),this.#b()}#h(){return this.querySelector("nav, details")!==null}#u(){this.#t=this.querySelector("details");let e=this.querySelectorAll('a[href^="#"]');for(let t of e){let i=t.getAttribute("href");if(!i)continue;let n=i.slice(1);if(n){let s=document.getElementById(n);s&&(this.#e.push(s),this.#s.set(n,t),t.classList.contains("link")||t.classList.add("link"),t.addEventListener("click",c=>{c.preventDefault(),this.#d(s)}))}}}#f(){this.#a=window.matchMedia("(min-width: 64rem)"),this.listen(this.#a,"change",this.#m),this.listen(window,"resize",this.#p)}#m=e=>{e.matches&&this.#t&&(this.#t.open=!0)};#p=()=>{clearTimeout(this.#r),this.#r=setTimeout(()=>this.#n(),150)};#b(){this.listen(window,"hashchange",this.#g),this.#n()}#g=()=>{this.#n()};#n(){let e=window.location.hash.slice(1);e&&this.#s.has(e)&&this.#l(e)}#l(e){for(let i of this.#s.values())i.classList.remove("active"),i.removeAttribute("aria-current");let t=this.#s.get(e);t&&(t.classList.add("active"),t.setAttribute("aria-current","true"))}#y(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(r=>r.trim().toLowerCase()),t=this.getAttribute("scope")||"main",i=this.getAttribute("title")||"On this page",n=document.querySelector(t);if(!n||(this.#e=Array.from(n.querySelectorAll(e.join(","))).filter(r=>r.id).filter(r=>!r.hasAttribute("data-toc-ignore")&&!r.closest("[data-toc-ignore]")),this.#e.length===0))return;let s={depth:-1,children:[]},c=[s];for(let r of this.#e){let l=e.indexOf(r.tagName.toLowerCase());for(;c[c.length-1].depth>=l;)c.pop();let o={heading:r,depth:l,children:[]};c[c.length-1].children.push(o),c.push(o)}let b=r=>{let l=document.createElement("ul");l.className="list";for(let o of r){let h=document.createElement("li");h.className="item",h.dataset.level=String(o.depth);let d=document.createElement("a");d.href=`#${o.heading.id}`,d.className="link",d.textContent=this.#v(o.heading),d.addEventListener("click",v=>{v.preventDefault(),this.#d(o.heading)}),h.appendChild(d),o.children.length&&h.appendChild(b(o.children)),l.appendChild(h),this.#s.set(o.heading.id,d)}return l};this.#t=document.createElement("details"),this.#t.className="details",this.#t.open=!0;let m=document.createElement("summary");m.className="summary",m.textContent=i,this.#t.appendChild(m);let u=document.createElement("nav");u.className="nav",u.setAttribute("aria-label",i),u.appendChild(b(s.children)),this.#t.appendChild(u),this.appendChild(this.#t)}#v(e){let t=e.cloneNode(!0);return t.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),t.textContent.trim()}#d(e){let t=new URL(window.location.href);t.hash=e.id,window.history.pushState(null,"",t),e.scrollIntoView({behavior:"smooth",block:"start"}),e.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:e.id}}))}#w(){if(this.#e.length===0)return;let e=new Set;this.#i=new IntersectionObserver(t=>{for(let i of t)i.isIntersecting?e.add(i.target.id):e.delete(i.target.id);this.#E(e)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let t of this.#e)this.#i.observe(t)}#E(e){for(let t of this.#e)if(e.has(t.id)){this.#l(t.id);return}this.#n()}refresh(){this.#o||(this.innerHTML=""),this.#s.clear(),this.#e=[],this.#i?.disconnect(),this.#c()}};y("page-toc",p);export{p as PageToc};
2
2
  //# sourceMappingURL=page-toc.js.map
@@ -1,2 +1,2 @@
1
- var h=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function c(o,t,e={}){let i=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=l.get(o);if(customElements.get(o)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> 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 <${o}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}l.set(o,n),customElements.define(o,t)}var r=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),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,n){t.addEventListener(e,i,n),this.#t.push(()=>t.removeEventListener(e,i,n))}setup(){}teardown(){}};var d=0,a=class extends r{#t=null;#e=null;#o=null;#i=!1;#s=null;setup(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.getAttribute("aria-label")||this.setAttribute("aria-label","Page tools"),this.#a(),this.#l();let t=this.dataset.breakpoint||"48rem";this.#o=matchMedia(`(max-width: ${t})`),this.#n(this.#o),this.listen(this.#o,"change",e=>this.#n(e)),this.#s=new MutationObserver(e=>{for(let i of e)i.type==="childList"&&this.#i&&this.#d()}),this.#s.observe(this,{childList:!0})}teardown(){this.#s?.disconnect(),this.#s=null,this.#i&&this.#r(),this.#t?.remove(),this.#e?.remove(),this.#t=null,this.#e=null}get tools(){return Array.from(this.children).filter(t=>!t.hasAttribute("data-page-tools-internal"))}#a(){if((this.dataset.orientation||"auto")!=="auto")return;let i=(this.dataset.position||"sticky")==="inline"?"horizontal":"vertical";this.dataset.resolvedOrientation=i}#l(){let t=`pt-${++d}`,e=this.dataset.fabIcon||"ellipsis-vertical",i=this.dataset.fabLabel||"Page tools";this.#t=document.createElement("button"),this.#t.className="page-tools-fab",this.#t.setAttribute("data-page-tools-internal",""),this.#t.setAttribute("popovertarget",t),this.#t.setAttribute("aria-label",i),this.#t.hidden=!0,this.#t.innerHTML=`<icon-wc name="${e}" size="md"></icon-wc>`,this.#e=document.createElement("section"),this.#e.className="page-tools-popover",this.#e.setAttribute("data-page-tools-internal",""),this.#e.id=t,this.#e.setAttribute("popover",""),this.#e.setAttribute("aria-label",i),this.#e.hidden=!0,this.appendChild(this.#t),this.appendChild(this.#e),this.listen(this.#e,"toggle",n=>{n.newState==="closed"&&this.#t.focus()})}#n(t){t.matches??t?this.#c():this.#r()}#c(){if(this.#i)return;this.#i=!0;let t=this.tools;for(let e of t)this.#e.appendChild(e);this.#t.hidden=!1,this.#e.hidden=!1,this.dataset.collapsed=""}#r(){if(!this.#i)return;this.#i=!1,this.#e.matches(":popover-open")&&this.#e.hidePopover();let t=Array.from(this.#e.children);for(let e of t)this.insertBefore(e,this.#t);this.#t.hidden=!0,this.#e.hidden=!0,delete this.dataset.collapsed}#d(){let t=this.tools;for(let e of t)this.#e.appendChild(e)}};c("page-tools",a);export{a as PageTools};
1
+ var h=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function c(o,t,e={}){let i=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=l.get(o);if(customElements.get(o)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> 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 <${o}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}l.set(o,n),customElements.define(o,t)}var r=class extends HTMLElement{#e=[];#t;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,i,n){t.addEventListener(e,i,n),this.#e.push(()=>t.removeEventListener(e,i,n))}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let i=this.#t.states;try{e?i.add(t):i.delete(t)}catch{let n=`--${t}`;e?i.add(n):i.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var d=0,a=class extends r{#e=null;#t=null;#o=null;#i=!1;#s=null;setup(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.getAttribute("aria-label")||this.setAttribute("aria-label","Page tools"),this.#a(),this.#l();let t=this.dataset.breakpoint||"48rem";this.#o=matchMedia(`(max-width: ${t})`),this.#n(this.#o),this.listen(this.#o,"change",e=>this.#n(e)),this.#s=new MutationObserver(e=>{for(let i of e)i.type==="childList"&&this.#i&&this.#d()}),this.#s.observe(this,{childList:!0})}teardown(){this.#s?.disconnect(),this.#s=null,this.#i&&this.#r(),this.#e?.remove(),this.#t?.remove(),this.#e=null,this.#t=null}get tools(){return Array.from(this.children).filter(t=>!t.hasAttribute("data-page-tools-internal"))}#a(){if((this.dataset.orientation||"auto")!=="auto")return;let i=(this.dataset.position||"sticky")==="inline"?"horizontal":"vertical";this.dataset.resolvedOrientation=i}#l(){let t=`pt-${++d}`,e=this.dataset.fabIcon||"ellipsis-vertical",i=this.dataset.fabLabel||"Page tools";this.#e=document.createElement("button"),this.#e.className="page-tools-fab",this.#e.setAttribute("data-page-tools-internal",""),this.#e.setAttribute("popovertarget",t),this.#e.setAttribute("aria-label",i),this.#e.hidden=!0,this.#e.innerHTML=`<icon-wc name="${e}" size="md"></icon-wc>`,this.#t=document.createElement("section"),this.#t.className="page-tools-popover",this.#t.setAttribute("data-page-tools-internal",""),this.#t.id=t,this.#t.setAttribute("popover",""),this.#t.setAttribute("aria-label",i),this.#t.hidden=!0,this.appendChild(this.#e),this.appendChild(this.#t),this.listen(this.#t,"toggle",n=>{n.newState==="closed"&&this.#e?.focus()})}#n(t){t.matches??t?this.#c():this.#r()}#c(){if(this.#i||!this.#e||!this.#t)return;this.#i=!0;let t=this.tools;for(let e of t)this.#t.appendChild(e);this.#e.hidden=!1,this.#t.hidden=!1,this.dataset.collapsed=""}#r(){if(!this.#i||!this.#e||!this.#t)return;this.#i=!1,this.#t.matches(":popover-open")&&this.#t.hidePopover?.();let t=Array.from(this.#t.children);for(let e of t)this.insertBefore(e,this.#e);this.#e.hidden=!0,this.#t.hidden=!0,delete this.dataset.collapsed}#d(){if(!this.#t)return;let t=this.tools;for(let e of t)this.#t.appendChild(e)}};c("page-tools",a);export{a as PageTools};
2
2
  //# sourceMappingURL=page-tools.js.map
@@ -1,7 +1,7 @@
1
- var w=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function p(h,t,e={}){let s=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:s},o=m.get(h);if(customElements.get(h)){if(!o||o.priority>=s){o&&o.priority===s&&o.impl!==t&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${h}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=s){o.priority===s&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}m.set(h,i),customElements.define(h,t)}var u=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),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,s,i){t.addEventListener(e,s,i),this.#e.push(()=>t.removeEventListener(e,s,i))}setup(){}teardown(){}};var d=CSS.supports("anchor-name","--x"),v=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,f=class extends HTMLElement{get target(){return this.dataset.target}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}},g=class h extends u{#e=[];#s=0;#o=!1;#n=null;#r=null;#t=null;#i=null;#l=null;#u=null;#d=null;#c=null;static#h=null;static observedAttributes=["data-step"];setup(){if(this.#e=[...this.querySelectorAll("tour-step")],this.#e.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target.closest(`[data-tour="${this.id}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#F();e?.complete||e?.skipped?this.setAttribute("data-complete",""):setTimeout(()=>this.start(e?.step??0),400)}}teardown(){this.#o&&this.stop()}attributeChangedCallback(t,e,s){if(t==="data-step"&&this.#o&&e!==null){let i=parseInt(s,10);!Number.isNaN(i)&&i!==this.#s&&this.#a(i)}}start(t=0){h.#h&&h.#h!==this&&h.#h.stop(),this.#l=document.activeElement,this.#o=!0,h.#h=this,this.#A(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#p("tour:start",{step:t}),this.#a(t)}stop(){this.#L(),this.#o=!1,this.removeAttribute("data-active"),h.#h===this&&(h.#h=null)}next(){!this.#o||this.#t?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting")||(this.#s<this.#e.length-1?this.#a(this.#s+1,"next"):this.#B())}prev(){this.#o&&this.#s>0&&this.#a(this.#s-1,"prev")}goto(t){this.#o&&t>=0&&t<this.#e.length&&this.#a(t)}skip(){!this.#o||(this.dataset.mode??"passive")==="forced"||(this.#p("tour:skip",{step:this.#s}),this.#b({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#D(),this.removeAttribute("data-complete"),this.dataset.step="0"}#A(){this.#n=document.createElement("div"),this.#n.className="page-tour-backdrop",this.#n.setAttribute("aria-hidden","true"),this.#n.addEventListener("click",()=>{(this.dataset.mode??"passive")!=="forced"&&this.skip()}),this.#r=document.createElement("div"),this.#r.className="page-tour-spotlight",this.#r.setAttribute("aria-hidden","true"),this.#t=document.createElement("div"),this.#t.className="page-tour-card",this.#t.setAttribute("popover","manual"),this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-modal","true"),this.#t.setAttribute("aria-label",this.dataset.title??"Page Tour"),this.#t.addEventListener("keydown",t=>this.#C(t)),this.#t.addEventListener("click",t=>this.#M(t)),this.#i=document.createElement("div"),this.#i.setAttribute("aria-live","polite"),this.#i.setAttribute("aria-atomic","true"),this.#i.className="visually-hidden",this.#i.id=`page-tour-announcer-${crypto.randomUUID().slice(0,8)}`,this.append(this.#n,this.#r,this.#t,this.#i),this.#t.showPopover(),requestAnimationFrame(()=>{this.#n?.setAttribute("data-visible","")})}#m(t){let e=parseInt(this.dataset.spotlightPadding,10)||8,s=t.getBoundingClientRect();Object.assign(this.#r.style,{top:`${s.top-e}px`,left:`${s.left-e}px`,width:`${s.width+e*2}px`,height:`${s.height+e*2}px`})}#S(t,e){if(this.#t){if(d){this.#$(t,e);return}this.#v(t,e)}}#$(t,e){let s="--tour-target";t.style.anchorName=s,this.#t.style.positionAnchor=s,this.#t.style.position="fixed",this.#t.style.top="",this.#t.style.left="",this.#t.style.bottom="",this.#t.style.right="";let i="var(--tour-card-offset, 0.75rem)";switch(e==="auto"?this.#y(t):e){case"bottom":this.#t.style.top="anchor(bottom)",this.#t.style.left="anchor(center)",this.#t.style.translate="0 calc("+i+")";break;case"top":this.#t.style.bottom="anchor(top)",this.#t.style.left="anchor(center)",this.#t.style.translate="0 calc(-1 * "+i+")";break;case"right":this.#t.style.left="anchor(right)",this.#t.style.top="anchor(center)",this.#t.style.translate=i+" 0";break;case"left":this.#t.style.right="anchor(left)",this.#t.style.top="anchor(center)",this.#t.style.translate="calc(-1 * "+i+") 0";break}}#v(t,e){let s=t.getBoundingClientRect(),i=12,o=8,a=e==="auto"?this.#y(t):e;this.#t.style.position="fixed",this.#t.style.visibility="hidden",this.#t.style.top="0",this.#t.style.left="0",this.#t.style.translate="";let c=this.#t.getBoundingClientRect();this.#t.style.visibility="";let r,n,l=parseInt(this.dataset.spotlightPadding,10)||8;switch(a){case"bottom":r=s.bottom+l+i,n=s.left+(s.width-c.width)/2;break;case"top":r=s.top-l-i-c.height,n=s.left+(s.width-c.width)/2;break;case"right":r=s.top+(s.height-c.height)/2,n=s.right+l+i;break;case"left":r=s.top+(s.height-c.height)/2,n=s.left-l-i-c.width;break}n=Math.max(o,Math.min(n,window.innerWidth-c.width-o)),r=Math.max(o,Math.min(r,window.innerHeight-c.height-o)),Object.assign(this.#t.style,{top:`${r}px`,left:`${n}px`,translate:""})}#y(t){let e=t.getBoundingClientRect(),s=window.innerWidth,o=window.innerHeight-e.bottom,a=e.top,c=s-e.right,r=e.left,n=Math.max(o,a,c,r);return n===o?"bottom":n===a?"top":n===c?"right":"left"}#x(t,e){let s=this.#e.length,i=e===s-1,o=e===0,c=(this.dataset.mode??"passive")!=="forced",r=t.action!=="none";this.#t.innerHTML=`
1
+ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;function f(l,t,e={}){let s=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:s},n=v.get(l);if(customElements.get(l)){if(!n||n.priority>=s){n&&n.priority===s&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${l}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=s){n.priority===s&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}v.set(l,i),customElements.define(l,t)}var d=class extends HTMLElement{#e=[];#s;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,s,i){t.addEventListener(e,s,i),this.#e.push(()=>t.removeEventListener(e,s,i))}setup(){}teardown(){}setState(t,e){this.#s||(this.#s=this.attachInternals());let s=this.#s.states;try{e?s.add(t):s.delete(t)}catch{let i=`--${t}`;e?s.add(i):s.delete(i)}}_adoptInternals(t){this.#s||(this.#s=t)}};var p=CSS.supports("anchor-name","--x"),y=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,g=class extends HTMLElement{get target(){return this.dataset.target??""}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}},b=class l extends d{#e=[];#s=0;#n=!1;#o=null;#r=null;#t=null;#i=null;#p=null;#l=null;#u=null;#c=null;static#h=null;static observedAttributes=["data-step"];setup(){if(this.#e=[...this.querySelectorAll("tour-step")],this.#e.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target?.closest?.(`[data-tour="${this.id}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#F();e?.complete||e?.skipped?this.setAttribute("data-complete",""):setTimeout(()=>this.start(e?.step??0),400)}return!0}teardown(){this.#n&&this.stop()}attributeChangedCallback(t,e,s){if(t==="data-step"&&this.#n&&e!==null){let i=parseInt(s,10);!Number.isNaN(i)&&i!==this.#s&&this.#a(i)}}start(t=0){l.#h&&l.#h!==this&&l.#h.stop(),this.#p=document.activeElement,this.#n=!0,l.#h=this,this.#A(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#d("tour:start",{step:t}),this.#a(t)}stop(){this.#L(),this.#n=!1,this.removeAttribute("data-active"),l.#h===this&&(l.#h=null)}next(){!this.#n||this.#t?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting")||(this.#s<this.#e.length-1?this.#a(this.#s+1,"next"):this.#N())}prev(){this.#n&&this.#s>0&&this.#a(this.#s-1,"prev")}goto(t){this.#n&&t>=0&&t<this.#e.length&&this.#a(t)}skip(){!this.#n||(this.dataset.mode??"passive")==="forced"||(this.#d("tour:skip",{step:this.#s}),this.#b({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#D(),this.removeAttribute("data-complete"),this.dataset.step="0"}#A(){this.#o=document.createElement("div"),this.#o.className="page-tour-backdrop",this.#o.setAttribute("aria-hidden","true"),this.#o.addEventListener("click",()=>{(this.dataset.mode??"passive")!=="forced"&&this.skip()}),this.#r=document.createElement("div"),this.#r.className="page-tour-spotlight",this.#r.setAttribute("aria-hidden","true"),this.#t=document.createElement("div"),this.#t.className="page-tour-card",this.#t.setAttribute("popover","manual"),this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-modal","true"),this.#t.setAttribute("aria-label",this.dataset.title??"Page Tour"),this.#t.addEventListener("keydown",t=>this.#q(t)),this.#t.addEventListener("click",t=>this.#M(t)),this.#i=document.createElement("div"),this.#i.setAttribute("aria-live","polite"),this.#i.setAttribute("aria-atomic","true"),this.#i.className="visually-hidden",this.#i.id=`page-tour-announcer-${crypto.randomUUID().slice(0,8)}`,this.append(this.#o,this.#r,this.#t,this.#i),this.#t.showPopover(),requestAnimationFrame(()=>{this.#o?.setAttribute("data-visible","")})}#m(t){if(!this.#r)return;let e=parseInt(this.dataset.spotlightPadding??"",10)||8,s=t.getBoundingClientRect();Object.assign(this.#r.style,{top:`${s.top-e}px`,left:`${s.left-e}px`,width:`${s.width+e*2}px`,height:`${s.height+e*2}px`})}#S(t,e){if(this.#t){if(p){this.#$(t,e);return}this.#v(t,e)}}#$(t,e){if(!this.#t)return;let s="--tour-target";t.style.anchorName=s,this.#t.style.positionAnchor=s,this.#t.style.position="fixed",this.#t.style.top="",this.#t.style.left="",this.#t.style.bottom="",this.#t.style.right="";let i="var(--tour-card-offset, 0.75rem)";switch(e==="auto"?this.#y(t):e){case"bottom":this.#t.style.top="anchor(bottom)",this.#t.style.left="anchor(center)",this.#t.style.translate="0 calc("+i+")";break;case"top":this.#t.style.bottom="anchor(top)",this.#t.style.left="anchor(center)",this.#t.style.translate="0 calc(-1 * "+i+")";break;case"right":this.#t.style.left="anchor(right)",this.#t.style.top="anchor(center)",this.#t.style.translate=i+" 0";break;case"left":this.#t.style.right="anchor(left)",this.#t.style.top="anchor(center)",this.#t.style.translate="calc(-1 * "+i+") 0";break}}#v(t,e){if(!this.#t)return;let s=t.getBoundingClientRect(),i=12,n=8,h=e==="auto"?this.#y(t):e;this.#t.style.position="fixed",this.#t.style.visibility="hidden",this.#t.style.top="0",this.#t.style.left="0",this.#t.style.translate="";let o=this.#t.getBoundingClientRect();this.#t.style.visibility="";let r=0,c=0,a=parseInt(this.dataset.spotlightPadding??"",10)||8;switch(h){case"bottom":r=s.bottom+a+i,c=s.left+(s.width-o.width)/2;break;case"top":r=s.top-a-i-o.height,c=s.left+(s.width-o.width)/2;break;case"right":r=s.top+(s.height-o.height)/2,c=s.right+a+i;break;case"left":r=s.top+(s.height-o.height)/2,c=s.left-a-i-o.width;break}c=Math.max(n,Math.min(c,window.innerWidth-o.width-n)),r=Math.max(n,Math.min(r,window.innerHeight-o.height-n)),Object.assign(this.#t.style,{top:`${r}px`,left:`${c}px`,translate:""})}#y(t){let e=t.getBoundingClientRect(),s=window.innerWidth,n=window.innerHeight-e.bottom,h=e.top,o=s-e.right,r=e.left,c=Math.max(n,h,o,r);return c===n?"bottom":c===h?"top":c===o?"right":"left"}#x(t,e){if(!this.#t)return;let s=this.#e.length,i=e===s-1,n=e===0,o=(this.dataset.mode??"passive")!=="forced",r=t.action!=="none";this.#t.innerHTML=`
2
2
  <div class="page-tour-progress" aria-hidden="true">
3
- ${this.#e.map((n,l)=>`
4
- <span class="page-tour-pip" ${l===e?"data-active":""} ${l<e?"data-visited":""}></span>
3
+ ${this.#e.map((c,a)=>`
4
+ <span class="page-tour-pip" ${a===e?"data-active":""} ${a<e?"data-visited":""}></span>
5
5
  `).join("")}
6
6
  </div>
7
7
  <p class="page-tour-meta">
@@ -14,13 +14,13 @@ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;functi
14
14
  <p class="page-tour-action-hint">${t.actionHint}</p>
15
15
  `:""}
16
16
  <footer class="page-tour-footer">
17
- ${c?`
17
+ ${o?`
18
18
  <button type="button" class="page-tour-skip" data-action="skip">
19
19
  ${i?"Close":"Skip tour"}
20
20
  </button>
21
21
  `:""}
22
22
  <nav class="page-tour-nav" aria-label="Tour navigation">
23
- ${o?"":`
23
+ ${n?"":`
24
24
  <button type="button" class="page-tour-prev" data-action="prev">
25
25
  Previous
26
26
  </button>
@@ -35,5 +35,5 @@ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;functi
35
35
  </button>
36
36
  </nav>
37
37
  </footer>
38
- `}#a(t,e="next"){if(this.#d?.abort(),this.#d=null,this.#s!==t){let n=this.#e[this.#s],l=n?document.querySelector(n.target):null;l&&(d&&(l.style.anchorName=""),l.removeAttribute("data-tour-target"))}this.#w(),this.#s=t;let s=this.#e[t],i=document.querySelector(s.target);if(!i){console.warn(`[page-tour] Target "${s.target}" not found, skipping step ${t}`),e==="next"&&t<this.#e.length-1?this.#a(t+1,"next"):e==="prev"&&t>0&&this.#a(t-1,"prev");return}i.setAttribute("data-tour-target","");let o=v()?"instant":s.scrollBehavior;s.scrollBehavior!=="none"&&i.scrollIntoView({block:"nearest",behavior:o});let a=()=>{this.#m(i),this.#S(i,s.placement)};a(),setTimeout(a,v()?0:300),this.#x(s,t),this.#t.hasAttribute("tabindex")||this.#t.setAttribute("tabindex","-1"),this.#t.focus(),requestAnimationFrame(()=>{let n=this.#t?.querySelector(".page-tour-content h3, .page-tour-content h2, .page-tour-content h4");n?(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus()):this.#t?.querySelector('[data-action="next"]')?.focus()});let r=s.querySelector("h3, h2, h4")?.textContent??`Step ${t+1}`;this.#T(`Step ${t+1} of ${this.#e.length}: ${r}`),this.dataset.step=String(t),s.action!=="none"&&this.#E(s),this.#N(i),this.#b({step:t}),this.#o&&this.#p("tour:step",{step:t,target:i,direction:e})}#E(t){let e=document.querySelector(t.target);if(!e)return;let s=this.#t?.querySelector('[data-action="next"]'),i=new AbortController;this.#d=i;let a={click:"click",focus:"focus",input:"input",change:"change"}[t.action];a?e.addEventListener(a,()=>{s?.removeAttribute("data-waiting"),this.#t?.querySelector(".page-tour-action-hint")?.remove(),s?.focus(),this.#p("tour:action",{step:this.#s,action:t.action}),i.abort()},{signal:i.signal,once:!0}):t.action==="custom"&&this.addEventListener("tour:action",()=>{s?.removeAttribute("data-waiting"),this.#t?.querySelector(".page-tour-action-hint")?.remove(),s?.focus(),i.abort()},{signal:i.signal,once:!0})}#C(t){let e=this.dataset.mode??"passive",i=this.#e[this.#s]?.action!=="none",a=this.#t?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting");switch(t.key){case"Escape":e!=="forced"&&(t.preventDefault(),this.skip());break;case"ArrowRight":case"ArrowDown":t.preventDefault(),i&&a||this.next();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.prev();break;case"Home":t.preventDefault(),this.goto(0);break;case"End":t.preventDefault(),this.goto(this.#e.length-1);break;case"Tab":this.#q(t,i&&a);break}}#q(t,e){let s=[...this.#t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].filter(n=>!n.disabled&&n.offsetParent!==null),i=[];if(e){let n=this.#e[this.#s],l=document.querySelector(n.target);l&&(i=(l.matches("input, select, textarea, button, [href], [tabindex]")?[l]:[...l.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')]).filter(b=>!b.disabled&&b.offsetParent!==null))}let o=[...s,...i];if(o.length===0)return;let a=o[0],c=o[o.length-1],r=document.activeElement;t.shiftKey?(r===a||!o.includes(r))&&(t.preventDefault(),c.focus()):(r===c||!o.includes(r))&&(t.preventDefault(),a.focus())}#M(t){let e=t.target.closest("[data-action]");if(!e)return;switch(e.dataset.action){case"next":this.next();break;case"prev":this.prev();break;case"skip":this.skip();break}}#N(t){this.#u=new ResizeObserver(()=>{this.#k(t)}),this.#u.observe(t),this.listen(window,"scroll",()=>this.#k(t),{passive:!0})}#w(){this.#u&&(this.#u.disconnect(),this.#u=null),this.#c&&(cancelAnimationFrame(this.#c),this.#c=null)}#k(t){this.#c||(this.#c=requestAnimationFrame(()=>{if(this.#c=null,!this.#o)return;this.#m(t);let e=this.#e[this.#s];d||this.#v(t,e.placement)}))}#B(){this.#p("tour:complete",{steps:this.#e.length}),this.#b({complete:!0}),this.stop(),this.setAttribute("data-complete","")}#L(){this.#d?.abort(),this.#d=null,this.#w();let t=this.#e[this.#s],e=t?document.querySelector(t.target):null;e&&(d&&(e.style.anchorName=""),e.removeAttribute("data-tour-target")),this.#n?.remove(),this.#r?.remove(),this.#t?.hidePopover?.(),this.#t?.remove(),this.#i?.remove(),this.#n=null,this.#r=null,this.#t=null,this.#i=null,this.#l&&typeof this.#l.focus=="function"&&(this.#l.focus(),this.#l=null)}#T(t){this.#i&&(this.#i.textContent="",requestAnimationFrame(()=>{this.#i&&(this.#i.textContent=t)}))}#p(t,e){let s=t!=="tour:skip";this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:s,detail:e}))}#f(){let t=this.dataset.persist??"session";return t==="session"?sessionStorage:t==="local"?localStorage:null}#g(){return`vb-tour-${this.dataset.persistKey??window.location.pathname}`}#b(t){let e=this.#f();if(!e)return;let s=this.#g(),i={};try{i=JSON.parse(e.getItem(s))??{}}catch{}e.setItem(s,JSON.stringify({...i,...t}))}#F(){let t=this.#f();if(!t)return null;try{return JSON.parse(t.getItem(this.#g()))}catch{return null}}#D(){let t=this.#f();t&&t.removeItem(this.#g())}};p("page-tour",g);p("tour-step",f);export{g as PageTour,f as TourStep};
38
+ `}#a(t,e="next"){if(this.#u?.abort(),this.#u=null,this.#s!==t){let a=this.#e[this.#s],u=a?document.querySelector(a.target):null;u&&(p&&(u.style.anchorName=""),u.removeAttribute("data-tour-target"))}this.#w(),this.#s=t;let s=this.#e[t],i=document.querySelector(s.target);if(!i){console.warn(`[page-tour] Target "${s.target}" not found, skipping step ${t}`),e==="next"&&t<this.#e.length-1?this.#a(t+1,"next"):e==="prev"&&t>0&&this.#a(t-1,"prev");return}i.setAttribute("data-tour-target","");let n=y()?"instant":s.scrollBehavior;s.scrollBehavior!=="none"&&i.scrollIntoView({block:"nearest",behavior:n});let h=()=>{this.#m(i),this.#S(i,s.placement)};h(),setTimeout(h,y()?0:300),this.#x(s,t);let o=this.#t;o&&(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus()),requestAnimationFrame(()=>{let a=this.#t?.querySelector(".page-tour-content h3, .page-tour-content h2, .page-tour-content h4")??null;a?(a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus()):(this.#t?.querySelector('[data-action="next"]')??null)?.focus()});let c=s.querySelector("h3, h2, h4")?.textContent??`Step ${t+1}`;this.#T(`Step ${t+1} of ${this.#e.length}: ${c}`),this.dataset.step=String(t),s.action!=="none"&&this.#E(s),this.#B(i),this.#b({step:t}),this.#n&&this.#d("tour:step",{step:t,target:i,direction:e})}#E(t){let e=document.querySelector(t.target);if(!e)return;let s=this.#t?.querySelector('[data-action="next"]')??null,i=new AbortController;this.#u=i;let h={click:"click",focus:"focus",input:"input",change:"change"}[t.action];h?e.addEventListener(h,()=>{s?.removeAttribute("data-waiting"),this.#t?.querySelector(".page-tour-action-hint")?.remove(),s?.focus(),this.#d("tour:action",{step:this.#s,action:t.action}),i.abort()},{signal:i.signal,once:!0}):t.action==="custom"&&this.addEventListener("tour:action",()=>{s?.removeAttribute("data-waiting"),this.#t?.querySelector(".page-tour-action-hint")?.remove(),s?.focus(),i.abort()},{signal:i.signal,once:!0})}#q(t){let e=this.dataset.mode??"passive",i=this.#e[this.#s]?.action!=="none",h=this.#t?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting");switch(t.key){case"Escape":e!=="forced"&&(t.preventDefault(),this.skip());break;case"ArrowRight":case"ArrowDown":t.preventDefault(),i&&h||this.next();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.prev();break;case"Home":t.preventDefault(),this.goto(0);break;case"End":t.preventDefault(),this.goto(this.#e.length-1);break;case"Tab":this.#C(t,i&&h);break}}#C(t,e){if(!this.#t)return;let s=[...this.#t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].filter(c=>!c.disabled&&c.offsetParent!==null),i=[];if(e){let c=this.#e[this.#s],a=document.querySelector(c.target);a&&(i=(a.matches("input, select, textarea, button, [href], [tabindex]")?[a]:[...a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')]).filter(m=>!m.disabled&&m.offsetParent!==null))}let n=[...s,...i];if(n.length===0)return;let h=n[0],o=n[n.length-1],r=document.activeElement;t.shiftKey?(r===h||r&&!n.includes(r))&&(t.preventDefault(),o.focus()):(r===o||r&&!n.includes(r))&&(t.preventDefault(),h.focus())}#M(t){let e=t.target.closest("[data-action]");if(!e)return;switch(e.dataset.action){case"next":this.next();break;case"prev":this.prev();break;case"skip":this.skip();break}}#B(t){this.#l=new ResizeObserver(()=>{this.#k(t)}),this.#l.observe(t),this.listen(window,"scroll",()=>this.#k(t),{passive:!0})}#w(){this.#l&&(this.#l.disconnect(),this.#l=null),this.#c&&(cancelAnimationFrame(this.#c),this.#c=null)}#k(t){this.#c||(this.#c=requestAnimationFrame(()=>{if(this.#c=null,!this.#n)return;this.#m(t);let e=this.#e[this.#s];p||this.#v(t,e.placement)}))}#N(){this.#d("tour:complete",{steps:this.#e.length}),this.#b({complete:!0}),this.stop(),this.setAttribute("data-complete","")}#L(){this.#u?.abort(),this.#u=null,this.#w();let t=this.#e[this.#s],e=t?document.querySelector(t.target):null;e&&(p&&(e.style.anchorName=""),e.removeAttribute("data-tour-target")),this.#o?.remove(),this.#r?.remove(),this.#t?.hidePopover?.(),this.#t?.remove(),this.#i?.remove(),this.#o=null,this.#r=null,this.#t=null,this.#i=null;let s=this.#p;s&&typeof s.focus=="function"&&(s.focus(),this.#p=null)}#T(t){this.#i&&(this.#i.textContent="",requestAnimationFrame(()=>{this.#i&&(this.#i.textContent=t)}))}#d(t,e){let s=t!=="tour:skip";this.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:s,detail:e}))}#f(){let t=this.dataset.persist??"session";return t==="session"?sessionStorage:t==="local"?localStorage:null}#g(){return`vb-tour-${this.dataset.persistKey??window.location.pathname}`}#b(t){let e=this.#f();if(!e)return;let s=this.#g(),i={};try{i=JSON.parse(e.getItem(s)??"null")??{}}catch{}e.setItem(s,JSON.stringify({...i,...t}))}#F(){let t=this.#f();if(!t)return null;try{return JSON.parse(t.getItem(this.#g())??"null")}catch{return null}}#D(){let t=this.#f();t&&t.removeItem(this.#g())}};f("page-tour",b);f("tour-step",g);export{b as PageTour,g as TourStep};
39
39
  //# sourceMappingURL=page-tour.js.map
@@ -0,0 +1,2 @@
1
+ var x=window.matchMedia("(prefers-reduced-motion: reduce)");var h=new Map;function f(t,e,n={}){let i=n.priority??10,s={impl:e,bundle:n.bundle,contract:n.contract,priority:i},r=h.get(t);if(customElements.get(t)){if(!r||r.priority>=i){r&&r.priority===i&&r.impl!==e&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=i){r.priority===i&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${r.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}h.set(t,s),customElements.define(t,e)}var u=class extends HTMLElement{#e=[];#t;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 e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,i,s){e.addEventListener(n,i,s),this.#e.push(()=>e.removeEventListener(n,i,s))}setup(){}teardown(){}setState(e,n){this.#t||(this.#t=this.attachInternals());let i=this.#t.states;try{n?i.add(e):i.delete(e)}catch{let s=`--${e}`;n?i.add(s):i.delete(s)}}_adoptInternals(e){this.#t||(this.#t=e)}};function v(t,e){let n=Number(t);return!Number.isFinite(n)||e<=0?1:Math.min(Math.max(1,Math.floor(n)),e)}function E({page:t,size:e}){let n=(t-1)*e;return{start:n,end:n+e}}function y(t,e,n=2){if(e<=0)return[];if(e===1)return[1];let i=Math.max(2,t-n),s=Math.min(e-1,t+n),r=[1];i>2&&r.push("\u2026");for(let a=i;a<=s;a++)r.push(a);return s<e-1&&r.push("\u2026"),r.push(e),r}function m({total:t,size:e,page:n,window:i=2}){if(e<=0)return{page:(t>0,1),totalPages:t>0?1:0,start:0,end:t,pageNumbers:t>0?[1]:[]};let s=t>0?Math.ceil(t/e):0,r=v(n,s),a=E({page:r,size:e}),o=Math.min(a.end,t);return{page:r,totalPages:s,start:a.start,end:o,pageNumbers:y(r,s,i)}}function b(t){switch(t.style){case"load-more":return N(t);case"prev-next":return A(t);default:return C(t)}}function l(){let t=document.createElement("nav");return t.setAttribute("data-paged-nav",""),t.setAttribute("aria-label","Pagination"),t}function C({page:t,totalPages:e,pageNumbers:n,prevLabel:i="Previous",nextLabel:s="Next"}){let r=l(),a=document.createElement("ol");a.setAttribute("role","list"),a.appendChild(d(i,t-1,t===1,!1,"prev"));for(let o of n)if(o==="\u2026"){let c=document.createElement("li");c.textContent="\u2026",c.setAttribute("aria-hidden","true"),c.setAttribute("data-paged-ellipsis",""),a.appendChild(c)}else a.appendChild(d(String(o),o,!1,o===t,"page"));return a.appendChild(d(s,t+1,t===e,!1,"next")),r.appendChild(a),r}function A({page:t,totalPages:e,prevLabel:n="Previous",nextLabel:i="Next"}){let s=l(),r=document.createElement("ol");r.setAttribute("role","list"),r.appendChild(d(n,t-1,t===1,!1,"prev"));let a=document.createElement("li");return a.setAttribute("data-paged-status",""),a.setAttribute("aria-live","polite"),a.textContent=`Page ${t} of ${e}`,r.appendChild(a),r.appendChild(d(i,t+1,t===e,!1,"next")),s.appendChild(r),s}function N({total:t,visible:e,loadMoreLabel:n=s=>`Load more (${s})`,noMoreLabel:i="No more"}){let s=l(),r=document.createElement("button");r.type="button",r.setAttribute("data-paged-loadmore","");let a=t-e;return r.textContent=a>0?n(a):i,r.disabled=a<=0,s.appendChild(r),s}function d(t,e,n,i,s){let r=document.createElement("li"),a=document.createElement("button");return a.type="button",a.setAttribute("data-paged-action",s),a.dataset.pagedTarget=String(e),a.textContent=t,i&&a.setAttribute("aria-current","page"),n&&(a.disabled=!0),r.appendChild(a),r}function g(t,{onNavigate:e,onLoadMore:n}){e&&t.querySelectorAll("button[data-paged-target]").forEach(i=>{i.addEventListener("click",()=>e(parseInt(i.dataset.pagedTarget||"1",10)))}),n&&t.querySelectorAll("button[data-paged-loadmore]").forEach(i=>{i.addEventListener("click",()=>n())})}var p=class extends u{static observedAttributes=["target","for","style"];#e=null;#t=null;setup(){this.#n()}teardown(){this.#t?.(),this.#t=null}attributeChangedCallback(){!this.isConnected||!this.hasAttribute("data-upgraded")||(this.#t?.(),this.#t=null,this.#n())}#n(){if(this.#e=this.#i(),!this.#e){this.#s();return}let e=n=>this.#r(n.detail);this.#e.addEventListener("paged:change",e),this.#t=()=>this.#e?.removeEventListener("paged:change",e),this.#a()}#i(){let e=this.getAttribute("target");if(e)try{return document.querySelector(e)}catch{return null}let n=this.getAttribute("for");if(n)return document.getElementById(n);let i=this.previousElementSibling;for(;i;){if(i.hasAttribute("data-paged"))return i;i=i.previousElementSibling}return null}#a(){if(!this.#e)return;let e=this.#e,n=parseInt(e.dataset.pagedSize||"10",10)||10,i=parseInt(e.dataset.pagedPage||"1",10)||1,r=(e.tagName==="TABLE"?Array.from(e.querySelector(":scope > tbody")?.children||[]):Array.from(e.children).filter(o=>!o.matches("nav[data-paged-nav], div[data-paged-sentinel]"))).length,a=Math.max(1,Math.ceil(r/n));this.#r({page:i,size:n,total:r,totalPages:a})}#r(e){let n=this.getAttribute("style")||"numbered",i=parseInt(this.#e?.dataset.pagedWindow||"2",10)||2,s=m({total:e.total,size:e.size,page:e.page,window:i}),r=Math.min(e.page*e.size,e.total);if(this.replaceChildren(),n!=="load-more"&&s.totalPages<=1)return;let a=b({style:n,page:s.page,totalPages:s.totalPages,pageNumbers:s.pageNumbers,total:e.total,visible:r});g(a,{onNavigate:o=>this.#o(o),onLoadMore:()=>this.#d()}),this.appendChild(a)}#s(){this.replaceChildren();let e=document.createElement("p");e.setAttribute("data-pager-missing",""),e.setAttribute("aria-live","polite"),e.textContent="No paginated target found",this.appendChild(e)}#o(e){this.#e&&(this.dispatchEvent(new CustomEvent("pager-wc:navigate",{bubbles:!0,detail:{page:e}})),this.#e.dispatchEvent(new CustomEvent("paged:goto",{detail:{page:e}})))}#d(){this.#e&&this.#e.dispatchEvent(new CustomEvent("paged:loadmore"))}};f("pager-wc",p);export{p as PagerWC};
2
+ //# sourceMappingURL=pager-wc.js.map
@@ -1,15 +1,15 @@
1
- var V=window.matchMedia("(prefers-reduced-motion: reduce)");var C=new Map;function S(o,e,t={}){let r=t.priority??10,s={impl:e,bundle:t.bundle,contract:t.contract,priority:r},n=C.get(o);if(customElements.get(o)){if(!n||n.priority>=r){n&&n.priority===r&&n.impl!==e&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=r){n.priority===r&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}C.set(o,s),customElements.define(o,e)}var h=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,r,s){e.addEventListener(t,r,s),this.#e.push(()=>e.removeEventListener(t,r,s))}setup(){}teardown(){}};function B(o,e,t){e/=100,t/=100;let r=i=>(i+o/30)%12,s=e*Math.min(t,1-t),n=i=>t-s*Math.max(-1,Math.min(r(i)-3,9-r(i),1));return{r:Math.round(n(0)*255),g:Math.round(n(8)*255),b:Math.round(n(4)*255)}}function q(o,e,t){o/=255,e/=255,t/=255;let r=Math.max(o,e,t),s=Math.min(o,e,t),n=(r+s)/2,i=0,d=0;if(r!==s){let c=r-s;switch(d=n>.5?c/(2-r-s):c/(r+s),r){case o:i=((e-t)/c+(e<t?6:0))/6;break;case e:i=((t-o)/c+2)/6;break;case t:i=((o-e)/c+4)/6;break}}return{h:Math.round(i*360),s:Math.round(d*100),l:Math.round(n*100)}}function v(o){o=o.replace(/^#/,""),o.length===3&&(o=o[0]+o[0]+o[1]+o[1]+o[2]+o[2]);let e=parseInt(o,16);return{r:e>>16&255,g:e>>8&255,b:e&255}}function N(o,e,t){return"#"+[o,e,t].map(r=>Math.max(0,Math.min(255,Math.round(r))).toString(16).padStart(2,"0")).join("")}function $(o){let{r:e,g:t,b:r}=v(o);return q(e,t,r)}function l(o,e,t){let{r,g:s,b:n}=B(o,e,t);return N(r,s,n)}var u=o=>(o%360+360)%360;function H(o,e,t){return{colors:[l(o,e,t),l(u(o+180),e,t)],names:["Base","Complement"]}}function O(o,e,t){return{colors:[l(u(o-30),e,t),l(o,e,t),l(u(o+30),e,t)],names:["Analog A","Base","Analog B"]}}function j(o,e,t){return{colors:[l(o,e,t),l(u(o+120),e,t),l(u(o+240),e,t)],names:["Base","Triad A","Triad B"]}}function R(o,e,t){return{colors:[l(o,e,t),l(u(o+150),e,t),l(u(o+210),e,t)],names:["Base","Split A","Split B"]}}function F(o,e,t){return{colors:[l(o,e,t),l(u(o+90),e,t),l(u(o+180),e,t),l(u(o+270),e,t)],names:["Base","Tetrad A","Tetrad B","Tetrad C"]}}var P=[{label:"50",l:96},{label:"100",l:90},{label:"200",l:80},{label:"300",l:70},{label:"400",l:60},{label:"500",l:50},{label:"600",l:40},{label:"700",l:30},{label:"800",l:22},{label:"900",l:15},{label:"950",l:10}];function D(o,e,t){let r=[],s=[];for(let n of P){let i=n.l>85||n.l<20?Math.max(e*.6,5):e;r.push(l(o,Math.round(i),n.l)),s.push(n.label)}return{colors:r,names:s}}var M={complementary:H,analogous:O,triadic:j,"split-complementary":R,tetradic:F,monochromatic:D};function k(o,e){let{h:t,s:r,l:s}=$(o);return(M[e]||M.complementary)(t,r,s)}var w=class extends h{static observedAttributes=["seed","harmony","include-seed","show-export","layout","size","show-values","show-names"];#e=null;#t="";#o=[];#r=[];setup(){this.#e=this.querySelector("color-picker")||this.querySelector('input[type="color"]'),this.#t=this.#i(),this.#t&&(this.#n(),this.#c(),this.#s())}attributeChangedCallback(){this.isConnected&&this.hasAttribute("data-upgraded")&&(this.#t=this.#i(),this.#t&&this.#n())}#i(){if(this.#e){let e=this.#e;if(e.tagName==="COLOR-PICKER"){let t=e.value;return t&&t!=="#000000"?t:e.querySelector('input[type="color"]')?.value||t||""}return e.value||""}return this.getAttribute("seed")||""}#n(){let e=this.getAttribute("harmony")||"complementary",t=this.getAttribute("layout")||"inline",r=this.getAttribute("size")||"md",s=this.hasAttribute("show-values"),n=this.hasAttribute("show-names"),i=this.hasAttribute("show-export"),{colors:d,names:c}=k(this.#t,e);this.#o=d,this.#r=c;let b={sm:48,md:80,lg:120}[r]||80,y="display:flex;flex-wrap:wrap;gap:var(--size-xs,0.5rem)";t==="grid"?y=`display:grid;grid-template-columns:repeat(auto-fill,minmax(${b}px,1fr));gap:var(--size-xs,0.5rem)`:t==="list"&&(y="display:flex;flex-direction:column;gap:var(--size-xs,0.5rem)");let T=d.map((a,g)=>{let f=c[g]||"",A=this.#d(a),L=t==="list"?"display:flex;flex-direction:row;align-items:center;gap:0.75rem":`display:flex;flex-direction:column;align-items:center;gap:0.25rem;max-inline-size:${b}px`,E=t==="list"?36:b,z=a.length>12?a.slice(0,12)+"\u2026":a;return`<div class="swatch-wrap" role="listitem" style="${L}">
2
- <button type="button" class="color-box" data-index="${g}"
3
- style="background:${a};color:${A};width:${E}px;height:${E}px;border:1px solid oklch(0% 0 0/0.15);border-radius:var(--radius-s,0.25rem);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;font-family:var(--font-mono,monospace);position:relative;overflow:hidden;flex-shrink:0"
4
- title="Click to copy${f?": "+f:""}"
5
- aria-label="${f||"Color "+(g+1)}: ${a}">
6
- <span class="color-value" style="font-size:0.625rem;line-height:1.2;opacity:${s?"1":"0"};text-align:center;padding:2px 4px;word-break:break-all;transition:opacity 0.15s ease">${z}</span>
1
+ var et=window.matchMedia("(prefers-reduced-motion: reduce)");var $=new Map;function k(t,e,n={}){let o=n.priority??10,r={impl:e,bundle:n.bundle,contract:n.contract,priority:o},s=$.get(t);if(customElements.get(t)){if(!s||s.priority>=o){s&&s.priority===o&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=o){s.priority===o&&console.warn(`[VB Bundle] Tag <${t}> already registered by "${s.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}$.set(t,r),customElements.define(t,e)}var b=class extends HTMLElement{#e=[];#t;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 e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,o,r){e.addEventListener(n,o,r),this.#e.push(()=>e.removeEventListener(n,o,r))}setup(){}teardown(){}setState(e,n){this.#t||(this.#t=this.attachInternals());let o=this.#t.states;try{n?o.add(e):o.delete(e)}catch{let r=`--${e}`;n?o.add(r):o.delete(r)}}_adoptInternals(e){this.#t||(this.#t=e)}};var w="[data-copy], [data-copy-target], [data-paste-target]",z="Copied to clipboard",R="Pasted from clipboard",E=new WeakMap;async function h(t,e={}){if(t==null||t==="")return!1;let{button:n,announceMessage:o=z,duration:r=1500}=e;try{await navigator.clipboard.writeText(t)}catch{return!1}return L({button:n,duration:r,announceMessage:o,eventDetail:{text:t}}),!0}function L({button:t,duration:e,announceMessage:n,eventDetail:o,state:r="copied",eventName:s="copy"}){if(t){t.dataset.state=r;let i=E.get(t);i&&clearTimeout(i),E.set(t,setTimeout(()=>{delete t.dataset.state,E.delete(t)},e)),t.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:o}))}U(n,t??document.body)}async function P(t,e={}){let{button:n,announceMessage:o=R,duration:r=1500}=e,s;try{s=await navigator.clipboard.readText()}catch{return null}return t&&("value"in t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)?t.value=s:t.textContent=s,t.dispatchEvent(new Event("input",{bubbles:!0}))),L({button:n,duration:r,announceMessage:o,eventDetail:{text:s},state:"pasted",eventName:"paste"}),s}function N(t=document){t.querySelectorAll(w).forEach(T)}function T(t){t.hasAttribute("data-copy-init")||(t.setAttribute("data-copy-init",""),t.addEventListener("click",()=>{if(t.dataset.pasteTarget){let n=document.querySelector(t.dataset.pasteTarget);if(!n)return;P(n,{button:t});return}let e=F(t);e&&h(e,{button:t})}))}function F(t){if(t.dataset.copy)return t.dataset.copy;if(t.dataset.copyTarget){let e=document.querySelector(t.dataset.copyTarget);if(!e)return"";let n=t.dataset.copyAttr;return n?e.getAttribute(n)??"":e.textContent??""}return""}function U(t,e){let n=document.createElement("div");n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.className="visually-hidden",n.textContent=t,e.appendChild(n),setTimeout(()=>n.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>N()):N();var j=new MutationObserver(t=>{for(let e of t)for(let n of e.addedNodes){if(n.nodeType!==Node.ELEMENT_NODE)continue;let o=n;o.matches(w)&&T(o),o.querySelectorAll(w).forEach(r=>T(r))}});j.observe(document.documentElement,{childList:!0,subtree:!0});function V(t,e,n){e/=100,n/=100;let o=i=>(i+t/30)%12,r=e*Math.min(n,1-n),s=i=>n-r*Math.max(-1,Math.min(o(i)-3,9-o(i),1));return{r:Math.round(s(0)*255),g:Math.round(s(8)*255),b:Math.round(s(4)*255)}}function K(t,e,n){t/=255,e/=255,n/=255;let o=Math.max(t,e,n),r=Math.min(t,e,n),s=(o+r)/2,i=0,l=0;if(o!==r){let u=o-r;switch(l=s>.5?u/(2-o-r):u/(o+r),o){case t:i=((e-n)/u+(e<n?6:0))/6;break;case e:i=((n-t)/u+2)/6;break;case n:i=((t-e)/u+4)/6;break}}return{h:Math.round(i*360),s:Math.round(l*100),l:Math.round(s*100)}}function M(t){t=t.replace(/^#/,""),t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:e&255}}function W(t,e,n){return"#"+[t,e,n].map(o=>Math.max(0,Math.min(255,Math.round(o))).toString(16).padStart(2,"0")).join("")}function O(t){let{r:e,g:n,b:o}=M(t);return K(e,n,o)}function c(t,e,n){let{r:o,g:r,b:s}=V(t,e,n);return W(o,r,s)}var d=t=>(t%360+360)%360;function G(t,e,n){return{colors:[c(t,e,n),c(d(t+180),e,n)],names:["Base","Complement"]}}function J(t,e,n){return{colors:[c(d(t-30),e,n),c(t,e,n),c(d(t+30),e,n)],names:["Analog A","Base","Analog B"]}}function Q(t,e,n){return{colors:[c(t,e,n),c(d(t+120),e,n),c(d(t+240),e,n)],names:["Base","Triad A","Triad B"]}}function X(t,e,n){return{colors:[c(t,e,n),c(d(t+150),e,n),c(d(t+210),e,n)],names:["Base","Split A","Split B"]}}function Y(t,e,n){return{colors:[c(t,e,n),c(d(t+90),e,n),c(d(t+180),e,n),c(d(t+270),e,n)],names:["Base","Tetrad A","Tetrad B","Tetrad C"]}}var Z=[{label:"50",l:96},{label:"100",l:90},{label:"200",l:80},{label:"300",l:70},{label:"400",l:60},{label:"500",l:50},{label:"600",l:40},{label:"700",l:30},{label:"800",l:22},{label:"900",l:15},{label:"950",l:10}];function tt(t,e,n){let o=[],r=[];for(let s of Z){let i=s.l>85||s.l<20?Math.max(e*.6,5):e;o.push(c(t,Math.round(i),s.l)),r.push(s.label)}return{colors:o,names:r}}var B={complementary:G,analogous:J,triadic:Q,"split-complementary":X,tetradic:Y,monochromatic:tt};function q(t,e){let{h:n,s:o,l:r}=O(t);return(B[e]||B.complementary)(n,o,r)}var C=class extends b{static observedAttributes=["seed","harmony","include-seed","show-export","layout","size","show-values","show-names"];#e=null;#t="";#n=[];#o=[];setup(){this.#e=this.querySelector("color-picker")||this.querySelector('input[type="color"]'),this.#t=this.#i(),this.#t&&(this.#r(),this.#c(),this.#s())}attributeChangedCallback(){this.isConnected&&this.hasAttribute("data-upgraded")&&(this.#t=this.#i(),this.#t&&this.#r())}#i(){if(this.#e){let e=this.#e;if(e.tagName==="COLOR-PICKER"){let n=e.value;return n&&n!=="#000000"?n:e.querySelector('input[type="color"]')?.value||n||""}return e.value||""}return this.getAttribute("seed")||""}#r(){let e=this.getAttribute("harmony")||"complementary",n=this.getAttribute("layout")||"inline",o=this.getAttribute("size")||"md",r=this.hasAttribute("show-values"),s=this.hasAttribute("show-names"),i=this.hasAttribute("show-export"),{colors:l,names:u}=q(this.#t,e);this.#n=l,this.#o=u;let y={sm:48,md:80,lg:120}[o]||80,x="display:flex;flex-wrap:wrap;gap:var(--size-xs,0.5rem)";n==="grid"?x=`display:grid;grid-template-columns:repeat(auto-fill,minmax(${y}px,1fr));gap:var(--size-xs,0.5rem)`:n==="list"&&(x="display:flex;flex-direction:column;gap:var(--size-xs,0.5rem)");let D=l.map((a,v)=>{let m=u[v]||"",H=this.#u(a),I=n==="list"?"display:flex;flex-direction:row;align-items:center;gap:0.75rem":`display:flex;flex-direction:column;align-items:center;gap:0.25rem;max-inline-size:${y}px`,A=n==="list"?36:y,_=a.length>12?a.slice(0,12)+"\u2026":a;return`<div class="swatch-wrap" role="listitem" style="${I}">
2
+ <button type="button" class="color-box" data-index="${v}"
3
+ style="background:${a};color:${H};width:${A}px;height:${A}px;border:1px solid oklch(0% 0 0/0.15);border-radius:var(--radius-s,0.25rem);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;font-family:var(--font-mono,monospace);position:relative;overflow:hidden;flex-shrink:0"
4
+ title="Click to copy${m?": "+m:""}"
5
+ aria-label="${m||"Color "+(v+1)}: ${a}">
6
+ <span class="color-value" style="font-size:0.625rem;line-height:1.2;opacity:${r?"1":"0"};text-align:center;padding:2px 4px;word-break:break-all;transition:opacity 0.15s ease">${_}</span>
7
7
  </button>
8
- ${n&&f?`<span style="font-size:var(--font-size-xs,0.75rem);color:var(--color-text-muted,#666);text-align:center;max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${f}</span>`:""}
9
- </div>`}).join(""),x="";i&&(x=`<div class="pg-export" role="toolbar" aria-label="Export palette" style="display:flex;gap:0.5rem;margin-block-start:var(--size-xs,0.5rem)">
8
+ ${s&&m?`<span style="font-size:var(--font-size-xs,0.75rem);color:var(--color-text-muted,#666);text-align:center;max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${m}</span>`:""}
9
+ </div>`}).join(""),g="";i&&(g=`<div class="pg-export" role="toolbar" aria-label="Export palette" style="display:flex;gap:0.5rem;margin-block-start:var(--size-xs,0.5rem)">
10
10
  <button type="button" class="pg-copy-hex" style="padding:0.25rem 0.75rem;border:1px solid var(--color-border,#ccc);border-radius:var(--radius-s,0.25rem);background:var(--color-surface,#fff);color:var(--color-text,#333);cursor:pointer;font-size:var(--font-size-xs,0.75rem);font-family:inherit">Copy Hex</button>
11
11
  <button type="button" class="pg-copy-css" style="padding:0.25rem 0.75rem;border:1px solid var(--color-border,#ccc);border-radius:var(--radius-s,0.25rem);background:var(--color-surface,#fff);color:var(--color-text,#333);cursor:pointer;font-size:var(--font-size-xs,0.75rem);font-family:inherit">Copy CSS</button>
12
- </div>`);let m=this.#e;for(let a of[...this.children])a!==m&&(a.classList?.contains("pg-seed-label")||a.remove());if(m&&!this.querySelector(".pg-seed-label")){let a=document.createElement("span");a.className="pg-seed-label",a.textContent="Seed Color",m.before(a)}let p=document.createElement("div");if(p.className=`palette ${t}`,p.setAttribute("role","list"),p.setAttribute("aria-label","Color palette"),p.style.cssText=y,p.innerHTML=T,m?m.after(p):this.prepend(p),x){let a=document.createElement("div");a.innerHTML=x,this.append(a.firstElementChild)}this.#l(p,d,c,s),i&&this.#u()}#l(e,t,r,s){e.querySelectorAll(".color-box").forEach(n=>{s||(n.addEventListener("pointerenter",()=>{let i=n.querySelector(".color-value");i&&(i.style.opacity="1")}),n.addEventListener("pointerleave",()=>{let i=n.querySelector(".color-value");i&&(i.style.opacity="0")})),n.addEventListener("click",()=>{let i=Number(n.dataset.index),d=t[i],c=r[i]||"";navigator.clipboard?.writeText(d),this.dispatchEvent(new CustomEvent("color-palette:select",{bubbles:!0,detail:{color:d,name:c,index:i}})),n.style.outline="3px solid currentColor",n.style.outlineOffset="2px",setTimeout(()=>{n.style.outline="",n.style.outlineOffset=""},600)})})}#c(){let e=this.#e;e&&(e.tagName==="COLOR-PICKER"?this.listen(e,"color-picker:change",t=>{this.#t=t.detail.hex,this.#n(),this.#s()}):this.listen(e,"input",()=>{this.#t=e.value,this.#n(),this.#s()}))}#u(){let e=this.querySelector(".pg-copy-hex"),t=this.querySelector(".pg-copy-css");e&&e.addEventListener("click",()=>{navigator.clipboard?.writeText(this.#o.join(", ")),this.#a(e,"Copy Hex")}),t&&t.addEventListener("click",()=>{let r=this.getAttribute("harmony")||"complementary",s=this.#p(r);navigator.clipboard?.writeText(s),this.#a(t,"Copy CSS")})}#d(e){if(e.startsWith("#")){let{r:t,g:r,b:s}=v(e);return .2126*(t/255)+.7152*(r/255)+.0722*(s/255)>.4?"#000":"#fff"}return"#000"}#p(e){return e==="monochromatic"?this.#o.map((t,r)=>`--color-seed-${this.#r[r]||r+1}: ${t};`).join(`
13
- `):this.#o.map((t,r)=>`--palette-${this.#r[r]?this.#r[r].toLowerCase().replace(/\s+/g,"-"):`${r+1}`}: ${t};`).join(`
14
- `)}#a(e,t){e.textContent="Copied!",setTimeout(()=>{e.textContent=t},1500)}#s(){let e=this.getAttribute("harmony")||"complementary";this.dispatchEvent(new CustomEvent("palette-generator:generate",{bubbles:!0,detail:{colors:[...this.#o],harmony:e,seed:this.#t}}))}};S("palette-generator",w);
12
+ </div>`);let f=this.#e;for(let a of[...this.children])a!==f&&(a.classList?.contains("pg-seed-label")||a.remove());if(f&&!this.querySelector(".pg-seed-label")){let a=document.createElement("span");a.className="pg-seed-label",a.textContent="Seed Color",f.before(a)}let p=document.createElement("div");if(p.className=`palette ${n}`,p.setAttribute("role","list"),p.setAttribute("aria-label","Color palette"),p.style.cssText=x,p.innerHTML=D,f?f.after(p):this.prepend(p),g){let a=document.createElement("div");a.innerHTML=g,a.firstElementChild&&this.append(a.firstElementChild)}this.#a(p,l,u,r),i&&this.#l()}#a(e,n,o,r){e.querySelectorAll(".color-box").forEach(s=>{let i=s;r||(i.addEventListener("pointerenter",()=>{let l=i.querySelector(".color-value");l&&(l.style.opacity="1")}),i.addEventListener("pointerleave",()=>{let l=i.querySelector(".color-value");l&&(l.style.opacity="0")})),i.addEventListener("click",()=>{let l=Number(i.dataset.index),u=n[l],S=o[l]||"";h(u,{button:i,announceMessage:"Color copied"}),this.dispatchEvent(new CustomEvent("color-palette:select",{bubbles:!0,detail:{color:u,name:S,index:l}})),i.style.outline="3px solid currentColor",i.style.outlineOffset="2px",setTimeout(()=>{i.style.outline="",i.style.outlineOffset=""},600)})})}#c(){let e=this.#e;e&&(e.tagName==="COLOR-PICKER"?this.listen(e,"color-picker:change",n=>{this.#t=n.detail.hex,this.#r(),this.#s()}):this.listen(e,"input",()=>{this.#t=e.value,this.#r(),this.#s()}))}#l(){let e=this.querySelector(".pg-copy-hex"),n=this.querySelector(".pg-copy-css");e&&e.addEventListener("click",()=>{h(this.#n.join(", "),{button:e,announceMessage:"Hex values copied"})}),n&&n.addEventListener("click",()=>{let o=this.getAttribute("harmony")||"complementary",r=this.#d(o);h(r,{button:n,announceMessage:"CSS variables copied"})})}#u(e){if(e.startsWith("#")){let{r:n,g:o,b:r}=M(e);return .2126*(n/255)+.7152*(o/255)+.0722*(r/255)>.4?"#000":"#fff"}return"#000"}#d(e){return e==="monochromatic"?this.#n.map((n,o)=>`--color-seed-${this.#o[o]||o+1}: ${n};`).join(`
13
+ `):this.#n.map((n,o)=>`--palette-${this.#o[o]?this.#o[o].toLowerCase().replace(/\s+/g,"-"):`${o+1}`}: ${n};`).join(`
14
+ `)}#s(){let e=this.getAttribute("harmony")||"complementary";this.dispatchEvent(new CustomEvent("palette-generator:generate",{bubbles:!0,detail:{colors:[...this.#n],harmony:e,seed:this.#t}}))}};k("palette-generator",C);
15
15
  //# sourceMappingURL=palette-generator.js.map
@@ -0,0 +1,2 @@
1
+ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function m(a,t,s={}){let e=s.priority??10,i={impl:t,bundle:s.bundle,contract:s.contract,priority:e},r=f.get(a);if(customElements.get(a)){if(!r||r.priority>=e){r&&r.priority===e&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${s.bundle}".`);return}console.warn(`[VB Bundle] Tag <${a}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${s.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=e){r.priority===e&&console.warn(`[VB Bundle] Tag <${a}> already registered by "${r.bundle}". Skipping "${s.bundle}" (first wins at equal priority).`);return}f.set(a,i),customElements.define(a,t)}var c=class extends HTMLElement{#t=[];#e;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,s,e,i){t.addEventListener(s,e,i),this.#t.push(()=>t.removeEventListener(s,e,i))}setup(){}teardown(){}setState(t,s){this.#e||(this.#e=this.attachInternals());let e=this.#e.states;try{s?e.add(t):e.delete(t)}catch{let i=`--${t}`;s?e.add(i):e.delete(i)}}_adoptInternals(t){this.#e||(this.#e=t)}};var d=class extends c{static observedAttributes=["data-closed","data-multi"];#t;#e;#s;#n;#a=new WeakSet;setup(){this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.#l()||"Poll"),this.#e=this.querySelector(':scope > [slot="question"]');let t=this.#i();this.#e&&(this.#t=document.createElement("div"),this.#t.className="poll-question",this.#t.id=`poll-q-${this.#c()}`,this.#t.appendChild(this.#e)),this.#s=document.createElement("div"),this.#s.className="poll-options",this.#o(),this.#t&&this.#s.setAttribute("aria-labelledby",this.#t.id),t.forEach(e=>this.#s.appendChild(e)),this.#n=document.createElement("output"),this.#n.className="poll-total",this.#n.setAttribute("aria-live","polite");let s=[];this.#t&&s.push(this.#t),s.push(this.#s,this.#n),this.replaceChildren(...s),t.forEach(e=>this.#d(e)),this.#r()}attributeChangedCallback(t,s,e){!this.isConnected||s===e||(t==="data-closed"?(this.#r(),this.dispatchEvent(new CustomEvent("poll-wc:closed-change",{bubbles:!0,detail:{closed:this.hasAttribute("data-closed")}}))):t==="data-multi"&&(this.#o(),this.#r()))}#i(){return this.#s?[...this.#s.querySelectorAll(":scope > button[data-option]")]:[...this.querySelectorAll(":scope > button[data-option]")]}#l(){return this.querySelector(':scope > [slot="question"]')?.textContent.trim()}#o(){this.#s&&this.#s.setAttribute("role",this.hasAttribute("data-multi")?"group":"radiogroup")}#c(){return Math.random().toString(36).slice(2,8)}#d(t){if(this.#a.has(t))return;this.#a.add(t),t.type="button",t.classList.add("poll-option");let s=t.textContent;t.replaceChildren();let e=document.createElement("span");e.className="poll-option-label",e.textContent=s;let i=document.createElement("span");i.className="poll-option-bar",i.setAttribute("aria-hidden","true");let r=document.createElement("span");r.className="poll-option-count",r.setAttribute("aria-hidden","true"),t.append(e,i,r),this.listen(t,"click",()=>this.#u(t)),this.listen(t,"keydown",n=>this.#h(n,t))}#u(t){if(this.hasAttribute("data-closed")||this.hasAttribute("disabled"))return;let s=t.dataset.option,e=Number(t.dataset.count)||0,i=t.hasAttribute("data-mine");if(!this.hasAttribute("data-multi")&&!i){let n=this.#i().find(o=>o.hasAttribute("data-mine")&&o!==t);n&&this.dispatchEvent(new CustomEvent("poll-wc:vote",{bubbles:!0,detail:{option:n.dataset.option,action:"remove",count:Number(n.dataset.count)||0,mine:!0}}))}this.dispatchEvent(new CustomEvent("poll-wc:vote",{bubbles:!0,detail:{option:s,action:i?"remove":"add",count:e,mine:i}}))}#h=(t,s)=>{let e=this.#i(),i=e.indexOf(s),r=this.hasAttribute("data-multi"),n=i;switch(t.key){case"ArrowDown":case"ArrowRight":t.preventDefault(),n=(i+1)%e.length;break;case"ArrowUp":case"ArrowLeft":t.preventDefault(),n=(i-1+e.length)%e.length;break;case"Home":t.preventDefault(),n=0;break;case"End":t.preventDefault(),n=e.length-1;break;default:return}e[n].focus(),!r&&this.hasAttribute("data-closed")};#r(){let t=this.#i(),s=t.reduce((n,o)=>n+(Number(o.dataset.count)||0),0),e=this.hasAttribute("data-closed"),i=this.hasAttribute("data-multi"),r=this.hasAttribute("data-hide-counts");t.forEach((n,o)=>{let l=Number(n.dataset.count)||0,u=n.hasAttribute("data-mine"),h=s>0?Math.round(l/s*1e3)/10:0;if(n.style.setProperty("--option-pct",String(h)),n.setAttribute("aria-checked",u?"true":"false"),n.setAttribute("role",i?"checkbox":"radio"),e||this.hasAttribute("disabled")?n.setAttribute("aria-disabled","true"):n.removeAttribute("aria-disabled"),i)n.setAttribute("tabindex","0");else{let E=t.find(v=>v.hasAttribute("data-mine"))||t[0];n.setAttribute("tabindex",n===E?"0":"-1")}let b=n.querySelector(".poll-option-count");b&&(b.textContent=r?"":`${l}`);let p=l===1?"vote":"votes",A=u?", your choice":"",y=n.querySelector(".poll-option-label")?.textContent||n.dataset.option;n.setAttribute("aria-label",`${y}, ${l} ${p} (${h}%)${A}`)}),this.#n&&(this.#n.textContent=`${s} ${s===1?"vote":"votes"}`)}setCount(t,s,e={}){let i=this.#i().find(r=>r.dataset.option===t);i&&(i.dataset.count=String(Math.max(0,Number(s)||0)),e.mine===!0?i.setAttribute("data-mine",""):e.mine===!1&&i.removeAttribute("data-mine"),this.#r())}setCounts(t,s={}){let e=Array.isArray(s.mine)?s.mine:s.mine?[s.mine]:null;for(let i of this.#i()){let r=i.dataset.option;t[r]!=null&&(i.dataset.count=String(Math.max(0,Number(t[r])))),e&&(e.includes(r)?i.setAttribute("data-mine",""):i.removeAttribute("data-mine"))}this.#r()}close(){this.setAttribute("data-closed","")}open(){this.removeAttribute("data-closed")}get totalVotes(){return this.#i().reduce((t,s)=>t+(Number(s.dataset.count)||0),0)}get myVotes(){return this.#i().filter(t=>t.hasAttribute("data-mine")).map(t=>t.dataset.option)}};m("poll-wc",d);export{d as PollWc};
2
+ //# sourceMappingURL=poll-wc.js.map
@@ -0,0 +1,2 @@
1
+ var m=window.matchMedia("(prefers-reduced-motion: reduce)");var h=new Map;function l(n,t,e={}){let o=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:o},s=h.get(n);if(customElements.get(n)){if(!s||s.priority>=o){s&&s.priority===o&&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>=o){s.priority===o&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}h.set(n,i),customElements.define(n,t)}var r=class extends HTMLElement{#t=[];#e;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,o,i){t.addEventListener(e,o,i),this.#t.push(()=>t.removeEventListener(e,o,i))}setup(){}teardown(){}setState(t,e){this.#e||(this.#e=this.attachInternals());let o=this.#e.states;try{e?o.add(t):o.delete(t)}catch{let i=`--${t}`;e?o.add(i):o.delete(i)}}_adoptInternals(t){this.#e||(this.#e=t)}};var a=CSS.supports("anchor-name","--x"),f=CSS.supports("position-area","bottom"),u=0,c=class extends r{#t=null;#e=null;#s=null;#o=null;setup(){this.id||(this.id=`pop-over-${++u}`);let t=this.dataset.mode||"auto";this.hasAttribute("popover")||this.setAttribute("popover",t),this.#n(),this.#r(),this.#s=e=>{let o=e.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${o}`,{detail:{state:e.newState},bubbles:!0,composed:!0})),!a&&e.newState==="open"&&this.#t&&this.#i()},this.listen(this,"beforetoggle",this.#s),a||(this.#o=()=>{this.matches(":popover-open")&&this.#t&&this.#i()},this.listen(window,"resize",this.#o),this.listen(window,"scroll",this.#o,{capture:!0,passive:!0}))}show(){this.matches(":popover-open")||this.showPopover()}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#n(){let t=this.dataset.anchor;t?this.#t=document.getElementById(t)||document.querySelector(t):this.#t=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#r(){if(!(!this.#t||!a)&&(this.#e=`--pop-over-anchor-${this.id}`,this.#t.style.setProperty("anchor-name",this.#e),this.style.setProperty("position-anchor",this.#e),this.setAttribute("data-anchor-name",this.#e||""),!f)){let t=this.dataset.position||"bottom";this.#a(t)}}#a(t){let e="var(--_pop-over-offset, var(--size-xs))",o={top:{bottom:`calc(anchor(top) + ${e})`,left:"anchor(left)"},bottom:{top:`calc(anchor(bottom) + ${e})`,left:"anchor(left)"},left:{right:`calc(anchor(left) + ${e})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${e})`,top:"anchor(top)"}},i=t.split("-")[0],s=o[i]||o.bottom;Object.entries(s).forEach(([d,p])=>this.style.setProperty(d,p))}#i(){if(!this.#t)return;let t=this.#t.getBoundingClientRect(),e=this.dataset.position||"bottom",o=this.#c(),i,s;switch(e.split("-")[0]){case"top":i=t.top-this.offsetHeight-o,s=t.left;break;case"left":i=t.top,s=t.left-this.offsetWidth-o;break;case"right":i=t.top,s=t.right+o;break;default:i=t.bottom+o,s=t.left;break}e.endsWith("-end")&&(e.startsWith("top")||e.startsWith("bottom")?s=t.right-this.offsetWidth:i=t.bottom-this.offsetHeight),this.style.position="fixed",this.style.top=`${Math.round(i)}px`,this.style.left=`${Math.round(s)}px`,this.style.margin="0"}#c(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset]??t.xs}};l("pop-over",c);
2
+ //# sourceMappingURL=pop-over.js.map
@@ -1,9 +1,9 @@
1
- var w=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function y(r,e,n={}){let s=n.priority??10,o={impl:e,bundle:n.bundle,contract:n.contract,priority:s},t=m.get(r);if(customElements.get(r)){if(!t||t.priority>=s){t&&t.priority===s&&t.impl!==e&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${t.bundle}" (priority ${t.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${t.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(t&&t.priority>=s){t.priority===s&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${t.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}m.set(r,o),customElements.define(r,e)}var d=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,s,o){e.addEventListener(n,s,o),this.#e.push(()=>e.removeEventListener(n,s,o))}setup(){}teardown(){}};var f=class extends d{setup(){this.#e().catch(()=>{})}async#e(){let e=this.getAttribute("data-lens-src")||"/api/analytics/popular",n=this.getAttribute("window"),s=new URL(e,document.baseURI);n&&s.searchParams.set("window",n);let o=null;try{let i=await fetch(s,{credentials:"omit"});if(!i.ok)throw new Error(`status ${i.status}`);o=await i.json()}catch(i){this.#r(i.message);return}let t=Array.isArray(o?.pages)?o.pages:Array.isArray(o)?o:[];if(!t.length){this.#n();return}let a=this.getAttribute("data-meta-src"),c=null;if(a)try{let i=await fetch(a,{credentials:"omit"});if(i.ok){let l=await i.json(),u=Array.isArray(l)?l:l?.pages||[];c=new Map(u.map(h=>[h.url,h]))}}catch{}this.#t(t,c)}#t(e,n){let s=parseInt(this.getAttribute("limit")||"10",10)||10,o=e.slice(0,s),t=['<h2 class="popularity-heading">Most visited</h2>'];t.push('<ol class="popularity-list">');for(let a of o){let c=n?.get(a.url)||{},i=a.title||c.title||a.url,l=g(a.views??a.count??0),u=c.provenance?`<span class="popularity-prov" data-provenance="${b(c.provenance)}">${p(c.provenance)}</span>`:"";t.push(`<li><a href="${b(a.url)}">${p(i)}</a><small>${l} views${u?` \xB7 ${u}`:""}</small></li>`)}t.push("</ol>"),this.innerHTML=t.join(`
1
+ var w=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function y(s,e,n={}){let r=n.priority??10,i={impl:e,bundle:n.bundle,contract:n.contract,priority:r},t=m.get(s);if(customElements.get(s)){if(!t||t.priority>=r){t&&t.priority===r&&t.impl!==e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${t.bundle}" (priority ${t.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${t.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(t&&t.priority>=r){t.priority===r&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${t.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}m.set(s,i),customElements.define(s,e)}var u=class extends HTMLElement{#t=[];#e;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 e of this.#t)e();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,r,i){e.addEventListener(n,r,i),this.#t.push(()=>e.removeEventListener(n,r,i))}setup(){}teardown(){}setState(e,n){this.#e||(this.#e=this.attachInternals());let r=this.#e.states;try{n?r.add(e):r.delete(e)}catch{let i=`--${e}`;n?r.add(i):r.delete(i)}}_adoptInternals(e){this.#e||(this.#e=e)}};var f=class extends u{setup(){this.#t().catch(()=>{})}async#t(){let e=this.getAttribute("data-lens-src")||"/api/analytics/popular",n=this.getAttribute("window"),r=new URL(e,document.baseURI);n&&r.searchParams.set("window",n);let i=null;try{let o=await fetch(r,{credentials:"omit"});if(!o.ok)throw new Error(`status ${o.status}`);i=await o.json()}catch(o){this.#r(o.message);return}let t=Array.isArray(i?.pages)?i.pages:Array.isArray(i)?i:[];if(!t.length){this.#n();return}let a=this.getAttribute("data-meta-src"),c=null;if(a)try{let o=await fetch(a,{credentials:"omit"});if(o.ok){let l=await o.json(),d=Array.isArray(l)?l:l?.pages||[];c=new Map(d.map(h=>[h.url,h]))}}catch{}this.#e(t,c)}#e(e,n){let r=parseInt(this.getAttribute("limit")||"10",10)||10,i=e.slice(0,r),t=['<h2 class="popularity-heading">Most visited</h2>'];t.push('<ol class="popularity-list">');for(let a of i){let c=n?.get(a.url)||{},o=a.title||c.title||a.url,l=g(a.views??a.count??0),d=c.provenance?`<span class="popularity-prov" data-provenance="${b(c.provenance)}">${p(c.provenance)}</span>`:"";t.push(`<li><a href="${b(a.url)}">${p(o)}</a><small>${l} views${d?` \xB7 ${d}`:""}</small></li>`)}t.push("</ol>"),this.innerHTML=t.join(`
2
2
  `)}#r(e){this.innerHTML=`
3
3
  <h2 class="popularity-heading">Most visited</h2>
4
4
  <p class="popularity-empty">Popularity data is unavailable right now${e?` (${p(e)})`:""}.</p>
5
5
  `}#n(){this.innerHTML=`
6
6
  <h2 class="popularity-heading">Most visited</h2>
7
7
  <p class="popularity-empty">Not enough data yet to surface most-visited pages.</p>
8
- `}};function g(r){let e=Number(r)||0;return e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function p(r){return String(r??"").replace(/[&<>]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;"})[e])}function b(r){return String(r??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}y("popularity-index",f);export{f as PopularityIndex};
8
+ `}};function g(s){let e=Number(s)||0;return e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function p(s){return String(s??"").replace(/[&<>]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;"})[e])}function b(s){return String(s??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}y("popularity-index",f);export{f as PopularityIndex};
9
9
  //# sourceMappingURL=popularity-index.js.map
@@ -1,2 +1,2 @@
1
- var h=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function u(r,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},n=l.get(r);if(customElements.get(r)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}l.set(r,s),customElements.define(r,t)}var c=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),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,i,s){t.addEventListener(e,i,s),this.#e.push(()=>t.removeEventListener(e,i,s))}setup(){}teardown(){}};var a=class extends c{#e;#t;#n=null;setup(){this.#n===null&&(this.#n=this.getAttribute("label")||this.textContent.trim()||"Print this page");let t=this.#n,e=this.hasAttribute("raw-toggle");this.innerHTML="",e&&this.setAttribute("role","group");let i=this.getAttribute("variant")||"icon";this.#e=document.createElement("button"),this.#e.type="button",this.#e.className="print-trigger",this.#e.setAttribute("aria-label",t);let s=i!=="label",n=i!=="icon";if(s){let o=document.createElement("icon-wc");o.setAttribute("name","printer"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),this.#e.appendChild(o)}if(n){let o=document.createElement("span");o.textContent=t,this.#e.appendChild(o)}if(this.listen(this.#e,"click",this.#i),this.append(this.#e),e){let o=document.createElement("label");this.#t=document.createElement("input"),this.#t.type="checkbox";let d=document.createElement("span");d.textContent="Print without VB styles",o.append(this.#t,d),this.append(o)}}teardown(){this.#e=null,this.#t=null}#i=()=>{let t=this.#t?.checked;if(t&&document.documentElement.setAttribute("data-print-raw",""),window.print(),t){let e=()=>{document.documentElement.removeAttribute("data-print-raw"),window.removeEventListener("afterprint",e),clearTimeout(i)};window.addEventListener("afterprint",e,{once:!0});let i=setTimeout(e,5e3)}}};u("print-page",a);export{a as PrintPage};
1
+ var h=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function u(r,e,t={}){let n=t.priority??10,s={impl:e,bundle:t.bundle,contract:t.contract,priority:n},i=l.get(r);if(customElements.get(r)){if(!i||i.priority>=n){i&&i.priority===n&&i.impl!==e&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=n){i.priority===n&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${i.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}l.set(r,s),customElements.define(r,e)}var c=class extends HTMLElement{#e=[];#t;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 e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,n,s){e.addEventListener(t,n,s),this.#e.push(()=>e.removeEventListener(t,n,s))}setup(){}teardown(){}setState(e,t){this.#t||(this.#t=this.attachInternals());let n=this.#t.states;try{t?n.add(e):n.delete(e)}catch{let s=`--${e}`;t?n.add(s):n.delete(s)}}_adoptInternals(e){this.#t||(this.#t=e)}};var a=class extends c{#e;#t;#n=null;setup(){this.#n===null&&(this.#n=this.getAttribute("label")||this.textContent.trim()||"Print this page");let e=this.#n,t=this.hasAttribute("raw-toggle");this.innerHTML="",t&&this.setAttribute("role","group");let n=this.getAttribute("variant")||"icon";this.#e=document.createElement("button"),this.#e.type="button",this.#e.className="print-trigger",this.#e.setAttribute("aria-label",e);let s=n!=="label",i=n!=="icon";if(s){let o=document.createElement("icon-wc");o.setAttribute("name","printer"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),this.#e.appendChild(o)}if(i){let o=document.createElement("span");o.textContent=e,this.#e.appendChild(o)}if(this.listen(this.#e,"click",this.#i),this.append(this.#e),t){let o=document.createElement("label");this.#t=document.createElement("input"),this.#t.type="checkbox";let d=document.createElement("span");d.textContent="Print without VB styles",o.append(this.#t,d),this.append(o)}}teardown(){this.#e=null,this.#t=null}#i=()=>{let e=this.#t?.checked;if(e&&document.documentElement.setAttribute("data-print-raw",""),window.print(),e){let t=()=>{document.documentElement.removeAttribute("data-print-raw"),window.removeEventListener("afterprint",t),clearTimeout(n)};window.addEventListener("afterprint",t,{once:!0});let n=setTimeout(t,5e3)}}};u("print-page",a);export{a as PrintPage};
2
2
  //# sourceMappingURL=print-page.js.map
@@ -0,0 +1,3 @@
1
+ var y=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function b(c,t,r={}){let e=r.priority??10,n={impl:t,bundle:r.bundle,contract:r.contract,priority:e},s=g.get(c);if(customElements.get(c)){if(!s||s.priority>=e){s&&s.priority===e&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${r.bundle}".`);return}console.warn(`[VB Bundle] Tag <${c}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${r.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=e){s.priority===e&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${s.bundle}". Skipping "${r.bundle}" (first wins at equal priority).`);return}g.set(c,n),customElements.define(c,t)}var m=class extends HTMLElement{#r=[];#s;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.#r)t();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,r,e,n){t.addEventListener(r,e,n),this.#r.push(()=>t.removeEventListener(r,e,n))}setup(){}teardown(){}setState(t,r){this.#s||(this.#s=this.attachInternals());let e=this.#s.states;try{r?e.add(t):e.delete(t)}catch{let n=`--${t}`;r?e.add(n):e.delete(n)}}_adoptInternals(t){this.#s||(this.#s=t)}};var f=class c extends m{setup(){let t=this.getAttribute("start"),r=this.getAttribute("end");if(!t||!r)return console.warn("product-roadmap: start and end attributes required"),!1;let e=c.#l(t,"start"),n=c.#l(r,"end");if(!e||!n||n<=e)return console.warn("product-roadmap: invalid start/end",t,r),!1;this.#t=e,this.#a=n,this.#m=n.getTime()-e.getTime(),this.#f=this.getAttribute("view")==="month"?"month":"quarter",this.#u=this.hasAttribute("editable");let s=[...this.querySelectorAll(":scope > section[data-lane]")];return s.length?(this.#o=s,this.#r(),!0):(console.warn("product-roadmap: no <section data-lane> children found"),!1)}attributeChangedCallback(){this.isConnected&&this.#o.length&&this.#r()}#r(){[...this.children].forEach(n=>{this.#o.includes(n)||n.remove()}),this.#o.forEach(n=>{n.hidden=!0});let t=document.createElement("div");t.className="rm-wrapper";let r=this.#s();t.appendChild(r);let e=document.createElement("div");e.className="rm-lanes";for(let n of this.#o){let s=n.getAttribute("data-lane")||"",i=document.createElement("section");i.className="rm-lane",i.dataset.lane=s;let o=document.createElement("header");o.className="rm-lane-label",o.textContent=s,i.appendChild(o);let d=document.createElement("div");d.className="rm-track",d.dataset.lane=s;let a=[...n.querySelectorAll(":scope > article[data-start][data-end]")];for(let h of a){let u=this.#y(h,s);u&&d.appendChild(u)}this.#u&&(d.addEventListener("dragover",this.#v),d.addEventListener("drop",this.#F)),i.appendChild(d),e.appendChild(i)}if(t.appendChild(e),this.hasAttribute("today-marker")&&this.#t&&this.#a){let n=new Date;if(n>=this.#t&&n<=this.#a){let s=document.createElement("div");s.className="rm-today",s.style.setProperty("--rm-x",this.#e(n).toFixed(4)),s.title=`Today: ${c.#d(n)}`,e.appendChild(s)}}this.appendChild(t),this.#C=t}#s(){let t=document.createElement("header");t.className="rm-axis";let r=this.#x();for(let e of r){let n=document.createElement("div");n.className="rm-tick",n.style.setProperty("--rm-x",e.startFraction.toFixed(4)),n.style.setProperty("--rm-w",(e.endFraction-e.startFraction).toFixed(4)),n.textContent=e.label,t.appendChild(n)}return t}#y(t,r){let e=c.#l(t.getAttribute("data-start"),"start"),n=c.#l(t.getAttribute("data-end"),"end");if(!e||!n||!this.#t||!this.#a)return null;let s=e<this.#t?this.#t:e,i=n>this.#a?this.#a:n;if(s>=i)return null;let o=this.#e(s),d=this.#e(i)-o,a=document.createElement("article");a.className="rm-bar",a.style.setProperty("--rm-x",o.toFixed(4)),a.style.setProperty("--rm-w",d.toFixed(4)),a.dataset.lane=r,a.dataset.start=c.#d(e),a.dataset.end=c.#d(n),t.dataset.status&&(a.dataset.status=t.dataset.status),t.id&&(a.dataset.sourceId=t.id),this.#u&&a.setAttribute("draggable","true");let h=t.querySelector("h1, h2, h3, h4, h5, h6"),u=document.createElement("span");if(u.className="rm-bar-title",u.textContent=h?h.textContent.trim():(t.textContent||"").trim().split(`
2
+ `)[0],a.appendChild(u),a.setAttribute("aria-label",`${u.textContent} \u2014 ${a.dataset.start} to ${a.dataset.end} in ${r}`),a.addEventListener("click",p=>{this.#n||this.dispatchEvent(new CustomEvent("product-roadmap:select",{bubbles:!0,detail:{initiative:t,lane:r,start:a.dataset.start,end:a.dataset.end,status:a.dataset.status||null}}))}),this.#u){let p=document.createElement("span");p.className="rm-bar-handle",p.setAttribute("aria-label","Resize end date"),a.appendChild(p),p.addEventListener("pointerdown",l=>this.#w(l,a,t)),a.addEventListener("pointerdown",l=>{l.target!==p&&this.#E(l,a,t)}),a.addEventListener("dragstart",l=>{l.dataTransfer&&(l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("text/plain",t.id||a.dataset.sourceId||"")),this.#c=t,this.#g=r}),a.addEventListener("dragend",()=>{this.#c=null,this.#g=null})}return a}#E(t,r,e){if(t.button!==0)return;t.preventDefault();let n=r.parentElement.getBoundingClientRect(),s=t.clientX,i=parseFloat(r.style.getPropertyValue("--rm-x"))||0,o=parseFloat(r.style.getPropertyValue("--rm-w"))||0;this.#n={kind:"move",bar:r,initiative:e,trackRect:n,startX:s,startFraction:i,widthFraction:o},r.setPointerCapture(t.pointerId),r.addEventListener("pointermove",this.#h),r.addEventListener("pointerup",this.#i),r.addEventListener("pointercancel",this.#i)}#w(t,r,e){if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let n=r.parentElement.getBoundingClientRect(),s=t.clientX,i=parseFloat(r.style.getPropertyValue("--rm-x"))||0,o=parseFloat(r.style.getPropertyValue("--rm-w"))||0;this.#n={kind:"resize",bar:r,initiative:e,trackRect:n,startX:s,startFraction:i,widthFraction:o},r.setPointerCapture(t.pointerId),r.addEventListener("pointermove",this.#h),r.addEventListener("pointerup",this.#i),r.addEventListener("pointercancel",this.#i)}#h=t=>{if(!this.#n)return;let{kind:r,bar:e,trackRect:n,startX:s,startFraction:i,widthFraction:o}=this.#n,d=(t.clientX-s)/n.width;if(r==="move"){let a=Math.max(0,Math.min(1-o,i+d));e.style.setProperty("--rm-x",a.toFixed(4))}else if(r==="resize"){let a=Math.max(.02,Math.min(1-i,o+d));e.style.setProperty("--rm-w",a.toFixed(4))}};#i=t=>{if(!this.#n)return;let{kind:r,bar:e,initiative:n}=this.#n;e.releasePointerCapture(t.pointerId),e.removeEventListener("pointermove",this.#h),e.removeEventListener("pointerup",this.#i),e.removeEventListener("pointercancel",this.#i);let s=parseFloat(e.style.getPropertyValue("--rm-x"))||0,i=parseFloat(e.style.getPropertyValue("--rm-w"))||0,o=this.#p(this.#b(s)),d=this.#p(this.#b(s+i));e.dataset.start=c.#d(o),e.dataset.end=c.#d(d);let a=this.#e(o),h=this.#e(d)-a;e.style.setProperty("--rm-x",a.toFixed(4)),e.style.setProperty("--rm-w",h.toFixed(4)),n&&(n.setAttribute("data-start",e.dataset.start??""),n.setAttribute("data-end",e.dataset.end??"")),this.dispatchEvent(new CustomEvent(r==="move"?"product-roadmap:reschedule":"product-roadmap:resize",{bubbles:!0,detail:{initiative:n,lane:e.dataset.lane,start:e.dataset.start,end:e.dataset.end}})),setTimeout(()=>{this.#n=null},0)};#v=t=>{this.#c&&(t.preventDefault(),t.dataTransfer.dropEffect="move")};#F=t=>{if(!this.#c)return;t.preventDefault();let r=t.currentTarget.dataset.lane,e=this.#c,n=this.#g;if(r===n)return;let s=this.#o.find(i=>i.getAttribute("data-lane")===r);s&&s.appendChild(e),this.dispatchEvent(new CustomEvent("product-roadmap:move",{bubbles:!0,detail:{initiative:e,fromLane:n,toLane:r,start:e.getAttribute("data-start"),end:e.getAttribute("data-end")}})),this.#r()};#e(t){if(!this.#t)return 0;let r=t.getTime()-this.#t.getTime();return Math.max(0,Math.min(1,r/this.#m))}#b(t){let r=this.#t??new Date;return new Date(r.getTime()+t*this.#m)}#p(t){if(this.#f==="month")return new Date(t.getFullYear(),t.getMonth(),1);let r=t.getMonth(),e=Math.floor(r/3)*3;return new Date(t.getFullYear(),e,1)}#x(){let t=[],r=this.#t,e=this.#a;if(!r||!e)return t;if(this.#f==="quarter"){let n=this.#p(r);for(;n<e;){let s=new Date(n.getFullYear(),n.getMonth()+3,1),i=this.#e(n<r?r:n),o=this.#e(s>e?e:s),d=Math.floor(n.getMonth()/3)+1;t.push({startFraction:i,endFraction:o,label:`Q${d} ${n.getFullYear()}`}),n=s}}else{let n=new Date(r.getFullYear(),r.getMonth(),1);for(;n<e;){let s=new Date(n.getFullYear(),n.getMonth()+1,1),i=this.#e(n<r?r:n),o=this.#e(s>e?e:s),d=n.toLocaleString(void 0,{month:"short"});t.push({startFraction:i,endFraction:o,label:`${d} ${n.getFullYear()}`}),n=s}}return t}static#l(t,r){if(!t)return null;let e=String(t).match(/^(\d{4})-Q([1-4])$/i);if(e){let i=Number(e[1]),d=(Number(e[2])-1)*3;return r==="end"?new Date(i,d+3,0):new Date(i,d,1)}let n=String(t).match(/^(\d{4})-(\d{2})-(\d{2})/);if(n)return new Date(Number(n[1]),Number(n[2])-1,Number(n[3]));let s=new Date(t);return isNaN(s.getTime())?null:s}static#d(t){let r=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${r}-${e}`}#t=null;#a=null;#m=0;#f="quarter";#u=!1;#o=[];#C=null;#n=null;#c=null;#g=null};b("product-roadmap",f);export{f as Roadmap};
3
+ //# sourceMappingURL=product-roadmap.js.map
@@ -0,0 +1,2 @@
1
+ var p=window.matchMedia("(prefers-reduced-motion: reduce)");var d=new Map;function l(i,t,r={}){let e=r.priority??10,s={impl:t,bundle:r.bundle,contract:r.contract,priority:e},n=d.get(i);if(customElements.get(i)){if(!n||n.priority>=e){n&&n.priority===e&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${r.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${r.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=e){n.priority===e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${n.bundle}". Skipping "${r.bundle}" (first wins at equal priority).`);return}d.set(i,s),customElements.define(i,t)}var c=class extends HTMLElement{#r=[];#t;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.#r)t();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,r,e,s){t.addEventListener(r,e,s),this.#r.push(()=>t.removeEventListener(r,e,s))}setup(){}teardown(){}setState(t,r){this.#t||(this.#t=this.attachInternals());let e=this.#t.states;try{r?e.add(t):e.delete(t)}catch{let s=`--${t}`;r?e.add(s):e.delete(s)}}_adoptInternals(t){this.#t||(this.#t=t)}};var a=class extends c{static observedAttributes=["data-current"];#r=[];#t=!1;setup(){this.hasAttribute("role")||this.setAttribute("role","list"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Progress"),this.#e().forEach(t=>this.#o(t)),this.#n()}attributeChangedCallback(t,r,e){if(!(!this.isConnected||r===e)&&t==="data-current"){if(this.#n(),this.#t){this.#t=!1;return}this.dispatchEvent(new CustomEvent("progress-tracker:step",{bubbles:!0,detail:{step:this.#i(),previousStep:this.#c(r),source:"attr"}}))}}#e(){return[...this.querySelectorAll(":scope > li[data-step]")]}#o(t){if(t.dataset.decorated==="")return;t.dataset.decorated="",t.setAttribute("role","listitem");let r=t.textContent;t.replaceChildren();let e=document.createElement("span");e.className="pt-circle",e.setAttribute("aria-hidden","true");let s=document.createElement("span");s.className="pt-label",s.textContent=r,t.append(e,s),this.hasAttribute("data-clickable")&&(t.addEventListener("click",()=>this.#a(t)),t.style.cursor="pointer")}#n(){let t=this.#e(),r=this.#s(t);t.forEach((e,s)=>{let n=e.hasAttribute("data-error"),o;n?o="error":s<r?o="complete":s===r?o="current":o="upcoming",e.dataset.status=o,e.setAttribute("aria-current",o==="current"?"step":"false");let u=e.querySelector(":scope > .pt-circle"),h=e.querySelector(":scope > .pt-label")?.textContent||"";u&&(u.textContent=o==="complete"?"\u2713":o==="error"?"!":String(s+1));let f=`Step ${s+1} of ${t.length}: ${h} (${o})`;e.setAttribute("aria-label",f),this.hasAttribute("data-clickable")?e.setAttribute("tabindex",s===r?"0":"-1"):e.removeAttribute("tabindex")})}#s(t){let r=this.getAttribute("data-current");if(r==null)return 0;let e=Number(r);if(Number.isFinite(e)&&e>0)return Math.min(t.length-1,e-1);let s=t.findIndex(n=>n.dataset.step===r);return s===-1?0:s}#i(){let t=this.#e();return t[this.#s(t)]?.dataset.step??null}#c(t){if(t==null)return null;let r=this.#e(),e=Number(t);return Number.isFinite(e)&&e>0?r[Math.min(r.length-1,e-1)]?.dataset.step??null:r.find(s=>s.dataset.step===t)?.dataset.step??null}#a(t){let r=t.dataset.step;if(!r)return;let e=this.#e().indexOf(t),s=this.#s(this.#e());if(e>s)return;let n=this.#i();this.#t=!0,this.setAttribute("data-current",r),this.dispatchEvent(new CustomEvent("progress-tracker:step",{bubbles:!0,detail:{step:r,previousStep:n,source:"click"}}))}};l("progress-tracker",a);export{a as ProgressTracker};
2
+ //# sourceMappingURL=progress-tracker.js.map
@@ -1,2 +1,2 @@
1
- var U=window.matchMedia("(prefers-reduced-motion: reduce)");var y=new Map;function A(n,t,e={}){let o=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:o},r=y.get(n);if(customElements.get(n)){if(!r||r.priority>=o){r&&r.priority===o&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=o){r.priority===o&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}y.set(n,i),customElements.define(n,t)}var b=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),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,o,i){t.addEventListener(e,o,i),this.#t.push(()=>t.removeEventListener(e,o,i))}setup(){}teardown(){}};var x=class extends b{#t;#e=null;setup(){this.#e===null&&(this.#e=this.getAttribute("value")||this.textContent.trim());let t=this.#e;if(!t)return!1;let e=parseInt(this.getAttribute("size")??"200",10)||200,o=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t=document.createElement("canvas"),this.#t.width=e,this.#t.height=e,this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`QR code: ${t}`),this.#o(t,e,o)}static get observedAttributes(){return["value","size"]}attributeChangedCallback(t,e,o){if(!this.#t||!this.isConnected)return;t==="value"&&o&&(this.#e=o);let i=this.#e||this.getAttribute("value")||"";if(!i)return;let r=parseInt(this.getAttribute("size")??"200",10)||200,s=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t.width=r,this.#t.height=r,this.#t.setAttribute("aria-label",`QR code: ${i}`),this.#o(i,r,s)}#o(t,e,o){let i=w(t,o),r=this.#t.getContext("2d"),s=i.length,c=e/s,a=getComputedStyle(this),l=this.getAttribute("color")||a.color||"#000",f=this.getAttribute("background")||"transparent";r.clearRect(0,0,e,e),f!=="transparent"&&(r.fillStyle=f,r.fillRect(0,0,e,e)),r.fillStyle=l;for(let h=0;h<s;h++)for(let d=0;d<s;d++)i[h][d]&&r.fillRect(Math.round(d*c),Math.round(h*c),Math.ceil(c),Math.ceil(c));this.textContent="",this.appendChild(this.#t);let u=document.createElement("span");u.className="visually-hidden",u.textContent=t,this.appendChild(u)}toDataURL(t="image/png"){return this.#t?.toDataURL(t)??""}},g=[[[26,7],[44,10],[70,15],[100,20],[134,26],[172,18],[196,20],[242,24],[292,30],[346,18]],[[26,10],[44,16],[70,26],[100,18],[134,24],[172,16],[196,18],[242,22],[292,22],[346,26]],[[26,13],[44,22],[70,18],[100,26],[134,18],[172,24],[196,18],[242,22],[292,20],[346,28]],[[26,17],[44,28],[70,22],[100,16],[134,22],[172,28],[196,26],[242,26],[292,24],[346,28]]],E=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,52]];function w(n,t=1){let e=new TextEncoder().encode(n),o=M(e.length,t),i=g[t][o-1][0],r=g[t][o-1][1],s=i-r,c=C(e,o,s),a=v(c,s,r),l=o*4+17,f=Array.from({length:l},()=>new Uint8Array(l)),u=Array.from({length:l},()=>new Uint8Array(l));return F(f,u,l),S(f,u,o),$(f,u,l),B(u,l),D(f,u,a,l),O(f,u,l,t)}function M(n,t){for(let e=1;e<=10;e++){let o=g[t][e-1][0],i=g[t][e-1][1],r=o-i,s=e<=9?8:16,c=Math.ceil((4+s)/8);if(n<=r-c)return e}return 10}function C(n,t,e){let o=[],i=(u,h)=>{for(let d=h-1;d>=0;d--)o.push(u>>d&1)};i(4,4);let r=t<=9?8:16;i(n.length,r);for(let u of n)i(u,8);let s=e*8,c=Math.min(4,s-o.length);for(i(0,c);o.length%8!==0;)o.push(0);let a=[236,17],l=0;for(;o.length<s;)i(a[l%2],8),l++;let f=[];for(let u=0;u<o.length;u+=8){let h=0;for(let d=0;d<8;d++)h=h<<1|(o[u+d]||0);f.push(h)}return f}function v(n,t,e){let o=k(e),i=new Uint8Array(t+e);for(let s=0;s<t;s++)i[s]=n[s];for(let s=0;s<t;s++){let c=i[s];if(c===0)continue;let a=m[c];for(let l=0;l<o.length;l++)i[s+l]^=p[(a+m[o[l]])%255]}let r=[...n.slice(0,t)];for(let s=0;s<e;s++)r.push(i[t+s]);return r}var p=new Uint8Array(512),m=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)p[e]=t,m[t]=e,t<<=1,t>=256&&(t^=285);for(let e=255;e<512;e++)p[e]=p[e-255]})();function k(n){let t=new Uint8Array([1]);for(let e=0;e<n;e++){let o=new Uint8Array(t.length+1),i=e;for(let r=0;r<t.length;r++)o[r]^=t[r],o[r+1]^=p[(m[t[r]]+i)%255];t=o}return t}function F(n,t,e){let o=[[0,0],[e-7,0],[0,e-7]];for(let[i,r]of o){for(let s=0;s<7;s++)for(let c=0;c<7;c++){let a=s===0||s===6||c===0||c===6||s>=2&&s<=4&&c>=2&&c<=4;n[i+s][r+c]=a?1:0,t[i+s][r+c]=1}for(let s=-1;s<=7;s++)for(let[c,a]of[[s,-1],[s,7],[-1,s],[7,s]]){let l=i+c,f=r+a;l>=0&&l<e&&f>=0&&f<e&&(n[l][f]=0,t[l][f]=1)}}}function S(n,t,e){if(e<2)return;let o=E[e-1];for(let i of o)for(let r of o)if(!t[i][r])for(let s=-2;s<=2;s++)for(let c=-2;c<=2;c++){let a=Math.abs(s)===2||Math.abs(c)===2||s===0&&c===0;n[i+s][r+c]=a?1:0,t[i+s][r+c]=1}}function $(n,t,e){for(let o=8;o<e-8;o++){let i=o%2===0?1:0;t[6][o]||(n[6][o]=i,t[6][o]=1),t[o][6]||(n[o][6]=i,t[o][6]=1)}}function B(n,t){for(let e=0;e<=8;e++)e<t&&(n[8][e]=1),e<t&&(n[e][8]=1);for(let e=0;e<=7;e++)n[8][t-1-e]=1,n[t-1-e][8]=1;n[t-8][8]=1}function D(n,t,e,o){let i=[];for(let c of e)for(let a=7;a>=0;a--)i.push(c>>a&1);let r=0,s=!0;for(let c=o-1;c>=1;c-=2){c===6&&(c=5);let a=s?Array.from({length:o},(l,f)=>o-1-f):Array.from({length:o},(l,f)=>f);for(let l of a)for(let f of[c,c-1])f<0||f>=o||t[l][f]||(n[l][f]=r<i.length?i[r]:0,r++);s=!s}}var L=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107];function N(n,t){let o=[1,0,3,2][n]*8+t;return L[o]}var T=[(n,t)=>(n+t)%2===0,n=>n%2===0,(n,t)=>t%3===0,(n,t)=>(n+t)%3===0,(n,t)=>(Math.floor(n/2)+Math.floor(t/3))%2===0,(n,t)=>n*t%2+n*t%3===0,(n,t)=>(n*t%2+n*t%3)%2===0,(n,t)=>((n+t)%2+n*t%3)%2===0];function R(n,t,e,o){let i=n.map(s=>new Uint8Array(s)),r=T[o];for(let s=0;s<e;s++)for(let c=0;c<e;c++)!t[s][c]&&r(s,c)&&(i[s][c]^=1);return i}function I(n,t,e,o){let i=N(e,o),r=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]];for(let c=0;c<15;c++){let[a,l]=r[c];n[a][l]=i>>14-c&1}let s=[[8,t-1],[8,t-2],[8,t-3],[8,t-4],[8,t-5],[8,t-6],[8,t-7],[8,t-8],[t-7,8],[t-6,8],[t-5,8],[t-4,8],[t-3,8],[t-2,8],[t-1,8]];for(let c=0;c<15;c++){let[a,l]=s[c];n[a][l]=i>>14-c&1}n[t-8][8]=1}function _(n,t){let e=0;for(let o=0;o<t;o++){let i=1;for(let r=1;r<t;r++)n[o][r]===n[o][r-1]?(i++,i===5?e+=3:i>5&&(e+=1)):i=1}for(let o=0;o<t;o++){let i=1;for(let r=1;r<t;r++)n[r][o]===n[r-1][o]?(i++,i===5?e+=3:i>5&&(e+=1)):i=1}for(let o=0;o<t-1;o++)for(let i=0;i<t-1;i++){let r=n[o][i];r===n[o][i+1]&&r===n[o+1][i]&&r===n[o+1][i+1]&&(e+=3)}return e}function O(n,t,e,o){let i=1/0,r=null;for(let s=0;s<8;s++){let c=R(n,t,e,s);I(c,e,o,s);let a=_(c,e);a<i&&(i=a,r=c)}return r}A("qr-code",x);export{x as QrCodeWc};
1
+ var Z=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;function C(n,t,e={}){let o=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:o},i=v.get(n);if(customElements.get(n)){if(!i||i.priority>=o){i&&i.priority===o&&i.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=o){i.priority===o&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${i.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}v.set(n,r),customElements.define(n,t)}var m=class extends HTMLElement{#t=[];#e;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,o,r){t.addEventListener(e,o,r),this.#t.push(()=>t.removeEventListener(e,o,r))}setup(){}teardown(){}setState(t,e){this.#e||(this.#e=this.attachInternals());let o=this.#e.states;try{e?o.add(t):o.delete(t)}catch{let r=`--${t}`;e?o.add(r):o.delete(r)}}_adoptInternals(t){this.#e||(this.#e=t)}};var E="[data-copy], [data-copy-target], [data-paste-target]",T="Copied to clipboard",S="Pasted from clipboard",g=new WeakMap;async function N(n,t={}){if(n==null||n==="")return!1;let{button:e,announceMessage:o=T,duration:r=1500}=t;try{await navigator.clipboard.writeText(n)}catch{return!1}return A({button:e,duration:r,announceMessage:o,eventDetail:{text:n}}),!0}async function D(n,t={}){let{text:e,html:o,blob:r}=n??{};if(!e&&!o&&!r)return!1;let{button:i,announceMessage:s=T,duration:c=1500}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let a={};e&&(a["text/plain"]=new Blob([e],{type:"text/plain"})),o&&(a["text/html"]=new Blob([o],{type:"text/html"})),r&&(a[r.type]=r);try{return await navigator.clipboard.write([new ClipboardItem(a)]),A({button:i,duration:c,announceMessage:s,eventDetail:{payload:n}}),!0}catch{}}return e?N(e,t):!1}function A({button:n,duration:t,announceMessage:e,eventDetail:o,state:r="copied",eventName:i="copy"}){if(n){n.dataset.state=r;let s=g.get(n);s&&clearTimeout(s),g.set(n,setTimeout(()=>{delete n.dataset.state,g.delete(n)},t)),n.dispatchEvent(new CustomEvent(i,{bubbles:!0,detail:o}))}L(e,n??document.body)}async function O(n,t={}){let{button:e,announceMessage:o=S,duration:r=1500}=t,i;try{i=await navigator.clipboard.readText()}catch{return null}return n&&("value"in n&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)?n.value=i:n.textContent=i,n.dispatchEvent(new Event("input",{bubbles:!0}))),A({button:e,duration:r,announceMessage:o,eventDetail:{text:i},state:"pasted",eventName:"paste"}),i}function M(n=document){n.querySelectorAll(E).forEach(x)}function x(n){n.hasAttribute("data-copy-init")||(n.setAttribute("data-copy-init",""),n.addEventListener("click",()=>{if(n.dataset.pasteTarget){let e=document.querySelector(n.dataset.pasteTarget);if(!e)return;O(e,{button:n});return}let t=I(n);t&&N(t,{button:n})}))}function I(n){if(n.dataset.copy)return n.dataset.copy;if(n.dataset.copyTarget){let t=document.querySelector(n.dataset.copyTarget);if(!t)return"";let e=n.dataset.copyAttr;return e?t.getAttribute(e)??"":t.textContent??""}return""}function L(n,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="visually-hidden",e.textContent=n,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>M()):M();var k=new MutationObserver(n=>{for(let t of n)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let o=e;o.matches(E)&&x(o),o.querySelectorAll(E).forEach(r=>x(r))}});k.observe(document.documentElement,{childList:!0,subtree:!0});var w=class extends m{#t;#e=null;setup(){this.#e===null&&(this.#e=this.getAttribute("value")||this.textContent.trim());let t=this.#e;if(!t)return!1;let e=parseInt(this.getAttribute("size")??"200",10)||200,o=parseInt(this.getAttribute("error-correction")??"1",10)||1;return this.#t=document.createElement("canvas"),this.#t.width=e,this.#t.height=e,this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`QR code: ${t}`),this.#n(t,e,o),!0}static get observedAttributes(){return["value","size"]}attributeChangedCallback(t,e,o){if(!this.#t||!this.isConnected)return;t==="value"&&o&&(this.#e=o);let r=this.#e||this.getAttribute("value")||"";if(!r)return;let i=parseInt(this.getAttribute("size")??"200",10)||200,s=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t.width=i,this.#t.height=i,this.#t.setAttribute("aria-label",`QR code: ${r}`),this.#n(r,i,s)}#n(t,e,o){let r=B(t,o),i=this.#t.getContext("2d"),s=r.length,c=e/s,l=getComputedStyle(this),a=this.getAttribute("color")||l.color||"#000",f=this.getAttribute("background")||"transparent";i.clearRect(0,0,e,e),f!=="transparent"&&(i.fillStyle=f,i.fillRect(0,0,e,e)),i.fillStyle=a;for(let h=0;h<s;h++)for(let d=0;d<s;d++)r[h][d]&&i.fillRect(Math.round(d*c),Math.round(h*c),Math.ceil(c),Math.ceil(c));this.textContent="",this.appendChild(this.#t);let u=document.createElement("span");u.className="visually-hidden",u.textContent=t,this.appendChild(u)}toDataURL(t="image/png"){return this.#t?.toDataURL(t)??""}async copy({button:t}={}){if(!this.#t)return!1;let e=this.#e||this.getAttribute("value")||"",o=await new Promise(r=>this.#t.toBlob(r,"image/png"));return D({text:e,blob:o||void 0},{button:t,announceMessage:"QR code copied"})}},y=[[[26,7],[44,10],[70,15],[100,20],[134,26],[172,18],[196,20],[242,24],[292,30],[346,18]],[[26,10],[44,16],[70,26],[100,18],[134,24],[172,16],[196,18],[242,22],[292,22],[346,26]],[[26,13],[44,22],[70,18],[100,26],[134,18],[172,24],[196,18],[242,22],[292,20],[346,28]],[[26,17],[44,28],[70,22],[100,16],[134,22],[172,28],[196,26],[242,26],[292,24],[346,28]]],F=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,52]];function B(n,t=1){let e=new TextEncoder().encode(n),o=R(e.length,t),r=y[t][o-1][0],i=y[t][o-1][1],s=r-i,c=U(e,o,s),l=_(c,s,i),a=o*4+17,f=Array.from({length:a},()=>new Uint8Array(a)),u=Array.from({length:a},()=>new Uint8Array(a));return P(f,u,a),q(f,u,o),j(f,u,a),G(u,a),H(f,u,l,a),Y(f,u,a,t)}function R(n,t){for(let e=1;e<=10;e++){let o=y[t][e-1][0],r=y[t][e-1][1],i=o-r,s=e<=9?8:16,c=Math.ceil((4+s)/8);if(n<=i-c)return e}return 10}function U(n,t,e){let o=[],r=(u,h)=>{for(let d=h-1;d>=0;d--)o.push(u>>d&1)};r(4,4);let i=t<=9?8:16;r(n.length,i);for(let u of n)r(u,8);let s=e*8,c=Math.min(4,s-o.length);for(r(0,c);o.length%8!==0;)o.push(0);let l=[236,17],a=0;for(;o.length<s;)r(l[a%2],8),a++;let f=[];for(let u=0;u<o.length;u+=8){let h=0;for(let d=0;d<8;d++)h=h<<1|(o[u+d]||0);f.push(h)}return f}function _(n,t,e){let o=$(e),r=new Uint8Array(t+e);for(let s=0;s<t;s++)r[s]=n[s];for(let s=0;s<t;s++){let c=r[s];if(c===0)continue;let l=b[c];for(let a=0;a<o.length;a++)r[s+a]^=p[(l+b[o[a]])%255]}let i=[...n.slice(0,t)];for(let s=0;s<e;s++)i.push(r[t+s]);return i}var p=new Uint8Array(512),b=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)p[e]=t,b[t]=e,t<<=1,t>=256&&(t^=285);for(let e=255;e<512;e++)p[e]=p[e-255]})();function $(n){let t=new Uint8Array([1]);for(let e=0;e<n;e++){let o=new Uint8Array(t.length+1),r=e;for(let i=0;i<t.length;i++)o[i]^=t[i],o[i+1]^=p[(b[t[i]]+r)%255];t=o}return t}function P(n,t,e){let o=[[0,0],[e-7,0],[0,e-7]];for(let[r,i]of o){for(let s=0;s<7;s++)for(let c=0;c<7;c++){let l=s===0||s===6||c===0||c===6||s>=2&&s<=4&&c>=2&&c<=4;n[r+s][i+c]=l?1:0,t[r+s][i+c]=1}for(let s=-1;s<=7;s++)for(let[c,l]of[[s,-1],[s,7],[-1,s],[7,s]]){let a=r+c,f=i+l;a>=0&&a<e&&f>=0&&f<e&&(n[a][f]=0,t[a][f]=1)}}}function q(n,t,e){if(e<2)return;let o=F[e-1];for(let r of o)for(let i of o)if(!t[r][i])for(let s=-2;s<=2;s++)for(let c=-2;c<=2;c++){let l=Math.abs(s)===2||Math.abs(c)===2||s===0&&c===0;n[r+s][i+c]=l?1:0,t[r+s][i+c]=1}}function j(n,t,e){for(let o=8;o<e-8;o++){let r=o%2===0?1:0;t[6][o]||(n[6][o]=r,t[6][o]=1),t[o][6]||(n[o][6]=r,t[o][6]=1)}}function G(n,t){for(let e=0;e<=8;e++)e<t&&(n[8][e]=1),e<t&&(n[e][8]=1);for(let e=0;e<=7;e++)n[8][t-1-e]=1,n[t-1-e][8]=1;n[t-8][8]=1}function H(n,t,e,o){let r=[];for(let c of e)for(let l=7;l>=0;l--)r.push(c>>l&1);let i=0,s=!0;for(let c=o-1;c>=1;c-=2){c===6&&(c=5);let l=s?Array.from({length:o},(a,f)=>o-1-f):Array.from({length:o},(a,f)=>f);for(let a of l)for(let f of[c,c-1])f<0||f>=o||t[a][f]||(n[a][f]=i<r.length?r[i]:0,i++);s=!s}}var V=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107];function Q(n,t){let o=[1,0,3,2][n]*8+t;return V[o]}var K=[(n,t)=>(n+t)%2===0,n=>n%2===0,(n,t)=>t%3===0,(n,t)=>(n+t)%3===0,(n,t)=>(Math.floor(n/2)+Math.floor(t/3))%2===0,(n,t)=>n*t%2+n*t%3===0,(n,t)=>(n*t%2+n*t%3)%2===0,(n,t)=>((n+t)%2+n*t%3)%2===0];function W(n,t,e,o){let r=n.map(s=>new Uint8Array(s)),i=K[o];for(let s=0;s<e;s++)for(let c=0;c<e;c++)!t[s][c]&&i(s,c)&&(r[s][c]^=1);return r}function X(n,t,e,o){let r=Q(e,o),i=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]];for(let c=0;c<15;c++){let[l,a]=i[c];n[l][a]=r>>14-c&1}let s=[[8,t-1],[8,t-2],[8,t-3],[8,t-4],[8,t-5],[8,t-6],[8,t-7],[8,t-8],[t-7,8],[t-6,8],[t-5,8],[t-4,8],[t-3,8],[t-2,8],[t-1,8]];for(let c=0;c<15;c++){let[l,a]=s[c];n[l][a]=r>>14-c&1}n[t-8][8]=1}function J(n,t){let e=0;for(let o=0;o<t;o++){let r=1;for(let i=1;i<t;i++)n[o][i]===n[o][i-1]?(r++,r===5?e+=3:r>5&&(e+=1)):r=1}for(let o=0;o<t;o++){let r=1;for(let i=1;i<t;i++)n[i][o]===n[i-1][o]?(r++,r===5?e+=3:r>5&&(e+=1)):r=1}for(let o=0;o<t-1;o++)for(let r=0;r<t-1;r++){let i=n[o][r];i===n[o][r+1]&&i===n[o+1][r]&&i===n[o+1][r+1]&&(e+=3)}return e}function Y(n,t,e,o){let r=1/0,i=null;for(let s=0;s<8;s++){let c=W(n,t,e,s);X(c,e,o,s);let l=J(c,e);l<r&&(r=l,i=c)}return i}C("qr-code",w);export{w as QrCodeWc};
2
2
  //# sourceMappingURL=qr-code.js.map