@vanelsas/baredom 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +12 -41
  3. package/custom-elements.json +344 -5
  4. package/dist/baredom.d.ts +4 -0
  5. package/dist/base.js +451 -421
  6. package/dist/integrity.json +97 -93
  7. package/dist/x-alert.js +17 -19
  8. package/dist/x-avatar-group.js +9 -11
  9. package/dist/x-avatar.js +15 -15
  10. package/dist/x-badge.js +9 -11
  11. package/dist/x-bento-grid.js +5 -5
  12. package/dist/x-bento-item.js +4 -4
  13. package/dist/x-breadcrumbs.js +13 -14
  14. package/dist/x-button.js +16 -16
  15. package/dist/x-cancel-dialogue.js +13 -17
  16. package/dist/x-card.js +7 -7
  17. package/dist/x-carousel.js +33 -34
  18. package/dist/x-chart.d.ts +26 -0
  19. package/dist/x-chart.js +47 -48
  20. package/dist/x-checkbox.js +11 -11
  21. package/dist/x-chip.js +1 -9
  22. package/dist/x-collapse.js +10 -12
  23. package/dist/x-color-picker.js +44 -45
  24. package/dist/x-combobox.js +26 -27
  25. package/dist/x-command-palette.js +26 -27
  26. package/dist/x-container.js +5 -6
  27. package/dist/x-context-menu.d.ts +31 -2
  28. package/dist/x-context-menu.js +20 -18
  29. package/dist/x-copy.js +20 -23
  30. package/dist/x-currency-field.js +23 -25
  31. package/dist/x-date-picker.d.ts +27 -0
  32. package/dist/x-date-picker.js +42 -42
  33. package/dist/x-divider.js +9 -10
  34. package/dist/x-drawer.js +10 -12
  35. package/dist/x-dropdown.js +11 -11
  36. package/dist/x-fieldset.js +5 -6
  37. package/dist/x-file-download.js +7 -8
  38. package/dist/x-file-upload.js +22 -25
  39. package/dist/x-form-field.js +15 -17
  40. package/dist/x-form.js +9 -10
  41. package/dist/x-gaussian-blur.js +13 -19
  42. package/dist/x-grid.js +6 -6
  43. package/dist/x-i18n-provider.d.ts +43 -0
  44. package/dist/x-i18n-provider.js +8 -0
  45. package/dist/x-i18n.d.ts +14 -0
  46. package/dist/x-i18n.js +5 -0
  47. package/dist/x-icon.js +6 -7
  48. package/dist/x-image.js +18 -19
  49. package/dist/x-kinetic-canvas.d.ts +18 -0
  50. package/dist/x-kinetic-canvas.js +26 -0
  51. package/dist/x-kinetic-font.js +27 -29
  52. package/dist/x-kinetic-typography.js +33 -39
  53. package/dist/x-liquid-dock.js +39 -39
  54. package/dist/x-liquid-fill.js +45 -45
  55. package/dist/x-liquid-glass.js +47 -47
  56. package/dist/x-menu-item.js +8 -10
  57. package/dist/x-menu.js +10 -11
  58. package/dist/x-metaball-cursor.js +27 -27
  59. package/dist/x-modal.js +11 -13
  60. package/dist/x-morph-stack.js +37 -39
  61. package/dist/x-multi-combobox.d.ts +50 -0
  62. package/dist/x-multi-combobox.js +37 -0
  63. package/dist/x-navbar.js +12 -13
  64. package/dist/x-neural-glow.js +33 -34
  65. package/dist/x-notification-center.js +9 -10
  66. package/dist/x-organic-divider.js +17 -19
  67. package/dist/x-organic-progress.js +38 -39
  68. package/dist/x-organic-shape.js +13 -14
  69. package/dist/x-pagination.js +15 -17
  70. package/dist/x-particle-button.js +51 -52
  71. package/dist/x-popover.js +26 -25
  72. package/dist/x-progress-circle.js +9 -11
  73. package/dist/x-progress.js +10 -11
  74. package/dist/x-radio.js +11 -12
  75. package/dist/x-ripple-effect.js +11 -12
  76. package/dist/x-scroll-parallax.js +18 -19
  77. package/dist/x-scroll-stack.js +17 -18
  78. package/dist/x-scroll-story.js +34 -36
  79. package/dist/x-scroll-timeline.js +45 -47
  80. package/dist/x-scroll.js +40 -42
  81. package/dist/x-search-field.js +15 -17
  82. package/dist/x-select.js +11 -11
  83. package/dist/x-sidebar.js +17 -17
  84. package/dist/x-skeleton-group.js +12 -14
  85. package/dist/x-skeleton.js +1 -1
  86. package/dist/x-slider.js +15 -18
  87. package/dist/x-soft-body.js +22 -22
  88. package/dist/x-spacer.js +4 -5
  89. package/dist/x-spinner.js +4 -6
  90. package/dist/x-splash.js +12 -13
  91. package/dist/x-stat.js +10 -12
  92. package/dist/x-stepper.js +14 -15
  93. package/dist/x-switch.js +10 -11
  94. package/dist/x-tab.js +7 -8
  95. package/dist/x-table-cell.js +20 -24
  96. package/dist/x-table-row.js +8 -10
  97. package/dist/x-table.js +12 -16
  98. package/dist/x-tabs.js +11 -11
  99. package/dist/x-text-area.js +19 -21
  100. package/dist/x-theme.d.ts +1 -1
  101. package/dist/x-theme.js +25 -25
  102. package/dist/x-timeline-item.js +21 -23
  103. package/dist/x-timeline.js +8 -9
  104. package/dist/x-toast.js +22 -24
  105. package/dist/x-toaster.js +8 -8
  106. package/dist/x-tooltip.js +12 -13
  107. package/dist/x-typography.js +9 -11
  108. package/dist/x-welcome-tour.js +60 -65
  109. package/package.json +201 -181
@@ -1,46 +1,45 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var EA=function(a,b){return $APP.ph.i($APP.oh.i(a,0),b)},FA=function(a){return $APP.fd(a,360)},GA=function(a){return EA(a,100)},HA=function(a){return EA(a,1)},JA=function(a){var b=typeof a==="string";a=b?$APP.eg(IA,a.trim()):b;return $APP.F(a)},NA=function(a){if(typeof a==="string")if(a=$APP.eg(IA,a.trim()),$APP.n(a))switch($APP.Ac(a,0,null),a=$APP.Ac(a,1,null),$APP.z(a)){case 3:var b=parseInt(""+$APP.T.g($APP.pc(a,0))+$APP.T.g($APP.pc(a,0)),16),c=parseInt(""+$APP.T.g($APP.pc(a,1))+$APP.T.g($APP.pc(a,
3
- 1)),16),d=parseInt(""+$APP.T.g($APP.pc(a,2))+$APP.T.g($APP.pc(a,2)),16);return new $APP.Q(null,4,[KA,b,$APP.Rl,c,LA,d,MA,1],null);case 6:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.Q(null,4,[KA,b,$APP.Rl,c,LA,d,MA,1],null);case 8:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.Q(null,4,[KA,b,$APP.Rl,c,LA,d,MA,parseInt(a.substring(6,8),16)/255],null);default:return null}else return null;
4
- else return null},RA=function(a,b,c){a/=255;b/=255;c/=255;var d=$APP.oh.C(a,b,$APP.uc([c])),e=$APP.ph.C(a,b,$APP.uc([c])),g=(d+e)/2,h=d-e;return h===0?new $APP.Q(null,3,[OA,0,PA,0,QA,g*100],null):new $APP.Q(null,3,[OA,(d===a?((b-c)/h+(b<c?6:0))/6:d===b?((c-a)/h+2)/6:((a-b)/h+4)/6)*360,PA,(g>.5?h/(2-d-e):h/(d+e))*100,QA,g*100],null)},SA=function(a,b,c){c=c<0?c+1:c>1?c-1:c;return c<1/6?a+(b-a)*6*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},TA=function(a,b,c){a=FA(a)/360;b=GA(b)/100;c=GA(c)/100;if(b===0)return a=
5
- Math.round(c*255),new $APP.Q(null,3,[KA,a,$APP.Rl,a,LA,a],null);b=c<.5?c*(1+b):c+b-c*b;c=2*c-b;return new $APP.Q(null,3,[KA,Math.round(SA(c,b,a+1/3)*255),$APP.Rl,Math.round(SA(c,b,a)*255),LA,Math.round(SA(c,b,a-1/3)*255)],null)},UA=function(a,b,c){function d(e){e=EA(Math.round(e),255).toString(16);return $APP.z(e)<2?"0"+$APP.T.g(e):e}return"#"+$APP.T.g(d(a))+$APP.T.g(d(b))+$APP.T.g(d(c))},VA=function(a,b,c,d){function e(g){g=EA(Math.round(g),255).toString(16);return $APP.z(g)<2?"0"+$APP.T.g(g):g}
6
- return"#"+$APP.T.g(e(a))+$APP.T.g(e(b))+$APP.T.g(e(c))+$APP.T.g(e(HA(d)*255))},XA=function(a,b,c){b=GA(b)/100;c=GA(c)/100;b=c+b*$APP.ph.i(c,1-c);return new $APP.Q(null,3,[OA,FA(a),PA,(b===0?0:2*(1-c/b))*100,WA,b*100],null)},YA=function(a,b,c){b=GA(b)/100;c=GA(c)/100;b=c*(1-b/2);c=b===0||b===1?0:(c-b)/$APP.ph.i(b,1-b);return new $APP.Q(null,3,[OA,FA(a),PA,c*100,QA,b*100],null)},ZA=function(a,b){return new $APP.Q(null,2,[$APP.Ll,GA(a),$APP.Kl,100-GA(b)],null)},$A=function(a){return typeof a==="string"&&
7
- JA(a)?(a=NA(a),$APP.n(a)?UA(KA.g(a),$APP.Rl.g(a),LA.g(a)):null):"#000000"},bB=function(a){return typeof a==="string"&&$APP.I(aB,a.trim().toLowerCase())?a.trim().toLowerCase():"inline"},cB=function(a){return typeof a==="string"&&$APP.Lg(a)?$APP.We.m($APP.fe,$APP.th.m($APP.ae.g($APP.Jg),$APP.ce(JA),$APP.ae.g(function(b){b=NA(b);var c=$APP.M(b);b=$APP.D(c,KA);var d=$APP.D(c,$APP.Rl);c=$APP.D(c,LA);return UA(b,d,c)})),$APP.Hg(a,/,/)):$APP.fe},iB=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.im),d=$APP.D(b,
8
- $APP.Pj),e=$APP.D(b,$APP.Yi);a=$APP.D(b,$APP.Aj);var g=$APP.D(b,$APP.Bj),h=$APP.D(b,$APP.wj),l=$APP.D(b,dB),m=$APP.D(b,$APP.U),p=$APP.D(b,eB);b=$A(e);var q=function(){var H=NA(e);return $APP.n(H)?H:NA("#000000")}(),v=$APP.M(q);q=$APP.D(v,KA);var x=$APP.D(v,$APP.Rl),y=$APP.D(v,LA);v=$APP.D(v,MA);var A=function(){var H=typeof e==="string";if(H){H=e.trim();var G=$APP.eg(IA,H);$APP.n(G)?(H=$APP.eg(IA,H),H=$APP.u($APP.w(H)),H=8===$APP.z(H)):H=G;return H}return H}();v=$APP.n(A)?v:1;A=RA(q,x,y);var C=$APP.M(A);
9
- A=$APP.D(C,OA);var E=$APP.D(C,PA);C=$APP.D(C,QA);d=$APP.Kg(d);g=$APP.Kg(g);p=p!=null;c=c!=null;h=bB(h);return $APP.zf([$APP.dn,fB,$APP.Aj,$APP.wj,dB,PA,QA,gB,OA,$APP.U,$APP.Om,hB,$APP.X,MA],[g,p,$APP.Lg(a)?a:null,h,cB(l),E,C,b,A,$APP.Lg(m)?m:null,$APP.B.i(h,"popover")&&c,p&&v<1?VA(q,x,y,v):b,d,v])},jB=function(a,b,c,d){a="Hue "+$APP.T.g(Math.round(a))+", Saturation "+$APP.T.g(Math.round(b))+"%, Lightness "+$APP.T.g(Math.round(c))+"%";return d<1?""+$APP.T.g(a)+", Opacity "+$APP.T.g(Math.round(d*100))+
10
- "%":a},kB=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.X);b=$APP.D(b,$APP.dn);return $APP.r(a)&&$APP.r(b)},lB=function(a){return document.createElement(a)},mB=function(a,b,c){return a.setAttribute(b,c)},nB=function(a){return iB($APP.zf([$APP.im,$APP.Pj,$APP.Aj,$APP.Yi,$APP.Bj,$APP.wj,dB,$APP.U,eB],[a.getAttribute("open"),a.getAttribute("disabled"),a.getAttribute("name"),a.getAttribute("value"),a.getAttribute("readonly"),a.getAttribute("mode"),a.getAttribute("swatches"),a.getAttribute("label"),a.getAttribute("alpha")]))},
11
- oB=function(a,b,c,d){b=new CustomEvent(b,{detail:$APP.Hh(d),bubbles:!0,composed:!0,cancelable:$APP.F(c)});return a.dispatchEvent(b)},pB=function(a,b){var c=hB.g(b),d=OA.g(b),e=PA.g(b),g=QA.g(b);b=MA.g(b);return oB(a,"x-color-picker-input",!1,new $APP.Q(null,5,[$APP.Yi,c,OA,d,PA,e,QA,g,MA,b],null))},qB=function(a,b){var c=hB.g(b),d=OA.g(b),e=PA.g(b),g=QA.g(b);b=MA.g(b);return oB(a,"x-color-picker-change",!0,new $APP.Q(null,5,[$APP.Yi,c,OA,d,PA,e,QA,g,MA,b],null))},rB=function(a,b,c,d,e,g){b=TA(b,c,
12
- d);d=$APP.M(b);b=$APP.D(d,KA);c=$APP.D(d,$APP.Rl);d=$APP.D(d,LA);e=$APP.n($APP.n(g)?e<1:g)?VA(b,c,d,e):UA(b,c,d);a.setAttribute("value",e)},sB=function(a,b,c,d){if($APP.N($APP.k(a,"__xColorPickerSwatchesCache"),c)){a.__xColorPickerSwatchesCache=c;b.innerHTML="";a=$APP.t(c);c=null;for(var e=0,g=0;;)if(g<e){var h=c.F(null,g),l=lB("button");l.setAttribute("part","swatch");l.setAttribute("type","button");l.setAttribute("role","option");l.setAttribute("aria-label",h);l.setAttribute("data-color",h);l.style.backgroundColor=
13
- h;b.appendChild(l);g+=1}else if(a=$APP.t(a))$APP.Nc(a)?(e=$APP.yb(a),a=$APP.zb(a),c=e,e=$APP.z(e)):(c=$APP.u(a),e=lB("button"),e.setAttribute("part","swatch"),e.setAttribute("type","button"),e.setAttribute("role","option"),e.setAttribute("aria-label",c),e.setAttribute("data-color",c),e.style.backgroundColor=c,b.appendChild(e),a=$APP.w(a),c=null,e=0),g=0;else break}b.querySelectorAll("[part\x3dswatch]").forEach(function(m){return mB(m,"aria-selected",$APP.B.i(m.getAttribute("data-color"),d)?"true":
14
- "false")})},tB=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=nB(a),d=$APP.M(c);c=$APP.D(d,hB);var e=$APP.D(d,$APP.X),g=$APP.D(d,MA),h=$APP.D(d,$APP.dn),l=$APP.D(d,fB),m=$APP.D(d,$APP.wj),p=$APP.D(d,dB),q=$APP.D(d,PA),v=$APP.D(d,QA),x=$APP.D(d,gB),y=$APP.D(d,$APP.U),A=$APP.D(d,OA);d=XA(A,q,v);d=$APP.M(d);var C=$APP.D(d,PA);q=$APP.D(d,WA);d=ZA(PA.g(d),q);q=$APP.k(b,"area");var E=$APP.k(b,"hue-strip"),H=$APP.k(b,"alpha-strip"),G=$APP.k(b,"preview-color"),J=$APP.k(b,"hex-input"),
15
- R=$APP.k(b,"trigger-swatch");b=$APP.k(b,"swatches");a.setAttribute("data-mode",m);a.style.setProperty("--_x-cp-hue",""+$APP.T.g(Math.round(A)));q.style.setProperty("--_x-cp-area-x",""+$APP.T.g($APP.Ll.g(d).toFixed(2))+"%");q.style.setProperty("--_x-cp-area-y",""+$APP.T.g($APP.Kl.g(d).toFixed(2))+"%");mB(q,"aria-valuetext",jB(A,C,v,g));$APP.n(y)&&q.setAttribute("aria-label",y);E.style.setProperty("--_x-cp-hue-pos",""+$APP.T.g((FA(A)/360*100).toFixed(2))+"%");mB(E,"aria-valuenow",""+$APP.T.g(Math.round(A)));
16
- $APP.n(l)?(H.style.display="",a.style.setProperty("--_x-cp-alpha-color","hsl("+$APP.T.g(Math.round(A))+","+$APP.T.g(Math.round(C))+"%,"+$APP.T.g(Math.round(v))+"%)"),H.style.setProperty("--_x-cp-alpha-pos",""+$APP.T.g((HA(g)*100).toFixed(2))+"%"),mB(H,"aria-valuenow",""+$APP.T.g(Math.round(g*100)))):H.style.display="none";G.style.backgroundColor=$APP.n(l)?function(){var aa=TA(A,C,v),la=$APP.M(aa);aa=$APP.D(la,KA);var Ca=$APP.D(la,$APP.Rl);la=$APP.D(la,LA);return"rgba("+$APP.T.g(aa)+","+$APP.T.g(Ca)+
17
- ","+$APP.T.g(la)+","+$APP.T.g(g.toFixed(2))+")"}():x;a.shadowRoot.activeElement!==J&&(J.value=c);R.style.backgroundColor=$APP.n(l)?function(){var aa=TA(A,C,v),la=$APP.M(aa);aa=$APP.D(la,KA);var Ca=$APP.D(la,$APP.Rl);la=$APP.D(la,LA);return"rgba("+$APP.T.g(aa)+","+$APP.T.g(Ca)+","+$APP.T.g(la)+","+$APP.T.g(g.toFixed(2))+")"}():x;J.disabled=$APP.n(e)?e:h;sB(a,b,p,x);a=$APP.k(a,"__xColorPickerInternals");return $APP.n(a)?a.setFormValue(c):null}return null},vB=function(a,b){var c=a.getBoundingClientRect();
18
- a=b.clientY-c.top;var d=c.width,e=c.height;b=100*(EA(b.clientX-c.left,d)/d);a=100*(EA(a,e)/e);return new $APP.Q(null,2,[uB,GA(b),$APP.Rj,100-GA(a)],null)},wB=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(EA(b.clientX-a.left,c)/c);return GA(b)/100*360},xB=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(EA(b.clientX-a.left,c)/c);return GA(b)/100},zB=function(a,b){var c=nB(a);if(kB(c)&&$APP.I(yB,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=XA(OA.g(c),PA.g(c),
19
- QA.g(c)),g=function(){switch(b.key){case "ArrowRight":return GA(PA.g(e)+d);case "ArrowLeft":return GA(PA.g(e)-d);default:return PA.g(e)}}(),h=function(){switch(b.key){case "ArrowUp":return GA(WA.g(e)+d);case "ArrowDown":return GA(WA.g(e)-d);default:return WA.g(e)}}();g=YA(OA.g(c),g,h);var l=$APP.M(g);g=$APP.D(l,OA);h=$APP.D(l,PA);l=$APP.D(l,QA);rB(a,g,h,l,MA.g(c),fB.g(c));pB(a,nB(a));return qB(a,nB(a))}return null},BB=function(a,b){var c=nB(a);if(kB(c)&&$APP.I(AB,b.key)){b.preventDefault();var d=
20
- $APP.n(b.shiftKey)?10:1,e=function(){switch(b.key){case "ArrowRight":return FA(OA.g(c)+d);case "ArrowLeft":return FA(OA.g(c)-d);case "Home":return 0;case "End":return 360;default:return OA.g(c)}}();rB(a,e,PA.g(c),QA.g(c),MA.g(c),fB.g(c));pB(a,nB(a));return qB(a,nB(a))}return null},CB=function(a,b){var c=nB(a);if($APP.n(function(){var g=kB(c);return g?(g=fB.g(c),$APP.n(g)?$APP.I(AB,b.key):g):g}())){b.preventDefault();var d=$APP.n(b.shiftKey)?.1:.01,e=function(){switch(b.key){case "ArrowRight":return HA(MA.g(c)+
21
- d);case "ArrowLeft":return HA(MA.g(c)-d);case "Home":return 0;case "End":return 1;default:return MA.g(c)}}();rB(a,OA.g(c),PA.g(c),QA.g(c),e,!0);pB(a,nB(a));return qB(a,nB(a))}return null},DB=function(a){var b=nB(a);return kB(b)&&typeof EyeDropper!=="undefined"?(new EyeDropper).open().then(function(c){a.setAttribute("value",c.sRGBHex);return qB(a,nB(a))}).catch(function(){return null}):null},EB=function(a){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");a=$APP.k(a,"__xColorPickerRefs");
22
- if($APP.n(a)){var b=$APP.k(a,"area");return setTimeout(function(){return b.focus()},0)}return null},FB=function(a){return $APP.n(a.hasAttribute("open"))?(a.removeAttribute("open"),a=$APP.k(a,"__xColorPickerRefs"),$APP.n(a)?$APP.k(a,"trigger").focus():null):null},GB=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=$APP.k(b,"area"),d=$APP.k(b,"hue-strip"),e=$APP.k(b,"alpha-strip"),g=$APP.k(b,"hex-input"),h=$APP.k(b,"swatches"),l=$APP.k(b,"eyedropper"),m=$APP.k(b,"copy"),p=$APP.k(b,
23
- "trigger");b=$APP.k(b,"panel");var q=function(ea){var ta=nB(a);if(kB(ta)){ea.preventDefault();var Qa=$APP.k($APP.k(a,"__xColorPickerRefs"),"area");Qa.setPointerCapture(ea.pointerId);a.__xColorPickerDragging="area";ea=vB(Qa,ea);Qa=$APP.M(ea);ea=$APP.D(Qa,uB);Qa=$APP.D(Qa,$APP.Rj);ea=YA(OA.g(ta),ea,Qa);var ac=$APP.M(ea);ea=$APP.D(ac,OA);Qa=$APP.D(ac,PA);ac=$APP.D(ac,QA);rB(a,ea,Qa,ac,MA.g(ta),fB.g(ta));ta=pB(a,nB(a))}else ta=null;return ta},v=function(ea){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){var ta=
24
- nB(a);ea=vB($APP.k($APP.k(a,"__xColorPickerRefs"),"area"),ea);var Qa=$APP.M(ea);ea=$APP.D(Qa,uB);Qa=$APP.D(Qa,$APP.Rj);ea=YA(OA.g(ta),ea,Qa);var ac=$APP.M(ea);ea=$APP.D(ac,OA);Qa=$APP.D(ac,PA);ac=$APP.D(ac,QA);rB(a,ea,Qa,ac,MA.g(ta),fB.g(ta));ta=pB(a,nB(a))}else ta=null;return ta},x=function(){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ea=qB(a,nB(a))}else ea=null;return ea},y=function(ea){return zB(a,ea)},A=function(ea){var ta=nB(a);if(kB(ta)){ea.preventDefault();
25
- var Qa=$APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip");Qa.setPointerCapture(ea.pointerId);a.__xColorPickerDragging="hue";ea=wB(Qa,ea);rB(a,ea,PA.g(ta),QA.g(ta),MA.g(ta),fB.g(ta));ta=pB(a,nB(a))}else ta=null;return ta},C=function(ea){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){var ta=nB(a);ea=wB($APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip"),ea);rB(a,ea,PA.g(ta),QA.g(ta),MA.g(ta),fB.g(ta));ta=pB(a,nB(a))}else ta=null;return ta},E=function(){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=
26
- null;var ea=qB(a,nB(a))}else ea=null;return ea},H=function(ea){return BB(a,ea)},G=function(ea){var ta=nB(a);var Qa=(Qa=kB(ta))?fB.g(ta):Qa;$APP.n(Qa)?(ea.preventDefault(),Qa=$APP.k($APP.k(a,"__xColorPickerRefs"),"alpha-strip"),Qa.setPointerCapture(ea.pointerId),a.__xColorPickerDragging="alpha",ea=xB(Qa,ea),rB(a,OA.g(ta),PA.g(ta),QA.g(ta),ea,!0),ta=pB(a,nB(a))):ta=null;return ta},J=function(ea){if($APP.B.i("alpha",$APP.k(a,"__xColorPickerDragging"))){var ta=nB(a);ea=xB($APP.k($APP.k(a,"__xColorPickerRefs"),
27
- "alpha-strip"),ea);rB(a,OA.g(ta),PA.g(ta),QA.g(ta),ea,!0);ta=pB(a,nB(a))}else ta=null;return ta},R=function(){if($APP.B.i("alpha",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ea=qB(a,nB(a))}else ea=null;return ea},aa=function(ea){return CB(a,ea)},la=function(ea){a:{if($APP.B.i("Enter",ea.key)){ea.preventDefault();ea=$APP.k($APP.k(a,"__xColorPickerRefs"),"hex-input");var ta=ea.value,Qa=nB(a);if(kB(Qa)){if(JA(ta)){a.setAttribute("value",ta);ea=qB(a,nB(a));break a}ea=ea.value=
28
- hB.g(Qa);break a}}ea=null}return ea},Ca=function(ea){a:{var ta=nB(a);if(kB(ta)&&(ea=ea.target,$APP.n(ea.hasAttribute("data-color")))){ea=ea.getAttribute("data-color");a.setAttribute("value",ea);ea=qB(a,nB(a));break a}ea=null}return ea},Pa=function(){return DB(a)},db=function(){var ea=nB(a);return $APP.n(navigator.clipboard)?navigator.clipboard.writeText(hB.g(ea)):null},eb=function(){var ea=nB(a);return $APP.B.i("popover",$APP.wj.g(ea))&&$APP.r($APP.X.g(ea))?$APP.n($APP.Om.g(ea))?FB(a):EB(a):null},
29
- pb=function(ea){$APP.B.i("Escape",ea.key)&&$APP.B.i("popover",$APP.wj.g(nB(a)))?(ea.preventDefault(),ea.stopPropagation(),ea=FB(a)):ea=null;return ea},Nb=function(ea){return ea.stopPropagation()},gb=function(ea){return $APP.n(a.hasAttribute("open"))?$APP.n(ea.composedPath().some(function(ta){return ta===a}))?null:FB(a):null};c.addEventListener("pointerdown",q);c.addEventListener("pointermove",v);c.addEventListener("pointerup",x);c.addEventListener("keydown",y);d.addEventListener("pointerdown",A);
30
- d.addEventListener("pointermove",C);d.addEventListener("pointerup",E);d.addEventListener("keydown",H);e.addEventListener("pointerdown",G);e.addEventListener("pointermove",J);e.addEventListener("pointerup",R);e.addEventListener("keydown",aa);g.addEventListener("keydown",la);h.addEventListener("click",Ca);l.addEventListener("click",Pa);m.addEventListener("click",db);p.addEventListener("click",eb);b.addEventListener("keydown",pb);b.addEventListener("pointerdown",Nb);document.addEventListener("pointerdown",
31
- gb,!0);$APP.Cg(a,"__xColorPickerHandlers",{"area-move":v,copy:db,"panel-key":pb,"alpha-up":R,"hue-up":E,"alpha-key":aa,"alpha-move":J,"hex-key":la,swatch:Ca,"area-up":x,"alpha-down":G,"area-key":y,"hue-down":A,"hue-key":H,"hue-move":C,eyedrop:Pa,"panel-pd":Nb,trigger:eb,"doc-click":gb,"area-down":q})}},HB=function(a){var b=$APP.k(a,"__xColorPickerRefs"),c=$APP.k(a,"__xColorPickerHandlers");if($APP.n($APP.n(b)?c:b)){var d=$APP.k(b,"area"),e=$APP.k(b,"hue-strip"),g=$APP.k(b,"alpha-strip"),h=$APP.k(b,
32
- "hex-input"),l=$APP.k(b,"swatches"),m=$APP.k(b,"eyedropper"),p=$APP.k(b,"copy"),q=$APP.k(b,"trigger");b=$APP.k(b,"panel");d.removeEventListener("pointerdown",$APP.k(c,"area-down"));d.removeEventListener("pointermove",$APP.k(c,"area-move"));d.removeEventListener("pointerup",$APP.k(c,"area-up"));d.removeEventListener("keydown",$APP.k(c,"area-key"));e.removeEventListener("pointerdown",$APP.k(c,"hue-down"));e.removeEventListener("pointermove",$APP.k(c,"hue-move"));e.removeEventListener("pointerup",$APP.k(c,
33
- "hue-up"));e.removeEventListener("keydown",$APP.k(c,"hue-key"));g.removeEventListener("pointerdown",$APP.k(c,"alpha-down"));g.removeEventListener("pointermove",$APP.k(c,"alpha-move"));g.removeEventListener("pointerup",$APP.k(c,"alpha-up"));g.removeEventListener("keydown",$APP.k(c,"alpha-key"));h.removeEventListener("keydown",$APP.k(c,"hex-key"));l.removeEventListener("click",$APP.k(c,"swatch"));m.removeEventListener("click",$APP.k(c,"eyedrop"));p.removeEventListener("click",$APP.k(c,"copy"));q.removeEventListener("click",
34
- $APP.k(c,"trigger"));b.removeEventListener("keydown",$APP.k(c,"panel-key"));b.removeEventListener("pointerdown",$APP.k(c,"panel-pd"));document.removeEventListener("pointerdown",$APP.k(c,"doc-click"),!0);a.__xColorPickerHandlers=null}else return null},IB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.Eg(this,c,$APP.F(d))}})},JB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=
35
- this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.N(d)?mB(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},LB=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return KB}});IB(b,"disabled","disabled");IB(b,"readOnly","readonly");IB(b,"alpha","alpha");IB(b,"open","open");JB(b,"value","value");JB(b,"swatches","swatches");JB(b,"name","name");JB(b,"mode","mode");JB(b,"label","label");
36
- b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xColorPickerRefs"))){var c=this.attachShadow({mode:"open"}),d=lB("style"),e=lB("div"),g=lB("button"),h=lB("span"),l=lB("div"),m=lB("div"),p=lB("div"),q=lB("div"),v=lB("div"),x=lB("div"),y=lB("div"),A=lB("div"),C=lB("div"),E=lB("div"),H=lB("div"),G=lB("span"),J=lB("input"),R=lB("button"),aa=lB("button"),la=lB("div");d.textContent=":host{display:inline-block;color-scheme:light dark;position:relative;--x-color-picker-width:240px;--x-color-picker-area-height:160px;--x-color-picker-strip-height:14px;--x-color-picker-swatch-size:28px;--x-color-picker-radius:var(--x-radius-md,8px);--x-color-picker-gap:10px;--x-color-picker-bg:var(--x-color-bg,#ffffff);--x-color-picker-border:var(--x-color-border,#cbd5e1);--x-color-picker-text:var(--x-color-text,#1e293b);--x-color-picker-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-color-picker-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-color-picker-bg:var(--x-color-bg,#1e293b);--x-color-picker-border:var(--x-color-border,#475569);--x-color-picker-text:var(--x-color-text,#f1f5f9);--x-color-picker-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontainer]{position:relative;width:var(--x-color-picker-width);max-width:calc(100vw - 2rem);}[part\x3dtrigger]{all:unset;display:none;box-sizing:border-box;width:36px;height:36px;border-radius:var(--x-color-picker-radius);border:2px solid var(--x-color-picker-border);cursor:pointer;overflow:hidden;}[part\x3dtrigger]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}:host([data-mode\x3dpopover]) [part\x3dtrigger]{display:block;}[part\x3dtrigger-swatch]{display:block;width:100%;height:100%;}[part\x3dpanel]{box-sizing:border-box;background:var(--x-color-picker-bg);border:1px solid var(--x-color-picker-border);border-radius:var(--x-color-picker-radius);padding:var(--x-color-picker-gap);display:flex;flex-direction:column;gap:var(--x-color-picker-gap);box-shadow:var(--x-shadow-md,0 4px 12px rgba(0,0,0,0.1));}:host([data-mode\x3dpopover]) [part\x3dpanel]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;max-width:calc(100vw - 1rem);}:host([data-mode\x3dpopover][open]) [part\x3dpanel]{display:flex;}[part\x3darea]{position:relative;width:100%;height:var(--x-color-picker-area-height);border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:crosshair;touch-action:none;overflow:hidden;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--_x-cp-hue,0),100%,50%));}[part\x3darea]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3darea-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,0.3),inset 0 0 0 1px rgba(0,0,0,0.3);pointer-events:none;left:var(--_x-cp-area-x,0%);top:var(--_x-cp-area-y,0%);transform:translate(-50%,-50%);}[part\x3dstrips]{display:flex;flex-direction:column;gap:8px;}[part\x3dhue-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);}[part\x3dhue-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dhue-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-hue-pos,0%);transform:translate(-50%,-50%);}[part\x3dalpha-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;}[part\x3dalpha-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dalpha-gradient]{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(to right,transparent,var(--_x-cp-alpha-color,#000));}[part\x3dalpha-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-alpha-pos,100%);transform:translate(-50%,-50%);z-index:1;}[part\x3dcontrols]{display:flex;align-items:center;gap:6px;}[part\x3dpreview]{width:32px;height:32px;border-radius:var(--x-color-picker-radius);border:1px solid var(--x-color-picker-border);flex-shrink:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;overflow:hidden;}[part\x3dpreview-color]{display:block;width:100%;height:100%;}[part\x3dhex-input]{flex:1;min-width:0;box-sizing:border-box;padding:4px 8px;border:1px solid var(--x-color-picker-border);border-radius:calc(var(--x-color-picker-radius) - 2px);background:transparent;color:var(--x-color-picker-text);font-family:var(--x-font-family,inherit);font-size:var(--x-font-size-sm,0.8125rem);outline:none;}[part\x3dhex-input]:focus-visible{border-color:var(--x-color-picker-focus-ring);box-shadow:0 0 0 2px var(--x-color-picker-focus-ring);}[part\x3deyedropper],[part\x3dcopy]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:pointer;color:var(--x-color-picker-text);flex-shrink:0;}[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(0,0,0,0.06);}@media (prefers-color-scheme:dark){[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(255,255,255,0.1);}}[part\x3deyedropper]:focus-visible,[part\x3dcopy]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatches]{display:grid;grid-template-columns:repeat(auto-fill,var(--x-color-picker-swatch-size));gap:4px;}[part\x3dswatches]:empty{display:none;}[part\x3dswatch]{all:unset;width:var(--x-color-picker-swatch-size);height:var(--x-color-picker-swatch-size);border-radius:4px;cursor:pointer;border:1px solid rgba(0,0,0,0.1);box-sizing:border-box;}[part\x3dswatch]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatch][aria-selected\x3dtrue]{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}:host([disabled]){opacity:var(--x-color-picker-disabled-opacity);pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{transition:none;}}@media (pointer:coarse){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{width:24px;height:24px;}[part\x3dtrigger]{width:44px;height:44px;}[part\x3deyedropper],[part\x3dcopy]{width:44px;height:44px;}[part\x3dswatch]{min-width:44px;min-height:44px;}}";
37
- e.setAttribute("part","container");g.setAttribute("part","trigger");g.setAttribute("type","button");g.setAttribute("aria-label","Pick color");h.setAttribute("part","trigger-swatch");l.setAttribute("part","panel");m.setAttribute("part","area");m.setAttribute("role","slider");m.setAttribute("tabindex","0");m.setAttribute("aria-label","Color");p.setAttribute("part","area-thumb");q.setAttribute("part","strips");v.setAttribute("part","hue-strip");v.setAttribute("role","slider");v.setAttribute("tabindex",
38
- "0");v.setAttribute("aria-label","Hue");v.setAttribute("aria-valuemin","0");v.setAttribute("aria-valuemax","360");x.setAttribute("part","hue-thumb");y.setAttribute("part","alpha-strip");y.setAttribute("role","slider");y.setAttribute("tabindex","0");y.setAttribute("aria-label","Opacity");y.setAttribute("aria-valuemin","0");y.setAttribute("aria-valuemax","100");A.setAttribute("part","alpha-gradient");C.setAttribute("part","alpha-thumb");E.setAttribute("part","controls");H.setAttribute("part","preview");
39
- G.setAttribute("part","preview-color");J.setAttribute("part","hex-input");J.setAttribute("type","text");J.setAttribute("spellcheck","false");J.setAttribute("autocomplete","off");J.setAttribute("aria-label","Hex color value");R.setAttribute("part","eyedropper");R.setAttribute("type","button");R.setAttribute("aria-label","Pick color from screen");R.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3cpath d\x3d"M13.5 2.5a2.12 2.12 0 0 0-3 0L9 4l-.5-.5L6 6l4 4 2.5-2.5L12 7l1.5-1.5a2.12 2.12 0 0 0 0-3zM6 6L2.5 9.5a1.5 1.5 0 0 0-.4.8L1.5 14l3.7-.6a1.5 1.5 0 0 0 .8-.4L10 10"/\x3e\x3c/svg\x3e';
40
- aa.setAttribute("part","copy");aa.setAttribute("type","button");aa.setAttribute("aria-label","Copy color value");aa.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3crect x\x3d"5" y\x3d"5" width\x3d"9" height\x3d"9" rx\x3d"1.5"/\x3e\x3cpath d\x3d"M5 11H3.5A1.5 1.5 0 0 1 2 9.5v-6A1.5 1.5 0 0 1 3.5 2h6A1.5 1.5 0 0 1 11 3.5V5"/\x3e\x3c/svg\x3e';la.setAttribute("part",
41
- "swatches");la.setAttribute("role","listbox");la.setAttribute("aria-label","Preset colors");g.appendChild(h);m.appendChild(p);v.appendChild(x);y.appendChild(A);y.appendChild(C);q.appendChild(v);q.appendChild(y);H.appendChild(G);E.appendChild(H);E.appendChild(J);E.appendChild(R);E.appendChild(aa);l.appendChild(m);l.appendChild(q);l.appendChild(E);l.appendChild(la);e.appendChild(g);e.appendChild(l);c.appendChild(d);c.appendChild(e);typeof EyeDropper==="undefined"&&(R.style.display="none");this.__xColorPickerRefs=
42
- {"alpha-thumb":C,copy:aa,swatches:la,"hue-strip":v,controls:E,"alpha-gradient":A,panel:l,preview:H,"area-thumb":p,"preview-color":G,container:e,area:m,"hue-thumb":x,"trigger-swatch":h,trigger:g,"alpha-strip":y,eyedropper:R,"hex-input":J};$APP.n(this.attachInternals)&&(this.__xColorPickerInternals=this.attachInternals())}HB(this);GB(this);return tB(this)};b.disconnectedCallback=function(){return HB(this)};b.attributeChangedCallback=function(){return tB(this)};b.formDisabledCallback=function(c){$APP.Eg(this,
43
- "disabled",$APP.F(c));return tB(this)};b.formResetCallback=function(){this.setAttribute("value","#000000");return tB(this)};return a},MB=function(){return $APP.n(customElements.get("x-color-picker"))?null:customElements.define("x-color-picker",LB())},eB=new $APP.K(null,"alpha","alpha",-1574982441),hB=new $APP.K(null,"hex-full","hex-full",-1466644518),dB=new $APP.K(null,"swatches","swatches",2033601707),WA=new $APP.K(null,"v","v",21465059),PA=new $APP.K(null,"s","s",1705939918),KA=new $APP.K(null,
44
- "r","r",-471384190),fB=new $APP.K(null,"alpha?","alpha?",1329751525),QA=new $APP.K(null,"l","l",1395893423),OA=new $APP.K(null,"h","h",1109658740),LA=new $APP.K(null,"b","b",1482224470),uB=new $APP.K(null,"sat","sat",1064662667),MA=new $APP.K(null,"a","a",-2123407586),gB=new $APP.K(null,"hex","hex",41691346);var aB=new $APP.S(null,new $APP.Q(null,2,["inline",null,"popover",null],null),null),KB="value alpha swatches disabled readonly name mode open label".split(" ");
45
- $APP.zf([$APP.im,$APP.Pj,$APP.Aj,$APP.Yi,$APP.wj,dB,$APP.nm,$APP.U,eB],[new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"open"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"mode"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"swatches"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,
46
- $APP.Ik,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"alpha"],null)]);$APP.Pd(["x-color-picker-input",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,5,[$APP.Yi,$APP.Y,OA,$APP.W,PA,$APP.W,QA,$APP.W,MA,$APP.W],null),$APP.lm,!1],null),"x-color-picker-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,5,[$APP.Yi,$APP.Y,OA,$APP.W,PA,$APP.W,QA,$APP.W,MA,$APP.W],null),$APP.lm,!0],null)]);var IA=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;var yB=new $APP.S(null,new $APP.Q(null,4,["ArrowUp",null,"ArrowDown",null,"ArrowRight",null,"ArrowLeft",null],null),null),AB=new $APP.S(null,new $APP.Q(null,4,["End",null,"ArrowRight",null,"ArrowLeft",null,"Home",null],null),null);$APP.ha("baredom.exports.x_color_picker.init",MB);export const init=MB;
2
+ var vD=function(a,b){return $APP.Ii.i($APP.Hi.i(a,0),b)},wD=function(a){return $APP.od(a,360)},xD=function(a){return vD(a,100)},yD=function(a){return vD(a,1)},AD=function(a){var b=typeof a==="string";a=b?$APP.rg(zD,a.trim()):b;return $APP.E(a)},ED=function(a){if(typeof a==="string")if(a=$APP.rg(zD,a.trim()),$APP.n(a))switch($APP.Hc(a,0,null),a=$APP.Hc(a,1,null),$APP.z(a)){case 3:var b=parseInt(""+$APP.Q.g($APP.wc(a,0))+$APP.Q.g($APP.wc(a,0)),16),c=parseInt(""+$APP.Q.g($APP.wc(a,1))+$APP.Q.g($APP.wc(a,
3
+ 1)),16),d=parseInt(""+$APP.Q.g($APP.wc(a,2))+$APP.Q.g($APP.wc(a,2)),16);return new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,1],null);case 6:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,1],null);case 8:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,parseInt(a.substring(6,8),16)/255],null);default:return null}else return null;
4
+ else return null},ID=function(a,b,c){a/=255;b/=255;c/=255;var d=$APP.Hi.B(a,b,$APP.Bc([c])),e=$APP.Ii.B(a,b,$APP.Bc([c])),f=(d+e)/2,h=d-e;return h===0?new $APP.N(null,3,[FD,0,GD,0,HD,f*100],null):new $APP.N(null,3,[FD,(d===a?((b-c)/h+(b<c?6:0))/6:d===b?((c-a)/h+2)/6:((a-b)/h+4)/6)*360,GD,(f>.5?h/(2-d-e):h/(d+e))*100,HD,f*100],null)},JD=function(a,b,c){c=c<0?c+1:c>1?c-1:c;return c<1/6?a+(b-a)*6*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},KD=function(a,b,c){a=wD(a)/360;b=xD(b)/100;c=xD(c)/100;if(b===0)return a=
5
+ Math.round(c*255),new $APP.N(null,3,[BD,a,$APP.hn,a,CD,a],null);b=c<.5?c*(1+b):c+b-c*b;c=2*c-b;return new $APP.N(null,3,[BD,Math.round(JD(c,b,a+1/3)*255),$APP.hn,Math.round(JD(c,b,a)*255),CD,Math.round(JD(c,b,a-1/3)*255)],null)},LD=function(a,b,c){function d(e){e=vD(Math.round(e),255).toString(16);return $APP.z(e)<2?"0"+$APP.Q.g(e):e}return"#"+$APP.Q.g(d(a))+$APP.Q.g(d(b))+$APP.Q.g(d(c))},MD=function(a,b,c,d){function e(f){f=vD(Math.round(f),255).toString(16);return $APP.z(f)<2?"0"+$APP.Q.g(f):f}
6
+ return"#"+$APP.Q.g(e(a))+$APP.Q.g(e(b))+$APP.Q.g(e(c))+$APP.Q.g(e(yD(d)*255))},OD=function(a,b,c){b=xD(b)/100;c=xD(c)/100;b=c+b*$APP.Ii.i(c,1-c);return new $APP.N(null,3,[FD,wD(a),GD,(b===0?0:2*(1-c/b))*100,ND,b*100],null)},PD=function(a,b,c){b=xD(b)/100;c=xD(c)/100;b=c*(1-b/2);c=b===0||b===1?0:(c-b)/$APP.Ii.i(b,1-b);return new $APP.N(null,3,[FD,wD(a),GD,c*100,HD,b*100],null)},QD=function(a,b){return new $APP.N(null,2,[$APP.cn,xD(a),$APP.bn,100-xD(b)],null)},RD=function(a){return typeof a==="string"&&
7
+ AD(a)?(a=ED(a),$APP.n(a)?LD(BD.g(a),$APP.hn.g(a),CD.g(a)):null):"#000000"},TD=function(a){return typeof a==="string"&&$APP.Zc(SD,a.trim().toLowerCase())?a.trim().toLowerCase():"inline"},UD=function(a){return typeof a==="string"&&$APP.th(a)?$APP.hf.l($APP.pe,$APP.Ji.l($APP.he.g($APP.rh),$APP.me(AD),$APP.he.g(function(b){b=ED(b);var c=$APP.J(b);b=$APP.C(c,BD);var d=$APP.C(c,$APP.hn);c=$APP.C(c,CD);return LD(b,d,c)})),$APP.ph(a,/,/)):$APP.pe},$D=function(a){var b=$APP.J(a),c=$APP.C(b,$APP.Bn),d=$APP.C(b,
8
+ $APP.al),e=$APP.C(b,$APP.Gh);a=$APP.C(b,$APP.Nk);var f=$APP.C(b,$APP.hh),h=$APP.C(b,$APP.Jk),l=$APP.C(b,VD),m=$APP.C(b,$APP.X),q=$APP.C(b,WD);b=RD(e);var r=function(){var I=ED(e);return $APP.n(I)?I:ED("#000000")}(),v=$APP.J(r);r=$APP.C(v,BD);var x=$APP.C(v,$APP.hn),y=$APP.C(v,CD);v=$APP.C(v,DD);var A=function(){var I=typeof e==="string";if(I){I=e.trim();var H=$APP.rg(zD,I);$APP.n(H)?(I=$APP.rg(zD,I),I=$APP.u($APP.w(I)),I=8===$APP.z(I)):I=H;return I}return I}();v=$APP.n(A)?v:1;A=ID(r,x,y);var D=$APP.J(A);
9
+ A=$APP.C(D,FD);var G=$APP.C(D,GD);D=$APP.C(D,HD);d=$APP.sh(d);f=$APP.sh(f);q=q!=null;c=c!=null;h=TD(h);return $APP.Lf([$APP.ro,XD,$APP.Nk,$APP.Jk,VD,GD,HD,YD,FD,$APP.X,$APP.ao,ZD,$APP.Y,DD],[f,q,$APP.th(a)?a:null,h,UD(l),G,D,b,A,$APP.th(m)?m:null,$APP.B.i(h,"popover")&&c,q&&v<1?MD(r,x,y,v):b,d,v])},aE=function(a,b,c,d){a="Hue "+$APP.Q.g(Math.round(a))+", Saturation "+$APP.Q.g(Math.round(b))+"%, Lightness "+$APP.Q.g(Math.round(c))+"%";return d<1?""+$APP.Q.g(a)+", Opacity "+$APP.Q.g(Math.round(d*100))+
10
+ "%":a},bE=function(a){var b=$APP.J(a);a=$APP.C(b,$APP.Y);b=$APP.C(b,$APP.ro);return $APP.p(a)&&$APP.p(b)},cE=function(a){return document.createElement(a)},dE=function(a){return $D($APP.Lf([$APP.Bn,$APP.al,$APP.Nk,$APP.Gh,$APP.hh,$APP.Jk,VD,$APP.X,WD],[a.getAttribute("open"),a.getAttribute("disabled"),a.getAttribute("name"),a.getAttribute("value"),a.getAttribute("readonly"),a.getAttribute("mode"),a.getAttribute("swatches"),a.getAttribute("label"),a.getAttribute("alpha")]))},eE=function(a,b){var c=
11
+ ZD.g(b),d=FD.g(b),e=GD.g(b),f=HD.g(b);b=DD.g(b);return $APP.P(a,"x-color-picker-input",$APP.Xi(new $APP.N(null,5,[$APP.Gh,c,FD,d,GD,e,HD,f,DD,b],null)))},fE=function(a,b){var c=ZD.g(b),d=FD.g(b),e=GD.g(b),f=HD.g(b);b=DD.g(b);return $APP.ch(a,"x-color-picker-change",$APP.Xi(new $APP.N(null,5,[$APP.Gh,c,FD,d,GD,e,HD,f,DD,b],null)))},gE=function(a,b,c,d,e,f){b=KD(b,c,d);d=$APP.J(b);b=$APP.C(d,BD);c=$APP.C(d,$APP.hn);d=$APP.C(d,CD);e=$APP.n($APP.n(f)?e<1:f)?MD(b,c,d,e):LD(b,c,d);a.setAttribute("value",
12
+ e)},hE=function(a,b,c,d){if($APP.M($APP.k(a,"__xColorPickerSwatchesCache"),c)){a.__xColorPickerSwatchesCache=c;b.innerHTML="";a=$APP.t(c);c=null;for(var e=0,f=0;;)if(f<e){var h=c.F(null,f),l=cE("button");l.setAttribute("part","swatch");l.setAttribute("type","button");l.setAttribute("role","option");l.setAttribute("aria-label",h);l.setAttribute("data-color",h);l.style.backgroundColor=h;b.appendChild(l);f+=1}else if(a=$APP.t(a))$APP.Vc(a)?(e=$APP.Db(a),a=$APP.Eb(a),c=e,e=$APP.z(e)):(c=$APP.u(a),e=cE("button"),
13
+ e.setAttribute("part","swatch"),e.setAttribute("type","button"),e.setAttribute("role","option"),e.setAttribute("aria-label",c),e.setAttribute("data-color",c),e.style.backgroundColor=c,b.appendChild(e),a=$APP.w(a),c=null,e=0),f=0;else break}b.querySelectorAll("[part\x3dswatch]").forEach(function(m){return $APP.ah(m,"aria-selected",$APP.B.i(m.getAttribute("data-color"),d)?"true":"false")})},iE=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=dE(a),d=$APP.J(c);c=$APP.C(d,ZD);var e=
14
+ $APP.C(d,$APP.Y),f=$APP.C(d,DD),h=$APP.C(d,$APP.ro),l=$APP.C(d,XD),m=$APP.C(d,$APP.Jk),q=$APP.C(d,VD),r=$APP.C(d,GD),v=$APP.C(d,HD),x=$APP.C(d,YD),y=$APP.C(d,$APP.X),A=$APP.C(d,FD);d=OD(A,r,v);d=$APP.J(d);var D=$APP.C(d,GD);r=$APP.C(d,ND);d=QD(GD.g(d),r);r=$APP.k(b,"area");var G=$APP.k(b,"hue-strip"),I=$APP.k(b,"alpha-strip"),H=$APP.k(b,"preview-color"),K=$APP.k(b,"hex-input"),W=$APP.k(b,"trigger-swatch");b=$APP.k(b,"swatches");a.setAttribute("data-mode",m);a.style.setProperty("--_x-cp-hue",""+$APP.Q.g(Math.round(A)));
15
+ r.style.setProperty("--_x-cp-area-x",""+$APP.Q.g($APP.cn.g(d).toFixed(2))+"%");r.style.setProperty("--_x-cp-area-y",""+$APP.Q.g($APP.bn.g(d).toFixed(2))+"%");$APP.ah(r,"aria-valuetext",aE(A,D,v,f));$APP.n(y)&&r.setAttribute("aria-label",y);G.style.setProperty("--_x-cp-hue-pos",""+$APP.Q.g((wD(A)/360*100).toFixed(2))+"%");$APP.ah(G,"aria-valuenow",""+$APP.Q.g(Math.round(A)));$APP.n(l)?(I.style.display="",a.style.setProperty("--_x-cp-alpha-color","hsl("+$APP.Q.g(Math.round(A))+","+$APP.Q.g(Math.round(D))+
16
+ "%,"+$APP.Q.g(Math.round(v))+"%)"),I.style.setProperty("--_x-cp-alpha-pos",""+$APP.Q.g((yD(f)*100).toFixed(2))+"%"),$APP.ah(I,"aria-valuenow",""+$APP.Q.g(Math.round(f*100)))):I.style.display="none";H.style.backgroundColor=$APP.n(l)?function(){var ea=KD(A,D,v),va=$APP.J(ea);ea=$APP.C(va,BD);var Pa=$APP.C(va,$APP.hn);va=$APP.C(va,CD);return"rgba("+$APP.Q.g(ea)+","+$APP.Q.g(Pa)+","+$APP.Q.g(va)+","+$APP.Q.g(f.toFixed(2))+")"}():x;a.shadowRoot.activeElement!==K&&(K.value=c);W.style.backgroundColor=$APP.n(l)?
17
+ function(){var ea=KD(A,D,v),va=$APP.J(ea);ea=$APP.C(va,BD);var Pa=$APP.C(va,$APP.hn);va=$APP.C(va,CD);return"rgba("+$APP.Q.g(ea)+","+$APP.Q.g(Pa)+","+$APP.Q.g(va)+","+$APP.Q.g(f.toFixed(2))+")"}():x;K.disabled=$APP.n(e)?e:h;hE(a,b,q,x);a=$APP.k(a,"__xColorPickerInternals");return $APP.n(a)?a.setFormValue(c):null}return null},kE=function(a,b){var c=a.getBoundingClientRect();a=b.clientY-c.top;var d=c.width,e=c.height;b=100*(vD(b.clientX-c.left,d)/d);a=100*(vD(a,e)/e);return new $APP.N(null,2,[jE,xD(b),
18
+ $APP.cl,100-xD(a)],null)},lE=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(vD(b.clientX-a.left,c)/c);return xD(b)/100*360},mE=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(vD(b.clientX-a.left,c)/c);return xD(b)/100},oE=function(a,b){var c=dE(a);if(bE(c)&&$APP.Zc(nE,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=OD(FD.g(c),GD.g(c),HD.g(c)),f=function(){switch(b.key){case "ArrowRight":return xD(GD.g(e)+d);case "ArrowLeft":return xD(GD.g(e)-d);default:return GD.g(e)}}(),
19
+ h=function(){switch(b.key){case "ArrowUp":return xD(ND.g(e)+d);case "ArrowDown":return xD(ND.g(e)-d);default:return ND.g(e)}}();f=PD(FD.g(c),f,h);var l=$APP.J(f);f=$APP.C(l,FD);h=$APP.C(l,GD);l=$APP.C(l,HD);gE(a,f,h,l,DD.g(c),XD.g(c));eE(a,dE(a));return fE(a,dE(a))}return null},qE=function(a,b){var c=dE(a);if(bE(c)&&$APP.Zc(pE,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=function(){switch(b.key){case "ArrowRight":return wD(FD.g(c)+d);case "ArrowLeft":return wD(FD.g(c)-d);case "Home":return 0;
20
+ case "End":return 360;default:return FD.g(c)}}();gE(a,e,GD.g(c),HD.g(c),DD.g(c),XD.g(c));eE(a,dE(a));return fE(a,dE(a))}return null},rE=function(a,b){var c=dE(a);if($APP.n(function(){var f=bE(c);return f?(f=XD.g(c),$APP.n(f)?$APP.Zc(pE,b.key):f):f}())){b.preventDefault();var d=$APP.n(b.shiftKey)?.1:.01,e=function(){switch(b.key){case "ArrowRight":return yD(DD.g(c)+d);case "ArrowLeft":return yD(DD.g(c)-d);case "Home":return 0;case "End":return 1;default:return DD.g(c)}}();gE(a,FD.g(c),GD.g(c),HD.g(c),
21
+ e,!0);eE(a,dE(a));return fE(a,dE(a))}return null},sE=function(a){var b=dE(a);return bE(b)&&typeof EyeDropper!=="undefined"?(new EyeDropper).open().then(function(c){a.setAttribute("value",c.sRGBHex);return fE(a,dE(a))}).catch(function(){return null}):null},tE=function(a){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");a=$APP.k(a,"__xColorPickerRefs");if($APP.n(a)){var b=$APP.k(a,"area");return setTimeout(function(){return b.focus()},0)}return null},uE=function(a){return $APP.n(a.hasAttribute("open"))?
22
+ (a.removeAttribute("open"),a=$APP.k(a,"__xColorPickerRefs"),$APP.n(a)?$APP.k(a,"trigger").focus():null):null},vE=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=$APP.k(b,"area"),d=$APP.k(b,"hue-strip"),e=$APP.k(b,"alpha-strip"),f=$APP.k(b,"hex-input"),h=$APP.k(b,"swatches"),l=$APP.k(b,"eyedropper"),m=$APP.k(b,"copy"),q=$APP.k(b,"trigger");b=$APP.k(b,"panel");var r=function(ia){var Da=dE(a);if(bE(Da)){ia.preventDefault();var fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"area");fb.setPointerCapture(ia.pointerId);
23
+ a.__xColorPickerDragging="area";ia=kE(fb,ia);fb=$APP.J(ia);ia=$APP.C(fb,jE);fb=$APP.C(fb,$APP.cl);ia=PD(FD.g(Da),ia,fb);var sc=$APP.J(ia);ia=$APP.C(sc,FD);fb=$APP.C(sc,GD);sc=$APP.C(sc,HD);gE(a,ia,fb,sc,DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},v=function(ia){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=kE($APP.k($APP.k(a,"__xColorPickerRefs"),"area"),ia);var fb=$APP.J(ia);ia=$APP.C(fb,jE);fb=$APP.C(fb,$APP.cl);ia=PD(FD.g(Da),ia,fb);var sc=$APP.J(ia);ia=
24
+ $APP.C(sc,FD);fb=$APP.C(sc,GD);sc=$APP.C(sc,HD);gE(a,ia,fb,sc,DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},x=function(){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},y=function(ia){return oE(a,ia)},A=function(ia){var Da=dE(a);if(bE(Da)){ia.preventDefault();var fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip");fb.setPointerCapture(ia.pointerId);a.__xColorPickerDragging="hue";ia=lE(fb,ia);gE(a,ia,GD.g(Da),
25
+ HD.g(Da),DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},D=function(ia){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=lE($APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip"),ia);gE(a,ia,GD.g(Da),HD.g(Da),DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},G=function(){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},I=function(ia){return qE(a,ia)},H=function(ia){var Da=dE(a);var fb=
26
+ (fb=bE(Da))?XD.g(Da):fb;$APP.n(fb)?(ia.preventDefault(),fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"alpha-strip"),fb.setPointerCapture(ia.pointerId),a.__xColorPickerDragging="alpha",ia=mE(fb,ia),gE(a,FD.g(Da),GD.g(Da),HD.g(Da),ia,!0),Da=eE(a,dE(a))):Da=null;return Da},K=function(ia){if($APP.B.i("alpha",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=mE($APP.k($APP.k(a,"__xColorPickerRefs"),"alpha-strip"),ia);gE(a,FD.g(Da),GD.g(Da),HD.g(Da),ia,!0);Da=eE(a,dE(a))}else Da=null;return Da},W=function(){if($APP.B.i("alpha",
27
+ $APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},ea=function(ia){return rE(a,ia)},va=function(ia){a:{if($APP.B.i("Enter",ia.key)){ia.preventDefault();ia=$APP.k($APP.k(a,"__xColorPickerRefs"),"hex-input");var Da=ia.value,fb=dE(a);if(bE(fb)){if(AD(Da)){a.setAttribute("value",Da);ia=fE(a,dE(a));break a}ia=ia.value=ZD.g(fb);break a}}ia=null}return ia},Pa=function(ia){a:{var Da=dE(a);if(bE(Da)&&(ia=ia.target,$APP.n(ia.hasAttribute("data-color")))){ia=
28
+ ia.getAttribute("data-color");a.setAttribute("value",ia);ia=fE(a,dE(a));break a}ia=null}return ia},eb=function(){return sE(a)},sb=function(){var ia=dE(a);return $APP.n(navigator.clipboard)?navigator.clipboard.writeText(ZD.g(ia)):null},tb=function(){var ia=dE(a);return $APP.B.i("popover",$APP.Jk.g(ia))&&$APP.p($APP.Y.g(ia))?$APP.n($APP.ao.g(ia))?uE(a):tE(a):null},Ib=function(ia){$APP.B.i("Escape",ia.key)&&$APP.B.i("popover",$APP.Jk.g(dE(a)))?(ia.preventDefault(),ia.stopPropagation(),ia=uE(a)):ia=null;
29
+ return ia},fc=function(ia){return ia.stopPropagation()},vb=function(ia){return $APP.n(a.hasAttribute("open"))?$APP.n(ia.composedPath().some(function(Da){return Da===a}))?null:uE(a):null};c.addEventListener("pointerdown",r);c.addEventListener("pointermove",v);c.addEventListener("pointerup",x);c.addEventListener("keydown",y);d.addEventListener("pointerdown",A);d.addEventListener("pointermove",D);d.addEventListener("pointerup",G);d.addEventListener("keydown",I);e.addEventListener("pointerdown",H);e.addEventListener("pointermove",
30
+ K);e.addEventListener("pointerup",W);e.addEventListener("keydown",ea);f.addEventListener("keydown",va);h.addEventListener("click",Pa);l.addEventListener("click",eb);m.addEventListener("click",sb);q.addEventListener("click",tb);b.addEventListener("keydown",Ib);b.addEventListener("pointerdown",fc);document.addEventListener("pointerdown",vb,!0);$APP.Zg(a,"__xColorPickerHandlers",{"area-move":v,copy:sb,"panel-key":Ib,"alpha-up":W,"hue-up":G,"alpha-key":ea,"alpha-move":K,"hex-key":va,swatch:Pa,"area-up":x,
31
+ "alpha-down":H,"area-key":y,"hue-down":A,"hue-key":I,"hue-move":D,eyedrop:eb,"panel-pd":fc,trigger:tb,"doc-click":vb,"area-down":r})}},wE=function(a){var b=$APP.k(a,"__xColorPickerRefs"),c=$APP.k(a,"__xColorPickerHandlers");if($APP.n($APP.n(b)?c:b)){var d=$APP.k(b,"area"),e=$APP.k(b,"hue-strip"),f=$APP.k(b,"alpha-strip"),h=$APP.k(b,"hex-input"),l=$APP.k(b,"swatches"),m=$APP.k(b,"eyedropper"),q=$APP.k(b,"copy"),r=$APP.k(b,"trigger");b=$APP.k(b,"panel");d.removeEventListener("pointerdown",$APP.k(c,
32
+ "area-down"));d.removeEventListener("pointermove",$APP.k(c,"area-move"));d.removeEventListener("pointerup",$APP.k(c,"area-up"));d.removeEventListener("keydown",$APP.k(c,"area-key"));e.removeEventListener("pointerdown",$APP.k(c,"hue-down"));e.removeEventListener("pointermove",$APP.k(c,"hue-move"));e.removeEventListener("pointerup",$APP.k(c,"hue-up"));e.removeEventListener("keydown",$APP.k(c,"hue-key"));f.removeEventListener("pointerdown",$APP.k(c,"alpha-down"));f.removeEventListener("pointermove",
33
+ $APP.k(c,"alpha-move"));f.removeEventListener("pointerup",$APP.k(c,"alpha-up"));f.removeEventListener("keydown",$APP.k(c,"alpha-key"));h.removeEventListener("keydown",$APP.k(c,"hex-key"));l.removeEventListener("click",$APP.k(c,"swatch"));m.removeEventListener("click",$APP.k(c,"eyedrop"));q.removeEventListener("click",$APP.k(c,"copy"));r.removeEventListener("click",$APP.k(c,"trigger"));b.removeEventListener("keydown",$APP.k(c,"panel-key"));b.removeEventListener("pointerdown",$APP.k(c,"panel-pd"));
34
+ document.removeEventListener("pointerdown",$APP.k(c,"doc-click"),!0);a.__xColorPickerHandlers=null}else return null},xE=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return iE(a)},yE=function(a){a.setAttribute("value","#000000");return iE(a)},zE=function(a){if(!$APP.n($APP.k(a,"__xColorPickerRefs"))){var b=a.attachShadow({mode:"open"}),c=cE("style"),d=cE("div"),e=cE("button"),f=cE("span"),h=cE("div"),l=cE("div"),m=cE("div"),q=cE("div"),r=cE("div"),v=cE("div"),x=cE("div"),y=cE("div"),A=cE("div"),D=
35
+ cE("div"),G=cE("div"),I=cE("span"),H=cE("input"),K=cE("button"),W=cE("button"),ea=cE("div");c.textContent=":host{display:inline-block;color-scheme:light dark;position:relative;--x-color-picker-width:240px;--x-color-picker-area-height:160px;--x-color-picker-strip-height:14px;--x-color-picker-swatch-size:28px;--x-color-picker-radius:var(--x-radius-md,8px);--x-color-picker-gap:10px;--x-color-picker-bg:var(--x-color-bg,#ffffff);--x-color-picker-border:var(--x-color-border,#cbd5e1);--x-color-picker-text:var(--x-color-text,#1e293b);--x-color-picker-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-color-picker-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-color-picker-bg:var(--x-color-bg,#1e293b);--x-color-picker-border:var(--x-color-border,#475569);--x-color-picker-text:var(--x-color-text,#f1f5f9);--x-color-picker-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontainer]{position:relative;width:var(--x-color-picker-width);max-width:calc(100vw - 2rem);}[part\x3dtrigger]{all:unset;display:none;box-sizing:border-box;width:36px;height:36px;border-radius:var(--x-color-picker-radius);border:2px solid var(--x-color-picker-border);cursor:pointer;overflow:hidden;}[part\x3dtrigger]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}:host([data-mode\x3dpopover]) [part\x3dtrigger]{display:block;}[part\x3dtrigger-swatch]{display:block;width:100%;height:100%;}[part\x3dpanel]{box-sizing:border-box;background:var(--x-color-picker-bg);border:1px solid var(--x-color-picker-border);border-radius:var(--x-color-picker-radius);padding:var(--x-color-picker-gap);display:flex;flex-direction:column;gap:var(--x-color-picker-gap);box-shadow:var(--x-shadow-md,0 4px 12px rgba(0,0,0,0.1));}:host([data-mode\x3dpopover]) [part\x3dpanel]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;max-width:calc(100vw - 1rem);}:host([data-mode\x3dpopover][open]) [part\x3dpanel]{display:flex;}[part\x3darea]{position:relative;width:100%;height:var(--x-color-picker-area-height);border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:crosshair;touch-action:none;overflow:hidden;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--_x-cp-hue,0),100%,50%));}[part\x3darea]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3darea-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,0.3),inset 0 0 0 1px rgba(0,0,0,0.3);pointer-events:none;left:var(--_x-cp-area-x,0%);top:var(--_x-cp-area-y,0%);transform:translate(-50%,-50%);}[part\x3dstrips]{display:flex;flex-direction:column;gap:8px;}[part\x3dhue-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);}[part\x3dhue-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dhue-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-hue-pos,0%);transform:translate(-50%,-50%);}[part\x3dalpha-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;}[part\x3dalpha-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dalpha-gradient]{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(to right,transparent,var(--_x-cp-alpha-color,#000));}[part\x3dalpha-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-alpha-pos,100%);transform:translate(-50%,-50%);z-index:1;}[part\x3dcontrols]{display:flex;align-items:center;gap:6px;}[part\x3dpreview]{width:32px;height:32px;border-radius:var(--x-color-picker-radius);border:1px solid var(--x-color-picker-border);flex-shrink:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;overflow:hidden;}[part\x3dpreview-color]{display:block;width:100%;height:100%;}[part\x3dhex-input]{flex:1;min-width:0;box-sizing:border-box;padding:4px 8px;border:1px solid var(--x-color-picker-border);border-radius:calc(var(--x-color-picker-radius) - 2px);background:transparent;color:var(--x-color-picker-text);font-family:var(--x-font-family,inherit);font-size:var(--x-font-size-sm,0.8125rem);outline:none;}[part\x3dhex-input]:focus-visible{border-color:var(--x-color-picker-focus-ring);box-shadow:0 0 0 2px var(--x-color-picker-focus-ring);}[part\x3deyedropper],[part\x3dcopy]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:pointer;color:var(--x-color-picker-text);flex-shrink:0;}[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(0,0,0,0.06);}@media (prefers-color-scheme:dark){[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(255,255,255,0.1);}}[part\x3deyedropper]:focus-visible,[part\x3dcopy]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatches]{display:grid;grid-template-columns:repeat(auto-fill,var(--x-color-picker-swatch-size));gap:4px;}[part\x3dswatches]:empty{display:none;}[part\x3dswatch]{all:unset;width:var(--x-color-picker-swatch-size);height:var(--x-color-picker-swatch-size);border-radius:4px;cursor:pointer;border:1px solid rgba(0,0,0,0.1);box-sizing:border-box;}[part\x3dswatch]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatch][aria-selected\x3dtrue]{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}:host([disabled]){opacity:var(--x-color-picker-disabled-opacity);pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{transition:none;}}@media (pointer:coarse){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{width:24px;height:24px;}[part\x3dtrigger]{width:44px;height:44px;}[part\x3deyedropper],[part\x3dcopy]{width:44px;height:44px;}[part\x3dswatch]{min-width:44px;min-height:44px;}}";
36
+ d.setAttribute("part","container");e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-label","Pick color");f.setAttribute("part","trigger-swatch");h.setAttribute("part","panel");l.setAttribute("part","area");l.setAttribute("role","slider");l.setAttribute("tabindex","0");l.setAttribute("aria-label","Color");m.setAttribute("part","area-thumb");q.setAttribute("part","strips");r.setAttribute("part","hue-strip");r.setAttribute("role","slider");r.setAttribute("tabindex",
37
+ "0");r.setAttribute("aria-label","Hue");r.setAttribute("aria-valuemin","0");r.setAttribute("aria-valuemax","360");v.setAttribute("part","hue-thumb");x.setAttribute("part","alpha-strip");x.setAttribute("role","slider");x.setAttribute("tabindex","0");x.setAttribute("aria-label","Opacity");x.setAttribute("aria-valuemin","0");x.setAttribute("aria-valuemax","100");y.setAttribute("part","alpha-gradient");A.setAttribute("part","alpha-thumb");D.setAttribute("part","controls");G.setAttribute("part","preview");
38
+ I.setAttribute("part","preview-color");H.setAttribute("part","hex-input");H.setAttribute("type","text");H.setAttribute("spellcheck","false");H.setAttribute("autocomplete","off");H.setAttribute("aria-label","Hex color value");K.setAttribute("part","eyedropper");K.setAttribute("type","button");K.setAttribute("aria-label","Pick color from screen");K.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3cpath d\x3d"M13.5 2.5a2.12 2.12 0 0 0-3 0L9 4l-.5-.5L6 6l4 4 2.5-2.5L12 7l1.5-1.5a2.12 2.12 0 0 0 0-3zM6 6L2.5 9.5a1.5 1.5 0 0 0-.4.8L1.5 14l3.7-.6a1.5 1.5 0 0 0 .8-.4L10 10"/\x3e\x3c/svg\x3e';
39
+ W.setAttribute("part","copy");W.setAttribute("type","button");W.setAttribute("aria-label","Copy color value");W.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3crect x\x3d"5" y\x3d"5" width\x3d"9" height\x3d"9" rx\x3d"1.5"/\x3e\x3cpath d\x3d"M5 11H3.5A1.5 1.5 0 0 1 2 9.5v-6A1.5 1.5 0 0 1 3.5 2h6A1.5 1.5 0 0 1 11 3.5V5"/\x3e\x3c/svg\x3e';ea.setAttribute("part",
40
+ "swatches");ea.setAttribute("role","listbox");ea.setAttribute("aria-label","Preset colors");e.appendChild(f);l.appendChild(m);r.appendChild(v);x.appendChild(y);x.appendChild(A);q.appendChild(r);q.appendChild(x);G.appendChild(I);D.appendChild(G);D.appendChild(H);D.appendChild(K);D.appendChild(W);h.appendChild(l);h.appendChild(q);h.appendChild(D);h.appendChild(ea);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);typeof EyeDropper==="undefined"&&(K.style.display="none");a.__xColorPickerRefs=
41
+ {"alpha-thumb":A,copy:W,swatches:ea,"hue-strip":r,controls:D,"alpha-gradient":y,panel:h,preview:G,"area-thumb":m,"preview-color":I,container:d,area:l,"hue-thumb":v,"trigger-swatch":f,trigger:e,"alpha-strip":x,eyedropper:K,"hex-input":H};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xColorPickerInternals=b)}wE(a);vE(a);return iE(a)},AE=function(a){return wE(a)},BE=function(a){return iE(a)},DE=function(a){return $APP.jh(a,CE)},FE=function(){return $APP.Yg("x-color-picker",new $APP.N(null,8,
42
+ [$APP.Pg,EE,$APP.Qg,zE,$APP.Rg,AE,$APP.Sg,BE,$APP.Tg,!0,$APP.Ug,xE,$APP.Vg,yE,$APP.Wg,DE],null))},WD=new $APP.F(null,"alpha","alpha",-1574982441),ZD=new $APP.F(null,"hex-full","hex-full",-1466644518),VD=new $APP.F(null,"swatches","swatches",2033601707),ND=new $APP.F(null,"v","v",21465059),GD=new $APP.F(null,"s","s",1705939918),BD=new $APP.F(null,"r","r",-471384190),XD=new $APP.F(null,"alpha?","alpha?",1329751525),HD=new $APP.F(null,"l","l",1395893423),FD=new $APP.F(null,"h","h",1109658740),CD=new $APP.F(null,
43
+ "b","b",1482224470),jE=new $APP.F(null,"sat","sat",1064662667),DD=new $APP.F(null,"a","a",-2123407586),YD=new $APP.F(null,"hex","hex",41691346);var SD=new $APP.O(null,new $APP.N(null,2,["inline",null,"popover",null],null),null),EE="value alpha swatches disabled readonly name mode open label".split(" "),CE=$APP.Lf([$APP.Bn,$APP.al,$APP.Nk,$APP.Gh,$APP.Jk,VD,$APP.Hn,$APP.X,WD],[new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"name"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"mode"],
44
+ null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"swatches"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"alpha"],null)]);
45
+ $APP.Yd(["x-color-picker-input",new $APP.N(null,2,[$APP.Z,new $APP.N(null,5,[$APP.Gh,$APP.U,FD,$APP.V,GD,$APP.V,HD,$APP.V,DD,$APP.V],null),$APP.Fn,!1],null),"x-color-picker-change",new $APP.N(null,2,[$APP.Z,new $APP.N(null,5,[$APP.Gh,$APP.U,FD,$APP.V,GD,$APP.V,HD,$APP.V,DD,$APP.V],null),$APP.Fn,!0],null)]);var zD=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;var nE=new $APP.O(null,new $APP.N(null,4,["ArrowUp",null,"ArrowDown",null,"ArrowRight",null,"ArrowLeft",null],null),null),pE=new $APP.O(null,new $APP.N(null,4,["End",null,"ArrowRight",null,"ArrowLeft",null,"Home",null],null),null);$APP.ca("baredom.exports.x_color_picker.init",FE);export const init=FE;
@@ -1,28 +1,27 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Ko=function(a,b){if(b==null||$APP.B.i(b,""))return a;var c=b.toLowerCase();return $APP.he(function(d){d=$APP.M(d);d=$APP.D(d,$APP.U);return $APP.N(-1,d.toLowerCase().indexOf(c))},a)},Lo=function(a,b){return b!=null?$APP.Td(function(c){return $APP.B.i($APP.Yi.g(c),b)?c:null},a):null},Po=function(a,b){if(b!=null&&$APP.N(b,"")){var c=a.toLowerCase().indexOf(b.toLowerCase());if($APP.N(c,-1))return b=c+$APP.z(b),new $APP.Q(null,3,[Mo,a.substring(0,c),No,a.substring(c,b),Oo,a.substring(b)],null)}return null},
3
- Qo=function(a){return document.createElement(a)},Ro=function(a,b,c){return a.setAttribute(b,c)},So=function(a){var b=$APP.k(a,"__xComboboxRefs");$APP.n(b)&&(b=$APP.k(b,"slot").assignedElements({flatten:!0}),b=$APP.We.m($APP.fe,$APP.th.i($APP.ce(function(c){return $APP.B.i("OPTION",c.tagName)}),$APP.ae.g(function(c){var d=c.getAttribute("value");return new $APP.Q(null,2,[$APP.Yi,$APP.n(d)?d:c.textContent,$APP.U,c.textContent],null)})),$APP.uc(b)),a.__xComboboxOptions=b)},To=function(a){var b=$APP.k(a,
4
- "__xComboboxRefs");if($APP.n(b)){var c=$APP.k(b,"panel");b=$APP.k(b,"input");var d=function(){var C=$APP.k(a,"__xComboboxQuery");return $APP.n(C)?C:""}(),e=Ko($APP.k(a,"__xComboboxOptions"),d),g=function(){var C=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(C)?C:0}();g=$APP.Hc(e)?-1:$APP.ph.i(g,$APP.z(e)-1);var h=function(){var C=a.getAttribute("value");return $APP.n(C)?C:""}();c.textContent="";if($APP.Hc(e))return d=Qo("div"),d.setAttribute("part","empty-msg"),d.textContent="No matches",c.appendChild(d),
5
- b.removeAttribute("aria-activedescendant");e=$APP.t($APP.Wd($APP.xh,e));for(var l=null,m=0,p=0;;)if(p<m){var q=l.F(null,p),v=$APP.Ac(q,0,null),x=$APP.Ac(q,1,null);q=Qo("div");var y=""+$APP.T.g("x-cb-opt-")+$APP.T.g(v),A=Po($APP.U.g(x),d);q.setAttribute("part","option");q.setAttribute("role","option");q.setAttribute("id",y);Ro(q,"data-value",$APP.Yi.g(x));$APP.B.i($APP.Yi.g(x),h)&&q.setAttribute("aria-selected","true");$APP.B.i(v,g)&&q.setAttribute("data-active","");$APP.n(A)?(q.appendChild(document.createTextNode(Mo.g(A))),
6
- v=Qo("b"),v.textContent=No.g(A),q.appendChild(v),q.appendChild(document.createTextNode(Oo.g(A)))):q.textContent=$APP.U.g(x);c.appendChild(q);p+=1}else if(e=$APP.t(e))$APP.Nc(e)?(m=$APP.yb(e),e=$APP.zb(e),l=m,m=$APP.z(m)):(m=$APP.u(e),l=$APP.Ac(m,0,null),v=$APP.Ac(m,1,null),m=Qo("div"),q=""+$APP.T.g("x-cb-opt-")+$APP.T.g(l),p=Po($APP.U.g(v),d),m.setAttribute("part","option"),m.setAttribute("role","option"),m.setAttribute("id",q),Ro(m,"data-value",$APP.Yi.g(v)),$APP.B.i($APP.Yi.g(v),h)&&m.setAttribute("aria-selected",
7
- "true"),$APP.B.i(l,g)&&m.setAttribute("data-active",""),$APP.n(p)?(m.appendChild(document.createTextNode(Mo.g(p))),l=Qo("b"),l.textContent=No.g(p),m.appendChild(l),m.appendChild(document.createTextNode(Oo.g(p)))):m.textContent=$APP.U.g(v),c.appendChild(m),e=$APP.w(e),l=null,m=0),p=0;else break;return g>=0?Ro(b,"aria-activedescendant",""+$APP.T.g("x-cb-opt-")+$APP.T.g(g)):b.removeAttribute("aria-activedescendant")}return null},Vo=function(a){var b=$APP.k(a,"__xComboboxRefs");if($APP.n(b)){var c=new $APP.Q(null,
8
- 7,[$APP.Em,a.getAttribute("value"),$APP.Pi,a.getAttribute("placeholder"),$APP.Al,a.getAttribute("name"),$APP.Ol,a.hasAttribute("disabled"),$APP.Nh,a.hasAttribute("required"),$APP.Gi,a.hasAttribute("open"),$APP.jn,a.getAttribute("placement")],null),d=$APP.M(c),e=$APP.D(d,$APP.Em),g=$APP.D(d,$APP.Pi),h=$APP.D(d,$APP.Al),l=$APP.D(d,$APP.Ol),m=$APP.D(d,$APP.Nh);c=$APP.D(d,$APP.Gi);d=$APP.D(d,$APP.jn);e=$APP.n(e)?e:"";g=$APP.n(g)?g:"";h=$APP.n(h)?h:"";l=$APP.F(l);m=$APP.F(m);c=$APP.F(c);d=$APP.I(Uo,d)?
9
- d:"bottom-start";g=$APP.M(new $APP.Q(null,7,[$APP.Yi,e,$APP.sm,g,$APP.Aj,h,$APP.X,l,$APP.mi,m,$APP.Om,c,$APP.Qj,d],null));c=$APP.D(g,$APP.Yi);d=$APP.D(g,$APP.sm);e=$APP.D(g,$APP.X);m=$APP.D(g,$APP.Om);g=$APP.D(g,$APP.Qj);l=$APP.k(b,"input");b=$APP.k(b,"panel");h=Lo($APP.k(a,"__xComboboxOptions"),c);l.placeholder=d;l.disabled=e;Ro(l,"aria-expanded",""+$APP.T.g(m));b.setAttribute("data-placement",g);$APP.n(m)||(l.value=$APP.n(h)?$APP.U.g(h):"");return $APP.N(c,"")?a.setAttribute("data-has-value",""):
10
- a.removeAttribute("data-has-value")}return null},Wo=function(a,b,c){b=new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},Xo=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},Zo=function(a,b){return $APP.r(a.hasAttribute("disabled"))&&$APP.r(a.hasAttribute("open"))&&Wo(a,"x-combobox-toggle",{open:!0,source:b})?(a.setAttribute("open",""),a.__xComboboxQuery="",a.__xComboboxActiveIdx=
11
- 0,b=$APP.k(a,"__xComboboxRefs"),$APP.n(b)&&$APP.k(b,"input").select(),To(a),Yo.g?Yo.g(a):Yo.call(null,a)):null},ap=function(a,b){return $APP.n(a.hasAttribute("open"))&&Wo(a,"x-combobox-toggle",{open:!1,source:b})?(a.removeAttribute("open"),a.__xComboboxQuery="",a.__xComboboxActiveIdx=0,$o.g?$o.g(a):$o.call(null,a),Vo(a)):null},bp=function(a,b,c){var d=a.getAttribute("value");return Wo(a,"x-combobox-change-request",{value:b,label:c,previousValue:$APP.n(d)?d:""})?(a.setAttribute("value",b),d=$APP.k(a,
12
- "__xComboboxRefs"),$APP.n(d)&&($APP.k(d,"input").value=c),ap(a,"select"),Xo(a,"x-combobox-change",{value:b,label:c})):null},cp=function(a,b){var c=Ko($APP.k(a,"__xComboboxOptions"),function(){var e=$APP.k(a,"__xComboboxQuery");return $APP.n(e)?e:""}());c=$APP.z(c);var d=function(){var e=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(e)?e:0}();b=$APP.B.i(b,$APP.Tj)?c===0?-1:$APP.fd(($APP.n(d)?d:-1)+1,c):c===0?-1:$APP.fd(($APP.n(d)?d:c)-1,c);a.__xComboboxActiveIdx=b;To(a);b=$APP.k(a,"__xComboboxRefs");
13
- return $APP.n(b)?(b=$APP.k(b,"panel").querySelector("[data-active]"),$APP.n(b)?b.scrollIntoView({block:"nearest"}):null):null},dp=function(a){var b=Ko($APP.k(a,"__xComboboxOptions"),function(){var c=$APP.k(a,"__xComboboxQuery");return $APP.n(c)?c:""}());b=$APP.Ac(b,function(){var c=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(c)?c:0}(),null);return $APP.n(b)?bp(a,$APP.Yi.g(b),$APP.U.g(b)):null},ep=function(a){return{slotchange:function(){So(a);return $APP.n(a.hasAttribute("open"))?To(a):null},inputFocus:function(){return Zo(a,
14
- "focus")},inputInput:function(b){b=b.target.value;a.__xComboboxQuery=b;a.__xComboboxActiveIdx=0;$APP.n(a.hasAttribute("open"))||Zo(a,"input");To(a);return Xo(a,"x-combobox-input",{query:b})},panelClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-value"))?b:b.closest("[data-value]");if($APP.n(b)){var c=b.getAttribute("data-value");return bp(a,c,b.textContent)}return null},inputKeydown:function(b){var c=b.key;if($APP.B.i(c,"ArrowDown"))return b.preventDefault(),$APP.n(a.hasAttribute("open"))?
15
- cp(a,$APP.Tj):Zo(a,"keyboard");if($APP.B.i(c,"ArrowUp"))return b.preventDefault(),$APP.n(a.hasAttribute("open"))?cp(a,$APP.Nj):Zo(a,"keyboard");if($APP.B.i(c,"Enter"))return b.preventDefault(),$APP.n(a.hasAttribute("open"))?dp(a):null;if($APP.B.i(c,"Escape")){if($APP.n(a.hasAttribute("open")))return b.preventDefault(),ap(a,"escape"),b=$APP.k(a,"__xComboboxRefs"),$APP.n(b)?$APP.k(b,"input").focus():null}else if($APP.B.i(c,"Home")){if($APP.n(a.hasAttribute("open")))return b.preventDefault(),a.__xComboboxActiveIdx=
16
- 0,To(a)}else if($APP.B.i(c,"End")&&$APP.n(a.hasAttribute("open")))return b.preventDefault(),b=$APP.k(a,"__xComboboxQuery"),b=$APP.z(Ko($APP.k(a,"__xComboboxOptions"),$APP.n(b)?b:"")),b=$APP.oh.i(0,b-1),a.__xComboboxActiveIdx=b,To(a);return null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.vc(b.composedPath()),b=$APP.Td(function(c){return c===a},b),$APP.n(b)?null:ap(a,"outside-click")):null},panelPointerdown:function(b){return b.preventDefault()},clearClick:function(){var b=
17
- a.getAttribute("value");return Wo(a,"x-combobox-change-request",{value:"",label:"",previousValue:$APP.n(b)?b:""})?(a.removeAttribute("value"),a.removeAttribute("data-has-value"),b=$APP.k(a,"__xComboboxRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),b.value="",b.focus()),Xo(a,"x-combobox-change",{value:"",label:""})):null},chevronPointerdown:function(b){b.preventDefault();if($APP.n(a.hasAttribute("open")))return ap(a,"pointer");Zo(a,"pointer");b=$APP.k(a,"__xComboboxRefs");return $APP.n(b)?$APP.k(b,"input").focus():
18
- null},focusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.r(a.contains(b))?ap(a,"focusout"):null):null}}},fp=function(a){var b=$APP.k(a,"__xComboboxRefs");if($APP.n(b)){var c=$APP.k(a,"__xComboboxHandlers");if($APP.n(c)){var d=$APP.k(b,"input"),e=$APP.k(b,"clear"),g=$APP.k(b,"chevron"),h=$APP.k(b,"panel");b=$APP.k(b,"slot");d.removeEventListener("focus",$APP.k(c,"inputFocus"));d.removeEventListener("input",$APP.k(c,"inputInput"));d.removeEventListener("keydown",
19
- $APP.k(c,"inputKeydown"));e.removeEventListener("click",$APP.k(c,"clearClick"));g.removeEventListener("pointerdown",$APP.k(c,"chevronPointerdown"));h.removeEventListener("pointerdown",$APP.k(c,"panelPointerdown"));h.removeEventListener("click",$APP.k(c,"panelClick"));a.removeEventListener("focusout",$APP.k(c,"focusout"));b.removeEventListener("slotchange",$APP.k(c,"slotchange"))}}},Yo=function(a){var b=$APP.k(a,"__xComboboxHandlers");return $APP.n(b)?setTimeout(function(){var c=a.isConnected;return $APP.n($APP.n(c)?
20
- a.hasAttribute("open"):c)?document.addEventListener("click",$APP.k(b,"docClick")):null},0):null},$o=function(a){a=$APP.k(a,"__xComboboxHandlers");return $APP.n(a)?document.removeEventListener("click",$APP.k(a,"docClick")):null},gp=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.Eg(this,c,$APP.F(d))}})},hp=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);
21
- return $APP.n(d)?d:""},set:function(d){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},kp=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return ip}});hp(b,"value","value");hp(b,"placeholder","placeholder");hp(b,"name","name");hp(b,"placement","placement");gp(b,"disabled","disabled");gp(b,"required","required");gp(b,"open","open");b.show=function(){return Zo(this,"programmatic")};b.hide=
22
- function(){return ap(this,"programmatic")};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xComboboxRefs"))){var c=this.attachShadow({mode:"open"}),d=Qo("style"),e=Qo("div"),g=Qo("input"),h=Qo("button"),l=Qo("span"),m=Qo("div"),p=Qo("slot");var q=$APP.k(jp,"n")+1;jp.n=q;q="x-cb-lb-"+$APP.T.g(q);d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-combobox-bg:var(--x-color-surface,#ffffff);--x-combobox-fg:var(--x-color-text,#0f172a);--x-combobox-placeholder:var(--x-color-text-muted,#94a3b8);--x-combobox-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-border-hover:1px solid var(--x-color-border,#cbd5e1);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#60a5fa);--x-combobox-radius:var(--x-radius-md,6px);--x-combobox-height:2.25rem;--x-combobox-font-size:var(--x-font-size-sm,0.9375rem);--x-combobox-padding:0 0.625rem;--x-combobox-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.05));--x-combobox-disabled-opacity:var(--x-opacity-disabled,0.55);--x-combobox-chevron-color:var(--x-color-text-muted,#64748b);--x-combobox-panel-bg:var(--x-color-bg,#ffffff);--x-combobox-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-panel-radius:var(--x-radius-md,8px);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-combobox-panel-max-height:16rem;--x-combobox-panel-offset:4px;--x-combobox-option-padding:0.5rem 0.625rem;--x-combobox-option-hover-bg:var(--x-color-surface-hover,#f1f5f9);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);--x-combobox-option-active-fg:#ffffff;--x-combobox-transition-duration:var(--x-transition-duration,150ms);--x-combobox-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-combobox-bg:var(--x-color-surface,#1e293b);--x-combobox-fg:var(--x-color-text,#e2e8f0);--x-combobox-placeholder:var(--x-color-text-muted,#64748b);--x-combobox-border:1px solid var(--x-color-border,#334155);--x-combobox-border-hover:1px solid var(--x-color-border,#475569);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#93c5fd);--x-combobox-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.2));--x-combobox-chevron-color:var(--x-color-text-muted,#94a3b8);--x-combobox-panel-bg:var(--x-color-bg,#1e293b);--x-combobox-panel-border:1px solid var(--x-color-border,#334155);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));--x-combobox-option-hover-bg:var(--x-color-surface-hover,#334155);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);}}[part\x3dwrapper]{display:flex;align-items:center;height:var(--x-combobox-height);background:var(--x-combobox-bg);border:var(--x-combobox-border);border-radius:var(--x-combobox-radius);box-shadow:var(--x-combobox-shadow);padding:var(--x-combobox-padding);cursor:text;transition:border var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),box-shadow var(--x-combobox-transition-duration) var(--x-combobox-transition-easing);}[part\x3dwrapper]:hover{border:var(--x-combobox-border-hover);}:host(:focus-within) [part\x3dwrapper]{border:var(--x-combobox-border-focus);box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([disabled]) [part\x3dwrapper]{opacity:var(--x-combobox-disabled-opacity);cursor:default;pointer-events:none;}[part\x3dinput]{all:unset;flex:1;min-width:0;height:100%;font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);}[part\x3dinput]::placeholder{color:var(--x-combobox-placeholder);}[part\x3dclear]{all:unset;display:none;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;font-size:0.875rem;color:var(--x-combobox-chevron-color);cursor:pointer;flex-shrink:0;border-radius:2px;}[part\x3dclear]:hover{color:var(--x-combobox-fg);}[part\x3dclear]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([data-has-value]) [part\x3dclear]{display:inline-flex;}:host([disabled]) [part\x3dclear]{display:none;}[part\x3dchevron]{display:inline-flex;align-items:center;color:var(--x-combobox-chevron-color);flex-shrink:0;margin-left:0.25rem;transition:transform 200ms ease;pointer-events:none;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:var(--x-z-dropdown,1000);box-sizing:border-box;width:100%;background:var(--x-combobox-panel-bg);border:var(--x-combobox-panel-border);border-radius:var(--x-combobox-panel-radius);box-shadow:var(--x-combobox-panel-shadow);padding:0.25rem 0;max-height:var(--x-combobox-panel-max-height);max-width:calc(100% - 0rem);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s var(--x-combobox-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:bottom right;}[part\x3doption]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);cursor:default;border-radius:4px;margin:0 0.25rem;}[part\x3doption]:hover{background:var(--x-combobox-option-hover-bg);}[part\x3doption][data-active]{background:var(--x-combobox-option-active-bg);color:var(--x-combobox-option-active-fg);}[part\x3doption][data-active] b{color:inherit;}[part\x3doption] b{font-weight:700;}[part\x3dempty-msg]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);color:var(--x-combobox-placeholder);font-style:italic;margin:0 0.25rem;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dwrapper]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}@media (pointer:coarse){:host{--x-combobox-height:2.75rem;}[part\x3dclear]{width:2.75rem;height:2.75rem;}[part\x3doption]{min-height:2.75rem;display:flex;align-items:center;}}";
23
- e.setAttribute("part","wrapper");g.setAttribute("part","input");g.setAttribute("type","text");g.setAttribute("role","combobox");g.setAttribute("aria-expanded","false");g.setAttribute("aria-autocomplete","list");g.setAttribute("aria-controls",q);g.setAttribute("autocomplete","off");h.setAttribute("part","clear");h.setAttribute("type","button");h.setAttribute("aria-label","Clear");h.setAttribute("tabindex","-1");h.textContent="×";l.setAttribute("part","chevron");l.setAttribute("aria-hidden","true");
24
- l.innerHTML='\x3csvg width\x3d"12" height\x3d"12" viewBox\x3d"0 0 12 12" fill\x3d"none" xmlns\x3d"http://www.w3.org/2000/svg" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M2.5 4.5L6 8L9.5 4.5" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"/\x3e\x3c/svg\x3e';m.setAttribute("part","panel");m.setAttribute("role","listbox");m.setAttribute("id",q);m.setAttribute("data-placement","bottom-start");e.appendChild(g);e.appendChild(h);e.appendChild(l);c.appendChild(d);
25
- c.appendChild(e);c.appendChild(m);c.appendChild(p);this.__xComboboxListboxId=q;this.__xComboboxOptions=$APP.fe;this.__xComboboxQuery="";this.__xComboboxActiveIdx=0;this.__xComboboxRefs={wrapper:e,input:g,clear:h,chevron:l,panel:m,slot:p}}fp(this);$o(this);this.__xComboboxHandlers=ep(this);l=$APP.k(this,"__xComboboxRefs");$APP.n(l)&&(c=$APP.k(this,"__xComboboxHandlers"),$APP.n(c)&&(d=$APP.k(l,"input"),e=$APP.k(l,"clear"),g=$APP.k(l,"chevron"),h=$APP.k(l,"panel"),l=$APP.k(l,"slot"),d.addEventListener("focus",
26
- $APP.k(c,"inputFocus")),d.addEventListener("input",$APP.k(c,"inputInput")),d.addEventListener("keydown",$APP.k(c,"inputKeydown")),e.addEventListener("click",$APP.k(c,"clearClick")),g.addEventListener("pointerdown",$APP.k(c,"chevronPointerdown")),h.addEventListener("pointerdown",$APP.k(c,"panelPointerdown")),h.addEventListener("click",$APP.k(c,"panelClick")),this.addEventListener("focusout",$APP.k(c,"focusout")),l.addEventListener("slotchange",$APP.k(c,"slotchange"))));So(this);return Vo(this)};b.disconnectedCallback=
27
- function(){fp(this);return $o(this)};b.attributeChangedCallback=function(c){$APP.n($APP.k(this,"__xComboboxRefs"))?(Vo(this),c=$APP.B.i(c,"open")?$APP.n(this.hasAttribute("open"))?Yo(this):$o(this):null):c=null;return c};return a},lp=function(){return $APP.n(customElements.get("x-combobox"))?null:customElements.define("x-combobox",kp())},No=new $APP.K(null,"match","match",1220059550),Oo=new $APP.K(null,"after","after",594996914),Mo=new $APP.K(null,"before","before",-1633692388);var Uo=new $APP.S(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),ip="value placeholder name disabled required open placement".split(" ");
28
- $APP.Pd(["x-combobox-change-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,3,[$APP.Yi,$APP.Y,$APP.U,$APP.Y,$APP.Tk,$APP.Y],null)],null),"x-combobox-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Yi,$APP.Y,$APP.U,$APP.Y],null)],null),"x-combobox-input",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,1,[$APP.Ii,$APP.Y],null)],null),"x-combobox-toggle",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,2,[$APP.im,$APP.Zj,$APP.sl,$APP.Y],null)],null)]);var jp={n:0};$APP.ha("baredom.exports.x_combobox.init",lp);export const init=lp;
2
+ var dq=function(a,b){if(b==null||$APP.B.i(b,""))return a;var c=b.toLowerCase();return $APP.re(function(d){d=$APP.J(d);d=$APP.C(d,$APP.X);return $APP.M(-1,d.toLowerCase().indexOf(c))},a)},eq=function(a,b){return b!=null?$APP.be(function(c){return $APP.B.i($APP.Gh.g(c),b)?c:null},a):null},fq=function(a,b){if(b!=null&&$APP.M(b,"")){var c=a.toLowerCase().indexOf(b.toLowerCase());if($APP.M(c,-1))return b=c+$APP.z(b),new $APP.N(null,3,[$APP.Wn,a.substring(0,c),$APP.qk,a.substring(c,b),$APP.nm,a.substring(b)],
3
+ null)}return null},gq=function(a){return document.createElement(a)},hq=function(a){var b=$APP.k(a,"__xComboboxRefs");$APP.n(b)&&(b=$APP.k(b,"slot").assignedElements({flatten:!0}),b=$APP.hf.l($APP.pe,$APP.Ji.i($APP.me(function(c){return $APP.B.i("OPTION",c.tagName)}),$APP.he.g(function(c){var d=c.getAttribute("value");return new $APP.N(null,2,[$APP.Gh,$APP.n(d)?d:c.textContent,$APP.X,c.textContent],null)})),$APP.Bc(b)),a.__xComboboxOptions=b)},iq=function(a){var b=$APP.k(a,"__xComboboxRefs");if($APP.n(b)){var c=
4
+ $APP.k(b,"panel");b=$APP.k(b,"input");var d=function(){var D=$APP.k(a,"__xComboboxQuery");return $APP.n(D)?D:""}(),e=dq($APP.k(a,"__xComboboxOptions"),d),f=function(){var D=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(D)?D:0}();f=$APP.Oc(e)?-1:$APP.Ii.i(f,$APP.z(e)-1);var h=function(){var D=a.getAttribute("value");return $APP.n(D)?D:""}();c.textContent="";if($APP.Oc(e))return d=gq("div"),d.setAttribute("part","empty-msg"),d.textContent="No matches",c.appendChild(d),b.removeAttribute("aria-activedescendant");
5
+ e=$APP.t($APP.ee($APP.Ni,e));for(var l=null,m=0,q=0;;)if(q<m){var r=l.F(null,q),v=$APP.Hc(r,0,null),x=$APP.Hc(r,1,null);r=gq("div");var y=""+$APP.Q.g("x-cb-opt-")+$APP.Q.g(v),A=fq($APP.X.g(x),d);r.setAttribute("part","option");r.setAttribute("role","option");r.setAttribute("id",y);$APP.ah(r,"data-value",$APP.Gh.g(x));$APP.B.i($APP.Gh.g(x),h)&&r.setAttribute("aria-selected","true");$APP.B.i(v,f)&&r.setAttribute("data-active","");$APP.n(A)?(r.appendChild(document.createTextNode($APP.Wn.g(A))),v=gq("b"),
6
+ v.textContent=$APP.qk.g(A),r.appendChild(v),r.appendChild(document.createTextNode($APP.nm.g(A)))):r.textContent=$APP.X.g(x);c.appendChild(r);q+=1}else if(e=$APP.t(e))$APP.Vc(e)?(m=$APP.Db(e),e=$APP.Eb(e),l=m,m=$APP.z(m)):(m=$APP.u(e),l=$APP.Hc(m,0,null),v=$APP.Hc(m,1,null),m=gq("div"),r=""+$APP.Q.g("x-cb-opt-")+$APP.Q.g(l),q=fq($APP.X.g(v),d),m.setAttribute("part","option"),m.setAttribute("role","option"),m.setAttribute("id",r),$APP.ah(m,"data-value",$APP.Gh.g(v)),$APP.B.i($APP.Gh.g(v),h)&&m.setAttribute("aria-selected",
7
+ "true"),$APP.B.i(l,f)&&m.setAttribute("data-active",""),$APP.n(q)?(m.appendChild(document.createTextNode($APP.Wn.g(q))),l=gq("b"),l.textContent=$APP.qk.g(q),m.appendChild(l),m.appendChild(document.createTextNode($APP.nm.g(q)))):m.textContent=$APP.X.g(v),c.appendChild(m),e=$APP.w(e),l=null,m=0),q=0;else break;return f>=0?$APP.ah(b,"aria-activedescendant",""+$APP.Q.g("x-cb-opt-")+$APP.Q.g(f)):b.removeAttribute("aria-activedescendant")}return null},kq=function(a){var b=new $APP.N(null,7,[$APP.Dh,a.getAttribute("value"),
8
+ $APP.Xj,a.getAttribute("placeholder"),$APP.Mm,a.getAttribute("name"),$APP.Fh,a.hasAttribute("disabled"),$APP.cj,a.hasAttribute("required"),$APP.Pj,a.hasAttribute("open"),$APP.vo,a.getAttribute("placement")],null);var c=$APP.J(b),d=$APP.C(c,$APP.Dh),e=$APP.C(c,$APP.Xj),f=$APP.C(c,$APP.Mm),h=$APP.C(c,$APP.Fh),l=$APP.C(c,$APP.cj);b=$APP.C(c,$APP.Pj);c=$APP.C(c,$APP.vo);d=$APP.n(d)?d:"";e=$APP.n(e)?e:"";f=$APP.n(f)?f:"";h=$APP.E(h);l=$APP.E(l);b=$APP.E(b);c=$APP.Zc(jq,c)?c:"bottom-start";b=new $APP.N(null,
9
+ 7,[$APP.Gh,d,$APP.Mn,e,$APP.Nk,f,$APP.Y,h,$APP.xj,l,$APP.ao,b,$APP.bl,c],null);if($APP.M($APP.k(a,"__xComboboxModel"),b)){b=$APP.J(b);c=$APP.C(b,$APP.Gh);d=$APP.C(b,$APP.Mn);l=$APP.C(b,$APP.Y);e=$APP.C(b,$APP.ao);h=$APP.C(b,$APP.bl);var m=$APP.k(a,"__xComboboxRefs");if($APP.n(m)){f=$APP.k(m,"input");m=$APP.k(m,"panel");var q=eq($APP.k(a,"__xComboboxOptions"),c);f.placeholder=d;f.disabled=l;$APP.ah(f,"aria-expanded",""+$APP.Q.g(e));m.setAttribute("data-placement",h);$APP.n(e)||(f.value=$APP.n(q)?$APP.X.g(q):
10
+ "");$APP.M(c,"")?a.setAttribute("data-has-value",""):a.removeAttribute("data-has-value");$APP.n(e)&&iq(a);a.__xComboboxModel=b;a=void 0}else a=null}else a=null;return a},lq=function(a,b){return $APP.p(a.hasAttribute("disabled"))&&$APP.p(a.hasAttribute("open"))&&$APP.ch(a,"x-combobox-toggle",{open:!0,source:b})?(a.__xComboboxQuery="",a.__xComboboxActiveIdx=0,a.setAttribute("open",""),a=$APP.k(a,"__xComboboxRefs"),$APP.n(a)?$APP.k(a,"input").select():null):null},mq=function(a,b){return $APP.n(a.hasAttribute("open"))&&
11
+ $APP.ch(a,"x-combobox-toggle",{open:!1,source:b})?(a.__xComboboxQuery="",a.__xComboboxActiveIdx=0,a.removeAttribute("open")):null},nq=function(a,b,c){var d=a.getAttribute("value");return $APP.ch(a,"x-combobox-change-request",{value:b,label:c,previousValue:$APP.n(d)?d:""})?(a.setAttribute("value",b),d=$APP.k(a,"__xComboboxRefs"),$APP.n(d)&&($APP.k(d,"input").value=c),mq(a,"select"),$APP.P(a,"x-combobox-change",{value:b,label:c})):null},oq=function(a,b){var c=dq($APP.k(a,"__xComboboxOptions"),function(){var e=
12
+ $APP.k(a,"__xComboboxQuery");return $APP.n(e)?e:""}());c=$APP.z(c);var d=function(){var e=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(e)?e:0}();b=$APP.B.i(b,$APP.el)?c===0?-1:$APP.od(($APP.n(d)?d:-1)+1,c):c===0?-1:$APP.od(($APP.n(d)?d:c)-1,c);a.__xComboboxActiveIdx=b;iq(a);b=$APP.k(a,"__xComboboxRefs");return $APP.n(b)?(b=$APP.k(b,"panel").querySelector("[data-active]"),$APP.n(b)?b.scrollIntoView({block:"nearest"}):null):null},pq=function(a){var b=dq($APP.k(a,"__xComboboxOptions"),function(){var c=
13
+ $APP.k(a,"__xComboboxQuery");return $APP.n(c)?c:""}());b=$APP.Hc(b,function(){var c=$APP.k(a,"__xComboboxActiveIdx");return $APP.n(c)?c:0}(),null);return $APP.n(b)?nq(a,$APP.Gh.g(b),$APP.X.g(b)):null},qq=function(a){return{slotchange:function(){hq(a);a.__xComboboxModel=null;return kq(a)},inputFocus:function(){return lq(a,"focus")},inputInput:function(b){b=b.target.value;a.__xComboboxQuery=b;a.__xComboboxActiveIdx=0;$APP.n(a.hasAttribute("open"))||lq(a,"input");iq(a);return $APP.P(a,"x-combobox-input",
14
+ {query:b})},panelClick:function(b){b=b.target;b=$APP.n(b.hasAttribute("data-value"))?b:b.closest("[data-value]");if($APP.n(b)){var c=b.getAttribute("data-value");return nq(a,c,b.textContent)}return null},inputKeydown:function(b){var c=b.key;if($APP.B.i(c,"ArrowDown"))return b.preventDefault(),$APP.n(a.hasAttribute("open"))?oq(a,$APP.el):lq(a,"keyboard");if($APP.B.i(c,"ArrowUp"))return b.preventDefault(),$APP.n(a.hasAttribute("open"))?oq(a,$APP.Zk):lq(a,"keyboard");if($APP.B.i(c,"Enter"))return b.preventDefault(),
15
+ $APP.n(a.hasAttribute("open"))?pq(a):null;if($APP.B.i(c,"Escape")){if($APP.n(a.hasAttribute("open")))return b.preventDefault(),mq(a,"escape"),b=$APP.k(a,"__xComboboxRefs"),$APP.n(b)?$APP.k(b,"input").focus():null}else if($APP.B.i(c,"Home")){if($APP.n(a.hasAttribute("open")))return b.preventDefault(),a.__xComboboxActiveIdx=0,iq(a)}else if($APP.B.i(c,"End")&&$APP.n(a.hasAttribute("open")))return b.preventDefault(),b=$APP.k(a,"__xComboboxQuery"),b=$APP.z(dq($APP.k(a,"__xComboboxOptions"),$APP.n(b)?b:
16
+ "")),b=$APP.Hi.i(0,b-1),a.__xComboboxActiveIdx=b,iq(a);return null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.Cc(b.composedPath()),b=$APP.be(function(c){return c===a},b),$APP.n(b)?null:mq(a,"outside-click")):null},panelPointerdown:function(b){return b.preventDefault()},clearClick:function(){var b=a.getAttribute("value");return $APP.ch(a,"x-combobox-change-request",{value:"",label:"",previousValue:$APP.n(b)?b:""})?(a.removeAttribute("value"),a.removeAttribute("data-has-value"),
17
+ b=$APP.k(a,"__xComboboxRefs"),$APP.n(b)&&(b=$APP.k(b,"input"),b.value="",b.focus()),$APP.P(a,"x-combobox-change",{value:"",label:""})):null},chevronPointerdown:function(b){b.preventDefault();if($APP.n(a.hasAttribute("open")))return mq(a,"pointer");lq(a,"pointer");b=$APP.k(a,"__xComboboxRefs");return $APP.n(b)?$APP.k(b,"input").focus():null},focusout:function(b){return $APP.n(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.p(a.contains(b))?mq(a,"focusout"):null):null}}},rq=function(a){var b=
18
+ $APP.k(a,"__xComboboxRefs");if($APP.n(b)){var c=$APP.k(a,"__xComboboxHandlers");if($APP.n(c)){var d=$APP.k(b,"input"),e=$APP.k(b,"clear"),f=$APP.k(b,"chevron"),h=$APP.k(b,"panel");b=$APP.k(b,"slot");d.removeEventListener("focus",$APP.k(c,"inputFocus"));d.removeEventListener("input",$APP.k(c,"inputInput"));d.removeEventListener("keydown",$APP.k(c,"inputKeydown"));e.removeEventListener("click",$APP.k(c,"clearClick"));f.removeEventListener("pointerdown",$APP.k(c,"chevronPointerdown"));h.removeEventListener("pointerdown",
19
+ $APP.k(c,"panelPointerdown"));h.removeEventListener("click",$APP.k(c,"panelClick"));a.removeEventListener("focusout",$APP.k(c,"focusout"));b.removeEventListener("slotchange",$APP.k(c,"slotchange"))}}},sq=function(a){var b=$APP.k(a,"__xComboboxHandlers");return $APP.n(b)?setTimeout(function(){var c=a.isConnected;return $APP.n($APP.n(c)?a.hasAttribute("open"):c)?document.addEventListener("click",$APP.k(b,"docClick")):null},0):null},tq=function(a){a=$APP.k(a,"__xComboboxHandlers");return $APP.n(a)?document.removeEventListener("click",
20
+ $APP.k(a,"docClick")):null},vq=function(a){if(!$APP.n($APP.k(a,"__xComboboxRefs"))){var b=a.attachShadow({mode:"open"}),c=gq("style"),d=gq("div"),e=gq("input"),f=gq("button"),h=gq("span"),l=gq("div"),m=gq("slot");var q=$APP.k(uq,"n")+1;uq.n=q;q="x-cb-lb-"+$APP.Q.g(q);c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-combobox-bg:var(--x-color-surface,#ffffff);--x-combobox-fg:var(--x-color-text,#0f172a);--x-combobox-placeholder:var(--x-color-text-muted,#94a3b8);--x-combobox-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-border-hover:1px solid var(--x-color-border,#cbd5e1);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#60a5fa);--x-combobox-radius:var(--x-radius-md,6px);--x-combobox-height:2.25rem;--x-combobox-font-size:var(--x-font-size-sm,0.9375rem);--x-combobox-padding:0 0.625rem;--x-combobox-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.05));--x-combobox-disabled-opacity:var(--x-opacity-disabled,0.55);--x-combobox-chevron-color:var(--x-color-text-muted,#64748b);--x-combobox-panel-bg:var(--x-color-bg,#ffffff);--x-combobox-panel-border:1px solid var(--x-color-border,#e2e8f0);--x-combobox-panel-radius:var(--x-radius-md,8px);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-combobox-panel-max-height:16rem;--x-combobox-panel-offset:4px;--x-combobox-option-padding:0.5rem 0.625rem;--x-combobox-option-hover-bg:var(--x-color-surface-hover,#f1f5f9);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);--x-combobox-option-active-fg:#ffffff;--x-combobox-transition-duration:var(--x-transition-duration,150ms);--x-combobox-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-combobox-bg:var(--x-color-surface,#1e293b);--x-combobox-fg:var(--x-color-text,#e2e8f0);--x-combobox-placeholder:var(--x-color-text-muted,#64748b);--x-combobox-border:1px solid var(--x-color-border,#334155);--x-combobox-border-hover:1px solid var(--x-color-border,#475569);--x-combobox-border-focus:1px solid var(--x-color-focus-ring,#93c5fd);--x-combobox-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-combobox-shadow:var(--x-shadow-sm,0 1px 2px rgba(0,0,0,0.2));--x-combobox-chevron-color:var(--x-color-text-muted,#94a3b8);--x-combobox-panel-bg:var(--x-color-bg,#1e293b);--x-combobox-panel-border:1px solid var(--x-color-border,#334155);--x-combobox-panel-shadow:var(--x-shadow-md,0 4px 24px rgba(0,0,0,0.4));--x-combobox-option-hover-bg:var(--x-color-surface-hover,#334155);--x-combobox-option-active-bg:var(--x-color-primary,#3b82f6);}}[part\x3dwrapper]{display:flex;align-items:center;height:var(--x-combobox-height);background:var(--x-combobox-bg);border:var(--x-combobox-border);border-radius:var(--x-combobox-radius);box-shadow:var(--x-combobox-shadow);padding:var(--x-combobox-padding);cursor:text;transition:border var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),box-shadow var(--x-combobox-transition-duration) var(--x-combobox-transition-easing);}[part\x3dwrapper]:hover{border:var(--x-combobox-border-hover);}:host(:focus-within) [part\x3dwrapper]{border:var(--x-combobox-border-focus);box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([disabled]) [part\x3dwrapper]{opacity:var(--x-combobox-disabled-opacity);cursor:default;pointer-events:none;}[part\x3dinput]{all:unset;flex:1;min-width:0;height:100%;font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);}[part\x3dinput]::placeholder{color:var(--x-combobox-placeholder);}[part\x3dclear]{all:unset;display:none;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;font-size:0.875rem;color:var(--x-combobox-chevron-color);cursor:pointer;flex-shrink:0;border-radius:2px;}[part\x3dclear]:hover{color:var(--x-combobox-fg);}[part\x3dclear]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-combobox-focus-ring);}:host([data-has-value]) [part\x3dclear]{display:inline-flex;}:host([disabled]) [part\x3dclear]{display:none;}[part\x3dchevron]{display:inline-flex;align-items:center;color:var(--x-combobox-chevron-color);flex-shrink:0;margin-left:0.25rem;transition:transform 200ms ease;pointer-events:none;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:var(--x-z-dropdown,1000);box-sizing:border-box;width:100%;background:var(--x-combobox-panel-bg);border:var(--x-combobox-panel-border);border-radius:var(--x-combobox-panel-radius);box-shadow:var(--x-combobox-panel-shadow);padding:0.25rem 0;max-height:var(--x-combobox-panel-max-height);max-width:calc(100% - 0rem);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s var(--x-combobox-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),transform var(--x-combobox-transition-duration) var(--x-combobox-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-combobox-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-combobox-panel-offset));right:0;transform-origin:bottom right;}[part\x3doption]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);font-family:inherit;color:var(--x-combobox-fg);cursor:default;border-radius:4px;margin:0 0.25rem;}[part\x3doption]:hover{background:var(--x-combobox-option-hover-bg);}[part\x3doption][data-active]{background:var(--x-combobox-option-active-bg);color:var(--x-combobox-option-active-fg);}[part\x3doption][data-active] b{color:inherit;}[part\x3doption] b{font-weight:700;}[part\x3dempty-msg]{padding:var(--x-combobox-option-padding);font-size:var(--x-combobox-font-size);color:var(--x-combobox-placeholder);font-style:italic;margin:0 0.25rem;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dwrapper]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}@media (pointer:coarse){:host{--x-combobox-height:2.75rem;}[part\x3dclear]{width:2.75rem;height:2.75rem;}[part\x3doption]{min-height:2.75rem;display:flex;align-items:center;}}";
21
+ d.setAttribute("part","wrapper");e.setAttribute("part","input");e.setAttribute("type","text");e.setAttribute("role","combobox");e.setAttribute("aria-expanded","false");e.setAttribute("aria-autocomplete","list");e.setAttribute("aria-controls",q);e.setAttribute("autocomplete","off");f.setAttribute("part","clear");f.setAttribute("type","button");f.setAttribute("aria-label","Clear");f.setAttribute("tabindex","-1");f.textContent="×";h.setAttribute("part","chevron");h.setAttribute("aria-hidden","true");
22
+ h.innerHTML='\x3csvg width\x3d"12" height\x3d"12" viewBox\x3d"0 0 12 12" fill\x3d"none" xmlns\x3d"http://www.w3.org/2000/svg" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M2.5 4.5L6 8L9.5 4.5" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"/\x3e\x3c/svg\x3e';l.setAttribute("part","panel");l.setAttribute("role","listbox");l.setAttribute("id",q);l.setAttribute("data-placement","bottom-start");d.appendChild(e);d.appendChild(f);d.appendChild(h);b.appendChild(c);
23
+ b.appendChild(d);b.appendChild(l);b.appendChild(m);a.__xComboboxListboxId=q;a.__xComboboxOptions=$APP.pe;a.__xComboboxQuery="";a.__xComboboxActiveIdx=0;a.__xComboboxRefs={wrapper:d,input:e,clear:f,chevron:h,panel:l,slot:m}}rq(a);tq(a);a.__xComboboxHandlers=qq(a);h=$APP.k(a,"__xComboboxRefs");$APP.n(h)&&(b=$APP.k(a,"__xComboboxHandlers"),$APP.n(b)&&(c=$APP.k(h,"input"),d=$APP.k(h,"clear"),e=$APP.k(h,"chevron"),f=$APP.k(h,"panel"),h=$APP.k(h,"slot"),c.addEventListener("focus",$APP.k(b,"inputFocus")),
24
+ c.addEventListener("input",$APP.k(b,"inputInput")),c.addEventListener("keydown",$APP.k(b,"inputKeydown")),d.addEventListener("click",$APP.k(b,"clearClick")),e.addEventListener("pointerdown",$APP.k(b,"chevronPointerdown")),f.addEventListener("pointerdown",$APP.k(b,"panelPointerdown")),f.addEventListener("click",$APP.k(b,"panelClick")),a.addEventListener("focusout",$APP.k(b,"focusout")),h.addEventListener("slotchange",$APP.k(b,"slotchange"))));hq(a);return kq(a)},wq=function(a){rq(a);tq(a);a.__xComboboxModel=
25
+ null},xq=function(a,b){return $APP.n($APP.k(a,"__xComboboxRefs"))?(kq(a),$APP.B.i(b,"open")?$APP.n(a.hasAttribute("open"))?sq(a):tq(a):null):null},zq=function(a){$APP.jh(a,yq);a.show=function(){return lq(this,"programmatic")};return a.hide=function(){return mq(this,"programmatic")}},Bq=function(){return $APP.Yg("x-combobox",new $APP.N(null,5,[$APP.Pg,Aq,$APP.Qg,vq,$APP.Rg,wq,$APP.Sg,xq,$APP.Wg,zq],null))};var jq=new $APP.O(null,new $APP.N(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Aq="value placeholder name disabled required open placement".split(" "),yq=new $APP.N(null,7,[$APP.Gh,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),$APP.Mn,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"placeholder"],null),$APP.Nk,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"name"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.Ll,new $APP.N(null,
26
+ 2,[$APP.R,$APP.T,$APP.S,"required"],null),$APP.Bn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),$APP.bl,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"placement"],null)],null);
27
+ $APP.Yd(["x-combobox-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.U,$APP.X,$APP.U,$APP.am,$APP.U],null)],null),"x-combobox-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.U,$APP.X,$APP.U],null)],null),"x-combobox-input",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Qj,$APP.U],null)],null),"x-combobox-toggle",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,2,[$APP.Bn,$APP.T,$APP.Em,$APP.U],null)],null)]);var uq={n:0};$APP.ca("baredom.exports.x_combobox.init",Bq);export const init=Bq;