@vanelsas/baredom 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +23 -337
  3. package/custom-elements.json +36 -1
  4. package/dist/base.js +358 -352
  5. package/dist/integrity.json +93 -93
  6. package/dist/x-alert.js +18 -19
  7. package/dist/x-avatar-group.js +10 -11
  8. package/dist/x-avatar.js +14 -14
  9. package/dist/x-badge.js +10 -11
  10. package/dist/x-bento-grid.js +5 -5
  11. package/dist/x-bento-item.js +4 -4
  12. package/dist/x-breadcrumbs.js +14 -14
  13. package/dist/x-button.js +18 -16
  14. package/dist/x-cancel-dialogue.js +17 -17
  15. package/dist/x-card.js +7 -7
  16. package/dist/x-carousel.js +34 -34
  17. package/dist/x-chart.js +46 -48
  18. package/dist/x-checkbox.js +10 -11
  19. package/dist/x-chip.js +9 -9
  20. package/dist/x-collapse.js +10 -12
  21. package/dist/x-color-picker.js +44 -45
  22. package/dist/x-combobox.d.ts +1 -0
  23. package/dist/x-combobox.js +26 -27
  24. package/dist/x-command-palette.js +26 -27
  25. package/dist/x-container.js +5 -6
  26. package/dist/x-context-menu.js +18 -18
  27. package/dist/x-copy.js +22 -22
  28. package/dist/x-currency-field.d.ts +1 -0
  29. package/dist/x-currency-field.js +22 -23
  30. package/dist/x-date-picker.js +41 -42
  31. package/dist/x-divider.js +8 -9
  32. package/dist/x-drawer.js +11 -12
  33. package/dist/x-dropdown.js +10 -11
  34. package/dist/x-fieldset.js +6 -6
  35. package/dist/x-file-download.js +7 -8
  36. package/dist/x-file-upload.js +22 -25
  37. package/dist/x-form-field.js +15 -17
  38. package/dist/x-form.js +8 -10
  39. package/dist/x-gaussian-blur.js +18 -18
  40. package/dist/x-grid.js +6 -6
  41. package/dist/x-icon.js +7 -7
  42. package/dist/x-image.js +19 -19
  43. package/dist/x-kinetic-font.js +28 -29
  44. package/dist/x-kinetic-typography.js +39 -39
  45. package/dist/x-liquid-dock.js +39 -39
  46. package/dist/x-liquid-fill.js +44 -44
  47. package/dist/x-liquid-glass.js +47 -47
  48. package/dist/x-menu-item.js +9 -10
  49. package/dist/x-menu.js +11 -11
  50. package/dist/x-metaball-cursor.js +27 -27
  51. package/dist/x-modal.js +12 -13
  52. package/dist/x-morph-stack.js +38 -39
  53. package/dist/x-navbar.js +12 -13
  54. package/dist/x-neural-glow.js +32 -33
  55. package/dist/x-notification-center.js +9 -10
  56. package/dist/x-organic-divider.js +18 -19
  57. package/dist/x-organic-progress.js +37 -38
  58. package/dist/x-organic-shape.js +13 -14
  59. package/dist/x-pagination.d.ts +2 -1
  60. package/dist/x-pagination.js +16 -16
  61. package/dist/x-particle-button.js +48 -49
  62. package/dist/x-popover.js +24 -25
  63. package/dist/x-progress-circle.js +8 -9
  64. package/dist/x-progress.js +11 -11
  65. package/dist/x-radio.js +10 -12
  66. package/dist/x-ripple-effect.js +11 -11
  67. package/dist/x-scroll-parallax.js +19 -19
  68. package/dist/x-scroll-stack.js +18 -18
  69. package/dist/x-scroll-story.js +36 -36
  70. package/dist/x-scroll-timeline.js +46 -47
  71. package/dist/x-scroll.js +40 -41
  72. package/dist/x-search-field.js +15 -17
  73. package/dist/x-select.d.ts +1 -0
  74. package/dist/x-select.js +10 -11
  75. package/dist/x-sidebar.js +16 -16
  76. package/dist/x-skeleton-group.js +12 -14
  77. package/dist/x-skeleton.js +1 -1
  78. package/dist/x-slider.d.ts +1 -0
  79. package/dist/x-slider.js +16 -16
  80. package/dist/x-soft-body.js +21 -21
  81. package/dist/x-spacer.js +5 -5
  82. package/dist/x-spinner.js +5 -6
  83. package/dist/x-splash.js +13 -13
  84. package/dist/x-stat.js +11 -11
  85. package/dist/x-stepper.js +15 -15
  86. package/dist/x-switch.js +9 -11
  87. package/dist/x-tab.js +7 -7
  88. package/dist/x-table-cell.js +22 -22
  89. package/dist/x-table-row.js +9 -10
  90. package/dist/x-table.js +14 -15
  91. package/dist/x-tabs.d.ts +1 -0
  92. package/dist/x-tabs.js +11 -11
  93. package/dist/x-text-area.d.ts +1 -0
  94. package/dist/x-text-area.js +19 -19
  95. package/dist/x-theme.d.ts +1 -1
  96. package/dist/x-theme.js +25 -25
  97. package/dist/x-timeline-item.js +23 -23
  98. package/dist/x-timeline.js +9 -9
  99. package/dist/x-toast.js +24 -24
  100. package/dist/x-toaster.js +8 -8
  101. package/dist/x-tooltip.js +11 -13
  102. package/dist/x-typography.js +11 -11
  103. package/dist/x-welcome-tour.js +64 -65
  104. package/package.json +186 -182
package/dist/x-divider.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var lV=function(a,b,c){c=typeof c==="string"?c.trim().toLowerCase():null;return $APP.I(a,c)?c:b},mV=function(a){for(;;){var b=a.firstChild;if($APP.n(b))a.removeChild(b);else break}},xV=function(a){var b=$APP.zf([$APP.tl,$APP.pi,$APP.Xi,nV,oV,$APP.fn,pV,$APP.Xl,$APP.Uj,qV],[a.getAttribute("variant"),a.getAttribute("label"),a.getAttribute("align"),a.getAttribute("length"),a.getAttribute("thickness"),a.getAttribute("color"),a.getAttribute("inset"),a.getAttribute("orientation"),a.getAttribute("aria-label"),
3
- a.getAttribute("role")]),c=$APP.M(b);b=$APP.D(c,$APP.Uj);var d=$APP.D(c,qV),e=$APP.D(c,$APP.pi);var g=$APP.D(c,$APP.tl);var h=$APP.D(c,$APP.Xi),l=$APP.D(c,nV),m=$APP.D(c,oV),p=$APP.D(c,$APP.fn),q=$APP.D(c,pV);c=$APP.D(c,$APP.Xl);g=$APP.zf([$APP.di,$APP.vj,rV,sV,$APP.Oj,$APP.Vg,$APP.ql,$APP.U,tV,$APP.Pl],[d,lV(uV,"center",h),m,q,p,lV(vV,"solid",g),lV(wV,"horizontal",c),e,l,b]);c=$APP.M(g);d=$APP.D(c,$APP.Pl);h=$APP.D(c,$APP.vj);l=$APP.D(c,rV);m=$APP.D(c,sV);p=$APP.D(c,$APP.Oj);q=$APP.D(c,$APP.Vg);
4
- e=$APP.D(c,$APP.ql);b=$APP.D(c,$APP.U);var v=$APP.D(c,tV);c=typeof b==="string"&&b.trim().length>0;var x=a.style;a.setAttribute("data-orientation",e);a.setAttribute("data-variant",q);a.setAttribute("data-align",h);x.setProperty("--x-divider-thickness",$APP.n(l)?l:"1px");x.setProperty("--x-divider-inset",$APP.n(m)?m:"0px");x.setProperty("--x-divider-length",$APP.n(v)?v:"auto");$APP.n(p)?x.setProperty("--x-divider-color",p):x.removeProperty("--x-divider-color");g=$APP.di.g(g);$APP.I(new $APP.S(null,
5
- new $APP.R(null,2,["none",null,"presentation",null],null),null),g)?a.setAttribute("role","presentation"):a.setAttribute("role","separator");$APP.B.i(e,"vertical")?a.setAttribute("aria-orientation","vertical"):a.removeAttribute("aria-orientation");$APP.n($APP.n(d)?d.length>0:d)?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");c?(d=$APP.k(a,"__xDividerRefs"),$APP.B.i($APP.k(d,"mode"),"no-label")&&(e=$APP.k(d,"container"),mV(e),g=document.createElement("div"),h=document.createElement("span"),
2
+ var bX=function(a,b,c){c=typeof c==="string"?c.trim().toLowerCase():null;return $APP.I(a,c)?c:b},cX=function(a){for(;;){var b=a.firstChild;if($APP.n(b))a.removeChild(b);else break}},nX=function(a){var b=$APP.zf([$APP.Ml,$APP.Hi,$APP.oj,dX,eX,$APP.zn,fX,$APP.pm,$APP.pk,gX],[a.getAttribute("variant"),a.getAttribute("label"),a.getAttribute("align"),a.getAttribute("length"),a.getAttribute("thickness"),a.getAttribute("color"),a.getAttribute("inset"),a.getAttribute("orientation"),a.getAttribute("aria-label"),
3
+ a.getAttribute("role")]),c=$APP.M(b);b=$APP.D(c,$APP.pk);var d=$APP.D(c,gX),e=$APP.D(c,$APP.Hi);var g=$APP.D(c,$APP.Ml);var h=$APP.D(c,$APP.oj),l=$APP.D(c,dX),m=$APP.D(c,eX),p=$APP.D(c,$APP.zn),r=$APP.D(c,fX);c=$APP.D(c,$APP.pm);g=$APP.zf([$APP.zi,$APP.Nj,hX,iX,$APP.jk,$APP.lh,$APP.Jl,$APP.T,jX,$APP.hm],[d,bX(kX,"center",h),m,r,p,bX(lX,"solid",g),bX(mX,"horizontal",c),e,l,b]);c=$APP.M(g);d=$APP.D(c,$APP.hm);h=$APP.D(c,$APP.Nj);l=$APP.D(c,hX);m=$APP.D(c,iX);p=$APP.D(c,$APP.jk);r=$APP.D(c,$APP.lh);
4
+ e=$APP.D(c,$APP.Jl);b=$APP.D(c,$APP.T);var v=$APP.D(c,jX);c=typeof b==="string"&&b.trim().length>0;var x=a.style;a.setAttribute("data-orientation",e);a.setAttribute("data-variant",r);a.setAttribute("data-align",h);x.setProperty("--x-divider-thickness",$APP.n(l)?l:"1px");x.setProperty("--x-divider-inset",$APP.n(m)?m:"0px");x.setProperty("--x-divider-length",$APP.n(v)?v:"auto");$APP.n(p)?x.setProperty("--x-divider-color",p):x.removeProperty("--x-divider-color");g=$APP.zi.g(g);$APP.I(new $APP.R(null,
5
+ new $APP.Q(null,2,["none",null,"presentation",null],null),null),g)?a.setAttribute("role","presentation"):a.setAttribute("role","separator");$APP.B.i(e,"vertical")?a.setAttribute("aria-orientation","vertical"):a.removeAttribute("aria-orientation");$APP.n($APP.n(d)?d.length>0:d)?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");c?(d=$APP.k(a,"__xDividerRefs"),$APP.B.i($APP.k(d,"mode"),"no-label")&&(e=$APP.k(d,"container"),cX(e),g=document.createElement("div"),h=document.createElement("span"),
6
6
  l=document.createElement("slot"),m=document.createElement("span"),p=document.createElement("div"),g.setAttribute("part","line-left"),h.setAttribute("part","label"),l.setAttribute("name","label"),m.setAttribute("part","label-text"),p.setAttribute("part","line-right"),h.appendChild(l),h.appendChild(m),e.appendChild(g),e.appendChild(h),e.appendChild(p),d["line-left"]=g,d["label-wrap"]=h,d["label-text"]=m,d["line-right"]=p,d.mode="label"),a=$APP.k($APP.k(a,"__xDividerRefs"),"label-text"),$APP.n(a)&&(a.textContent=
7
- b)):(a=$APP.k(a,"__xDividerRefs"),$APP.B.i($APP.k(a,"mode"),"label")&&(b=$APP.k(a,"container"),mV(b),d=document.createElement("div"),d.setAttribute("part","line"),b.appendChild(d),a["line-left"]=null,a["label-wrap"]=null,a["label-text"]=null,a["line-right"]=null,a.mode="no-label"));return null},yV=function(a,b){Object.defineProperty(a,b,{get:function(){return this.getAttribute(b)},set:function(c){return c!=null?this.setAttribute(b,""+$APP.T.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},
8
- zV=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.T.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},AV=function(a){zV(a,"orientation","horizontal");zV(a,"variant","solid");zV(a,"align","center");yV(a,"label");yV(a,"thickness");yV(a,"color");yV(a,"inset");yV(a,"length")},CV=function(){var a=class extends HTMLElement{};a.observedAttributes=BV;a.prototype.connectedCallback=
9
- function(){if(!$APP.n($APP.k(this,"__xDividerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-divider-color:rgba(0,0,0,0.12);--x-divider-thickness:1px;--x-divider-inset:0px;--x-divider-length:auto;}@media (prefers-color-scheme:dark){:host{--x-divider-color:rgba(255,255,255,0.15);}}[part\x3dcontainer]{display:flex;align-items:center;width:var(--x-divider-length,auto);box-sizing:border-box;}:host([data-orientation\x3d'vertical']) [part\x3dcontainer]{flex-direction:column;height:var(--x-divider-length,auto);width:auto;}[part\x3dline],[part\x3dline-left],[part\x3dline-right]{flex:1;border:none;background:var(--x-divider-color,rgba(0,0,0,0.12));height:var(--x-divider-thickness,1px);margin:var(--x-divider-inset,0px) 0;}:host([data-orientation\x3d'vertical']) [part\x3dline],:host([data-orientation\x3d'vertical']) [part\x3dline-left],:host([data-orientation\x3d'vertical']) [part\x3dline-right]{width:var(--x-divider-thickness,1px);height:auto;margin:0 var(--x-divider-inset,0px);}:host([data-variant\x3d'dashed']) [part\x3dline],:host([data-variant\x3d'dashed']) [part\x3dline-left],:host([data-variant\x3d'dashed']) [part\x3dline-right]{background:none;height:0;border-top:var(--x-divider-thickness,1px) dashed var(--x-divider-color,rgba(0,0,0,0.12));}:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline],:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline-left],:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline-right]{border-top:none;border-left:var(--x-divider-thickness,1px) dashed var(--x-divider-color,rgba(0,0,0,0.12));width:0;height:auto;}:host([data-variant\x3d'dotted']) [part\x3dline],:host([data-variant\x3d'dotted']) [part\x3dline-left],:host([data-variant\x3d'dotted']) [part\x3dline-right]{background:none;height:0;border-top:var(--x-divider-thickness,1px) dotted var(--x-divider-color,rgba(0,0,0,0.12));}:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline],:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline-left],:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline-right]{border-top:none;border-left:var(--x-divider-thickness,1px) dotted var(--x-divider-color,rgba(0,0,0,0.12));width:0;height:auto;}[part\x3dlabel]{display:flex;align-items:center;flex-shrink:0;padding:0 0.75em;font-size:0.75rem;font-weight:500;color:var(--x-divider-color);white-space:nowrap;}:host([data-orientation\x3d'vertical']) [part\x3dlabel]{padding:0.75em 0;writing-mode:horizontal-tb;}[part\x3dlabel-text]{display:inline;}:host([data-align\x3d'start']) [part\x3dline-left]{flex:0 0 1rem;}:host([data-align\x3d'end']) [part\x3dline-right]{flex:0 0 1rem;}@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important;}}";
10
- d.setAttribute("part","container");var e=document.createElement("div");e.setAttribute("part","line");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xDividerRefs={root:b,container:d,mode:"no-label"}}return xV(this)};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){return $APP.N(c,d)?$APP.n($APP.k(this,"__xDividerRefs"))?xV(this):null:null};AV(a.prototype);return a},DV=function(){$APP.n(customElements.get("x-divider"))||customElements.define("x-divider",
11
- CV());return null},pV=new $APP.K(null,"inset-raw","inset-raw",89351124),sV=new $APP.K(null,"inset","inset",-396367740),qV=new $APP.K(null,"role-raw","role-raw",777951354),tV=new $APP.K(null,"length","length",588987862),nV=new $APP.K(null,"length-raw","length-raw",-1832244116),rV=new $APP.K(null,"thickness","thickness",-940175454),oV=new $APP.K(null,"thickness-raw","thickness-raw",1843812655);var BV="orientation variant thickness color inset length label align role aria-label".split(" "),wV=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),vV=new $APP.S(null,new $APP.R(null,3,["dashed",null,"dotted",null,"solid",null],null),null),uV=new $APP.S(null,new $APP.R(null,3,["center",null,"start",null,"end",null],null),null);$APP.ha("baredom.exports.x_divider.init",DV);export const init=DV;
7
+ b)):(a=$APP.k(a,"__xDividerRefs"),$APP.B.i($APP.k(a,"mode"),"label")&&(b=$APP.k(a,"container"),cX(b),d=document.createElement("div"),d.setAttribute("part","line"),b.appendChild(d),a["line-left"]=null,a["label-wrap"]=null,a["label-text"]=null,a["line-right"]=null,a.mode="no-label"));return null},oX=function(a){if(!$APP.n($APP.k(a,"__xDividerRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-divider-color:rgba(0,0,0,0.12);--x-divider-thickness:1px;--x-divider-inset:0px;--x-divider-length:auto;}@media (prefers-color-scheme:dark){:host{--x-divider-color:rgba(255,255,255,0.15);}}[part\x3dcontainer]{display:flex;align-items:center;width:var(--x-divider-length,auto);box-sizing:border-box;}:host([data-orientation\x3d'vertical']) [part\x3dcontainer]{flex-direction:column;height:var(--x-divider-length,auto);width:auto;}[part\x3dline],[part\x3dline-left],[part\x3dline-right]{flex:1;border:none;background:var(--x-divider-color,rgba(0,0,0,0.12));height:var(--x-divider-thickness,1px);margin:var(--x-divider-inset,0px) 0;}:host([data-orientation\x3d'vertical']) [part\x3dline],:host([data-orientation\x3d'vertical']) [part\x3dline-left],:host([data-orientation\x3d'vertical']) [part\x3dline-right]{width:var(--x-divider-thickness,1px);height:auto;margin:0 var(--x-divider-inset,0px);}:host([data-variant\x3d'dashed']) [part\x3dline],:host([data-variant\x3d'dashed']) [part\x3dline-left],:host([data-variant\x3d'dashed']) [part\x3dline-right]{background:none;height:0;border-top:var(--x-divider-thickness,1px) dashed var(--x-divider-color,rgba(0,0,0,0.12));}:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline],:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline-left],:host([data-orientation\x3d'vertical'][data-variant\x3d'dashed']) [part\x3dline-right]{border-top:none;border-left:var(--x-divider-thickness,1px) dashed var(--x-divider-color,rgba(0,0,0,0.12));width:0;height:auto;}:host([data-variant\x3d'dotted']) [part\x3dline],:host([data-variant\x3d'dotted']) [part\x3dline-left],:host([data-variant\x3d'dotted']) [part\x3dline-right]{background:none;height:0;border-top:var(--x-divider-thickness,1px) dotted var(--x-divider-color,rgba(0,0,0,0.12));}:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline],:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline-left],:host([data-orientation\x3d'vertical'][data-variant\x3d'dotted']) [part\x3dline-right]{border-top:none;border-left:var(--x-divider-thickness,1px) dotted var(--x-divider-color,rgba(0,0,0,0.12));width:0;height:auto;}[part\x3dlabel]{display:flex;align-items:center;flex-shrink:0;padding:0 0.75em;font-size:0.75rem;font-weight:500;color:var(--x-divider-color);white-space:nowrap;}:host([data-orientation\x3d'vertical']) [part\x3dlabel]{padding:0.75em 0;writing-mode:horizontal-tb;}[part\x3dlabel-text]{display:inline;}:host([data-align\x3d'start']) [part\x3dline-left]{flex:0 0 1rem;}:host([data-align\x3d'end']) [part\x3dline-right]{flex:0 0 1rem;}@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important;}}";
8
+ d.setAttribute("part","container");var e=document.createElement("div");e.setAttribute("part","line");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xDividerRefs={root:b,container:d,mode:"no-label"}}return nX(a)},pX=function(){return null},qX=function(a,b,c,d){return $APP.N(c,d)?$APP.n($APP.k(a,"__xDividerRefs"))?nX(a):null:null},rX=function(a,b){return Object.defineProperty(a,b,{get:function(){return this.getAttribute(b)},set:function(c){return c!=null?this.setAttribute(b,""+$APP.S.g(c)):
9
+ this.removeAttribute(b)},enumerable:!0,configurable:!0})},sX=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.S.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},tX=function(a){sX(a,"orientation","horizontal");sX(a,"variant","solid");sX(a,"align","center");rX(a,"label");rX(a,"thickness");rX(a,"color");rX(a,"inset");return rX(a,"length")},vX=function(){return $APP.Lg("x-divider",
10
+ new $APP.Q(null,5,[$APP.Cg,uX,$APP.Dg,oX,$APP.Eg,pX,$APP.Fg,qX,$APP.Jg,tX],null))},fX=new $APP.K(null,"inset-raw","inset-raw",89351124),iX=new $APP.K(null,"inset","inset",-396367740),gX=new $APP.K(null,"role-raw","role-raw",777951354),jX=new $APP.K(null,"length","length",588987862),dX=new $APP.K(null,"length-raw","length-raw",-1832244116),hX=new $APP.K(null,"thickness","thickness",-940175454),eX=new $APP.K(null,"thickness-raw","thickness-raw",1843812655);var uX="orientation variant thickness color inset length label align role aria-label".split(" "),mX=new $APP.R(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),lX=new $APP.R(null,new $APP.Q(null,3,["dashed",null,"dotted",null,"solid",null],null),null),kX=new $APP.R(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null);$APP.ha("baredom.exports.x_divider.init",vX);export const init=vX;
package/dist/x-drawer.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var KJ=function(a){var b=$APP.k(a,"__xDrawerRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-drawer-size:20rem;--x-drawer-bg:var(--x-color-bg,Canvas);--x-drawer-fg:var(--x-color-text,CanvasText);--x-drawer-backdrop:rgb(0 0 0/0.4);--x-drawer-shadow:var(--x-shadow-lg,0 8px 24px rgb(0 0 0/0.18));--x-drawer-duration:var(--x-transition-duration,200ms);--x-drawer-easing:ease;--x-drawer-z:1000;--x-drawer-header-padding:1rem 1.25rem;--x-drawer-body-padding:1rem 1.25rem;--x-drawer-footer-padding:0.75rem 1.25rem;--x-drawer-border:var(--x-color-border,color-mix(in srgb,currentColor 12%,transparent));}[part\x3dbackdrop]{display:none;position:fixed;inset:0;background:var(--x-drawer-backdrop);z-index:var(--x-drawer-z);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{display:block;}[part\x3dpanel]{position:fixed;background:var(--x-drawer-bg);color:var(--x-drawer-fg);box-shadow:var(--x-drawer-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-drawer-z) + 1);transition:transform var(--x-drawer-duration) var(--x-drawer-easing);}:host([data-placement\x3dleft]) [part\x3dpanel],:host([data-placement\x3dright]) [part\x3dpanel]{top:0;bottom:0;width:var(--x-drawer-size);max-width:100%;}:host([data-placement\x3dleft]) [part\x3dpanel]{left:0;transform:translateX(-100%);}:host([data-placement\x3dright]) [part\x3dpanel]{right:0;transform:translateX(100%);}:host([data-placement\x3dtop]) [part\x3dpanel],:host([data-placement\x3dbottom]) [part\x3dpanel]{left:0;right:0;height:var(--x-drawer-size);max-height:100dvh;}:host([data-placement\x3dtop]) [part\x3dpanel]{top:0;transform:translateY(-100%);}:host([data-placement\x3dbottom]) [part\x3dpanel]{bottom:0;transform:translateY(100%);}:host([data-open\x3dtrue]) [part\x3dpanel]{transform:none;}[part\x3dpanel]:focus{outline:none;}[part\x3dheader]{padding:var(--x-drawer-header-padding);border-bottom:1px solid var(--x-drawer-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-drawer-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-drawer-footer-padding);border-top:1px solid var(--x-drawer-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none;}}@media (prefers-color-scheme:dark){:host{--x-drawer-bg:var(--x-color-bg,#1c1d24);--x-drawer-fg:var(--x-color-text,#e2e4ef);--x-drawer-border:var(--x-color-border,rgb(255 255 255/0.08));--x-drawer-shadow:var(--x-shadow-lg,0 8px 40px rgb(0 0 0/0.55));--x-drawer-backdrop:rgb(0 0 0/0.55);}}";
3
- d.setAttribute("part","backdrop");e.setAttribute("part","panel");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");l.setAttribute("part","body");p.setAttribute("part","footer");q.setAttribute("name","footer");g.appendChild(h);l.appendChild(m);p.appendChild(q);e.appendChild(g);e.appendChild(l);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xDrawerRefs={root:b,backdrop:d,panel:e,header:g,body:l,
4
- footer:p};return $APP.k(a,"__xDrawerRefs")},MJ=function(a){a=new $APP.R(null,3,[$APP.Gi,a.hasAttribute("open"),$APP.hn,a.getAttribute("placement"),$APP.pi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Gi);a=$APP.D(b,$APP.hn);b=$APP.D(b,$APP.pi);c=$APP.F(c);a=typeof a==="string"&&$APP.I(LJ,a)?a:"right";b=typeof b==="string"&&$APP.N(b,"")?b:"Drawer";return new $APP.R(null,3,[$APP.Nm,c,$APP.Qj,a,$APP.U,b],null)},NJ=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,
5
- composed:!0,cancelable:!1}))},OJ=function(a){return $APP.xe($APP.de(function(b){var c=window.getComputedStyle(b);return $APP.N("none",c.display)&&$APP.N("hidden",c.visibility)&&b.offsetWidth>0&&b.offsetHeight>0},$APP.uc(a.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))))},PJ=function(a){var b=$APP.k(a,"__xDrawerRefs");b=$APP.n(b)?$APP.k(b,"panel"):null;var c=$APP.k(a,"__xDrawerRestore"),d=
6
- $APP.k(a,"__xDrawerPanelTab")===!0;a.__xDrawerTabbables=null;a.__xDrawerRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xDrawerPanelTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},QJ=function(a,b){NJ(a,"x-drawer-dismiss",{reason:b});a.removeAttribute("open");return null},RJ=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open","");return null},SJ=function(a){a.removeAttribute("open");return null},TJ=function(a){var b=KJ(a);b=$APP.k(b,"panel");var c=MJ(a),d=
7
- $APP.Nm.g(c),e=$APP.k(a,"__xDrawerPrevOpen");a.setAttribute("data-open",$APP.n(d)?"true":"false");a.setAttribute("data-placement",$APP.Qj.g(c));b.setAttribute("aria-label",$APP.U.g(c));$APP.n(d)?b.removeAttribute("aria-hidden"):b.setAttribute("aria-hidden","true");$APP.N(e,d)&&(a.__xDrawerPrevOpen=d,NJ(a,"x-drawer-toggle",{open:d}),$APP.n(d)?setTimeout(function(){var g=$APP.k(a,"__xDrawerRefs");g=$APP.n(g)?$APP.k(g,"panel"):null;var h=OJ(a);a.__xDrawerRestore=document.activeElement;var l=$APP.n(h)?
8
- $APP.Hh(h):null;a.__xDrawerTabbables=l;$APP.t(h)?$APP.u(h).focus():$APP.n(g)&&($APP.n(g.hasAttribute("tabindex"))||(g.setAttribute("tabindex","-1"),a.__xDrawerPanelTab=!0),g.focus());return null},0):PJ(a))},UJ=function(a){function b(g){var h=g.key;if($APP.B.i(h,"Escape"))g.preventDefault(),QJ(a,"escape");else if($APP.B.i(h,"Tab")){h=$APP.k(a,"__xDrawerTabbables");h=$APP.n(h)?$APP.xe($APP.uc(h)):$APP.fe;var l=$APP.k(a,"__xDrawerRefs");l=$APP.n(l)?$APP.k(l,"panel"):null;if($APP.Hc(h))g.preventDefault(),
9
- $APP.n(l)&&l.focus();else{l=document.activeElement;var m=$APP.u(h);h=$APP.xc(h);var p=g.shiftKey;$APP.n($APP.n(p)?$APP.B.i(l,m):p)?(g.preventDefault(),h.focus()):$APP.r(p)&&$APP.B.i(l,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return QJ(a,"backdrop")}var d=KJ(a),e=$APP.k(d,"panel");$APP.k(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ja(a,"__xDrawerHandlers",{backdrop:c,keydown:b})},VJ=function(a){var b=$APP.k(a,"__xDrawerHandlers"),c=$APP.k(a,"__xDrawerRefs");
10
- if($APP.n($APP.n(b)?c:b)){var d=$APP.k(c,"backdrop");c=$APP.k(c,"panel");var e=$APP.k(b,"backdrop");b=$APP.k(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xDrawerHandlers=null},WJ=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?RJ(this):SJ(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"placement",{get:function(){var b=this.getAttribute("placement");
11
- return $APP.n(b)?b:"right"},set:function(b){return b==null?this.removeAttribute("placement"):this.setAttribute("placement",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Drawer"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return RJ(this)},enumerable:!0,configurable:!0,
12
- writable:!0});Object.defineProperty(a,"hide",{value:function(){return SJ(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?SJ(this):RJ(this);return null},enumerable:!0,configurable:!0,writable:!0})},YJ=function(){if(!$APP.n(customElements.get("x-drawer"))){var a=class extends HTMLElement{};a.observedAttributes=XJ;a.prototype.connectedCallback=function(){KJ(this);VJ(this);UJ(this);TJ(this);return null};a.prototype.disconnectedCallback=
13
- function(){VJ(this);PJ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&TJ(this);return null};WJ(a.prototype);customElements.define("x-drawer",a)}return null},ZJ=function(){return YJ()};var LJ=new $APP.S(null,new $APP.R(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),XJ=["open","placement","label"];$APP.Pd(["x-drawer-toggle",new $APP.R(null,2,[$APP.km,!1,$APP.V,new $APP.R(null,1,[$APP.hm,$APP.Zj],null)],null),"x-drawer-dismiss",new $APP.R(null,2,[$APP.km,!1,$APP.V,new $APP.R(null,1,[$APP.Qi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_drawer.init",ZJ);export const init=ZJ;
2
+ var tL=function(a){var b=$APP.k(a,"__xDrawerRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),l=document.createElement("div"),m=document.createElement("slot"),p=document.createElement("div"),r=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-drawer-size:20rem;--x-drawer-bg:var(--x-color-bg,Canvas);--x-drawer-fg:var(--x-color-text,CanvasText);--x-drawer-backdrop:rgb(0 0 0/0.4);--x-drawer-shadow:var(--x-shadow-lg,0 8px 24px rgb(0 0 0/0.18));--x-drawer-duration:var(--x-transition-duration,200ms);--x-drawer-easing:ease;--x-drawer-z:1000;--x-drawer-header-padding:1rem 1.25rem;--x-drawer-body-padding:1rem 1.25rem;--x-drawer-footer-padding:0.75rem 1.25rem;--x-drawer-border:var(--x-color-border,color-mix(in srgb,currentColor 12%,transparent));}[part\x3dbackdrop]{display:none;position:fixed;inset:0;background:var(--x-drawer-backdrop);z-index:var(--x-drawer-z);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{display:block;}[part\x3dpanel]{position:fixed;background:var(--x-drawer-bg);color:var(--x-drawer-fg);box-shadow:var(--x-drawer-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-drawer-z) + 1);transition:transform var(--x-drawer-duration) var(--x-drawer-easing);}:host([data-placement\x3dleft]) [part\x3dpanel],:host([data-placement\x3dright]) [part\x3dpanel]{top:0;bottom:0;width:var(--x-drawer-size);max-width:100%;}:host([data-placement\x3dleft]) [part\x3dpanel]{left:0;transform:translateX(-100%);}:host([data-placement\x3dright]) [part\x3dpanel]{right:0;transform:translateX(100%);}:host([data-placement\x3dtop]) [part\x3dpanel],:host([data-placement\x3dbottom]) [part\x3dpanel]{left:0;right:0;height:var(--x-drawer-size);max-height:100dvh;}:host([data-placement\x3dtop]) [part\x3dpanel]{top:0;transform:translateY(-100%);}:host([data-placement\x3dbottom]) [part\x3dpanel]{bottom:0;transform:translateY(100%);}:host([data-open\x3dtrue]) [part\x3dpanel]{transform:none;}[part\x3dpanel]:focus{outline:none;}[part\x3dheader]{padding:var(--x-drawer-header-padding);border-bottom:1px solid var(--x-drawer-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-drawer-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-drawer-footer-padding);border-top:1px solid var(--x-drawer-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none;}}@media (prefers-color-scheme:dark){:host{--x-drawer-bg:var(--x-color-bg,#1c1d24);--x-drawer-fg:var(--x-color-text,#e2e4ef);--x-drawer-border:var(--x-color-border,rgb(255 255 255/0.08));--x-drawer-shadow:var(--x-shadow-lg,0 8px 40px rgb(0 0 0/0.55));--x-drawer-backdrop:rgb(0 0 0/0.55);}}";
3
+ d.setAttribute("part","backdrop");e.setAttribute("part","panel");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");l.setAttribute("part","body");p.setAttribute("part","footer");r.setAttribute("name","footer");g.appendChild(h);l.appendChild(m);p.appendChild(r);e.appendChild(g);e.appendChild(l);e.appendChild(p);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xDrawerRefs={root:b,backdrop:d,panel:e,header:g,body:l,
4
+ footer:p};return $APP.k(a,"__xDrawerRefs")},vL=function(a){a=new $APP.Q(null,3,[$APP.Yi,a.hasAttribute("open"),$APP.Bn,a.getAttribute("placement"),$APP.Hi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Yi);a=$APP.D(b,$APP.Bn);b=$APP.D(b,$APP.Hi);c=$APP.F(c);a=typeof a==="string"&&$APP.I(uL,a)?a:"right";b=typeof b==="string"&&$APP.N(b,"")?b:"Drawer";return new $APP.Q(null,3,[$APP.fn,c,$APP.lk,a,$APP.T,b],null)},wL=function(a){return $APP.xe($APP.ce(function(b){var c=window.getComputedStyle(b);
5
+ return $APP.N("none",c.display)&&$APP.N("hidden",c.visibility)&&b.offsetWidth>0&&b.offsetHeight>0},$APP.uc(a.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))))},xL=function(a){var b=$APP.k(a,"__xDrawerRefs");b=$APP.n(b)?$APP.k(b,"panel"):null;var c=$APP.k(a,"__xDrawerRestore"),d=$APP.k(a,"__xDrawerPanelTab")===!0;a.__xDrawerTabbables=null;a.__xDrawerRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),
6
+ a.__xDrawerPanelTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},yL=function(a,b){$APP.Qg(a,"x-drawer-dismiss",{reason:b});a.removeAttribute("open");return null},zL=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open","");return null},AL=function(a){a.removeAttribute("open");return null},BL=function(a){var b=tL(a);b=$APP.k(b,"panel");var c=vL(a),d=$APP.fn.g(c),e=$APP.k(a,"__xDrawerPrevOpen");a.setAttribute("data-open",$APP.n(d)?"true":"false");a.setAttribute("data-placement",$APP.lk.g(c));
7
+ b.setAttribute("aria-label",$APP.T.g(c));$APP.n(d)?b.removeAttribute("aria-hidden"):b.setAttribute("aria-hidden","true");$APP.N(e,d)&&(a.__xDrawerPrevOpen=d,$APP.Qg(a,"x-drawer-toggle",{open:d}),$APP.n(d)?setTimeout(function(){var g=$APP.k(a,"__xDrawerRefs");g=$APP.n(g)?$APP.k(g,"panel"):null;var h=wL(a);a.__xDrawerRestore=document.activeElement;var l=$APP.n(h)?$APP.Zh(h):null;a.__xDrawerTabbables=l;$APP.t(h)?$APP.u(h).focus():$APP.n(g)&&($APP.n(g.hasAttribute("tabindex"))||(g.setAttribute("tabindex",
8
+ "-1"),a.__xDrawerPanelTab=!0),g.focus());return null},0):xL(a))},CL=function(a){function b(g){var h=g.key;if($APP.B.i(h,"Escape"))g.preventDefault(),yL(a,"escape");else if($APP.B.i(h,"Tab")){h=$APP.k(a,"__xDrawerTabbables");h=$APP.n(h)?$APP.xe($APP.uc(h)):$APP.ee;var l=$APP.k(a,"__xDrawerRefs");l=$APP.n(l)?$APP.k(l,"panel"):null;if($APP.Hc(h))g.preventDefault(),$APP.n(l)&&l.focus();else{l=document.activeElement;var m=$APP.u(h);h=$APP.xc(h);var p=g.shiftKey;$APP.n($APP.n(p)?$APP.B.i(l,m):p)?(g.preventDefault(),
9
+ h.focus()):$APP.q(p)&&$APP.B.i(l,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return yL(a,"backdrop")}var d=tL(a),e=$APP.k(d,"panel");$APP.k(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ja(a,"__xDrawerHandlers",{backdrop:c,keydown:b})},DL=function(a){var b=$APP.k(a,"__xDrawerHandlers"),c=$APP.k(a,"__xDrawerRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.k(c,"backdrop");c=$APP.k(c,"panel");var e=$APP.k(b,"backdrop");b=$APP.k(b,"keydown");$APP.n(e)&&d.removeEventListener("click",
10
+ e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xDrawerHandlers=null},EL=function(a){tL(a);DL(a);CL(a);BL(a);return null},FL=function(a){DL(a);xL(a);return null},GL=function(a,b,c,d){$APP.N(c,d)&&BL(a);return null},HL=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?zL(this):AL(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"placement",{get:function(){var b=this.getAttribute("placement");return $APP.n(b)?
11
+ b:"right"},set:function(b){return b==null?this.removeAttribute("placement"):this.setAttribute("placement",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Drawer"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return zL(this)},enumerable:!0,configurable:!0,writable:!0});
12
+ Object.defineProperty(a,"hide",{value:function(){return AL(this)},enumerable:!0,configurable:!0,writable:!0});return Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?AL(this):zL(this);return null},enumerable:!0,configurable:!0,writable:!0})},JL=function(){return $APP.Lg("x-drawer",new $APP.Q(null,5,[$APP.Cg,IL,$APP.Dg,EL,$APP.Eg,FL,$APP.Fg,GL,$APP.Jg,HL],null))};var uL=new $APP.R(null,new $APP.Q(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),IL=["open","placement","label"];$APP.Pd(["x-drawer-toggle",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Hm,$APP.uk],null)],null),"x-drawer-dismiss",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.hj,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_drawer.init",JL);export const init=JL;
@@ -1,12 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var mr=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},or=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(b,"trigger"),d=$APP.k(b,"label");b=$APP.k(b,"panel");var e=a.hasAttribute("open"),g=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.n(h)?h:"";a=a.getAttribute("placement");a=$APP.I(nr,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.n(e)?"true":"false");mr(c,"disabled",g);return b.setAttribute("data-placement",
3
- a)}return null},pr=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.r(a.hasAttribute("open"));b=new CustomEvent("x-dropdown-toggle",{detail:{open:c,source:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)?(c?a.setAttribute("open",""):a.removeAttribute("open"),a.dispatchEvent(new CustomEvent("x-dropdown-change",{detail:{open:c},bubbles:!0,composed:!0,cancelable:!1}))):null},qr=function(a){var b=$APP.k(a,"__xDropdownHandlers");if($APP.n(b)){var c=
4
- $APP.k(b,"docClick"),d=$APP.k(b,"docKeydown");return setTimeout(function(){return $APP.n(a.hasAttribute("open"))?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},rr=function(a){a=$APP.k(a,"__xDropdownHandlers");if($APP.n(a)){var b=$APP.k(a,"docKeydown");document.removeEventListener("click",$APP.k(a,"docClick"));return document.removeEventListener("keydown",b)}return null},sr=function(a){return{triggerClick:function(){return pr(a,"pointer")},triggerKeydown:function(b){var c=
5
- b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),pr(a,"keyboard")):null},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.r(a.contains(b))?pr(a,"focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.vc(b.composedPath()),b=$APP.Td(function(c){return c===a},b),$APP.n(b)?null:pr(a,"outside-click")):null},docKeydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?pr(a,
6
- "escape"):null}}},tr=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(a,"__xDropdownHandlers");$APP.n(c)&&(b=$APP.k(b,"trigger"),b.removeEventListener("click",$APP.k(c,"triggerClick")),b.removeEventListener("keydown",$APP.k(c,"triggerKeydown")),a.removeEventListener("focusout",$APP.k(c,"hostFocusout")))}},ur=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return mr(this,c,$APP.F(d))}})},vr=
7
- function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},xr=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return wr}});ur(b,"open","open");ur(b,"disabled","disabled");vr(b,"label","label");vr(b,"placement","placement");b.show=function(){return $APP.n(this.hasAttribute("open"))?
8
- null:pr(this,"programmatic")};b.hide=function(){return $APP.n(this.hasAttribute("open"))?pr(this,"programmatic"):null};b.toggle=function(){return pr(this,"programmatic")};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xDropdownRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("slot");
9
- d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-dropdown-trigger-bg:var(--x-color-surface-hover,#f8fafc);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#e2e8f0);--x-dropdown-trigger-color:var(--x-color-text,#0f172a);--x-dropdown-trigger-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-trigger-radius:var(--x-radius-md,6px);--x-dropdown-trigger-padding:0 0.75rem;--x-dropdown-trigger-height:2.25rem;--x-dropdown-trigger-font-size:var(--x-font-size-sm,0.9375rem);--x-dropdown-trigger-font-weight:500;--x-dropdown-chevron-color:var(--x-color-text-muted,#64748b);--x-dropdown-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-dropdown-panel-bg:var(--x-color-bg,#ffffff);--x-dropdown-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-panel-radius:var(--x-radius-md,8px);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-dropdown-panel-padding:0.25rem;--x-dropdown-panel-min-width:10rem;--x-dropdown-panel-max-height:20rem;--x-dropdown-panel-offset:4px;--x-dropdown-transition-duration:var(--x-transition-duration,150ms);--x-dropdown-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-dropdown-trigger-bg:var(--x-color-surface-hover,#1e293b);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#334155);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#475569);--x-dropdown-trigger-color:var(--x-color-text,#e2e8f0);--x-dropdown-trigger-border:1px solid var(--x-color-border,#334155);--x-dropdown-chevron-color:var(--x-color-text-muted,#94a3b8);--x-dropdown-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-dropdown-panel-bg:var(--x-color-bg,#1e293b);--x-dropdown-panel-border:1px solid var(--x-color-border,#334155);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));}}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:0.375rem;height:var(--x-dropdown-trigger-height);padding:var(--x-dropdown-trigger-padding);background:var(--x-dropdown-trigger-bg);color:var(--x-dropdown-trigger-color);border:var(--x-dropdown-trigger-border);border-radius:var(--x-dropdown-trigger-radius);font-size:var(--x-dropdown-trigger-font-size);font-weight:var(--x-dropdown-trigger-font-weight);font-family:inherit;cursor:pointer;user-select:none;white-space:nowrap;}[part\x3dtrigger]:hover:not(:disabled){background:var(--x-dropdown-trigger-bg-hover);}[part\x3dtrigger]:active:not(:disabled){background:var(--x-dropdown-trigger-bg-active);}[part\x3dtrigger]:disabled{cursor:default;opacity:0.55;}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-dropdown-focus-ring);}[part\x3dtrigger-label]{flex:1;}[part\x3dchevron]{display:inline-block;color:var(--x-dropdown-chevron-color);font-style:normal;flex-shrink:0;transition:transform 200ms ease;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:1000;box-sizing:border-box;background:var(--x-dropdown-panel-bg);border:var(--x-dropdown-panel-border);border-radius:var(--x-dropdown-panel-radius);box-shadow:var(--x-dropdown-panel-shadow);padding:var(--x-dropdown-panel-padding);min-width:var(--x-dropdown-panel-min-width);max-width:calc(100vw - 1rem);max-height:var(--x-dropdown-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s var(--x-dropdown-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:bottom right;}[part\x3dpanel-inner]{display:contents;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
10
- e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-haspopup","true");e.setAttribute("aria-expanded","false");e.setAttribute("aria-controls","panel");g.setAttribute("part","trigger-label");h.setAttribute("part","chevron");h.setAttribute("aria-hidden","true");h.textContent="▾";l.setAttribute("part","panel");l.setAttribute("id","panel");l.setAttribute("data-placement","bottom-start");m.setAttribute("part","panel-inner");e.appendChild(g);e.appendChild(h);m.appendChild(p);
11
- l.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(l);this.__xDropdownRefs={trigger:e,label:g,chevron:h,panel:l}}tr(this);rr(this);this.__xDropdownHandlers=sr(this);d=$APP.k(this,"__xDropdownRefs");$APP.n(d)&&(c=$APP.k(this,"__xDropdownHandlers"),$APP.n(c)&&(d=$APP.k(d,"trigger"),d.addEventListener("click",$APP.k(c,"triggerClick")),d.addEventListener("keydown",$APP.k(c,"triggerKeydown")),this.addEventListener("focusout",$APP.k(c,"hostFocusout"))));$APP.n(this.hasAttribute("open"))&&
12
- qr(this);return or(this)};b.disconnectedCallback=function(){tr(this);return rr(this)};b.attributeChangedCallback=function(c){$APP.n($APP.k(this,"__xDropdownRefs"))?(or(this),c=$APP.B.i(c,"open")?$APP.n(this.hasAttribute("open"))?qr(this):rr(this):null):c=null;return c};return a},yr=function(){return $APP.n(customElements.get("x-dropdown"))?null:customElements.define("x-dropdown",xr())};var nr=new $APP.S(null,new $APP.R(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),wr=["open","disabled","label","placement"];$APP.Pd(["x-dropdown-toggle",new $APP.R(null,2,[$APP.km,!0,$APP.V,new $APP.R(null,2,[$APP.hm,$APP.Zj,$APP.rl,$APP.Y],null)],null),"x-dropdown-change",new $APP.R(null,2,[$APP.km,!1,$APP.V,new $APP.R(null,1,[$APP.hm,$APP.Zj],null)],null)]);$APP.ha("baredom.exports.x_dropdown.init",yr);export const init=yr;
2
+ var Pr=function(a){var b=$APP.k(a,"__xDropdownRefs");if($APP.n(b)){var c=$APP.k(b,"trigger"),d=$APP.k(b,"label");b=$APP.k(b,"panel");var e=a.hasAttribute("open"),g=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.n(h)?h:"";a=a.getAttribute("placement");a=$APP.I(Or,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.n(e)?"true":"false");$APP.Pg(c,"disabled",g);return b.setAttribute("data-placement",a)}return null},Qr=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
3
+ var c=$APP.q(a.hasAttribute("open"));return $APP.Rg(a,"x-dropdown-toggle",{open:c,source:b})?(c?a.setAttribute("open",""):a.removeAttribute("open"),$APP.Qg(a,"x-dropdown-change",{open:c})):null},Rr=function(a){var b=$APP.k(a,"__xDropdownHandlers");if($APP.n(b)){var c=$APP.k(b,"docClick"),d=$APP.k(b,"docKeydown");return setTimeout(function(){return $APP.n(a.hasAttribute("open"))?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},Sr=function(a){a=$APP.k(a,
4
+ "__xDropdownHandlers");if($APP.n(a)){var b=$APP.k(a,"docKeydown");document.removeEventListener("click",$APP.k(a,"docClick"));return document.removeEventListener("keydown",b)}return null},Tr=function(a){return{triggerClick:function(){return Qr(a,"pointer")},triggerKeydown:function(b){var c=b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),Qr(a,"keyboard")):null},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.q(a.contains(b))?Qr(a,
5
+ "focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.vc(b.composedPath()),b=$APP.Td(function(c){return c===a},b),$APP.n(b)?null:Qr(a,"outside-click")):null},docKeydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Qr(a,"escape"):null},panelClick:function(b){return $APP.n(a.hasAttribute("open"))?$APP.n(b.target.closest("button, a, [role\x3dmenuitem]"))?Qr(a,"item-select"):null:null}}},Ur=function(a){var b=$APP.k(a,"__xDropdownRefs");
6
+ if($APP.n(b)){var c=$APP.k(a,"__xDropdownHandlers");if($APP.n(c)){var d=$APP.k(b,"trigger");b=$APP.k(b,"panel");d.removeEventListener("click",$APP.k(c,"triggerClick"));d.removeEventListener("keydown",$APP.k(c,"triggerKeydown"));a.removeEventListener("focusout",$APP.k(c,"hostFocusout"));$APP.n(b)&&b.removeEventListener("click",$APP.k(c,"panelClick"))}}},Vr=function(a){if(!$APP.n($APP.k(a,"__xDropdownRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("button"),
7
+ e=document.createElement("span"),g=document.createElement("span"),h=document.createElement("div"),l=document.createElement("div"),m=document.createElement("slot");c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-dropdown-trigger-bg:var(--x-color-surface-hover,#f8fafc);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#e2e8f0);--x-dropdown-trigger-color:var(--x-color-text,#0f172a);--x-dropdown-trigger-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-trigger-radius:var(--x-radius-md,6px);--x-dropdown-trigger-padding:0 0.75rem;--x-dropdown-trigger-height:2.25rem;--x-dropdown-trigger-font-size:var(--x-font-size-sm,0.9375rem);--x-dropdown-trigger-font-weight:500;--x-dropdown-chevron-color:var(--x-color-text-muted,#64748b);--x-dropdown-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-dropdown-panel-bg:var(--x-color-bg,#ffffff);--x-dropdown-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-dropdown-panel-radius:var(--x-radius-md,8px);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-dropdown-panel-padding:0.25rem;--x-dropdown-panel-min-width:10rem;--x-dropdown-panel-max-height:20rem;--x-dropdown-panel-offset:4px;--x-dropdown-transition-duration:var(--x-transition-duration,150ms);--x-dropdown-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-dropdown-trigger-bg:var(--x-color-surface-hover,#1e293b);--x-dropdown-trigger-bg-hover:var(--x-color-surface-active,#334155);--x-dropdown-trigger-bg-active:var(--x-color-surface-active,#475569);--x-dropdown-trigger-color:var(--x-color-text,#e2e8f0);--x-dropdown-trigger-border:1px solid var(--x-color-border,#334155);--x-dropdown-chevron-color:var(--x-color-text-muted,#94a3b8);--x-dropdown-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-dropdown-panel-bg:var(--x-color-bg,#1e293b);--x-dropdown-panel-border:1px solid var(--x-color-border,#334155);--x-dropdown-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));}}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:0.375rem;height:var(--x-dropdown-trigger-height);padding:var(--x-dropdown-trigger-padding);background:var(--x-dropdown-trigger-bg);color:var(--x-dropdown-trigger-color);border:var(--x-dropdown-trigger-border);border-radius:var(--x-dropdown-trigger-radius);font-size:var(--x-dropdown-trigger-font-size);font-weight:var(--x-dropdown-trigger-font-weight);font-family:inherit;cursor:pointer;user-select:none;white-space:nowrap;}[part\x3dtrigger]:hover:not(:disabled){background:var(--x-dropdown-trigger-bg-hover);}[part\x3dtrigger]:active:not(:disabled){background:var(--x-dropdown-trigger-bg-active);}[part\x3dtrigger]:disabled{cursor:default;opacity:0.55;}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-dropdown-focus-ring);}[part\x3dtrigger-label]{flex:1;}[part\x3dchevron]{display:inline-block;color:var(--x-dropdown-chevron-color);font-style:normal;flex-shrink:0;transition:transform 200ms ease;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:1000;box-sizing:border-box;background:var(--x-dropdown-panel-bg);border:var(--x-dropdown-panel-border);border-radius:var(--x-dropdown-panel-radius);box-shadow:var(--x-dropdown-panel-shadow);padding:var(--x-dropdown-panel-padding);min-width:var(--x-dropdown-panel-min-width);max-width:calc(100vw - 1rem);max-height:var(--x-dropdown-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s var(--x-dropdown-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:bottom right;}[part\x3dpanel-inner]{display:contents;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
8
+ d.setAttribute("part","trigger");d.setAttribute("type","button");d.setAttribute("aria-haspopup","true");d.setAttribute("aria-expanded","false");d.setAttribute("aria-controls","panel");e.setAttribute("part","trigger-label");g.setAttribute("part","chevron");g.setAttribute("aria-hidden","true");g.textContent="▾";h.setAttribute("part","panel");h.setAttribute("id","panel");h.setAttribute("data-placement","bottom-start");l.setAttribute("part","panel-inner");d.appendChild(e);d.appendChild(g);l.appendChild(m);
9
+ h.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(h);a.__xDropdownRefs={trigger:d,label:e,chevron:g,panel:h}}Ur(a);Sr(a);a.__xDropdownHandlers=Tr(a);d=$APP.k(a,"__xDropdownRefs");$APP.n(d)&&(b=$APP.k(a,"__xDropdownHandlers"),$APP.n(b)&&(c=$APP.k(d,"trigger"),d=$APP.k(d,"panel"),c.addEventListener("click",$APP.k(b,"triggerClick")),c.addEventListener("keydown",$APP.k(b,"triggerKeydown")),a.addEventListener("focusout",$APP.k(b,"hostFocusout")),$APP.n(d)&&d.addEventListener("click",$APP.k(b,
10
+ "panelClick"))));$APP.n(a.hasAttribute("open"))&&Rr(a);return Pr(a)},Wr=function(a){Ur(a);return Sr(a)},Xr=function(a,b){return $APP.n($APP.k(a,"__xDropdownRefs"))?(Pr(a),$APP.B.i(b,"open")?$APP.n(a.hasAttribute("open"))?Rr(a):Sr(a):null):null},Yr=function(a){$APP.Sg(a,"open","open");$APP.Sg(a,"disabled","disabled");$APP.Ug(a,"label","label");$APP.Ug(a,"placement","placement");a.show=function(){return $APP.n(this.hasAttribute("open"))?null:Qr(this,"programmatic")};a.hide=function(){return $APP.n(this.hasAttribute("open"))?
11
+ Qr(this,"programmatic"):null};return a.toggle=function(){return Qr(this,"programmatic")}},$r=function(){return $APP.Lg("x-dropdown",new $APP.Q(null,5,[$APP.Cg,Zr,$APP.Dg,Vr,$APP.Eg,Wr,$APP.Fg,Xr,$APP.Jg,Yr],null))};var Or=new $APP.R(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Zr=["open","disabled","label","placement"];$APP.Pd(["x-dropdown-toggle",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,2,[$APP.Hm,$APP.uk,$APP.Kl,$APP.Y],null)],null),"x-dropdown-change",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,1,[$APP.Hm,$APP.uk],null)],null)]);$APP.ha("baredom.exports.x_dropdown.init",$r);export const init=$r;
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var sH=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},wH=function(a){var b=$APP.k(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.k(b,"root-el"),d=$APP.k(b,"legend-el");b=$APP.k(b,"content-el");var e=a.getAttribute("legend");e=new $APP.R(null,4,[tH,e,$APP.Nl,a.hasAttribute("disabled"),$APP.Uj,a.getAttribute("aria-label"),$APP.Cj,a.getAttribute("aria-describedby")],null);var g=$APP.M(e),h=$APP.D(g,tH);var l=$APP.D(g,$APP.Nl);e=$APP.D(g,$APP.Uj);g=$APP.D(g,$APP.Cj);h=$APP.n(h)?
3
- h:"";l=$APP.F(l);l=new $APP.R(null,5,[uH,h,vH,$APP.N(h,""),$APP.X,l,$APP.Pl,e,$APP.Zm,g],null);h=uH.g(l);g=vH.g(l);e=$APP.X.g(l);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.Pl.g(l);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.Zm.g(l);$APP.n(d)?c.setAttribute("aria-describedby",d):
4
- c.removeAttribute("aria-describedby");sH(a,"data-disabled",e);return sH(b,"inert",e)}return null},xH=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return sH(this,"disabled",$APP.F(b))}})},yH=function(a){Object.defineProperty(a,"legend",{configurable:!0,enumerable:!0,get:function(){return this.getAttribute("legend")},set:function(b){b!=null&&$APP.N(b)?(b=""+$APP.T.g(b),b=this.setAttribute("legend",
5
- b)):b=this.removeAttribute("legend");return b}})},AH=function(){var a=class extends HTMLElement{},b=a.prototype;a.observedAttributes=zH;yH(b);xH(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFieldsetRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:var(--x-color-border, #d1d5db);--x-fieldset-border-width:1px;--x-fieldset-border-radius:var(--x-radius-md, 8px);--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:var(--x-color-surface,transparent);--x-fieldset-legend-color:var(--x-color-text-muted,#374151);--x-fieldset-legend-font-size:var(--x-font-size-sm, 0.875rem);--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;--x-fieldset-input-bg:var(--x-color-surface,#ffffff);--x-fieldset-input-color:var(--x-color-text,#0f172a);--x-fieldset-input-border:var(--x-color-border,#d1d5db);--x-fieldset-input-radius:var(--x-radius-sm,0.375rem);--x-fieldset-input-focus:var(--x-color-focus-ring,#60a5fa);}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:var(--x-color-border, #374151);--x-fieldset-legend-color:var(--x-color-text-muted,#d1d5db);--x-fieldset-input-bg:var(--x-color-surface,#1f2937);--x-fieldset-input-color:var(--x-color-text,#e5e7eb);--x-fieldset-input-border:var(--x-color-border,#374151);--x-fieldset-input-focus:var(--x-color-focus-ring,#93c5fd);}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
6
- e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(l);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);$APP.n(document.getElementById("x-fieldset-input-styles"))||(d=document.createElement("style"),d.setAttribute("id","x-fieldset-input-styles"),d.textContent="x-fieldset input,x-fieldset select,x-fieldset textarea{background:var(--x-fieldset-input-bg);color:var(--x-fieldset-input-color);border:1px solid var(--x-fieldset-input-border);border-radius:var(--x-fieldset-input-radius);padding:0.5rem 0.75rem;font:inherit;outline:none;box-sizing:border-box;}x-fieldset input:focus,x-fieldset select:focus,x-fieldset textarea:focus{border-color:var(--x-fieldset-input-focus);box-shadow:0 0 0 2px var(--x-fieldset-input-focus);}",
7
- document.head.appendChild(d));this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return wH(this)};b.disconnectedCallback=function(){return null};b.attributeChangedCallback=function(){return wH(this)};return a},BH=function(){return $APP.n(customElements.get("x-fieldset"))?null:customElements.define("x-fieldset",AH())},vH=new $APP.K(null,"legend-visible?","legend-visible?",-281107501),tH=new $APP.K(null,"legend-raw","legend-raw",907427195),uH=new $APP.K(null,"legend","legend",-1027192245);var zH=["legend","disabled","aria-label","aria-describedby"];$APP.ha("baredom.exports.x_fieldset.init",BH);export const init=BH;
2
+ var AI=function(a){var b=$APP.k(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.k(b,"root-el"),d=$APP.k(b,"legend-el");b=$APP.k(b,"content-el");var e=new $APP.Q(null,4,[xI,a.getAttribute("legend"),$APP.fm,a.hasAttribute("disabled"),$APP.pk,a.getAttribute("aria-label"),$APP.Uj,a.getAttribute("aria-describedby")],null),g=$APP.M(e),h=$APP.D(g,xI);var l=$APP.D(g,$APP.fm);e=$APP.D(g,$APP.pk);g=$APP.D(g,$APP.Uj);h=$APP.n(h)?h:"";l=$APP.F(l);l=new $APP.Q(null,5,[yI,h,zI,$APP.N(h,""),$APP.X,l,$APP.hm,e,$APP.sn,
3
+ g],null);h=yI.g(l);g=zI.g(l);e=$APP.X.g(l);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.hm.g(l);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.sn.g(l);$APP.n(d)?c.setAttribute("aria-describedby",d):c.removeAttribute("aria-describedby");$APP.Pg(a,"data-disabled",e);return $APP.Pg(b,
4
+ "inert",e)}return null},BI=function(a){if(!$APP.n($APP.k(a,"__xFieldsetRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:var(--x-color-border, #d1d5db);--x-fieldset-border-width:1px;--x-fieldset-border-radius:var(--x-radius-md, 8px);--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:var(--x-color-surface,transparent);--x-fieldset-legend-color:var(--x-color-text-muted,#374151);--x-fieldset-legend-font-size:var(--x-font-size-sm, 0.875rem);--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;--x-fieldset-input-bg:var(--x-color-surface,#ffffff);--x-fieldset-input-color:var(--x-color-text,#0f172a);--x-fieldset-input-border:var(--x-color-border,#d1d5db);--x-fieldset-input-radius:var(--x-radius-sm,0.375rem);--x-fieldset-input-focus:var(--x-color-focus-ring,#60a5fa);}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:var(--x-color-border, #374151);--x-fieldset-legend-color:var(--x-color-text-muted,#d1d5db);--x-fieldset-input-bg:var(--x-color-surface,#1f2937);--x-fieldset-input-color:var(--x-color-text,#e5e7eb);--x-fieldset-input-border:var(--x-color-border,#374151);--x-fieldset-input-focus:var(--x-color-focus-ring,#93c5fd);}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
5
+ d.setAttribute("part","root");d.setAttribute("role","group");e.setAttribute("part","legend");e.setAttribute("id","x-fieldset-legend");g.setAttribute("part","content");g.appendChild(h);d.appendChild(e);d.appendChild(g);b.appendChild(c);b.appendChild(d);$APP.n(document.getElementById("x-fieldset-input-styles"))||(c=document.createElement("style"),c.setAttribute("id","x-fieldset-input-styles"),c.textContent="x-fieldset input,x-fieldset select,x-fieldset textarea{background:var(--x-fieldset-input-bg);color:var(--x-fieldset-input-color);border:1px solid var(--x-fieldset-input-border);border-radius:var(--x-fieldset-input-radius);padding:0.5rem 0.75rem;font:inherit;outline:none;box-sizing:border-box;}x-fieldset input:focus,x-fieldset select:focus,x-fieldset textarea:focus{border-color:var(--x-fieldset-input-focus);box-shadow:0 0 0 2px var(--x-fieldset-input-focus);}",
6
+ document.head.appendChild(c));a.__xFieldsetRefs={root:b,"root-el":d,"legend-el":e,"content-el":g}}return AI(a)},CI=function(){return null},DI=function(a){return AI(a)},EI=function(a){$APP.Ug(a,"legend","legend");return $APP.Sg(a,"disabled","disabled")},GI=function(){return $APP.Lg("x-fieldset",new $APP.Q(null,5,[$APP.Cg,FI,$APP.Dg,BI,$APP.Eg,CI,$APP.Fg,DI,$APP.Jg,EI],null))},zI=new $APP.K(null,"legend-visible?","legend-visible?",-281107501),xI=new $APP.K(null,"legend-raw","legend-raw",907427195),
7
+ yI=new $APP.K(null,"legend","legend",-1027192245);var FI=["legend","disabled","aria-label","aria-describedby"];$APP.ha("baredom.exports.x_fieldset.init",GI);export const init=GI;
@@ -1,9 +1,8 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Kz=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Oz=function(a){a=new $APP.R(null,4,[Lz,a.getAttribute("href"),Mz,a.getAttribute("filename"),$APP.Nl,a.hasAttribute("disabled"),$APP.Uj,a.getAttribute("aria-label")],null);var b=$APP.M(a);a=$APP.D(b,Lz);var c=$APP.D(b,Mz),d=$APP.D(b,$APP.Nl);b=$APP.D(b,$APP.Uj);return new $APP.R(null,4,[$APP.$m,$APP.Og(a),Nz,$APP.n(c)?c:"",$APP.X,$APP.F(d),$APP.Pl,b],null)},Pz=function(a){var b=$APP.k(a,"__xFileDownloadRefs");if($APP.n(b)){b=
3
- $APP.k(b,"anchor-el");var c=Oz(a),d=$APP.$m.g(c),e=Nz.g(c),g=$APP.X.g(c);c=$APP.Pl.g(c);b.href=d;typeof e==="string"&&$APP.N(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return Kz(a,"data-disabled",g)}return null},Qz=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
- var c=Oz(a);c={href:$APP.$m.g(c),filename:Nz.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},Rz=function(a){var b=$APP.k(a,"__xFileDownloadHandlers"),c=$APP.k(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"anchor-el"),b=$APP.k(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},Sz=function(a,b,c){Object.defineProperty(a,
5
- b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Tz=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Kz(this,"disabled",$APP.F(b))}})},Vz=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",
6
- {get:function(){return Uz}});Sz(b,"href","href");Sz(b,"filename","filename");Tz(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFileDownloadRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("a"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:var(--x-color-primary,#2563eb);--x-file-download-color:var(--x-color-surface,#ffffff);--x-file-download-hover-bg:var(--x-color-primary-hover,#1d4ed8);--x-file-download-active-bg:var(--x-color-primary-active,#1e40af);--x-file-download-border-radius:var(--x-radius-md,6px);--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:var(--x-font-size-sm,0.875rem);--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background var(--x-transition-duration,120ms) ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:var(--x-color-primary,#3b82f6);--x-file-download-hover-bg:var(--x-color-primary-hover,#2563eb);--x-file-download-active-bg:var(--x-color-primary-active,#1d4ed8);--x-file-download-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
7
- e.setAttribute("part","anchor");g.setAttribute("part","icon");h.setAttribute("part","content");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
8
- h.appendChild(l);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}Rz(this);c=Qz(this);$APP.k($APP.k(this,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",c);this.__xFileDownloadHandlers={click:c};return Pz(this)};b.disconnectedCallback=function(){return Rz(this)};b.attributeChangedCallback=function(){return Pz(this)};return a},Wz=function(){return $APP.n(customElements.get("x-file-download"))?null:customElements.define("x-file-download",
9
- Vz())},Mz=new $APP.K(null,"filename-raw","filename-raw",-706184256),Lz=new $APP.K(null,"href-raw","href-raw",-1680949453),Nz=new $APP.K(null,"filename","filename",-1428840783);var Uz=["href","filename","disabled","aria-label"];$APP.Pd(["x-file-download-click",new $APP.R(null,2,[$APP.km,!0,$APP.V,new $APP.R(null,2,[$APP.$m,$APP.Y,Nz,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_file_download.init",Wz);export const init=Wz;
2
+ var CA=function(a){a=new $APP.Q(null,4,[zA,a.getAttribute("href"),AA,a.getAttribute("filename"),$APP.fm,a.hasAttribute("disabled"),$APP.pk,a.getAttribute("aria-label")],null);var b=$APP.M(a);a=$APP.D(b,zA);var c=$APP.D(b,AA),d=$APP.D(b,$APP.fm);b=$APP.D(b,$APP.pk);return new $APP.Q(null,4,[$APP.tn,$APP.eh(a),BA,$APP.n(c)?c:"",$APP.X,$APP.F(d),$APP.hm,b],null)},DA=function(a){var b=$APP.k(a,"__xFileDownloadRefs");if($APP.n(b)){b=$APP.k(b,"anchor-el");var c=CA(a),d=$APP.tn.g(c),e=BA.g(c),g=$APP.X.g(c);
3
+ c=$APP.hm.g(c);b.href=d;typeof e==="string"&&$APP.N(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return $APP.Pg(a,"data-disabled",g)}return null},EA=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
+ var c=CA(a);c={href:$APP.tn.g(c),filename:BA.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},FA=function(a){var b=$APP.k(a,"__xFileDownloadHandlers"),c=$APP.k(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.k(c,"anchor-el"),b=$APP.k(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},GA=function(a){if(!$APP.n($APP.k(a,"__xFileDownloadRefs"))){var b=
5
+ a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("a"),e=document.createElement("span"),g=document.createElement("span"),h=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:var(--x-color-primary,#2563eb);--x-file-download-color:var(--x-color-surface,#ffffff);--x-file-download-hover-bg:var(--x-color-primary-hover,#1d4ed8);--x-file-download-active-bg:var(--x-color-primary-active,#1e40af);--x-file-download-border-radius:var(--x-radius-md,6px);--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:var(--x-font-size-sm,0.875rem);--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background var(--x-transition-duration,120ms) ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:var(--x-color-primary,#3b82f6);--x-file-download-hover-bg:var(--x-color-primary-hover,#2563eb);--x-file-download-active-bg:var(--x-color-primary-active,#1d4ed8);--x-file-download-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
6
+ d.setAttribute("part","anchor");e.setAttribute("part","icon");g.setAttribute("part","content");e.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
7
+ g.appendChild(h);d.appendChild(e);d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__xFileDownloadRefs={"anchor-el":d,"icon-el":e,"content-el":g}}FA(a);b=EA(a);$APP.k($APP.k(a,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",b);a.__xFileDownloadHandlers={click:b};return DA(a)},HA=function(a){return FA(a)},IA=function(a){return DA(a)},JA=function(a){$APP.Tg(a,"href","href","");$APP.Tg(a,"filename","filename","");return $APP.Sg(a,"disabled","disabled")},LA=function(){return $APP.Lg("x-file-download",
8
+ new $APP.Q(null,5,[$APP.Cg,KA,$APP.Dg,GA,$APP.Eg,HA,$APP.Fg,IA,$APP.Jg,JA],null))},AA=new $APP.K(null,"filename-raw","filename-raw",-706184256),zA=new $APP.K(null,"href-raw","href-raw",-1680949453),BA=new $APP.K(null,"filename","filename",-1428840783);var KA=["href","filename","disabled","aria-label"];$APP.Pd(["x-file-download-click",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,2,[$APP.tn,$APP.Y,BA,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_file_download.init",LA);export const init=LA;
@@ -1,26 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Hv=function(a){return a!=null?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:null):null},Wv=function(a){var b=a.lastIndexOf(".");return b>0?a.substring(b).toLowerCase():null},Xv=function(a,b){if(b==null||$APP.B.i(b,""))return!0;var c=function(){var e=a.type;return $APP.n(e)?e:""}().toLowerCase(),d=Wv(a.name);b=$APP.ae.i($APP.Jg,$APP.Hg(b,/,/));return $APP.F($APP.Td(function(e){e=e.toLowerCase();return $APP.n(e.startsWith("."))?$APP.B.i(e,d):$APP.n(e.endsWith("/*"))?(e=e.substring(0,e.indexOf("/")),
3
- c.startsWith(""+$APP.T.g(e)+"/")):$APP.B.i(e,c)},b))},aw=function(a,b,c,d,e){a=$APP.t(a);for(var g=$APP.fe,h=$APP.fe;;){if($APP.r(a))return new $APP.R(null,2,[Yv,g,Zv,h],null);var l=$APP.u(a);var m=l;var p=b,q=c;m=$APP.Lg(p)&&!Xv(m,p)?new $APP.R(null,2,[$APP.Th,!1,$APP.Qi,"File type not accepted"],null):q!=null&&m.size>q?new $APP.R(null,2,[$APP.Th,!1,$APP.Qi,"File too large"],null):new $APP.R(null,2,[$APP.Th,!0,$APP.Qi,null],null);$APP.r($APP.Th.g(m))?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.R(null,2,
4
- [$v,l,$APP.Qi,$APP.Qi.g(m)],null))):d!=null&&e>=d?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.R(null,2,[$v,l,$APP.Qi,"Maximum files reached"],null))):(a=$APP.w(a),g=$APP.ld.i(g,l),e+=1)}},bw=function(a){return document.createElement(a)},kw=function(a){a=new $APP.R(null,7,[cw,a.getAttribute("accept"),dw,a.hasAttribute("multiple"),ew,a.getAttribute("max-size"),fw,a.getAttribute("max-files"),$APP.Nl,a.hasAttribute("disabled"),$APP.Nh,a.hasAttribute("required"),$APP.zl,a.getAttribute("name")],null);var b=$APP.M(a);
5
- a=$APP.D(b,cw);var c=$APP.D(b,dw),d=$APP.D(b,ew),e=$APP.D(b,fw),g=$APP.D(b,$APP.Nl),h=$APP.D(b,$APP.Nh);b=$APP.D(b,$APP.zl);return new $APP.R(null,7,[gw,$APP.n(a)?a:"",hw,$APP.F(c),iw,Hv(d),jw,Hv(e),$APP.X,$APP.F(g),$APP.mi,$APP.F(h),$APP.Aj,$APP.n(b)?b:""],null)},lw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){a=kw(a);var c=$APP.M(a);a=$APP.D(c,gw);var d=$APP.D(c,hw);c=$APP.D(c,$APP.X);var e=$APP.k(b,"fileInput");b=$APP.k(b,"dropZone");$APP.B.i(a,"")?e.removeAttribute("accept"):
6
- e.setAttribute("accept",a);$APP.n(d)?e.setAttribute("multiple",""):e.removeAttribute("multiple");b.setAttribute("tabindex",$APP.n(c)?"-1":"0");a=""+$APP.T.g(c);return b.setAttribute("aria-disabled",a)}return null},mw=function(a){a=$APP.t($APP.uc(a.querySelectorAll("[part\x3dthumbnail]")));for(var b=null,c=0,d=0;;)if(d<c){var e=b.F(null,d);URL.revokeObjectURL(e.src);d+=1}else if(a=$APP.t(a))b=a,$APP.Nc(b)?(a=$APP.yb(b),c=$APP.zb(b),b=a,e=$APP.z(a),a=c,c=e):(e=$APP.u(b),URL.revokeObjectURL(e.src),a=
7
- $APP.w(b),b=null,c=0),d=0;else return null},nw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){var c=$APP.k(b,"fileList");b=$APP.k(b,"liveRegion");a=$APP.k(a,"__xFileUploadFiles");var d=a.length;mw(c);c.textContent="";for(var e=0;;)if(e<d){var g=a[e],h=bw("div"),l=bw("span"),m=bw("span"),p=bw("button"),q=g.name;h.setAttribute("part","file-item");h.setAttribute("role","listitem");var v=g.type,x=typeof v==="string";$APP.n(x?v.startsWith("image/"):x)&&(v=bw("img"),v.setAttribute("part",
8
- "thumbnail"),v.src=URL.createObjectURL(g),v.setAttribute("alt",q),h.appendChild(v));l.setAttribute("part","file-name");l.textContent=q;m.setAttribute("part","file-size");v=m;g=g.size;g=g<1024?""+$APP.T.g(g)+" B":g<1048576?""+$APP.T.g((g/1024).toFixed(1))+" KB":g<1073741824?""+$APP.T.g((g/1048576).toFixed(1))+" MB":""+$APP.T.g((g/1073741824).toFixed(1))+" GB";v.textContent=g;p.setAttribute("part","remove");p.setAttribute("type","button");g=p;q="Remove "+$APP.T.g(q);g.setAttribute("aria-label",q);q=
9
- p;g=""+$APP.T.g(e);q.setAttribute("data-index",g);p.textContent="×";h.appendChild(l);h.appendChild(m);h.appendChild(p);c.appendChild(h);e+=1}else break;b.textContent=d===0?"":""+$APP.T.g(d)+" file"+$APP.T.g($APP.N(d,1)?"s":null)+" selected"}},ow=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadFiles");a=a.getAttribute("name");a=$APP.n(a)?a:"file";if(c.length===0)b.setFormValue(null);else{for(var d=new FormData,e=c.length,g=0;;)if(g<e)d.append(a,c[g]),
10
- g+=1;else break;b.setFormValue(d)}}},pw=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadRefs");if($APP.n(c)){var d=a.hasAttribute("required");a=$APP.k(a,"__xFileUploadFiles");c=$APP.k(c,"dropZone");return $APP.n($APP.n(d)?a.length===0:d)?b.setValidity({valueMissing:!0},"Please select a file.",c):b.setValidity({},"")}}return null},qw=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},rw=function(a,
11
- b){var c=kw(a);c=$APP.M(c);var d=$APP.D(c,gw),e=$APP.D(c,hw),g=$APP.D(c,iw),h=$APP.D(c,jw);c=$APP.k(a,"__xFileUploadFiles");b=aw($APP.uc(b),d,g,h,c.length);d=$APP.M(b);b=$APP.D(d,Yv);d=$APP.D(d,Zv);if($APP.n(e)){e=$APP.t(b);g=null;for(var l=h=0;;)if(l<h){var m=g.F(null,l);c.push(m);l+=1}else if(e=$APP.t(e))g=e,$APP.Nc(g)?(e=$APP.yb(g),l=$APP.zb(g),g=e,h=$APP.z(e),e=l):(e=$APP.u(g),c.push(e),e=$APP.w(g),g=null,h=0),l=0;else break}else c.length=0,$APP.t(b)&&c.push($APP.u(b));nw(a);ow(a);pw(a);return qw(a,
12
- "x-file-upload-select",{files:$APP.zd(b),rejected:$APP.zd($APP.ae.i(function(p){var q=$APP.M(p);p=$APP.D(q,$v);q=$APP.D(q,$APP.Qi);return{file:p,reason:q}},d))})},sw=function(a){return{zoneClick:function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.k(a,"__xFileUploadRefs");return $APP.n(b)?$APP.k(b,"fileInput").click():null},zoneKeydown:function(b){return($APP.B.i(b.key,"Enter")||$APP.B.i(b.key," "))&&$APP.r(a.hasAttribute("disabled"))?(b.preventDefault(),b=$APP.k(a,"__xFileUploadRefs"),
13
- $APP.n(b)?$APP.k(b,"fileInput").click():null):null},fileChange:function(b){b=b.target;var c=b.files;c.length>0&&rw(a,c);return b.value=""},dragenter:function(b){b.preventDefault();if($APP.n(a.hasAttribute("disabled")))return null;b=$APP.k(a,"__xFileUploadDragCtr")+1;a.__xFileUploadDragCtr=b;return $APP.B.i(b,1)?a.setAttribute("data-drag-over",""):null},dragover:function(b){b.preventDefault();return b.dataTransfer.dropEffect="copy"},dragleave:function(){var b=$APP.k(a,"__xFileUploadDragCtr")-1;a.__xFileUploadDragCtr=
14
- b;return b<=0?(a.__xFileUploadDragCtr=0,a.removeAttribute("data-drag-over")):null},drop:function(b){b.preventDefault();a.__xFileUploadDragCtr=0;a.removeAttribute("data-drag-over");if($APP.n(a.hasAttribute("disabled")))return null;b=b.dataTransfer.files;return b.length>0?rw(a,b):null},fileListClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-index"))?b:b.closest("[data-index]");if($APP.n(b)){b=parseInt(b.getAttribute("data-index"),10);if($APP.n(isNaN(b)))b=null;else{var c=$APP.k(a,"__xFileUploadFiles"),
15
- d=c[b];c.splice(b,1);nw(a);ow(a);pw(a);b=qw(a,"x-file-upload-remove",{file:d,remaining:c.slice()})}return b}return null}}},tw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)&&(a=$APP.k(a,"__xFileUploadHandlers"),$APP.n(a))){var c=$APP.k(b,"dropZone"),d=$APP.k(b,"fileInput");b=$APP.k(b,"fileList");c.removeEventListener("click",$APP.k(a,"zoneClick"));c.removeEventListener("keydown",$APP.k(a,"zoneKeydown"));c.removeEventListener("dragenter",$APP.k(a,"dragenter"));c.removeEventListener("dragover",
16
- $APP.k(a,"dragover"));c.removeEventListener("dragleave",$APP.k(a,"dragleave"));c.removeEventListener("drop",$APP.k(a,"drop"));d.removeEventListener("change",$APP.k(a,"fileChange"));b.removeEventListener("click",$APP.k(a,"fileListClick"))}},uw=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.Eg(this,c,$APP.F(d))}})},vw=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=
17
- this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},ww=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return d!=null?(d=parseInt(d,10),$APP.n(isNaN(d))?null:d):null},set:function(d){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},yw=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=
18
- !0;Object.defineProperty(a,"observedAttributes",{get:function(){return xw}});vw(b,"accept","accept");vw(b,"name","name");uw(b,"multiple","multiple");uw(b,"disabled","disabled");uw(b,"required","required");ww(b,"maxSize","max-size");ww(b,"maxFiles","max-files");Object.defineProperty(b,"files",{configurable:!0,enumerable:!0,get:function(){var c=$APP.k(this,"__xFileUploadFiles");return($APP.n(c)?c:[]).slice()}});b.checkValidity=function(){var c=$APP.k(this,"__xFileUploadInternals");return $APP.n(c)?
19
- c.checkValidity():null};b.reportValidity=function(){var c=$APP.k(this,"__xFileUploadInternals");return $APP.n(c)?c.reportValidity():null};b.formDisabledCallback=function(c){$APP.Eg(this,"disabled",c);return lw(this)};b.formResetCallback=function(){$APP.k(this,"__xFileUploadFiles").length=0;var c=$APP.k(this,"__xFileUploadRefs");$APP.n(c)&&mw($APP.k(c,"fileList"));nw(this);ow(this);return pw(this)};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xFileUploadRefs"))){var c=this.attachShadow({mode:"open"}),
20
- d=bw("style"),e=bw("div"),g=bw("input"),h=bw("div"),l=bw("slot"),m=bw("div"),p=bw("div"),q=bw("div");d.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-file-upload-bg:var(--x-color-surface,#ffffff);--x-file-upload-fg:var(--x-color-text,#0f172a);--x-file-upload-muted:var(--x-color-text-muted,#64748b);--x-file-upload-border:2px dashed var(--x-color-border,#cbd5e1);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#3b82f6);--x-file-upload-drag-bg:var(--x-color-primary,rgba(59,130,246,0.05));--x-file-upload-radius:var(--x-radius-md,8px);--x-file-upload-padding:var(--x-space-lg,24px);--x-file-upload-font-size:var(--x-font-size-sm,0.9375rem);--x-file-upload-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-upload-disabled-opacity:var(--x-opacity-disabled,0.55);--x-file-upload-transition-duration:var(--x-transition-duration,150ms);--x-file-upload-item-bg:var(--x-color-surface,#f8fafc);--x-file-upload-item-border:1px solid var(--x-color-border,#e2e8f0);--x-file-upload-thumb-size:48px;--x-file-upload-remove-color:var(--x-color-text-muted,#64748b);--x-file-upload-remove-hover:var(--x-color-danger,#ef4444);}@media (prefers-color-scheme:dark){:host{--x-file-upload-bg:var(--x-color-surface,#1e293b);--x-file-upload-fg:var(--x-color-text,#e2e8f0);--x-file-upload-muted:var(--x-color-text-muted,#94a3b8);--x-file-upload-border:2px dashed var(--x-color-border,#334155);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#60a5fa);--x-file-upload-drag-bg:rgba(96,165,250,0.08);--x-file-upload-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-file-upload-item-bg:var(--x-color-surface,#1e293b);--x-file-upload-item-border:1px solid var(--x-color-border,#334155);--x-file-upload-remove-color:var(--x-color-text-muted,#94a3b8);}}[part\x3ddrop-zone]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;padding:var(--x-file-upload-padding);background:var(--x-file-upload-bg);border:var(--x-file-upload-border);border-radius:var(--x-file-upload-radius);cursor:pointer;text-align:center;color:var(--x-file-upload-muted);font-size:var(--x-file-upload-font-size);font-family:inherit;transition:border-color var(--x-file-upload-transition-duration) ease,background var(--x-file-upload-transition-duration) ease;}[part\x3ddrop-zone]:hover{border:var(--x-file-upload-border-hover);}[part\x3ddrop-zone]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}:host([data-drag-over]) [part\x3ddrop-zone]{border:var(--x-file-upload-border-hover);background:var(--x-file-upload-drag-bg);}:host([data-drag-over]) [part\x3dcontent]{visibility:hidden;}:host([data-drag-over]) [part\x3ddrag-overlay]{display:flex;}[part\x3ddrag-overlay]{display:none;position:absolute;inset:0;align-items:center;justify-content:center;border-radius:var(--x-file-upload-radius);font-weight:600;color:var(--x-color-primary,#3b82f6);pointer-events:none;}:host([disabled]){pointer-events:none;cursor:default;}:host([disabled]) [part\x3ddrop-zone]{opacity:var(--x-file-upload-disabled-opacity);}[part\x3dfile-list]{display:flex;flex-direction:column;gap:8px;margin-top:12px;}[part\x3dfile-list]:empty{display:none;}[part\x3dfile-item]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--x-file-upload-item-bg);border:var(--x-file-upload-item-border);border-radius:6px;font-size:var(--x-file-upload-font-size);font-family:inherit;color:var(--x-file-upload-fg);}[part\x3dthumbnail]{width:var(--x-file-upload-thumb-size);height:var(--x-file-upload-thumb-size);object-fit:cover;border-radius:4px;flex-shrink:0;}[part\x3dfile-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dfile-size]{color:var(--x-file-upload-muted);font-size:0.8125rem;flex-shrink:0;}[part\x3dremove]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1rem;color:var(--x-file-upload-remove-color);cursor:pointer;border-radius:4px;flex-shrink:0;}[part\x3dremove]:hover{color:var(--x-file-upload-remove-hover);}[part\x3dremove]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}[part\x3dlive-region]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}input[type\x3dfile]{display:none;}@media (prefers-reduced-motion:reduce){[part\x3ddrop-zone]{transition:none !important;}}@media (pointer:coarse){[part\x3ddrop-zone]{min-height:140px;}[part\x3dremove]{width:2.75rem;height:2.75rem;}}";
21
- e.setAttribute("part","drop-zone");e.setAttribute("role","button");e.setAttribute("tabindex","0");g.setAttribute("type","file");g.setAttribute("aria-hidden","true");g.setAttribute("tabindex","-1");h.setAttribute("part","content");h.appendChild(l);m.setAttribute("part","drag-overlay");m.setAttribute("hidden","");m.textContent="Drop files here";p.setAttribute("part","file-list");p.setAttribute("role","list");q.setAttribute("part","live-region");q.setAttribute("aria-live","polite");q.setAttribute("aria-atomic",
22
- "true");e.appendChild(g);e.appendChild(h);e.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(p);c.appendChild(q);this.__xFileUploadFiles=[];this.__xFileUploadDragCtr=0;this.__xFileUploadRefs={dropZone:e,fileInput:g,content:h,dragOverlay:m,fileList:p,liveRegion:q}}c=this.attachInternals;$APP.n($APP.n(c)?$APP.r($APP.k(this,"__xFileUploadInternals")):c)&&(this.__xFileUploadInternals=this.attachInternals());tw(this);this.__xFileUploadHandlers=sw(this);g=$APP.k(this,"__xFileUploadRefs");
23
- $APP.n(g)&&(c=$APP.k(this,"__xFileUploadHandlers"),$APP.n(c)&&(d=$APP.k(g,"dropZone"),e=$APP.k(g,"fileInput"),g=$APP.k(g,"fileList"),d.addEventListener("click",$APP.k(c,"zoneClick")),d.addEventListener("keydown",$APP.k(c,"zoneKeydown")),d.addEventListener("dragenter",$APP.k(c,"dragenter")),d.addEventListener("dragover",$APP.k(c,"dragover")),d.addEventListener("dragleave",$APP.k(c,"dragleave")),d.addEventListener("drop",$APP.k(c,"drop")),e.addEventListener("change",$APP.k(c,"fileChange")),g.addEventListener("click",
24
- $APP.k(c,"fileListClick"))));lw(this);return pw(this)};b.disconnectedCallback=function(){tw(this);var c=$APP.k(this,"__xFileUploadRefs");return $APP.n(c)?mw($APP.k(c,"fileList")):null};b.attributeChangedCallback=function(){return $APP.n($APP.k(this,"__xFileUploadRefs"))?lw(this):null};return a},zw=function(){return $APP.n(customElements.get("x-file-upload"))?null:customElements.define("x-file-upload",yw())},gw=new $APP.K(null,"accept","accept",1874130431),Zv=new $APP.K(null,"rejected","rejected",
25
- 231052999),Yv=new $APP.K(null,"accepted","accepted",-1953464374),ew=new $APP.K(null,"max-size-raw","max-size-raw",1536077032),iw=new $APP.K(null,"max-size","max-size",-874966132),hw=new $APP.K(null,"multiple?","multiple?",-490002283),cw=new $APP.K(null,"accept-raw","accept-raw",1407413888),jw=new $APP.K(null,"max-files","max-files",534742526),dw=new $APP.K(null,"multiple-present?","multiple-present?",-1754894397),$v=new $APP.K(null,"file","file",-1269645878),fw=new $APP.K(null,"max-files-raw","max-files-raw",
26
- -244409320);var xw="accept multiple max-size max-files disabled required name".split(" ");$APP.Pd(["x-file-upload-select",new $APP.R(null,2,[$APP.km,!1,$APP.V,new $APP.R(null,2,[new $APP.K(null,"files","files",-472457450),$APP.Si,Zv,$APP.Si],null)],null),"x-file-upload-remove",new $APP.R(null,2,[$APP.km,!1,$APP.V,new $APP.R(null,2,[$v,$APP.il,new $APP.K(null,"remaining","remaining",-138926777),$APP.Si],null)],null)]);$APP.ha("baredom.exports.x_file_upload.init",zw);export const init=zw;
2
+ var Cw=function(a){return a!=null?(a=parseInt(a,10),$APP.q(isNaN(a))&&a>0?a:null):null},Dw=function(a){var b=a.lastIndexOf(".");return b>0?a.substring(b).toLowerCase():null},Ew=function(a,b){if(b==null||$APP.B.i(b,""))return!0;var c=function(){var e=a.type;return $APP.n(e)?e:""}().toLowerCase(),d=Dw(a.name);b=$APP.$d.i($APP.$g,$APP.Yg(b,/,/));return $APP.F($APP.Td(function(e){e=e.toLowerCase();return $APP.n(e.startsWith("."))?$APP.B.i(e,d):$APP.n(e.endsWith("/*"))?(e=e.substring(0,e.indexOf("/")),
3
+ c.startsWith(""+$APP.S.g(e)+"/")):$APP.B.i(e,c)},b))},Iw=function(a,b,c,d,e){a=$APP.t(a);for(var g=$APP.ee,h=$APP.ee;;){if($APP.q(a))return new $APP.Q(null,2,[Fw,g,Gw,h],null);var l=$APP.u(a);var m=l;var p=b,r=c;m=$APP.bh(p)&&!Ew(m,p)?new $APP.Q(null,2,[$APP.oi,!1,$APP.hj,"File type not accepted"],null):r!=null&&m.size>r?new $APP.Q(null,2,[$APP.oi,!1,$APP.hj,"File too large"],null):new $APP.Q(null,2,[$APP.oi,!0,$APP.hj,null],null);$APP.q($APP.oi.g(m))?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,
4
+ [Hw,l,$APP.hj,$APP.hj.g(m)],null))):d!=null&&e>=d?(a=$APP.w(a),h=$APP.ld.i(h,new $APP.Q(null,2,[Hw,l,$APP.hj,"Maximum files reached"],null))):(a=$APP.w(a),g=$APP.ld.i(g,l),e+=1)}},Jw=function(a){return document.createElement(a)},Sw=function(a){a=new $APP.Q(null,7,[Kw,a.getAttribute("accept"),Lw,a.hasAttribute("multiple"),Mw,a.getAttribute("max-size"),Nw,a.getAttribute("max-files"),$APP.fm,a.hasAttribute("disabled"),$APP.ei,a.hasAttribute("required"),$APP.Sl,a.getAttribute("name")],null);var b=$APP.M(a);
5
+ a=$APP.D(b,Kw);var c=$APP.D(b,Lw),d=$APP.D(b,Mw),e=$APP.D(b,Nw),g=$APP.D(b,$APP.fm),h=$APP.D(b,$APP.ei);b=$APP.D(b,$APP.Sl);return new $APP.Q(null,7,[Ow,$APP.n(a)?a:"",Pw,$APP.F(c),Qw,Cw(d),Rw,Cw(e),$APP.X,$APP.F(g),$APP.Ei,$APP.F(h),$APP.Sj,$APP.n(b)?b:""],null)},Tw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){a=Sw(a);var c=$APP.M(a);a=$APP.D(c,Ow);var d=$APP.D(c,Pw);c=$APP.D(c,$APP.X);var e=$APP.k(b,"fileInput");b=$APP.k(b,"dropZone");$APP.B.i(a,"")?e.removeAttribute("accept"):
6
+ e.setAttribute("accept",a);$APP.n(d)?e.setAttribute("multiple",""):e.removeAttribute("multiple");b.setAttribute("tabindex",$APP.n(c)?"-1":"0");return $APP.Og(b,"aria-disabled",""+$APP.S.g(c))}return null},Uw=function(a){a=$APP.t($APP.uc(a.querySelectorAll("[part\x3dthumbnail]")));for(var b=null,c=0,d=0;;)if(d<c){var e=b.F(null,d);URL.revokeObjectURL(e.src);d+=1}else if(a=$APP.t(a))b=a,$APP.Nc(b)?(a=$APP.xb(b),c=$APP.yb(b),b=a,e=$APP.z(a),a=c,c=e):(e=$APP.u(b),URL.revokeObjectURL(e.src),a=$APP.w(b),
7
+ b=null,c=0),d=0;else return null},Vw=function(a){var b=$APP.k(a,"__xFileUploadRefs");if($APP.n(b)){var c=$APP.k(b,"fileList");b=$APP.k(b,"liveRegion");a=$APP.k(a,"__xFileUploadFiles");var d=a.length;Uw(c);c.textContent="";for(var e=0;;)if(e<d){var g=a[e],h=Jw("div"),l=Jw("span"),m=Jw("span"),p=Jw("button"),r=g.name;h.setAttribute("part","file-item");h.setAttribute("role","listitem");var v=g.type,x=typeof v==="string";$APP.n(x?v.startsWith("image/"):x)&&(v=Jw("img"),v.setAttribute("part","thumbnail"),
8
+ v.src=URL.createObjectURL(g),v.setAttribute("alt",r),h.appendChild(v));l.setAttribute("part","file-name");l.textContent=r;m.setAttribute("part","file-size");v=m;g=g.size;g=g<1024?""+$APP.S.g(g)+" B":g<1048576?""+$APP.S.g((g/1024).toFixed(1))+" KB":g<1073741824?""+$APP.S.g((g/1048576).toFixed(1))+" MB":""+$APP.S.g((g/1073741824).toFixed(1))+" GB";v.textContent=g;p.setAttribute("part","remove");p.setAttribute("type","button");$APP.Og(p,"aria-label","Remove "+$APP.S.g(r));$APP.Og(p,"data-index",""+$APP.S.g(e));
9
+ p.textContent="×";h.appendChild(l);h.appendChild(m);h.appendChild(p);c.appendChild(h);e+=1}else break;b.textContent=d===0?"":""+$APP.S.g(d)+" file"+$APP.S.g($APP.N(d,1)?"s":null)+" selected"}},Ww=function(a){var b=$APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadFiles");a=a.getAttribute("name");a=$APP.n(a)?a:"file";if(c.length===0)b.setFormValue(null);else{for(var d=new FormData,e=c.length,g=0;;)if(g<e)d.append(a,c[g]),g+=1;else break;b.setFormValue(d)}}},Xw=function(a){var b=
10
+ $APP.k(a,"__xFileUploadInternals");if($APP.n(b)){var c=$APP.k(a,"__xFileUploadRefs");if($APP.n(c)){var d=a.hasAttribute("required");a=$APP.k(a,"__xFileUploadFiles");c=$APP.k(c,"dropZone");return $APP.n($APP.n(d)?a.length===0:d)?b.setValidity({valueMissing:!0},"Please select a file.",c):b.setValidity({},"")}}return null},Yw=function(a,b){var c=Sw(a);c=$APP.M(c);var d=$APP.D(c,Ow),e=$APP.D(c,Pw),g=$APP.D(c,Qw),h=$APP.D(c,Rw);c=$APP.k(a,"__xFileUploadFiles");b=Iw($APP.uc(b),d,g,h,c.length);d=$APP.M(b);
11
+ b=$APP.D(d,Fw);d=$APP.D(d,Gw);if($APP.n(e)){e=$APP.t(b);g=null;for(var l=h=0;;)if(l<h){var m=g.F(null,l);c.push(m);l+=1}else if(e=$APP.t(e))g=e,$APP.Nc(g)?(e=$APP.xb(g),l=$APP.yb(g),g=e,h=$APP.z(e),e=l):(e=$APP.u(g),c.push(e),e=$APP.w(g),g=null,h=0),l=0;else break}else c.length=0,$APP.t(b)&&c.push($APP.u(b));Vw(a);Ww(a);Xw(a);return $APP.Qg(a,"x-file-upload-select",{files:$APP.zd(b),rejected:$APP.zd($APP.$d.i(function(p){var r=$APP.M(p);p=$APP.D(r,Hw);r=$APP.D(r,$APP.hj);return{file:p,reason:r}},
12
+ d))})},Zw=function(a){return{zoneClick:function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.k(a,"__xFileUploadRefs");return $APP.n(b)?$APP.k(b,"fileInput").click():null},zoneKeydown:function(b){return($APP.B.i(b.key,"Enter")||$APP.B.i(b.key," "))&&$APP.q(a.hasAttribute("disabled"))?(b.preventDefault(),b=$APP.k(a,"__xFileUploadRefs"),$APP.n(b)?$APP.k(b,"fileInput").click():null):null},fileChange:function(b){b=b.target;var c=b.files;c.length>0&&Yw(a,c);return b.value=""},dragenter:function(b){b.preventDefault();
13
+ if($APP.n(a.hasAttribute("disabled")))return null;b=$APP.k(a,"__xFileUploadDragCtr")+1;a.__xFileUploadDragCtr=b;return $APP.B.i(b,1)?a.setAttribute("data-drag-over",""):null},dragover:function(b){b.preventDefault();return b.dataTransfer.dropEffect="copy"},dragleave:function(){var b=$APP.k(a,"__xFileUploadDragCtr")-1;a.__xFileUploadDragCtr=b;return b<=0?(a.__xFileUploadDragCtr=0,a.removeAttribute("data-drag-over")):null},drop:function(b){b.preventDefault();a.__xFileUploadDragCtr=0;a.removeAttribute("data-drag-over");
14
+ if($APP.n(a.hasAttribute("disabled")))return null;b=b.dataTransfer.files;return b.length>0?Yw(a,b):null},fileListClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-index"))?b:b.closest("[data-index]");if($APP.n(b)){b=parseInt(b.getAttribute("data-index"),10);if($APP.n(isNaN(b)))b=null;else{var c=$APP.k(a,"__xFileUploadFiles"),d=c[b];c.splice(b,1);Vw(a);Ww(a);Xw(a);b=$APP.Qg(a,"x-file-upload-remove",{file:d,remaining:c.slice()})}return b}return null}}},$w=function(a){var b=$APP.k(a,"__xFileUploadRefs");
15
+ if($APP.n(b)&&(a=$APP.k(a,"__xFileUploadHandlers"),$APP.n(a))){var c=$APP.k(b,"dropZone"),d=$APP.k(b,"fileInput");b=$APP.k(b,"fileList");c.removeEventListener("click",$APP.k(a,"zoneClick"));c.removeEventListener("keydown",$APP.k(a,"zoneKeydown"));c.removeEventListener("dragenter",$APP.k(a,"dragenter"));c.removeEventListener("dragover",$APP.k(a,"dragover"));c.removeEventListener("dragleave",$APP.k(a,"dragleave"));c.removeEventListener("drop",$APP.k(a,"drop"));d.removeEventListener("change",$APP.k(a,
16
+ "fileChange"));b.removeEventListener("click",$APP.k(a,"fileListClick"))}},ax=function(a){if(!$APP.n($APP.k(a,"__xFileUploadRefs"))){var b=a.attachShadow({mode:"open"}),c=Jw("style"),d=Jw("div"),e=Jw("input"),g=Jw("div"),h=Jw("slot"),l=Jw("div"),m=Jw("div"),p=Jw("div");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-file-upload-bg:var(--x-color-surface,#ffffff);--x-file-upload-fg:var(--x-color-text,#0f172a);--x-file-upload-muted:var(--x-color-text-muted,#64748b);--x-file-upload-border:2px dashed var(--x-color-border,#cbd5e1);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#3b82f6);--x-file-upload-drag-bg:var(--x-color-primary,rgba(59,130,246,0.05));--x-file-upload-radius:var(--x-radius-md,8px);--x-file-upload-padding:var(--x-space-lg,24px);--x-file-upload-font-size:var(--x-font-size-sm,0.9375rem);--x-file-upload-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-file-upload-disabled-opacity:var(--x-opacity-disabled,0.55);--x-file-upload-transition-duration:var(--x-transition-duration,150ms);--x-file-upload-item-bg:var(--x-color-surface,#f8fafc);--x-file-upload-item-border:1px solid var(--x-color-border,#e2e8f0);--x-file-upload-thumb-size:48px;--x-file-upload-remove-color:var(--x-color-text-muted,#64748b);--x-file-upload-remove-hover:var(--x-color-danger,#ef4444);}@media (prefers-color-scheme:dark){:host{--x-file-upload-bg:var(--x-color-surface,#1e293b);--x-file-upload-fg:var(--x-color-text,#e2e8f0);--x-file-upload-muted:var(--x-color-text-muted,#94a3b8);--x-file-upload-border:2px dashed var(--x-color-border,#334155);--x-file-upload-border-hover:2px dashed var(--x-color-primary,#60a5fa);--x-file-upload-drag-bg:rgba(96,165,250,0.08);--x-file-upload-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-file-upload-item-bg:var(--x-color-surface,#1e293b);--x-file-upload-item-border:1px solid var(--x-color-border,#334155);--x-file-upload-remove-color:var(--x-color-text-muted,#94a3b8);}}[part\x3ddrop-zone]{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;padding:var(--x-file-upload-padding);background:var(--x-file-upload-bg);border:var(--x-file-upload-border);border-radius:var(--x-file-upload-radius);cursor:pointer;text-align:center;color:var(--x-file-upload-muted);font-size:var(--x-file-upload-font-size);font-family:inherit;transition:border-color var(--x-file-upload-transition-duration) ease,background var(--x-file-upload-transition-duration) ease;}[part\x3ddrop-zone]:hover{border:var(--x-file-upload-border-hover);}[part\x3ddrop-zone]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}:host([data-drag-over]) [part\x3ddrop-zone]{border:var(--x-file-upload-border-hover);background:var(--x-file-upload-drag-bg);}:host([data-drag-over]) [part\x3dcontent]{visibility:hidden;}:host([data-drag-over]) [part\x3ddrag-overlay]{display:flex;}[part\x3ddrag-overlay]{display:none;position:absolute;inset:0;align-items:center;justify-content:center;border-radius:var(--x-file-upload-radius);font-weight:600;color:var(--x-color-primary,#3b82f6);pointer-events:none;}:host([disabled]){pointer-events:none;cursor:default;}:host([disabled]) [part\x3ddrop-zone]{opacity:var(--x-file-upload-disabled-opacity);}[part\x3dfile-list]{display:flex;flex-direction:column;gap:8px;margin-top:12px;}[part\x3dfile-list]:empty{display:none;}[part\x3dfile-item]{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--x-file-upload-item-bg);border:var(--x-file-upload-item-border);border-radius:6px;font-size:var(--x-file-upload-font-size);font-family:inherit;color:var(--x-file-upload-fg);}[part\x3dthumbnail]{width:var(--x-file-upload-thumb-size);height:var(--x-file-upload-thumb-size);object-fit:cover;border-radius:4px;flex-shrink:0;}[part\x3dfile-name]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dfile-size]{color:var(--x-file-upload-muted);font-size:0.8125rem;flex-shrink:0;}[part\x3dremove]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1rem;color:var(--x-file-upload-remove-color);cursor:pointer;border-radius:4px;flex-shrink:0;}[part\x3dremove]:hover{color:var(--x-file-upload-remove-hover);}[part\x3dremove]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-file-upload-focus-ring);}[part\x3dlive-region]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}input[type\x3dfile]{display:none;}@media (prefers-reduced-motion:reduce){[part\x3ddrop-zone]{transition:none !important;}}@media (pointer:coarse){[part\x3ddrop-zone]{min-height:140px;}[part\x3dremove]{width:2.75rem;height:2.75rem;}}";
17
+ d.setAttribute("part","drop-zone");d.setAttribute("role","button");d.setAttribute("tabindex","0");e.setAttribute("type","file");e.setAttribute("aria-hidden","true");e.setAttribute("tabindex","-1");g.setAttribute("part","content");g.appendChild(h);l.setAttribute("part","drag-overlay");l.setAttribute("hidden","");l.textContent="Drop files here";m.setAttribute("part","file-list");m.setAttribute("role","list");p.setAttribute("part","live-region");p.setAttribute("aria-live","polite");p.setAttribute("aria-atomic",
18
+ "true");d.appendChild(e);d.appendChild(g);d.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(m);b.appendChild(p);a.__xFileUploadFiles=[];a.__xFileUploadDragCtr=0;a.__xFileUploadRefs={dropZone:d,fileInput:e,content:g,dragOverlay:l,fileList:m,liveRegion:p}}b=a.attachInternals;$APP.n($APP.n(b)?$APP.q($APP.k(a,"__xFileUploadInternals")):b)&&(b=a.attachInternals(),a.__xFileUploadInternals=b);$w(a);a.__xFileUploadHandlers=Zw(a);e=$APP.k(a,"__xFileUploadRefs");$APP.n(e)&&(b=$APP.k(a,"__xFileUploadHandlers"),
19
+ $APP.n(b)&&(c=$APP.k(e,"dropZone"),d=$APP.k(e,"fileInput"),e=$APP.k(e,"fileList"),c.addEventListener("click",$APP.k(b,"zoneClick")),c.addEventListener("keydown",$APP.k(b,"zoneKeydown")),c.addEventListener("dragenter",$APP.k(b,"dragenter")),c.addEventListener("dragover",$APP.k(b,"dragover")),c.addEventListener("dragleave",$APP.k(b,"dragleave")),c.addEventListener("drop",$APP.k(b,"drop")),d.addEventListener("change",$APP.k(b,"fileChange")),e.addEventListener("click",$APP.k(b,"fileListClick"))));Tw(a);
20
+ return Xw(a)},bx=function(a){$w(a);a=$APP.k(a,"__xFileUploadRefs");return $APP.n(a)?Uw($APP.k(a,"fileList")):null},cx=function(a){return $APP.n($APP.k(a,"__xFileUploadRefs"))?Tw(a):null},dx=function(a,b){$APP.Pg(a,"disabled",b);return Tw(a)},ex=function(a){$APP.k(a,"__xFileUploadFiles").length=0;var b=$APP.k(a,"__xFileUploadRefs");$APP.n(b)&&Uw($APP.k(b,"fileList"));Vw(a);Ww(a);return Xw(a)},fx=function(a){$APP.Ug(a,"accept","accept");$APP.Ug(a,"name","name");$APP.Sg(a,"multiple","multiple");$APP.Sg(a,
21
+ "disabled","disabled");$APP.Sg(a,"required","required");$APP.Vg(a,"maxSize","max-size",0);$APP.Vg(a,"maxFiles","max-files",0);Object.defineProperty(a,"files",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xFileUploadFiles");return($APP.n(b)?b:[]).slice()}});a.checkValidity=function(){var b=$APP.k(this,"__xFileUploadInternals");return $APP.n(b)?b.checkValidity():null};return a.reportValidity=function(){var b=$APP.k(this,"__xFileUploadInternals");return $APP.n(b)?b.reportValidity():
22
+ null}},hx=function(){return $APP.Lg("x-file-upload",new $APP.Q(null,8,[$APP.Cg,gx,$APP.Dg,ax,$APP.Eg,bx,$APP.Fg,cx,$APP.Gg,!0,$APP.Hg,dx,$APP.Ig,ex,$APP.Jg,fx],null))},Ow=new $APP.K(null,"accept","accept",1874130431),Gw=new $APP.K(null,"rejected","rejected",231052999),Fw=new $APP.K(null,"accepted","accepted",-1953464374),Mw=new $APP.K(null,"max-size-raw","max-size-raw",1536077032),Qw=new $APP.K(null,"max-size","max-size",-874966132),Pw=new $APP.K(null,"multiple?","multiple?",-490002283),Kw=new $APP.K(null,
23
+ "accept-raw","accept-raw",1407413888),Rw=new $APP.K(null,"max-files","max-files",534742526),Lw=new $APP.K(null,"multiple-present?","multiple-present?",-1754894397),Hw=new $APP.K(null,"file","file",-1269645878),Nw=new $APP.K(null,"max-files-raw","max-files-raw",-244409320);var gx="accept multiple max-size max-files disabled required name".split(" ");$APP.Pd(["x-file-upload-select",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[new $APP.K(null,"files","files",-472457450),$APP.jj,Gw,$APP.jj],null)],null),"x-file-upload-remove",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,new $APP.Q(null,2,[Hw,$APP.Bl,new $APP.K(null,"remaining","remaining",-138926777),$APP.jj],null)],null)]);$APP.ha("baredom.exports.x_file_upload.init",hx);export const init=hx;