vanilla-breeze 0.1.2 → 0.1.3

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 (110) hide show
  1. package/dist/cdn/components/accordion-wc.js +1 -1
  2. package/dist/cdn/components/analytics-panel.js +1 -1
  3. package/dist/cdn/components/audio-player.js +1 -1
  4. package/dist/cdn/components/audio-visualizer.js +2 -2
  5. package/dist/cdn/components/author-index.js +1 -1
  6. package/dist/cdn/components/brand-mark.js +1 -1
  7. package/dist/cdn/components/calendar-wc.js +2 -2
  8. package/dist/cdn/components/card-list.js +1 -1
  9. package/dist/cdn/components/carousel-wc.js +1 -1
  10. package/dist/cdn/components/change-set.js +1 -1
  11. package/dist/cdn/components/chart-wc.js +11 -11
  12. package/dist/cdn/components/chat-input.js +1 -1
  13. package/dist/cdn/components/chat-window.js +1 -1
  14. package/dist/cdn/components/color-palette.js +4 -4
  15. package/dist/cdn/components/color-picker.js +1 -1
  16. package/dist/cdn/components/combo-box.js +1 -1
  17. package/dist/cdn/components/command-palette.js +1 -1
  18. package/dist/cdn/components/comment-wc.js +1 -1
  19. package/dist/cdn/components/compare-surface.js +1 -1
  20. package/dist/cdn/components/component-sampler.js +4 -4
  21. package/dist/cdn/components/consent-banner.js +1 -1
  22. package/dist/cdn/components/content-lens.js +1 -1
  23. package/dist/cdn/components/content-swap.js +1 -1
  24. package/dist/cdn/components/context-menu.js +1 -1
  25. package/dist/cdn/components/data-table.js +1 -1
  26. package/dist/cdn/components/date-picker.js +1 -1
  27. package/dist/cdn/components/day-view.js +1 -1
  28. package/dist/cdn/components/drag-surface.js +1 -1
  29. package/dist/cdn/components/drop-down.js +1 -1
  30. package/dist/cdn/components/emoji-picker.js +1 -1
  31. package/dist/cdn/components/flow-diagram.js +1 -1
  32. package/dist/cdn/components/font-pairer.js +1 -1
  33. package/dist/cdn/components/foot-notes.js +1 -1
  34. package/dist/cdn/components/form-field.js +1 -1
  35. package/dist/cdn/components/gantt-chart.js +1 -1
  36. package/dist/cdn/components/geo-map.js +3 -3
  37. package/dist/cdn/components/glossary-index.js +1 -1
  38. package/dist/cdn/components/glossary-wc.js +1 -1
  39. package/dist/cdn/components/gradient-builder.js +1 -1
  40. package/dist/cdn/components/heading-links.js +1 -1
  41. package/dist/cdn/components/highlight-wc.js +2 -2
  42. package/dist/cdn/components/image-gallery.js +1 -1
  43. package/dist/cdn/components/image-map.js +1 -1
  44. package/dist/cdn/components/impact-effort.js +1 -1
  45. package/dist/cdn/components/include-file.js +1 -1
  46. package/dist/cdn/components/kanban-board.js +1 -1
  47. package/dist/cdn/components/manifest.json +95 -95
  48. package/dist/cdn/components/markdown-editor.js +1 -1
  49. package/dist/cdn/components/markdown-viewer.js +1 -1
  50. package/dist/cdn/components/motion-specimen.js +3 -3
  51. package/dist/cdn/components/note-wc.js +1 -1
  52. package/dist/cdn/components/notification-wc.js +4 -4
  53. package/dist/cdn/components/page-info.js +20 -20
  54. package/dist/cdn/components/page-stats.js +1 -1
  55. package/dist/cdn/components/page-toc.js +1 -1
  56. package/dist/cdn/components/page-tools.js +1 -1
  57. package/dist/cdn/components/page-tour.js +2 -2
  58. package/dist/cdn/components/palette-generator.js +1 -1
  59. package/dist/cdn/components/popularity-index.js +1 -1
  60. package/dist/cdn/components/print-page.js +1 -1
  61. package/dist/cdn/components/qr-code.js +1 -1
  62. package/dist/cdn/components/reader-view.js +2 -2
  63. package/dist/cdn/components/recently-visited.js +26 -2
  64. package/dist/cdn/components/selection-menu.js +1 -1
  65. package/dist/cdn/components/semantic-palette.js +1 -1
  66. package/dist/cdn/components/settings-panel.js +2 -2
  67. package/dist/cdn/components/share-wc.js +1 -1
  68. package/dist/cdn/components/short-cuts.js +1 -1
  69. package/dist/cdn/components/site-index.js +1 -1
  70. package/dist/cdn/components/site-map-wc.js +1 -1
  71. package/dist/cdn/components/site-map.js +1 -1
  72. package/dist/cdn/components/site-search.js +3 -3
  73. package/dist/cdn/components/slide-accept.js +1 -1
  74. package/dist/cdn/components/social-embed.js +1 -1
  75. package/dist/cdn/components/spacing-specimen.js +2 -2
  76. package/dist/cdn/components/split-surface.js +1 -1
  77. package/dist/cdn/components/star-rating.js +1 -1
  78. package/dist/cdn/components/story-map.js +1 -1
  79. package/dist/cdn/components/tab-set.js +1 -1
  80. package/dist/cdn/components/text-reader.js +2 -2
  81. package/dist/cdn/components/theme-export.js +1 -1
  82. package/dist/cdn/components/theme-picker.js +3 -3
  83. package/dist/cdn/components/time-index.js +1 -1
  84. package/dist/cdn/components/time-picker.js +1 -1
  85. package/dist/cdn/components/toast-msg.js +1 -1
  86. package/dist/cdn/components/token-specimen.js +6 -6
  87. package/dist/cdn/components/tool-tip.js +1 -1
  88. package/dist/cdn/components/topic-map.js +3 -2
  89. package/dist/cdn/components/trust-filter.js +3 -3
  90. package/dist/cdn/components/type-specimen.js +1 -1
  91. package/dist/cdn/components/user-story.js +8 -8
  92. package/dist/cdn/components/video-player.js +4 -4
  93. package/dist/cdn/components/watch-wc.js +2 -2
  94. package/dist/cdn/components/week-view.js +1 -1
  95. package/dist/cdn/components/work-item.js +14 -14
  96. package/dist/cdn/components/youtube-player.js +1 -1
  97. package/dist/cdn/packs/design-system.full.js +15 -15
  98. package/dist/cdn/packs/effects.full.js +1 -1
  99. package/dist/cdn/packs/manifest.json +5 -5
  100. package/dist/cdn/packs/ui.full.css +1 -1
  101. package/dist/cdn/packs/ui.full.js +5 -5
  102. package/dist/cdn/packs/ux-planning.full.js +119 -119
  103. package/dist/cdn/vanilla-breeze-charts.css +1 -1
  104. package/dist/cdn/vanilla-breeze-charts.js +11 -11
  105. package/dist/cdn/vanilla-breeze-core.css +1 -1
  106. package/dist/cdn/vanilla-breeze-core.js +21 -21
  107. package/dist/cdn/vanilla-breeze-extras.js +3 -3
  108. package/dist/cdn/vanilla-breeze.css +1 -1
  109. package/dist/cdn/vanilla-breeze.js +210 -185
  110. package/package.json +5 -2
@@ -1,2 +1,2 @@
1
- var p=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function b(o,t,e={}){let r=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:r},n=g.get(o);if(customElements.get(o)){if(!n||n.priority>=r){n&&n.priority===r&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=r){n.priority===r&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}g.set(o,i),customElements.define(o,t)}var h=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,r,i){t.addEventListener(e,r,i),this.#t.push(()=>t.removeEventListener(e,r,i))}setup(){}teardown(){}};var f=class o extends h{#t=null;#e=null;#c=!1;#l=null;setup(){this.setAttribute("role","list"),this.#c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#f(),this.#g(),this.#E(),this.#h()}teardown(){this.#t&&(this.#t.remove(),this.#t=null),o.#r?.source===this&&(o.#r=null)}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")||"vertical"}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#h(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("aria-grabbed")||t.setAttribute("aria-grabbed","false")}#f(){this.#t=document.createElement("div"),this.#t.setAttribute("role","status"),this.#t.setAttribute("aria-live","polite"),this.#t.setAttribute("aria-atomic","true"),this.#t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",this.prepend(this.#t)}#n(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#g(){this.listen(this,"pointerdown",t=>{this.#l=t.target}),this.listen(this,"dragstart",this.#b.bind(this)),this.listen(this,"dragover",this.#p.bind(this)),this.listen(this,"dragleave",this.#m.bind(this)),this.listen(this,"drop",this.#v.bind(this)),this.listen(this,"dragend",this.#A.bind(this))}#b(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let r=e.querySelector("[data-drag-handle]");if(r&&!r.contains(this.#l)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let i=this.#s(e);o.#r={item:e,source:this,originalIndex:i},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#p(t){let e=o.#r;if(!e||(this.group||e.source.group)&&this.group!==e.source.group)return;t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over","");let r=this.orientation==="horizontal"?t.clientX:t.clientY;this.#C(r)}#m(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#d())}#v(t){t.preventDefault(),this.removeAttribute("data-drag-over"),this.#d();let e=o.#r;if(!e)return;let{item:r,source:i,originalIndex:n}=e,d=this.orientation==="horizontal"?t.clientX:t.clientY,u=this.#x(d);if(i===this){this.#a(r,u),this.#i();let c=this.#s(r);this.#o(r),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:r,itemId:r.dataset.id,oldIndex:n,newIndex:c,order:this.sortedOrder}}))}else this.#a(r,u),this.#i(),i.#i(),this.#o(r),this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:r,itemId:r.dataset.id,fromSurface:i,toSurface:this,newIndex:this.#s(r),fromOrder:i.sortedOrder,toOrder:this.sortedOrder}}))}#A(){let t=o.#r;t?.item&&t.item.removeAttribute("data-dragging"),this.removeAttribute("data-drag-over"),this.#d(),o.#r=null,this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#E(){this.listen(this,"keydown",this.#w.bind(this))}#w(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let r=e.getAttribute("aria-grabbed")==="true",i=this.orientation==="horizontal",n=i?"ArrowLeft":"ArrowUp",d=i?"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){if(t.preventDefault(),r){e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#i(),this.#o(e);let a=this.#s(e),s=this.draggableChildren;this.#n(`${this.#u(e)}, dropped at position ${a+1} of ${s.length}`),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,oldIndex:this.#e,newIndex:a,order:this.sortedOrder}})),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null}else{this.#e=this.#s(e),e.setAttribute("aria-grabbed","true"),this.setAttribute("data-reorder-mode","");let a=this.draggableChildren;this.#n(`${this.#u(e)}, grabbed. Position ${this.#e+1} of ${a.length}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}return}if(!r&&(t.key===n||t.key===d)){t.preventDefault();let a=this.draggableChildren,s=a.indexOf(e),l=t.key===n?Math.max(0,s-1):Math.min(a.length-1,s+1);l!==s&&a[l].focus();return}if(r&&(t.key===n||t.key===d)){t.preventDefault();let a=this.draggableChildren,s=a.indexOf(e),l=t.key===n?Math.max(0,s-1):Math.min(a.length-1,s+1);l!==s&&(this.#a(e,l),e.focus(),this.#n(`Position ${l+1} of ${a.length}`));return}let u=i?"ArrowUp":"ArrowLeft",c=i?"ArrowDown":"ArrowRight";if(r&&(t.key===u||t.key===c)){if(t.preventDefault(),!this.group)return;let a=t.key===c?1:-1,s=this.#y(a);if(!s)return;s.appendChild(e),s.#i(),this.#i(),s.#o(e),e.focus();let l=s.getAttribute("aria-label")||"next surface";s.#n(`Moved to ${l}`),s.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,fromSurface:this,toSurface:s,newIndex:s.draggableChildren.indexOf(e),fromOrder:this.sortedOrder,toOrder:s.sortedOrder}})),this.removeAttribute("data-reorder-mode"),s.setAttribute("data-reorder-mode",""),this.#e=null;return}if(r&&t.key==="Escape"){t.preventDefault(),e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#e!=null&&(this.#a(e,this.#e),e.focus()),this.#n("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null;return}!r&&t.key==="Escape"&&(t.preventDefault(),e.blur())}#o(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#y(t){if(!this.group)return null;let e=[...document.querySelectorAll(`drag-surface[group="${this.group}"]`)];if(e.length<2)return null;e.sort((n,d)=>{let u=n.getBoundingClientRect(),c=d.getBoundingClientRect();return u.left-c.left||u.top-c.top});let r=e.indexOf(this);return e[r+t]||null}#u(t){return t.dataset.id||t.textContent.trim().slice(0,40)}#s(t){return this.draggableChildren.indexOf(t)}#a(t,e){let i=this.draggableChildren.filter(n=>n!==t)[e]||null;i?this.insertBefore(t,i):this.appendChild(t)}#i(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#x(t){let e=this.orientation==="horizontal",r=this.draggableChildren.filter(i=>!i.hasAttribute("data-dragging"));for(let i=0;i<r.length;i++){let n=r[i].getBoundingClientRect(),d=e?n.left+n.width/2:n.top+n.height/2;if(t<d)return i}return r.length}#C(t){this.#d();let e=this.orientation==="horizontal",r=this.draggableChildren.filter(i=>!i.hasAttribute("data-dragging"));for(let i=0;i<r.length;i++){let n=r[i].getBoundingClientRect(),d=e?n.left+n.width/2:n.top+n.height/2;if(t<d){r[i].setAttribute("data-drop-target","before");return}}r.length>0&&r[r.length-1].setAttribute("data-drop-target","after")}#d(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#r=null};b("drag-surface",f);export{f as DragSurface};
1
+ var p=window.matchMedia("(prefers-reduced-motion: reduce)");var g=new Map;function b(o,t,e={}){let r=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:r},n=g.get(o);if(customElements.get(o)){if(!n||n.priority>=r){n&&n.priority===r&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=r){n.priority===r&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}g.set(o,i),customElements.define(o,t)}var h=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,r,i){t.addEventListener(e,r,i),this.#t.push(()=>t.removeEventListener(e,r,i))}setup(){}teardown(){}};var f=class o extends h{#t=null;#e=null;#c=!1;#l=null;setup(){this.setAttribute("role","list"),this.#c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#f(),this.#g(),this.#E(),this.#h()}teardown(){this.#t&&(this.#t.remove(),this.#t=null),o.#r?.source===this&&(o.#r=null)}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")||"vertical"}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#h(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("aria-grabbed")||t.setAttribute("aria-grabbed","false")}#f(){this.#t=document.createElement("div"),this.#t.setAttribute("role","status"),this.#t.setAttribute("aria-live","polite"),this.#t.setAttribute("aria-atomic","true"),this.#t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",this.prepend(this.#t)}#n(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#g(){this.listen(this,"pointerdown",t=>{this.#l=t.target}),this.listen(this,"dragstart",this.#b.bind(this)),this.listen(this,"dragover",this.#p.bind(this)),this.listen(this,"dragleave",this.#m.bind(this)),this.listen(this,"drop",this.#v.bind(this)),this.listen(this,"dragend",this.#A.bind(this))}#b(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let r=e.querySelector("[data-drag-handle]");if(r&&!r.contains(this.#l)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let i=this.#s(e);o.#r={item:e,source:this,originalIndex:i},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#p(t){let e=o.#r;if(!e||(this.group||e.source.group)&&this.group!==e.source.group)return;t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over","");let r=this.orientation==="horizontal"?t.clientX:t.clientY;this.#C(r)}#m(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#d())}#v(t){t.preventDefault(),this.removeAttribute("data-drag-over"),this.#d();let e=o.#r;if(!e)return;let{item:r,source:i,originalIndex:n}=e,d=this.orientation==="horizontal"?t.clientX:t.clientY,u=this.#x(d);if(i===this){this.#a(r,u),this.#i();let c=this.#s(r);this.#o(r),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:r,itemId:r.dataset.id,oldIndex:n,newIndex:c,order:this.sortedOrder}}))}else this.#a(r,u),this.#i(),i.#i(),this.#o(r),this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:r,itemId:r.dataset.id,fromSurface:i,toSurface:this,newIndex:this.#s(r),fromOrder:i.sortedOrder,toOrder:this.sortedOrder}}))}#A(){let t=o.#r;t?.item&&t.item.removeAttribute("data-dragging"),this.removeAttribute("data-drag-over"),this.#d(),o.#r=null,this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#E(){this.listen(this,"keydown",this.#w.bind(this))}#w(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let r=e.getAttribute("aria-grabbed")==="true",i=this.orientation==="horizontal",n=i?"ArrowLeft":"ArrowUp",d=i?"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){if(t.preventDefault(),r){e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#i(),this.#o(e);let a=this.#s(e),s=this.draggableChildren;this.#n(`${this.#u(e)}, dropped at position ${a+1} of ${s.length}`),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,oldIndex:this.#e,newIndex:a,order:this.sortedOrder}})),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null}else{this.#e=this.#s(e),e.setAttribute("aria-grabbed","true"),this.setAttribute("data-reorder-mode","");let a=this.draggableChildren;this.#n(`${this.#u(e)}, grabbed. Position ${this.#e+1} of ${a.length}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}return}if(!r&&(t.key===n||t.key===d)){t.preventDefault();let a=this.draggableChildren,s=a.indexOf(e),l=t.key===n?Math.max(0,s-1):Math.min(a.length-1,s+1);l!==s&&a[l].focus();return}if(r&&(t.key===n||t.key===d)){t.preventDefault();let a=this.draggableChildren,s=a.indexOf(e),l=t.key===n?Math.max(0,s-1):Math.min(a.length-1,s+1);l!==s&&(this.#a(e,l),e.focus(),this.#n(`Position ${l+1} of ${a.length}`));return}let u=i?"ArrowUp":"ArrowLeft",c=i?"ArrowDown":"ArrowRight";if(r&&(t.key===u||t.key===c)){if(t.preventDefault(),!this.group)return;let a=t.key===c?1:-1,s=this.#y(a);if(!s)return;s.appendChild(e),s.#i(),this.#i(),s.#o(e),e.focus();let l=s.getAttribute("aria-label")||"next surface";s.#n(`Moved to ${l}`),s.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,fromSurface:this,toSurface:s,newIndex:s.draggableChildren.indexOf(e),fromOrder:this.sortedOrder,toOrder:s.sortedOrder}})),this.removeAttribute("data-reorder-mode"),s.setAttribute("data-reorder-mode",""),this.#e=null;return}if(r&&t.key==="Escape"){t.preventDefault(),e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#e!=null&&(this.#a(e,this.#e),e.focus()),this.#n("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null;return}!r&&t.key==="Escape"&&(t.preventDefault(),e.blur())}#o(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#y(t){if(!this.group)return null;let e=[...document.querySelectorAll(`drag-surface[group="${this.group}"]`)];if(e.length<2)return null;e.sort((n,d)=>{let u=n.getBoundingClientRect(),c=d.getBoundingClientRect();return u.left-c.left||u.top-c.top});let r=e.indexOf(this);return e[r+t]||null}#u(t){return t.dataset.id||t.textContent.trim().slice(0,40)}#s(t){return this.draggableChildren.indexOf(t)}#a(t,e){let i=this.draggableChildren.filter(n=>n!==t)[e]||null;i?this.insertBefore(t,i):this.appendChild(t)}#i(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#x(t){let e=this.orientation==="horizontal",r=this.draggableChildren.filter(i=>!i.hasAttribute("data-dragging"));for(let i=0;i<r.length;i++){let n=r[i].getBoundingClientRect(),d=e?n.left+n.width/2:n.top+n.height/2;if(t<d)return i}return r.length}#C(t){this.#d();let e=this.orientation==="horizontal",r=this.draggableChildren.filter(i=>!i.hasAttribute("data-dragging"));for(let i=0;i<r.length;i++){let n=r[i].getBoundingClientRect(),d=e?n.left+n.width/2:n.top+n.height/2;if(t<d){r[i].setAttribute("data-drop-target","before");return}}r.length>0&&r[r.length-1].setAttribute("data-drop-target","after")}#d(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#r=null};b("drag-surface",f);export{f as DragSurface};
2
2
  //# sourceMappingURL=drag-surface.js.map
@@ -1,2 +1,2 @@
1
- var u="popover"in HTMLElement.prototype;var a=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}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(){}};var g=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function p(h,t,s={}){let e=s.priority??10,i={impl:t,bundle:s.bundle,contract:s.contract,priority:e},o=f.get(h);if(customElements.get(h)){if(!o||o.priority>=e){o&&o.priority===e&&o.impl!==t&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${s.bundle}".`);return}console.warn(`[VB Bundle] Tag <${h}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${s.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=e){o.priority===e&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}". Skipping "${s.bundle}" (first wins at equal priority).`);return}f.set(h,i),customElements.define(h,t)}var c=class extends a{#t;#e;#o=[];#r=-1;#i=!1;#l=!1;#s=null;#n=!1;setup(){if(this.#t=this.querySelector(":scope > [data-trigger]"),this.#t||(this.#t=this.querySelector(":scope > button")),!this.#t||(this.#e=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#e))return!1;this.#l=this.hasAttribute("hover"),this.#n=u&&!this.#l,this.#n&&this.#e.setAttribute("popover","auto"),this.#t.setAttribute("aria-haspopup","menu"),this.#t.setAttribute("aria-expanded","false"),this.#e.id||(this.#e.id=`dropdown-menu-${crypto.randomUUID().slice(0,8)}`),this.#t.setAttribute("aria-controls",this.#e.id),this.#e.setAttribute("role","menu"),this.#a(),this.#l?(this.listen(this,"mouseenter",this.#d),this.listen(this,"mouseleave",this.#u),this.listen(this.#t,"focus",this.#f),this.listen(this.#t,"blur",this.#p)):this.listen(this.#t,"click",this.#c),this.listen(this.#t,"keydown",this.#b),this.listen(this.#e,"keydown",this.#m),this.#n?this.listen(this.#e,"toggle",this.#y):(this.listen(document,"click",this.#g),this.listen(document,"keydown",this.#w))}teardown(){this.#s&&clearTimeout(this.#s)}#a(){this.#o=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#o.forEach((t,s)=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#v)}),this.#e.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#c=t=>{t.stopPropagation(),this.toggle()};#d=()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.open()};#u=()=>{this.#s=setTimeout(()=>{this.close()},100)};#f=()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.open()};#p=t=>{this.#e?.contains(t.relatedTarget)||(this.#s=setTimeout(()=>{this.contains(document.activeElement)||this.close()},100))};#b=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#h(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#h(this.#o.length-1);break}};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#h(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#h(this.#r-1);break;case"Home":t.preventDefault(),this.#h(0);break;case"End":t.preventDefault(),this.#h(this.#o.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#o[this.#r].click();break}};#g=t=>{this.#i&&!this.contains(t.target)&&this.close()};#w=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#t?.focus())};#y=t=>{t.newState==="closed"&&this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#v=t=>{t.defaultPrevented||(this.close(),this.#t?.focus())};#h(t){this.#o.length!==0&&(t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r=t,this.#o[t].focus())}open(){if(!(this.#i||!this.#e)){if(this.#i=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#r=-1,this.#E(),this.#n)try{this.#e.showPopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0}))}}close(){if(!(!this.#i||!this.#e)){if(this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#r=-1,this.#n)try{this.#e.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0}))}}toggle(){this.#i?this.close():this.open()}#E(){if(!this.#t||!this.#e)return;let t=this.getAttribute("position")||"bottom-start",s=this.hasAttribute("no-flip"),e=this.#t.getBoundingClientRect(),i=this.#e.getBoundingClientRect(),o=window.innerHeight,d=window.innerWidth,l=4;if(this.#n){let r,n;t.startsWith("top")?(r=e.top-i.height-l,!s&&r<0&&(r=e.bottom+l)):(r=e.bottom+l,!s&&r+i.height>o&&(r=e.top-i.height-l)),t.endsWith("end")?(n=e.right-i.width,n<0&&(n=e.left)):(n=e.left,n+i.width>d&&(n=e.right-i.width)),this.#e.style.setProperty("--dropdown-top",`${Math.max(0,r)}px`),this.#e.style.setProperty("--dropdown-left",`${Math.max(0,n)}px`)}else{let r,n;t.startsWith("top")?(r=-i.height-l,!s&&e.top+r<0&&(r=e.height+l)):(r=e.height+l,!s&&e.bottom+i.height+l>o&&(r=-i.height-l)),t.endsWith("end")?(n=e.width-i.width,e.left+n<0&&(n=0)):(n=0,e.left+i.width>d&&(n=e.width-i.width)),this.#e.style.setProperty("--dropdown-top",`${r}px`),this.#e.style.setProperty("--dropdown-left",`${n}px`)}}get isOpen(){return this.#i}};p("drop-down",c);export{c as DropDown};
1
+ var u="popover"in HTMLElement.prototype;var a=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,s,e,i){t.addEventListener(s,e,i),this.#t.push(()=>t.removeEventListener(s,e,i))}setup(){}teardown(){}};var g=window.matchMedia("(prefers-reduced-motion: reduce)");var p=new Map;function f(h,t,s={}){let e=s.priority??10,i={impl:t,bundle:s.bundle,contract:s.contract,priority:e},o=p.get(h);if(customElements.get(h)){if(!o||o.priority>=e){o&&o.priority===e&&o.impl!==t&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${s.bundle}".`);return}console.warn(`[VB Bundle] Tag <${h}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${s.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=e){o.priority===e&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${o.bundle}". Skipping "${s.bundle}" (first wins at equal priority).`);return}p.set(h,i),customElements.define(h,t)}var c=class extends a{#t;#e;#o=[];#r=-1;#i=!1;#l=!1;#s=null;#n=!1;setup(){if(this.#t=this.querySelector(":scope > [data-trigger]"),this.#t||(this.#t=this.querySelector(":scope > button")),!this.#t||(this.#e=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#e))return!1;this.#l=this.hasAttribute("hover"),this.#n=u&&!this.#l,this.#n&&this.#e.setAttribute("popover","auto"),this.#t.setAttribute("aria-haspopup","menu"),this.#t.setAttribute("aria-expanded","false"),this.#e.id||(this.#e.id=`dropdown-menu-${crypto.randomUUID().slice(0,8)}`),this.#t.setAttribute("aria-controls",this.#e.id),this.#e.setAttribute("role","menu"),this.#a(),this.#l?(this.listen(this,"mouseenter",this.#d),this.listen(this,"mouseleave",this.#u),this.listen(this.#t,"focus",this.#p),this.listen(this.#t,"blur",this.#f)):this.listen(this.#t,"click",this.#c),this.listen(this.#t,"keydown",this.#b),this.listen(this.#e,"keydown",this.#m),this.#n?this.listen(this.#e,"toggle",this.#y):(this.listen(document,"click",this.#g),this.listen(document,"keydown",this.#w))}teardown(){this.#s&&clearTimeout(this.#s)}#a(){this.#o=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#o.forEach((t,s)=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#v)}),this.#e.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#c=t=>{t.stopPropagation(),this.toggle()};#d=()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.open()};#u=()=>{this.#s=setTimeout(()=>{this.close()},100)};#p=()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.open()};#f=t=>{this.#e?.contains(t.relatedTarget)||(this.#s=setTimeout(()=>{this.contains(document.activeElement)||this.close()},100))};#b=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#h(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#h(this.#o.length-1);break}};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#h(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#h(this.#r-1);break;case"Home":t.preventDefault(),this.#h(0);break;case"End":t.preventDefault(),this.#h(this.#o.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#o[this.#r].click();break}};#g=t=>{this.#i&&!this.contains(t.target)&&this.close()};#w=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#t?.focus())};#y=t=>{t.newState==="closed"&&this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#v=t=>{t.defaultPrevented||(this.close(),this.#t?.focus())};#h(t){this.#o.length!==0&&(t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r=t,this.#o[t].focus())}open(){if(!(this.#i||!this.#e)){if(this.#i=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#r=-1,this.#E(),this.#n)try{this.#e.showPopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0}))}}close(){if(!(!this.#i||!this.#e)){if(this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#r=-1,this.#n)try{this.#e.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0}))}}toggle(){this.#i?this.close():this.open()}#E(){if(!this.#t||!this.#e)return;let t=this.getAttribute("position")||"bottom-start",s=this.hasAttribute("no-flip"),e=this.#t.getBoundingClientRect(),i=this.#e.getBoundingClientRect(),o=window.innerHeight,d=window.innerWidth,l=4;if(this.#n){let r,n;t.startsWith("top")?(r=e.top-i.height-l,!s&&r<0&&(r=e.bottom+l)):(r=e.bottom+l,!s&&r+i.height>o&&(r=e.top-i.height-l)),t.endsWith("end")?(n=e.right-i.width,n<0&&(n=e.left)):(n=e.left,n+i.width>d&&(n=e.right-i.width)),this.#e.style.setProperty("--dropdown-top",`${Math.max(0,r)}px`),this.#e.style.setProperty("--dropdown-left",`${Math.max(0,n)}px`)}else{let r,n;t.startsWith("top")?(r=-i.height-l,!s&&e.top+r<0&&(r=e.height+l)):(r=e.height+l,!s&&e.bottom+i.height+l>o&&(r=-i.height-l)),t.endsWith("end")?(n=e.width-i.width,e.left+n<0&&(n=0)):(n=0,e.left+i.width>d&&(n=e.width-i.width)),this.#e.style.setProperty("--dropdown-top",`${r}px`),this.#e.style.setProperty("--dropdown-left",`${n}px`)}}get isOpen(){return this.#i}};f("drop-down",c);export{c as DropDown};
2
2
  //# sourceMappingURL=drop-down.js.map
@@ -1,2 +1,2 @@
1
- var E=Object.defineProperty;var S=(i,e)=>()=>(i&&(e=i(i=0)),e);var A=(i,e)=>{for(var o in e)E(i,o,{get:e[o],enumerable:!0})};var b={};A(b,{EMOJI_ALIASES:()=>k,EMOJI_GROUPS:()=>F,EMOJI_GROUP_ICONS:()=>M,EMOJI_GROUP_LABELS:()=>C,EMOJI_MAP:()=>n,getByGroup:()=>T,resolveEmoji:()=>x,searchEmoji:()=>R});function f(i){for(let[e,o,t,r]of i){if(n.has(e))continue;let s={shortcode:e,emoji:o,name:t,keywords:[],group:r};n.set(e,s),m.push(s)}}function x(i){let e=n.get(i);if(e)return e;let o=k.get(i);return o&&n.get(o)||null}function T(i){let e=l.filter(t=>t.group===i),o=m.filter(t=>t.group===i);return o.length>0?e.concat(o):e}function R(i){let e=i.toLowerCase().trim(),o=m.length>0?l.concat(m):l;return e?o.filter(t=>t.shortcode.includes(e)||t.name.toLowerCase().includes(e)||t.keywords&&t.keywords.some(r=>r.includes(e))):o}var l,n,k,F,C,M,m,j=S(()=>{l=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],n=new Map(l.map(i=>[i.shortcode,i])),k=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["raised_fist","muscle"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["poop","skull"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),F=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],C={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},M={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},m=[];globalThis.__vbEmojiRegister=f;globalThis.__vbEmojiExtended&&(f(globalThis.__vbEmojiExtended),delete globalThis.__vbEmojiExtended)});var I=window.matchMedia("(prefers-reduced-motion: reduce)");var y=new Map;function w(i,e,o={}){let t=o.priority??10,r={impl:e,bundle:o.bundle,contract:o.contract,priority:t},s=y.get(i);if(customElements.get(i)){if(!s||s.priority>=t){s&&s.priority===t&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${o.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${o.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=t){s.priority===t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}". Skipping "${o.bundle}" (first wins at equal priority).`);return}y.set(i,r),customElements.define(i,e)}var c=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,o,t,r){e.addEventListener(o,t,r),this.#e.push(()=>e.removeEventListener(o,t,r))}setup(){}teardown(){}};var h=null;async function B(){return h||(h=await Promise.resolve().then(()=>(j(),b)),h)}var p=8,O=150,v="vb-emoji-recent",g=class extends c{#e;#s;#o;#t;#n;#a=!1;#d=[];#i=-1;#m=null;#c="";#r=null;#y=!1;#h=null;#u=null;async setup(){this.#r=await B(),this.#y||(this.#k(),this.#y=!0),this.#e&&this.listen(this.#e,"click",this.#j),this.listen(document,"click",this.#v),this.listen(document,"keydown",this.#_)}teardown(){this.#m&&clearTimeout(this.#m)}#k(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.type="button",this.#e.textContent="\u{1F600}",this.#e.setAttribute("data-trigger",""),this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-label",this.#e.getAttribute("aria-label")||"Open emoji picker"),this.#f()}#f(){this.#s=document.createElement("div"),this.#s.classList.add("picker"),this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Emoji picker"),this.#s.hidden=!0,this.#o=document.createElement("input"),this.#o.type="search",this.#o.placeholder="Search emoji\u2026",this.#o.setAttribute("aria-label","Search emoji"),this.#o.addEventListener("input",this.#E),this.#o.addEventListener("keydown",this.#S),this.#s.appendChild(this.#o),this.#n=document.createElement("nav"),this.#n.classList.add("categories"),this.#n.setAttribute("role","tablist"),this.#n.setAttribute("aria-label","Emoji categories");for(let e of this.#r.EMOJI_GROUPS){let o=document.createElement("button");o.type="button",o.setAttribute("role","tab"),o.setAttribute("aria-selected",e===this.#r.EMOJI_GROUPS[0]?"true":"false"),o.setAttribute("data-group",e),o.setAttribute("aria-label",this.#r.EMOJI_GROUP_LABELS[e]),o.title=this.#r.EMOJI_GROUP_LABELS[e],o.textContent=this.#r.EMOJI_GROUP_ICONS[e],o.addEventListener("click",this.#A),this.#n.appendChild(o)}this.#s.appendChild(this.#n),this.#t=document.createElement("div"),this.#t.classList.add("grid"),this.#t.setAttribute("role","grid"),this.#t.setAttribute("aria-label","Emoji"),this.#t.addEventListener("keydown",this.#F),this.#s.appendChild(this.#t),this.appendChild(this.#s),this.#p()}#p(e=null){this.#t.innerHTML="",this.#d=[],this.#i=-1;let o=this.#w();if(!this.#c&&o.length>0){let r=document.createElement("div");r.classList.add("group-label"),r.textContent="Recently Used",r.setAttribute("data-group-heading","recent"),this.#t.appendChild(r);for(let s of o){let a=this.#r.EMOJI_MAP.get(s);a&&this.#g(a)}}let t=e||null;if(t)if(t.length===0){let r=document.createElement("div");r.classList.add("no-results"),r.textContent="No emoji found",this.#t.appendChild(r)}else for(let r of t)this.#g(r);else for(let r of this.#r.EMOJI_GROUPS){let s=document.createElement("div");s.classList.add("group-label"),s.textContent=this.#r.EMOJI_GROUP_LABELS[r],s.setAttribute("data-group-heading",r),this.#t.appendChild(s);let a=this.#r.getByGroup(r);for(let u of a)this.#g(u)}}#g(e){let o=document.createElement("button");o.type="button",o.setAttribute("role","gridcell"),o.setAttribute("tabindex","-1"),o.setAttribute("data-shortcode",e.shortcode),o.title=`${e.name} :${e.shortcode}:`,o.textContent=e.emoji,o.addEventListener("click",this.#C),this.#t.appendChild(o),this.#d.push(o)}#b(){let e=this.getAttribute("for");if(!e)return;let o=document.getElementById(e);if(o){if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"){let t=o;this.#h={start:t.selectionStart??t.value.length,end:t.selectionEnd??t.value.length},this.#u=null}else if(o.isContentEditable){let t=window.getSelection();t&&t.rangeCount>0&&(this.#u=t.getRangeAt(0).cloneRange()),this.#h=null}}}#j=e=>{e.stopPropagation(),this.toggle()};#v=e=>{this.#a&&!this.contains(e.target)&&this.close()};#_=e=>{e.key==="Escape"&&this.#a&&(e.preventDefault(),this.close(),this.#e?.focus())};#E=()=>{this.#m&&clearTimeout(this.#m),this.#m=setTimeout(()=>{if(this.#c=this.#o.value.trim(),this.#c){let e=this.#r.searchEmoji(this.#c);this.#p(e)}else this.#p()},O)};#S=e=>{e.key==="ArrowDown"&&(e.preventDefault(),this.#d.length>0&&this.#l(0))};#A=e=>{let o=e.currentTarget.getAttribute("data-group");for(let r of this.#n.querySelectorAll('[role="tab"]'))r.setAttribute("aria-selected",r===e.currentTarget?"true":"false");this.#c&&(this.#o.value="",this.#c="",this.#p());let t=this.#t.querySelector(`[data-group-heading="${o}"]`);t&&t.scrollIntoView({block:"start",behavior:"smooth"})};#F=e=>{let o=this.#d.length;if(o!==0)switch(e.key){case"ArrowRight":e.preventDefault(),this.#l(this.#i+1);break;case"ArrowLeft":e.preventDefault(),this.#l(this.#i-1);break;case"ArrowDown":e.preventDefault(),this.#l(this.#i+p);break;case"ArrowUp":e.preventDefault(),this.#i<p?(this.#o.focus(),this.#i=-1):this.#l(this.#i-p);break;case"Home":e.preventDefault(),this.#l(0);break;case"End":e.preventDefault(),this.#l(o-1);break;case"Enter":case" ":e.preventDefault(),this.#i>=0&&this.#d[this.#i].click();break;case"Tab":this.close();break}};#C=e=>{let o=e.currentTarget.getAttribute("data-shortcode"),t=this.#r.EMOJI_MAP.get(o);t&&(this.#T(o),this.#M(t),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:t.shortcode,emoji:t.emoji,name:t.name,keywords:t.keywords}})),this.close(),this.#x())};#l(e){let o=this.#d.length;o!==0&&(e<0&&(e=0),e>=o&&(e=o-1),this.#i=e,this.#d[e].focus())}#M(e){let o=this.getAttribute("for");if(!o)return;let t=document.getElementById(o);if(t){if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"){let r=t,s=this.#h?.start??r.value.length,a=this.#h?.end??s,u=r.value.slice(0,s),_=r.value.slice(a);r.value=u+e.emoji+_;let d=s+e.emoji.length;r.setSelectionRange(d,d),this.#h={start:d,end:d},t.dispatchEvent(new Event("input",{bubbles:!0}))}else if(t.isContentEditable){t.focus();let r=window.getSelection();if(r&&this.#u){r.removeAllRanges(),r.addRange(this.#u);let s=r.getRangeAt(0);s.deleteContents();let a=document.createTextNode(e.emoji);s.insertNode(a),s.setStartAfter(a),s.collapse(!0),r.removeAllRanges(),r.addRange(s),this.#u=s.cloneRange()}else if(r){let s=document.createRange();s.selectNodeContents(t),s.collapse(!1);let a=document.createTextNode(e.emoji);s.insertNode(a),s.setStartAfter(a),s.collapse(!0),r.removeAllRanges(),r.addRange(s)}}}}#x(){let e=this.getAttribute("for");if(!e)return;let o=document.getElementById(e);o&&o.focus()}#w(){try{return JSON.parse(localStorage.getItem(v)||"[]")}catch{return[]}}#T(e){let o=parseInt(this.getAttribute("recent-limit")??"24",10)||24,t=this.#w();t=t.filter(r=>r!==e),t.unshift(e),t.length>o&&(t.length=o);try{localStorage.setItem(v,JSON.stringify(t))}catch{}}open(){this.#a||(this.#b(),this.#a=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#s.hidden=!1,this.#o.value="",this.#c="",this.#p(),requestAnimationFrame(()=>{this.#o.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#s.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#a?this.close():this.open()}get isOpen(){return this.#a}};w("emoji-picker",g);export{g as EmojiPicker};
1
+ var E=Object.defineProperty;var S=(i,e)=>()=>(i&&(e=i(i=0)),e);var A=(i,e)=>{for(var o in e)E(i,o,{get:e[o],enumerable:!0})};var b={};A(b,{EMOJI_ALIASES:()=>k,EMOJI_GROUPS:()=>F,EMOJI_GROUP_ICONS:()=>M,EMOJI_GROUP_LABELS:()=>C,EMOJI_MAP:()=>n,getByGroup:()=>T,resolveEmoji:()=>x,searchEmoji:()=>R});function f(i){for(let[e,o,t,r]of i){if(n.has(e))continue;let s={shortcode:e,emoji:o,name:t,keywords:[],group:r};n.set(e,s),m.push(s)}}function x(i){let e=n.get(i);if(e)return e;let o=k.get(i);return o&&n.get(o)||null}function T(i){let e=l.filter(t=>t.group===i),o=m.filter(t=>t.group===i);return o.length>0?e.concat(o):e}function R(i){let e=i.toLowerCase().trim(),o=m.length>0?l.concat(m):l;return e?o.filter(t=>t.shortcode.includes(e)||t.name.toLowerCase().includes(e)||t.keywords&&t.keywords.some(r=>r.includes(e))):o}var l,n,k,F,C,M,m,j=S(()=>{l=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],n=new Map(l.map(i=>[i.shortcode,i])),k=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["raised_fist","muscle"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["poop","skull"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),F=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],C={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},M={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},m=[];globalThis.__vbEmojiRegister=f;globalThis.__vbEmojiExtended&&(f(globalThis.__vbEmojiExtended),delete globalThis.__vbEmojiExtended)});var I=window.matchMedia("(prefers-reduced-motion: reduce)");var y=new Map;function w(i,e,o={}){let t=o.priority??10,r={impl:e,bundle:o.bundle,contract:o.contract,priority:t},s=y.get(i);if(customElements.get(i)){if(!s||s.priority>=t){s&&s.priority===t&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${o.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${o.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=t){s.priority===t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}". Skipping "${o.bundle}" (first wins at equal priority).`);return}y.set(i,r),customElements.define(i,e)}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 e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,o,t,r){e.addEventListener(o,t,r),this.#e.push(()=>e.removeEventListener(o,t,r))}setup(){}teardown(){}};var h=null;async function B(){return h||(h=await Promise.resolve().then(()=>(j(),b)),h)}var p=8,O=150,v="vb-emoji-recent",g=class extends c{#e;#s;#o;#t;#n;#a=!1;#d=[];#i=-1;#m=null;#c="";#r=null;#y=!1;#h=null;#u=null;async setup(){this.#r=await B(),this.#y||(this.#k(),this.#y=!0),this.#e&&this.listen(this.#e,"click",this.#j),this.listen(document,"click",this.#v),this.listen(document,"keydown",this.#_)}teardown(){this.#m&&clearTimeout(this.#m)}#k(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.type="button",this.#e.textContent="\u{1F600}",this.#e.setAttribute("data-trigger",""),this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-label",this.#e.getAttribute("aria-label")||"Open emoji picker"),this.#f()}#f(){this.#s=document.createElement("div"),this.#s.classList.add("picker"),this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-label","Emoji picker"),this.#s.hidden=!0,this.#o=document.createElement("input"),this.#o.type="search",this.#o.placeholder="Search emoji\u2026",this.#o.setAttribute("aria-label","Search emoji"),this.#o.addEventListener("input",this.#E),this.#o.addEventListener("keydown",this.#S),this.#s.appendChild(this.#o),this.#n=document.createElement("nav"),this.#n.classList.add("categories"),this.#n.setAttribute("role","tablist"),this.#n.setAttribute("aria-label","Emoji categories");for(let e of this.#r.EMOJI_GROUPS){let o=document.createElement("button");o.type="button",o.setAttribute("role","tab"),o.setAttribute("aria-selected",e===this.#r.EMOJI_GROUPS[0]?"true":"false"),o.setAttribute("data-group",e),o.setAttribute("aria-label",this.#r.EMOJI_GROUP_LABELS[e]),o.title=this.#r.EMOJI_GROUP_LABELS[e],o.textContent=this.#r.EMOJI_GROUP_ICONS[e],o.addEventListener("click",this.#A),this.#n.appendChild(o)}this.#s.appendChild(this.#n),this.#t=document.createElement("div"),this.#t.classList.add("grid"),this.#t.setAttribute("role","grid"),this.#t.setAttribute("aria-label","Emoji"),this.#t.addEventListener("keydown",this.#F),this.#s.appendChild(this.#t),this.appendChild(this.#s),this.#p()}#p(e=null){this.#t.innerHTML="",this.#d=[],this.#i=-1;let o=this.#w();if(!this.#c&&o.length>0){let r=document.createElement("div");r.classList.add("group-label"),r.textContent="Recently Used",r.setAttribute("data-group-heading","recent"),this.#t.appendChild(r);for(let s of o){let a=this.#r.EMOJI_MAP.get(s);a&&this.#g(a)}}let t=e||null;if(t)if(t.length===0){let r=document.createElement("div");r.classList.add("no-results"),r.textContent="No emoji found",this.#t.appendChild(r)}else for(let r of t)this.#g(r);else for(let r of this.#r.EMOJI_GROUPS){let s=document.createElement("div");s.classList.add("group-label"),s.textContent=this.#r.EMOJI_GROUP_LABELS[r],s.setAttribute("data-group-heading",r),this.#t.appendChild(s);let a=this.#r.getByGroup(r);for(let u of a)this.#g(u)}}#g(e){let o=document.createElement("button");o.type="button",o.setAttribute("role","gridcell"),o.setAttribute("tabindex","-1"),o.setAttribute("data-shortcode",e.shortcode),o.title=`${e.name} :${e.shortcode}:`,o.textContent=e.emoji,o.addEventListener("click",this.#C),this.#t.appendChild(o),this.#d.push(o)}#b(){let e=this.getAttribute("for");if(!e)return;let o=document.getElementById(e);if(o){if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"){let t=o;this.#h={start:t.selectionStart??t.value.length,end:t.selectionEnd??t.value.length},this.#u=null}else if(o.isContentEditable){let t=window.getSelection();t&&t.rangeCount>0&&(this.#u=t.getRangeAt(0).cloneRange()),this.#h=null}}}#j=e=>{e.stopPropagation(),this.toggle()};#v=e=>{this.#a&&!this.contains(e.target)&&this.close()};#_=e=>{e.key==="Escape"&&this.#a&&(e.preventDefault(),this.close(),this.#e?.focus())};#E=()=>{this.#m&&clearTimeout(this.#m),this.#m=setTimeout(()=>{if(this.#c=this.#o.value.trim(),this.#c){let e=this.#r.searchEmoji(this.#c);this.#p(e)}else this.#p()},O)};#S=e=>{e.key==="ArrowDown"&&(e.preventDefault(),this.#d.length>0&&this.#l(0))};#A=e=>{let o=e.currentTarget.getAttribute("data-group");for(let r of this.#n.querySelectorAll('[role="tab"]'))r.setAttribute("aria-selected",r===e.currentTarget?"true":"false");this.#c&&(this.#o.value="",this.#c="",this.#p());let t=this.#t.querySelector(`[data-group-heading="${o}"]`);t&&t.scrollIntoView({block:"start",behavior:"smooth"})};#F=e=>{let o=this.#d.length;if(o!==0)switch(e.key){case"ArrowRight":e.preventDefault(),this.#l(this.#i+1);break;case"ArrowLeft":e.preventDefault(),this.#l(this.#i-1);break;case"ArrowDown":e.preventDefault(),this.#l(this.#i+p);break;case"ArrowUp":e.preventDefault(),this.#i<p?(this.#o.focus(),this.#i=-1):this.#l(this.#i-p);break;case"Home":e.preventDefault(),this.#l(0);break;case"End":e.preventDefault(),this.#l(o-1);break;case"Enter":case" ":e.preventDefault(),this.#i>=0&&this.#d[this.#i].click();break;case"Tab":this.close();break}};#C=e=>{let o=e.currentTarget.getAttribute("data-shortcode"),t=this.#r.EMOJI_MAP.get(o);t&&(this.#T(o),this.#M(t),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:t.shortcode,emoji:t.emoji,name:t.name,keywords:t.keywords}})),this.close(),this.#x())};#l(e){let o=this.#d.length;o!==0&&(e<0&&(e=0),e>=o&&(e=o-1),this.#i=e,this.#d[e].focus())}#M(e){let o=this.getAttribute("for");if(!o)return;let t=document.getElementById(o);if(t){if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"){let r=t,s=this.#h?.start??r.value.length,a=this.#h?.end??s,u=r.value.slice(0,s),_=r.value.slice(a);r.value=u+e.emoji+_;let d=s+e.emoji.length;r.setSelectionRange(d,d),this.#h={start:d,end:d},t.dispatchEvent(new Event("input",{bubbles:!0}))}else if(t.isContentEditable){t.focus();let r=window.getSelection();if(r&&this.#u){r.removeAllRanges(),r.addRange(this.#u);let s=r.getRangeAt(0);s.deleteContents();let a=document.createTextNode(e.emoji);s.insertNode(a),s.setStartAfter(a),s.collapse(!0),r.removeAllRanges(),r.addRange(s),this.#u=s.cloneRange()}else if(r){let s=document.createRange();s.selectNodeContents(t),s.collapse(!1);let a=document.createTextNode(e.emoji);s.insertNode(a),s.setStartAfter(a),s.collapse(!0),r.removeAllRanges(),r.addRange(s)}}}}#x(){let e=this.getAttribute("for");if(!e)return;let o=document.getElementById(e);o&&o.focus()}#w(){try{return JSON.parse(localStorage.getItem(v)||"[]")}catch{return[]}}#T(e){let o=parseInt(this.getAttribute("recent-limit")??"24",10)||24,t=this.#w();t=t.filter(r=>r!==e),t.unshift(e),t.length>o&&(t.length=o);try{localStorage.setItem(v,JSON.stringify(t))}catch{}}open(){this.#a||(this.#b(),this.#a=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#s.hidden=!1,this.#o.value="",this.#c="",this.#p(),requestAnimationFrame(()=>{this.#o.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#s.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#a?this.close():this.open()}get isOpen(){return this.#a}};w("emoji-picker",g);export{g as EmojiPicker};
2
2
  //# sourceMappingURL=emoji-picker.js.map
@@ -1,2 +1,2 @@
1
- var E=window.matchMedia("(prefers-reduced-motion: reduce)");var p=new Map;function b(c,t,n={}){let e=n.priority??10,s={impl:t,bundle:n.bundle,contract:n.contract,priority:e},i=p.get(c);if(customElements.get(c)){if(!i||i.priority>=e){i&&i.priority===e&&i.impl!==t&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${c}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=e){i.priority===e&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${i.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}p.set(c,s),customElements.define(c,t)}var f=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,s){t.addEventListener(n,e,s),this.#t.push(()=>t.removeEventListener(n,e,s))}setup(){}teardown(){}};var m=class extends f{static get observedAttributes(){return["src","title","compact"]}#t=null;#n=null;#e=null;#s=0;setup(){let t=this.querySelector(":scope > ol");if(!t)return!1;let n=this.#i(t);if(n.length===0)return!1;t.style.display="none",t.setAttribute("aria-hidden","true");let e=this.getAttribute("title");e&&(this.#n=document.createElement("h2"),this.#n.className="fd-title",this.#n.textContent=e,this.insertBefore(this.#n,t)),this.#t=document.createElement("div"),this.#t.className="fd-container",this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`Flow diagram${e?": "+e:""}`),this.#s=0,this.#o(n,this.#t);let s=document.createElement("div");s.className="fd-summary",s.textContent=`${this.#s} step${this.#s!==1?"s":""}`,this.#t.appendChild(s),this.insertBefore(this.#t,t),this.#e=document.createElement("div"),this.#e.className="fd-live",this.#e.setAttribute("role","status"),this.#e.setAttribute("aria-live","polite"),this.#e.setAttribute("aria-atomic","true"),this.appendChild(this.#e),this.listen(this.#t,"click",i=>{let o=i.target.closest(".fd-node-shape");if(!o)return;let a=o.closest(".fd-node")?.dataset.type||"action",d=o.textContent?.trim()||"";this.#l(`Selected: ${d}`),this.dispatchEvent(new CustomEvent("flow-diagram:select",{bubbles:!0,detail:{type:a,text:d}}))}),this.dispatchEvent(new CustomEvent("flow-diagram:ready",{bubbles:!0,detail:{nodeCount:this.#s}}))}teardown(){this.#n&&(this.#n.remove(),this.#n=null),this.#t&&(this.#t.remove(),this.#t=null),this.#e&&(this.#e.remove(),this.#e=null);let t=this.querySelector("ol");t&&(t.style.display="",t.removeAttribute("aria-hidden")),this.#s=0}attributeChangedCallback(t,n,e){n===e||!this.isConnected||(t==="src"?this._loadSrc(e):this.hasAttribute("data-upgraded")&&(this.teardown(),this.removeAttribute("data-upgraded"),this.setup()))}#i(t){let n=[];for(let e of t.querySelectorAll(":scope > li")){let s=this.#c(e);s&&n.push(s)}return n}#c(t){let n=t.dataset.type||"action",e=t.dataset.annotation||"",s=[],i=t.querySelectorAll(":scope > ol > li[data-branch]");if(i.length>0)for(let r of i){let a=r.dataset.branch||"",d=r.querySelector(":scope > ol"),l=d?this.#i(d):[];s.push({label:a,steps:l})}let o="";for(let r of t.childNodes)(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.ELEMENT_NODE&&r.tagName!=="OL")&&(o+=r.textContent);return o=o.trim(),{type:n,text:o,annotation:e,branches:s}}#o(t,n){for(let e=0;e<t.length;e++){let s=t[e];e>0&&n.appendChild(this.#r());let i=this.#d(s);if(n.appendChild(i),s.branches.length>0){let o=document.createElement("div");o.className="fd-branches",o.setAttribute("data-branch-count",String(s.branches.length));let r=document.createElement("div");r.className="fd-split-line",r.setAttribute("aria-hidden","true"),o.appendChild(r);let a=document.createElement("div");a.className="fd-branch-columns";let d=(50/s.branches.length).toFixed(2);a.style.setProperty("--fd-inset",`${d}%`);for(let l of s.branches){let h=document.createElement("div");h.className="fd-branch",h.appendChild(this.#r());let u=document.createElement("span");u.className="fd-branch-label",u.textContent=l.label,u.setAttribute("data-branch",l.label.toLowerCase()),h.appendChild(u),this.#o(l.steps,h),a.appendChild(h)}o.appendChild(a),n.appendChild(o)}}}#d(t){this.#s++;let n=document.createElement("div");n.className="fd-node",n.dataset.type=t.type;let e=document.createElement("div");if(e.className="fd-node-shape",e.setAttribute("tabindex","0"),e.setAttribute("role","img"),e.setAttribute("aria-label",`${t.type}: ${t.text}`),e.textContent=t.text,n.appendChild(e),t.annotation){let s=document.createElement("div");s.className="fd-annotation",s.textContent=t.annotation,n.appendChild(s)}return n}#r(t){let n=document.createElement("div");n.className="fd-connector",n.setAttribute("aria-hidden","true");let e=document.createElement("div");if(e.className="fd-connector-line",n.appendChild(e),t){let i=document.createElement("span");i.className="fd-connector-label",i.textContent=t,n.appendChild(i)}let s=document.createElement("div");return s.className="fd-connector-arrow",n.appendChild(s),n}async _loadSrc(t){if(t)try{let n=await fetch(t);if(!n.ok)throw new Error(`HTTP ${n.status}`);let e=await n.json();for(;this.firstChild;)this.firstChild.remove();e.title&&this.setAttribute("title",e.title);let s=document.createElement("ol");this.#a(e.steps||[],s),this.appendChild(s),this.teardown(),this.removeAttribute("data-upgraded"),this.setup()}catch(n){console.warn(`[flow-diagram] Failed to load src="${t}":`,n)}}#a(t,n){for(let e of t){let s=document.createElement("li");if(e.type&&(s.dataset.type=e.type),e.annotation&&(s.dataset.annotation=e.annotation),s.textContent=e.text||"",e.branches&&e.branches.length>0){let i=document.createElement("ol");for(let o of e.branches){let r=document.createElement("li");r.dataset.branch=o.label||"";let a=document.createElement("ol");this.#a(o.steps||[],a),r.appendChild(a),i.appendChild(r)}s.appendChild(i)}n.appendChild(s)}}#l(t){this.#e&&(this.#e.textContent="",requestAnimationFrame(()=>{this.#e&&(this.#e.textContent=t)}))}};b("flow-diagram",m);export{m as FlowDiagram};
1
+ var E=window.matchMedia("(prefers-reduced-motion: reduce)");var p=new Map;function b(c,t,n={}){let e=n.priority??10,s={impl:t,bundle:n.bundle,contract:n.contract,priority:e},i=p.get(c);if(customElements.get(c)){if(!i||i.priority>=e){i&&i.priority===e&&i.impl!==t&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${c}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=e){i.priority===e&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${i.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}p.set(c,s),customElements.define(c,t)}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 t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,s){t.addEventListener(n,e,s),this.#t.push(()=>t.removeEventListener(n,e,s))}setup(){}teardown(){}};var m=class extends f{static get observedAttributes(){return["src","title","compact"]}#t=null;#n=null;#e=null;#s=0;setup(){let t=this.querySelector(":scope > ol");if(!t)return!1;let n=this.#i(t);if(n.length===0)return!1;t.style.display="none",t.setAttribute("aria-hidden","true");let e=this.getAttribute("title");e&&(this.#n=document.createElement("h2"),this.#n.className="fd-title",this.#n.textContent=e,this.insertBefore(this.#n,t)),this.#t=document.createElement("div"),this.#t.className="fd-container",this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`Flow diagram${e?": "+e:""}`),this.#s=0,this.#o(n,this.#t);let s=document.createElement("div");s.className="fd-summary",s.textContent=`${this.#s} step${this.#s!==1?"s":""}`,this.#t.appendChild(s),this.insertBefore(this.#t,t),this.#e=document.createElement("div"),this.#e.className="fd-live",this.#e.setAttribute("role","status"),this.#e.setAttribute("aria-live","polite"),this.#e.setAttribute("aria-atomic","true"),this.appendChild(this.#e),this.listen(this.#t,"click",i=>{let o=i.target.closest(".fd-node-shape");if(!o)return;let a=o.closest(".fd-node")?.dataset.type||"action",d=o.textContent?.trim()||"";this.#l(`Selected: ${d}`),this.dispatchEvent(new CustomEvent("flow-diagram:select",{bubbles:!0,detail:{type:a,text:d}}))}),this.dispatchEvent(new CustomEvent("flow-diagram:ready",{bubbles:!0,detail:{nodeCount:this.#s}}))}teardown(){this.#n&&(this.#n.remove(),this.#n=null),this.#t&&(this.#t.remove(),this.#t=null),this.#e&&(this.#e.remove(),this.#e=null);let t=this.querySelector("ol");t&&(t.style.display="",t.removeAttribute("aria-hidden")),this.#s=0}attributeChangedCallback(t,n,e){n===e||!this.isConnected||(t==="src"?this._loadSrc(e):this.hasAttribute("data-upgraded")&&(this.teardown(),this.removeAttribute("data-upgraded"),this.setup()))}#i(t){let n=[];for(let e of t.querySelectorAll(":scope > li")){let s=this.#c(e);s&&n.push(s)}return n}#c(t){let n=t.dataset.type||"action",e=t.dataset.annotation||"",s=[],i=t.querySelectorAll(":scope > ol > li[data-branch]");if(i.length>0)for(let r of i){let a=r.dataset.branch||"",d=r.querySelector(":scope > ol"),l=d?this.#i(d):[];s.push({label:a,steps:l})}let o="";for(let r of t.childNodes)(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.ELEMENT_NODE&&r.tagName!=="OL")&&(o+=r.textContent);return o=o.trim(),{type:n,text:o,annotation:e,branches:s}}#o(t,n){for(let e=0;e<t.length;e++){let s=t[e];e>0&&n.appendChild(this.#r());let i=this.#d(s);if(n.appendChild(i),s.branches.length>0){let o=document.createElement("div");o.className="fd-branches",o.setAttribute("data-branch-count",String(s.branches.length));let r=document.createElement("div");r.className="fd-split-line",r.setAttribute("aria-hidden","true"),o.appendChild(r);let a=document.createElement("div");a.className="fd-branch-columns";let d=(50/s.branches.length).toFixed(2);a.style.setProperty("--fd-inset",`${d}%`);for(let l of s.branches){let h=document.createElement("div");h.className="fd-branch",h.appendChild(this.#r());let u=document.createElement("span");u.className="fd-branch-label",u.textContent=l.label,u.setAttribute("data-branch",l.label.toLowerCase()),h.appendChild(u),this.#o(l.steps,h),a.appendChild(h)}o.appendChild(a),n.appendChild(o)}}}#d(t){this.#s++;let n=document.createElement("div");n.className="fd-node",n.dataset.type=t.type;let e=document.createElement("div");if(e.className="fd-node-shape",e.setAttribute("tabindex","0"),e.setAttribute("role","img"),e.setAttribute("aria-label",`${t.type}: ${t.text}`),e.textContent=t.text,n.appendChild(e),t.annotation){let s=document.createElement("div");s.className="fd-annotation",s.textContent=t.annotation,n.appendChild(s)}return n}#r(t){let n=document.createElement("div");n.className="fd-connector",n.setAttribute("aria-hidden","true");let e=document.createElement("div");if(e.className="fd-connector-line",n.appendChild(e),t){let i=document.createElement("span");i.className="fd-connector-label",i.textContent=t,n.appendChild(i)}let s=document.createElement("div");return s.className="fd-connector-arrow",n.appendChild(s),n}async _loadSrc(t){if(t)try{let n=await fetch(t);if(!n.ok)throw new Error(`HTTP ${n.status}`);let e=await n.json();for(;this.firstChild;)this.firstChild.remove();e.title&&this.setAttribute("title",e.title);let s=document.createElement("ol");this.#a(e.steps||[],s),this.appendChild(s),this.teardown(),this.removeAttribute("data-upgraded"),this.setup()}catch(n){console.warn(`[flow-diagram] Failed to load src="${t}":`,n)}}#a(t,n){for(let e of t){let s=document.createElement("li");if(e.type&&(s.dataset.type=e.type),e.annotation&&(s.dataset.annotation=e.annotation),s.textContent=e.text||"",e.branches&&e.branches.length>0){let i=document.createElement("ol");for(let o of e.branches){let r=document.createElement("li");r.dataset.branch=o.label||"";let a=document.createElement("ol");this.#a(o.steps||[],a),r.appendChild(a),i.appendChild(r)}s.appendChild(i)}n.appendChild(s)}}#l(t){this.#e&&(this.#e.textContent="",requestAnimationFrame(()=>{this.#e&&(this.#e.textContent=t)}))}};b("flow-diagram",m);export{m as FlowDiagram};
2
2
  //# sourceMappingURL=flow-diagram.js.map
@@ -1,4 +1,4 @@
1
- var D=window.matchMedia("(prefers-reduced-motion: reduce)");var w=new Map;function x(t,e,i={}){let o=i.priority??10,r={impl:e,bundle:i.bundle,contract:i.contract,priority:o},s=w.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 "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${i.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 "${i.bundle}" (first wins at equal priority).`);return}w.set(t,r),customElements.define(t,e)}var p=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,i,o,r){e.addEventListener(i,o,r),this.#e.push(()=>e.removeEventListener(i,o,r))}setup(){}teardown(){}};var f=[{name:"Playfair Display",category:"serif",weights:"400;600;700;900",style:"elegant"},{name:"Merriweather",category:"serif",weights:"300;400;700;900",style:"readable"},{name:"Lora",category:"serif",weights:"400;500;600;700",style:"elegant"},{name:"Source Serif 4",category:"serif",weights:"300;400;600;700",style:"neutral"},{name:"Libre Baskerville",category:"serif",weights:"400;700",style:"classic"},{name:"Crimson Text",category:"serif",weights:"400;600;700",style:"classic"},{name:"DM Serif Display",category:"serif",weights:"400",style:"bold"},{name:"Cormorant Garamond",category:"serif",weights:"300;400;500;600;700",style:"elegant"},{name:"Inter",category:"sans-serif",weights:"300;400;500;600;700",style:"neutral"},{name:"Open Sans",category:"sans-serif",weights:"300;400;600;700",style:"friendly"},{name:"Roboto",category:"sans-serif",weights:"300;400;500;700",style:"neutral"},{name:"Lato",category:"sans-serif",weights:"300;400;700;900",style:"warm"},{name:"Nunito",category:"sans-serif",weights:"300;400;600;700",style:"friendly"},{name:"Work Sans",category:"sans-serif",weights:"300;400;500;600;700",style:"geometric"},{name:"DM Sans",category:"sans-serif",weights:"400;500;700",style:"geometric"},{name:"Plus Jakarta Sans",category:"sans-serif",weights:"300;400;500;600;700",style:"modern"},{name:"Space Grotesk",category:"sans-serif",weights:"300;400;500;600;700",style:"technical"},{name:"Manrope",category:"sans-serif",weights:"300;400;500;600;700",style:"geometric"},{name:"IBM Plex Sans",category:"sans-serif",weights:"300;400;500;600",style:"technical"},{name:"Outfit",category:"sans-serif",weights:"300;400;500;600;700",style:"modern"},{name:"Bebas Neue",category:"display",weights:"400",style:"bold"},{name:"Abril Fatface",category:"display",weights:"400",style:"elegant"},{name:"Oswald",category:"display",weights:"300;400;500;600;700",style:"condensed"},{name:"Sora",category:"display",weights:"300;400;500;600;700",style:"modern"},{name:"Fraunces",category:"display",weights:"300;400;500;600;700;900",style:"elegant"},{name:"JetBrains Mono",category:"monospace",weights:"400;500;600;700",style:"technical"},{name:"Fira Code",category:"monospace",weights:"300;400;500;600;700",style:"technical"},{name:"IBM Plex Mono",category:"monospace",weights:"400;500;600",style:"technical"},{name:"Source Code Pro",category:"monospace",weights:"300;400;500;600;700",style:"neutral"}],z=[["Playfair Display","Inter"],["DM Serif Display","DM Sans"],["Fraunces","Plus Jakarta Sans"],["Lora","Open Sans"],["Merriweather","Roboto"],["Oswald","Lato"],["Cormorant Garamond","Work Sans"],["Sora","Inter"],["Abril Fatface","Nunito"],["Source Serif 4","Source Code Pro"],["Space Grotesk","IBM Plex Sans"],["Outfit","Manrope"]];function g(t,e="400;700"){return`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}:wght@${e}&display=swap`}async function k(t,e="400;700"){let i=`gf-${t.replace(/\s+/g,"-").toLowerCase()}`;if(document.getElementById(i)){await document.fonts.ready;return}let o=document.createElement("link");o.id=i,o.rel="stylesheet",o.href=g(t,e),document.head.appendChild(o),await document.fonts.ready}var n=(t,e,i,o="")=>`${o} contenteditable="plaintext-only" spellcheck="false" class="fp-editable" data-role="${i}"`,u={combined:{label:"Combined",render:(t,e)=>`
1
+ var D=window.matchMedia("(prefers-reduced-motion: reduce)");var w=new Map;function x(t,e,i={}){let o=i.priority??10,r={impl:e,bundle:i.bundle,contract:i.contract,priority:o},s=w.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 "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${t}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${i.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 "${i.bundle}" (first wins at equal priority).`);return}w.set(t,r),customElements.define(t,e)}var p=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,i,o,r){e.addEventListener(i,o,r),this.#e.push(()=>e.removeEventListener(i,o,r))}setup(){}teardown(){}};var f=[{name:"Playfair Display",category:"serif",weights:"400;600;700;900",style:"elegant"},{name:"Merriweather",category:"serif",weights:"300;400;700;900",style:"readable"},{name:"Lora",category:"serif",weights:"400;500;600;700",style:"elegant"},{name:"Source Serif 4",category:"serif",weights:"300;400;600;700",style:"neutral"},{name:"Libre Baskerville",category:"serif",weights:"400;700",style:"classic"},{name:"Crimson Text",category:"serif",weights:"400;600;700",style:"classic"},{name:"DM Serif Display",category:"serif",weights:"400",style:"bold"},{name:"Cormorant Garamond",category:"serif",weights:"300;400;500;600;700",style:"elegant"},{name:"Inter",category:"sans-serif",weights:"300;400;500;600;700",style:"neutral"},{name:"Open Sans",category:"sans-serif",weights:"300;400;600;700",style:"friendly"},{name:"Roboto",category:"sans-serif",weights:"300;400;500;700",style:"neutral"},{name:"Lato",category:"sans-serif",weights:"300;400;700;900",style:"warm"},{name:"Nunito",category:"sans-serif",weights:"300;400;600;700",style:"friendly"},{name:"Work Sans",category:"sans-serif",weights:"300;400;500;600;700",style:"geometric"},{name:"DM Sans",category:"sans-serif",weights:"400;500;700",style:"geometric"},{name:"Plus Jakarta Sans",category:"sans-serif",weights:"300;400;500;600;700",style:"modern"},{name:"Space Grotesk",category:"sans-serif",weights:"300;400;500;600;700",style:"technical"},{name:"Manrope",category:"sans-serif",weights:"300;400;500;600;700",style:"geometric"},{name:"IBM Plex Sans",category:"sans-serif",weights:"300;400;500;600",style:"technical"},{name:"Outfit",category:"sans-serif",weights:"300;400;500;600;700",style:"modern"},{name:"Bebas Neue",category:"display",weights:"400",style:"bold"},{name:"Abril Fatface",category:"display",weights:"400",style:"elegant"},{name:"Oswald",category:"display",weights:"300;400;500;600;700",style:"condensed"},{name:"Sora",category:"display",weights:"300;400;500;600;700",style:"modern"},{name:"Fraunces",category:"display",weights:"300;400;500;600;700;900",style:"elegant"},{name:"JetBrains Mono",category:"monospace",weights:"400;500;600;700",style:"technical"},{name:"Fira Code",category:"monospace",weights:"300;400;500;600;700",style:"technical"},{name:"IBM Plex Mono",category:"monospace",weights:"400;500;600",style:"technical"},{name:"Source Code Pro",category:"monospace",weights:"300;400;500;600;700",style:"neutral"}],z=[["Playfair Display","Inter"],["DM Serif Display","DM Sans"],["Fraunces","Plus Jakarta Sans"],["Lora","Open Sans"],["Merriweather","Roboto"],["Oswald","Lato"],["Cormorant Garamond","Work Sans"],["Sora","Inter"],["Abril Fatface","Nunito"],["Source Serif 4","Source Code Pro"],["Space Grotesk","IBM Plex Sans"],["Outfit","Manrope"]];function g(t,e="400;700"){return`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}:wght@${e}&display=swap`}async function k(t,e="400;700"){let i=`gf-${t.replace(/\s+/g,"-").toLowerCase()}`;if(document.getElementById(i)){await document.fonts.ready;return}let o=document.createElement("link");o.id=i,o.rel="stylesheet",o.href=g(t,e),document.head.appendChild(o),await document.fonts.ready}var n=(t,e,i,o="")=>`${o} contenteditable="plaintext-only" spellcheck="false" class="fp-editable" data-role="${i}"`,u={combined:{label:"Combined",render:(t,e)=>`
2
2
  <p style="font-family:${t.display};font-size:var(--font-size-3xl,2rem);font-weight:800;margin:0;line-height:1.15"
3
3
  ${n(t.display,"p","heading")}>${e.heading}</p>
4
4
  <h3 style="font-family:${t.heading};font-size:var(--font-size-lg,1.125rem);font-weight:600;margin:0"
@@ -1,2 +1,2 @@
1
- var m=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function l(c,e,n={}){let i=n.priority??10,o={impl:e,bundle:n.bundle,contract:n.contract,priority:i},t=f.get(c);if(customElements.get(c)){if(!t||t.priority>=i){t&&t.priority===i&&t.impl!==e&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${t.bundle}" (priority ${t.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${c}> defined by "${t.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(t&&t.priority>=i){t.priority===i&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${t.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}f.set(c,o),customElements.define(c,e)}var d=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let e of this.#e)e();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,n,i,o){e.addEventListener(n,i,o),this.#e.push(()=>e.removeEventListener(n,i,o))}setup(){}teardown(){}};var u=class c extends d{static#e=0;#t;#n=[];#o="Back to content";setup(){this.#t=++c.#e,this.hasAttribute("data-back-label")&&(this.#o=this.getAttribute("data-back-label")??this.#o),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#a():this.#c()}#r(){let e=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#n=e.filter(n=>this.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}#c(){if(this.#n.length===0)return;let e=document.createElement("ol");this.#n.forEach((n,i)=>{let o=i+1,t=`fnref-${this.#t}-${o}`,s=`fn-${this.#t}-${o}`;this.#i(n,o,t,s);let r=this.#s(n,o,t,s);e.appendChild(r)}),this.appendChild(e)}#i(e,n,i,o){e.setAttribute("data-enhanced",""),e.id=i;let t=e.innerHTML,s=document.createElement("span");s.innerHTML=t;let r=document.createElement("a");r.href=`#${o}`,r.setAttribute("aria-describedby",o),r.textContent=`[${n}]`,e.innerHTML="",e.appendChild(s),e.appendChild(r)}#a(){if(this.#n.length===0)return;let e=[];if(this.#n.forEach((n,i)=>{let o=i+1,t=`fnref-${this.#t}-${o}`,s=`fn-${this.#t}-${o}`;n.getAttribute("data-side")==="false"?(this.#i(n,o,t,s),e.push({ref:n,num:o,refId:t,noteId:s})):this.#d(n,o,t,s)}),e.length>0){let n=document.createElement("ol");for(let{ref:i,num:o,refId:t,noteId:s}of e)n.appendChild(this.#s(i,o,t,s));this.appendChild(n)}else this.hidden=!0}#d(e,n,i,o){let t=e.innerHTML;e.setAttribute("data-enhanced",""),e.setAttribute("data-side",""),e.id=i;let s=document.createElement("a");s.href=`#${o}`,s.setAttribute("aria-describedby",o),s.textContent=`[${n}]`;let r=document.createElement("aside");r.className="sidenote",r.id=o,r.setAttribute("role","note"),r.innerHTML=`<span class="sidenote-number">${n}.</span> ${t}`,e.innerHTML="",e.appendChild(s),e.appendChild(r)}#s(e,n,i,o){let t=document.createElement("li");t.id=o;let s=e.querySelector("span"),r=s?s.innerHTML:"",a=document.createElement("a");return a.href=`#${i}`,a.setAttribute("data-backref",""),a.setAttribute("aria-label",this.#o),a.textContent="\u21A9",t.innerHTML=r+" ",t.appendChild(a),t}},h=class extends HTMLElement{};l("foot-notes",u);l("foot-note",h);export{h as FootNote,u as FootNotes};
1
+ var m=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function l(c,e,n={}){let i=n.priority??10,o={impl:e,bundle:n.bundle,contract:n.contract,priority:i},t=f.get(c);if(customElements.get(c)){if(!t||t.priority>=i){t&&t.priority===i&&t.impl!==e&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${t.bundle}" (priority ${t.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${c}> defined by "${t.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(t&&t.priority>=i){t.priority===i&&console.warn(`[VB Bundle] Tag <${c}> already registered by "${t.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}f.set(c,o),customElements.define(c,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,i,o){e.addEventListener(n,i,o),this.#e.push(()=>e.removeEventListener(n,i,o))}setup(){}teardown(){}};var u=class c extends d{static#e=0;#t;#n=[];#o="Back to content";setup(){this.#t=++c.#e,this.hasAttribute("data-back-label")&&(this.#o=this.getAttribute("data-back-label")??this.#o),this.#r(),this.getAttribute("data-mode")==="sidenotes"?this.#a():this.#c()}#r(){let e=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#n=e.filter(n=>this.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}#c(){if(this.#n.length===0)return;let e=document.createElement("ol");this.#n.forEach((n,i)=>{let o=i+1,t=`fnref-${this.#t}-${o}`,s=`fn-${this.#t}-${o}`;this.#i(n,o,t,s);let r=this.#s(n,o,t,s);e.appendChild(r)}),this.appendChild(e)}#i(e,n,i,o){e.setAttribute("data-enhanced",""),e.id=i;let t=e.innerHTML,s=document.createElement("span");s.innerHTML=t;let r=document.createElement("a");r.href=`#${o}`,r.setAttribute("aria-describedby",o),r.textContent=`[${n}]`,e.innerHTML="",e.appendChild(s),e.appendChild(r)}#a(){if(this.#n.length===0)return;let e=[];if(this.#n.forEach((n,i)=>{let o=i+1,t=`fnref-${this.#t}-${o}`,s=`fn-${this.#t}-${o}`;n.getAttribute("data-side")==="false"?(this.#i(n,o,t,s),e.push({ref:n,num:o,refId:t,noteId:s})):this.#d(n,o,t,s)}),e.length>0){let n=document.createElement("ol");for(let{ref:i,num:o,refId:t,noteId:s}of e)n.appendChild(this.#s(i,o,t,s));this.appendChild(n)}else this.hidden=!0}#d(e,n,i,o){let t=e.innerHTML;e.setAttribute("data-enhanced",""),e.setAttribute("data-side",""),e.id=i;let s=document.createElement("a");s.href=`#${o}`,s.setAttribute("aria-describedby",o),s.textContent=`[${n}]`;let r=document.createElement("aside");r.className="sidenote",r.id=o,r.setAttribute("role","note"),r.innerHTML=`<span class="sidenote-number">${n}.</span> ${t}`,e.innerHTML="",e.appendChild(s),e.appendChild(r)}#s(e,n,i,o){let t=document.createElement("li");t.id=o;let s=e.querySelector("span"),r=s?s.innerHTML:"",a=document.createElement("a");return a.href=`#${i}`,a.setAttribute("data-backref",""),a.setAttribute("aria-label",this.#o),a.textContent="\u21A9",t.innerHTML=r+" ",t.appendChild(a),t}},h=class extends HTMLElement{};l("foot-notes",u);l("foot-note",h);export{h as FootNote,u as FootNotes};
2
2
  //# sourceMappingURL=foot-notes.js.map
@@ -1,2 +1,2 @@
1
- var c=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function u(n,t,e={}){let r=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:r},i=l.get(n);if(customElements.get(n)){if(!i||i.priority>=r){i&&i.priority===r&&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>=r){i.priority===r&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${i.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}l.set(n,s),customElements.define(n,t)}var o=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,r,s){t.addEventListener(e,r,s),this.#t.push(()=>t.removeEventListener(e,r,s))}setup(){}teardown(){}};var d=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],a=class extends o{#t=null;#e=null;#i=!1;setup(){if(this.#t=this.querySelector("input, textarea, select"),this.#e=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),!this.#t)return!1;this.listen(this.#t,"blur",()=>this.validate()),this.listen(this.#t,"input",()=>{this.#i&&this.validate()})}teardown(){this.#t=null,this.#e=null,this.#i=!1}validate(){let t=this.#t;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#r(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#e&&(this.#e.textContent="")):(this.#i=!0,this.#r("invalid"),t.setAttribute("aria-invalid","true"),this.#n(t.validity)),e}setError(t){this.#t&&(this.#t.setCustomValidity(t),this.#i=!0,this.#r("invalid"),this.#t.setAttribute("aria-invalid","true"),this.#e&&(this.#e.textContent=t))}clearError(){this.#t&&(this.#t.setCustomValidity(""),this.#r(null),this.#t.removeAttribute("aria-invalid"),this.#i=!1,this.#e&&(this.#e.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#t?.getAttribute("aria-label")??this.#t?.name??this.#t?.id??"Field"}get input(){return this.#t}#r(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#n(t){if(!this.#e)return;let e=this.#t;for(let r of d){if(!t[r])continue;let s=`data-message-${r.toLowerCase()}`,i=e.getAttribute(s)??e.validationMessage;this.#e.textContent=i;return}}};u("form-field",a);export{a as FormField};
1
+ var c=window.matchMedia("(prefers-reduced-motion: reduce)");var l=new Map;function u(n,t,e={}){let r=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:r},i=l.get(n);if(customElements.get(n)){if(!i||i.priority>=r){i&&i.priority===r&&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>=r){i.priority===r&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${i.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}l.set(n,s),customElements.define(n,t)}var o=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,r,s){t.addEventListener(e,r,s),this.#t.push(()=>t.removeEventListener(e,r,s))}setup(){}teardown(){}};var d=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],a=class extends o{#t=null;#e=null;#i=!1;setup(){if(this.#t=this.querySelector("input, textarea, select"),this.#e=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),!this.#t)return!1;this.listen(this.#t,"blur",()=>this.validate()),this.listen(this.#t,"input",()=>{this.#i&&this.validate()})}teardown(){this.#t=null,this.#e=null,this.#i=!1}validate(){let t=this.#t;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#r(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#e&&(this.#e.textContent="")):(this.#i=!0,this.#r("invalid"),t.setAttribute("aria-invalid","true"),this.#n(t.validity)),e}setError(t){this.#t&&(this.#t.setCustomValidity(t),this.#i=!0,this.#r("invalid"),this.#t.setAttribute("aria-invalid","true"),this.#e&&(this.#e.textContent=t))}clearError(){this.#t&&(this.#t.setCustomValidity(""),this.#r(null),this.#t.removeAttribute("aria-invalid"),this.#i=!1,this.#e&&(this.#e.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#t?.getAttribute("aria-label")??this.#t?.name??this.#t?.id??"Field"}get input(){return this.#t}#r(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#n(t){if(!this.#e)return;let e=this.#t;for(let r of d){if(!t[r])continue;let s=`data-message-${r.toLowerCase()}`,i=e.getAttribute(s)??e.validationMessage;this.#e.textContent=i;return}}};u("form-field",a);export{a as FormField};
2
2
  //# sourceMappingURL=form-field.js.map
@@ -1,2 +1,2 @@
1
- var q=window.matchMedia("(prefers-reduced-motion: reduce)");var $=new Map;function k(d,t,i={}){let s=i.priority??10,r={impl:t,bundle:i.bundle,contract:i.contract,priority:s},e=$.get(d);if(customElements.get(d)){if(!e||e.priority>=s){e&&e.priority===s&&e.impl!==t&&console.warn(`[VB Bundle] Tag <${d}> already registered by "${e.bundle}" (priority ${e.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${d}> defined by "${e.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(e&&e.priority>=s){e.priority===s&&console.warn(`[VB Bundle] Tag <${d}> already registered by "${e.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}$.set(d,r),customElements.define(d,t)}var E=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,i,s,r){t.addEventListener(i,s,r),this.#t.push(()=>t.removeEventListener(i,s,r))}setup(){}teardown(){}};var w=864e5,v=w*7,C=w*30,T=w*91,x=w*365;function D(d){return typeof d=="number"?d:new Date(d).getTime()}function L(d){return d<=v*3?t=>t.toLocaleDateString(void 0,{month:"short",day:"numeric"}):d<=C*3?t=>t.toLocaleDateString(void 0,{month:"short",day:"numeric"}):d<=x?t=>t.toLocaleDateString(void 0,{month:"short",year:"2-digit"}):t=>t.toLocaleDateString(void 0,{year:"numeric"})}function I(d){return d<=v*3?"day":d<=C*3?"week":d<=x?"month":"quarter"}function N(d){return String(d).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var A=class extends E{static get observedAttributes(){return["src","title","view","show-today","show-progress","show-dependencies","compact"]}#t=null;#s=null;#r=null;#i=[];#e=0;#a=0;#n=0;setup(){let t=this.querySelector(":scope > table");if(!t||(this.#i=this.#d(t),this.#i.length===0))return!1;this.#e=Math.min(...this.#i.map(i=>i.start)),this.#a=Math.max(...this.#i.map(i=>i.end)),this.#n=this.#a-this.#e,this.#n<=0&&(this.#n=w),this.#l(t),this.dispatchEvent(new CustomEvent("gantt-chart:ready",{bubbles:!0,detail:{taskCount:this.#i.length,dateRange:{start:new Date(this.#e).toISOString(),end:new Date(this.#a).toISOString()}}}))}teardown(){this.#r&&(this.#r.remove(),this.#r=null),this.#t&&(this.#t.remove(),this.#t=null),this.#s&&(this.#s.remove(),this.#s=null);let t=this.querySelector("table.gc-sr-only");t&&t.classList.remove("gc-sr-only"),this.#i=[]}attributeChangedCallback(t,i,s){i===s||!this.isConnected||(t==="src"?this._loadSrc(s):this.hasAttribute("data-upgraded")&&(this.teardown(),this.removeAttribute("data-upgraded"),this.setup()))}#d(t){let i=t.querySelectorAll("tbody tr"),s=[];for(let r=0;r<i.length;r++){let e=i[r],o=e.querySelectorAll("time[datetime]");if(o.length<2&&!e.hasAttribute("data-milestone"))continue;let l=o[0]?.getAttribute("datetime"),n=o.length>1?o[1].getAttribute("datetime"):l;if(!l)continue;let a=e.querySelector("progress"),u=a?a.value/(a.max||100):0,g=e.cells[0]?.textContent?.trim()||`Task ${r+1}`;s.push({id:e.dataset.taskId||`gc-task-${r}`,name:g,start:D(l),end:D(n),progress:u,group:e.dataset.group||null,depends:e.dataset.depends?e.dataset.depends.split(",").map(c=>c.trim()):[],status:e.dataset.status||null,assignee:e.dataset.assignee||null,milestone:e.hasAttribute("data-milestone"),color:e.dataset.color||null,storyIds:e.dataset.storyIds?e.dataset.storyIds.split(",").map(c=>c.trim()):[],itemIds:e.dataset.itemIds?e.dataset.itemIds.split(",").map(c=>c.trim()):[]})}return s}#l(t){let i=this.getAttribute("title"),s=this.hasAttribute("show-today"),r=this.hasAttribute("show-progress"),e=this.hasAttribute("show-dependencies");i&&(this.#r=document.createElement("h2"),this.#r.className="gc-title",this.#r.textContent=i,this.insertBefore(this.#r,t)),this.#t=document.createElement("div"),this.#t.className="gc-container",this.#t.setAttribute("role","region"),this.#t.setAttribute("aria-label",`Gantt chart${i?": "+i:""}`);let o=this.#u();this.#t.appendChild(o);let l=document.createElement("div");l.className="gc-body";let n=document.createElement("div");n.className="gc-task-list";let a=document.createElement("div");a.className="gc-bars";let u=this.#h();a.appendChild(u);let g=this.#m();for(let[c,f]of g){if(g.size>1&&c){let m=document.createElement("div");m.className="gc-group-header";let h=document.createElement("span");h.className="gc-group-label",h.textContent=c,m.appendChild(h),n.appendChild(m);let p=document.createElement("div");p.className="gc-group-spacer",a.appendChild(p)}for(let m of f){let h=document.createElement("div");h.className="gc-task-row",h.setAttribute("data-task-id",m.id);let p=document.createElement("span");p.className="gc-task-name",p.textContent=m.name,h.appendChild(p);let y=document.createElement("span");y.className="gc-task-dates",y.textContent=`${new Date(m.start).toLocaleDateString()} to ${new Date(m.end).toLocaleDateString()}`,h.appendChild(y),n.appendChild(h);let b=document.createElement("div");b.className="gc-bar-row",m.milestone?b.appendChild(this.#f(m)):b.appendChild(this.#p(m,r)),a.appendChild(b)}}if(s){let c=this.#g();c&&a.appendChild(c)}e&&requestAnimationFrame(()=>{let c=this.#b(a);c&&a.appendChild(c)}),l.appendChild(n),l.appendChild(a),this.#t.appendChild(l),this.insertBefore(this.#t,t),t.classList.add("gc-sr-only"),this.#s=document.createElement("div"),this.#s.className="gc-sr-only",this.#s.setAttribute("role","status"),this.#s.setAttribute("aria-live","polite"),this.#s.setAttribute("aria-atomic","true"),this.appendChild(this.#s),this.listen(this.#t,"click",c=>{let f=c.target.closest(".gc-bar, .gc-milestone");if(!f)return;let m=f.dataset.taskId,h=this.#i.find(p=>p.id===m);h&&(this.#y(`Selected: ${h.name}`),this.dispatchEvent(new CustomEvent("gantt-chart:task-click",{bubbles:!0,detail:{task:h}})))}),this.listen(this.#t,"keydown",c=>{if(c.key==="Enter"||c.key===" "){let f=c.target.closest(".gc-bar, .gc-milestone");f&&(c.preventDefault(),f.click())}})}#u(){let t=document.createElement("div");t.className="gc-timeline-header";let i=document.createElement("div");i.className="gc-timeline-spacer",t.appendChild(i);let s=document.createElement("div");s.className="gc-timeline-dates";let r=this.#o();for(let{position:e,text:o}of r){let l=document.createElement("span");l.className="gc-date-label",l.style.left=`${e}%`,l.textContent=o,s.appendChild(l)}return t.appendChild(s),t}#o(){let t=this.getAttribute("view")||"auto",i=t==="auto"?I(this.#n):t,s=L(this.#n),r=[],e;switch(i){case"day":e=w;break;case"week":e=v;break;case"month":e=C;break;case"quarter":e=T;break;default:e=C}let o=new Date(this.#e);if(i==="week"){let a=o.getDay(),u=a===0?1:a===1?0:8-a;o.setDate(o.getDate()+u)}else if(i==="month")o.setDate(1),o.getTime()<this.#e&&o.setMonth(o.getMonth()+1);else if(i==="quarter"){let a=o.getMonth(),u=Math.ceil((a+1)/3)*3;o.setMonth(u),o.setDate(1)}let l=o.getTime();l>this.#e+e*.5&&r.push({position:0,text:s(new Date(this.#e))});let n=l;for(;n<=this.#a;){let a=(n-this.#e)/this.#n*100;if(a>=0&&a<=100&&r.push({position:a,text:s(new Date(n))}),i==="month"){let u=new Date(n);u.setMonth(u.getMonth()+1),n=u.getTime()}else if(i==="quarter"){let u=new Date(n);u.setMonth(u.getMonth()+3),n=u.getTime()}else n+=e}return r}#h(){let t=document.createElement("div");t.className="gc-grid-lines";let i=this.#o();for(let{position:s}of i){if(s<=0)continue;let r=document.createElement("div");r.className="gc-grid-line",r.style.left=`${s}%`,t.appendChild(r)}return t}#m(){let t=new Map;for(let i of this.#i){let s=i.group||"";t.has(s)||t.set(s,[]),t.get(s).push(i)}return t}#p(t,i){let s=(t.start-this.#e)/this.#n*100,r=(t.end-t.start)/this.#n*100,e=document.createElement("div");if(e.className="gc-bar",e.setAttribute("data-task-id",t.id),e.setAttribute("role","img"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`${N(t.name)}: ${new Date(t.start).toLocaleDateString()} to ${new Date(t.end).toLocaleDateString()}`+(t.progress>0?`, ${Math.round(t.progress*100)}% complete`:"")),e.style.left=`${s}%`,e.style.width=`${Math.max(r,.5)}%`,t.status&&e.setAttribute("data-status",t.status),t.color&&e.style.setProperty("--gc-bar-color",t.color),i&&t.progress>0){let o=document.createElement("div");o.className="gc-bar-fill",o.style.width=`${Math.round(t.progress*100)}%`,e.appendChild(o)}if(r>8){let o=document.createElement("span");o.className="gc-bar-label",o.textContent=t.name,e.appendChild(o)}return e}#f(t){let i=(t.start-this.#e)/this.#n*100,s=document.createElement("div");return s.className="gc-milestone",s.setAttribute("data-task-id",t.id),s.setAttribute("role","img"),s.setAttribute("tabindex","0"),s.setAttribute("aria-label",`Milestone: ${N(t.name)}, ${new Date(t.start).toLocaleDateString()}`),s.style.left=`${i}%`,t.status&&s.setAttribute("data-status",t.status),t.color&&s.style.setProperty("--gc-bar-color",t.color),s}#g(){let t=Date.now();if(t<this.#e||t>this.#a)return null;let i=(t-this.#e)/this.#n*100,s=document.createElement("div");s.className="gc-today-line",s.style.left=`${i}%`;let r=document.createElement("span");return r.className="gc-today-label",r.textContent="Today",s.appendChild(r),s}#b(t){if(!this.#i.some(n=>n.depends.length>0))return null;let s="http://www.w3.org/2000/svg",r=document.createElementNS(s,"svg");r.setAttribute("class","gc-deps"),r.style.width="100%",r.style.height="100%";let e=document.createElementNS(s,"defs"),o=document.createElementNS(s,"marker");o.setAttribute("id","gc-arrowhead"),o.setAttribute("markerWidth","8"),o.setAttribute("markerHeight","6"),o.setAttribute("refX","8"),o.setAttribute("refY","3"),o.setAttribute("orient","auto");let l=document.createElementNS(s,"polygon");l.setAttribute("points","0 0, 8 3, 0 6"),l.setAttribute("fill","var(--color-text-muted, #666666)"),o.appendChild(l),e.appendChild(o),r.appendChild(e);for(let n of this.#i)for(let a of n.depends){let u=this.#i.find(M=>M.id===a);if(!u)continue;let g=(u.end-this.#e)/this.#n*100,c=(n.start-this.#e)/this.#n*100,f=this.#c(u.id,t),m=this.#c(n.id,t);if(f===-1||m===-1)continue;let h=36,p=f*h+h/2,y=m*h+h/2,b=document.createElementNS(s,"path"),S=g+(c-g)/2;b.setAttribute("d",`M ${g}% ${p} C ${S}% ${p}, ${S}% ${y}, ${c}% ${y}`),b.setAttribute("class","gc-dep-line"),r.appendChild(b)}return r}#c(t,i){let s=i.querySelectorAll(".gc-bar-row");for(let r=0;r<s.length;r++){let e=s[r].querySelector("[data-task-id]");if(e&&e.dataset.taskId===t)return r}return-1}async _loadSrc(t){if(t)try{let i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=await i.json();for(;this.firstChild;)this.firstChild.remove();let r=document.createElement("table"),e=document.createElement("thead"),o=document.createElement("tr");for(let n of["Task","Start","End","Progress"]){let a=document.createElement("th");a.textContent=n,o.appendChild(a)}e.appendChild(o),r.appendChild(e);let l=document.createElement("tbody");for(let n of s.tasks||[]){let a=document.createElement("tr");n.id&&(a.dataset.taskId=n.id),n.group&&(a.dataset.group=n.group),n.depends&&(a.dataset.depends=Array.isArray(n.depends)?n.depends.join(","):n.depends),n.status&&(a.dataset.status=n.status),n.assignee&&(a.dataset.assignee=n.assignee),n.milestone&&a.setAttribute("data-milestone",""),n.color&&(a.dataset.color=n.color),n.storyIds&&(a.dataset.storyIds=Array.isArray(n.storyIds)?n.storyIds.join(","):n.storyIds),n.itemIds&&(a.dataset.itemIds=Array.isArray(n.itemIds)?n.itemIds.join(","):n.itemIds);let u=document.createElement("td");u.textContent=n.name||"",a.appendChild(u);let g=document.createElement("td"),c=document.createElement("time");c.setAttribute("datetime",n.start),c.textContent=new Date(n.start).toLocaleDateString(void 0,{month:"short",day:"numeric"}),g.appendChild(c),a.appendChild(g);let f=document.createElement("td"),m=document.createElement("time");m.setAttribute("datetime",n.end||n.start),m.textContent=new Date(n.end||n.start).toLocaleDateString(void 0,{month:"short",day:"numeric"}),f.appendChild(m),a.appendChild(f);let h=document.createElement("td"),p=document.createElement("progress");p.value=n.progress||0,p.max=100,p.textContent=`${n.progress||0}%`,h.appendChild(p),a.appendChild(h),l.appendChild(a)}r.appendChild(l),this.appendChild(r),s.title&&this.setAttribute("title",s.title),this.teardown(),this.removeAttribute("data-upgraded"),this.setup()}catch(i){console.warn(`[gantt-chart] Failed to load src="${t}":`,i)}}#y(t){this.#s&&(this.#s.textContent="",requestAnimationFrame(()=>{this.#s&&(this.#s.textContent=t)}))}};k("gantt-chart",A);export{A as GanttChart};
1
+ var q=window.matchMedia("(prefers-reduced-motion: reduce)");var $=new Map;function k(d,t,i={}){let s=i.priority??10,r={impl:t,bundle:i.bundle,contract:i.contract,priority:s},e=$.get(d);if(customElements.get(d)){if(!e||e.priority>=s){e&&e.priority===s&&e.impl!==t&&console.warn(`[VB Bundle] Tag <${d}> already registered by "${e.bundle}" (priority ${e.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${d}> defined by "${e.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(e&&e.priority>=s){e.priority===s&&console.warn(`[VB Bundle] Tag <${d}> already registered by "${e.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}$.set(d,r),customElements.define(d,t)}var E=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,i,s,r){t.addEventListener(i,s,r),this.#t.push(()=>t.removeEventListener(i,s,r))}setup(){}teardown(){}};var w=864e5,v=w*7,C=w*30,T=w*91,x=w*365;function N(d){return typeof d=="number"?d:new Date(d).getTime()}function L(d){return d<=v*3?t=>t.toLocaleDateString(void 0,{month:"short",day:"numeric"}):d<=C*3?t=>t.toLocaleDateString(void 0,{month:"short",day:"numeric"}):d<=x?t=>t.toLocaleDateString(void 0,{month:"short",year:"2-digit"}):t=>t.toLocaleDateString(void 0,{year:"numeric"})}function I(d){return d<=v*3?"day":d<=C*3?"week":d<=x?"month":"quarter"}function D(d){return String(d).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var A=class extends E{static get observedAttributes(){return["src","title","view","show-today","show-progress","show-dependencies","compact"]}#t=null;#s=null;#r=null;#i=[];#e=0;#a=0;#n=0;setup(){let t=this.querySelector(":scope > table");if(!t||(this.#i=this.#d(t),this.#i.length===0))return!1;this.#e=Math.min(...this.#i.map(i=>i.start)),this.#a=Math.max(...this.#i.map(i=>i.end)),this.#n=this.#a-this.#e,this.#n<=0&&(this.#n=w),this.#l(t),this.dispatchEvent(new CustomEvent("gantt-chart:ready",{bubbles:!0,detail:{taskCount:this.#i.length,dateRange:{start:new Date(this.#e).toISOString(),end:new Date(this.#a).toISOString()}}}))}teardown(){this.#r&&(this.#r.remove(),this.#r=null),this.#t&&(this.#t.remove(),this.#t=null),this.#s&&(this.#s.remove(),this.#s=null);let t=this.querySelector("table.gc-sr-only");t&&t.classList.remove("gc-sr-only"),this.#i=[]}attributeChangedCallback(t,i,s){i===s||!this.isConnected||(t==="src"?this._loadSrc(s):this.hasAttribute("data-upgraded")&&(this.teardown(),this.removeAttribute("data-upgraded"),this.setup()))}#d(t){let i=t.querySelectorAll("tbody tr"),s=[];for(let r=0;r<i.length;r++){let e=i[r],o=e.querySelectorAll("time[datetime]");if(o.length<2&&!e.hasAttribute("data-milestone"))continue;let l=o[0]?.getAttribute("datetime"),n=o.length>1?o[1].getAttribute("datetime"):l;if(!l)continue;let a=e.querySelector("progress"),u=a?a.value/(a.max||100):0,g=e.cells[0]?.textContent?.trim()||`Task ${r+1}`;s.push({id:e.dataset.taskId||`gc-task-${r}`,name:g,start:N(l),end:N(n),progress:u,group:e.dataset.group||null,depends:e.dataset.depends?e.dataset.depends.split(",").map(c=>c.trim()):[],status:e.dataset.status||null,assignee:e.dataset.assignee||null,milestone:e.hasAttribute("data-milestone"),color:e.dataset.color||null,storyIds:e.dataset.storyIds?e.dataset.storyIds.split(",").map(c=>c.trim()):[],itemIds:e.dataset.itemIds?e.dataset.itemIds.split(",").map(c=>c.trim()):[]})}return s}#l(t){let i=this.getAttribute("title"),s=this.hasAttribute("show-today"),r=this.hasAttribute("show-progress"),e=this.hasAttribute("show-dependencies");i&&(this.#r=document.createElement("h2"),this.#r.className="gc-title",this.#r.textContent=i,this.insertBefore(this.#r,t)),this.#t=document.createElement("div"),this.#t.className="gc-container",this.#t.setAttribute("role","region"),this.#t.setAttribute("aria-label",`Gantt chart${i?": "+i:""}`);let o=this.#u();this.#t.appendChild(o);let l=document.createElement("div");l.className="gc-body";let n=document.createElement("div");n.className="gc-task-list";let a=document.createElement("div");a.className="gc-bars";let u=this.#h();a.appendChild(u);let g=this.#m();for(let[c,f]of g){if(g.size>1&&c){let m=document.createElement("div");m.className="gc-group-header";let h=document.createElement("span");h.className="gc-group-label",h.textContent=c,m.appendChild(h),n.appendChild(m);let p=document.createElement("div");p.className="gc-group-spacer",a.appendChild(p)}for(let m of f){let h=document.createElement("div");h.className="gc-task-row",h.setAttribute("data-task-id",m.id);let p=document.createElement("span");p.className="gc-task-name",p.textContent=m.name,h.appendChild(p);let y=document.createElement("span");y.className="gc-task-dates",y.textContent=`${new Date(m.start).toLocaleDateString()} to ${new Date(m.end).toLocaleDateString()}`,h.appendChild(y),n.appendChild(h);let b=document.createElement("div");b.className="gc-bar-row",m.milestone?b.appendChild(this.#f(m)):b.appendChild(this.#p(m,r)),a.appendChild(b)}}if(s){let c=this.#g();c&&a.appendChild(c)}e&&requestAnimationFrame(()=>{let c=this.#b(a);c&&a.appendChild(c)}),l.appendChild(n),l.appendChild(a),this.#t.appendChild(l),this.insertBefore(this.#t,t),t.classList.add("gc-sr-only"),this.#s=document.createElement("div"),this.#s.className="gc-sr-only",this.#s.setAttribute("role","status"),this.#s.setAttribute("aria-live","polite"),this.#s.setAttribute("aria-atomic","true"),this.appendChild(this.#s),this.listen(this.#t,"click",c=>{let f=c.target.closest(".gc-bar, .gc-milestone");if(!f)return;let m=f.dataset.taskId,h=this.#i.find(p=>p.id===m);h&&(this.#y(`Selected: ${h.name}`),this.dispatchEvent(new CustomEvent("gantt-chart:task-click",{bubbles:!0,detail:{task:h}})))}),this.listen(this.#t,"keydown",c=>{if(c.key==="Enter"||c.key===" "){let f=c.target.closest(".gc-bar, .gc-milestone");f&&(c.preventDefault(),f.click())}})}#u(){let t=document.createElement("div");t.className="gc-timeline-header";let i=document.createElement("div");i.className="gc-timeline-spacer",t.appendChild(i);let s=document.createElement("div");s.className="gc-timeline-dates";let r=this.#o();for(let{position:e,text:o}of r){let l=document.createElement("span");l.className="gc-date-label",l.style.left=`${e}%`,l.textContent=o,s.appendChild(l)}return t.appendChild(s),t}#o(){let t=this.getAttribute("view")||"auto",i=t==="auto"?I(this.#n):t,s=L(this.#n),r=[],e;switch(i){case"day":e=w;break;case"week":e=v;break;case"month":e=C;break;case"quarter":e=T;break;default:e=C}let o=new Date(this.#e);if(i==="week"){let a=o.getDay(),u=a===0?1:a===1?0:8-a;o.setDate(o.getDate()+u)}else if(i==="month")o.setDate(1),o.getTime()<this.#e&&o.setMonth(o.getMonth()+1);else if(i==="quarter"){let a=o.getMonth(),u=Math.ceil((a+1)/3)*3;o.setMonth(u),o.setDate(1)}let l=o.getTime();l>this.#e+e*.5&&r.push({position:0,text:s(new Date(this.#e))});let n=l;for(;n<=this.#a;){let a=(n-this.#e)/this.#n*100;if(a>=0&&a<=100&&r.push({position:a,text:s(new Date(n))}),i==="month"){let u=new Date(n);u.setMonth(u.getMonth()+1),n=u.getTime()}else if(i==="quarter"){let u=new Date(n);u.setMonth(u.getMonth()+3),n=u.getTime()}else n+=e}return r}#h(){let t=document.createElement("div");t.className="gc-grid-lines";let i=this.#o();for(let{position:s}of i){if(s<=0)continue;let r=document.createElement("div");r.className="gc-grid-line",r.style.left=`${s}%`,t.appendChild(r)}return t}#m(){let t=new Map;for(let i of this.#i){let s=i.group||"";t.has(s)||t.set(s,[]),t.get(s).push(i)}return t}#p(t,i){let s=(t.start-this.#e)/this.#n*100,r=(t.end-t.start)/this.#n*100,e=document.createElement("div");if(e.className="gc-bar",e.setAttribute("data-task-id",t.id),e.setAttribute("role","img"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`${D(t.name)}: ${new Date(t.start).toLocaleDateString()} to ${new Date(t.end).toLocaleDateString()}`+(t.progress>0?`, ${Math.round(t.progress*100)}% complete`:"")),e.style.left=`${s}%`,e.style.width=`${Math.max(r,.5)}%`,t.status&&e.setAttribute("data-status",t.status),t.color&&e.style.setProperty("--gc-bar-color",t.color),i&&t.progress>0){let o=document.createElement("div");o.className="gc-bar-fill",o.style.width=`${Math.round(t.progress*100)}%`,e.appendChild(o)}if(r>8){let o=document.createElement("span");o.className="gc-bar-label",o.textContent=t.name,e.appendChild(o)}return e}#f(t){let i=(t.start-this.#e)/this.#n*100,s=document.createElement("div");return s.className="gc-milestone",s.setAttribute("data-task-id",t.id),s.setAttribute("role","img"),s.setAttribute("tabindex","0"),s.setAttribute("aria-label",`Milestone: ${D(t.name)}, ${new Date(t.start).toLocaleDateString()}`),s.style.left=`${i}%`,t.status&&s.setAttribute("data-status",t.status),t.color&&s.style.setProperty("--gc-bar-color",t.color),s}#g(){let t=Date.now();if(t<this.#e||t>this.#a)return null;let i=(t-this.#e)/this.#n*100,s=document.createElement("div");s.className="gc-today-line",s.style.left=`${i}%`;let r=document.createElement("span");return r.className="gc-today-label",r.textContent="Today",s.appendChild(r),s}#b(t){if(!this.#i.some(n=>n.depends.length>0))return null;let s="http://www.w3.org/2000/svg",r=document.createElementNS(s,"svg");r.setAttribute("class","gc-deps"),r.style.width="100%",r.style.height="100%";let e=document.createElementNS(s,"defs"),o=document.createElementNS(s,"marker");o.setAttribute("id","gc-arrowhead"),o.setAttribute("markerWidth","8"),o.setAttribute("markerHeight","6"),o.setAttribute("refX","8"),o.setAttribute("refY","3"),o.setAttribute("orient","auto");let l=document.createElementNS(s,"polygon");l.setAttribute("points","0 0, 8 3, 0 6"),l.setAttribute("fill","var(--color-text-muted, #666666)"),o.appendChild(l),e.appendChild(o),r.appendChild(e);for(let n of this.#i)for(let a of n.depends){let u=this.#i.find(M=>M.id===a);if(!u)continue;let g=(u.end-this.#e)/this.#n*100,c=(n.start-this.#e)/this.#n*100,f=this.#c(u.id,t),m=this.#c(n.id,t);if(f===-1||m===-1)continue;let h=36,p=f*h+h/2,y=m*h+h/2,b=document.createElementNS(s,"path"),S=g+(c-g)/2;b.setAttribute("d",`M ${g}% ${p} C ${S}% ${p}, ${S}% ${y}, ${c}% ${y}`),b.setAttribute("class","gc-dep-line"),r.appendChild(b)}return r}#c(t,i){let s=i.querySelectorAll(".gc-bar-row");for(let r=0;r<s.length;r++){let e=s[r].querySelector("[data-task-id]");if(e&&e.dataset.taskId===t)return r}return-1}async _loadSrc(t){if(t)try{let i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=await i.json();for(;this.firstChild;)this.firstChild.remove();let r=document.createElement("table"),e=document.createElement("thead"),o=document.createElement("tr");for(let n of["Task","Start","End","Progress"]){let a=document.createElement("th");a.textContent=n,o.appendChild(a)}e.appendChild(o),r.appendChild(e);let l=document.createElement("tbody");for(let n of s.tasks||[]){let a=document.createElement("tr");n.id&&(a.dataset.taskId=n.id),n.group&&(a.dataset.group=n.group),n.depends&&(a.dataset.depends=Array.isArray(n.depends)?n.depends.join(","):n.depends),n.status&&(a.dataset.status=n.status),n.assignee&&(a.dataset.assignee=n.assignee),n.milestone&&a.setAttribute("data-milestone",""),n.color&&(a.dataset.color=n.color),n.storyIds&&(a.dataset.storyIds=Array.isArray(n.storyIds)?n.storyIds.join(","):n.storyIds),n.itemIds&&(a.dataset.itemIds=Array.isArray(n.itemIds)?n.itemIds.join(","):n.itemIds);let u=document.createElement("td");u.textContent=n.name||"",a.appendChild(u);let g=document.createElement("td"),c=document.createElement("time");c.setAttribute("datetime",n.start),c.textContent=new Date(n.start).toLocaleDateString(void 0,{month:"short",day:"numeric"}),g.appendChild(c),a.appendChild(g);let f=document.createElement("td"),m=document.createElement("time");m.setAttribute("datetime",n.end||n.start),m.textContent=new Date(n.end||n.start).toLocaleDateString(void 0,{month:"short",day:"numeric"}),f.appendChild(m),a.appendChild(f);let h=document.createElement("td"),p=document.createElement("progress");p.value=n.progress||0,p.max=100,p.textContent=`${n.progress||0}%`,h.appendChild(p),a.appendChild(h),l.appendChild(a)}r.appendChild(l),this.appendChild(r),s.title&&this.setAttribute("title",s.title),this.teardown(),this.removeAttribute("data-upgraded"),this.setup()}catch(i){console.warn(`[gantt-chart] Failed to load src="${t}":`,i)}}#y(t){this.#s&&(this.#s.textContent="",requestAnimationFrame(()=>{this.#s&&(this.#s.textContent=t)}))}};k("gantt-chart",A);export{A as GanttChart};
2
2
  //# sourceMappingURL=gantt-chart.js.map
@@ -1,4 +1,4 @@
1
- var X=Object.defineProperty;var A=(l,t)=>()=>(l&&(t=l(l=0)),t);var Y=(l,t)=>{for(var e in t)X(l,e,{get:t[e],enumerable:!0})};function S(l,t,e){let i=Math.pow(2,e),r=l*Math.PI/180,o=(t+180)/360*i,n=(1-Math.log(Math.tan(r)+1/Math.cos(r))/Math.PI)/2*i,a=Math.floor(o),s=Math.floor(n),h=Math.round((o-a)*256),c=Math.round((n-s)*256);return{tileX:a,tileY:s,pixelX:h,pixelY:c}}function $(l,t,e){let i=256*Math.pow(2,e),r=l/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:r}}function v(l,t,e,i,r){if(r)return r.replace("{z}",String(t)).replace("{x}",String(e)).replace("{y}",String(i));switch(l){case"carto-light":return`https://basemaps.cartocdn.com/light_all/${t}/${e}/${i}.png`;case"carto-dark":return`https://basemaps.cartocdn.com/dark_all/${t}/${e}/${i}.png`;default:return`https://tile.openstreetmap.org/${t}/${e}/${i}.png`}}var k=A(()=>{});var P={};Y(P,{MapInteraction:()=>E});var E,F=A(()=>{k();E=class{#r;#n;#t;#f;#m;#g;#i=0;#o=0;#s=15;#u=1;#N=19;#l=0;#a=0;#c=new Map;#e=null;#v=0;#b=0;#y=!1;#w=0;#x=0;constructor({shadow:t,host:e,lat:i,lng:r,zoom:o,provider:n,tileUrl:a,onDeactivate:s}){this.#r=t,this.#n=e,this.#f=n,this.#m=a||"",this.#g=s,this.#s=o,this.#t=t.querySelector('[part="tiles"]'),this.#e=t.querySelector('[part="marker"]');let h=256*Math.pow(2,o),c=i*Math.PI/180;this.#i=(r+180)/360*h,this.#o=(1-Math.log(Math.tan(c)+1/Math.cos(c))/Math.PI)/2*h,this.#v=this.#i,this.#b=this.#o,this.#l=this.#n.offsetWidth||400,this.#a=this.#n.offsetHeight||300,this.#t.innerHTML="",this.#t.style.transform="",this.#e&&(this.#e.style.position="absolute",this.#e.style.top="",this.#e.style.left="",this.#t.appendChild(this.#e)),this.#T(),this.#h()}#T(){this.#t.addEventListener("pointerdown",this.#A),this.#t.addEventListener("wheel",this.#L,{passive:!1}),this.#n.addEventListener("keydown",this.#S)}#A=t=>{t.button===0&&(t.preventDefault(),this.#y=!0,this.#w=t.clientX,this.#x=t.clientY,this.#t.setPointerCapture(t.pointerId),this.#t.setAttribute("data-dragging",""),this.#t.addEventListener("pointermove",this.#M),this.#t.addEventListener("pointerup",this.#k))};#M=t=>{if(!this.#y)return;let e=t.clientX-this.#w,i=t.clientY-this.#x;this.#w=t.clientX,this.#x=t.clientY,this.#i-=e,this.#o-=i,this.#d(),this.#h()};#k=t=>{this.#y=!1,this.#t.releasePointerCapture(t.pointerId),this.#t.removeAttribute("data-dragging"),this.#t.removeEventListener("pointermove",this.#M),this.#t.removeEventListener("pointerup",this.#k),this.#p()};#L=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#u,Math.min(this.#N,this.#s+e)));if(i===this.#s)return;let r=this.#n.getBoundingClientRect(),o=t.clientX-r.left,n=t.clientY-r.top;this.#E(i,o,n)};#S=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.#i-=80,this.#d(),this.#h(),this.#p();break;case"ArrowRight":t.preventDefault(),this.#i+=80,this.#d(),this.#h(),this.#p();break;case"ArrowUp":t.preventDefault(),this.#o-=80,this.#d(),this.#h(),this.#p();break;case"ArrowDown":t.preventDefault(),this.#o+=80,this.#d(),this.#h(),this.#p();break;case"+":case"=":t.preventDefault(),this.#E(this.#s+1,this.#l/2,this.#a/2);break;case"-":t.preventDefault(),this.#E(this.#s-1,this.#l/2,this.#a/2);break;case"Escape":t.preventDefault(),this.#g();break}};#E(t,e,i){if(t=Math.max(this.#u,Math.min(this.#N,t)),t===this.#s)return;let r=this.#i-this.#l/2,o=this.#o-this.#a/2,n=r+e,a=o+i,s=Math.pow(2,t-this.#s);this.#i=n*s-e+this.#l/2,this.#o=a*s-i+this.#a/2,this.#v*=s,this.#b*=s,this.#s=t,this.#$(),this.#d(),this.#h(),this.#p()}#d(){let t=256*Math.pow(2,this.#s);this.#i=(this.#i%t+t)%t,this.#o=Math.max(this.#a/2,Math.min(t-this.#a/2,this.#o))}#h(){let t=-(this.#i-this.#l/2),e=-(this.#o-this.#a/2);this.#t.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#C(),this.#F(),this.#z()}#C(){let t=this.#s,e=Math.pow(2,t),i=this.#i-this.#l/2,r=this.#o-this.#a/2,o=i+this.#l,n=r+this.#a,a=Math.floor(i/256)-1,s=Math.max(0,Math.floor(r/256)-1),h=Math.ceil(o/256)+1,c=Math.min(e,Math.ceil(n/256)+1);for(let d=s;d<c;d++)for(let u=a;u<h;u++){let f=(u%e+e)%e,b=`${t}/${f}/${d}`;this.#c.has(b)||this.#P(t,u,d,f)}}#P(t,e,i,r){let o=`${t}/${r}/${i}`;if(this.#c.has(o))return;let n=e*256,a=i*256,s=document.createElement("img");s.src=v(this.#f,t,r,i,this.#m),s.alt="",s.draggable=!1,s.style.left=n+"px",s.style.top=a+"px",s.style.width="256px",s.style.height="256px",s._wx=n,s._wy=a,this.#c.set(o,s),this.#t.appendChild(s)}#F(){let t=this.#i-this.#l/2,e=this.#o-this.#a/2,i=512;for(let[r,o]of this.#c){let n=o._wx,a=o._wy;(n+256<t-i||n>t+this.#l+i||a+256<e-i||a>e+this.#a+i)&&(o.remove(),this.#c.delete(r))}}#z(){if(!this.#e)return;let t=this.#e.offsetWidth||32;this.#e.style.left=`${Math.round(this.#v-t/2)}px`,this.#e.style.top=`${Math.round(this.#b-t)}px`,this.#e.style.transform=""}#p(){let{lat:t,lng:e}=$(this.#i,this.#o,this.#s);this.#n.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#s}}))}#$(){for(let t of this.#c.values())t.remove();this.#c.clear()}destroy(){if(this.#t.removeEventListener("pointerdown",this.#A),this.#t.removeEventListener("wheel",this.#L),this.#n.removeEventListener("keydown",this.#S),this.#t.removeEventListener("pointermove",this.#M),this.#t.removeEventListener("pointerup",this.#k),this.#e&&this.#e.parentNode===this.#t){let t=this.#r.querySelector('[part="container"]');t&&(t.insertBefore(this.#e,this.#t.nextSibling),this.#e.style.position="",this.#e.style.left="",this.#e.style.top="",this.#e.style.transform="")}this.#$(),this.#n.removeAttribute("data-interactive-active")}}});var g=class extends HTMLElement{#r=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#r)t();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,r){t.addEventListener(e,i,r),this.#r.push(()=>t.removeEventListener(e,i,r))}setup(){}teardown(){}};var L=`
1
+ var X=Object.defineProperty;var A=(l,t)=>()=>(l&&(t=l(l=0)),t);var Y=(l,t)=>{for(var e in t)X(l,e,{get:t[e],enumerable:!0})};function S(l,t,e){let i=Math.pow(2,e),r=l*Math.PI/180,o=(t+180)/360*i,n=(1-Math.log(Math.tan(r)+1/Math.cos(r))/Math.PI)/2*i,a=Math.floor(o),s=Math.floor(n),h=Math.round((o-a)*256),c=Math.round((n-s)*256);return{tileX:a,tileY:s,pixelX:h,pixelY:c}}function $(l,t,e){let i=256*Math.pow(2,e),r=l/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:r}}function v(l,t,e,i,r){if(r)return r.replace("{z}",String(t)).replace("{x}",String(e)).replace("{y}",String(i));switch(l){case"carto-light":return`https://basemaps.cartocdn.com/light_all/${t}/${e}/${i}.png`;case"carto-dark":return`https://basemaps.cartocdn.com/dark_all/${t}/${e}/${i}.png`;default:return`https://tile.openstreetmap.org/${t}/${e}/${i}.png`}}var k=A(()=>{});var P={};Y(P,{MapInteraction:()=>E});var E,F=A(()=>{k();E=class{#r;#n;#t;#f;#m;#g;#i=0;#o=0;#s=15;#u=1;#N=19;#l=0;#a=0;#c=new Map;#e=null;#v=0;#b=0;#y=!1;#w=0;#x=0;constructor({shadow:t,host:e,lat:i,lng:r,zoom:o,provider:n,tileUrl:a,onDeactivate:s}){this.#r=t,this.#n=e,this.#f=n,this.#m=a||"",this.#g=s,this.#s=o,this.#t=t.querySelector('[part="tiles"]'),this.#e=t.querySelector('[part="marker"]');let h=256*Math.pow(2,o),c=i*Math.PI/180;this.#i=(r+180)/360*h,this.#o=(1-Math.log(Math.tan(c)+1/Math.cos(c))/Math.PI)/2*h,this.#v=this.#i,this.#b=this.#o,this.#l=this.#n.offsetWidth||400,this.#a=this.#n.offsetHeight||300,this.#t.innerHTML="",this.#t.style.transform="",this.#e&&(this.#e.style.position="absolute",this.#e.style.top="",this.#e.style.left="",this.#t.appendChild(this.#e)),this.#C(),this.#h()}#C(){this.#t.addEventListener("pointerdown",this.#A),this.#t.addEventListener("wheel",this.#L,{passive:!1}),this.#n.addEventListener("keydown",this.#S)}#A=t=>{t.button===0&&(t.preventDefault(),this.#y=!0,this.#w=t.clientX,this.#x=t.clientY,this.#t.setPointerCapture(t.pointerId),this.#t.setAttribute("data-dragging",""),this.#t.addEventListener("pointermove",this.#M),this.#t.addEventListener("pointerup",this.#k))};#M=t=>{if(!this.#y)return;let e=t.clientX-this.#w,i=t.clientY-this.#x;this.#w=t.clientX,this.#x=t.clientY,this.#i-=e,this.#o-=i,this.#d(),this.#h()};#k=t=>{this.#y=!1,this.#t.releasePointerCapture(t.pointerId),this.#t.removeAttribute("data-dragging"),this.#t.removeEventListener("pointermove",this.#M),this.#t.removeEventListener("pointerup",this.#k),this.#p()};#L=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#u,Math.min(this.#N,this.#s+e)));if(i===this.#s)return;let r=this.#n.getBoundingClientRect(),o=t.clientX-r.left,n=t.clientY-r.top;this.#E(i,o,n)};#S=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.#i-=80,this.#d(),this.#h(),this.#p();break;case"ArrowRight":t.preventDefault(),this.#i+=80,this.#d(),this.#h(),this.#p();break;case"ArrowUp":t.preventDefault(),this.#o-=80,this.#d(),this.#h(),this.#p();break;case"ArrowDown":t.preventDefault(),this.#o+=80,this.#d(),this.#h(),this.#p();break;case"+":case"=":t.preventDefault(),this.#E(this.#s+1,this.#l/2,this.#a/2);break;case"-":t.preventDefault(),this.#E(this.#s-1,this.#l/2,this.#a/2);break;case"Escape":t.preventDefault(),this.#g();break}};#E(t,e,i){if(t=Math.max(this.#u,Math.min(this.#N,t)),t===this.#s)return;let r=this.#i-this.#l/2,o=this.#o-this.#a/2,n=r+e,a=o+i,s=Math.pow(2,t-this.#s);this.#i=n*s-e+this.#l/2,this.#o=a*s-i+this.#a/2,this.#v*=s,this.#b*=s,this.#s=t,this.#$(),this.#d(),this.#h(),this.#p()}#d(){let t=256*Math.pow(2,this.#s);this.#i=(this.#i%t+t)%t,this.#o=Math.max(this.#a/2,Math.min(t-this.#a/2,this.#o))}#h(){let t=-(this.#i-this.#l/2),e=-(this.#o-this.#a/2);this.#t.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#T(),this.#F(),this.#z()}#T(){let t=this.#s,e=Math.pow(2,t),i=this.#i-this.#l/2,r=this.#o-this.#a/2,o=i+this.#l,n=r+this.#a,a=Math.floor(i/256)-1,s=Math.max(0,Math.floor(r/256)-1),h=Math.ceil(o/256)+1,c=Math.min(e,Math.ceil(n/256)+1);for(let d=s;d<c;d++)for(let u=a;u<h;u++){let f=(u%e+e)%e,b=`${t}/${f}/${d}`;this.#c.has(b)||this.#P(t,u,d,f)}}#P(t,e,i,r){let o=`${t}/${r}/${i}`;if(this.#c.has(o))return;let n=e*256,a=i*256,s=document.createElement("img");s.src=v(this.#f,t,r,i,this.#m),s.alt="",s.draggable=!1,s.style.left=n+"px",s.style.top=a+"px",s.style.width="256px",s.style.height="256px",s._wx=n,s._wy=a,this.#c.set(o,s),this.#t.appendChild(s)}#F(){let t=this.#i-this.#l/2,e=this.#o-this.#a/2,i=512;for(let[r,o]of this.#c){let n=o._wx,a=o._wy;(n+256<t-i||n>t+this.#l+i||a+256<e-i||a>e+this.#a+i)&&(o.remove(),this.#c.delete(r))}}#z(){if(!this.#e)return;let t=this.#e.offsetWidth||32;this.#e.style.left=`${Math.round(this.#v-t/2)}px`,this.#e.style.top=`${Math.round(this.#b-t)}px`,this.#e.style.transform=""}#p(){let{lat:t,lng:e}=$(this.#i,this.#o,this.#s);this.#n.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#s}}))}#$(){for(let t of this.#c.values())t.remove();this.#c.clear()}destroy(){if(this.#t.removeEventListener("pointerdown",this.#A),this.#t.removeEventListener("wheel",this.#L),this.#n.removeEventListener("keydown",this.#S),this.#t.removeEventListener("pointermove",this.#M),this.#t.removeEventListener("pointerup",this.#k),this.#e&&this.#e.parentNode===this.#t){let t=this.#r.querySelector('[part="container"]');t&&(t.insertBefore(this.#e,this.#t.nextSibling),this.#e.style.position="",this.#e.style.left="",this.#e.style.top="",this.#e.style.transform="")}this.#$(),this.#n.removeAttribute("data-interactive-active")}}});var g=class extends HTMLElement{#r=[];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.#r)t();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,r){t.addEventListener(e,i,r),this.#r.push(()=>t.removeEventListener(e,i,r))}setup(){}teardown(){}};var L=`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;
@@ -180,7 +180,7 @@ var X=Object.defineProperty;var A=(l,t)=>()=>(l&&(t=l(l=0)),t);var Y=(l,t)=>{for
180
180
  text-align: center;
181
181
  padding: 1rem;
182
182
  }
183
- `;k();var H=window.matchMedia("(prefers-reduced-motion: reduce)");var T=new Map;function C(l,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},o=T.get(l);if(customElements.get(l)){if(!o||o.priority>=i){o&&o.priority===i&&o.impl!==t&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${l}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=i){o.priority===i&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${o.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}T.set(l,r),customElements.define(l,t)}function _(l){return`<svg viewBox="0 0 24 36" fill="none" xmlns="http://www.w3.org/2000/svg">
183
+ `;k();var H=window.matchMedia("(prefers-reduced-motion: reduce)");var C=new Map;function T(l,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},o=C.get(l);if(customElements.get(l)){if(!o||o.priority>=i){o&&o.priority===i&&o.impl!==t&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${o.bundle}" (priority ${o.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${l}> defined by "${o.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(o&&o.priority>=i){o.priority===i&&console.warn(`[VB Bundle] Tag <${l}> already registered by "${o.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}C.set(l,r),customElements.define(l,t)}function _(l){return`<svg viewBox="0 0 24 36" fill="none" xmlns="http://www.w3.org/2000/svg">
184
184
  <path d="M12 0C5.373 0 0 5.373 0 12c0 9 12 24 12 24s12-15 12-24C24 5.373 18.627 0 12 0z" fill="${l}"/>
185
185
  <circle cx="12" cy="12" r="5" fill="white" opacity="0.9"/>
186
186
  </svg>`}var N=class extends g{static get observedAttributes(){return["lat","lng","zoom","marker","marker-color","provider","tile-url","interactive","static-only","src","place"]}#r=null;#n=!1;constructor(){super(),this.attachShadow({mode:"open"})}get lat(){return parseFloat(this.getAttribute("lat")??"")}get lng(){return parseFloat(this.getAttribute("lng")??"")}get zoom(){let t=parseInt(this.getAttribute("zoom")??"",10);return t>=1&&t<=19?t:15}get showMarker(){return this.getAttribute("marker")!=="false"}get markerColor(){return this.getAttribute("marker-color")||"#e74c3c"}get provider(){return this.getAttribute("provider")||"osm"}get tileUrl(){return this.getAttribute("tile-url")||""}get interactive(){let t=this.getAttribute("interactive");return t==="eager"||t==="none"?t:"click"}get staticOnly(){return this.hasAttribute("static-only")}#t(){let t=parseFloat(this.getAttribute("lat")??""),e=parseFloat(this.getAttribute("lng")??"");if(!isNaN(t)&&!isNaN(e))return{lat:t,lng:e};let i=this.getAttribute("src");if(i){let a=this.#f(i);if(a)return a}let r=this.querySelector("address[data-lat][data-lng]");if(r){let a=parseFloat(r.dataset.lat??""),s=parseFloat(r.dataset.lng??"");if(!isNaN(a)&&!isNaN(s))return{lat:a,lng:s}}let o=this.getAttribute("place");if(o){let a=this.#m(o);if(a)return a}let n=document.querySelector('meta[name="geo.position"]');if(n){let s=(n.getAttribute("content")||"").split(";");if(s.length===2){let h=parseFloat(s[0]),c=parseFloat(s[1]);if(!isNaN(h)&&!isNaN(c))return{lat:h,lng:c}}}return null}#f(t){let e=document.getElementById(t);if(!e)return null;if(e.tagName==="ADDRESS"&&e.dataset.lat&&e.dataset.lng){let i=parseFloat(e.dataset.lat),r=parseFloat(e.dataset.lng);if(!isNaN(i)&&!isNaN(r))return{lat:i,lng:r}}return e.tagName==="SCRIPT"&&e.type==="application/ld+json"?this.#g(e):null}#m(t){let e=document.querySelectorAll('script[type="application/ld+json"]');for(let i of e)try{let r=JSON.parse(i.textContent);if(r.name===t){let o=r.geo;if(o){let n=parseFloat(o.latitude),a=parseFloat(o.longitude);if(!isNaN(n)&&!isNaN(a))return{lat:n,lng:a}}}}catch{}return null}#g(t){try{let i=JSON.parse(t.textContent).geo;if(i){let r=parseFloat(i.latitude),o=parseFloat(i.longitude);if(!isNaN(r)&&!isNaN(o))return{lat:r,lng:o}}}catch{}return null}setup(){this.render(),this.loadTiles(),this.#i()}attributeChangedCallback(t,e,i){e!==i&&this.isConnected&&(this.#r&&this.#u(),this.render(),this.loadTiles(),this.#i())}teardown(){this.#r&&(this.#r.destroy(),this.#r=null)}render(){let t=this.#t(),e=t?.lat??NaN,i=t?.lng??NaN,r=!isNaN(e)&&!isNaN(i);this.children.length>0?this.setAttribute("data-has-caption",""):this.removeAttribute("data-has-caption");let n=r?`Map of ${e.toFixed(4)}, ${i.toFixed(4)}`:"Map",a=this.showMarker&&r?`<div part="marker" aria-hidden="true">${_(this.markerColor)}</div>`:"",h=r&&this.interactive!=="none"&&!this.staticOnly?'<div part="overlay"><button part="activate" aria-label="Activate interactive map" tabindex="0">Click to interact</button></div>':"";this.shadowRoot.innerHTML=`
@@ -194,5 +194,5 @@ var X=Object.defineProperty;var A=(l,t)=>()=>(l&&(t=l(l=0)),t);var Y=(l,t)=>{for
194
194
  <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">&copy; OpenStreetMap</a>
195
195
  </div>
196
196
  </div>
197
- `}loadTiles(){let t=this.#t(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let r=this.zoom,o=this.provider,{tileX:n,tileY:a,pixelX:s,pixelY:h}=S(e,i,r),c=this.shadowRoot.querySelector('[part="tiles"]');if(!c)return;c.innerHTML="";let d=this,u=d.offsetWidth||400,f=d.offsetHeight||300,b=Math.round(u/2-256-s),z=Math.round(f/2-256-h);c.style.transform=`translate(${b}px, ${z}px)`;let y=0,m=0,w=9;for(let x=-1;x<=1;x++)for(let M=-1;M<=1;M++){let D=n+M,q=a+x,R=v(o,r,D,q,this.tileUrl),p=document.createElement("img");p.src=R,p.alt="",p.loading="lazy",p.draggable=!1,p.addEventListener("load",()=>{y++,y+m===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:r}}))}),p.addEventListener("error",()=>{m++,m===w?this.handleError("Failed to load map tiles"):y+m===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:r}}))}),c.appendChild(p)}}#i(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#s()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#s())}#o(){if(this.#n)return;let t=this.tileUrl;if(t)try{let o=new URL(t,location.origin);if(o.origin===location.origin){this.#n=!0;return}this.#n=!0;let n=document.createElement("link");n.rel="preconnect",n.href=o.origin,n.crossOrigin="",document.head.appendChild(n);return}catch{}this.#n=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let r=document.createElement("link");r.rel="preconnect",r.href=i,r.crossOrigin="",document.head.appendChild(r)}async#s(){if(this.#r)return;let t=this.#t(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:r}=await Promise.resolve().then(()=>(F(),P));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#r=new r({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#u()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#u(){this.#r&&(this.#r.destroy(),this.#r=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#i())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};C("geo-map",N);export{N as GeoMap};
197
+ `}loadTiles(){let t=this.#t(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let r=this.zoom,o=this.provider,{tileX:n,tileY:a,pixelX:s,pixelY:h}=S(e,i,r),c=this.shadowRoot.querySelector('[part="tiles"]');if(!c)return;c.innerHTML="";let d=this,u=d.offsetWidth||400,f=d.offsetHeight||300,b=Math.round(u/2-256-s),z=Math.round(f/2-256-h);c.style.transform=`translate(${b}px, ${z}px)`;let y=0,m=0,w=9;for(let x=-1;x<=1;x++)for(let M=-1;M<=1;M++){let D=n+M,q=a+x,R=v(o,r,D,q,this.tileUrl),p=document.createElement("img");p.src=R,p.alt="",p.loading="lazy",p.draggable=!1,p.addEventListener("load",()=>{y++,y+m===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:r}}))}),p.addEventListener("error",()=>{m++,m===w?this.handleError("Failed to load map tiles"):y+m===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:r}}))}),c.appendChild(p)}}#i(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#s()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#s())}#o(){if(this.#n)return;let t=this.tileUrl;if(t)try{let o=new URL(t,location.origin);if(o.origin===location.origin){this.#n=!0;return}this.#n=!0;let n=document.createElement("link");n.rel="preconnect",n.href=o.origin,n.crossOrigin="",document.head.appendChild(n);return}catch{}this.#n=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let r=document.createElement("link");r.rel="preconnect",r.href=i,r.crossOrigin="",document.head.appendChild(r)}async#s(){if(this.#r)return;let t=this.#t(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:r}=await Promise.resolve().then(()=>(F(),P));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#r=new r({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#u()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#u(){this.#r&&(this.#r.destroy(),this.#r=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#i())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};T("geo-map",N);export{N as GeoMap};
198
198
  //# sourceMappingURL=geo-map.js.map