@vanelsas/baredom 2.3.0 → 2.3.1

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 (92) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +3 -3
  3. package/dist/base.js +163 -158
  4. package/dist/x-alert.js +17 -17
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +14 -14
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +15 -15
  12. package/dist/x-cancel-dialogue.js +15 -15
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-carousel.js +28 -28
  15. package/dist/x-chart.js +46 -46
  16. package/dist/x-checkbox.js +11 -11
  17. package/dist/x-chip.js +8 -8
  18. package/dist/x-collapse.js +10 -10
  19. package/dist/x-color-picker.js +41 -41
  20. package/dist/x-combobox.js +24 -24
  21. package/dist/x-command-palette.js +24 -24
  22. package/dist/x-container.js +6 -6
  23. package/dist/x-context-menu.js +18 -20
  24. package/dist/x-copy.js +21 -21
  25. package/dist/x-currency-field.js +21 -21
  26. package/dist/x-date-picker.js +37 -37
  27. package/dist/x-divider.js +8 -8
  28. package/dist/x-drawer.js +11 -11
  29. package/dist/x-dropdown.js +9 -9
  30. package/dist/x-fieldset.js +5 -5
  31. package/dist/x-file-download.js +7 -7
  32. package/dist/x-form-field.js +15 -15
  33. package/dist/x-form.js +9 -9
  34. package/dist/x-gaussian-blur.js +18 -18
  35. package/dist/x-grid.js +6 -6
  36. package/dist/x-icon.js +7 -7
  37. package/dist/x-image.js +18 -18
  38. package/dist/x-kinetic-font.js +28 -28
  39. package/dist/x-kinetic-typography.js +37 -37
  40. package/dist/x-liquid-dock.js +35 -35
  41. package/dist/x-liquid-fill.js +39 -39
  42. package/dist/x-liquid-glass.js +39 -39
  43. package/dist/x-menu-item.js +10 -10
  44. package/dist/x-menu.js +10 -10
  45. package/dist/x-metaball-cursor.js +27 -27
  46. package/dist/x-modal.js +11 -11
  47. package/dist/x-morph-stack.js +39 -39
  48. package/dist/x-navbar.js +13 -13
  49. package/dist/x-neural-glow.js +30 -30
  50. package/dist/x-notification-center.js +10 -10
  51. package/dist/x-organic-divider.js +15 -15
  52. package/dist/x-organic-progress.js +35 -35
  53. package/dist/x-organic-shape.js +12 -12
  54. package/dist/x-pagination.js +16 -16
  55. package/dist/x-particle-button.js +47 -47
  56. package/dist/x-popover.js +24 -14
  57. package/dist/x-progress-circle.js +7 -7
  58. package/dist/x-progress.js +7 -7
  59. package/dist/x-radio.js +11 -11
  60. package/dist/x-ripple-effect.js +11 -11
  61. package/dist/x-scroll-parallax.js +17 -17
  62. package/dist/x-scroll-stack.js +18 -18
  63. package/dist/x-scroll-story.js +33 -33
  64. package/dist/x-scroll-timeline.js +45 -45
  65. package/dist/x-scroll.js +40 -40
  66. package/dist/x-search-field.js +14 -14
  67. package/dist/x-select.js +9 -9
  68. package/dist/x-sidebar.js +16 -16
  69. package/dist/x-skeleton-group.js +13 -13
  70. package/dist/x-skeleton.js +1 -1
  71. package/dist/x-slider.js +16 -16
  72. package/dist/x-soft-body.js +20 -20
  73. package/dist/x-spacer.js +5 -5
  74. package/dist/x-spinner.js +5 -5
  75. package/dist/x-splash.js +13 -13
  76. package/dist/x-stat.js +9 -9
  77. package/dist/x-stepper.js +15 -15
  78. package/dist/x-switch.js +10 -10
  79. package/dist/x-tab.js +7 -7
  80. package/dist/x-table-cell.js +19 -19
  81. package/dist/x-table-row.js +10 -10
  82. package/dist/x-table.js +13 -13
  83. package/dist/x-tabs.js +11 -11
  84. package/dist/x-text-area.js +17 -17
  85. package/dist/x-theme.js +24 -24
  86. package/dist/x-timeline-item.js +21 -21
  87. package/dist/x-timeline.js +9 -9
  88. package/dist/x-toast.js +22 -22
  89. package/dist/x-toaster.js +8 -8
  90. package/dist/x-tooltip.js +12 -12
  91. package/dist/x-typography.js +8 -8
  92. package/package.json +1 -1
@@ -1,28 +1,28 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var nu=function(a){return a==null?!0:$APP.N(a,"false")},ou=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},ru=function(a){if(a==null||$APP.r($APP.ma(a)))return $APP.fe;for(var b=a.length,c=0,d=$APP.rb($APP.fe);;){if($APP.C.i(c,b))return $APP.tb(d);var e=a[c],g=""+$APP.T.g(function(){var A=e.id;return $APP.n(A)?A:c}()),h=""+$APP.T.g(function(){var A=e.label;return $APP.n(A)?A:""}()),l=ou(e.group),m=e.value,p=e.icon,q=$APP.C.i(!0,e.disabled),v=e.keywords;v=$APP.n($APP.ma(v))?
3
- v.join(" "):typeof v==="string"?v:"";var x=function(){var A=l;return $APP.n(A)?A:""}(),y=typeof m==="string"?m:"";x=(""+$APP.T.g(h)+" "+$APP.T.g(v)+" "+$APP.T.g(x)+" "+$APP.T.g(y)).toLowerCase();v=c+1;d=$APP.Cd(d,new $APP.Q(null,7,[$APP.fl,g,$APP.U,h,pu,l,$APP.Pi,m,$APP.Dk,p,$APP.X,q,qu,x],null));c=v}},tu=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.N(b,"")?$APP.Yd(ou,$APP.Hg(b,/\s+/)):null;if($APP.Hc(c))return new $APP.Q(null,2,[$APP.sl,a,su,$APP.We.i($APP.Tf,$APP.Yd(pu,a))],null);
4
- a=$APP.he(function(d){return $APP.Td(function(e){return $APP.N(-1,qu.g(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.Q(null,2,[$APP.sl,a,su,$APP.We.i($APP.Tf,$APP.Yd(pu,a))],null)},uu=function(a,b,c){var d=$APP.z(a);if(d>0)for(var e=1;;)if(e<=d){var g=$APP.fd(b+e*c,d),h=$APP.Ac(a,g,null),l=h;h=$APP.n(l)?$APP.r($APP.X.g(h)):l;if($APP.n(h))return g;e+=1}else return null;else return null},Vu=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.xi);var c=$APP.D(b,$APP.Gi),d=$APP.D(b,$APP.ki),e=$APP.D(b,
5
- vu),g=$APP.D(b,wu),h=$APP.D(b,Lu),l=$APP.D(b,Mu),m=$APP.D(b,Nu),p=$APP.D(b,Ou);b=$APP.D(b,Pu);b=nu(b);p=nu(p);m=$APP.Ig(m);m=b&&!m;g=g!=null?$APP.Ig(g):m;l=nu(l);return $APP.zf([$APP.Yl,$APP.Fi,Qu,Ru,Su,Tu,$APP.U,$APP.sm,Uu,$APP.X],[function(){var q=ou(c);return $APP.n(q)?q:"Search…"}(),p,function(){var q=ou(e);return $APP.n(q)?q:"No results"}(),g,l,m,ou(d),$APP.F(a),b,$APP.Ig(h)])},Wu=function(a){return document.createElement(a)},Xu=function(a){return Vu($APP.zf([$APP.ki,vu,wu,Lu,Mu,Nu,Ou,Pu,$APP.xi,
6
- $APP.Gi],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},Yu=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:$APP.F(c)});a.dispatchEvent(b);return b},Zu=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=$APP.k(b,
7
- "list"),d=$APP.k(b,"empty");b=$APP.k(b,"input");var e=function(){var q=$APP.k(a,"__xCommandPaletteQuery");return $APP.n(q)?q:""}(),g=ru($APP.k(a,"__xCommandPaletteItems"));e=tu(g,e);e=$APP.M(e);g=$APP.D(e,$APP.sl);e=function(){var q=$APP.k(a,"__xCommandPaletteActiveIdx");return $APP.n(q)?q:0}();c.textContent="";if($APP.Hc(g))return d.removeAttribute("hidden"),$APP.n(b)?b.removeAttribute("aria-activedescendant"):null;d.setAttribute("hidden","");d=$APP.Xd($APP.th,g);for(var h=null;;)if(g=$APP.u(d),
8
- $APP.n(g)){var l=g;g=$APP.Ac(l,0,null);l=$APP.Ac(l,1,null);var m=pu.g(l);if($APP.n(function(){var q=m;return $APP.n(q)?$APP.N(m,h):q}())){var p=Wu("div");p.setAttribute("part","group-header");p.setAttribute("aria-hidden","true");p.textContent=m;c.appendChild(p)}p=Wu("div");p.setAttribute("part","item");p.setAttribute("role","option");p.setAttribute("id","x-cp-item-"+$APP.T.g(g));p.setAttribute("data-id",""+$APP.T.g($APP.fl.g(l)));p.setAttribute("data-idx",""+$APP.T.g(g));p.setAttribute("tabindex",
9
- "-1");$APP.n($APP.X.g(l))&&p.setAttribute("aria-disabled","true");p.textContent=$APP.U.g(l);$APP.C.i(g,e)&&p.setAttribute("aria-selected","true");c.appendChild(p);d=$APP.Zb(d);h=g=function(){var q=m;return $APP.n(q)?q:h}()}else break;return $APP.n(b)?b.setAttribute("aria-activedescendant","x-cp-item-"+$APP.T.g(e)):null}return null},$u=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=Xu(a),d=$APP.k(b,"panel"),e=$APP.k(b,"input"),g=$APP.k(b,"overlay");b=$APP.k(b,"empty");var h=
10
- $APP.U.g(c),l=$APP.Yl.g(c),m=Qu.g(c);$APP.n(h)?d.setAttribute("aria-label",h):d.setAttribute("aria-label","Command palette");$APP.n(Tu.g(c))?g.removeAttribute("hidden"):g.setAttribute("hidden","");e.setAttribute("placeholder",l);e.setAttribute("aria-expanded",$APP.n($APP.sm.g(c))?"true":"false");$APP.n($APP.X.g(c))&&(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true"));$APP.n($APP.X.g(c))||(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"));b.textContent=m;return Zu(a)}return null},
11
- av=function(a){if($APP.n(a.hasAttribute("open")))return null;var b=Yu(a,"x-command-palette-open-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.setAttribute("open",""),b=$APP.k(a,"__xCommandPaletteRefs"),b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.focus(),$u(a),a=Yu(a,"x-command-palette-open",!1,{}));return a},bv=function(a){if($APP.n(a.hasAttribute("open"))){var b=Yu(a,"x-command-palette-close-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.removeAttribute("open"),b=$APP.k(a,"__xCommandPaletteRefs"),
12
- b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.removeAttribute("aria-activedescendant"),$u(a),a=Yu(a,"x-command-palette-close",!1,{}));return a}return null},cv=function(a){var b=$APP.k(a,"__xCommandPaletteQuery");b=$APP.n(b)?b:"";a=ru($APP.k(a,"__xCommandPaletteItems"));a=tu(a,b);a=$APP.M(a);return $APP.D(a,$APP.sl)},ev=function(a,b){var c=cv(a);var d=$APP.k(a,"__xCommandPaletteActiveIdx");d=$APP.n(d)?d:0;$APP.C.i(b,dv)?(c=uu(c,$APP.n(d)?d:-1,1),c=$APP.n(c)?c:0):(b=$APP.z(c),c=uu(c,$APP.n(d)?d:b,
13
- -1),c=$APP.n(c)?c:0);a.__xCommandPaletteActiveIdx=c;Zu(a);a=$APP.k(a,"__xCommandPaletteRefs");a=$APP.n(a)?$APP.k(a,"list"):null;a=$APP.n(a)?a.querySelector("[data-idx\x3d'"+$APP.T.g(c)+"']"):null;return $APP.n(a)?a.scrollIntoView({block:"nearest"}):null},gv=function(a,b){var c=b.key;return $APP.C.i(c,"ArrowDown")?(b.preventDefault(),ev(a,dv)):$APP.C.i(c,"ArrowUp")?(b.preventDefault(),ev(a,fv)):$APP.C.i(c,"Enter")?(b.preventDefault(),b=cv(a),c=$APP.k(a,"__xCommandPaletteActiveIdx"),b=$APP.Ac(b,$APP.n(c)?
14
- c:0,null),$APP.n($APP.n(b)?$APP.r($APP.X.g(b)):b)?(c=Yu(a,"x-command-palette-select-request",!0,{item:$APP.Dh(b)}),$APP.n(c.defaultPrevented)?a=null:(Yu(a,"x-command-palette-select",!1,{item:$APP.Dh(b)}),a=bv(a))):a=null,a):$APP.C.i(c,"Escape")?(b=Xu(a),$APP.n(Su.g(b))?bv(a):null):null},hv=function(a){function b(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;$APP.n(v)&&(v.value="");$APP.n(q)&&q.setAttribute("hidden","");a.__xCommandPaletteQuery=
15
- "";a.__xCommandPaletteActiveIdx=0;Yu(a,"x-command-palette-query-change",!1,{query:""});Zu(a);return $APP.n(v)?v.focus():null}function c(q){a:{q=q.target.closest("[part\x3ditem]");if($APP.n(q)){q=parseInt(q.getAttribute("data-idx"),10);var v=cv(a);q=$APP.Ac(v,q,null);if($APP.n($APP.n(q)?$APP.r($APP.X.g(q)):q)){v=Yu(a,"x-command-palette-select-request",!0,{item:$APP.Dh(q)});if($APP.n(v.defaultPrevented)){q=null;break a}Yu(a,"x-command-palette-select",!1,{item:$APP.Dh(q)});q=bv(a);break a}}q=null}return q}
16
- function d(){var q=Xu(a);return $APP.n(Ru.g(q))?bv(a):null}function e(q){return gv(a,q)}function g(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;v=$APP.n(v)?v.value:null;a.__xCommandPaletteQuery=$APP.n(v)?v:"";a.__xCommandPaletteActiveIdx=0;$APP.n(q)&&($APP.n($APP.n(v)?$APP.N(v,""):v)?q.removeAttribute("hidden"):q.setAttribute("hidden",""));Yu(a,"x-command-palette-query-change",!1,{query:$APP.n(v)?v:""});return Zu(a)}var h=$APP.k(a,
17
- "__xCommandPaletteRefs"),l=$APP.k(h,"input"),m=$APP.k(h,"overlay"),p=$APP.k(h,"list");h=$APP.k(h,"clear-btn");l.addEventListener("input",g);l.addEventListener("keydown",e);m.addEventListener("click",d);p.addEventListener("click",c);h.addEventListener("click",b);$APP.ja(a,"__xCommandPaletteHandlers",{input:g,keydown:e,scrim:d,list:c,clear:b})},iv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");a=$APP.k(a,"__xCommandPaletteHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,
18
- "overlay"),e=$APP.k(b,"list");b=$APP.k(b,"clear-btn");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));d.removeEventListener("click",$APP.k(a,"scrim"));e.removeEventListener("click",$APP.k(a,"list"));return b.removeEventListener("click",$APP.k(a,"clear"))}return null},jv=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},
19
- kv=function(a){Object.defineProperty(a,"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){this.__xCommandPaletteItems=b;this.__xCommandPaletteActiveIdx=0;return Zu(this)}})},lv=function(a){Object.defineProperty(a,"open",{configurable:!0,writable:!0,value:function(){return av(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return bv(this)}});Object.defineProperty(a,"toggle",
20
- {configurable:!0,writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?bv(this):av(this)}})},nv=function(){var a=class extends HTMLElement{};a.observedAttributes=mv;var b=a.prototype;jv(b,"open","open");jv(b,"disabled","disabled");kv(b);lv(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xCommandPaletteRefs"))){var c=this.attachShadow({mode:"open"}),d=Wu("style"),e=Wu("div"),g=Wu("div"),h=Wu("div"),l=Wu("span"),m=Wu("input"),p=Wu("button"),q=Wu("div"),v=Wu("div"),x=Wu("div");
2
+ var Yu=function(a){return a==null?!0:$APP.N(a,"false")},Zu=function(a){return typeof a==="string"?(a=a.trim(),$APP.N(a,"")?a:null):null},bv=function(a){if(a==null||$APP.r($APP.ma(a)))return $APP.fe;for(var b=a.length,c=0,d=$APP.rb($APP.fe);;){if($APP.C.i(c,b))return $APP.tb(d);var e=a[c],g=""+$APP.T.g(function(){var A=e.id;return $APP.n(A)?A:c}()),h=""+$APP.T.g(function(){var A=e.label;return $APP.n(A)?A:""}()),l=Zu(e.group),m=e.value,p=e.icon,q=$APP.C.i(!0,e.disabled),v=e.keywords;v=$APP.n($APP.ma(v))?
3
+ v.join(" "):typeof v==="string"?v:"";var x=function(){var A=l;return $APP.n(A)?A:""}(),y=typeof m==="string"?m:"";x=(""+$APP.T.g(h)+" "+$APP.T.g(v)+" "+$APP.T.g(x)+" "+$APP.T.g(y)).toLowerCase();v=c+1;d=$APP.Cd(d,new $APP.Q(null,7,[$APP.ll,g,$APP.U,h,$u,l,$APP.Ti,m,$APP.Jk,p,$APP.X,q,av,x],null));c=v}},dv=function(a,b){b=typeof b==="string"?b.trim():"";var c=$APP.N(b,"")?$APP.Yd(Zu,$APP.Hg(b,/\s+/)):null;if($APP.Hc(c))return new $APP.Q(null,2,[$APP.yl,a,cv,$APP.We.i($APP.Tf,$APP.Yd($u,a))],null);
4
+ a=$APP.he(function(d){return $APP.Td(function(e){return $APP.N(-1,av.g(d).indexOf(e.toLowerCase()))},c)},a);return new $APP.Q(null,2,[$APP.yl,a,cv,$APP.We.i($APP.Tf,$APP.Yd($u,a))],null)},ev=function(a,b,c){var d=$APP.z(a);if(d>0)for(var e=1;;)if(e<=d){var g=$APP.fd(b+e*c,d),h=$APP.Ac(a,g,null),l=h;h=$APP.n(l)?$APP.r($APP.X.g(h)):l;if($APP.n(h))return g;e+=1}else return null;else return null},rv=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Bi);var c=$APP.D(b,$APP.Ki),d=$APP.D(b,$APP.ni),e=$APP.D(b,
5
+ fv),g=$APP.D(b,gv),h=$APP.D(b,hv),l=$APP.D(b,iv),m=$APP.D(b,jv),p=$APP.D(b,kv);b=$APP.D(b,lv);b=Yu(b);p=Yu(p);m=$APP.Ig(m);m=b&&!m;g=g!=null?$APP.Ig(g):m;l=Yu(l);return $APP.zf([$APP.lm,$APP.Ji,mv,nv,ov,pv,$APP.U,$APP.zm,qv,$APP.X],[function(){var q=Zu(c);return $APP.n(q)?q:"Search…"}(),p,function(){var q=Zu(e);return $APP.n(q)?q:"No results"}(),g,l,m,Zu(d),$APP.F(a),b,$APP.Ig(h)])},sv=function(a){return document.createElement(a)},tv=function(a){return rv($APP.zf([$APP.ni,fv,gv,hv,iv,jv,kv,lv,$APP.Bi,
6
+ $APP.Ki],[a.getAttribute("label"),a.getAttribute("empty-text"),a.getAttribute("close-on-scrim"),a.getAttribute("disabled"),a.getAttribute("close-on-escape"),a.getAttribute("no-scrim"),a.getAttribute("dismissible"),a.getAttribute("modal"),a.hasAttribute("open"),a.getAttribute("placeholder")]))},uv=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:$APP.F(c)});a.dispatchEvent(b);return b},vv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=$APP.k(b,
7
+ "list"),d=$APP.k(b,"empty");b=$APP.k(b,"input");var e=function(){var q=$APP.k(a,"__xCommandPaletteQuery");return $APP.n(q)?q:""}(),g=bv($APP.k(a,"__xCommandPaletteItems"));e=dv(g,e);e=$APP.M(e);g=$APP.D(e,$APP.yl);e=function(){var q=$APP.k(a,"__xCommandPaletteActiveIdx");return $APP.n(q)?q:0}();c.textContent="";if($APP.Hc(g))return d.removeAttribute("hidden"),$APP.n(b)?b.removeAttribute("aria-activedescendant"):null;d.setAttribute("hidden","");d=$APP.Xd($APP.wh,g);for(var h=null;;)if(g=$APP.u(d),
8
+ $APP.n(g)){var l=g;g=$APP.Ac(l,0,null);l=$APP.Ac(l,1,null);var m=$u.g(l);if($APP.n(function(){var q=m;return $APP.n(q)?$APP.N(m,h):q}())){var p=sv("div");p.setAttribute("part","group-header");p.setAttribute("aria-hidden","true");p.textContent=m;c.appendChild(p)}p=sv("div");p.setAttribute("part","item");p.setAttribute("role","option");p.setAttribute("id","x-cp-item-"+$APP.T.g(g));p.setAttribute("data-id",""+$APP.T.g($APP.ll.g(l)));p.setAttribute("data-idx",""+$APP.T.g(g));p.setAttribute("tabindex",
9
+ "-1");$APP.n($APP.X.g(l))&&p.setAttribute("aria-disabled","true");p.textContent=$APP.U.g(l);$APP.C.i(g,e)&&p.setAttribute("aria-selected","true");c.appendChild(p);d=$APP.Zb(d);h=g=function(){var q=m;return $APP.n(q)?q:h}()}else break;return $APP.n(b)?b.setAttribute("aria-activedescendant","x-cp-item-"+$APP.T.g(e)):null}return null},wv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");if($APP.n(b)){var c=tv(a),d=$APP.k(b,"panel"),e=$APP.k(b,"input"),g=$APP.k(b,"overlay");b=$APP.k(b,"empty");var h=
10
+ $APP.U.g(c),l=$APP.lm.g(c),m=mv.g(c);$APP.n(h)?d.setAttribute("aria-label",h):d.setAttribute("aria-label","Command palette");$APP.n(pv.g(c))?g.removeAttribute("hidden"):g.setAttribute("hidden","");e.setAttribute("placeholder",l);e.setAttribute("aria-expanded",$APP.n($APP.zm.g(c))?"true":"false");$APP.n($APP.X.g(c))&&(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true"));$APP.n($APP.X.g(c))||(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"));b.textContent=m;return vv(a)}return null},
11
+ xv=function(a){if($APP.n(a.hasAttribute("open")))return null;var b=uv(a,"x-command-palette-open-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.setAttribute("open",""),b=$APP.k(a,"__xCommandPaletteRefs"),b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.focus(),wv(a),a=uv(a,"x-command-palette-open",!1,{}));return a},yv=function(a){if($APP.n(a.hasAttribute("open"))){var b=uv(a,"x-command-palette-close-request",!0,{});$APP.n(b.defaultPrevented)?a=null:(a.removeAttribute("open"),b=$APP.k(a,"__xCommandPaletteRefs"),
12
+ b=$APP.n(b)?$APP.k(b,"input"):null,$APP.n(b)&&b.removeAttribute("aria-activedescendant"),wv(a),a=uv(a,"x-command-palette-close",!1,{}));return a}return null},zv=function(a){var b=$APP.k(a,"__xCommandPaletteQuery");b=$APP.n(b)?b:"";a=bv($APP.k(a,"__xCommandPaletteItems"));a=dv(a,b);a=$APP.M(a);return $APP.D(a,$APP.yl)},Bv=function(a,b){var c=zv(a);var d=$APP.k(a,"__xCommandPaletteActiveIdx");d=$APP.n(d)?d:0;$APP.C.i(b,Av)?(c=ev(c,$APP.n(d)?d:-1,1),c=$APP.n(c)?c:0):(b=$APP.z(c),c=ev(c,$APP.n(d)?d:b,
13
+ -1),c=$APP.n(c)?c:0);a.__xCommandPaletteActiveIdx=c;vv(a);a=$APP.k(a,"__xCommandPaletteRefs");a=$APP.n(a)?$APP.k(a,"list"):null;a=$APP.n(a)?a.querySelector("[data-idx\x3d'"+$APP.T.g(c)+"']"):null;return $APP.n(a)?a.scrollIntoView({block:"nearest"}):null},Dv=function(a,b){var c=b.key;return $APP.C.i(c,"ArrowDown")?(b.preventDefault(),Bv(a,Av)):$APP.C.i(c,"ArrowUp")?(b.preventDefault(),Bv(a,Cv)):$APP.C.i(c,"Enter")?(b.preventDefault(),b=zv(a),c=$APP.k(a,"__xCommandPaletteActiveIdx"),b=$APP.Ac(b,$APP.n(c)?
14
+ c:0,null),$APP.n($APP.n(b)?$APP.r($APP.X.g(b)):b)?(c=uv(a,"x-command-palette-select-request",!0,{item:$APP.Gh(b)}),$APP.n(c.defaultPrevented)?a=null:(uv(a,"x-command-palette-select",!1,{item:$APP.Gh(b)}),a=yv(a))):a=null,a):$APP.C.i(c,"Escape")?(b=tv(a),$APP.n(ov.g(b))?yv(a):null):null},Ev=function(a){function b(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;$APP.n(v)&&(v.value="");$APP.n(q)&&q.setAttribute("hidden","");a.__xCommandPaletteQuery=
15
+ "";a.__xCommandPaletteActiveIdx=0;uv(a,"x-command-palette-query-change",!1,{query:""});vv(a);return $APP.n(v)?v.focus():null}function c(q){a:{q=q.target.closest("[part\x3ditem]");if($APP.n(q)){q=parseInt(q.getAttribute("data-idx"),10);var v=zv(a);q=$APP.Ac(v,q,null);if($APP.n($APP.n(q)?$APP.r($APP.X.g(q)):q)){v=uv(a,"x-command-palette-select-request",!0,{item:$APP.Gh(q)});if($APP.n(v.defaultPrevented)){q=null;break a}uv(a,"x-command-palette-select",!1,{item:$APP.Gh(q)});q=yv(a);break a}}q=null}return q}
16
+ function d(){var q=tv(a);return $APP.n(nv.g(q))?yv(a):null}function e(q){return Dv(a,q)}function g(){var q=$APP.k(a,"__xCommandPaletteRefs"),v=$APP.n(q)?$APP.k(q,"input"):null;q=$APP.n(q)?$APP.k(q,"clear-btn"):null;v=$APP.n(v)?v.value:null;a.__xCommandPaletteQuery=$APP.n(v)?v:"";a.__xCommandPaletteActiveIdx=0;$APP.n(q)&&($APP.n($APP.n(v)?$APP.N(v,""):v)?q.removeAttribute("hidden"):q.setAttribute("hidden",""));uv(a,"x-command-palette-query-change",!1,{query:$APP.n(v)?v:""});return vv(a)}var h=$APP.k(a,
17
+ "__xCommandPaletteRefs"),l=$APP.k(h,"input"),m=$APP.k(h,"overlay"),p=$APP.k(h,"list");h=$APP.k(h,"clear-btn");l.addEventListener("input",g);l.addEventListener("keydown",e);m.addEventListener("click",d);p.addEventListener("click",c);h.addEventListener("click",b);$APP.ja(a,"__xCommandPaletteHandlers",{input:g,keydown:e,scrim:d,list:c,clear:b})},Fv=function(a){var b=$APP.k(a,"__xCommandPaletteRefs");a=$APP.k(a,"__xCommandPaletteHandlers");if($APP.n($APP.n(b)?a:b)){var c=$APP.k(b,"input"),d=$APP.k(b,
18
+ "overlay"),e=$APP.k(b,"list");b=$APP.k(b,"clear-btn");c.removeEventListener("input",$APP.k(a,"input"));c.removeEventListener("keydown",$APP.k(a,"keydown"));d.removeEventListener("click",$APP.k(a,"scrim"));e.removeEventListener("click",$APP.k(a,"list"));return b.removeEventListener("click",$APP.k(a,"clear"))}return null},Gv=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},
19
+ Hv=function(a){Object.defineProperty(a,"items",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xCommandPaletteItems");return $APP.n(b)?b:[]},set:function(b){this.__xCommandPaletteItems=b;this.__xCommandPaletteActiveIdx=0;return vv(this)}})},Iv=function(a){Object.defineProperty(a,"open",{configurable:!0,writable:!0,value:function(){return xv(this)}});Object.defineProperty(a,"close",{configurable:!0,writable:!0,value:function(){return yv(this)}});Object.defineProperty(a,"toggle",
20
+ {configurable:!0,writable:!0,value:function(){return $APP.n(this.hasAttribute("open"))?yv(this):xv(this)}})},Kv=function(){var a=class extends HTMLElement{};a.observedAttributes=Jv;var b=a.prototype;Gv(b,"open","open");Gv(b,"disabled","disabled");Hv(b);Iv(b);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xCommandPaletteRefs"))){var c=this.attachShadow({mode:"open"}),d=sv("style"),e=sv("div"),g=sv("div"),h=sv("div"),l=sv("span"),m=sv("input"),p=sv("button"),q=sv("div"),v=sv("div"),x=sv("div");
21
21
  d.textContent=":host{display:contents;}[part\x3doverlay]{display:none;position:fixed;inset:0;background:var(--x-command-palette-backdrop,rgba(0,0,0,0.45));z-index:var(--x-command-palette-z,800);}[part\x3dpanel]{display:none;position:fixed;top:20vh;left:50%;transform:translateX(-50%);width:var(--x-command-palette-width,560px);max-width:calc(100vw - 2rem);max-height:60dvh;z-index:calc(var(--x-command-palette-z,800) + 1);flex-direction:column;border-radius:var(--x-command-palette-radius,var(--x-radius-lg,12px));background:var(--x-command-palette-bg,var(--x-color-bg,#fff));box-shadow:var(--x-command-palette-shadow,var(--x-shadow-lg,0 20px 60px rgba(0,0,0,0.25),0 4px 16px rgba(0,0,0,0.12)));overflow:hidden;}:host([open]) [part\x3doverlay]{display:block;}:host([open]) [part\x3dpanel]{display:flex;}[part\x3dsearch-wrap]{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--x-command-palette-divider,rgba(0,0,0,0.08));}[part\x3dsearch-icon]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;color:var(--x-command-palette-icon-color,var(--x-color-text-muted,#64748b));}[part\x3dinput]{flex:1;border:none;outline:none;background:transparent;font-size:1rem;line-height:1.5;color:var(--x-command-palette-text,inherit);}[part\x3dinput]::placeholder{color:var(--x-command-palette-placeholder,var(--x-color-text-muted,#94a3b8));}[part\x3dclear-btn]{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;color:var(--x-command-palette-icon-color,var(--x-color-text-muted,#64748b));}[part\x3dclear-btn]:focus-visible{outline:2px solid var(--x-command-palette-focus-ring,var(--x-color-focus-ring,#60a5fa));}[part\x3dclear-btn][hidden]{display:none;}[part\x3dlist-wrap]{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:8px 0;}[part\x3dlist]{display:flex;flex-direction:column;}[part\x3ditem]{padding:10px 16px;cursor:default;font-size:var(--x-font-size-sm,0.9375rem);line-height:1.4;color:var(--x-command-palette-item-text,inherit);border-radius:0;outline:none;}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,var(--x-color-surface-active,#f1f5f9));}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#e0e7ff);color:var(--x-command-palette-item-active-text,#3730a3);}[part\x3ditem][aria-disabled\x3dtrue]{opacity:0.45;cursor:default;pointer-events:none;}[part\x3dgroup-header]{padding:8px 16px 4px;font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;color:var(--x-command-palette-group-text,var(--x-color-text-muted,#94a3b8));}[part\x3dempty]{padding:32px 16px;text-align:center;color:var(--x-command-palette-empty-text,var(--x-color-text-muted,#94a3b8));font-size:0.9375rem;}[part\x3dempty][hidden]{display:none;}@media (prefers-color-scheme:dark){[part\x3dpanel]{background:var(--x-command-palette-bg,var(--x-color-bg,#1e293b));box-shadow:var(--x-command-palette-shadow,var(--x-shadow-lg,0 20px 60px rgba(0,0,0,0.6),0 4px 16px rgba(0,0,0,0.4)));}[part\x3dsearch-wrap]{border-bottom-color:var(--x-command-palette-divider,rgba(255,255,255,0.08));}[part\x3ditem]:hover,[part\x3ditem]:focus{background:var(--x-command-palette-item-hover,var(--x-color-text-muted,#334155));}[part\x3ditem][aria-selected\x3dtrue]{background:var(--x-command-palette-item-active,#312e81);color:var(--x-command-palette-item-active-text,#c7d2fe);}}@media (prefers-reduced-motion:reduce){[part\x3dpanel],[part\x3doverlay]{transition:none;}}";
22
22
  e.setAttribute("part","overlay");g.setAttribute("part","panel");g.setAttribute("role","dialog");g.setAttribute("aria-modal","true");h.setAttribute("part","search-wrap");l.setAttribute("part","search-icon");l.setAttribute("aria-hidden","true");l.textContent="\ud83d\udd0d";m.setAttribute("part","input");m.setAttribute("type","search");m.setAttribute("role","combobox");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("spellcheck","false");m.setAttribute("aria-autocomplete",
23
23
  "list");m.setAttribute("aria-expanded","false");m.setAttribute("aria-controls","x-cp-list");p.setAttribute("part","clear-btn");p.setAttribute("type","button");p.setAttribute("aria-label","Clear");p.setAttribute("hidden","");q.setAttribute("part","list-wrap");v.setAttribute("part","list");v.setAttribute("id","x-cp-list");v.setAttribute("role","listbox");v.setAttribute("aria-label","Results");x.setAttribute("part","empty");x.setAttribute("hidden","");h.appendChild(l);h.appendChild(m);h.appendChild(p);
24
- q.appendChild(v);q.appendChild(x);g.appendChild(h);g.appendChild(q);c.appendChild(d);c.appendChild(e);c.appendChild(g);this.__xCommandPaletteRefs={overlay:e,panel:g,input:m,"clear-btn":p,list:v,empty:x}}iv(this);hv(this);return $u(this)};b.disconnectedCallback=function(){return iv(this)};b.attributeChangedCallback=function(){return $u(this)};return a},ov=function(){return $APP.n(customElements.get("x-command-palette"))?null:customElements.define("x-command-palette",nv())},Qu=new $APP.K(null,"empty-text",
25
- "empty-text",1554384594),wu=new $APP.K(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),vu=new $APP.K(null,"empty-text-raw","empty-text-raw",1477406757),Ou=new $APP.K(null,"dismissible-raw","dismissible-raw",947680658),Pu=new $APP.K(null,"modal-raw","modal-raw",-263722282),Su=new $APP.K(null,"close-on-escape?","close-on-escape?",-1559868909),su=new $APP.K(null,"groups","groups",-136896102),Mu=new $APP.K(null,"close-on-escape-raw","close-on-escape-raw",-1942646255),Tu=new $APP.K(null,"scrim?",
26
- "scrim?",744210580),Nu=new $APP.K(null,"no-scrim-raw","no-scrim-raw",-1344365743),Ru=new $APP.K(null,"close-on-scrim?","close-on-scrim?",-367113965),pv=new $APP.Sb(null,"object","object",-1179821820,null),pu=new $APP.K(null,"group","group",582596132),dv=new $APP.K(null,"down","down",1565245570),qu=new $APP.K(null,"search-str","search-str",-821246171),fv=new $APP.K(null,"up","up",-269712113),Uu=new $APP.K(null,"modal?","modal?",2146094679),Lu=new $APP.K(null,"disabled-raw","disabled-raw",498098381);var mv="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
27
- $APP.Qd(["x-command-palette-open-request",new $APP.Q(null,2,[$APP.Rl,!0,$APP.V,$APP.Rd],null),"x-command-palette-open",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,$APP.Rd],null),"x-command-palette-close-request",new $APP.Q(null,2,[$APP.Rl,!0,$APP.V,$APP.Rd],null),"x-command-palette-close",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,$APP.Rd],null),"x-command-palette-select-request",new $APP.Q(null,2,[$APP.Rl,!0,$APP.V,new $APP.Q(null,1,[$APP.ik,pv],null)],null),"x-command-palette-select",new $APP.Q(null,2,[$APP.Rl,
28
- !1,$APP.V,new $APP.Q(null,1,[$APP.ik,pv],null)],null),"x-command-palette-query-change",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,new $APP.Q(null,1,[$APP.zi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_command_palette.init",ov);export const init=ov;
24
+ q.appendChild(v);q.appendChild(x);g.appendChild(h);g.appendChild(q);c.appendChild(d);c.appendChild(e);c.appendChild(g);this.__xCommandPaletteRefs={overlay:e,panel:g,input:m,"clear-btn":p,list:v,empty:x}}Fv(this);Ev(this);return wv(this)};b.disconnectedCallback=function(){return Fv(this)};b.attributeChangedCallback=function(){return wv(this)};return a},Lv=function(){return $APP.n(customElements.get("x-command-palette"))?null:customElements.define("x-command-palette",Kv())},mv=new $APP.K(null,"empty-text",
25
+ "empty-text",1554384594),gv=new $APP.K(null,"close-on-scrim-raw","close-on-scrim-raw",159828234),fv=new $APP.K(null,"empty-text-raw","empty-text-raw",1477406757),kv=new $APP.K(null,"dismissible-raw","dismissible-raw",947680658),lv=new $APP.K(null,"modal-raw","modal-raw",-263722282),ov=new $APP.K(null,"close-on-escape?","close-on-escape?",-1559868909),cv=new $APP.K(null,"groups","groups",-136896102),iv=new $APP.K(null,"close-on-escape-raw","close-on-escape-raw",-1942646255),pv=new $APP.K(null,"scrim?",
26
+ "scrim?",744210580),jv=new $APP.K(null,"no-scrim-raw","no-scrim-raw",-1344365743),nv=new $APP.K(null,"close-on-scrim?","close-on-scrim?",-367113965),Mv=new $APP.Sb(null,"object","object",-1179821820,null),$u=new $APP.K(null,"group","group",582596132),Av=new $APP.K(null,"down","down",1565245570),av=new $APP.K(null,"search-str","search-str",-821246171),Cv=new $APP.K(null,"up","up",-269712113),qv=new $APP.K(null,"modal?","modal?",2146094679),hv=new $APP.K(null,"disabled-raw","disabled-raw",498098381);var Jv="open modal dismissible disabled no-scrim close-on-scrim close-on-escape label placeholder empty-text".split(" ");
27
+ $APP.Qd(["x-command-palette-open-request",new $APP.Q(null,2,[$APP.Yl,!0,$APP.V,$APP.Rd],null),"x-command-palette-open",new $APP.Q(null,2,[$APP.Yl,!1,$APP.V,$APP.Rd],null),"x-command-palette-close-request",new $APP.Q(null,2,[$APP.Yl,!0,$APP.V,$APP.Rd],null),"x-command-palette-close",new $APP.Q(null,2,[$APP.Yl,!1,$APP.V,$APP.Rd],null),"x-command-palette-select-request",new $APP.Q(null,2,[$APP.Yl,!0,$APP.V,new $APP.Q(null,1,[$APP.nk,Mv],null)],null),"x-command-palette-select",new $APP.Q(null,2,[$APP.Yl,
28
+ !1,$APP.V,new $APP.Q(null,1,[$APP.nk,Mv],null)],null),"x-command-palette-query-change",new $APP.Q(null,2,[$APP.Yl,!1,$APP.V,new $APP.Q(null,1,[$APP.Di,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_command_palette.init",Lv);export const init=Lv;
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var IL=function(a,b,c){return typeof a==="string"&&$APP.I(b,a)?a:c},JL=function(a){return a.__xContainerState},KL=function(a){Object.defineProperty(a,"fluid",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("fluid")},set:function(b){return $APP.Eg(this,"fluid",$APP.F(b))}})},LL=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.N("false",this.getAttribute("center"))},set:function(b){return $APP.F(b)?this.removeAttribute("center"):
3
- this.setAttribute("center","false")}})},SL=function(a,b){a=new $APP.Q(null,6,[ML,a.getAttribute("as"),$APP.Hh,a.getAttribute("size"),$APP.rm,a.getAttribute("padding"),NL,$APP.N("false",a.getAttribute("center")),OL,a.hasAttribute("fluid"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(a);a=$APP.D(c,ML);var d=$APP.D(c,$APP.Hh),e=$APP.D(c,$APP.rm),g=$APP.D(c,NL),h=$APP.D(c,OL);c=$APP.D(c,$APP.U);a=new $APP.Q(null,6,[ML,IL(a,PL,"div"),$APP.Hh,IL(d,QL,"lg"),$APP.rm,IL(e,RL,"md"),NL,$APP.F(g),OL,$APP.F(h),
4
- $APP.U,$APP.Jg(c)?c:null],null);h=ML.g(a);d=b.base;$APP.N(d.tagName.toLowerCase(),h)&&(e=b.root,g=b.slot,h=document.createElement(h),h.setAttribute("part","base"),h.appendChild(g),e.replaceChild(h,d),b.base=h);b=b.base;b.setAttribute("data-size",$APP.Hh.g(a));b.setAttribute("data-padding",$APP.rm.g(a));b.setAttribute("data-center",$APP.n(NL.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.n(OL.g(a))?"true":"false");a=$APP.U.g(a);return $APP.n(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},
5
- UL=function(){var a=class extends HTMLElement{};a.observedAttributes=TL;a.prototype.connectedCallback=function(){if(!$APP.n(JL(this))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #0f172a);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #e5e7eb);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
6
- d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return SL(this,JL(this))};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(){var b=JL(this);return $APP.n(b)?SL(this,b):null};LL(a.prototype);KL(a.prototype);return a},VL=function(){$APP.n(customElements.get("x-container"))||customElements.define("x-container",UL());return null},OL=new $APP.K(null,"fluid","fluid",-1823657759),
7
- ML=new $APP.K(null,"as","as",1148689641),NL=new $APP.K(null,"center","center",-748944368);var PL=new $APP.S(null,new $APP.Q(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),QL=new $APP.S(null,new $APP.Q(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),RL=new $APP.S(null,new $APP.Q(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),TL="as size padding center fluid label".split(" ");$APP.ha("baredom.exports.x_container.init",VL);export const init=VL;
2
+ var eM=function(a,b,c){return typeof a==="string"&&$APP.I(b,a)?a:c},fM=function(a){return a.__xContainerState},gM=function(a){Object.defineProperty(a,"fluid",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("fluid")},set:function(b){return $APP.Eg(this,"fluid",$APP.F(b))}})},hM=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.N("false",this.getAttribute("center"))},set:function(b){return $APP.F(b)?this.removeAttribute("center"):
3
+ this.setAttribute("center","false")}})},oM=function(a,b){a=new $APP.Q(null,6,[iM,a.getAttribute("as"),$APP.Kh,a.getAttribute("size"),$APP.ym,a.getAttribute("padding"),jM,$APP.N("false",a.getAttribute("center")),kM,a.hasAttribute("fluid"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(a);a=$APP.D(c,iM);var d=$APP.D(c,$APP.Kh),e=$APP.D(c,$APP.ym),g=$APP.D(c,jM),h=$APP.D(c,kM);c=$APP.D(c,$APP.U);a=new $APP.Q(null,6,[iM,eM(a,lM,"div"),$APP.Kh,eM(d,mM,"lg"),$APP.ym,eM(e,nM,"md"),jM,$APP.F(g),kM,$APP.F(h),
4
+ $APP.U,$APP.Jg(c)?c:null],null);h=iM.g(a);d=b.base;$APP.N(d.tagName.toLowerCase(),h)&&(e=b.root,g=b.slot,h=document.createElement(h),h.setAttribute("part","base"),h.appendChild(g),e.replaceChild(h,d),b.base=h);b=b.base;b.setAttribute("data-size",$APP.Kh.g(a));b.setAttribute("data-padding",$APP.ym.g(a));b.setAttribute("data-center",$APP.n(jM.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.n(kM.g(a))?"true":"false");a=$APP.U.g(a);return $APP.n(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},
5
+ qM=function(){var a=class extends HTMLElement{};a.observedAttributes=pM;a.prototype.connectedCallback=function(){if(!$APP.n(fM(this))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #0f172a);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #e5e7eb);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
6
+ d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return oM(this,fM(this))};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(){var b=fM(this);return $APP.n(b)?oM(this,b):null};hM(a.prototype);gM(a.prototype);return a},rM=function(){$APP.n(customElements.get("x-container"))||customElements.define("x-container",qM());return null},kM=new $APP.K(null,"fluid","fluid",-1823657759),
7
+ iM=new $APP.K(null,"as","as",1148689641),jM=new $APP.K(null,"center","center",-748944368);var lM=new $APP.R(null,new $APP.Q(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),mM=new $APP.R(null,new $APP.Q(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),nM=new $APP.R(null,new $APP.Q(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),pM="as size padding center fluid label".split(" ");$APP.ha("baredom.exports.x_container.init",rM);export const init=rM;
@@ -1,21 +1,19 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var m3=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:b):b},n3=function(a){return $APP.C.i(a,"bottom-start")?"top-start":$APP.C.i(a,"bottom-end")?"top-end":$APP.C.i(a,"top-start")?"bottom-start":$APP.C.i(a,"top-end")?"bottom-end":$APP.C.i(a,"right-start")?"left-start":$APP.C.i(a,"left-start")?"right-start":a},o3=function(a,b,c,d){var e=$APP.M(c);c=$APP.D(e,$APP.rl);var g=$APP.D(e,$APP.ql),h=$APP.D(e,$APP.Sg);e=$APP.D(e,$APP.Tg);var l=$APP.M(d);d=$APP.D(l,$APP.Sg);
3
- l=$APP.D(l,$APP.Tg);switch(a){case "bottom-start":return new $APP.Q(null,2,[$APP.rl,c,$APP.ql,g+e+b],null);case "bottom-end":return new $APP.Q(null,2,[$APP.rl,c+h-d,$APP.ql,g+e+b],null);case "top-start":return new $APP.Q(null,2,[$APP.rl,c,$APP.ql,g-l-b],null);case "top-end":return new $APP.Q(null,2,[$APP.rl,c+h-d,$APP.ql,g-l-b],null);case "right-start":return new $APP.Q(null,2,[$APP.rl,c+h+b,$APP.ql,g],null);case "left-start":return new $APP.Q(null,2,[$APP.rl,c-d-b,$APP.ql,g],null);default:return new $APP.Q(null,
4
- 2,[$APP.rl,c,$APP.ql,g+e+b],null)}},s3=function(a,b,c,d,e){function g(x){var y=o3(x,b,c,d);y=$APP.M(y);var A=$APP.D(y,$APP.rl),B=$APP.D(y,$APP.ql);y=A>=8&&A+m<=h-8;var E=B>=8&&B+p<=l-8;A=$APP.oh.i($APP.nh.i(A,8),h-m-8);B=$APP.oh.i($APP.nh.i(B,8),l-p-8);return new $APP.Q(null,5,[$APP.rl,A,$APP.ql,B,p3,x,q3,y&&E,r3,$APP.nh.i(40,l-B-8)],null)}e=$APP.M(e);var h=$APP.D(e,$APP.Sg),l=$APP.D(e,$APP.Tg);e=$APP.M(d);var m=$APP.D(e,$APP.Sg),p=$APP.D(e,$APP.Tg),q=g(a),v=g(n3(a));return $APP.n(function(){var x=
5
- q3.g(q);return $APP.n(x)?x:$APP.r(q3.g(v))}())?q:v},x3=function(a){a=new $APP.Q(null,5,[$APP.xi,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.ul,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.Mm,a.getAttribute("placement"),t3,a.getAttribute("offset"),u3,a.getAttribute("z-index")],null);var b=$APP.M(a),c=$APP.D(b,$APP.xi),d=$APP.D(b,$APP.ul),e=$APP.D(b,$APP.Mm);a=$APP.D(b,t3);b=$APP.D(b,u3);c=$APP.Ig(c);d=$APP.Ig(d);e=typeof e==="string"&&$APP.I(v3,e)?e:"bottom-start";
6
- return new $APP.Q(null,5,[$APP.sm,c,$APP.X,d,$APP.Gj,e,$APP.ni,m3(a,8),w3,m3(b,1E3)],null)},y3=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:c});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},z3=function(a){return $APP.uc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},A3=function(a){return $APP.n(a)?a.focus():null},B3=function(a,b){a=$APP.n(a)?a.closest("x-theme"):null;a=$APP.n(a)?a:document.body;var c=document.getElementById("__xOverlayRoot");
7
- if($APP.n($APP.n(c)?a.contains(c):c))a=c;else{var d=document.createElement("div");d.setAttribute("id","__xOverlayRoot");d.style.position="fixed";d.style.inset="0";d.style.pointerEvents="none";d.style.zIndex="0";$APP.n(c)&&c.remove();a.appendChild(d);a=d}c=document.createElement("div");d=c.attachShadow({mode:"open"});var e=document.createElement("style"),g=document.createElement("div");c.style.position="fixed";c.style.inset="0";c.style.pointerEvents="none";c.style.zIndex=""+$APP.T.g(b);e.textContent=
8
- ":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}";
9
- g.setAttribute("part","panel");g.setAttribute("role","menu");g.setAttribute("tabindex","-1");d.appendChild(e);d.appendChild(g);a.appendChild(c);return c},C3=function(a){return $APP.n(a)?a.shadowRoot.querySelector("[part\x3dpanel]"):null},D3=function(a,b,c,d){var e=$APP.M(d);d=$APP.D(e,w3);e=$APP.D(e,r3);a.style.zIndex=""+$APP.T.g(d);a=C3(a);$APP.n(a)&&(a.style.left=""+$APP.T.g(b)+"px",a.style.top=""+$APP.T.g(c)+"px",a.style.maxHeight=""+$APP.T.g(e)+"px")},E3=function(a,b){a=$APP.t($APP.uc(a.children));
10
- for(var c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e);b.appendChild(g.cloneNode(!0));e+=1}else if(a=$APP.t(a))c=a,$APP.Nc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.z(a),a=d,d=g):(g=$APP.u(c),b.appendChild(g.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},G3=function(a,b){function c(h){h.stopPropagation();h=h.target.closest("[role\x3dmenuitem]");return $APP.n(h)?(y3(a,"x-context-menu-select",!1,{item:h}),F3.i?F3.i(a,"select"):F3.call(null,a,"select")):null}function d(h){var l=C3(b);return $APP.n($APP.n(l)?
11
- $APP.r(l.contains(h.target)):l)?F3.i?F3.i(a,"backdrop"):F3.call(null,a,"backdrop"):null}function e(h){var l=h.key,m=b.shadowRoot.activeElement;return $APP.C.i(l,"Escape")?(h.preventDefault(),h.stopPropagation(),F3.i?F3.i(a,"keyboard"):F3.call(null,a,"keyboard")):$APP.C.i(l,"Tab")?F3.i?F3.i(a,"keyboard"):F3.call(null,a,"keyboard"):$APP.C.i(l,"ArrowDown")?(h.preventDefault(),$APP.n(m)?(h=z3(g),m=$APP.zd(h).indexOf(m),m=$APP.Ac(h,$APP.fd(m+1,$APP.z(h)),null),m=A3(m)):m=A3($APP.u(z3(g))),m):$APP.C.i(l,
12
- "ArrowUp")?(h.preventDefault(),$APP.n(m)?(h=z3(g),l=$APP.z(h),m=$APP.zd(h).indexOf(m),m=$APP.Ac(h,$APP.fd(m+(l-1),l),null),m=A3(m)):m=A3($APP.u(z3(g))),m):($APP.C.i(l,"Enter")||$APP.C.i(l," "))&&$APP.n(m)?(h.preventDefault(),m.click()):null}var g=C3(b);b.addEventListener("keydown",e,!0);b.addEventListener("click",d);$APP.n(g)&&g.addEventListener("click",c);b.__onKey=e;b.__onClickBackdrop=d;b.__onItemClick=c},H3=function(a){if($APP.n(a)){var b=$APP.k(a,"__onKey"),c=$APP.k(a,"__onClickBackdrop"),d=
13
- $APP.k(a,"__onItemClick"),e=C3(a);$APP.n(b)&&a.removeEventListener("keydown",b,!0);$APP.n(c)&&a.removeEventListener("click",c);$APP.n($APP.n(e)?d:e)&&e.removeEventListener("click",d);$APP.n(a.parentNode)&&a.parentNode.removeChild(a)}},F3=function(a,b){return $APP.n(a.hasAttribute("open"))&&y3(a,"x-context-menu-close-request",!0,{reason:b})?(a.removeAttribute("open"),H3($APP.k(a,"__xContextMenuLayer")),a.__xContextMenuLayer=null,y3(a,"x-context-menu-close",!1,{reason:b})):null},I3=function(a,b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;
14
- if(y3(a,"x-context-menu-open-request",!0,{reason:d})){var e=x3(a);e=$APP.M(e);var g=$APP.D(e,$APP.Gj),h=$APP.D(e,$APP.ni),l=$APP.D(e,w3),m=window.innerWidth,p=window.innerHeight,q=new $APP.Q(null,4,[$APP.rl,b,$APP.ql,c,$APP.Sg,1,$APP.Tg,1],null);b=s3(g,h,q,new $APP.Q(null,2,[$APP.Sg,200,$APP.Tg,300],null),new $APP.Q(null,2,[$APP.Sg,m,$APP.Tg,p],null));var v=B3(a,l);E3(a,C3(v));G3(a,v);D3(v,$APP.rl.g(b),$APP.ql.g(b),$APP.lh.m(b,w3,l));a.setAttribute("open","");a.__xContextMenuLayer=v;requestAnimationFrame(function(){var x=
15
- C3(v);if($APP.n(x)){var y=s3(g,h,q,new $APP.Q(null,2,[$APP.Sg,x.offsetWidth,$APP.Tg,x.offsetHeight],null),new $APP.Q(null,2,[$APP.Sg,m,$APP.Tg,p],null));D3(v,$APP.rl.g(y),$APP.ql.g(y),$APP.lh.m(y,w3,l));return A3($APP.u(z3(x)))}return null});return y3(a,"x-context-menu-open",!1,{reason:d})}return null},J3=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=x3(a);c=$APP.M(c);var d=$APP.D(c,$APP.Gj),e=$APP.D(c,$APP.ni),g=$APP.D(c,w3),h=window.innerWidth,
16
- l=window.innerHeight,m=new $APP.Q(null,4,[$APP.rl,b.left,$APP.ql,b.top,$APP.Sg,b.width,$APP.Tg,b.height],null);if(y3(a,"x-context-menu-open-request",!0,{reason:"programmatic"})){b=s3(d,e,m,new $APP.Q(null,2,[$APP.Sg,200,$APP.Tg,300],null),new $APP.Q(null,2,[$APP.Sg,h,$APP.Tg,l],null));var p=B3(a,g);E3(a,C3(p));G3(a,p);D3(p,$APP.rl.g(b),$APP.ql.g(b),$APP.lh.m(b,w3,g));a.setAttribute("open","");a.__xContextMenuLayer=p;requestAnimationFrame(function(){var q=C3(p);if($APP.n(q)){var v=s3(d,e,m,new $APP.Q(null,
17
- 2,[$APP.Sg,q.offsetWidth,$APP.Tg,q.offsetHeight],null),new $APP.Q(null,2,[$APP.Sg,h,$APP.Tg,l],null));D3(p,$APP.rl.g(v),$APP.ql.g(v),$APP.lh.m(v,w3,g));return A3($APP.u(z3(q)))}return null});return y3(a,"x-context-menu-open",!1,{reason:"programmatic"})}return null},K3=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},L3=function(a,b,c){Object.defineProperty(a,
18
- b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},M3=function(a){a.openAt=function(b,c){return I3(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?F3(this,"toggle"):I3(this,b,c,"toggle")};a.openForElement=function(b){return J3(this,b)};a.close=function(){return F3(this,"programmatic")}},O3=function(){var a=class extends HTMLElement{};
19
- a.observedAttributes=N3;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xContextMenuRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.n(this.hasAttribute("open"))?this.removeAttribute("open"):null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xContextMenuLayer");
20
- $APP.n(b)?(H3(b),this.__xContextMenuLayer=null,b=void 0):b=null;return b};a.prototype.attributeChangedCallback=function(b){a:{if($APP.C.i(b,"open")){if($APP.n(this.hasAttribute("open"))){b=null;break a}b=$APP.k(this,"__xContextMenuLayer");if($APP.n(b)){H3(b);this.__xContextMenuLayer=null;b=void 0;break a}}b=null}return b};K3(a.prototype,"open","open");K3(a.prototype,"disabled","disabled");L3(a.prototype,"placement","placement");L3(a.prototype,"offset","offset");L3(a.prototype,"zIndex","z-index");
21
- M3(a.prototype);return a},P3=function(){return $APP.n(customElements.get("x-context-menu"))?null:customElements.define("x-context-menu",O3())},p3=new $APP.K(null,"final-placement","final-placement",-1586044424),u3=new $APP.K(null,"z-index-raw","z-index-raw",-1179679257),r3=new $APP.K(null,"max-height","max-height",-612563804),q3=new $APP.K(null,"fits","fits",2008565808),w3=new $APP.K(null,"z-index","z-index",1892827090),t3=new $APP.K(null,"offset-raw","offset-raw",-1418404095);var N3=["open","disabled","placement","offset","z-index"],v3=new $APP.S(null,new $APP.Q(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null);$APP.ha("baredom.exports.x_context_menu.init",P3);export const init=P3;
2
+ var J3=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:b):b},K3=function(a){return $APP.C.i(a,"bottom-start")?"top-start":$APP.C.i(a,"bottom-end")?"top-end":$APP.C.i(a,"top-start")?"bottom-start":$APP.C.i(a,"top-end")?"bottom-end":$APP.C.i(a,"right-start")?"left-start":$APP.C.i(a,"left-start")?"right-start":a},L3=function(a,b,c,d){var e=$APP.M(c);c=$APP.D(e,$APP.xl);var g=$APP.D(e,$APP.wl),h=$APP.D(e,$APP.Vg);e=$APP.D(e,$APP.Wg);var l=$APP.M(d);d=$APP.D(l,$APP.Vg);
3
+ l=$APP.D(l,$APP.Wg);switch(a){case "bottom-start":return new $APP.Q(null,2,[$APP.xl,c,$APP.wl,g+e+b],null);case "bottom-end":return new $APP.Q(null,2,[$APP.xl,c+h-d,$APP.wl,g+e+b],null);case "top-start":return new $APP.Q(null,2,[$APP.xl,c,$APP.wl,g-l-b],null);case "top-end":return new $APP.Q(null,2,[$APP.xl,c+h-d,$APP.wl,g-l-b],null);case "right-start":return new $APP.Q(null,2,[$APP.xl,c+h+b,$APP.wl,g],null);case "left-start":return new $APP.Q(null,2,[$APP.xl,c-d-b,$APP.wl,g],null);default:return new $APP.Q(null,
4
+ 2,[$APP.xl,c,$APP.wl,g+e+b],null)}},M3=function(a,b,c,d,e){function g(x){var y=L3(x,b,c,d);y=$APP.M(y);var A=$APP.D(y,$APP.xl),B=$APP.D(y,$APP.wl);y=A>=8&&A+m<=h-8;var E=B>=8&&B+p<=l-8;A=$APP.rh.i($APP.qh.i(A,8),h-m-8);B=$APP.rh.i($APP.qh.i(B,8),l-p-8);return new $APP.Q(null,5,[$APP.xl,A,$APP.wl,B,$APP.si,x,$APP.Jl,y&&E,$APP.xk,$APP.qh.i(40,l-B-8)],null)}e=$APP.M(e);var h=$APP.D(e,$APP.Vg),l=$APP.D(e,$APP.Wg);e=$APP.M(d);var m=$APP.D(e,$APP.Vg),p=$APP.D(e,$APP.Wg),q=g(a),v=g(K3(a));return $APP.n(function(){var x=
5
+ $APP.Jl.g(q);return $APP.n(x)?x:$APP.r($APP.Jl.g(v))}())?q:v},R3=function(a){a=new $APP.Q(null,5,[$APP.Bi,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Al,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.Tm,a.getAttribute("placement"),N3,a.getAttribute("offset"),O3,a.getAttribute("z-index")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Bi),d=$APP.D(b,$APP.Al),e=$APP.D(b,$APP.Tm);a=$APP.D(b,N3);b=$APP.D(b,O3);c=$APP.Ig(c);d=$APP.Ig(d);e=typeof e==="string"&&$APP.I(P3,
6
+ e)?e:"bottom-start";return new $APP.Q(null,5,[$APP.zm,c,$APP.X,d,$APP.Oj,e,$APP.qi,J3(a,8),Q3,J3(b,1E3)],null)},S3=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:c});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},T3=function(a){return $APP.uc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},U3=function(a){return $APP.n(a)?a.focus():null},V3=function(a,b){a=$APP.Ng(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
7
+ b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},W3=function(a,b,c,d){var e=$APP.M(d);d=$APP.D(e,Q3);e=$APP.D(e,$APP.xk);a.style.zIndex=""+$APP.T.g(d);a=$APP.Og(a);$APP.n(a)&&(a.style.left=""+$APP.T.g(b)+"px",a.style.top=""+$APP.T.g(c)+"px",a.style.maxHeight=""+$APP.T.g(e)+"px")},X3=function(a,b){a=$APP.t($APP.uc(a.children));for(var c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e);b.appendChild(g.cloneNode(!0));
8
+ e+=1}else if(a=$APP.t(a))c=a,$APP.Nc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.z(a),a=d,d=g):(g=$APP.u(c),b.appendChild(g.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},Z3=function(a,b){function c(h){h.stopPropagation();h=h.target.closest("[role\x3dmenuitem]");return $APP.n(h)?(S3(a,"x-context-menu-select",!1,{item:h}),Y3.i?Y3.i(a,"select"):Y3.call(null,a,"select")):null}function d(h){var l=$APP.Og(b);return $APP.n($APP.n(l)?$APP.r(l.contains(h.target)):l)?Y3.i?Y3.i(a,"backdrop"):Y3.call(null,
9
+ a,"backdrop"):null}function e(h){var l=h.key,m=b.shadowRoot.activeElement;return $APP.C.i(l,"Escape")?(h.preventDefault(),h.stopPropagation(),Y3.i?Y3.i(a,"keyboard"):Y3.call(null,a,"keyboard")):$APP.C.i(l,"Tab")?Y3.i?Y3.i(a,"keyboard"):Y3.call(null,a,"keyboard"):$APP.C.i(l,"ArrowDown")?(h.preventDefault(),$APP.n(m)?(h=T3(g),m=$APP.zd(h).indexOf(m),m=$APP.Ac(h,$APP.fd(m+1,$APP.z(h)),null),m=U3(m)):m=U3($APP.u(T3(g))),m):$APP.C.i(l,"ArrowUp")?(h.preventDefault(),$APP.n(m)?(h=T3(g),l=$APP.z(h),m=$APP.zd(h).indexOf(m),
10
+ m=$APP.Ac(h,$APP.fd(m+(l-1),l),null),m=U3(m)):m=U3($APP.u(T3(g))),m):($APP.C.i(l,"Enter")||$APP.C.i(l," "))&&$APP.n(m)?(h.preventDefault(),m.click()):null}var g=$APP.Og(b);b.addEventListener("keydown",e,!0);b.addEventListener("click",d);$APP.n(g)&&g.addEventListener("click",c);b.__onKey=e;b.__onClickBackdrop=d;b.__onItemClick=c},Y3=function(a,b){return $APP.n(a.hasAttribute("open"))&&S3(a,"x-context-menu-close-request",!0,{reason:b})?(a.removeAttribute("open"),$APP.Pg($APP.k(a,"__xContextMenuLayer")),
11
+ a.__xContextMenuLayer=null,S3(a,"x-context-menu-close",!1,{reason:b})):null},$3=function(a,b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;if(S3(a,"x-context-menu-open-request",!0,{reason:d})){var e=R3(a);e=$APP.M(e);var g=$APP.D(e,$APP.Oj),h=$APP.D(e,$APP.qi),l=$APP.D(e,Q3),m=window.innerWidth,p=window.innerHeight,q=new $APP.Q(null,4,[$APP.xl,b,$APP.wl,c,$APP.Vg,1,$APP.Wg,1],null);b=M3(g,h,q,new $APP.Q(null,2,[$APP.Vg,200,$APP.Wg,300],null),new $APP.Q(null,2,[$APP.Vg,m,$APP.Wg,p],null));
12
+ var v=V3(a,l);X3(a,$APP.Og(v));Z3(a,v);W3(v,$APP.xl.g(b),$APP.wl.g(b),$APP.oh.m(b,Q3,l));a.setAttribute("open","");a.__xContextMenuLayer=v;requestAnimationFrame(function(){var x=$APP.Og(v);if($APP.n(x)){var y=M3(g,h,q,new $APP.Q(null,2,[$APP.Vg,x.offsetWidth,$APP.Wg,x.offsetHeight],null),new $APP.Q(null,2,[$APP.Vg,m,$APP.Wg,p],null));W3(v,$APP.xl.g(y),$APP.wl.g(y),$APP.oh.m(y,Q3,l));return U3($APP.u(T3(x)))}return null});return S3(a,"x-context-menu-open",!1,{reason:d})}return null},a4=function(a,
13
+ b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=R3(a);c=$APP.M(c);var d=$APP.D(c,$APP.Oj),e=$APP.D(c,$APP.qi),g=$APP.D(c,Q3),h=window.innerWidth,l=window.innerHeight,m=new $APP.Q(null,4,[$APP.xl,b.left,$APP.wl,b.top,$APP.Vg,b.width,$APP.Wg,b.height],null);if(S3(a,"x-context-menu-open-request",!0,{reason:"programmatic"})){b=M3(d,e,m,new $APP.Q(null,2,[$APP.Vg,200,$APP.Wg,300],null),new $APP.Q(null,2,[$APP.Vg,h,$APP.Wg,l],null));var p=V3(a,g);X3(a,$APP.Og(p));
14
+ Z3(a,p);W3(p,$APP.xl.g(b),$APP.wl.g(b),$APP.oh.m(b,Q3,g));a.setAttribute("open","");a.__xContextMenuLayer=p;requestAnimationFrame(function(){var q=$APP.Og(p);if($APP.n(q)){var v=M3(d,e,m,new $APP.Q(null,2,[$APP.Vg,q.offsetWidth,$APP.Wg,q.offsetHeight],null),new $APP.Q(null,2,[$APP.Vg,h,$APP.Wg,l],null));W3(p,$APP.xl.g(v),$APP.wl.g(v),$APP.oh.m(v,Q3,g));return U3($APP.u(T3(q)))}return null});return S3(a,"x-context-menu-open",!1,{reason:"programmatic"})}return null},b4=function(a,b,c){Object.defineProperty(a,
15
+ b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},c4=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},d4=function(a){a.openAt=function(b,c){return $3(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?
16
+ Y3(this,"toggle"):$3(this,b,c,"toggle")};a.openForElement=function(b){return a4(this,b)};a.close=function(){return Y3(this,"programmatic")}},f4=function(){var a=class extends HTMLElement{};a.observedAttributes=e4;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xContextMenuRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);
17
+ c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.n(this.hasAttribute("open"))?this.removeAttribute("open"):null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xContextMenuLayer");$APP.n(b)?($APP.Pg(b),this.__xContextMenuLayer=null,b=void 0):b=null;return b};a.prototype.attributeChangedCallback=function(b){a:{if($APP.C.i(b,"open")){if($APP.n(this.hasAttribute("open"))){b=null;break a}b=$APP.k(this,"__xContextMenuLayer");if($APP.n(b)){$APP.Pg(b);this.__xContextMenuLayer=
18
+ null;b=void 0;break a}}b=null}return b};b4(a.prototype,"open","open");b4(a.prototype,"disabled","disabled");c4(a.prototype,"placement","placement");c4(a.prototype,"offset","offset");c4(a.prototype,"zIndex","z-index");d4(a.prototype);return a},g4=function(){return $APP.n(customElements.get("x-context-menu"))?null:customElements.define("x-context-menu",f4())},O3=new $APP.K(null,"z-index-raw","z-index-raw",-1179679257),Q3=new $APP.K(null,"z-index","z-index",1892827090),N3=new $APP.K(null,"offset-raw",
19
+ "offset-raw",-1418404095);var e4=["open","disabled","placement","offset","z-index"],P3=new $APP.R(null,new $APP.Q(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null);$APP.ha("baredom.exports.x_context_menu.init",g4);export const init=g4;
package/dist/x-copy.js CHANGED
@@ -1,25 +1,25 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var OB=function(a){return a==null?!0:$APP.C.i(a,"false")?!1:$APP.C.i(a,"0")?!1:!0},PB=function(a){return typeof a==="string"&&$APP.N(a,"")?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:1200):1200},QB=function(a){return Math.min(1E4,Math.max(100,a))},dC=function(a){var b=$APP.M(a);a=$APP.D(b,RB);var c=$APP.D(b,SB),d=$APP.D(b,TB),e=$APP.D(b,$APP.Gh),g=$APP.D(b,$APP.dl),h=$APP.D(b,UB),l=$APP.D(b,VB),m=$APP.D(b,$APP.ul),p=$APP.D(b,WB);b=$APP.D(b,XB);return $APP.zf([YB,$APP.mj,ZB,$B,aC,$APP.Uh,bC,$APP.X,cC,
3
- $APP.il],[OB(b),$APP.C.i(g,"html")?"html":"text",typeof l==="string"&&$APP.N(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():null,QB(PB(c)),typeof d==="string"&&$APP.N(d.trim(),"")?d.trim():null,function(){var q;if(q=typeof h==="string")q=(q=$APP.N(h,""))?h:q;return $APP.n(q)?q:"Copy failed"}(),$APP.F(m),function(){var q;if(q=typeof p==="string")q=(q=$APP.N(p,""))?p:q;return $APP.n(q)?q:"Copied"}(),typeof e==="string"&&$APP.N(e.trim(),"")?e.trim():null])},eC=function(a){var b=
4
- $APP.M(a);a=$APP.D(b,$APP.il);var c=$APP.D(b,$APP.Uh),d=$APP.D(b,ZB);b=$APP.D(b,$APP.mj);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},fC=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
2
+ var kC=function(a){return a==null?!0:$APP.C.i(a,"false")?!1:$APP.C.i(a,"0")?!1:!0},lC=function(a){return typeof a==="string"&&$APP.N(a,"")?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:1200):1200},mC=function(a){return Math.min(1E4,Math.max(100,a))},AC=function(a){var b=$APP.M(a);a=$APP.D(b,nC);var c=$APP.D(b,oC),d=$APP.D(b,pC),e=$APP.D(b,$APP.Jh),g=$APP.D(b,$APP.jl),h=$APP.D(b,qC),l=$APP.D(b,rC),m=$APP.D(b,$APP.Al),p=$APP.D(b,sC);b=$APP.D(b,tC);return $APP.zf([uC,$APP.rj,vC,wC,xC,$APP.Xh,yC,$APP.X,zC,
3
+ $APP.ol],[kC(b),$APP.C.i(g,"html")?"html":"text",typeof l==="string"&&$APP.N(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():null,mC(lC(c)),typeof d==="string"&&$APP.N(d.trim(),"")?d.trim():null,function(){var q;if(q=typeof h==="string")q=(q=$APP.N(h,""))?h:q;return $APP.n(q)?q:"Copy failed"}(),$APP.F(m),function(){var q;if(q=typeof p==="string")q=(q=$APP.N(p,""))?p:q;return $APP.n(q)?q:"Copied"}(),typeof e==="string"&&$APP.N(e.trim(),"")?e.trim():null])},BC=function(a){var b=
4
+ $APP.M(a);a=$APP.D(b,$APP.ol);var c=$APP.D(b,$APP.Xh),d=$APP.D(b,vC);b=$APP.D(b,$APP.rj);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},CC=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
5
5
  c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-copy-tooltip-bg:var(--x-color-bg,#1e293b);--x-copy-tooltip-fg:var(--x-color-text,#f8fafc);--x-copy-tooltip-success-bg:var(--x-color-primary,#15803d);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#b91c1c);--x-copy-tooltip-error-fg:#fef2f2;--x-copy-tooltip-radius:var(--x-radius-md,6px);--x-copy-tooltip-padding:4px 8px;--x-copy-tooltip-font-size:var(--x-font-size-sm,0.8125rem);--x-copy-tooltip-z:100;}@media (prefers-color-scheme:dark){:host{--x-copy-tooltip-bg:var(--x-color-bg,#0f172a);--x-copy-tooltip-fg:var(--x-color-text,#e2e8f0);--x-copy-tooltip-success-bg:var(--x-color-primary,#166534);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#991b1b);--x-copy-tooltip-error-fg:#fee2e2;}}[part\x3dwrap]{display:inline-flex;align-items:center;justify-content:center;}[part\x3dtrigger]{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;}[part\x3dtrigger]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}:host([disabled]) [part\x3dtrigger]{opacity:0.55;pointer-events:none;cursor:default;}[part\x3dtooltip]{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--x-copy-tooltip-bg);color:var(--x-copy-tooltip-fg);border-radius:var(--x-copy-tooltip-radius);padding:var(--x-copy-tooltip-padding);font-size:var(--x-copy-tooltip-font-size);z-index:var(--x-copy-tooltip-z);pointer-events:none;}:host([data-tooltip-open]) [part\x3dtooltip]{display:block;}:host([data-tooltip-kind\x3dsuccess]) [part\x3dtooltip]{background:var(--x-copy-tooltip-success-bg);color:var(--x-copy-tooltip-success-fg);}:host([data-tooltip-kind\x3derror]) [part\x3dtooltip]{background:var(--x-copy-tooltip-error-bg);color:var(--x-copy-tooltip-error-fg);}@media (prefers-reduced-motion:reduce){[part\x3dtrigger]{transition:none;}}";
6
- d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},gC=function(a){return dC($APP.zf([TB,
7
- $APP.Gh,$APP.dl,UB,VB,$APP.ul,WB,XB,RB,SB],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},hC=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.N(b,""))return b;b=a.getAttribute("from");
8
- return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},iC=function(a){var b=hC(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.C.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Dh(new $APP.O(null,
6
+ d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},DC=function(a){return AC($APP.zf([pC,
7
+ $APP.Jh,$APP.jl,qC,rC,$APP.Al,sC,tC,nC,oC],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},EC=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.N(b,""))return b;b=a.getAttribute("from");
8
+ return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},FC=function(a){var b=EC(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.C.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Gh(new $APP.O(null,
9
9
  1,5,$APP.P,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var g=document.createElement("textarea");g.value=b;document.body.appendChild(g);g.select();document.execCommand("copy");g.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
10
- d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},jC=function(a,b,c,d){var e=
11
- $APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},kC=function(a,b,c,d){b=new CustomEvent(b,
12
- {detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},lC=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);var b=gC(a),c=eC(b);c=kC(a,"x-copy-request",c,!0);return $APP.n(c.defaultPrevented)?Promise.resolve(null):iC(a).then(function(d){kC(a,"x-copy-success",{text:$APP.n(d)?d:""},!1);$APP.n(YB.g(b))&&jC(a,"success",cC.g(b),aC.g(b));return d}).catch(function(d){kC(a,"x-copy-error",{error:""+$APP.T.g(d)},!1);$APP.n(YB.g(b))&&jC(a,"error",bC.g(b),aC.g(b));
13
- return Promise.reject(d)})},mC=function(a,b){if(typeof b==="string"&&$APP.N(b,"")){var c=b.toLowerCase().split("+");b=$APP.xc(c);var d=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"ctrl")},c)),e=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"shift")},c)),g=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"alt")},c));c=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"meta")},c));return $APP.C.i(a.key.toLowerCase(),b)&&$APP.C.i(d,a.ctrlKey)&&$APP.C.i(e,a.shiftKey)&&$APP.C.i(g,a.altKey)&&$APP.C.i(c,a.metaKey)}return null},
14
- nC=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.n(mC(e,g))?(e.preventDefault(),lC(a)):null}function c(){return lC(a)}var d=fC(a);$APP.k(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",b);$APP.ja(a,"__xCopyHandlers",{click:c,keydown:b})},oC=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,
15
- "click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},pC=function(a){var b=fC(a),c=a.hasAttribute("disabled");$APP.k(b,"trigger").disabled=$APP.F(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},qC=function(a){for(var b=$APP.t(new $APP.O(null,7,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["text","text"],null),new $APP.O(null,2,5,$APP.P,["from","from"],null),new $APP.O(null,
10
+ d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},GC=function(a,b,c,d){var e=
11
+ $APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},HC=function(a,b,c,d){b=new CustomEvent(b,
12
+ {detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},IC=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);var b=DC(a),c=BC(b);c=HC(a,"x-copy-request",c,!0);return $APP.n(c.defaultPrevented)?Promise.resolve(null):FC(a).then(function(d){HC(a,"x-copy-success",{text:$APP.n(d)?d:""},!1);$APP.n(uC.g(b))&&GC(a,"success",zC.g(b),xC.g(b));return d}).catch(function(d){HC(a,"x-copy-error",{error:""+$APP.T.g(d)},!1);$APP.n(uC.g(b))&&GC(a,"error",yC.g(b),xC.g(b));
13
+ return Promise.reject(d)})},JC=function(a,b){if(typeof b==="string"&&$APP.N(b,"")){var c=b.toLowerCase().split("+");b=$APP.xc(c);var d=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"ctrl")},c)),e=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"shift")},c)),g=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"alt")},c));c=$APP.F($APP.Ud(function(h){return $APP.C.i(h,"meta")},c));return $APP.C.i(a.key.toLowerCase(),b)&&$APP.C.i(d,a.ctrlKey)&&$APP.C.i(e,a.shiftKey)&&$APP.C.i(g,a.altKey)&&$APP.C.i(c,a.metaKey)}return null},
14
+ KC=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.n(JC(e,g))?(e.preventDefault(),IC(a)):null}function c(){return IC(a)}var d=CC(a);$APP.k(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",b);$APP.ja(a,"__xCopyHandlers",{click:c,keydown:b})},LC=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,
15
+ "click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},MC=function(a){var b=CC(a),c=a.hasAttribute("disabled");$APP.k(b,"trigger").disabled=$APP.F(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},NC=function(a){for(var b=$APP.t(new $APP.O(null,7,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["text","text"],null),new $APP.O(null,2,5,$APP.P,["from","from"],null),new $APP.O(null,
16
16
  2,5,$APP.P,["fromAttr","from-attr"],null),new $APP.O(null,2,5,$APP.P,["mode","mode"],null),new $APP.O(null,2,5,$APP.P,["successMessage","success-message"],null),new $APP.O(null,2,5,$APP.P,["errorMessage","error-message"],null),new $APP.O(null,2,5,$APP.P,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null);Object.defineProperty(a,h,{get:function(q,v,x,y,A,B,E){return function(){return this.getAttribute(E)}}(b,c,d,e,g,h,l),set:function(q,
17
- v,x,y,A,B,E){return function(H){return H==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,g,h,l),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.z(b),b=e;else{l=$APP.u(g);var m=$APP.Ac(l,0,null),p=$APP.Ac(l,1,null);Object.defineProperty(a,m,{get:function(q,v,x,y,A,B,E){return function(){return this.getAttribute(E)}}(b,c,d,e,l,m,p,g,h),set:function(q,v,x,y,A,B,E){return function(H){return H==null?this.removeAttribute(E):
18
- this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,l,m,p,g,h),enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(q){return $APP.n(q)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return OB(this.getAttribute("show-tooltip"))},set:function(q){return $APP.n(q)?this.setAttribute("show-tooltip",
19
- "true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return PB(this.getAttribute("tooltip-ms"))},set:function(q){return q==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.T.g(q|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(q){this.__xCopyTextValue=typeof q==="string"?q:void 0},enumerable:!0,
20
- configurable:!0});Object.defineProperty(a,"copy",{value:function(){return lC(this)},enumerable:!0,configurable:!0,writable:!0})},sC=function(){var a=class extends HTMLElement{};a.observedAttributes=rC;a.prototype.connectedCallback=function(){fC(this);oC(this);nC(this);pC(this);return null};a.prototype.disconnectedCallback=function(){oC(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&pC(this);return null};qC(a.prototype);return a},tC=function(){$APP.n(customElements.get("x-copy"))||
21
- customElements.define("x-copy",sC());return null},YB=new $APP.K(null,"show-tooltip?","show-tooltip?",-1214081087),SB=new $APP.K(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),cC=new $APP.K(null,"success-message","success-message",-96541601),UB=new $APP.K(null,"error-message-raw","error-message-raw",1910536231),$B=new $APP.K(null,"hotkey","hotkey",-329017295),bC=new $APP.K(null,"error-message","error-message",1756021561),uC=new $APP.K(null,"fromAttr","fromAttr",-1768252533),VB=new $APP.K(null,
22
- "from-attr-raw","from-attr-raw",761657416),aC=new $APP.K(null,"tooltip-ms","tooltip-ms",1062450417),WB=new $APP.K(null,"success-message-raw","success-message-raw",388691116),TB=new $APP.K(null,"from-raw","from-raw",-44462428),ZB=new $APP.K(null,"from-attr","from-attr",1217901743),RB=new $APP.K(null,"hotkey-raw","hotkey-raw",1972404222),XB=new $APP.K(null,"show-tooltip-raw","show-tooltip-raw",453600717);var rC="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
23
- $APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.Fj,new $APP.K(null,"textValue","textValue",-598870870),$APP.mj,uC,new $APP.K(null,"tooltipMs","tooltipMs",1056463375),$B,$APP.Uh,new $APP.K(null,"showTooltip","showTooltip",482349691),new $APP.K(null,"successMessage","successMessage",-789572803),$APP.il],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"error-message"],null),new $APP.Q(null,2,[$APP.Z,$APP.Sj,$APP.vk,"disabled"],null),new $APP.Q(null,3,[$APP.Z,$APP.Y,$APP.vk,null,new $APP.K(null,
24
- "note","note",1426297904),"property-only override"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"mode"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"from-attr"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.vk,"tooltip-ms"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"hotkey"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"from"],null),new $APP.Q(null,2,[$APP.Z,$APP.Sj,$APP.vk,"show-tooltip"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"success-message"],null),new $APP.Q(null,2,[$APP.Z,
25
- $APP.Y,$APP.vk,"text"],null)]);$APP.Qd(["x-copy-request",new $APP.Q(null,2,[$APP.Rl,!0,$APP.V,new $APP.Q(null,4,[$APP.il,$APP.Y,$APP.mj,$APP.Y,$APP.Uh,$APP.Y,uC,$APP.Y],null)],null),"x-copy-success",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,new $APP.Q(null,1,[$APP.il,$APP.Y],null)],null),"x-copy-error",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,new $APP.Q(null,1,[$APP.vi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_copy.init",tC);export const init=tC;
17
+ v,x,y,A,B,E){return function(G){return G==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.T.g(G))}}(b,c,d,e,g,h,l),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.z(b),b=e;else{l=$APP.u(g);var m=$APP.Ac(l,0,null),p=$APP.Ac(l,1,null);Object.defineProperty(a,m,{get:function(q,v,x,y,A,B,E){return function(){return this.getAttribute(E)}}(b,c,d,e,l,m,p,g,h),set:function(q,v,x,y,A,B,E){return function(G){return G==null?this.removeAttribute(E):
18
+ this.setAttribute(E,""+$APP.T.g(G))}}(b,c,d,e,l,m,p,g,h),enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(q){return $APP.n(q)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return kC(this.getAttribute("show-tooltip"))},set:function(q){return $APP.n(q)?this.setAttribute("show-tooltip",
19
+ "true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return lC(this.getAttribute("tooltip-ms"))},set:function(q){return q==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.T.g(q|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(q){this.__xCopyTextValue=typeof q==="string"?q:void 0},enumerable:!0,
20
+ configurable:!0});Object.defineProperty(a,"copy",{value:function(){return IC(this)},enumerable:!0,configurable:!0,writable:!0})},PC=function(){var a=class extends HTMLElement{};a.observedAttributes=OC;a.prototype.connectedCallback=function(){CC(this);LC(this);KC(this);MC(this);return null};a.prototype.disconnectedCallback=function(){LC(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&MC(this);return null};NC(a.prototype);return a},QC=function(){$APP.n(customElements.get("x-copy"))||
21
+ customElements.define("x-copy",PC());return null},uC=new $APP.K(null,"show-tooltip?","show-tooltip?",-1214081087),oC=new $APP.K(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),zC=new $APP.K(null,"success-message","success-message",-96541601),qC=new $APP.K(null,"error-message-raw","error-message-raw",1910536231),wC=new $APP.K(null,"hotkey","hotkey",-329017295),yC=new $APP.K(null,"error-message","error-message",1756021561),RC=new $APP.K(null,"fromAttr","fromAttr",-1768252533),rC=new $APP.K(null,
22
+ "from-attr-raw","from-attr-raw",761657416),xC=new $APP.K(null,"tooltip-ms","tooltip-ms",1062450417),sC=new $APP.K(null,"success-message-raw","success-message-raw",388691116),pC=new $APP.K(null,"from-raw","from-raw",-44462428),vC=new $APP.K(null,"from-attr","from-attr",1217901743),nC=new $APP.K(null,"hotkey-raw","hotkey-raw",1972404222),tC=new $APP.K(null,"show-tooltip-raw","show-tooltip-raw",453600717);var OC="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
23
+ $APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.Nj,new $APP.K(null,"textValue","textValue",-598870870),$APP.rj,RC,new $APP.K(null,"tooltipMs","tooltipMs",1056463375),wC,$APP.Xh,new $APP.K(null,"showTooltip","showTooltip",482349691),new $APP.K(null,"successMessage","successMessage",-789572803),$APP.ol],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"error-message"],null),new $APP.Q(null,2,[$APP.Z,$APP.Xj,$APP.Bk,"disabled"],null),new $APP.Q(null,3,[$APP.Z,$APP.Y,$APP.Bk,null,new $APP.K(null,
24
+ "note","note",1426297904),"property-only override"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"mode"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"from-attr"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Bk,"tooltip-ms"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"hotkey"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"from"],null),new $APP.Q(null,2,[$APP.Z,$APP.Xj,$APP.Bk,"show-tooltip"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"success-message"],null),new $APP.Q(null,2,[$APP.Z,
25
+ $APP.Y,$APP.Bk,"text"],null)]);$APP.Qd(["x-copy-request",new $APP.Q(null,2,[$APP.Yl,!0,$APP.V,new $APP.Q(null,4,[$APP.ol,$APP.Y,$APP.rj,$APP.Y,$APP.Xh,$APP.Y,RC,$APP.Y],null)],null),"x-copy-success",new $APP.Q(null,2,[$APP.Yl,!1,$APP.V,new $APP.Q(null,1,[$APP.ol,$APP.Y],null)],null),"x-copy-error",new $APP.Q(null,2,[$APP.Yl,!1,$APP.V,new $APP.Q(null,1,[$APP.zi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_copy.init",QC);export const init=QC;
@@ -1,24 +1,24 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var qN=function(a){a=(""+$APP.T.g($APP.n(a)?a:"")).trim().toUpperCase();return $APP.C.i(a,"")?"USD":a},rN=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},sN=function(a,b){try{var c=(new Intl.NumberFormat($APP.C.i(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.Ud(function(e){return $APP.C.i("currency",e.type)?e.value:null},$APP.uc(c));return $APP.n(d)?d:a}catch(e){return a}},tN=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.C.i(b,
3
- "")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},uN=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),g=document.createElement("div"),h=document.createElement("span"),l=document.createElement("input"),m=document.createElement("span"),p=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-currency-field-bg:var(--x-color-surface,#ffffff);--x-currency-field-color:var(--x-color-text,#111827);--x-currency-field-border:1px solid var(--x-color-border,#d1d5db);--x-currency-field-border-radius:var(--x-radius-md,6px);--x-currency-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-currency-field-symbol-color:var(--x-color-text-muted,#6b7280);--x-currency-field-label-color:var(--x-color-text-muted,#374151);--x-currency-field-hint-color:var(--x-color-text-muted,#6b7280);--x-currency-field-error-color:var(--x-color-danger,#dc2626);--x-currency-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-currency-field-bg:var(--x-color-surface-hover,#1f2937);--x-currency-field-color:var(--x-color-text,#f9fafb);--x-currency-field-border:1px solid var(--x-color-border,#4b5563);--x-currency-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-currency-field-symbol-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-label-color:var(--x-color-text-muted,#d1d5db);--x-currency-field-hint-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-error-color:var(--x-color-danger,#f87171);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:0.875rem;font-weight:500;color:var(--x-currency-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:flex;align-items:center;background:var(--x-currency-field-bg);border:var(--x-currency-field-border);border-radius:var(--x-currency-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput-wrapper]:focus-within{border-color:var(--x-currency-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput-wrapper]{border-color:var(--x-currency-field-error-color);}:host([data-invalid]) [part\x3dinput-wrapper]:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-error-color) 20%,transparent);}[part\x3dsymbol]{flex-shrink:0;padding:0.5rem 0 0.5rem 0.75rem;font-size:1rem;color:var(--x-currency-field-symbol-color);user-select:none;pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.75rem;background:transparent;color:var(--x-currency-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]:disabled{opacity:1;cursor:not-allowed;}:host([disabled]) [part\x3dinput-wrapper]{opacity:var(--x-currency-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-currency-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-currency-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput-wrapper]{transition:none;}}";
2
+ var NN=function(a){a=(""+$APP.T.g($APP.n(a)?a:"")).trim().toUpperCase();return $APP.C.i(a,"")?"USD":a},ON=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},PN=function(a,b){try{var c=(new Intl.NumberFormat($APP.C.i(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.Ud(function(e){return $APP.C.i("currency",e.type)?e.value:null},$APP.uc(c));return $APP.n(d)?d:a}catch(e){return a}},QN=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.C.i(b,
3
+ "")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},RN=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),g=document.createElement("div"),h=document.createElement("span"),l=document.createElement("input"),m=document.createElement("span"),p=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-currency-field-bg:var(--x-color-surface,#ffffff);--x-currency-field-color:var(--x-color-text,#111827);--x-currency-field-border:1px solid var(--x-color-border,#d1d5db);--x-currency-field-border-radius:var(--x-radius-md,6px);--x-currency-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-currency-field-symbol-color:var(--x-color-text-muted,#6b7280);--x-currency-field-label-color:var(--x-color-text-muted,#374151);--x-currency-field-hint-color:var(--x-color-text-muted,#6b7280);--x-currency-field-error-color:var(--x-color-danger,#dc2626);--x-currency-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-currency-field-bg:var(--x-color-surface-hover,#1f2937);--x-currency-field-color:var(--x-color-text,#f9fafb);--x-currency-field-border:1px solid var(--x-color-border,#4b5563);--x-currency-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-currency-field-symbol-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-label-color:var(--x-color-text-muted,#d1d5db);--x-currency-field-hint-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-error-color:var(--x-color-danger,#f87171);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:0.875rem;font-weight:500;color:var(--x-currency-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:flex;align-items:center;background:var(--x-currency-field-bg);border:var(--x-currency-field-border);border-radius:var(--x-currency-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput-wrapper]:focus-within{border-color:var(--x-currency-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput-wrapper]{border-color:var(--x-currency-field-error-color);}:host([data-invalid]) [part\x3dinput-wrapper]:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-error-color) 20%,transparent);}[part\x3dsymbol]{flex-shrink:0;padding:0.5rem 0 0.5rem 0.75rem;font-size:1rem;color:var(--x-currency-field-symbol-color);user-select:none;pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.75rem;background:transparent;color:var(--x-currency-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]:disabled{opacity:1;cursor:not-allowed;}:host([disabled]) [part\x3dinput-wrapper]{opacity:var(--x-currency-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-currency-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-currency-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput-wrapper]{transition:none;}}";
4
4
  d.setAttribute("part","field");e.setAttribute("part","label");e.setAttribute("id","label");e.setAttribute("for","input");g.setAttribute("part","input-wrapper");h.setAttribute("part","symbol");h.setAttribute("aria-hidden","true");l.setAttribute("part","input");l.setAttribute("id","input");l.setAttribute("inputmode","decimal");l.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");p.setAttribute("part","error");p.setAttribute("id",
5
- "error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");g.appendChild(h);g.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(m);d.appendChild(p);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:g,symbol:h,input:l,hint:m,error:p}},vN=function(a,b,c,d){var e=a.hasAttribute("error");var g=a.getAttribute("error");g=$APP.n(g)?g:"";var h=a.hasAttribute("required"),l=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var p=
5
+ "error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");g.appendChild(h);g.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(m);d.appendChild(p);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:g,symbol:h,input:l,hint:m,error:p}},SN=function(a,b,c,d){var e=a.hasAttribute("error");var g=a.getAttribute("error");g=$APP.n(g)?g:"";var h=a.hasAttribute("required"),l=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var p=
6
6
  $APP.r(isNaN(a));l=$APP.n(l)?parseFloat(l):null;m=$APP.n(m)?parseFloat(m):null;return $APP.n(e)?b.setValidity({customError:!0},g,c):$APP.n($APP.n(h)?$APP.C.i(d,""):h)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):$APP.N(d,"")&&!p?b.setValidity({badInput:!0},"Please enter a valid number.",c):$APP.n(p?$APP.n(l)?$APP.r(isNaN(l))&&a<l:l:p)?b.setValidity({rangeUnderflow:!0},"Value must be at least "+$APP.T.g(l)+".",c):$APP.n(p?$APP.n(m)?$APP.r(isNaN(m))&&a>m:m:p)?b.setValidity({rangeOverflow:!0},
7
- "Value must be at most "+$APP.T.g(m)+".",c):b.setValidity({},"",c)},AN=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"symbol"),e=$APP.k(b,"input"),g=$APP.k(b,"hint");b=$APP.k(b,"error");var h=$APP.zf([$APP.ki,wN,$APP.gl,$APP.Ai,$APP.Ri,$APP.ul,xN,$APP.Ih,$APP.Jk,$APP.Bj,$APP.jm,yN,$APP.Gi],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),
8
- a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.M(h);h=$APP.D(l,$APP.Gi);var m=$APP.D(l,$APP.ki),p=$APP.D(l,wN),q=$APP.D(l,$APP.gl),v=$APP.D(l,$APP.Ai),x=$APP.D(l,$APP.Ri),y=$APP.D(l,$APP.ul),A=$APP.D(l,xN),B=$APP.D(l,$APP.Ih),E=$APP.D(l,$APP.Jk),H=$APP.D(l,$APP.Bj),G=$APP.D(l,$APP.jm);l=$APP.D(l,yN);var J=$APP.n(v)?v:"",R=$APP.n(x)?x:"",aa=$APP.n(m)?m:"";h=$APP.zf([$APP.Zj,$APP.hi,
9
- $APP.Im,$APP.Yl,$APP.oi,$APP.Jm,$APP.qj,$APP.Pi,$APP.jl,$APP.Kk,$APP.El,zN,$APP.Gk,$APP.U,$APP.vi,$APP.X],[$APP.n(A)?A:"",$APP.F(B),$APP.F(H),$APP.n(h)?h:"",typeof x==="string"&&$APP.N(x,""),$APP.n(l)?l:"",$APP.n(q)?q:"",$APP.n(G)?G:"",typeof m==="string"&&$APP.N(m,""),typeof v==="string"&&$APP.N(v,""),R,qN(p),$APP.n(E)?E:"",aa,J,$APP.F(y)]);m=$APP.Kk.g(h);$APP.n(m)?p=null:(v=$APP.M(h),p=$APP.D(v,$APP.Pi),q=$APP.D(v,$APP.Zj),v=$APP.D(v,$APP.Gk),x=parseFloat(p),y=$APP.N(p,"")&&$APP.r(isNaN(x)),A=$APP.N(q,
10
- "")?parseFloat(q):null,B=$APP.N(v,"")?parseFloat(v):null,p=$APP.N(p,"")&&!y?"Please enter a valid number.":$APP.n(y?$APP.n(A)?$APP.r(isNaN(A))&&x<A:A:y)?"Value must be at least "+$APP.T.g(q)+".":$APP.n(y?$APP.n(B)?$APP.r(isNaN(B))&&x>B:B:y)?"Value must be at most "+$APP.T.g(v)+".":"");q=p;p=$APP.n(m)?m:$APP.N($APP.n(q)?q:"","");m=$APP.n(m)?$APP.vi.g(h):$APP.n(q)?q:"";q=$APP.oi.g(h);v=$APP.jl.g(h);y=zN.g(h);x=$APP.Jm.g(h);d.textContent=sN(y,x);e.name=$APP.qj.g(h);e.placeholder=$APP.Yl.g(h);e.disabled=
11
- $APP.X.g(h);e.readOnly=$APP.Im.g(h);e.required=$APP.hi.g(h);d=$APP.n($APP.hi.g(h))?"true":"false";e.setAttribute("aria-required",d);e.setAttribute("aria-invalid",$APP.n(p)?"true":"false");d=$APP.n($APP.n(q)?p:q)?"hint error":$APP.n(q)?"hint":$APP.n(p)?"error":null;$APP.n(d)?e.setAttribute("aria-describedby",d):e.removeAttribute("aria-describedby");$APP.C.i(e,a.shadowRoot.activeElement)||(d=$APP.Pi.g(h),e.value=$APP.C.i(d,"")?"":tN(d,x));c.textContent=$APP.U.g(h);$APP.n(v)?c.classList.remove("label-hidden"):
12
- c.classList.add("label-hidden");g.textContent=$APP.El.g(h);$APP.n(q)?g.classList.remove("hint-hidden"):g.classList.add("hint-hidden");b.textContent=m;$APP.n(p)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");rN(a,"data-invalid",p);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(g=a.getAttribute("value"),a=vN(a,c,e,$APP.n(g)?g:"")):a=null;return a}return null},BN=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},CN=function(a){return function(){var b=
13
- $APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}},DN=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),vN(a,e,b,c));return BN(a,"x-currency-field-input",{name:d,value:c})}return null}},EN=function(a){return function(){var b=
14
- $APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.T.g(d);d=a.getAttribute("name");d=$APP.n(d)?d:"";a.setAttribute("value",c);var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),vN(a,e,b,c));return BN(a,"x-currency-field-change",{name:d,value:c})}return null}},FN=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=CN(a),d=DN(a),e=EN(a);b.addEventListener("focus",
15
- c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},GN=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xCurrencyFieldHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("focus",$APP.k(c,"focus"));b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xCurrencyFieldHandlers=null;return}}return null},HN=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||
16
- (uN(a),$APP.n(a.attachInternals)&&$APP.ja(a,"__xCurrencyFieldInternals",a.attachInternals()));GN(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");qN(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=tN(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?e:""}());FN(a);return AN(a)},IN=function(a,
17
- 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}})},JN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return rN(this,c,$APP.F(d))}})},KN=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=
18
- this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.N(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");qN(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.C.i(c,this.shadowRoot.activeElement)?null:c.value=$APP.C.i(b,"")?"":tN(b,d)}return null}})},MN=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;a.observedAttributes=
19
- LN;KN(b);IN(b,"name","name");IN(b,"currency","currency");IN(b,"locale","locale");IN(b,"min","min");IN(b,"max","max");IN(b,"placeholder","placeholder");IN(b,"label","label");IN(b,"hint","hint");IN(b,"error","error");JN(b,"disabled","disabled");JN(b,"readOnly","readonly");JN(b,"required","required");b.connectedCallback=function(){return HN(this)};b.disconnectedCallback=function(){return GN(this)};b.attributeChangedCallback=function(c,d,e){$APP.C.i(c,"value")&&(c=$APP.k(this,"__xCurrencyFieldRefs"),
20
- $APP.n(c)&&(c=$APP.k(c,"input"),$APP.C.i(c,this.shadowRoot.activeElement)||(qN(this.getAttribute("currency")),d=this.getAttribute("locale"),d=$APP.n(d)?d:"",c.value=e==null||$APP.C.i(e,"")?"":tN(e,d))));return AN(this)};b.formDisabledCallback=function(c){rN(this,"disabled",$APP.F(c));return AN(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.k(this,"__xCurrencyFieldRefs");$APP.n(c)&&($APP.k(c,"input").value="");c=$APP.k(this,"__xCurrencyFieldInternals");$APP.n(c)&&c.setFormValue("");
21
- return AN(this)};b.checkValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.reportValidity():!0};return a},NN=function(){return $APP.n(customElements.get("x-currency-field"))?null:customElements.define("x-currency-field",MN())},xN=new $APP.K(null,"min-raw","min-raw",183137548),zN=new $APP.K(null,"currency","currency",-898327568),yN=new $APP.K(null,"locale-raw",
22
- "locale-raw",385401846),wN=new $APP.K(null,"currency-raw","currency-raw",1169887491);var LN="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
23
- $APP.zf([$APP.Zj,$APP.Yl,$APP.Fj,$APP.Jm,$APP.qj,$APP.Pi,$APP.El,zN,$APP.Tl,$APP.Gk,$APP.U,$APP.vi,$APP.rk],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"min"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.Sj,$APP.vk,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"locale"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"hint"],
24
- null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"currency"],null),new $APP.Q(null,2,[$APP.Z,$APP.Sj,$APP.vk,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"max"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.vk,"error"],null),new $APP.Q(null,2,[$APP.Z,$APP.Sj,$APP.vk,"required"],null)]);$APP.ha("baredom.exports.x_currency_field.init",NN);export const init=NN;
7
+ "Value must be at most "+$APP.T.g(m)+".",c):b.setValidity({},"",c)},XN=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"symbol"),e=$APP.k(b,"input"),g=$APP.k(b,"hint");b=$APP.k(b,"error");var h=$APP.zf([$APP.ni,TN,$APP.ml,$APP.Ei,$APP.Vi,$APP.Al,UN,$APP.Lh,$APP.Pk,$APP.Gj,$APP.qm,VN,$APP.Ki],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),
8
+ a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.M(h);h=$APP.D(l,$APP.Ki);var m=$APP.D(l,$APP.ni),p=$APP.D(l,TN),q=$APP.D(l,$APP.ml),v=$APP.D(l,$APP.Ei),x=$APP.D(l,$APP.Vi),y=$APP.D(l,$APP.Al),A=$APP.D(l,UN),B=$APP.D(l,$APP.Lh),E=$APP.D(l,$APP.Pk),G=$APP.D(l,$APP.Gj),H=$APP.D(l,$APP.qm);l=$APP.D(l,VN);var J=$APP.n(v)?v:"",S=$APP.n(x)?x:"",aa=$APP.n(m)?m:"";h=$APP.zf([$APP.ek,$APP.ki,
9
+ $APP.Pm,$APP.lm,$APP.ri,$APP.Qm,$APP.vj,$APP.Ti,$APP.pl,$APP.Qk,$APP.Ll,WN,$APP.Mk,$APP.U,$APP.zi,$APP.X],[$APP.n(A)?A:"",$APP.F(B),$APP.F(G),$APP.n(h)?h:"",typeof x==="string"&&$APP.N(x,""),$APP.n(l)?l:"",$APP.n(q)?q:"",$APP.n(H)?H:"",typeof m==="string"&&$APP.N(m,""),typeof v==="string"&&$APP.N(v,""),S,NN(p),$APP.n(E)?E:"",aa,J,$APP.F(y)]);m=$APP.Qk.g(h);$APP.n(m)?p=null:(v=$APP.M(h),p=$APP.D(v,$APP.Ti),q=$APP.D(v,$APP.ek),v=$APP.D(v,$APP.Mk),x=parseFloat(p),y=$APP.N(p,"")&&$APP.r(isNaN(x)),A=$APP.N(q,
10
+ "")?parseFloat(q):null,B=$APP.N(v,"")?parseFloat(v):null,p=$APP.N(p,"")&&!y?"Please enter a valid number.":$APP.n(y?$APP.n(A)?$APP.r(isNaN(A))&&x<A:A:y)?"Value must be at least "+$APP.T.g(q)+".":$APP.n(y?$APP.n(B)?$APP.r(isNaN(B))&&x>B:B:y)?"Value must be at most "+$APP.T.g(v)+".":"");q=p;p=$APP.n(m)?m:$APP.N($APP.n(q)?q:"","");m=$APP.n(m)?$APP.zi.g(h):$APP.n(q)?q:"";q=$APP.ri.g(h);v=$APP.pl.g(h);y=WN.g(h);x=$APP.Qm.g(h);d.textContent=PN(y,x);e.name=$APP.vj.g(h);e.placeholder=$APP.lm.g(h);e.disabled=
11
+ $APP.X.g(h);e.readOnly=$APP.Pm.g(h);e.required=$APP.ki.g(h);d=$APP.n($APP.ki.g(h))?"true":"false";e.setAttribute("aria-required",d);e.setAttribute("aria-invalid",$APP.n(p)?"true":"false");d=$APP.n($APP.n(q)?p:q)?"hint error":$APP.n(q)?"hint":$APP.n(p)?"error":null;$APP.n(d)?e.setAttribute("aria-describedby",d):e.removeAttribute("aria-describedby");$APP.C.i(e,a.shadowRoot.activeElement)||(d=$APP.Ti.g(h),e.value=$APP.C.i(d,"")?"":QN(d,x));c.textContent=$APP.U.g(h);$APP.n(v)?c.classList.remove("label-hidden"):
12
+ c.classList.add("label-hidden");g.textContent=$APP.Ll.g(h);$APP.n(q)?g.classList.remove("hint-hidden"):g.classList.add("hint-hidden");b.textContent=m;$APP.n(p)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");ON(a,"data-invalid",p);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(g=a.getAttribute("value"),a=SN(a,c,e,$APP.n(g)?g:"")):a=null;return a}return null},YN=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},ZN=function(a){return function(){var b=
13
+ $APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}},$N=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),SN(a,e,b,c));return YN(a,"x-currency-field-input",{name:d,value:c})}return null}},aO=function(a){return function(){var b=
14
+ $APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.T.g(d);d=a.getAttribute("name");d=$APP.n(d)?d:"";a.setAttribute("value",c);var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),SN(a,e,b,c));return YN(a,"x-currency-field-change",{name:d,value:c})}return null}},bO=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=ZN(a),d=$N(a),e=aO(a);b.addEventListener("focus",
15
+ c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},cO=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xCurrencyFieldHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("focus",$APP.k(c,"focus"));b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xCurrencyFieldHandlers=null;return}}return null},dO=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||
16
+ (RN(a),$APP.n(a.attachInternals)&&$APP.ja(a,"__xCurrencyFieldInternals",a.attachInternals()));cO(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");NN(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=QN(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?e:""}());bO(a);return XN(a)},eO=function(a,
17
+ 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}})},fO=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return ON(this,c,$APP.F(d))}})},gO=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=
18
+ this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.N(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");NN(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.C.i(c,this.shadowRoot.activeElement)?null:c.value=$APP.C.i(b,"")?"":QN(b,d)}return null}})},iO=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;a.observedAttributes=
19
+ hO;gO(b);eO(b,"name","name");eO(b,"currency","currency");eO(b,"locale","locale");eO(b,"min","min");eO(b,"max","max");eO(b,"placeholder","placeholder");eO(b,"label","label");eO(b,"hint","hint");eO(b,"error","error");fO(b,"disabled","disabled");fO(b,"readOnly","readonly");fO(b,"required","required");b.connectedCallback=function(){return dO(this)};b.disconnectedCallback=function(){return cO(this)};b.attributeChangedCallback=function(c,d,e){$APP.C.i(c,"value")&&(c=$APP.k(this,"__xCurrencyFieldRefs"),
20
+ $APP.n(c)&&(c=$APP.k(c,"input"),$APP.C.i(c,this.shadowRoot.activeElement)||(NN(this.getAttribute("currency")),d=this.getAttribute("locale"),d=$APP.n(d)?d:"",c.value=e==null||$APP.C.i(e,"")?"":QN(e,d))));return XN(this)};b.formDisabledCallback=function(c){ON(this,"disabled",$APP.F(c));return XN(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.k(this,"__xCurrencyFieldRefs");$APP.n(c)&&($APP.k(c,"input").value="");c=$APP.k(this,"__xCurrencyFieldInternals");$APP.n(c)&&c.setFormValue("");
21
+ return XN(this)};b.checkValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.reportValidity():!0};return a},jO=function(){return $APP.n(customElements.get("x-currency-field"))?null:customElements.define("x-currency-field",iO())},UN=new $APP.K(null,"min-raw","min-raw",183137548),WN=new $APP.K(null,"currency","currency",-898327568),VN=new $APP.K(null,"locale-raw",
22
+ "locale-raw",385401846),TN=new $APP.K(null,"currency-raw","currency-raw",1169887491);var hO="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
23
+ $APP.zf([$APP.ek,$APP.lm,$APP.Nj,$APP.Qm,$APP.vj,$APP.Ti,$APP.Ll,WN,$APP.$l,$APP.Mk,$APP.U,$APP.zi,$APP.wk],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"min"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.Xj,$APP.Bk,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"locale"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"hint"],
24
+ null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"currency"],null),new $APP.Q(null,2,[$APP.Z,$APP.Xj,$APP.Bk,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"max"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Bk,"error"],null),new $APP.Q(null,2,[$APP.Z,$APP.Xj,$APP.Bk,"required"],null)]);$APP.ha("baredom.exports.x_currency_field.init",jO);export const init=jO;