@baseline-ui/core 3.7.0 → 3.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 (112) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionGroup.mjs +1 -1
  3. package/dist/ActionIconButton.mjs +1 -1
  4. package/dist/AlertDialog.mjs +1 -1
  5. package/dist/AudioPlayer.mjs +1 -1
  6. package/dist/ButtonSelect.mjs +1 -1
  7. package/dist/Calendar.mjs +1 -1
  8. package/dist/ColorInput.mjs +1 -1
  9. package/dist/ColorSwatch.mjs +1 -1
  10. package/dist/ColorSwatchPicker.mjs +1 -1
  11. package/dist/ComboBox.mjs +1 -1
  12. package/dist/DateField.mjs +1 -1
  13. package/dist/Dialog.mjs +1 -1
  14. package/dist/Drawer.mjs +1 -1
  15. package/dist/Editor.mjs +1 -1
  16. package/dist/FileList.css +1 -1
  17. package/dist/FileList.mjs +1 -1
  18. package/dist/FileUploader.css +1 -1
  19. package/dist/FileUploader.mjs +1 -1
  20. package/dist/FreehandCanvas.mjs +1 -1
  21. package/dist/Image.css +10 -0
  22. package/dist/Image.mjs +1 -0
  23. package/dist/ImageGallery.mjs +1 -1
  24. package/dist/InlineAlert.mjs +1 -1
  25. package/dist/InlineToolbar.mjs +1 -1
  26. package/dist/Menu.mjs +1 -1
  27. package/dist/Modal.mjs +1 -1
  28. package/dist/NumberInput.mjs +1 -1
  29. package/dist/Pagination.mjs +1 -1
  30. package/dist/PointPicker.mjs +1 -1
  31. package/dist/Popover.mjs +1 -1
  32. package/dist/Portal.mjs +1 -1
  33. package/dist/Preview.mjs +1 -1
  34. package/dist/SearchInput.mjs +1 -1
  35. package/dist/Select.mjs +1 -1
  36. package/dist/Slider.mjs +1 -1
  37. package/dist/Stepper.mjs +1 -1
  38. package/dist/Tabs.mjs +1 -1
  39. package/dist/Tag.mjs +1 -1
  40. package/dist/TagGroup.mjs +1 -1
  41. package/dist/TaggedPagination.mjs +1 -1
  42. package/dist/TimeField.mjs +1 -1
  43. package/dist/Toast.mjs +1 -1
  44. package/dist/ToggleIconButton.mjs +1 -1
  45. package/dist/Toolbar.mjs +1 -1
  46. package/dist/Tooltip.mjs +1 -1
  47. package/dist/TreeView.css +1 -1
  48. package/dist/TreeView.mjs +1 -1
  49. package/dist/UNSAFE_ListBox.mjs +1 -1
  50. package/dist/{chunk-5W6G3ZUT.mjs → chunk-2BG2JLFC.mjs} +1 -1
  51. package/dist/{chunk-OPIPJTLG.mjs → chunk-2OXYNLVN.mjs} +1 -1
  52. package/dist/{chunk-TFBJ767L.mjs → chunk-2TXFCYPO.mjs} +1 -1
  53. package/dist/{chunk-LY2ZVEGJ.mjs → chunk-3TLWTZRL.mjs} +1 -1
  54. package/dist/chunk-3WX5PZ6X.mjs +10 -0
  55. package/dist/{chunk-MYT5CSGX.mjs → chunk-464QF4AV.mjs} +1 -1
  56. package/dist/{chunk-SSWWJZRE.mjs → chunk-46VEK5WC.mjs} +1 -1
  57. package/dist/chunk-54WJJ3EM.mjs +10 -0
  58. package/dist/chunk-57YWI7EG.mjs +10 -0
  59. package/dist/{chunk-CBV6KXGO.mjs → chunk-64IFEFOT.mjs} +1 -1
  60. package/dist/{chunk-B5VHU77N.mjs → chunk-655SS7D4.mjs} +1 -1
  61. package/dist/chunk-65PMDBYL.mjs +10 -0
  62. package/dist/chunk-6MUTSHZO.mjs +10 -0
  63. package/dist/chunk-7JE2SRIH.mjs +10 -0
  64. package/dist/chunk-AGERZJ3X.mjs +10 -0
  65. package/dist/{chunk-TLU2GNUT.mjs → chunk-CTTNZESA.mjs} +1 -1
  66. package/dist/{chunk-XVL2GXTB.mjs → chunk-EJYSTNXD.mjs} +1 -1
  67. package/dist/{chunk-JXCL5CUV.mjs → chunk-EXX7ZFGI.mjs} +1 -1
  68. package/dist/{chunk-L45T2KGW.mjs → chunk-FWPWBCOS.mjs} +1 -1
  69. package/dist/{chunk-7YCV7MPI.mjs → chunk-GIT77HDD.mjs} +2 -2
  70. package/dist/{chunk-EGYIHFEQ.mjs → chunk-GYIIVZDE.mjs} +1 -1
  71. package/dist/{chunk-FJO6KCT5.mjs → chunk-HKVAL4BB.mjs} +1 -1
  72. package/dist/{chunk-HTRO6BM5.mjs → chunk-HU75NQMI.mjs} +1 -1
  73. package/dist/chunk-HV7DKEN7.mjs +10 -0
  74. package/dist/chunk-KOPAIJJU.mjs +10 -0
  75. package/dist/{chunk-BULEKXBD.mjs → chunk-LLSXABBJ.mjs} +1 -1
  76. package/dist/{chunk-IMXJCV7G.mjs → chunk-MHO7BDER.mjs} +1 -1
  77. package/dist/{chunk-M3R4ZM34.mjs → chunk-MN7USKSC.mjs} +2 -2
  78. package/dist/{chunk-O6PPXOEX.mjs → chunk-N7MIERZH.mjs} +1 -1
  79. package/dist/{chunk-UPCEZ32D.mjs → chunk-OHTPDCQA.mjs} +1 -1
  80. package/dist/{chunk-SXZP556C.mjs → chunk-OTDBW5FO.mjs} +1 -1
  81. package/dist/chunk-PMMLDGSP.mjs +10 -0
  82. package/dist/{chunk-MURSKAKT.mjs → chunk-PSAOTHYG.mjs} +1 -1
  83. package/dist/chunk-PSUCNVCE.mjs +10 -0
  84. package/dist/{chunk-NT2MFIKD.mjs → chunk-RIVN2JT3.mjs} +1 -1
  85. package/dist/{chunk-NO3DNA2U.mjs → chunk-RRYP54UI.mjs} +1 -1
  86. package/dist/chunk-SCUNJNIO.mjs +0 -0
  87. package/dist/{chunk-F56P4EKI.mjs → chunk-SND4G3LM.mjs} +1 -1
  88. package/dist/{chunk-YAI33K42.mjs → chunk-SOWGXN5P.mjs} +1 -1
  89. package/dist/{chunk-QL7SC5BW.mjs → chunk-TCVES3WI.mjs} +1 -1
  90. package/dist/{chunk-P6V5EAYL.mjs → chunk-TU7JTGGE.mjs} +1 -1
  91. package/dist/{chunk-MKHLBKSN.mjs → chunk-UCIAWI4E.mjs} +1 -1
  92. package/dist/{chunk-MJPCLLDU.mjs → chunk-VQPEDDH6.mjs} +1 -1
  93. package/dist/{chunk-IN7BLI4M.mjs → chunk-WQBA2P6W.mjs} +1 -1
  94. package/dist/{chunk-EDMVODCD.mjs → chunk-XWKTG7NR.mjs} +1 -1
  95. package/dist/{chunk-IVDIKT6F.mjs → chunk-YLL2APKH.mjs} +1 -1
  96. package/dist/{chunk-4QGZDJW4.mjs → chunk-Z73YU5ZQ.mjs} +1 -1
  97. package/dist/{chunk-AQTRFPF2.mjs → chunk-ZE2B6BS7.mjs} +1 -1
  98. package/dist/{chunk-QIYZRQGP.mjs → chunk-ZLDFLERD.mjs} +1 -1
  99. package/dist/index.css +1 -1
  100. package/dist/index.d.ts +234 -28
  101. package/dist/index.js +22 -22
  102. package/dist/index.mjs +1 -1
  103. package/package.json +5 -5
  104. package/sbom.json +13 -13
  105. package/dist/chunk-5EI2562M.mjs +0 -10
  106. package/dist/chunk-5ILCVLWY.mjs +0 -10
  107. package/dist/chunk-CD5KKXIM.mjs +0 -10
  108. package/dist/chunk-DG5VNJOH.mjs +0 -10
  109. package/dist/chunk-VNWKXT3X.mjs +0 -10
  110. package/dist/chunk-YEIRJNEA.mjs +0 -10
  111. package/dist/chunk-YQKEP62C.mjs +0 -10
  112. package/dist/chunk-ZXN5VT4G.mjs +0 -10
@@ -7,4 +7,4 @@ import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$2}from'./chunk-CU6D2EA6.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var $=1e7;function xt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var B={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Mt={top:"left",left:"top"},it={top:"height",left:"width"},Rt={width:"totalWidth",height:"totalHeight"},J={};function It(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i=0,c=0,u=0,r={},m=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i=h.clientHeight,o=e?.width??s,n=e?.height??i,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=Math.max(0,e.pageTop-(r.top??0)),u=Math.max(0,e.pageLeft-(r.left??0)));}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i=n;return j()&&(t.tagName==="BODY"||t.tagName==="HTML")&&m&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i,scroll:r,top:c,left:u}}function vt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[B[t]]+s,m=i[t]+o.scroll[B[t]]+u-s,h=e-c+o.scroll[B[t]]+i[t]-o[B[t]],d=e-c+l+o.scroll[B[t]]+i[t]-o[B[t]];return h<r?r-h:d>m?Math.max(m-d,r-h):0}function St(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=B[e]||"right",n=Mt[o];B[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,m){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:L,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,C=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,C),h===y){let D=c?m[L]:m[Rt[L]];b[G[y]]=Math.floor(D-t[y]+n);}else b[y]=Math.floor(t[y]+t[L]+n);return b}function zt(t,e,l,o,n,s,i,c,u,r,m){let h=(t.top!=null?t.top:u[Rt.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(m?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(m?.offsetTop??0)+(m?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function wt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:m}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[m]+t[r]+(c?e[r]:0)-l[r]-l[m]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function Ft(t,e,l,o,n,s,i,c,u,r,m,h,d,y,f,L,w,b,E,C,D,_){let a=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=a,P=tt(e,c,l,a,m,h,r,d,f,L,u),S=m,k=E?$:wt(c,r,e,n,s+m,a,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,m,h,r,d,f,L,u);wt(c,r,e,n,s+m,j,u,w)>k&&(a=j,P=X,S=m);}if(_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=a.crossPlacement==="center"?j>0?"left":"right":G[a.crossPlacement];if(X){let lt=rt(`${a.placement} ${X}`),pt=tt(e,c,l,lt,m,h,r,d,f,L,u),Ot=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Ot)<Math.abs(j)&&(a=lt,P=pt);}}}let I="bottom";a.axis==="top"?a.placement==="top"?I="top":a.placement==="bottom"&&(I="bottom"):a.crossAxis==="top"&&(a.crossPlacement==="top"?I="bottom":a.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")&&a.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!D?void 0:zt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,a,S,h,r,d,f,L,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[B[p]],H=g+.5*e[R],F=f/2+L,W=B[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-W-f/2-L,ot=e[p]+f/2-(P[p]+n[B[p]]),Ht=e[p]+e[R]-f/2-(P[p]+n[B[p]]),Lt=a$2(H,ot,Ht);v[p]=a$2(Lt,F,N),{placement:M,crossPlacement:T}=a,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let mt=M==="left"||M==="top"?l[A]:0,Ct={x:M==="top"||M==="bottom"?g:mt,y:M==="left"||M==="right"?g:mt};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ct}}function Tt(t){let{placement:e,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:m,crossOffset:h$1,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:L}=t,w=a(o),b=b$1(o),E=It(o),C=o instanceof b.HTMLElement?Bt(o):w.documentElement,D=C===w.documentElement,_=b.getComputedStyle(C).position,a$1=!!_&&_!=="static",A=D?Z(l,false,L):Et(l,C,false,L);if(!D){let{marginTop:F,marginLeft:W}=b.getComputedStyle(l);A.top+=parseInt(F,10)||0,A.left+=parseInt(W,10)||0;}let p=Z(o,true),R=St(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=vt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:xt("left",w,E),z=k?I:xt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(C,E);a$1&&!D&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:Et(P,C,false),H=!T&&h(P,C)&&C!==P;return Ft(e,A,p,M,R,s,i,x,v,g,m,h$1,a$1,d,y,f,H,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:m,clientLeft:h}=o.documentElement;return {top:n+u-m,left:s+r-h,width:i,height:c}}function Et(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function Bt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!At(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!At(o);)o=o.parentElement;return o||e.documentElement}function At(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function at(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function oe(t){let{direction:e$2}=b(),{arrowSize:l$1,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i$1=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:m,boundaryAxis:h$1="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f=0,shouldUpdatePosition:L=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:C,arrowBoundaryOffset:D=0,getTargetRect:_}=t,a$2=m??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[L,c,n.current,o.current,s?.current,i$1.current,u,r,a$2,h$1,d,y,f,b$3,e$2,C,D,l$1],M=useRef(at(n.current)?.scale);useEffect(()=>{b$3&&(M.current=at(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(L===false||!b$3||!n.current||!o.current||a$2===void 0||at(n.current)?.scale!==M.current)return;let z=a(n.current),x=i(z),v=b$1(z.body),g=null;if(i$1.current&&h(i$1.current,x)){let W=x?.getBoundingClientRect(),N=i$1.current.getBoundingClientRect();g={type:"top",offset:(W?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(W?.bottom??0)-N.bottom);}let H=n.current;!C&&n.current&&(H.style.top="0px",H.style.bottom="",H.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let F=Tt({placement:Vt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i$1.current||n.current,padding:u,shouldFlip:r,boundaryElement:a$2,boundaryAxis:h$1,horizontalBoundaryBehavior:d,offset:y,crossOffset:f,maxHeight:C,arrowSize:l$1??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:D,targetRect:_?.(o.current)});if(F.position){if(H.style.top="",H.style.bottom="",H.style.left="",H.style.right="",Object.keys(F.position).forEach(W=>H.style[W]=F.position[W]+"px"),H.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",g&&x&&i$1.current){let W=x.getBoundingClientRect(),N=i$1.current.getBoundingClientRect(),ot=W[g.type]-N[g.type];i$1.current.scrollTop+=ot-g.offset;}p(F);}},R);a$1(T,R);let P=a$2?b$1(a$2):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Dt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e({ref:n,onResize:k}),e({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,H=()=>{I.current&&x();};g?.addEventListener("resize",x),g?.addEventListener("scroll",H);let F=e$1(l(n.current),"scroll",H);return ()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",H),F();}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Dt(t,e=window){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Vt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{oe as a};
10
+ var $=1e7;function xt(t,e,l){let o=st(e.body,l);return t==="left"?{...o,left:-$/2,width:$,totalWidth:$,scroll:{...o.scroll,left:0}}:{...o,top:-$/2,height:$,totalHeight:$,scroll:{...o.scroll,top:0}}}var B={top:"top",bottom:"top",left:"left",right:"left"},G={top:"bottom",bottom:"top",left:"right",right:"left"},Mt={top:"left",left:"top"},it={top:"height",left:"width"},Rt={width:"totalWidth",height:"totalHeight"},J={};function It(t){let e=b$1(t);return typeof e<"u"&&e.visualViewport?e.visualViewport:null}function st(t,e){let l=a(t),o=0,n=0,s=0,i=0,c=0,u=0,r={},m=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=l.documentElement;s=h.clientWidth,i=h.clientHeight,o=e?.width??s,n=e?.height??i,r.top=h.scrollTop||t.scrollTop,r.left=h.scrollLeft||t.scrollLeft,e&&(c=Math.max(0,e.pageTop-(r.top??0)),u=Math.max(0,e.pageLeft-(r.left??0)));}else (({width:o,height:n,top:c,left:u}=Z(t,false))),r.top=t.scrollTop,r.left=t.scrollLeft,s=o,i=n;return j()&&(t.tagName==="BODY"||t.tagName==="HTML")&&m&&(r.top=0,r.left=0,c=e?.pageTop??0,u=e?.pageLeft??0),{width:o,height:n,totalWidth:s,totalHeight:i,scroll:r,top:c,left:u}}function vt(t){return {top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Q(t,e,l,o,n,s,i){let c=n.scroll[t]??0,u=o[it[t]],r=i[t]+o.scroll[B[t]]+s,m=i[t]+o.scroll[B[t]]+u-s,h=e-c+o.scroll[B[t]]+i[t]-o[B[t]],d=e-c+l+o.scroll[B[t]]+i[t]-o[B[t]];return h<r?r-h:d>m?Math.max(m-d,r-h):0}function St(t){let l=b$1(t).getComputedStyle(t);return {top:parseInt(l.marginTop,10)||0,bottom:parseInt(l.marginBottom,10)||0,left:parseInt(l.marginLeft,10)||0,right:parseInt(l.marginRight,10)||0}}function rt(t){if(J[t])return J[t];let[e,l]=t.split(" "),o=B[e]||"right",n=Mt[o];B[l]||(l="center");let s=it[o],i=it[n];return J[t]={placement:e,crossPlacement:l,axis:o,crossAxis:n,size:s,crossSize:i},J[t]}function tt(t,e,l,o,n,s,i,c,u,r,m){let{placement:h,crossPlacement:d,axis:y,crossAxis:f,size:L,crossSize:w}=o,b={};b[f]=t[f]??0,d==="center"?b[f]+=((t[w]??0)-(l[w]??0))/2:d!==f&&(b[f]+=(t[w]??0)-(l[w]??0)),b[f]+=s;let E=t[f]-l[w]+u+r,C=t[f]+t[w]-u-r;if(b[f]=a$2(b[f],E,C),h===y){let D=c?m[L]:m[Rt[L]];b[G[y]]=Math.floor(D-t[y]+n);}else b[y]=Math.floor(t[y]+t[L]+n);return b}function zt(t,e,l,o,n,s,i,c,u,r,m){let h=(t.top!=null?t.top:u[Rt.height]-(t.bottom??0)-i)-(u.scroll.top??0),d=r?l.top:0,y={top:Math.max(e.top+d,(m?.offsetTop??e.top)+d),bottom:Math.min(e.top+e.height+d,(m?.offsetTop??0)+(m?.height??0))};return c!=="top"?Math.max(0,y.bottom-h-((n.top??0)+(n.bottom??0)+s)):Math.max(0,h+i-y.top-((n.top??0)+(n.bottom??0)+s))}function wt(t,e,l,o,n,s,i,c){let{placement:u,axis:r,size:m}=s;return u===r?Math.max(0,l[r]-(i.scroll[r]??0)-(t[r]+(c?e[r]:0))-(o[r]??0)-o[G[r]]-n):Math.max(0,t[m]+t[r]+(c?e[r]:0)-l[r]-l[m]+(i.scroll[r]??0)-(o[r]??0)-o[G[r]]-n)}function Ft(t,e,l,o,n,s,i,c,u,r,m,h,d,y,f,L,w,b,E,C,D,_){let a=rt(t),{size:A,crossAxis:p,crossSize:R,placement:M,crossPlacement:T}=a,P=tt(e,c,l,a,m,h,r,d,f,L,u),S=m,k=E?$:wt(c,r,e,n,s+m,a,u,w);if(i&&l[A]>k){let j=rt(`${G[M]} ${T}`),X=tt(e,c,l,j,m,h,r,d,f,L,u);wt(c,r,e,n,s+m,j,u,w)>k&&(a=j,P=X,S=m);}if(_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")){let j=E?0:Q(p,P[p],l[R],c,u,s,r);if(j!==0){let X=a.crossPlacement==="center"?j>0?"left":"right":G[a.crossPlacement];if(X){let lt=rt(`${a.placement} ${X}`),pt=tt(e,c,l,lt,m,h,r,d,f,L,u),Ot=E?0:Q(p,pt[p],l[R],c,u,s,r);Math.abs(Ot)<Math.abs(j)&&(a=lt,P=pt);}}}let I="bottom";a.axis==="top"?a.placement==="top"?I="top":a.placement==="bottom"&&(I="bottom"):a.crossAxis==="top"&&(a.crossPlacement==="top"?I="bottom":a.crossPlacement==="bottom"&&(I="top"));let V=_==="anchor"&&C&&(a.placement==="top"||a.placement==="bottom")&&a.crossPlacement!=="center",z=V||E?0:Q(p,P[p],l[R],c,u,s,r);P[p]+=z;let x=E||!D?void 0:zt(P,c,r,d,n,s,l.height,I,u,w,b);y&&(x==null||y<x)&&(x=y),l.height=x!=null?Math.min(l.height,x):l.height,P=tt(e,c,l,a,S,h,r,d,f,L,u),z=V||E?0:Q(p,P[p],l[R],c,u,s,r),P[p]+=z;let v={},g=e[p]-P[p]-n[B[p]],H=g+.5*e[R],F=f/2+L,W=B[p]==="left"?(n.left??0)+(n.right??0):(n.top??0)+(n.bottom??0),N=l[R]-W-f/2-L,ot=e[p]+f/2-(P[p]+n[B[p]]),Ht=e[p]+e[R]-f/2-(P[p]+n[B[p]]),Lt=a$2(H,ot,Ht);v[p]=a$2(Lt,F,N),{placement:M,crossPlacement:T}=a,f?g=v[p]:T==="right"?g+=e[R]:T==="center"&&(g+=e[R]/2);let mt=M==="left"||M==="top"?l[A]:0,Ct={x:M==="top"||M==="bottom"?g:mt,y:M==="left"||M==="right"?g:mt};return {position:P,maxHeight:x,arrowOffsetLeft:v.left,arrowOffsetTop:v.top,placement:M,triggerAnchorPoint:Ct}}function Tt(t){let{placement:e,targetNode:l,overlayNode:o,scrollNode:n,padding:s,shouldFlip:i,boundaryElement:c,boundaryAxis:u="both",horizontalBoundaryBehavior:r="shift",offset:m,crossOffset:h$1,maxHeight:d,arrowSize:y=0,arrowBoundaryOffset:f=0,targetRect:L}=t,w=a(o),b=b$1(o),E=It(o),C=o instanceof b.HTMLElement?Bt(o):w.documentElement,D=C===w.documentElement,_=b.getComputedStyle(C).position,a$1=!!_&&_!=="static",A=D?Z(l,false,L):Et(l,C,false,L);if(!D){let{marginTop:F,marginLeft:W}=b.getComputedStyle(l);A.top+=parseInt(F,10)||0,A.left+=parseInt(W,10)||0;}let p=Z(o,true),R=St(o);p.width+=(R.left??0)+(R.right??0),p.height+=(R.top??0)+(R.bottom??0);let M=vt(n),T=c===null,P=c??w.body,S=!T&&u!=="vertical",k=!T&&u!=="horizontal",I=st(P,E),V=S?I:xt("left",w,E),z=k?I:xt("top",w,E),x={...z,left:V.left,width:V.width,totalWidth:V.totalWidth,scroll:{top:z.scroll.top,left:V.scroll.left}},v=st(C,E);a$1&&!D&&(x.top-=v.top,x.left-=v.left,v.top=0,v.left=0);let g=T?{top:0,left:0,width:0,height:0}:Et(P,C,false),H=!T&&h(P,C)&&C!==P;return Ft(e,A,p,M,R,s,i,x,v,g,m,h$1,a$1,d,y,f,H,E,T,S,k,r)}function et(t,e){let l=b$1(t),{top:o,left:n,width:s,height:i}=t.getBoundingClientRect();return e&&t instanceof l.HTMLElement&&(s=t.offsetWidth,i=t.offsetHeight),{top:o,left:n,width:s,height:i}}function Z(t,e,l){let o=a(t),{top:n,left:s,width:i,height:c}=l||et(t,e),{scrollTop:u,scrollLeft:r,clientTop:m,clientLeft:h}=o.documentElement;return {top:n+u-m,left:s+r-h,width:i,height:c}}function Et(t,e,l,o){let n=b$1(t),s=n.getComputedStyle(t),i;if(s.position==="fixed")i=o||et(t,l);else {i=Z(t,l,o);let c=Z(e,l),u=n.getComputedStyle(e);c.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,c.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=c.top,i.left-=c.left;}return i.top-=parseInt(s.marginTop,10)||0,i.left-=parseInt(s.marginLeft,10)||0,i}function Bt(t){let e=a(t),l=b$1(t),o=t.offsetParent;if(o&&o===e.body&&l.getComputedStyle(o).position==="static"&&!At(o)&&(o=e.documentElement),o==null)for(o=t.parentElement;o&&!At(o);)o=o.parentElement;return o||e.documentElement}function At(t){let l=b$1(t).getComputedStyle(t);return l.transform!=="none"||/transform|perspective/.test(l.willChange)||l.filter!=="none"||l.contain==="paint"||"backdropFilter"in l&&l.backdropFilter!=="none"||"WebkitBackdropFilter"in l&&l.WebkitBackdropFilter!=="none"}function at(t){return typeof document>"u"?null:b$1(t).visualViewport??null}function oe(t){let{direction:e$2}=b(),{arrowSize:l$1,targetRef:o,overlayRef:n,arrowRef:s,scrollRef:i$1=n,placement:c="bottom",containerPadding:u=12,shouldFlip:r=true,boundaryElement:m,boundaryAxis:h$1="both",horizontalBoundaryBehavior:d="shift",offset:y=0,crossOffset:f=0,shouldUpdatePosition:L=true,shouldCloseOnScroll:w=true,isOpen:b$3=true,onClose:E,maxHeight:C,arrowBoundaryOffset:D=0,getTargetRect:_}=t,a$2=m??(typeof document<"u"?o.current?.ownerDocument.body??n.current?.ownerDocument.body??document.body:void 0),[A,p]=useState(null),R=[L,c,n.current,o.current,s?.current,i$1.current,u,r,a$2,h$1,d,y,f,b$3,e$2,C,D,l$1],M=useRef(at(n.current)?.scale);useEffect(()=>{b$3&&(M.current=at(n.current)?.scale);},[b$3,n]);let T=useCallback(()=>{if(L===false||!b$3||!n.current||!o.current||a$2===void 0||at(n.current)?.scale!==M.current)return;let z=a(n.current),x=i(z),v=b$1(z.body),g=null;if(i$1.current&&h(i$1.current,x)){let W=x?.getBoundingClientRect(),N=i$1.current.getBoundingClientRect();g={type:"top",offset:(W?.top??0)-N.top},g.offset>N.height/2&&(g.type="bottom",g.offset=(W?.bottom??0)-N.bottom);}let H=n.current;!C&&n.current&&(H.style.top="0px",H.style.bottom="",H.style.maxHeight=(v.visualViewport?.height??v.innerHeight)+"px");let F=Tt({placement:Vt(c,e$2),overlayNode:n.current,targetNode:o.current,scrollNode:i$1.current||n.current,padding:u,shouldFlip:r,boundaryElement:a$2,boundaryAxis:h$1,horizontalBoundaryBehavior:d,offset:y,crossOffset:f,maxHeight:C,arrowSize:l$1??(s?.current?et(s.current,true).width:0),arrowBoundaryOffset:D,targetRect:_?.(o.current)});if(F.position){if(H.style.top="",H.style.bottom="",H.style.left="",H.style.right="",Object.keys(F.position).forEach(W=>H.style[W]=F.position[W]+"px"),H.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",g&&x&&i$1.current){let W=x.getBoundingClientRect(),N=i$1.current.getBoundingClientRect(),ot=W[g.type]-N[g.type];i$1.current.scrollTop+=ot-g.offset;}p(F);}},R);a$1(T,R);let P=a$2?b$1(a$2):o.current?b$1(o.current):n.current?b$1(n.current):void 0;Dt(T,P);let S=useRef(null),k=useCallback(()=>{S.current!==null&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{S.current=null,T();});},[T]);useEffect(()=>()=>{S.current!==null&&cancelAnimationFrame(S.current);},[]),e({ref:n,onResize:k}),e({ref:o,onResize:k});let I=useRef(false);a$1(()=>{let z,x=()=>{I.current=true,clearTimeout(z),z=setTimeout(()=>{I.current=false;},500),T();},g=b$1(n.current).visualViewport,H=()=>{I.current&&x();};g?.addEventListener("resize",x),g?.addEventListener("scroll",H);let F=e$1(l(n.current),"scroll",H);return ()=>{g?.removeEventListener("resize",x),g?.removeEventListener("scroll",H),F();}},[T]);let V=useCallback(()=>{I.current||E?.();},[E,I]);return b$2({triggerRef:o,isOpen:b$3,onClose:w?E&&V:null}),{overlayProps:{style:{position:A?"absolute":"fixed",top:A?void 0:0,left:A?void 0:0,zIndex:1e5,...A?.position,maxHeight:A==null?"100vh":A.maxHeight!=null?`${A.maxHeight}px`:""}},placement:A?.placement??null,triggerAnchorPoint:A?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:A?.arrowOffsetLeft,top:A?.arrowOffsetTop}},updatePosition:T}}function Dt(t,e=typeof window<"u"?window:void 0){a$1(()=>(e?.addEventListener("resize",t,false),()=>{e?.removeEventListener("resize",t,false);}),[t,e]);}function Vt(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}export{oe as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$a}from'./chunk-5HXTXIE5.mjs';import {a as a$3}from'./chunk-MZIQ27JP.mjs';import {d,a as a$9,c as c$2,b as b$3}from'./chunk-5MUEJ5WI.mjs';import {a as a$8}from'./chunk-RO5ZRU3Y.mjs';import {a as a$5}from'./chunk-6GV3YWV7.mjs';import {a}from'./chunk-R6TFTLMV.mjs';import {b,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {b as b$2}from'./chunk-INFMXVHD.mjs';import {a as a$6}from'./chunk-2OXYNLVN.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-2VY4FAOY.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$4}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UndoIcon,RedoIcon}from'@baseline-ui/icons/16';import {useGranularEffect}from'granular-hooks';import {getStroke}from'perfect-freehand';import h,{useState,useCallback,useMemo,useRef}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function le({line:t,options:o}){let r=useRef([]),m=useMemo(()=>{let i=Math.ceil(t.length/g),d;for(let a=0;a<i;a++)if(!(!(a===i-1)&&!!r.current[a])){let C=t.slice(a*g-(a>0?1:0),a*g+g);d=a$a(getStroke(C.map(([k,v,l])=>({x:k,y:v,pressure:l})),o)),C.length>=(a>0?g+1:g)&&(r.current[a]=d);}return d},[t,o]);return [...r.current,m]}var g=180;var Xe={size:1,thinning:0,smoothing:0,streamline:0,easing:t=>t,start:{taper:0,easing:t=>t,cap:true},end:{taper:0,easing:t=>t,cap:true},simulatePressure:false},pe=h.forwardRef(({className:t,style:o,canvasClassName:r,canvasStyle:m,isBound:i=true,strokeWidth:d$1=2,strokeColor:a$a="#3A87FD",onChange:P,defaultValue:H,onChangeEnd:C,enableHistory:k=false,isInline:v=true,isDisabled:l,placeholder:E,clearLabel:R,undoLabel:ve,redoLabel:ge,footerClassName:Pe,canvasRef:Ce,value:N,footerStyle:ke,"data-block-id":ye,"data-block-class":Se,"aria-label":T,description:be="This is a canvas for drawing using a mouse or touch input.",...c$3},Fe)=>{let U=b(),De=h.useRef(null),[u,S]=h.useState(N||H||[]),z=h.useMemo(()=>({...Xe,...c$3}),[c$3]),[p,V]=h.useState(),I=c(),{labelProps:Ee,fieldProps:Re}=a({...c$3,"aria-label":T===void 0&&!c$3.label&&!c$3["aria-labelledby"]?"Drawing canvas":T,labelElementType:"span"}),{isFocusVisible:Me,focusProps:we}=a$1({within:true}),{hoverProps:Oe,isHovered:Le}=a$2({isDisabled:l}),{undo:x,redo:G,canRedo:K,canUndo:B,push:W}=a$3(u,{onAction:e=>{e&&(S(e),C?.(e));},isDisabled:!k}),{keyboardProps:He}=j({onKeyDown:e=>{e.key==="Backspace"?A():e.key==="z"&&(e.metaKey||e.ctrlKey)&&(e.shiftKey?K&&G():B&&x());}}),[Ne,_]=useState(false),Te=useCallback(e=>{let f=e.currentTarget.getBoundingClientRect();V(f),e.target.setPointerCapture(e.pointerId);let y=[e.clientX-f.x,e.clientY-f.y,e.pressure];S(s=>[...s,[y]]),_(true);},[]),Ue=useCallback(e=>{if(e.buttons!==1||!p)return;let y=he(e.nativeEvent).map(s=>[i?a$4(s.clientX-p.left,0,p.width):s.clientX-p.left,i?a$4(s.clientY-p.top,0,p.height):s.clientY-p.top,s.pressure]);S(s=>{let M=[...s];return M[s.length-1]=[...M[s.length-1],...y],M});},[p,i]),ze=()=>{p&&(C?.(u),W(u),_(false),V(void 0));};useGranularEffect(()=>{P?.(u);},[u],[P]);let A=()=>{S([]),W([]);};return jsxs("div",{ref:b$4(De,Fe),className:a$7(b$3,"BaselineUI-FreehandCanvas",t),style:o,"aria-disabled":l,"data-block-id":ye,"data-block-class":Se,children:[c$3.label||k?jsxs("div",{className:d({isInline:v}),children:[c$3.label?jsx(a$5,{type:"label",size:"sm",...Ee,children:c$3.label}):jsx("span",{}),k?jsxs("div",{children:[jsx(a$6,{variant:"secondary",size:"sm",isDisabled:!B||l,icon:UndoIcon,onPress:x,"aria-label":ve||U.formatMessage(ce.undo)}),jsx(a$6,{variant:"secondary",size:"sm",isDisabled:!K||l,icon:RedoIcon,onPress:G,"aria-label":ge||U.formatMessage(ce.redo)})]}):null]}):null,jsxs("div",{role:"application",...c$1(we,He,Oe,Re),tabIndex:l?void 0:0,className:a$7(a$8({isInline:v,isHovered:Le}),a$9({isFocusVisible:Me,isInline:v,isDisabled:!!l}),r),"aria-describedby":[I,c$3["aria-describedby"]].filter(Boolean).join(" "),style:m,ref:Ce,children:[jsx(b$1,{children:jsx("div",{id:I,children:be})}),jsx("svg",{width:m?.width||"100%",height:m?.height||"100%",onPointerDown:Te,onPointerMove:Ue,onPointerUp:ze,children:(N||u).map((e,f,y)=>f<y.length-1||!Ne?jsx(fe,{line:e,options:z,strokeColor:a$a,strokeWidth:d$1},f):jsx(ue,{line:e,options:z,strokeColor:a$a,strokeWidth:d$1},f))})]}),E||R?jsx("div",{style:ke,className:a$7(c$2({isInline:v,isDisabled:l}),Pe),children:(u.length||!E)&&R?jsx(b$2,{size:"sm",variant:"ghost",label:R,isDisabled:l,onPress:A}):jsx(b$2,{size:"sm",variant:"ghost",label:E,isDisabled:true})}):null]})});pe.displayName="FreehandCanvas";var fe=h.memo(({line:t,options:o,strokeColor:r,strokeWidth:m})=>{let i=useMemo(()=>a$a(getStroke(t.map(([d,a,P])=>({x:d,y:a,pressure:P})),o)),[t,o]);return jsx("path",{d:i,stroke:r,strokeWidth:m})});fe.displayName="Stroke";var ue=h.memo(({line:t,options:o,strokeColor:r,strokeWidth:m})=>{let i=le({line:t,options:o});return jsx(Fragment,{children:i.map((d,a)=>jsx("path",{d,stroke:r,strokeWidth:m},a))})});ue.displayName="SplitStroke";function he(t){if(typeof t.getCoalescedEvents=="function"){let o=t.getCoalescedEvents();return o.length>0?o.flatMap(r=>he(r)):[t]}return [t]}var ce=c$3({undo:{defaultMessage:"Undo",id:"bui.freehandCanvas.undo"},redo:{defaultMessage:"Redo",id:"bui.freehandCanvas.redo"}});export{pe as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$4}from'./chunk-G77E7EDE.mjs';import {a as a$6}from'./chunk-LSPDPDB6.mjs';import {d}from'./chunk-QMV2O57M.mjs';import {a as a$1}from'./chunk-NGZRN4SF.mjs';import {c,b}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b as b$2}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import fe,{useMemo,useCallback,useEffect,useRef}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {jsx,jsxs}from'react/jsx-runtime';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var Y={"ar-AE":{steplist:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062E\u0637\u0648\u0627\u062A"},"bg-BG":{steplist:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441\u044A\u0441 \u0441\u0442\u044A\u043F\u043A\u0438"},"cs-CZ":{steplist:"Seznam krok\u016F"},"da-DK":{steplist:"Trinliste"},"de-DE":{steplist:"Schrittliste"},"el-GR":{steplist:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD"},"en-US":{steplist:"Step List"},"es-ES":{steplist:"Lista de pasos"},"et-EE":{steplist:"Sammude loend"},"fi-FI":{steplist:"Vaiheluettelo"},"fr-FR":{steplist:"Liste des \xE9tapes"},"he-IL":{steplist:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E6\u05E2\u05D3\u05D9\u05DD"},"hr-HR":{steplist:"Lista koraka"},"hu-HU":{steplist:"L\xE9p\xE9sek list\xE1ja"},"it-IT":{steplist:"Elenco dei passaggi"},"ja-JP":{steplist:"\u624B\u9806\u30EA\u30B9\u30C8"},"ko-KR":{steplist:"\uB2E8\uACC4 \uBAA9\uB85D"},"lt-LT":{steplist:"\u017Dingsni\u0173 s\u0105ra\u0161as"},"lv-LV":{steplist:"Darb\u012Bbu saraksts"},"nb-NO":{steplist:"Trinnliste"},"nl-NL":{steplist:"Stappenlijst"},"pl-PL":{steplist:"Lista krok\xF3w"},"pt-BR":{steplist:"Lista de etapas"},"pt-PT":{steplist:"Lista de passos"},"ro-RO":{steplist:"Lista de pa\u0219i"},"ru-RU":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u0448\u0430\u0433\u043E\u0432"},"sk-SK":{steplist:"Zoznam krokov"},"sl-SI":{steplist:"Seznam korakov"},"sr-SP":{steplist:"Lista koraka"},"sv-SE":{steplist:"Steglista"},"tr-TR":{steplist:"Ad\u0131m Listesi"},"uk-UA":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0440\u043E\u043A\u0456\u0432"},"zh-CN":{steplist:"\u6B65\u9AA4\u5217\u8868"},"zh-TW":{steplist:"\u6B65\u9A5F\u6E05\u55AE"}};function D(p,t,a){let{"aria-label":s}=p,{listProps:i}=a$6({...p,...t,allowsTabNavigation:true,ref:a}),r=b$1(Y,"@react-aria/steplist");return {listProps:{...{...c$1(i,a$7(p,{labelable:true})),"aria-label":s||r.format("steplist")},tabIndex:void 0}}}function N(p){let t=a$4({...p,onSelectionChange:p.onSelectionChange?e=>{e!=null&&p.onSelectionChange?.(e);}:void 0}),[a,s]=a$5(p.lastCompletedStep,p.defaultLastCompletedStep??null,p.onLastCompletedStepChange),{setSelectedKey:i,selectedKey:r,collection:l}=t,{indexMap:n,keysLinkedList:_}=useMemo(()=>me(l),[l]),z=r!=null?n.get(r):0,c=useCallback(e=>e===void 0?false:e!==null&&a!==null&&n.has(e)&&n.has(a)&&n.get(e)<=n.get(a),[n,a]),g=useCallback((e,d)=>{let y=null;if(e&&e.size>0)for(y=e.getFirstKey();y!==e.getLastKey()&&y&&(d.has(y)||c(y));)y=e.getKeyAfter(y);return y},[c]);useEffect(()=>{let e=t.selectedKey;(t.selectionManager.isEmpty||e==null||!t.collection.getItem(e))&&(e=g(t.collection,t.disabledKeys),e!==null&&t.selectionManager.replaceSelection(e)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(e);let d=(a!==null?n.get(a):-1)??-1;z!==void 0&&z>0&&z>d+1&&e!==null&&_.has(e)&&s(_.get(e));});function m(e){if(p.isDisabled||t.disabledKeys.has(e)||p.isReadOnly)return false;if(c(e))return true;let d=_.get(e);return c(d)||e===t.collection.getFirstKey()}function h(e){let d=_.get(e);d&&!c(d)&&s(d),i(e);}return {...t,setSelectedKey:h,setLastCompletedStep:s,isCompleted:c,isSelectable:m}}function me(p){let t=new Map,a=new Map,s=0,i;for(let r of p)t.set(r.key,s),a.set(r.key,i?.key),i=r,s++;return {indexMap:t,keysLinkedList:a}}var ee=a({defaultClassName:"_41r3q2q _1yep5z6kb _1yep5z6kc _1yep5z6kd",variantClassNames:{variant:{condensed:"_41r3q2r _1yep5z618j",expanded:"_41r3q2s _1yep5z6us _1yep5z6ut _1yep5z6uu _1yep5z6sg _1yep5z6sh _1yep5z6si _1yep5z6173 _1yep5z6174 _1yep5z6175"},status:{complete:"_1yep5z6136",active:"_41r3q2u",incomplete:"_41r3q2v"},isDisabled:{true:"_41r3q2w"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_1yep5z61pt"]]}),te=a({defaultClassName:"_1yep5z6ez",variantClassNames:{size:{sm:"_1yep5z610e",md:"_1yep5z610h"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),se=a({defaultClassName:"_41r3q28 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6mf _1yep5z6mh _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m0",variantClassNames:{size:{sm:"_41r3q29 _1yep5z610e",md:"_41r3q2a _1yep5z610h"},status:{complete:"_41r3q2b _1yep5z6136 _1yep5z611n",active:"_1yep5z612s _1yep5z611h _1yep5z6142",incomplete:"_1yep5z612s _1yep5z611h _1yep5z613z"},isDisabled:{true:"_41r3q2e"},isFocusVisible:{true:"_41r3q2f"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_41r3q2g _1yep5z61pt _1yep5z61o6"],[{status:"active",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"],[{status:"incomplete",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"]]}),pe=a({defaultClassName:"_41r3q23 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{variant:{condensed:"_1yep5z618j _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_41r3q25 _1yep5z6173 _1yep5z6174 _1yep5z6175"},isLast:{true:"_41r3q26"}},defaultVariants:{},compoundVariants:[]}),ae="_41r3q27 _1yep5z60 _1yep5z61 _1yep5z62 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m5",ie=a({defaultClassName:"_41r3q20 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{condensed:"_1yep5z616i _1yep5z616j _1yep5z616k _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_1yep5z616c _1yep5z616d _1yep5z616e _1yep5z618m _1yep5z618l _1yep5z6wy _1yep5z6wz _1yep5z6x0"}},defaultVariants:{},compoundVariants:[]}),re="_41r3q2h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z69c _1yep5z69d _1yep5z69e",oe=a({defaultClassName:"_1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});function A(p,t,a){let{key:s}=p,{selectionManager:i,selectedKey:r}=t,l=!t.isSelectable(s),{itemProps:n}=d({isDisabled:l,key:s,ref:a,selectionManager:i});return {stepProps:{...n,role:"link","aria-current":r===s?"step":void 0,"aria-disabled":l?true:void 0,tabIndex:l?void 0:0}}}function ne({state:p,item:t,size:a,variant:s,index:i,isLast:r,stepLabel:l,completedLabel:n,isDisabled:_}){let z=useRef(null),c=b(),{stepProps:g}=A({key:t.key},p,z),m=_||p.disabledKeys.has(t.key),{hoverProps:h,isHovered:e}=a$8({isDisabled:m}),{focusProps:d,isFocused:y,isFocusVisible:v}=a$9(),k=p.isCompleted(t.key),q=p.selectedKey===t.key,b$1=k?"complete":q?"active":"incomplete",S=t["aria-label"],C=!!S&&!t.description,j=s==="expanded"&&!!t.title&&!C,P=s==="expanded"&&!!t.description,o=t.title||((typeof l=="function"?l({index:i+1}):l)??c.formatMessage(le.step,{index:i+1})),x=n??c.formatMessage(le.completed),M=a==="sm"?CheckmarkIcon:CheckmarkIcon$1;return jsxs("li",{className:a$3("BaselineUI-Stepper-Item",pe({variant:s,isLast:r})),"data-status":b$1,children:[jsxs("a",{...c$1(g,h,d),ref:z,"aria-label":k&&S?[x,S].join(" "):S||void 0,className:a$3("BaselineUI-Stepper-StepLink",ae),"data-status":b$1,"data-hovered":e||void 0,"data-focused":y||void 0,"data-focus-visible":v||void 0,"data-disabled":m||void 0,children:[jsx("span",{className:a$3("BaselineUI-Stepper-Indicator",se({size:a,status:b$1,isDisabled:m,isFocusVisible:v})),"aria-hidden":"true",children:k?jsx(M,{}):jsx("span",{children:i+1})}),k?jsx(b$2,{children:x}):null,j?jsxs("span",{className:a$3("BaselineUI-Stepper-Text",re),children:[jsx("span",{className:a$3("BaselineUI-Stepper-Title",oe({size:a,isDisabled:m})),children:t.title}),P?jsx("span",{className:a$3("BaselineUI-Stepper-Description",te({size:a,isDisabled:m})),children:t.description}):null]}):S?null:jsx(b$2,{children:o})]}),!r&&jsx("span",{className:a$3("BaselineUI-Stepper-Connector",ee({variant:s,status:b$1,isDisabled:m})),"aria-hidden":"true"})]})}var le=c({step:{defaultMessage:"Step {index}",id:"bui.stepper.step"},completed:{defaultMessage:"Completed",id:"bui.stepper.completed"}});var de=fe.forwardRef(function(t,a){let{items:s,variant:i="expanded",size:r="md",selectedStep:l,defaultSelectedStep:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,isDisabled:m,className:h,style:e,"aria-label":d,stepLabel:y,completedLabel:v}=t,k=b(),q=useMemo(()=>new Set(s.filter(o=>o.isDisabled).map(o=>o.key)),[s]),b$1=useMemo(()=>s.map(o=>jsx(a$1,{textValue:o.title??String(o.key),children:o.title??""},o.key)),[s]),S=useMemo(()=>new Map(s.map(o=>[o.key,o])),[s]),C=N({children:b$1,selectedKey:l,defaultSelectedKey:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,disabledKeys:q,isDisabled:m}),j=a$2(a),{listProps:P}=D({children:b$1,"aria-label":d||k.formatMessage(be.label)},C,j);return jsx("ol",{...P,ref:j,className:a$3("BaselineUI-Stepper",ie({variant:i}),h),style:e,"data-variant":i,"data-size":r,children:[...C.collection].map((o,x,M)=>{let E=S.get(o.key);return E?jsx(ne,{state:C,item:E,size:r,variant:i,index:x,isLast:x===M.length-1,stepLabel:y,completedLabel:v,isDisabled:m},o.key):null})})});de.displayName="Stepper";var be=c({label:{defaultMessage:"Progress",id:"bui.stepper.label"}});export{de as a};
@@ -0,0 +1,10 @@
1
+ import e from'react';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var o=e.createContext({});export{o as a};
@@ -0,0 +1,10 @@
1
+ import {a as a$k}from'./chunk-SBR5UAUY.mjs';import {a as a$m}from'./chunk-NLVJYKSA.mjs';import {c as c$2}from'./chunk-54ZKQAA3.mjs';import {c as c$4}from'./chunk-HU75NQMI.mjs';import {I,j,f,e,p,F,A,H,i,B,s,C,G,z,h,g,m,q,D,E,t,l,v,y,u,a as a$n,w,d,c as c$6,x,k,b as b$8,o,n,r}from'./chunk-3TLWTZRL.mjs';import {a as a$7,b as b$7,c as c$5,d as d$1}from'./chunk-FCKJCFMD.mjs';import {a as a$p}from'./chunk-WQBA2P6W.mjs';import {a as a$i}from'./chunk-SOWGXN5P.mjs';import {a as a$c}from'./chunk-Z73YU5ZQ.mjs';import {a as a$d}from'./chunk-RIVN2JT3.mjs';import {b as b$5,e as e$1}from'./chunk-VPVF5N62.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$2,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-2OXYNLVN.mjs';import {a as a$g}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-KX7WG3L4.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$9}from'./chunk-22MA6EYO.mjs';import {a as a$f}from'./chunk-VDUFLHKK.mjs';import {a as a$8}from'./chunk-22VRCVTH.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {b as b$1,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import io,{useCallback,useMemo,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {TextIcon,PlusIcon,MinusIcon}from'@baseline-ui/icons/20';import {sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ var no=io.forwardRef(({color:o,colorLabel:e,colorName:l,isIndeterminate:r,indeterminateIcon:t,noneLabel:s,...a$5},n)=>{let i=io.useRef(null),{hoverProps:c$2,isHovered:m}=a({isDisabled:a$5.isDisabled}),{buttonProps:d,isPressed:g}=a$1(a$5,i),{isFocusVisible:f$1,focusProps:I$1}=a$2(),P=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":f$1,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":g}),B=c(),N=c(),y=!!e||typeof l=="string";return jsxs("button",{...c$1(d,c$2,I$1,P),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:f$1||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(n,i),id:B,"aria-labelledby":[a$5["aria-labelledby"]||B,y&&N].filter(Boolean).join(" "),children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:N,"aria-hidden":"true",children:l}):y&&jsx(b,{id:N,"aria-hidden":"true",children:l})]})});no.displayName="ColorInputButton";var Fo=io.forwardRef(({className:o,style:e$1,icon:l,elementType:r="button",...t},s)=>{let a$6=io.useRef(null),{hoverProps:n,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:m}=a$1({...t,elementType:r},a$6),{isFocusVisible:d,focusProps:g}=a$2(),f=a$3({"data-block-id":t["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":t.isDisabled,"data-hovered":i,"data-pressed":m});return jsxs(r,{...c$1(a$5(r,t.isDisabled),c,n,g,f),ref:b$1(s,a$6),style:e$1,className:a$4(p({isHovered:i||m||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(l,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});Fo.displayName="IconColorInputButton";var Wo=io.forwardRef(({setColor:o,color:e,triggerRef:l,autoFocus:r,presets:t,state:s$1,isIndeterminate:a,colorPresetsLabel:n},i$1)=>{let{formatMessage:c}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let g=[...d][0],f=t.find(I=>I.id===g);a$6(f,"Preset not found"),o(f.id===F?null:a$7(f.id).toFormat(A)),s$1.close();}},[s$1,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:l.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:r,items:t,layout:"grid","aria-label":n??c(ft.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:a?[]:[e?.toString(B)||F],onSelectionChange:m,shouldSelectOnPressUp:true,escapeKeyBehavior:"none"})})});Wo.displayName="ColorPresetList";var ft=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Xe=({value:o,...e})=>{let l=io.useRef(null),r=io.useRef(null),t=io.useRef(null),s=b$7({...e,value:o}),{colorAreaProps:a,xInputProps:n,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:l,inputYRef:r,containerRef:t},s);useEffect(()=>{l.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...a,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...c,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:l,...n,...m}),jsx("input",{ref:r,...i,...m})]})})};var Ye=({color:o$1,setColor:e,allowAlpha:l,...r})=>{let t=d$1({value:o$1,onChange:d=>{e(C(d)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),s=io.useRef(null),{inputProps:a$1}=b$8({...r,"aria-label":"Hex"},t,s),{focusProps:n$1,isFocused:i}=a$2({isTextInput:true}),{hoverProps:c,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"hexa":"hex",children:[jsx("input",{...c$1(a$1,n$1,c),ref:s,className:o({isFocused:i,isHovered:m,allowAlpha:l})}),l?jsx($e,{color:o$1,setColor:e}):null]})},qe=({color:o,setColor:e,allowAlpha:l})=>{let r$1=o.toFormat("rgba"),{locale:t}=b$3();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"rgba":"rgb",children:[jsx(a$p,{"aria-label":o.getChannelName("red",t),value:r$1.getChannelValue("red"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("red",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("green",t),value:r$1.getChannelValue("green"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("green",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("blue",t),value:r$1.getChannelValue("blue"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("blue",s).toFormat(A));},step:1,minValue:0,maxValue:255}),l?jsx($e,{color:o,setColor:e}):null]})},yt={style:"percent",maximumFractionDigits:0},$e=({color:o,setColor:e})=>{let{locale:l}=b$3(),r$1=useCallback(t=>{e(o.withChannelValue("alpha",t));},[o,e]);return jsx(a$p,{"aria-label":o.getChannelName("alpha",l),value:o.getChannelValue("alpha"),formatOptions:yt,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var qo=({channel:o,...e})=>{let{locale:l}=b$3(),r=c$5({...e,channel:o,locale:l}),t=io.useRef(null),s=io.useRef(null),{trackProps:a,thumbProps:n,inputProps:i}=c$6({...e,channel:o,trackRef:t,inputRef:s,"aria-label":r.value.getChannelName(o,l)},r),{focusProps:c,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...a,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:a.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"BaselineUI-ColorInput-ColorSliderThumb"),...n,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:s,...i,...c})})]})]})};var xo=({color:o,setColor:e,allowAlpha:l,colorFormatLabel:r,onChangeEnd:t})=>{let[s,a]=io.useState("hex"),{formatMessage:n}=b$2();return jsxs(Fragment,{children:[jsx(Xe,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:t}),jsxs("div",{className:v,children:[jsx(qo,{channel:"hue",value:o,onChange:e,onChangeEnd:t}),l?jsx(qo,{channel:"alpha",value:o,onChange:e,onChangeEnd:t}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$4,{label:r??n(Pt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:s,onSelectionChange:i=>{a(i);}}),s==="hex"&&jsx(Ye,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l}),s==="rgb"&&jsx(qe,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l})]})]})},Pt=c$3({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var Ze=({color:o,setColor:e,storePickedColorKey:l$1,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:s$1,addLabel:a,cancelLabel:n,newColorLabel:i$1,colorFormatLabel:c$1,pickerMode:m$1,allowAlpha:d,isIndeterminate:g,state:f})=>{let{locale:I}=b$3(),{formatMessage:P}=b$2(),B$1=io.useRef(null),N=a$j(B$1.current),[y,M]=a$k(l$1,[]),h=io.useMemo(()=>Array.isArray(y)?y.filter(p=>Ft(p)):[],[y]),O=io.useRef(null),[K,Mo]=io.useState(o),uo=io.useMemo(()=>h.map(p=>({id:p,label:a$7(p).getColorName(I),description:p})),[h,I]),W=useCallback(()=>{let p=m$1==="active"?o:K;if(h.includes(p.toString(B))){O.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}M([...h,p.toString(B)]);},[h,o,M,K,m$1]);useEffect(()=>{let p=O.current;function b(Q){Q.animationName===u&&j$2(Q)?.classList.remove(t);}return p?.addEventListener("animationend",b),()=>{p?.removeEventListener("animationend",b);}},[]);let w=c(),J=jsx(a$l,{ref:B$1,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:m$1==="active"?W:void 0}),co=useCallback(p=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??P(Jo.newColor),children:[jsx(xo,{color:K,setColor:Mo,allowAlpha:d,colorFormatLabel:c$1}),jsx(a$e,{}),jsx(a$h,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(a$h,{display:"inline-flex",gap:"lg",children:[jsx(b$4,{label:n??P(Jo.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??P(Jo.add),variant:"primary",onPress:()=>{W(),p();},size:"sm"})]})})]}),[K,W,P,d,i$1,c$1,n,a]),Oo=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let b=[...p][0];b&&(e(a$7(b).toFormat(A)),m$1==="lazy"&&f.close());},[e,m$1,f]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:w,children:s$1}),jsxs(a$h,{display:"flex",children:[!!h.length&&h.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{M(h.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&J,m$1==="lazy"&&(N==="mobile"?jsxs(b$5,{children:[jsx(a$m,{children:J}),jsx(e$1,{style:{zIndex:1e5},children:({close:p})=>co(p)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:J}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:p})=>co(p)})]}))]})]}),!!h.length&&jsx(c$2,{items:uo,layout:"grid","aria-labelledby":w,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:O,autoFocus:false,selectionMode:"single",selectedKeys:g?[]:[o.toString(B)],onSelectionChange:Oo,shouldSelectOnPressUp:true})]})},Jo=c$3({newColor:{defaultMessage:"New Custom Color",id:"bui.colorInput.newColor"},cancel:{defaultMessage:"Cancel",id:"bui.colorInput.cancel"},add:{defaultMessage:"Add",id:"bui.colorInput.add"}});function Ft(o){if(typeof o!="string")return false;try{return a$7(o),!0}catch{return false}}function ot({colorLabel:o,color:e,presets:l,isIndeterminate:r,indeterminateLabel:t,transparentLabel:s}){let{formatMessage:a}=b$2(),{locale:n}=b$3(),i=useMemo(()=>r?{id:"indeterminate",label:t??a(je.indeterminate)}:l.find(d=>d.id===F?!e:e?D(e,a$7(d.id)):false),[l,e,r,a,t]),c=useMemo(()=>{if(typeof o=="function")return o?.(e,{isIndeterminate:!!r});if(typeof o=="boolean")return E(e,i,s??a(je.transparent));throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,a,i,r,s]),m=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(n);},[e,n,i?.label]);return {colorName:c,humanReadableName:m}}var je=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var Ao=io.forwardRef(({className:o,style:e,allowRemoval:l,allowAlpha:r=true,presets:t,labelPosition:s="top",colorLabel:a=true,includePicker:n=true,onChange:i,onChangeEnd:c$2,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:g$1,addColorButtonLabel:f,removeColorButtonLabel:I,customColorsLabel:P,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,colorPresetsLabel:h$1,noColorLabel:O,indeterminateLabel:K,transparentLabel:Mo,onTriggerPress:uo,renderTriggerButton:W,pickerMode:w="active",offset:J=2,placement:co=s==="start"?"bottom end":"bottom start","data-block-id":Oo,"data-block-class":p,isIndeterminate:b,indeterminateIcon:Q,...L},lt)=>{let Z=io.useRef(null),at=io.useRef(null),X=a$8(L),{triggerProps:oe,overlayProps:st}=a$9({type:"listbox"},X,Z),nt=a$a(L.portalContainer),[Y,wo]=a$b(g$1===void 0?void 0:C(g$1),C(m$1),v=>i?.(v?.toFormat("rgba")||null)),{formatMessage:j}=b$2(),Do=useMemo(()=>G(O??j(To.noColor),t),[t,j,O]),fo=c(),{colorName:ee}=ot({colorLabel:a||true,color:Y,presets:Do,isIndeterminate:b,indeterminateLabel:K,transparentLabel:Mo}),it=a?ee:false,te=useMemo(()=>Do.filter(v=>l||v.id!==F),[Do,l]),mt=f||j(To.addColor),pt=I||j(To.removeColor),ut=P||j(To.customColors),re=jsx(Ze,{color:Y||z,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:mt,removeColorButtonLabel:pt,customColorsLabel:ut,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,pickerMode:w,allowAlpha:r,isIndeterminate:!!b,state:X});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:s==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":Oo,"data-block-class":p,style:e,ref:lt,children:[L.label?jsx("label",{id:fo,className:h({labelPosition:s}),children:L.label}):null,W?W({isOpen:X.isOpen,color:Y,ref:Z,colorName:it,triggerProps:c$1(oe,{onPress:uo}),labelId:fo,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O}):jsx(no,{...c$1(oe,{onPress:uo,...L.label?{"aria-labelledby":fo}:{"aria-label":L["aria-label"]}}),ref:Z,isOpen:X.isOpen,isDisabled:L.isDisabled,labelPosition:s,color:Y,colorLabel:a,colorName:ee,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O})]}),jsx(a$c,{...L,portalContainer:nt,placement:co,state:X,offset:J,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:Z,overlayProps:st,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:n}),ref:at,"aria-labelledby":L.label?fo:void 0,"aria-label":L["aria-label"],children:[n&&w==="active"?jsxs(Fragment,{children:[jsx(xo,{color:Y||z,setColor:wo,allowAlpha:r,colorFormatLabel:M,onChangeEnd:v=>{c$2?.(v?.toFormat("rgba")||null);}}),re]}):null,!!te.length&&jsxs(Fragment,{children:[n&&w==="active"?jsx(a$e,{}):null,jsx(Wo,{autoFocus:n&&w==="active"?false:"first",state:X,triggerRef:Z,presets:te,colorPresetsLabel:h$1,color:Y,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},isIndeterminate:!!b})]}),n&&w==="lazy"?re:null]})})]})});Ao.displayName="ColorInput";var To=c$3({addColor:{defaultMessage:"Add Color",id:"bui.colorInput.addColor"},removeColor:{defaultMessage:"Remove Color",id:"bui.colorInput.removeColor"},customColors:{defaultMessage:"Custom Colors",id:"bui.colorInput.customColors"},noColor:{defaultMessage:"None",id:"bui.colorInput.noColor"}});var rt=io.forwardRef(({className:o,style:e,icon:l,variant:r="standard","data-block-id":t,tooltip:s=true,iconTooltip:a=true,...n},i)=>{let c=io.useRef(null),{tooltipProps:m}=a$f({label:n["aria-label"],tooltip:s}),d=useCallback(({isOpen:g,color:f,ref:I,colorName:P,triggerProps:B,isIndeterminate:N,indeterminateIcon:y,noneLabel:M})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...B,"aria-label":n["aria-label"],ref:I,isOpen:g,isDisabled:n.isDisabled,color:f,colorLabel:false,colorName:P,isIndeterminate:N,indeterminateIcon:y,noneLabel:M}):jsx(Fo,{...B,isOpen:g,icon:TextIcon,color:f?.toString("hexa"),ref:I,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:N,indeterminateIcon:y})}),[n,m,r]);return jsxs(a$h,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":t,style:e,ref:b$1(i,c),children:[r==="standard"&&l?jsx(a$i,{icon:l,label:n["aria-label"],tooltip:a,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...n,renderTriggerButton:d})]})});rt.displayName="IconColorInput";export{Fo as a,Ao as b,rt as c};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-7SKQUEHP.mjs';import {a as a$2}from'./chunk-5W6G3ZUT.mjs';import {c,e}from'./chunk-IROFSPEN.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import h,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
1
+ import {a as a$3}from'./chunk-7SKQUEHP.mjs';import {a as a$2}from'./chunk-2BG2JLFC.mjs';import {c,e}from'./chunk-IROFSPEN.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import h,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {c}from'./chunk-3IPRT57V.mjs';import {a,d,b as b$3}from'./chunk-JHA7DIPG.
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var ze={"ar-AE":{buttonLabel:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0627\u062A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})} \u0645\u062A\u0627\u062D\u0629.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u062F\u062E\u0644\u0629 ${e.groupTitle}, \u0645\u0639 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0645\u062D\u062F\u062F",other:""},e.isSelected)}`,listboxLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A",selectedAnnouncement:e=>`${e.optionText}\u060C \u0645\u062D\u062F\u062F`},"bg-BG":{buttonLabel:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u0438`})} \u043D\u0430 \u0440\u0430\u0437\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u044A\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0438\u0437\u0431\u0440\u0430\u043D\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0438\u0437\u0431\u0440\u0430\u043D\u0438`},"cs-CZ":{buttonLabel:"Zobrazit doporu\u010Den\xED",countAnnouncement:(e,n)=>`K dispozici ${n.plural(e.optionCount,{one:()=>`je ${n.number(e.optionCount)} mo\u017Enost`,other:()=>`jsou/je ${n.number(e.optionCount)} mo\u017Enosti/-\xED`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina \u201E${e.groupTitle}\u201C ${n.plural(e.groupCount,{one:()=>`s ${n.number(e.groupCount)} mo\u017Enost\xED`,other:()=>`se ${n.number(e.groupCount)} mo\u017Enostmi`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:" (vybr\xE1no)",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybr\xE1no`},"da-DK":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mulighed tilg\xE6ngelig`,other:()=>`${n.number(e.optionCount)} muligheder tilg\xE6ngelige`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angivet gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mulighed`,other:()=>`${n.number(e.groupCount)} muligheder`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"de-DE":{buttonLabel:"Empfehlungen anzeigen",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} Option`,other:()=>`${n.number(e.optionCount)} Optionen`})} verf\xFCgbar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Eingetretene Gruppe ${e.groupTitle}, mit ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} Option`,other:()=>`${n.number(e.groupCount)} Optionen`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", ausgew\xE4hlt",other:""},e.isSelected)}`,listboxLabel:"Empfehlungen",selectedAnnouncement:e=>`${e.optionText}, ausgew\xE4hlt`},"el-GR":{buttonLabel:"\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03C0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03C9\u03BD",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 `})} \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0395\u03B9\u03C3\u03B1\u03B3\u03BC\u03AD\u03BD\u03B7 \u03BF\u03BC\u03AC\u03B4\u03B1 ${e.groupTitle}, \u03BC\u03B5 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03BF",other:""},e.isSelected)}`,listboxLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2",selectedAnnouncement:e=>`${e.optionText}, \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B5`},"en-US":{focusAnnouncement:(e,n)=>`${n.select({true:()=>`Entered group ${e.groupTitle}, with ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selected",other:""},e.isSelected)}`,countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} available.`,selectedAnnouncement:e=>`${e.optionText}, selected`,buttonLabel:"Show suggestions",listboxLabel:"Suggestions"},"es-ES":{buttonLabel:"Mostrar sugerencias",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opci\xF3n`,other:()=>`${n.number(e.optionCount)} opciones`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Se ha unido al grupo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opci\xF3n`,other:()=>`${n.number(e.groupCount)} opciones`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", seleccionado",other:""},e.isSelected)}`,listboxLabel:"Sugerencias",selectedAnnouncement:e=>`${e.optionText}, seleccionado`},"et-EE":{buttonLabel:"Kuva soovitused",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} valik`,other:()=>`${n.number(e.optionCount)} valikud`})} saadaval.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Sisestatud r\xFChm ${e.groupTitle}, valikuga ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} valik`,other:()=>`${n.number(e.groupCount)} valikud`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valitud",other:""},e.isSelected)}`,listboxLabel:"Soovitused",selectedAnnouncement:e=>`${e.optionText}, valitud`},"fi-FI":{buttonLabel:"N\xE4yt\xE4 ehdotukset",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} vaihtoehto`,other:()=>`${n.number(e.optionCount)} vaihtoehtoa`})} saatavilla.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Siirtyi ryhm\xE4\xE4n ${e.groupTitle}, jossa ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} vaihtoehto`,other:()=>`${n.number(e.groupCount)} vaihtoehtoa`})}.`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valittu",other:""},e.isSelected)}`,listboxLabel:"Ehdotukset",selectedAnnouncement:e=>`${e.optionText}, valittu`},"fr-FR":{buttonLabel:"Afficher les suggestions",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groupe ${e.groupTitle} rejoint, avec ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", s\xE9lectionn\xE9(s)",other:""},e.isSelected)}`,listboxLabel:"Suggestions",selectedAnnouncement:e=>`${e.optionText}, s\xE9lectionn\xE9`},"he-IL":{buttonLabel:"\u05D4\u05E6\u05D2 \u05D4\u05E6\u05E2\u05D5\u05EA",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.optionCount)}`,other:()=>`${n.number(e.optionCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})} \u05D1\u05DE\u05E6\u05D1 \u05D6\u05DE\u05D9\u05DF.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u05E0\u05DB\u05E0\u05E1 \u05DC\u05E7\u05D1\u05D5\u05E6\u05D4 ${e.groupTitle}, \u05E2\u05DD ${n.plural(e.groupCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.groupCount)}`,other:()=>`${n.number(e.groupCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u05E0\u05D1\u05D7\u05E8",other:""},e.isSelected)}`,listboxLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA",selectedAnnouncement:e=>`${e.optionText}, \u05E0\u05D1\u05D7\u05E8`},"hr-HR":{buttonLabel:"Prika\u017Ei prijedloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} opcije/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", odabranih",other:""},e.isSelected)}`,listboxLabel:"Prijedlozi",selectedAnnouncement:e=>`${e.optionText}, odabrano`},"hu-HU":{buttonLabel:"Javaslatok megjelen\xEDt\xE9se",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`,other:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`})} \xE1ll rendelkez\xE9sre.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Bel\xE9pett a(z) ${e.groupTitle} csoportba, amely ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`,other:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`})} tartalmaz. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", kijel\xF6lve",other:""},e.isSelected)}`,listboxLabel:"Javaslatok",selectedAnnouncement:e=>`${e.optionText}, kijel\xF6lve`},"it-IT":{buttonLabel:"Mostra suggerimenti",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opzione disponibile`,other:()=>`${n.number(e.optionCount)} opzioni disponibili`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingresso nel gruppo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opzione`,other:()=>`${n.number(e.groupCount)} opzioni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selezionato",other:""},e.isSelected)}`,listboxLabel:"Suggerimenti",selectedAnnouncement:e=>`${e.optionText}, selezionato`},"ja-JP":{buttonLabel:"\u5019\u88DC\u3092\u8868\u793A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u5229\u7528\u3067\u304D\u307E\u3059\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u5165\u529B\u3055\u308C\u305F\u30B0\u30EB\u30FC\u30D7 ${e.groupTitle}\u3001${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u542B\u3080\u3002`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:"\u3001\u9078\u629E\u6E08\u307F",other:""},e.isSelected)}`,listboxLabel:"\u5019\u88DC",selectedAnnouncement:e=>`${e.optionText}\u3001\u9078\u629E\u6E08\u307F`},"ko-KR":{buttonLabel:"\uC81C\uC548 \uC0AC\uD56D \uD45C\uC2DC",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`})}\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\uC785\uB825\uD55C \uADF8\uB8F9 ${e.groupTitle}, ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \uC120\uD0DD\uB428",other:""},e.isSelected)}`,listboxLabel:"\uC81C\uC548",selectedAnnouncement:e=>`${e.optionText}, \uC120\uD0DD\uB428`},"lt-LT":{buttonLabel:"Rodyti pasi\u016Blymus",countAnnouncement:(e,n)=>`Yra ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} parinktis`,other:()=>`${n.number(e.optionCount)} parinktys (-i\u0173)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u012Evesta grup\u0117 ${e.groupTitle}, su ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} parinktimi`,other:()=>`${n.number(e.groupCount)} parinktimis (-i\u0173)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", pasirinkta",other:""},e.isSelected)}`,listboxLabel:"Pasi\u016Blymai",selectedAnnouncement:e=>`${e.optionText}, pasirinkta`},"lv-LV":{buttonLabel:"R\u0101d\u012Bt ieteikumus",countAnnouncement:(e,n)=>`Pieejamo opciju skaits: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcijas`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ievad\u012Bta grupa ${e.groupTitle}, ar ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opciju`,other:()=>`${n.number(e.groupCount)} opcij\u0101m`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", atlas\u012Bta",other:""},e.isSelected)}`,listboxLabel:"Ieteikumi",selectedAnnouncement:e=>`${e.optionText}, atlas\u012Bta`},"nb-NO":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativer`})} finnes.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angitt gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativer`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"nl-NL":{buttonLabel:"Suggesties weergeven",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} optie`,other:()=>`${n.number(e.optionCount)} opties`})} beschikbaar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groep ${e.groupTitle} ingevoerd met ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} optie`,other:()=>`${n.number(e.groupCount)} opties`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", geselecteerd",other:""},e.isSelected)}`,listboxLabel:"Suggesties",selectedAnnouncement:e=>`${e.optionText}, geselecteerd`},"pl-PL":{buttonLabel:"Wy\u015Bwietlaj sugestie",countAnnouncement:(e,n)=>`dost\u0119pna/dost\u0119pne(-nych) ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcja`,other:()=>`${n.number(e.optionCount)} opcje(-i)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Do\u0142\u0105czono do grupy ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcj\u0105`,other:()=>`${n.number(e.groupCount)} opcjami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", wybrano",other:""},e.isSelected)}`,listboxLabel:"Sugestie",selectedAnnouncement:e=>`${e.optionText}, wybrano`},"pt-BR":{buttonLabel:"Mostrar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo inserido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"pt-PT":{buttonLabel:"Apresentar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo introduzido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"ro-RO":{buttonLabel:"Afi\u0219are sugestii",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\u021Biune`,other:()=>`${n.number(e.optionCount)} op\u021Biuni`})} disponibile.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grup ${e.groupTitle} introdus, cu ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\u021Biune`,other:()=>`${n.number(e.groupCount)} op\u021Biuni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selectat",other:""},e.isSelected)}`,listboxLabel:"Sugestii",selectedAnnouncement:e=>`${e.optionText}, selectat`},"ru-RU":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u0430\u044F \u0433\u0440\u0443\u043F\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0432\u044B\u0431\u0440\u0430\u043D\u043E`},"sk-SK":{buttonLabel:"Zobrazi\u0165 n\xE1vrhy",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mo\u017Enos\u0165`,other:()=>`${n.number(e.optionCount)} mo\u017Enosti/-\xED`})} k dispoz\xEDcii.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ou`,other:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", vybrat\xE9",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybrat\xE9`},"sl-SI":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Na voljo je ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Vnesena skupina ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcija`,other:()=>`${n.number(e.groupCount)} opcije`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izbrano",other:""},e.isSelected)}`,listboxLabel:"Predlogi",selectedAnnouncement:e=>`${e.optionText}, izbrano`},"sr-SP":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena grupa ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} optione/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izabranih",other:""},e.isSelected)}`,listboxLabel:"Predlozi",selectedAnnouncement:e=>`${e.optionText}, izabrano`},"sv-SE":{buttonLabel:"Visa f\xF6rslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativ`})} tillg\xE4ngliga.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingick i gruppen ${e.groupTitle} med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativ`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valda",other:""},e.isSelected)}`,listboxLabel:"F\xF6rslag",selectedAnnouncement:e=>`${e.optionText}, valda`},"tr-TR":{buttonLabel:"\xD6nerileri g\xF6ster",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} se\xE7enek`,other:()=>`${n.number(e.optionCount)} se\xE7enekler`})} kullan\u0131labilir.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Girilen grup ${e.groupTitle}, ile ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} se\xE7enek`,other:()=>`${n.number(e.groupCount)} se\xE7enekler`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", se\xE7ildi",other:""},e.isSelected)}`,listboxLabel:"\xD6neriler",selectedAnnouncement:e=>`${e.optionText}, se\xE7ildi`},"uk-UA":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0437 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u0438\u0431\u0440\u0430\u043D\u043E",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",selectedAnnouncement:e=>`${e.optionText}, \u0432\u0438\u0431\u0440\u0430\u043D\u043E`},"zh-CN":{buttonLabel:"\u663E\u793A\u5EFA\u8BAE",countAnnouncement:(e,n)=>`\u6709 ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`})}\u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8FDB\u5165\u4E86 ${e.groupTitle} \u7EC4\uFF0C\u5176\u4E2D\u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9009\u62E9",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8BAE",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9009\u62E9`},"zh-TW":{buttonLabel:"\u986F\u793A\u5EFA\u8B70",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u9078\u9805`,other:()=>`${n.number(e.optionCount)} \u9078\u9805`})} \u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8F38\u5165\u7684\u7FA4\u7D44 ${e.groupTitle}, \u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u9078\u9805`,other:()=>`${n.number(e.groupCount)} \u9078\u9805`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9078\u53D6",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8B70",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9078\u53D6`}};function Ye(e,n){let{buttonRef:p,popoverRef:C,inputRef:u,listBoxRef:s,keyboardDelegate:l,layoutDelegate:x,shouldFocusWrap:N,isReadOnly:S,isDisabled:H}=e,ue=useRef(null);p=p??ue;let M=b(ze,"@react-aria/combobox"),{menuTriggerProps:f,menuProps:I}=c({type:"listbox",isDisabled:H||S},n,p);a.set(n,{id:I.id});let{collection:P}=n,{disabledKeys:G}=n.selectionManager,_=useMemo(()=>l||new b$1({collection:P,disabledKeys:G,ref:s,layoutDelegate:x}),[l,x,P,G,s]),{collectionProps:r}=c$1({selectionManager:n.selectionManager,keyboardDelegate:_,disallowTypeAhead:true,disallowEmptySelection:true,shouldFocusWrap:N,ref:u,isVirtualized:true}),L=o(),{keyboardProps:$}=j({shortcuts:{Enter:t=>{let i=n.isOpen;if(n.isOpen&&s.current&&n.selectionManager.focusedKey!=null){let m=n.collection.getItem(n.selectionManager.focusedKey);if(m?.props.href){let A=s.current.querySelector(`[data-key="${CSS.escape(n.selectionManager.focusedKey.toString())}"]`);return A instanceof HTMLAnchorElement&&L.open(A,t,m.props.href,m.props.routerOptions),n.close(),{shouldPreventDefault:i}}else if(m?.props.onAction)return m.props.onAction(),n.close(),{shouldPreventDefault:i}}return n.commit(),{shouldPreventDefault:i}},Tab:()=>{if(n.isOpen&&s.current&&n.selectionManager.focusedKey!=null){let t=n.collection.getItem(n.selectionManager.focusedKey);if(t?.props.href)return n.close(),{shouldPreventDefault:false};if(t?.props.onAction)return t.props.onAction(),n.close(),{shouldPreventDefault:false,shouldContinuePropagation:true}}return n.isOpen&&n.commit(),{shouldPreventDefault:false,shouldContinuePropagation:true}},Escape:()=>{let t=false;return (!n.selectionManager.isEmpty||n.inputValue===""||e.allowsCustomValue)&&(t=true),n.revert(),{shouldContinuePropagation:t}}}}),{keyboardProps:h$1}=j({shortcuts:{ArrowDown:()=>(n.open("first","manual"),{shouldPreventDefault:false}),ArrowUp:()=>(n.open("last","manual"),{shouldPreventDefault:false}),ArrowLeft:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false}),ArrowRight:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false})},allowRepeats:true}),le=t=>{let i=h(p.current,t.relatedTarget),m=h(C.current,t.relatedTarget);i||m||(e.onBlur&&e.onBlur(t),n.setFocused(false));},d$2=t=>{n.isFocused||(e.onFocus&&e.onFocus(t),n.setFocused(true));},U=Xe([n.selectionManager.selectedKeys,n.selectionManager.selectionMode]),{isInvalid:b$4,validationErrors:W,validationDetails:Q}=n.displayValidation,{labelProps:B,inputProps:V,descriptionProps:g,errorMessageProps:ee}=a$1({...e,isRequired:e.selectionMode==="multiple"?e.isRequired&&n.selectionManager.isEmpty:e.isRequired,onChange:n.setInputValue,onKeyDown:S?e.onKeyDown:a$2(n.isOpen&&r.onKeyDown,$.onKeyDown,h$1.onKeyDown,e.onKeyDown),onBlur:le,value:n.inputValue,defaultValue:n.defaultInputValue,onFocus:d$2,autoComplete:"off",validate:void 0,[c$2]:n,"aria-describedby":[U,e["aria-describedby"]].filter(Boolean).join(" ")||void 0},u);a$3(u,n.defaultValue,n.setValue);let ie=t=>{t.pointerType==="touch"&&(u.current?.focus(),n.toggle(null,"manual"));},Z=t=>{t.pointerType!=="touch"&&(u.current?.focus(),n.toggle(t.pointerType==="keyboard"||t.pointerType==="virtual"?"first":null,"manual"));},me=a$4({id:f.id,"aria-label":M.format("buttonLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),a$9=a$4({id:I.id,"aria-label":M.format("listboxLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),F=useRef(0),ce=t=>{if(H||S)return;if(t.timeStamp-F.current<500){t.preventDefault(),u.current?.focus();return}let i=j$1(t).getBoundingClientRect(),m=t.changedTouches[0],A=Math.ceil(i.left+.5*i.width),J=Math.ceil(i.top+.5*i.height);m.clientX===A&&m.clientY===J&&(t.preventDefault(),u.current?.focus(),n.toggle(null,"manual"),F.current=t.timeStamp);},y=n.selectionManager.focusedKey!=null&&n.isOpen?n.collection.getItem(n.selectionManager.focusedKey):void 0,k=y?.parentKey??null,T=n.selectionManager.focusedKey??null,R=useRef(k),K=useRef(T);useEffect(()=>{if(i()&&y!=null&&T!=null&&T!==K.current){let t=n.selectionManager.isSelected(T),i=k!=null?n.collection.getItem(k):null,m=i?.["aria-label"]||(typeof i?.rendered=="string"?i.rendered:"")||"",A=M.format("focusAnnouncement",{isGroupChange:(i&&k!==R.current)??false,groupTitle:m,groupCount:i?[...b$2(i,n.collection)].length:0,optionText:y["aria-label"]||y.textValue||"",isSelected:t});a$5(A);}R.current=k,K.current=T;});let v=d(n.collection),w=useRef(v),O=useRef(n.isOpen);useEffect(()=>{let t=n.isOpen!==O.current&&(n.selectionManager.focusedKey==null||i());if(n.isOpen&&(t||v!==w.current)){let i=M.format("countAnnouncement",{optionCount:v});a$5(i);}w.current=v,O.current=n.isOpen;});let q=useRef(n.selectedKey);return useEffect(()=>{if(i()&&n.isFocused&&n.selectedItem&&n.selectedKey!==q.current){let t=n.selectedItem["aria-label"]||n.selectedItem.textValue||"",i=M.format("selectedAnnouncement",{optionText:t});a$5(i);}q.current=n.selectedKey;}),useEffect(()=>{if(n.isOpen)return a$6([u.current,C.current].filter(t=>t!=null))},[n.isOpen,u,C]),c$3(()=>{!y&&u.current&&i$1(a$7(u.current))===u.current&&c$4(u.current,null);},[y]),a$8(s,"react-aria-item-action",n.isOpen?()=>{n.close();}:void 0),{labelProps:{...B,onClick:"htmlFor"in B&&B.htmlFor||e.isDisabled?void 0:()=>{u.current?.focus(),d$1("keyboard");}},buttonProps:{...f,...me,excludeFromTabOrder:true,preventFocusOnPress:true,onPress:ie,onPressStart:Z,isDisabled:H||S},inputProps:c$5(V,{role:"combobox","aria-expanded":f["aria-expanded"],"aria-controls":n.isOpen?I.id:void 0,"aria-autocomplete":"list","aria-activedescendant":y?b$3(n,y.key):void 0,onTouchEnd:ce,autoCorrect:"off",spellCheck:"false"}),listBoxProps:c$5(I,a$9,{onAction:void 0,autoFocus:n.focusStrategy||true,shouldUseVirtualFocus:true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,linkBehavior:"selection",UNSTABLE_itemBehavior:"action"}),valueProps:{id:U},descriptionProps:g,errorMessageProps:ee,isInvalid:b$4,validationErrors:W,validationDetails:Q}}function Xe(e=[]){let n=c$6(),[p,C]=useState(true),[u,s]=useState(e);return u.some((l,x)=>!Object.is(l,e[x]))&&(C(true),s(e)),useEffect(()=>{p&&!document.getElementById(n)&&C(false);},[n,p,u]),p?n:void 0}function Qe(e){let{defaultFilter:n,menuTrigger:p="input",allowsEmptyCollection:C=false,allowsCustomValue:u,shouldCloseOnBlur:s=true,selectionMode:l="single"}=e,[x,N]=useState(false),[S,H]=useState(false),[ue,M]=useState(null),f=useRef(false),I=useMemo(()=>e.defaultValue!==void 0?e.defaultValue:l==="single"?e.defaultSelectedKey??null:[],[e.defaultValue,e.defaultSelectedKey,l]),P=useMemo(()=>e.value!==void 0?e.value:l==="single"?e.selectedKey:void 0,[e.value,e.selectedKey,l]),[G,_]=a$9(P,I,e.onChange),r=l==="single"&&Array.isArray(G)?G[0]:G,L=o=>{if(l==="single"){let c=Array.isArray(o)?o[0]??null:o;_(c),c!==r&&e.onSelectionChange?.(c);}else {let c=[];Array.isArray(o)?c=o:o!=null&&(c=[o]),_(c);}},{collection:$,selectionManager:h,disabledKeys:le}=b$4({...e,items:e.items??e.defaultItems,selectionMode:l,disallowEmptySelection:l==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>nn(r),[r]),onSelectionChange:o=>{if(o!=="all")if(l==="single"){let c=o.values().next().value??null;c===r?(e.onSelectionChange?.(c),w(),T()):L(c);}else L([...o]);}}),d=l==="single"?h.firstSelectedKey:null,U=useMemo(()=>[...h.selectedKeys].map(o=>$.getItem(o)).filter(o=>o!=null),[h.selectedKeys,$]),[b,W]=a$9(e.inputValue,He(e.defaultInputValue,d,$)||"",e.onInputChange),[Q]=useState(r),[B]=useState(b),V=$,g=useMemo(()=>e.items!=null||!n?$:en($,b,n),[$,b,n,e.items]),[ee,ie]=useState(g),Z=useRef("focus"),a=a$a({...e,onOpenChange:o=>{e.onOpenChange&&e.onOpenChange(o,o?Z.current:void 0),h.setFocused(o),o||h.setFocusedKey(null);},isOpen:void 0,defaultOpen:void 0}),F=(o=null,c)=>{let Y=c==="manual"||c==="focus"&&p==="focus";(C||g.size>0||Y&&V.size>0||e.items)&&(Y&&!a.isOpen&&e.items===void 0&&N(true),Z.current=c,M(o),a.open());},ce=(o=null,c)=>{let Y=c==="manual"||c==="focus"&&p==="focus";!(C||g.size>0||Y&&V.size>0||e.items)&&!a.isOpen||(Y&&!a.isOpen&&e.items===void 0&&N(true),a.isOpen||(Z.current=c),k(o));},y=useCallback(()=>{ie(x?V:g);},[x,V,g]),k=useCallback((o=null)=>{a.isOpen&&y(),M(o),a.toggle();},[a,y]),T=useCallback(()=>{a.isOpen&&(y(),a.close());},[a,y]),[R,K]=useState(b),v=useRef(false),w=()=>{let o=d!=null?$.getItem(d)?.textValue??"":"";v.current=false,K(o),W(o);},O=useRef(r),q=useRef(d!=null?$.getItem(d)?.textValue??"":"");useEffect(()=>{S&&(g.size>0||C)&&!a.isOpen&&b!==R&&p!=="manual"&&F(null,"input"),!x&&!C&&a.isOpen&&g.size===0&&(f.current=true,T()),S&&f.current&&g.size>0&&!a.isOpen&&p!=="manual"&&(f.current=false,F(null,"input")),r!=null&&r!==O.current&&l==="single"&&T(),b!==R&&(v.current=true,h.setFocusedKey(null),N(false),l==="single"&&b===""&&(e.inputValue===void 0||P===void 0)&&L(null)),r!==O.current&&(e.inputValue===void 0||P===void 0)?w():R!==b&&K(b);let o=d!=null?$.getItem(d)?.textValue??"":"";(!S||!v.current)&&d!=null&&e.inputValue===void 0&&d===O.current&&q.current!==o&&(v.current=false,K(o),W(o)),O.current=r,q.current=o;});let t=d$2({...e,value:useMemo(()=>Array.isArray(r)&&r.length===0?null:{inputValue:b,value:r,selectedKey:d},[b,d,r])}),i=()=>{f.current=false,u&&d==null?m():A();},m=()=>{if(l==="multiple"){K(b),T();return}let o=null;O.current=o,L(o),T();},A=(o=false)=>{if(P!==void 0&&e.inputValue!==void 0){let c=d!=null?$.getItem(d)?.textValue??"":"";(o||l==="multiple"||b!==c)&&(e.onSelectionChange?.(d),e.onChange?.(r)),K(c),T();}else w(),T();},J=()=>{if(f.current=false,u){let o=d!=null?$.getItem(d)?.textValue??"":"";b===o?A():m();}else A();},We=()=>{a.isOpen&&h.focusedKey!=null?h.isSelected(h.focusedKey)&&l==="single"?A(true):h.select(h.focusedKey):J();},pe=useRef([b,r]),Ze=o=>{o?(pe.current=[b,r],p==="focus"&&!e.isReadOnly&&F(null,"focus")):(s&&J(),(b!==pe.current[0]||r!==pe.current[1])&&t.commitValidation()),H(o);},qe=useMemo(()=>a.isOpen?x?V:g:ee,[a.isOpen,V,g,x,ee]),Ce=e.defaultSelectedKey??(l==="single"?Q:null);return {...t,...a,focusStrategy:ue,toggle:ce,open:F,close:J,selectionManager:h,value:r,defaultValue:I??Q,setValue:L,selectedKey:d,selectedItems:U,defaultSelectedKey:Ce,setSelectedKey:L,disabledKeys:le,isFocused:S,setFocused:Ze,selectedItem:U[0]??null,collection:qe,inputValue:b,defaultInputValue:He(e.defaultInputValue,Ce,$)??B,setInputValue:W,commit:We,revert:i}}function en(e,n,p){return new a$b(Ue(e,e,n,p))}function Ue(e,n,p,C){let u=[];for(let s of n)if(s.type==="section"&&s.hasChildNodes){let l=Ue(e,b$2(s,e),p,C);[...l].some(x=>x.type==="item")&&u.push({...s,childNodes:l});}else s.type==="item"&&C(s.textValue,p)?u.push({...s}):s.type!=="item"&&u.push({...s});return u}function He(e,n,p){return e==null&&n!=null?p.getItem(n)?.textValue??"":e}function nn(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}export{Ye as a,Qe as b};
10
+ var Ne={"ar-AE":{buttonLabel:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0627\u062A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.optionCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})} \u0645\u062A\u0627\u062D\u0629.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0645\u062F\u062E\u0644\u0629 ${e.groupTitle}, \u0645\u0639 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631`,other:()=>`${n.number(e.groupCount)} \u062E\u064A\u0627\u0631\u0627\u062A`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0645\u062D\u062F\u062F",other:""},e.isSelected)}`,listboxLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A",selectedAnnouncement:e=>`${e.optionText}\u060C \u0645\u062D\u062F\u062F`},"bg-BG":{buttonLabel:"\u041F\u043E\u043A\u0430\u0436\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.optionCount)} \u043E\u043F\u0446\u0438\u0438`})} \u043D\u0430 \u0440\u0430\u0437\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u044A\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u044F`,other:()=>`${n.number(e.groupCount)} \u043E\u043F\u0446\u0438\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0438\u0437\u0431\u0440\u0430\u043D\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0438\u0437\u0431\u0440\u0430\u043D\u0438`},"cs-CZ":{buttonLabel:"Zobrazit doporu\u010Den\xED",countAnnouncement:(e,n)=>`K dispozici ${n.plural(e.optionCount,{one:()=>`je ${n.number(e.optionCount)} mo\u017Enost`,other:()=>`jsou/je ${n.number(e.optionCount)} mo\u017Enosti/-\xED`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina \u201E${e.groupTitle}\u201C ${n.plural(e.groupCount,{one:()=>`s ${n.number(e.groupCount)} mo\u017Enost\xED`,other:()=>`se ${n.number(e.groupCount)} mo\u017Enostmi`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:" (vybr\xE1no)",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybr\xE1no`},"da-DK":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mulighed tilg\xE6ngelig`,other:()=>`${n.number(e.optionCount)} muligheder tilg\xE6ngelige`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angivet gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mulighed`,other:()=>`${n.number(e.groupCount)} muligheder`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"de-DE":{buttonLabel:"Empfehlungen anzeigen",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} Option`,other:()=>`${n.number(e.optionCount)} Optionen`})} verf\xFCgbar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Eingetretene Gruppe ${e.groupTitle}, mit ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} Option`,other:()=>`${n.number(e.groupCount)} Optionen`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", ausgew\xE4hlt",other:""},e.isSelected)}`,listboxLabel:"Empfehlungen",selectedAnnouncement:e=>`${e.optionText}, ausgew\xE4hlt`},"el-GR":{buttonLabel:"\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03C0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03C9\u03BD",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.optionCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 `})} \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B5\u03C2.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0395\u03B9\u03C3\u03B1\u03B3\u03BC\u03AD\u03BD\u03B7 \u03BF\u03BC\u03AC\u03B4\u03B1 ${e.groupTitle}, \u03BC\u03B5 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE`,other:()=>`${n.number(e.groupCount)} \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03BF",other:""},e.isSelected)}`,listboxLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2",selectedAnnouncement:e=>`${e.optionText}, \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B5`},"en-US":{focusAnnouncement:(e,n)=>`${n.select({true:()=>`Entered group ${e.groupTitle}, with ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selected",other:""},e.isSelected)}`,countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} available.`,selectedAnnouncement:e=>`${e.optionText}, selected`,buttonLabel:"Show suggestions",listboxLabel:"Suggestions"},"es-ES":{buttonLabel:"Mostrar sugerencias",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opci\xF3n`,other:()=>`${n.number(e.optionCount)} opciones`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Se ha unido al grupo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opci\xF3n`,other:()=>`${n.number(e.groupCount)} opciones`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", seleccionado",other:""},e.isSelected)}`,listboxLabel:"Sugerencias",selectedAnnouncement:e=>`${e.optionText}, seleccionado`},"et-EE":{buttonLabel:"Kuva soovitused",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} valik`,other:()=>`${n.number(e.optionCount)} valikud`})} saadaval.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Sisestatud r\xFChm ${e.groupTitle}, valikuga ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} valik`,other:()=>`${n.number(e.groupCount)} valikud`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valitud",other:""},e.isSelected)}`,listboxLabel:"Soovitused",selectedAnnouncement:e=>`${e.optionText}, valitud`},"fi-FI":{buttonLabel:"N\xE4yt\xE4 ehdotukset",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} vaihtoehto`,other:()=>`${n.number(e.optionCount)} vaihtoehtoa`})} saatavilla.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Siirtyi ryhm\xE4\xE4n ${e.groupTitle}, jossa ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} vaihtoehto`,other:()=>`${n.number(e.groupCount)} vaihtoehtoa`})}.`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valittu",other:""},e.isSelected)}`,listboxLabel:"Ehdotukset",selectedAnnouncement:e=>`${e.optionText}, valittu`},"fr-FR":{buttonLabel:"Afficher les suggestions",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} option`,other:()=>`${n.number(e.optionCount)} options`})} disponible(s).`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groupe ${e.groupTitle} rejoint, avec ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} option`,other:()=>`${n.number(e.groupCount)} options`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", s\xE9lectionn\xE9(s)",other:""},e.isSelected)}`,listboxLabel:"Suggestions",selectedAnnouncement:e=>`${e.optionText}, s\xE9lectionn\xE9`},"he-IL":{buttonLabel:"\u05D4\u05E6\u05D2 \u05D4\u05E6\u05E2\u05D5\u05EA",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.optionCount)}`,other:()=>`${n.number(e.optionCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})} \u05D1\u05DE\u05E6\u05D1 \u05D6\u05DE\u05D9\u05DF.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u05E0\u05DB\u05E0\u05E1 \u05DC\u05E7\u05D1\u05D5\u05E6\u05D4 ${e.groupTitle}, \u05E2\u05DD ${n.plural(e.groupCount,{one:()=>`\u05D0\u05E4\u05E9\u05E8\u05D5\u05EA ${n.number(e.groupCount)}`,other:()=>`${n.number(e.groupCount)} \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u05E0\u05D1\u05D7\u05E8",other:""},e.isSelected)}`,listboxLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA",selectedAnnouncement:e=>`${e.optionText}, \u05E0\u05D1\u05D7\u05E8`},"hr-HR":{buttonLabel:"Prika\u017Ei prijedloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} opcije/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", odabranih",other:""},e.isSelected)}`,listboxLabel:"Prijedlozi",selectedAnnouncement:e=>`${e.optionText}, odabrano`},"hu-HU":{buttonLabel:"Javaslatok megjelen\xEDt\xE9se",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`,other:()=>`${n.number(e.optionCount)} lehet\u0151s\xE9g`})} \xE1ll rendelkez\xE9sre.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Bel\xE9pett a(z) ${e.groupTitle} csoportba, amely ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`,other:()=>`${n.number(e.groupCount)} lehet\u0151s\xE9get`})} tartalmaz. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", kijel\xF6lve",other:""},e.isSelected)}`,listboxLabel:"Javaslatok",selectedAnnouncement:e=>`${e.optionText}, kijel\xF6lve`},"it-IT":{buttonLabel:"Mostra suggerimenti",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opzione disponibile`,other:()=>`${n.number(e.optionCount)} opzioni disponibili`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingresso nel gruppo ${e.groupTitle}, con ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opzione`,other:()=>`${n.number(e.groupCount)} opzioni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selezionato",other:""},e.isSelected)}`,listboxLabel:"Suggerimenti",selectedAnnouncement:e=>`${e.optionText}, selezionato`},"ja-JP":{buttonLabel:"\u5019\u88DC\u3092\u8868\u793A",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.optionCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u5229\u7528\u3067\u304D\u307E\u3059\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u5165\u529B\u3055\u308C\u305F\u30B0\u30EB\u30FC\u30D7 ${e.groupTitle}\u3001${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`,other:()=>`${n.number(e.groupCount)} \u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3`})}\u3092\u542B\u3080\u3002`,other:""},e.isGroupChange)}${e.optionText}${n.select({true:"\u3001\u9078\u629E\u6E08\u307F",other:""},e.isSelected)}`,listboxLabel:"\u5019\u88DC",selectedAnnouncement:e=>`${e.optionText}\u3001\u9078\u629E\u6E08\u307F`},"ko-KR":{buttonLabel:"\uC81C\uC548 \uC0AC\uD56D \uD45C\uC2DC",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.optionCount)}\uAC1C \uC635\uC158`})}\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\uC785\uB825\uD55C \uADF8\uB8F9 ${e.groupTitle}, ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`,other:()=>`${n.number(e.groupCount)}\uAC1C \uC635\uC158`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \uC120\uD0DD\uB428",other:""},e.isSelected)}`,listboxLabel:"\uC81C\uC548",selectedAnnouncement:e=>`${e.optionText}, \uC120\uD0DD\uB428`},"lt-LT":{buttonLabel:"Rodyti pasi\u016Blymus",countAnnouncement:(e,n)=>`Yra ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} parinktis`,other:()=>`${n.number(e.optionCount)} parinktys (-i\u0173)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u012Evesta grup\u0117 ${e.groupTitle}, su ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} parinktimi`,other:()=>`${n.number(e.groupCount)} parinktimis (-i\u0173)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", pasirinkta",other:""},e.isSelected)}`,listboxLabel:"Pasi\u016Blymai",selectedAnnouncement:e=>`${e.optionText}, pasirinkta`},"lv-LV":{buttonLabel:"R\u0101d\u012Bt ieteikumus",countAnnouncement:(e,n)=>`Pieejamo opciju skaits: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcijas`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ievad\u012Bta grupa ${e.groupTitle}, ar ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opciju`,other:()=>`${n.number(e.groupCount)} opcij\u0101m`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", atlas\u012Bta",other:""},e.isSelected)}`,listboxLabel:"Ieteikumi",selectedAnnouncement:e=>`${e.optionText}, atlas\u012Bta`},"nb-NO":{buttonLabel:"Vis forslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativer`})} finnes.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Angitt gruppe ${e.groupTitle}, med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativer`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valgt",other:""},e.isSelected)}`,listboxLabel:"Forslag",selectedAnnouncement:e=>`${e.optionText}, valgt`},"nl-NL":{buttonLabel:"Suggesties weergeven",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} optie`,other:()=>`${n.number(e.optionCount)} opties`})} beschikbaar.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Groep ${e.groupTitle} ingevoerd met ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} optie`,other:()=>`${n.number(e.groupCount)} opties`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", geselecteerd",other:""},e.isSelected)}`,listboxLabel:"Suggesties",selectedAnnouncement:e=>`${e.optionText}, geselecteerd`},"pl-PL":{buttonLabel:"Wy\u015Bwietlaj sugestie",countAnnouncement:(e,n)=>`dost\u0119pna/dost\u0119pne(-nych) ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcja`,other:()=>`${n.number(e.optionCount)} opcje(-i)`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Do\u0142\u0105czono do grupy ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcj\u0105`,other:()=>`${n.number(e.groupCount)} opcjami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", wybrano",other:""},e.isSelected)}`,listboxLabel:"Sugestie",selectedAnnouncement:e=>`${e.optionText}, wybrano`},"pt-BR":{buttonLabel:"Mostrar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo inserido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"pt-PT":{buttonLabel:"Apresentar sugest\xF5es",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\xE7\xE3o`,other:()=>`${n.number(e.optionCount)} op\xE7\xF5es`})} dispon\xEDvel.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grupo introduzido ${e.groupTitle}, com ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\xE7\xE3o`,other:()=>`${n.number(e.groupCount)} op\xE7\xF5es`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selecionado",other:""},e.isSelected)}`,listboxLabel:"Sugest\xF5es",selectedAnnouncement:e=>`${e.optionText}, selecionado`},"ro-RO":{buttonLabel:"Afi\u0219are sugestii",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} op\u021Biune`,other:()=>`${n.number(e.optionCount)} op\u021Biuni`})} disponibile.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Grup ${e.groupTitle} introdus, cu ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} op\u021Biune`,other:()=>`${n.number(e.groupCount)} op\u021Biuni`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", selectat",other:""},e.isSelected)}`,listboxLabel:"Sugestii",selectedAnnouncement:e=>`${e.optionText}, selectat`},"ru-RU":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u0430\u044F \u0433\u0440\u0443\u043F\u043F\u0430 ${e.groupTitle}, \u0441 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C\u0438`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F",selectedAnnouncement:e=>`${e.optionText}, \u0432\u044B\u0431\u0440\u0430\u043D\u043E`},"sk-SK":{buttonLabel:"Zobrazi\u0165 n\xE1vrhy",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} mo\u017Enos\u0165`,other:()=>`${n.number(e.optionCount)} mo\u017Enosti/-\xED`})} k dispoz\xEDcii.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Zadan\xE1 skupina ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ou`,other:()=>`${n.number(e.groupCount)} mo\u017Enos\u0165ami`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", vybrat\xE9",other:""},e.isSelected)}`,listboxLabel:"N\xE1vrhy",selectedAnnouncement:e=>`${e.optionText}, vybrat\xE9`},"sl-SI":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Na voljo je ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Vnesena skupina ${e.groupTitle}, z ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcija`,other:()=>`${n.number(e.groupCount)} opcije`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izbrano",other:""},e.isSelected)}`,listboxLabel:"Predlogi",selectedAnnouncement:e=>`${e.optionText}, izbrano`},"sr-SP":{buttonLabel:"Prika\u017Ei predloge",countAnnouncement:(e,n)=>`Dostupno jo\u0161: ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} opcija`,other:()=>`${n.number(e.optionCount)} opcije/a`})}.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Unesena grupa ${e.groupTitle}, s ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} opcijom`,other:()=>`${n.number(e.groupCount)} optione/a`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", izabranih",other:""},e.isSelected)}`,listboxLabel:"Predlozi",selectedAnnouncement:e=>`${e.optionText}, izabrano`},"sv-SE":{buttonLabel:"Visa f\xF6rslag",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} alternativ`,other:()=>`${n.number(e.optionCount)} alternativ`})} tillg\xE4ngliga.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Ingick i gruppen ${e.groupTitle} med ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} alternativ`,other:()=>`${n.number(e.groupCount)} alternativ`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", valda",other:""},e.isSelected)}`,listboxLabel:"F\xF6rslag",selectedAnnouncement:e=>`${e.optionText}, valda`},"tr-TR":{buttonLabel:"\xD6nerileri g\xF6ster",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} se\xE7enek`,other:()=>`${n.number(e.optionCount)} se\xE7enekler`})} kullan\u0131labilir.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`Girilen grup ${e.groupTitle}, ile ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} se\xE7enek`,other:()=>`${n.number(e.groupCount)} se\xE7enekler`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", se\xE7ildi",other:""},e.isSelected)}`,listboxLabel:"\xD6neriler",selectedAnnouncement:e=>`${e.optionText}, se\xE7ildi`},"uk-UA":{buttonLabel:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.optionCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u0412\u0432\u0435\u0434\u0435\u043D\u0430 \u0433\u0440\u0443\u043F\u0430 ${e.groupTitle}, \u0437 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440`,other:()=>`${n.number(e.groupCount)} \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438(-\u0456\u0432)`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u0432\u0438\u0431\u0440\u0430\u043D\u043E",other:""},e.isSelected)}`,listboxLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457",selectedAnnouncement:e=>`${e.optionText}, \u0432\u0438\u0431\u0440\u0430\u043D\u043E`},"zh-CN":{buttonLabel:"\u663E\u793A\u5EFA\u8BAE",countAnnouncement:(e,n)=>`\u6709 ${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.optionCount)} \u4E2A\u9009\u9879`})}\u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8FDB\u5165\u4E86 ${e.groupTitle} \u7EC4\uFF0C\u5176\u4E2D\u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`,other:()=>`${n.number(e.groupCount)} \u4E2A\u9009\u9879`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9009\u62E9",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8BAE",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9009\u62E9`},"zh-TW":{buttonLabel:"\u986F\u793A\u5EFA\u8B70",countAnnouncement:(e,n)=>`${n.plural(e.optionCount,{one:()=>`${n.number(e.optionCount)} \u9078\u9805`,other:()=>`${n.number(e.optionCount)} \u9078\u9805`})} \u53EF\u7528\u3002`,focusAnnouncement:(e,n)=>`${n.select({true:()=>`\u8F38\u5165\u7684\u7FA4\u7D44 ${e.groupTitle}, \u6709 ${n.plural(e.groupCount,{one:()=>`${n.number(e.groupCount)} \u9078\u9805`,other:()=>`${n.number(e.groupCount)} \u9078\u9805`})}. `,other:""},e.isGroupChange)}${e.optionText}${n.select({true:", \u5DF2\u9078\u53D6",other:""},e.isSelected)}`,listboxLabel:"\u5EFA\u8B70",selectedAnnouncement:e=>`${e.optionText}, \u5DF2\u9078\u53D6`}};function Xe(e,n){let{buttonRef:r,popoverRef:m,inputRef:u,listBoxRef:d$2,keyboardDelegate:l,layoutDelegate:x,shouldFocusWrap:U,isReadOnly:A,isDisabled:W}=e,ue=useRef(null);r=r??ue;let M=b(Ne,"@react-aria/combobox"),{menuTriggerProps:S,menuProps:I}=c({type:"listbox",isDisabled:W||A},n,r);a.set(n,{id:I.id});let{collection:P}=n,{disabledKeys:R}=n.selectionManager,_=useMemo(()=>l||new b$1({collection:P,disabledKeys:R,ref:d$2,layoutDelegate:x}),[l,x,P,R,d$2]),{collectionProps:s}=c$1({selectionManager:n.selectionManager,keyboardDelegate:_,disallowTypeAhead:true,disallowEmptySelection:true,shouldFocusWrap:U,ref:u,isVirtualized:true}),L=o(),{keyboardProps:$}=j({shortcuts:{Enter:t=>{let i=n.isOpen;if(n.isOpen&&d$2.current&&n.selectionManager.focusedKey!=null){let h=n.collection.getItem(n.selectionManager.focusedKey);if(h?.props.href){let v=d$2.current.querySelector(`[data-key="${CSS.escape(n.selectionManager.focusedKey.toString())}"]`);return v instanceof HTMLAnchorElement&&L.open(v,t,h.props.href,h.props.routerOptions),n.close(),{shouldPreventDefault:i}}else if(h?.props.onAction)return h.props.onAction(),n.close(),{shouldPreventDefault:i}}return n.commit(),{shouldPreventDefault:i}},Tab:()=>{if(n.isOpen&&d$2.current&&n.selectionManager.focusedKey!=null){let t=n.collection.getItem(n.selectionManager.focusedKey);if(t?.props.href)return n.close(),{shouldPreventDefault:false};if(t?.props.onAction)return t.props.onAction(),n.close(),{shouldPreventDefault:false,shouldContinuePropagation:true}}return n.isOpen&&n.commit(),{shouldPreventDefault:false,shouldContinuePropagation:true}},Escape:()=>{let t=false;return (!n.selectionManager.isEmpty||n.inputValue===""||e.allowsCustomValue)&&(t=true),n.revert(),{shouldContinuePropagation:t}}}}),{keyboardProps:C}=j({shortcuts:{ArrowDown:()=>(n.open("first","manual"),{shouldPreventDefault:false}),ArrowUp:()=>(n.open("last","manual"),{shouldPreventDefault:false}),ArrowLeft:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false}),ArrowRight:()=>(n.selectionManager.setFocusedKey(null),{shouldPreventDefault:false})},allowRepeats:true}),le=t=>{let i=h(r.current,t.relatedTarget),h$1=h(m.current,t.relatedTarget);i||h$1||(e.onBlur&&e.onBlur(t),n.setFocused(false));},b$4=t=>{n.isFocused||(e.onFocus&&e.onFocus(t),n.setFocused(true));},Z=_e([n.selectionManager.selectedKeys,n.selectionManager.selectionMode]),{isInvalid:c$6,validationErrors:q,validationDetails:Q}=n.displayValidation,{labelProps:B,inputProps:V,descriptionProps:g,errorMessageProps:ee}=a$1({...e,isRequired:e.selectionMode==="multiple"?e.isRequired&&n.selectionManager.isEmpty:e.isRequired,onChange:n.setInputValue,onKeyDown:A?e.onKeyDown:a$2(n.isOpen&&s.onKeyDown,$.onKeyDown,C.onKeyDown,e.onKeyDown),onBlur:le,value:n.inputValue,defaultValue:n.defaultInputValue,onFocus:b$4,autoComplete:"off",validate:void 0,[c$2]:n,"aria-describedby":[Z,e["aria-describedby"]].filter(Boolean).join(" ")||void 0},u);a$3(u,n.defaultValue,n.setValue);let ie=t=>{t.pointerType==="touch"&&(u.current?.focus(),n.toggle(null,"manual"));},J=t=>{t.pointerType!=="touch"&&(u.current?.focus(),n.toggle(t.pointerType==="keyboard"||t.pointerType==="virtual"?"first":null,"manual"));},Ce=a$4({id:S.id,"aria-label":M.format("buttonLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),a$9=a$4({id:I.id,"aria-label":M.format("listboxLabel"),"aria-labelledby":e["aria-labelledby"]||B.id}),F=useRef(0),ce=t=>{if(W||A)return;if(t.timeStamp-F.current<500){t.preventDefault(),u.current?.focus();return}let i=j$1(t).getBoundingClientRect(),h=t.changedTouches[0],v=Math.ceil(i.left+.5*i.width),H=Math.ceil(i.top+.5*i.height);h.clientX===v&&h.clientY===H&&(t.preventDefault(),u.current?.focus(),n.toggle(null,"manual"),F.current=t.timeStamp);},y=n.selectionManager.focusedKey!=null&&n.isOpen?n.collection.getItem(n.selectionManager.focusedKey):void 0,k=y?.parentKey??null,T=n.selectionManager.focusedKey??null,w=useRef(k),K=useRef(T);useEffect(()=>{if(i()&&y!=null&&T!=null&&T!==K.current){let t=n.selectionManager.isSelected(T),i=k!=null?n.collection.getItem(k):null,h=i?.["aria-label"]||(typeof i?.rendered=="string"?i.rendered:"")||"",v=M.format("focusAnnouncement",{isGroupChange:(i&&k!==w.current)??false,groupTitle:h,groupCount:i?[...b$2(i,n.collection)].length:0,optionText:y["aria-label"]||y.textValue||"",isSelected:t});a$5(v);}w.current=k,K.current=T;});let f=d(n.collection),z=useRef(f),N=useRef(n.isOpen);useEffect(()=>{let t=n.isOpen!==N.current&&(n.selectionManager.focusedKey==null||i());if(n.isOpen&&(t||f!==z.current)){let i=M.format("countAnnouncement",{optionCount:f});a$5(i);}z.current=f,N.current=n.isOpen;});let O=useRef(n.selectedKey);return useEffect(()=>{if(i()&&n.isFocused&&n.selectedItem&&n.selectedKey!==O.current){let t=n.selectedItem["aria-label"]||n.selectedItem.textValue||"",i=M.format("selectedAnnouncement",{optionText:t});a$5(i);}O.current=n.selectedKey;}),useEffect(()=>{if(n.isOpen)return a$6([u.current,m.current].filter(t=>t!=null))},[n.isOpen,u,m]),c$3(()=>{!y&&u.current&&i$1(a$7(u.current))===u.current&&c$4(u.current,null);},[y]),a$8(d$2,"react-aria-item-action",n.isOpen?()=>{n.close();}:void 0),{labelProps:{...B,onClick:"htmlFor"in B&&B.htmlFor||e.isDisabled?void 0:()=>{u.current?.focus(),d$1("keyboard");}},buttonProps:{...S,...Ce,excludeFromTabOrder:true,preventFocusOnPress:true,onPress:ie,onPressStart:J,isDisabled:W||A},inputProps:c$5(V,{role:"combobox","aria-expanded":S["aria-expanded"],"aria-controls":n.isOpen?I.id:void 0,"aria-autocomplete":"list","aria-activedescendant":y?b$3(n,y.key):void 0,onTouchEnd:ce,autoCorrect:"off",spellCheck:"false"}),listBoxProps:c$5(I,a$9,{onAction:void 0,autoFocus:n.focusStrategy||true,shouldUseVirtualFocus:true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,linkBehavior:"selection",UNSTABLE_itemBehavior:"action"}),valueProps:{id:Z},descriptionProps:g,errorMessageProps:ee,isInvalid:c$6,validationErrors:q,validationDetails:Q}}function _e(e=[]){let n=c$6(),[r,m]=useState(true),[u,d]=useState(e);return u.some((l,x)=>!Object.is(l,e[x]))&&(m(true),d(e)),useEffect(()=>{r&&!document.getElementById(n)&&m(false);},[n,r,u]),r?n:void 0}function en(e){let{defaultFilter:n,menuTrigger:r="input",allowsEmptyCollection:m=false,allowsCustomValue:u,shouldCloseOnBlur:d=true,selectionMode:l="single"}=e,[x,U]=useState(false),[A,W]=useState(false),[ue,M]=useState(null),S=useRef(false),I=useMemo(()=>e.defaultValue!==void 0?e.defaultValue:l==="single"?e.defaultSelectedKey??null:[],[e.defaultValue,e.defaultSelectedKey,l]),P=useMemo(()=>e.value!==void 0?e.value:l==="single"?e.selectedKey:void 0,[e.value,e.selectedKey,l]),[R,_]=a$9(P,I,e.onChange),s=l==="single"&&Array.isArray(R)?R[0]:R,L=o=>{if(l==="single"){let p=Array.isArray(o)?o[0]??null:o;_(p),p!==s&&e.onSelectionChange?.(p);}else {let p=[];Array.isArray(o)?p=o:o!=null&&(p=[o]),_(p);}},{collection:$,selectionManager:C,disabledKeys:le}=b$4({...e,items:e.items??e.defaultItems,selectionMode:l,disallowEmptySelection:l==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>on(s),[s]),onSelectionChange:o=>{if(o!=="all")if(l==="single"){let p=o.values().next().value??null;p===s?(e.onSelectionChange?.(p),z(),T()):L(p);}else L([...o]);}}),b=l==="single"?C.firstSelectedKey:null,Z=useMemo(()=>[...C.selectedKeys].map(o=>$.getItem(o)).filter(o=>o!=null),[C.selectedKeys,$]),[c,q]=a$9(e.inputValue,Ue(e.defaultInputValue,b,$)||"",e.onInputChange),[Q]=useState(s),[B]=useState(c),V=$,g=useMemo(()=>e.items!=null||!n?$:nn($,c,n),[$,c,n,e.items]),[ee,ie]=useState(g),J=useRef("focus"),a=a$a({...e,onOpenChange:o=>{e.onOpenChange&&e.onOpenChange(o,o?J.current:void 0),C.setFocused(o),o||C.setFocusedKey(null);},isOpen:void 0,defaultOpen:void 0}),F=(o=null,p)=>{let Y=p==="manual"||p==="focus"&&r==="focus";(m||g.size>0||Y&&V.size>0||e.items)&&(Y&&!a.isOpen&&e.items===void 0&&U(true),J.current=p,M(o),a.open());},ce=(o=null,p)=>{let Y=p==="manual"||p==="focus"&&r==="focus";!(m||g.size>0||Y&&V.size>0||e.items)&&!a.isOpen||(Y&&!a.isOpen&&e.items===void 0&&U(true),a.isOpen||(J.current=p),k(o));},y=useCallback(()=>{ie(x?V:g);},[x,V,g]),k=useCallback((o=null)=>{a.isOpen&&y(),M(o),a.toggle();},[a,y]),T=useCallback(()=>{a.isOpen&&(y(),a.close());},[a,y]),[w,K]=useState(c),f=useRef(false),z=()=>{let o=b!=null?$.getItem(b)?.textValue??"":"";f.current=false,K(o),q(o);},N=useRef(null),O=useRef(s),t=useRef(b!=null?$.getItem(b)?.textValue??"":"");useEffect(()=>{A&&(g.size>0||m)&&!a.isOpen&&c!==w&&c!==N.current&&r!=="manual"&&F(null,"input"),!x&&!m&&a.isOpen&&g.size===0&&(S.current=true,T()),A&&S.current&&g.size>0&&!a.isOpen&&r!=="manual"&&(S.current=false,F(null,"input")),s!=null&&s!==O.current&&l==="single"&&T(),c!==w&&(f.current=true,C.setFocusedKey(null),U(false),l==="single"&&c===""&&(e.inputValue===void 0||P===void 0)&&L(null)),s!==O.current&&(e.inputValue===void 0||P===void 0)?z():w!==c&&K(c);let o=b!=null?$.getItem(b)?.textValue??"":"";(!A||!f.current)&&b!=null&&e.inputValue===void 0&&b===O.current&&t.current!==o&&(f.current=false,K(o),q(o)),O.current=s,t.current=o,N.current=null;});let i=d$2({...e,value:useMemo(()=>Array.isArray(s)&&s.length===0?null:{inputValue:c,value:s,selectedKey:b},[c,b,s])}),h=()=>{S.current=false,u&&b==null?v():H();},v=()=>{if(l==="multiple"){K(c),T();return}let o=null;O.current=o,L(o),N.current=c,T();},H=(o=false)=>{if(P!==void 0&&e.inputValue!==void 0){let p=b!=null?$.getItem(b)?.textValue??"":"";(o||l==="multiple"||c!==p)&&(e.onSelectionChange?.(b),e.onChange?.(s)),K(p),T();}else z(),T();},pe=()=>{if(S.current=false,u){let o=b!=null?$.getItem(b)?.textValue??"":"";c===o?H():v();}else H();},Ze=()=>{a.isOpen&&C.focusedKey!=null?C.isSelected(C.focusedKey)&&l==="single"?H(true):C.select(C.focusedKey):pe();},re=useRef([c,s]),qe=o=>{o?(re.current=[c,s],r==="focus"&&!e.isReadOnly&&F(null,"focus")):(d&&pe(),(c!==re.current[0]||s!==re.current[1])&&i.commitValidation()),W(o);},Je=useMemo(()=>a.isOpen?x?V:g:ee,[a.isOpen,V,g,x,ee]),he=e.defaultSelectedKey??(l==="single"?Q:null);return {...i,...a,focusStrategy:ue,toggle:ce,open:F,close:pe,selectionManager:C,value:s,defaultValue:I??Q,setValue:L,selectedKey:b,selectedItems:Z,defaultSelectedKey:he,setSelectedKey:L,disabledKeys:le,isFocused:A,setFocused:qe,selectedItem:Z[0]??null,collection:Je,inputValue:c,defaultInputValue:Ue(e.defaultInputValue,he,$)??B,setInputValue:q,commit:Ze,revert:h}}function nn(e,n,r){return new a$b(We(e,e,n,r))}function We(e,n,r,m){let u=[];for(let d of n)if(d.type==="section"&&d.hasChildNodes){let l=We(e,b$2(d,e),r,m);[...l].some(x=>x.type==="item")&&u.push({...d,childNodes:l});}else d.type==="item"&&m(d.textValue,r)?u.push({...d}):d.type!=="item"&&u.push({...d});return u}function Ue(e,n,r){return e==null&&n!=null?r.getItem(n)?.textValue??"":e}function on(e){if(e!==void 0)return e===null?[]:Array.isArray(e)?e:[e]}export{Xe as a,en as b};
@@ -1,4 +1,4 @@
1
- import {c,a as a$1,d,e}from'./chunk-5ILCVLWY.mjs';import {a as a$7}from'./chunk-MYT5CSGX.mjs';import {a as a$3}from'./chunk-EFFODO2N.mjs';import {a as a$6}from'./chunk-4QGZDJW4.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {b as b$1,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-OPIPJTLG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,j}from'./chunk-MBRNO6IW.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {CalendarIcon}from'@baseline-ui/icons/16';import {createCalendar,toCalendarDateTime,Time,toZoned}from'@internationalized/date';import n from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {c,a as a$1,d,e}from'./chunk-57YWI7EG.mjs';import {a as a$7}from'./chunk-464QF4AV.mjs';import {a as a$3}from'./chunk-EFFODO2N.mjs';import {a as a$6}from'./chunk-Z73YU5ZQ.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {b as b$1,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2OXYNLVN.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,j}from'./chunk-MBRNO6IW.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {CalendarIcon}from'@baseline-ui/icons/16';import {createCalendar,toCalendarDateTime,Time,toZoned}from'@internationalized/date';import n from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b,a as a$5}from'./chunk-XVL2GXTB.mjs';import {a as a$1,f as f$1}from'./chunk-5GW36EQJ.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-3IPRT57V.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-4QGZDJW4.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$e}from'./chunk-5W6G3ZUT.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {b,a as a$5}from'./chunk-EJYSTNXD.mjs';import {a as a$1,f as f$1}from'./chunk-5GW36EQJ.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-3IPRT57V.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-Z73YU5ZQ.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$e}from'./chunk-2BG2JLFC.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-OPIPJTLG.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
1
+ import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-2OXYNLVN.mjs';import {a as a$4,b as b$1}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-FPM5UJRF.mjs';import {a as a$6}from'./chunk-SGZWUG3H.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {i,a as a$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import H,{useContext,useEffect,useMemo,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {AnimatePresence,motion}from'motion/react';import {ChevronRightIcon}from'@baseline-ui/icons/8';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {b}from'./chunk-Q5UMLFN3.mjs';import {a as a$9}from'./chunk-OPIPJTLG.mjs'
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17de",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var N=H.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:m}=useContext(z),l=H.Children.toArray(a).filter(e=>H.isValidElement(e));useEffect(()=>{for(let e of o.keys())e>=l.length&&o.delete(e);},[o,l.length]);let{keyboardProps:_}=j({onKeyDown:e=>{let s=i(a$1(e.target)),c=[...o?.keys()||[]].findIndex(d=>{let y=o?.get(d)?.current;return y?y===s:false});if(!o?.get(c)){e.continuePropagation();return}let n=o?.size||0,v=new Set([...m??[]].map(String)),u=d=>{let y=o.get(d)?.current?.dataset.key;return y!==void 0&&v.has(y)},r=(d,y)=>{for(let g=1;g<=n;g++){let A=((d+y*g)%n+n)%n;if(!u(A)){o.get(A)?.current?.focus();return}}};switch(e.key){case "Home":{e.preventDefault(),r(-1,1);break}case "End":{e.preventDefault(),r(n,-1);break}case "ArrowDown":{e.preventDefault(),r(c,1);break}case "ArrowUp":{e.preventDefault(),r(c,-1);break}default:e.continuePropagation();}}});return jsx("div",{...b(_),style:p,className:a$2(X,i$1),ref:t,children:l.map((e,s)=>H.cloneElement(e,{index:s}))})});N.displayName="AccordionBase";var z=H.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=H.forwardRef(({children:a,disabledKeys:i,defaultExpandedKeys:p=new Set,expandedKeys:t,expansionMode:o="multiple",onChange:m,className:l,style:_},e)=>{let[s,c]=a$3(t,p,m),f=H.useRef(new Map).current,[n,v]=H.useState(o);useEffect(()=>{v(o);},[o]);let u=useMemo(()=>({expandedKeys:s,setExpandedKeys:c,disabledKeys:i,headers:f,expansionMode:n}),[s,c,i,f,n]);return jsx(z.Provider,{value:u,children:jsx(a$4,{children:jsx(N,{className:l,style:_,ref:e,children:a})})})});se.displayName="Accordion";var D=H.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:m,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let s=H.useRef(null),{expandedKeys:c$1,setExpandedKeys:f,expansionMode:n,disabledKeys:v,headers:u}=useContext(z),r=v?.has(t),d$1=b$1();a$5(d$1);let{focusNext:y,focusPrevious:g}=d$1,{direction:A}=b$2(),pe=A==="rtl"?"ArrowLeft":"ArrowRight",le=A==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?g({wrap:true}):x.continuePropagation();},isDisabled:r});useEffect(()=>{a$5(typeof m=="number","AccordionItem must have an index"),u?.set(m,s);},[m,u]);let F=()=>{f(x=>{let h=new Set(x);return h.has(t)?h.delete(t):(n==="single"&&h.clear(),h.add(t)),h});},{buttonProps:ue}=a$6({"aria-expanded":c$1.has(t),"aria-controls":p,onPress:F,isDisabled:r},s),{pressProps:ye}=d({onPress:F,isDisabled:r}),{focusProps:fe,isFocusVisible:ze}=a$7(),{hoverProps:_e,isHovered:L}=a$8({isDisabled:r}),{focusProps:ve,isFocusVisible:xe}=a$7({within:true}),he=c$1.has(t);return jsxs("h3",{...c(me,ye,_e,ve),className:oe({isFocusVisible:ze,isHovered:L,isDisabled:r}),ref:e,children:[jsxs("div",{className:re({isDisabled:!!r}),children:[jsx(ChevronRightIcon,{className:Z({isExpanded:he}),size:8}),jsx("button",{...c(ue,fe),id:o,"data-key":t,className:te,ref:s,children:a})]}),i?.length?jsx("div",{"data-testid":"action-buttons",className:Y({showActionsOnTriggerOnly:_,isTriggered:xe||L}),children:i.map((x,h)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:r,...x},h))}):null,l?jsx("div",{className:ee,children:l}):null]})});D.displayName="AccordionHeader";var Ke={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},Me=({isExpanded:a,...i})=>{let[p,t]=useState(!a);return a&&p&&t(false),jsx(motion.section,{...i,initial:false,animate:a?"open":"closed",onAnimationComplete:o=>{o==="closed"&&t(true);},hidden:p})},de=H.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:m,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:s},c)=>{let f=c$1(),n=c$1(),{expandedKeys:v}=useContext(z),u=v.has(t),r={role:"region","aria-labelledby":n,id:f,className:$,variants:Ke},d=jsx("div",{style:l,className:_,children:p});return jsxs(Fragment,{children:[jsx(a$4,{children:jsx(D,{value:t,actions:i,id:n,title:a,controlId:f,ref:c,index:o,subLabel:m,showActionsOnTriggerOnly:e})}),s?jsx(Me,{...r,isExpanded:u,children:d}):jsx(AnimatePresence,{initial:false,children:u?jsx(motion.section,{...r,initial:"closed",animate:"open",exit:"closed",children:d}):null})]})});de.displayName="AccordionItem";export{se as a,de as b};
10
+ var X="_1yep5z6m3",Y=a({defaultClassName:"_1kvz17db _1yep5z6lq _1yep5z6ls",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Z=a({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6lq _1yep5z6lr",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),$="_1kvz17de",ee="_1yep5z6ez _1yep5z6dy",oe=a({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ga",false:"_1yep5z6gb"},isDisabled:{true:"z9nup82"}},defaultVariants:{},compoundVariants:[]}),te="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",re=a({defaultClassName:"_1kvz17d7 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{isDisabled:{true:"_1yep5z6f2",false:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var M=H.forwardRef(({children:a,className:i$1,style:p},t)=>{let{headers:o}=useContext(z),{disabledKeys:u}=useContext(z),l=H.Children.toArray(a).filter(e=>H.isValidElement(e));useEffect(()=>{for(let e of o.keys())e>=l.length&&o.delete(e);},[o,l.length]);let{keyboardProps:_}=j({onKeyDown:e=>{let n=i(a$1(e.target)),c=[...o?.keys()||[]].findIndex(d=>{let y=o?.get(d)?.current;return y?y===n:false});if(!o?.get(c)){e.continuePropagation();return}let s=o?.size||0,v=new Set([...u??[]].map(String)),m=d=>{let y=o.get(d)?.current?.dataset.key;return y!==void 0&&v.has(y)},r=(d,y)=>{for(let g=1;g<=s;g++){let A=((d+y*g)%s+s)%s;if(!m(A)){o.get(A)?.current?.focus();return}}};switch(e.key){case "Home":{e.preventDefault(),r(-1,1);break}case "End":{e.preventDefault(),r(s,-1);break}case "ArrowDown":{e.preventDefault(),r(c,1);break}case "ArrowUp":{e.preventDefault(),r(c,-1);break}default:e.continuePropagation();}}});return jsx("div",{...b(_),style:p,className:a$2(X,i$1),ref:t,children:l.map((e,n)=>H.cloneElement(e,{index:n}))})});M.displayName="AccordionBase";var z=H.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),se=H.forwardRef(({children:a,disabledKeys:i,defaultExpandedKeys:p=new Set,expandedKeys:t,expansionMode:o="multiple",onChange:u,className:l,style:_},e)=>{let[n,c]=a$3(t,p,u),f=H.useRef(new Map).current,[s,v]=H.useState(o);useEffect(()=>{v(o);},[o]);let m=useMemo(()=>({expandedKeys:n,setExpandedKeys:c,disabledKeys:i,headers:f,expansionMode:s}),[n,c,i,f,s]);return jsx(z.Provider,{value:m,children:jsx(a$4,{children:jsx(M,{className:l,style:_,ref:e,children:a})})})});se.displayName="Accordion";var D=H.forwardRef(({title:a,actions:i,controlId:p,value:t,id:o,index:u,subLabel:l,showActionsOnTriggerOnly:_},e)=>{let n=H.useRef(null),{expandedKeys:c$1,setExpandedKeys:f,expansionMode:s,disabledKeys:v,headers:m}=useContext(z),r=v?.has(t),d$1=b$1();a$5(d$1);let{focusNext:y,focusPrevious:g}=d$1,{direction:A}=b$2(),pe=A==="rtl"?"ArrowLeft":"ArrowRight",le=A==="rtl"?"ArrowRight":"ArrowLeft",{keyboardProps:me}=j({onKeyDown:x=>{x.key===pe?y({wrap:true}):x.key===le?g({wrap:true}):x.continuePropagation();},isDisabled:r});useEffect(()=>{a$5(typeof u=="number","AccordionItem must have an index"),m?.set(u,n);},[u,m]);let L=()=>{f(x=>{let b=new Set(x);return b.has(t)?b.delete(t):(s==="single"&&b.clear(),b.add(t)),b});},{buttonProps:ue}=a$6({"aria-expanded":c$1.has(t),"aria-controls":p,onPress:L,isDisabled:r},n),{pressProps:ye}=d({onPress:L,isDisabled:r}),{focusProps:fe,isFocusVisible:ze}=a$7(),{hoverProps:_e,isHovered:T}=a$8({isDisabled:r}),{focusProps:ve,isFocusVisible:xe}=a$7({within:true}),be=c$1.has(t);return jsxs("h3",{...c(me,ye,_e,ve),className:oe({isFocusVisible:ze,isHovered:T,isDisabled:r}),ref:e,children:[jsxs("div",{className:re({isDisabled:!!r}),children:[jsx(ChevronRightIcon,{className:Z({isExpanded:be}),size:8}),jsx("button",{...c(ue,fe),id:o,"data-key":t,className:te,ref:n,children:a})]}),i?.length?jsx("div",{"data-testid":"action-buttons",className:Y({showActionsOnTriggerOnly:_,isTriggered:xe||T}),children:i.map((x,b)=>jsx(a$9,{variant:"secondary",size:"sm",excludeFromTabOrder:true,isDisabled:r,...x},b))}):null,l?jsx("div",{className:ee,children:l}):null]})});D.displayName="AccordionHeader";var Ke={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},Ne=({isExpanded:a,...i})=>{let[p,t]=useState(!a);return a&&p&&t(false),jsx(motion.section,{...i,initial:false,animate:a?"open":"closed",onAnimationComplete:o=>{o==="closed"&&t(true);},hidden:p})},de=H.forwardRef(({title:a,actions:i,children:p,value:t,index:o,subLabel:u,style:l,className:_,showActionsOnTriggerOnly:e,shouldForceMount:n},c)=>{let f=c$1(),s=c$1(),{expandedKeys:v}=useContext(z),m=v.has(t),r={role:"region","aria-labelledby":s,id:f,className:$,variants:Ke},d=jsx("div",{style:l,className:_,children:p});return jsxs(Fragment,{children:[jsx(a$4,{children:jsx(D,{value:t,actions:i,id:s,title:a,controlId:m||n?f:void 0,ref:c,index:o,subLabel:u,showActionsOnTriggerOnly:e})}),n?jsx(Ne,{...r,isExpanded:m,children:d}):jsx(AnimatePresence,{initial:false,children:m?jsx(motion.section,{...r,initial:"closed",animate:"open",exit:"closed",children:d}):null})]})});de.displayName="AccordionItem";export{se as a,de as b};
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-LDWNE2JT.mjs';import {a as a$3}from'./chunk-NT2MFIKD.mjs';import {a as a$1}from'./chunk-6GV3YWV7.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-OPIPJTLG.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
1
+ import {a as a$2}from'./chunk-4SW77SGW.mjs';import {a as a$7}from'./chunk-LDWNE2JT.mjs';import {a as a$3}from'./chunk-RIVN2JT3.mjs';import {a as a$1}from'./chunk-6GV3YWV7.mjs';import {a as a$8}from'./chunk-JZXLV6JU.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-INFMXVHD.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2OXYNLVN.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import Y from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-QMV2O57M.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-OPIPJTLG.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
1
+ import {a as a$8}from'./chunk-G77E7EDE.mjs';import {c as c$1,d}from'./chunk-QMV2O57M.mjs';import {a as a$7}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-2OXYNLVN.mjs';import {a as a$b}from'./chunk-D4NW56YQ.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$9}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$6}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$a}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';import {jsxs,jsx}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -1,4 +1,4 @@
1
- import {a as a$6}from'./chunk-AQTRFPF2.mjs';import {a as a$e}from'./chunk-MURSKAKT.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-5GW36EQJ.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-3IPRT57V.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-QUWRO3HT.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-YAI33K42.mjs';import {a as a$d}from'./chunk-4QGZDJW4.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {a as a$j}from'./chunk-5W6G3ZUT.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
1
+ import {a as a$6}from'./chunk-ZE2B6BS7.mjs';import {a as a$e}from'./chunk-PSAOTHYG.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-5GW36EQJ.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-3IPRT57V.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-QUWRO3HT.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-SOWGXN5P.mjs';import {a as a$d}from'./chunk-Z73YU5ZQ.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {a as a$j}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -0,0 +1,10 @@
1
+ import {a as a$m}from'./chunk-WDWBYTJG.mjs';import {a as a$a}from'./chunk-I7SMG6PT.mjs';import {a as a$3}from'./chunk-SVV6DLJH.mjs';import {a as a$c,b as b$4}from'./chunk-KQOXSF4J.mjs';import {b as b$6,c as c$4}from'./chunk-MHAPHPNN.mjs';import {a as a$2}from'./chunk-KT4FTBJ2.mjs';import {a as a$7,b as b$3,g,d,e as e$1,f,h as h$2}from'./chunk-6DYTFYPO.mjs';import {a as a$g}from'./chunk-TAT552A5.mjs';import {b as b$1}from'./chunk-XAM3AXXK.mjs';import {i,l,p,j,n,k,h as h$1,d as d$1,g as g$1,a as a$i}from'./chunk-6Z3GYFG5.mjs';import {a as a$n}from'./chunk-LDWNE2JT.mjs';import {a as a$o}from'./chunk-6GV3YWV7.mjs';import {c as c$3,b as b$8}from'./chunk-IDIZSV2Y.mjs';import {a as a$k}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-2OXYNLVN.mjs';import {a as a$6}from'./chunk-GMALMQWI.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$7}from'./chunk-KG2EHFYA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$b}from'./chunk-K5RYVERS.mjs';import {a as a$d}from'./chunk-NQIZ3U7Q.mjs';import {e,c,h,b as b$2,a as a$e}from'./chunk-RINS2TBF.mjs';import {k as k$1,l as l$1}from'./chunk-TZGK36KC.mjs';import {a as a$j}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$4}from'./chunk-STMDFIUL.mjs';import {a as a$9}from'./chunk-B3EZOXNU.mjs';import {a as a$8}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$5}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$f}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import _t,{createContext,forwardRef,useRef,useEffect,useContext,useState,useMemo,useCallback,isValidElement}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightIcon}from'@baseline-ui/icons/8';import {DragIndicatorIcon}from'@baseline-ui/icons/12';import {themeVars,sprinkles}from'@baseline-ui/tokens';/**
2
+ * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
+ *
4
+ * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
+ * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
+ * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
+ * This notice may not be removed from this file.
8
+ *
9
+ */
10
+ function De(r,o,e){let{gridProps:t}=b$6(r,o,e);return t.role="treegrid",{gridProps:t}}var xt={"ar-AE":{collapse:"\u0637\u064A",expand:"\u062A\u0645\u062F\u064A\u062F"},"bg-BG":{collapse:"\u0421\u0432\u0438\u0432\u0430\u043D\u0435",expand:"\u0420\u0430\u0437\u0448\u0438\u0440\u044F\u0432\u0430\u043D\u0435"},"cs-CZ":{collapse:"Sbalit",expand:"Rozt\xE1hnout"},"da-DK":{collapse:"Skjul",expand:"Udvid"},"de-DE":{collapse:"Reduzieren",expand:"Erweitern"},"el-GR":{collapse:"\u03A3\u03CD\u03BC\u03C0\u03C4\u03C5\u03BE\u03B7",expand:"\u0391\u03BD\u03AC\u03C0\u03C4\u03C5\u03BE\u03B7"},"en-US":{expand:"Expand",collapse:"Collapse"},"es-ES":{collapse:"Contraer",expand:"Expandir"},"et-EE":{collapse:"Ahenda",expand:"Laienda"},"fi-FI":{collapse:"Pienenn\xE4",expand:"Laajenna"},"fr-FR":{collapse:"R\xE9duire",expand:"D\xE9velopper"},"he-IL":{collapse:"\u05DB\u05D5\u05D5\u05E5",expand:"\u05D4\u05E8\u05D7\u05D1"},"hr-HR":{collapse:"Sa\u017Emi",expand:"Pro\u0161iri"},"hu-HU":{collapse:"\xD6sszecsuk\xE1s",expand:"Kibont\xE1s"},"it-IT":{collapse:"Comprimi",expand:"Espandi"},"ja-JP":{collapse:"\u6298\u308A\u305F\u305F\u3080",expand:"\u5C55\u958B"},"ko-KR":{collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},"lt-LT":{collapse:"Sutraukti",expand:"I\u0161skleisti"},"lv-LV":{collapse:"Sak\u013Caut",expand:"Izv\u0113rst"},"nb-NO":{collapse:"Skjul",expand:"Utvid"},"nl-NL":{collapse:"Samenvouwen",expand:"Uitvouwen"},"pl-PL":{collapse:"Zwi\u0144",expand:"Rozwi\u0144"},"pt-BR":{collapse:"Recolher",expand:"Expandir"},"pt-PT":{collapse:"Colapsar",expand:"Expandir"},"ro-RO":{collapse:"Restr\xE2nge\u021Bi",expand:"Extinde\u021Bi"},"ru-RU":{collapse:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C"},"sk-SK":{collapse:"Zbali\u0165",expand:"Rozbali\u0165"},"sl-SI":{collapse:"Strni",expand:"Raz\u0161iri"},"sr-SP":{collapse:" Skupi",expand:"Pro\u0161iri"},"sv-SE":{collapse:"D\xF6lj",expand:"Expandera"},"tr-TR":{collapse:"Daralt",expand:"Geni\u015Flet"},"uk-UA":{collapse:"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438",expand:"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438"},"zh-CN":{collapse:"\u6298\u53E0",expand:"\u6269\u5C55"},"zh-TW":{collapse:"\u6536\u5408",expand:"\u5C55\u958B"}};function ce(r,o,e){let{node:t}=r,n=c$4(r,o,e),a=n.rowProps["aria-expanded"]===true,s=b$7(xt,"@react-aria/tree"),c=a$j({"aria-label":a?s.format("collapse"):s.format("expand"),"aria-labelledby":n.rowProps.id}),p={onPress:()=>{n.isDisabled||(o.toggleKey(t.key),o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(t.key));},excludeFromTabOrder:true,preventFocusOnPress:true,"data-react-aria-prevent-focus":true,...c};return {...n,expandButtonProps:p}}var he=class r extends g$1{expandedKeys=new Set;withExpandedKeys(o,e){let t=this.clone();return t.expandedKeys=e,r.cloneAncestorSections(e,o,t),r.cloneAncestorSections(o,e,t),t.frozen=this.frozen,t}static cloneAncestorSections(o,e,t){for(let n of o)if(!e.has(n)){let a=n;for(;a!=null;){let s=t.getItem(a);if(s?.type==="section"){t.keyMap.set(a,s.clone());break}else a=s?.parentKey??null;}}}*[Symbol.iterator](){let o=this.getFirstKey(),e=o!=null?this.getItem(o):null;for(;e;)if(yield e,e.type==="section")e=e.nextKey!=null?this.getItem(e.nextKey):null;else {let t=this.getKeyAfter(e.key);e=t!=null?this.getItem(t):null;}}getLastKey(){let o=this.lastKey;if(o==null)return null;let e=this.getItem(o);for(;e?.lastChildKey!=null&&(e.type!=="item"||this.expandedKeys.has(e.key));)e=this.getItem(e.lastChildKey);return e?.key}getKeyAfter(o){let e=this.getItem(o);if(!e)return null;if((this.expandedKeys.has(e.key)||e.type!=="item")&&e.firstChildKey!=null)return e.firstChildKey;for(;e;){if(e.nextKey!=null)return e.nextKey;if(e.parentKey!=null)e=this.getItem(e.parentKey);else return null}return null}getKeyBefore(o){let e=this.getItem(o);if(!e)return null;if(e.prevKey!=null){for(e=this.getItem(e.prevKey);e&&(e.type!=="item"||this.expandedKeys.has(e.key))&&e.lastChildKey!=null;)e=this.getItem(e.lastChildKey);return e?.key??null}return e.parentKey}getChildren(o){let e=this;return {*[Symbol.iterator](){let t=e.getItem(o),n=t?.firstChildKey!=null?e.getItem(t.firstChildKey):null;if(t&&t.type==="section"&&n)for(;n&&n.key!==t.nextKey;){yield e.getItem(n.key);let a=e.getKeyAfter(n.key);n=a!=null?e.getItem(a):null;}else for(;n;)yield n,n=n.nextKey!=null?e.getItem(n.nextKey):null;}}}getTextValue(o){let e=this.getItem(o);return e?e.textValue:""}},ht=createContext(null),ye=createContext(null),we=forwardRef(function(o,e$1){return [o,e$1]=e(o,e$1,ht),jsx(i,{content:jsx(l,{...o}),createCollection:()=>new he,children:t=>jsx(Bt,{props:o,collection:t,treeRef:e$1})})}),bt={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Bt({props:r,collection:o,treeRef:e}){let{dragAndDropHooks:t}=r,{direction:n}=b(),a$8=a({usage:"search",sensitivity:"base"}),s=!!t?.useDraggableCollectionState,c$2=!!t?.useDroppableCollectionState,p$1=useRef(s),D=useRef(c$2);useEffect(()=>{p$1.current!==s&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),D.current!==c$2&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");},[s,c$2]);let{selectionMode:g$1="none",expandedKeys:S,defaultExpandedKeys:m,onExpandedChange:h$1,disabledBehavior:x="all"}=r,{CollectionRoot:P,isVirtualized:I,layoutDelegate:b$4,dropTargetDelegate:k}=useContext(p),[T,L]=a$1(S?new Set(S):void 0,m?new Set(m):new Set,h$1),[C,N]=useState(o),[E,v]=useState(T),[K,M]=useState(()=>o.withExpandedKeys(E,T));(!Wt(E,T)||o!==C)&&(M(o.withExpandedKeys(E,T)),N(o),v(T));let l=a$2({...r,selectionMode:g$1,expandedKeys:T,onExpandedChange:L,collection:K,children:void 0,disabledBehavior:x}),{gridProps:i}=De({...r,isVirtualized:I,layoutDelegate:b$4},l,e),y,u,f,A=false,j=null,_=useRef(null);if(s&&t){y=t.useDraggableCollectionState({collection:l.collection,selectionManager:l.selectionManager,preview:t.renderDragPreview?_:void 0}),t.useDraggableCollection({},y,e);let re=t.DragPreview;j=t.renderDragPreview?jsx(re,{ref:_,children:t.renderDragPreview}):null;}let[J]=useState(()=>new a$3);if(c$2&&t){u=t.useDroppableCollectionState({collection:l.collection,selectionManager:l.selectionManager});let re=t.dropTargetDelegate||k||new t.ListDropTargetDelegate(l.collection,e,{direction:n});J.setup(re,l,n);let ge=new b$1({collection:l.collection,collator:a$8,ref:e,disabledKeys:l.selectionManager.disabledKeys,disabledBehavior:l.selectionManager.disabledBehavior,direction:n,layoutDelegate:b$4});f=t.useDroppableCollection({keyboardDelegate:ge,dropTargetDelegate:J,onDropActivate:B=>{if(B.target.type==="item"){let w=B.target.key,$=l.collection.getItem(w),Ot=T.has(w);$&&$.hasChildNodes&&(!Ot||t?.isVirtualDragging?.())&&l.toggleKey(w);}},onKeyDown:B=>{let w=u?.target;if(w&&w.type==="item"&&w.dropPosition==="on"){let $=l.collection.getItem(w.key);(B.key===bt.expand[n]&&$?.hasChildNodes&&!l.expandedKeys.has(w.key)||B.key===bt.collapse[n]&&$?.hasChildNodes&&l.expandedKeys.has(w.key))&&l.toggleKey(w.key);}}},u,e),A=u.isDropTarget({type:"root"});}let ee=!!(s&&!y?.isDisabled),{focusProps:te,isFocused:U,isFocusVisible:X}=a$4(),V={isEmpty:l.collection.size===0,isFocused:U,isFocusVisible:X,isDropTarget:A,selectionMode:l.selectionManager.selectionMode,allowsDragging:!!ee,state:l},Ht=c({...r,children:void 0,defaultClassName:"react-aria-Tree",values:V}),Ke=null;if(l.collection.size===0&&r.renderEmptyState){let{isEmpty:re,...ge}=V,B=r.renderEmptyState({...ge});Ke=jsx("div",{role:"row",style:{display:"contents"},...{"aria-level":1},children:jsx("div",{role:"gridcell",style:{display:"contents"},children:B})});}let Nt=a$5(r,{global:true});return jsxs(Fragment,{children:[jsx(a$6,{children:jsxs(h.div,{...c$1(Nt,Ht,i,te,f?.collectionProps),ref:e,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,"data-focused":U||void 0,"data-drop-target":A||void 0,"data-focus-visible":X||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode,"data-allows-dragging":!!ee||void 0,children:[jsxs(b$2,{values:[[ye,l],[a$7,{dragAndDropHooks:t,dragState:y,dropState:u}],[b$3,{render:Ft}]],children:[c$2&&jsx(Ut,{}),jsx(g,{children:jsx(P,{collection:l.collection,persistedKeys:e$1(l.selectionManager,t,u),scrollRef:e,renderDropIndicator:d(t,u)})})]}),Ke]})}),j]})}var Pe=class extends a$i{static type="content"},Re=j(Pe,function(o){let e=useContext(Pt),t=c({children:o.children,values:e});return jsx(p.Provider,{value:n,children:t.children})}),Pt=createContext(null),Ie=class extends a$i{static type="item"},Se=k(Ie,(r,o,e)=>{let t=useContext(ye);o=a$8(o);let{dragAndDropHooks:n,dragState:a,dropState:s}=useContext(a$7),c$3=a&&!(a.isDisabled||a.selectionManager.isDisabled(e.key)),{rowProps:p,gridCellProps:D,expandButtonProps:g,descriptionProps:S,...m}=ce({node:e,shouldSelectOnPressUp:!!a,focusMode:r.focusMode,allowsArrowNavigation:r.allowsArrowNavigation},t,o),h$3=p["aria-expanded"]===true,x=r.hasChildItems||[...t.collection.getChildren(e.key)].length>1,P=p["aria-level"]||1,{hoverProps:I,isHovered:b}=a$9({isDisabled:!m.allowsSelection&&!m.hasAction&&!c$3,onHoverStart:r.onHoverStart,onHoverChange:r.onHoverChange,onHoverEnd:r.onHoverEnd}),{isFocusVisible:k,focusProps:T}=a$4(),{isFocusVisible:L,focusProps:C}=a$4({within:true}),{checkboxProps:N}=a$a({key:e.key},t),E=null;a&&n&&(E=n.useDraggableItem({key:e.key,hasDragButton:true},a,o));let v=null,K=useRef(null),M=useRef(null),l=useRef(null),{visuallyHiddenProps:i}=a$b();s&&n&&(v=n.useDropIndicator({target:{type:"item",key:e.key,dropPosition:"on"},activateButtonRef:l},s,M));let y=a&&a.isDragging(e.key),u=v?.isDropTarget,f$1=t.selectionManager.selectionMode,A=t.selectionManager.selectionBehavior,j=_t.useMemo(()=>({...m,isHovered:b,isFocusVisible:k,isExpanded:h$3,hasChildItems:x,level:P,selectionMode:f$1,selectionBehavior:A,isFocusVisibleWithin:L,state:t,id:e.key,allowsDragging:!!a,isDragging:y,isDropTarget:u}),[m,b,k,h$3,x,P,L,t,e.key,a,y,u,A,f$1]),_=c({...r,id:void 0,children:e.rendered,defaultClassName:"react-aria-TreeItem",defaultStyle:{"--tree-item-level":P},values:j});useEffect(()=>{!e.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.");},[e.textValue]),useEffect(()=>{x&&!K.current&&process.env.NODE_ENV!=="production"&&console.warn("Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.");},[]);let J=useRef(null);useEffect(()=>{a&&!J.current&&process.env.NODE_ENV!=="production"&&console.warn('Draggable items in a Tree must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');},[]);let ee=h$1({items:t.collection.getChildren(e.key),children:V=>{switch(V.type){case "content":return V.render(V);case "loader":case "item":return jsx(Fragment,{});default:throw new Error("Unsupported element type in TreeRow: "+V.type)}}}),te=c$2(),U=a$5(r,{global:true});delete U.id,delete U.onClick;let X=f(E,n,o);return jsxs(Fragment,{children:[v&&!v.isHidden&&jsx("div",{role:"row","aria-level":p["aria-level"],"aria-expanded":p["aria-expanded"],"aria-label":v.dropIndicatorProps["aria-label"],children:jsxs("div",{role:"gridcell","aria-colindex":1,style:{display:"contents"},children:[jsx("div",{role:"button",...i,...v.dropIndicatorProps,ref:M}),p["aria-expanded"]!=null?jsx("div",{role:"button",...i,id:te,"aria-label":g["aria-label"],"aria-labelledby":`${te} ${p.id}`,tabIndex:-1,ref:l}):null]})}),jsx(h.div,{...c$1(U,p,T,I,C,X.itemProps),..._,ref:o,"data-expanded":x&&h$3||void 0,"data-has-child-items":x||void 0,"data-level":P,"data-selected":m.isSelected||void 0,"data-disabled":m.isDisabled||void 0,"data-hovered":b||void 0,"data-focused":m.isFocused||void 0,"data-focus-visible":k||void 0,"data-pressed":m.isPressed||void 0,"data-selection-mode":t.selectionManager.selectionMode==="none"?void 0:t.selectionManager.selectionMode,"data-allows-dragging":!!a||void 0,"data-dragging":y||void 0,"data-drop-target":u||void 0,children:jsx("div",{...D,style:{display:"contents"},children:jsx(b$2,{values:[[a$c,{slots:{[a$e]:{},selection:N}}],[b$4,{slots:{[a$e]:{},selection:N}}],[a$d,{slots:{[a$e]:{},chevron:{...g,ref:K},drag:{...X.dragButtonProps,ref:J}}}],[Pt,{...j}],[h$2,{isSelected:m.isSelected}]],children:ee})})})]})});j(d$1,function(o,e,t){let{isVirtualized:n}=useContext(p),a=useContext(ye),{isLoading:s,onLoadMore:c$2,scrollOffset:p$1,...D}=o,g=useRef(null),S=useMemo(()=>({onLoadMore:c$2,collection:a?.collection,sentinelRef:g,scrollOffset:p$1}),[c$2,p$1,a?.collection]);k$1(S,g),e=a$8(e);let{rowProps:m,gridCellProps:h$1}=ce({node:t},a,e),x=m["aria-level"]||1,P={role:"row","aria-level":m["aria-level"]},I=c({...D,id:void 0,children:t.rendered,defaultClassName:"react-aria-TreeLoader",values:{level:x}}),b={};return n&&(b={display:"contents"}),jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:l$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:g,style:{position:"absolute",height:1,width:1}})}),s&&I.children&&jsx(h.div,{ref:e,...c$1(a$5(o),P),...I,"data-level":x,children:jsx("div",{...h$1,style:b,children:I.children})})]})});function Ft(r,o){o=a$8(o);let{dragAndDropHooks:e,dropState:t}=useContext(a$7),n=useRef(null),{dropIndicatorProps:a,isHidden:s,isDropTarget:c}=e.useDropIndicator(r,t,n);if(s)return null;let p=t&&r.target.type==="item"?(t.collection.getItem(r.target.key)?.level||0)+1:1;return jsx(jt,{...r,dropIndicatorProps:a,isDropTarget:c,ref:o,buttonRef:n,level:p})}function Gt(r,o){let{dropIndicatorProps:e,isDropTarget:t,buttonRef:n,level:a,...s}=r,{visuallyHiddenProps:c$1}=a$b(),p=c({...s,defaultClassName:"react-aria-DropIndicator",defaultStyle:{position:"relative","--tree-item-level":a},values:{isDropTarget:t}});return jsx(h.div,{...p,role:"row","aria-level":a,ref:o,"data-drop-target":t||void 0,children:jsxs("div",{role:"gridcell",children:[jsx("div",{...c$1,role:"button",...e,ref:n}),p.children]})})}var jt=forwardRef(Gt);function Ut(){let{dragAndDropHooks:r,dropState:o}=useContext(a$7),e=useRef(null),{dropIndicatorProps:t}=r.useDropIndicator({target:{type:"root"}},o,e),n=o.isDropTarget({type:"root"}),{visuallyHiddenProps:a}=a$b();return !n&&t["aria-hidden"]?null:jsx("div",{role:"row","aria-hidden":t["aria-hidden"],style:{position:"absolute"},children:jsx("div",{role:"gridcell",children:jsx("div",{role:"button",...a,...t,ref:e})})})}function Wt(r,o){if(r.size!==o.size)return false;for(let e of r)if(!o.has(e))return false;return true}var It=({actionsPosition:r,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:t,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:p,onRename:D,renameLabel:g,renderItemTitle:S,renderItem:m})=>Object.values({actionsPosition:r,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:t,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:p,onRename:D,renameLabel:g,renderItemTitle:S,renderItem:m});var Ct="_10dw1p98",wt="_10dw1p96",Rt=["_10dw1p9b","_10dw1p9c"],St="_10dw1p97",Et=a$f({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isSelected:{true:"_1yep5z612u"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isDropTarget:{true:"_1yep5z612t _1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isSelected:false,isRenaming:false},"_1yep5z61pc _1yep5z61rl _1yep5z61va _1yep5z61v9 _1yep5z61vd"]]}),Lt="_10dw1p99";function Kt(r,o){let e=r;if(typeof r=="function"&&!r.prototype?.isReactComponent){let t=r(o);e=isValidElement(t)?r:t;}if(e)return "unselected"in e?e.unselected:e}var Le=({item:r,id:o,value:e,...t})=>{let{onPrimaryAction:n,onSecondaryAction:a,actionsPosition:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:g,expandLabel:S,collapseLabel:m,onRename:h,renameLabel:x,renderItemTitle:P,renderItem:I}=t,{formatMessage:b}=b$8(),{renamingKey:k,setRenamingKey:T}=useContext(Me),L=k===r.id,C=!!r.children?.length,N=r.icon,E=!!h,v=useRef(false),K=useMemo(()=>{let i=Kt(c,r.id),y=Kt(p,r.id),u=typeof D=="function"?D(r.id):D,f=typeof g=="function"?g(r.id):g;return i||y?jsxs(a$k,{display:"flex",flexDirection:"row",style:s==="end"?{marginInlineStart:"auto"}:void 0,children:[i?jsx(a$l,{icon:i,"aria-label":u,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{n?.(r.id);},tooltip:true}):null,y?jsx(a$l,{icon:y,"aria-label":f,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{a?.(r.id);},tooltip:true}):null]}):null},[s,c,r.id,p,D,g,n,a]),M=useCallback(i=>{a$m(i)||(i.key==="Enter"?(v.current=true,h?.({key:r.id,value:i.target.value}),T(null)):i.key==="Escape"&&(v.current=true,T(null)));},[r.id,h,T]),l$1=useCallback(()=>P?P(r):r.label,[P,r]);return jsxs(Se,{id:r.id,value:r,textValue:r.label,"data-key":r.id,className:I?a$h(wt,"BaselineUI-TreeView-Row"):i=>a$h(St,Et({isHovered:i.isHovered,isSelected:i.isSelected,isFocusVisible:i.isFocusVisible,isRenaming:L,isDropTarget:i.isDropTarget}),"BaselineUI-TreeView-Row"),children:[jsx(Re,{children:i=>{let y=i.allowsDragging?jsx(a$l,{slot:"drag",icon:DragIndicatorIcon,size:"xs",variant:"secondary",className:"BaselineUI-TreeView-DragHandle","data-testid":"tree-view-drag-handle"}):null;if(I){let f=I(r,{level:i.level,isExpanded:i.isExpanded,hasChildItems:i.hasChildItems,isSelected:i.isSelected,isFocusVisible:i.isFocusVisible,isFocusVisibleWithin:i.isFocusVisibleWithin,isHovered:i.isHovered,isPressed:i.isPressed,isDropTarget:!!i.isDropTarget,isDragging:!!i.isDragging,toggleExpanded:()=>{i.state.toggleKey(i.id);}});return y?jsxs(a$k,{display:"flex",flexDirection:"row",alignItems:"center",children:[y,jsx("div",{style:{flex:1,minWidth:0},children:f})]}):f}let u=i.level-1;return jsxs(Fragment,{children:[y,s==="start"?K:null,jsxs(a$k,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(a$k,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${u*2} * ${themeVars.spacing.lg})`},children:[jsx(a$l,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{i.state.toggleKey(i.id);},"aria-label":i.isExpanded?m??b(Ee.collapse):S??b(Ee.expand),style:{visibility:C?"visible":"hidden"},className:a$h(Ct,"BaselineUI-TreeView-ExpansionToggle")}),N?jsx(N,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(a$k,{paddingLeft:"sm",paddingY:L?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:f=>{E&&(f.stopPropagation(),f.preventDefault(),T(r.id));},children:[L?jsx("div",{onClick:f=>{f.stopPropagation();},children:jsx(a$n,{defaultValue:r.label,autoFocus:true,onFocus:()=>{v.current=false;},onBlur:f=>{if(v.current){v.current=false;return}h?.({key:r.id,value:f.target.value}),T(null);},"aria-label":x??b(Ee.rename),onKeyDown:M,className:"BaselineUI-TreeView-RenameInput"})}):jsx(a$o,{type:"label",size:"sm",className:a$h(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:l$1()}),r.description?jsx(a$o,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.description}):null]})]}),s==="end"?K:null]})}}),jsx(l,{items:r.children,children:i=>jsx(Le,{item:i,...t})})]})},Ee=c$3({expand:{id:"bui.treeView.expand",defaultMessage:"Expand"},collapse:{id:"bui.treeView.collapse",defaultMessage:"Collapse"},rename:{id:"bui.treeView.rename",defaultMessage:"Rename"}});var Me=createContext({renamingKey:null,setRenamingKey:()=>{}}),At=_t.forwardRef(({className:r,style:o,"data-block-id":e,"data-block-class":t,items:n,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:g,actionsPosition:S="start",expandLabel:m,collapseLabel:h,onRename:x,renameLabel:P,onAction:I,renderItemTitle:b,dragAndDropHooks:k,keyboardNavigationBehavior:T,renderItem:L,...C},N)=>{let E=useRef(null);a$g({ref:E,isDisabled:!k});let[v,K]=useState(null),M=L!==void 0,l=S==="start"?[c,p].filter(Boolean).length:0;useEffect(()=>{let u=E.current;if(!u||!x||M)return;let f=A=>{if(A.key==="F2"){let _=u.querySelector("[data-focused='true']")?.dataset.key;_&&(A.preventDefault(),A.stopPropagation(),K(_));}};return u.addEventListener("keydown",f),()=>{u.removeEventListener("keydown",f);}},[x,M]);let i=useMemo(()=>({renamingKey:v,setRenamingKey:K}),[v]),y={actionsPosition:S,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:g,expandLabel:m,collapseLabel:h,onRename:x,renameLabel:P,renderItemTitle:b,renderItem:L};return jsx(Me.Provider,{value:i,children:jsx(we,{ref:b$5(N,E),items:n.children||[],selectionMode:"multiple",expandedKeys:C.expandedKeys,defaultExpandedKeys:C.defaultExpandedKeys,onExpandedChange:C.onExpandedChange,selectedKeys:C.selectedKeys,disallowEmptySelection:C.disallowEmptySelection,onAction:I,dragAndDropHooks:k,keyboardNavigationBehavior:T,"aria-label":C["aria-label"],"aria-labelledby":C["aria-labelledby"],"data-block-id":e,"data-block-class":t,style:o,className:a$h(r,!M&&Lt,!M&&Rt[l-1],"BaselineUI-TreeView"),dependencies:It(y),children:u=>jsx(Le,{item:u,...y})})})});At.displayName="TreeView";export{At as a};