@baseline-ui/core 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.css +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.css +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.css +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/Code.mjs +1 -1
- package/dist/ColorInput.css +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.css +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.css +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.css +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FreehandCanvas.css +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/ImageDropZone.css +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.css +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +1 -1
- package/dist/Kbd.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Markdown.mjs +1 -1
- package/dist/Menu.css +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.css +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/StatusCard.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.css +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.css +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/{chunk-4NYPVKDO.mjs → chunk-2HMLSXNO.mjs} +1 -1
- package/dist/chunk-2NO2ITVE.mjs +10 -0
- package/dist/chunk-3BL5D3CA.mjs +10 -0
- package/dist/chunk-3JL2TJZL.mjs +10 -0
- package/dist/chunk-3L7GTQXK.mjs +10 -0
- package/dist/{chunk-42B24XCP.mjs → chunk-47I3USMC.mjs} +1 -1
- package/dist/chunk-4DTPDMSQ.mjs +10 -0
- package/dist/{chunk-WDJ4GXWF.mjs → chunk-4I4TIV2G.mjs} +1 -1
- package/dist/chunk-4MRHG5IU.mjs +10 -0
- package/dist/{chunk-JBMVWRHN.mjs → chunk-4SBMUWOY.mjs} +2 -2
- package/dist/{chunk-HFVJXZBG.mjs → chunk-4TAUFBXO.mjs} +2 -2
- package/dist/{chunk-LQMY6TXS.mjs → chunk-55YEATL7.mjs} +1 -1
- package/dist/{chunk-75722G3R.mjs → chunk-5TDFLLMX.mjs} +2 -2
- package/dist/{chunk-KG5PDPBK.mjs → chunk-6DGD7BZA.mjs} +1 -1
- package/dist/{chunk-ECPG4S5O.mjs → chunk-6DU65N7Q.mjs} +1 -1
- package/dist/{chunk-LLVFPC5Q.mjs → chunk-6Y6BYHT4.mjs} +1 -1
- package/dist/chunk-7OCDKTTZ.mjs +10 -0
- package/dist/{chunk-X3NOIEDZ.mjs → chunk-7VHON5HL.mjs} +1 -1
- package/dist/{chunk-EV24JU64.mjs → chunk-AL3FICFA.mjs} +2 -2
- package/dist/{chunk-GZ5ZWXIC.mjs → chunk-BZTAFNPW.mjs} +1 -1
- package/dist/{chunk-P5GO3XIS.mjs → chunk-C3W4WN2O.mjs} +1 -1
- package/dist/chunk-DAN5WASP.mjs +10 -0
- package/dist/{chunk-Y45SV547.mjs → chunk-DSSMBDVA.mjs} +1 -1
- package/dist/chunk-EADUR7IC.mjs +10 -0
- package/dist/chunk-F2O4AP7P.mjs +10 -0
- package/dist/chunk-G3K2DXNP.mjs +10 -0
- package/dist/{chunk-L452ID76.mjs → chunk-GLT45FXJ.mjs} +1 -1
- package/dist/{chunk-7HZ5JFYX.mjs → chunk-GS4C6CYA.mjs} +2 -2
- package/dist/{chunk-WOVAT6U4.mjs → chunk-H2E7GKGB.mjs} +1 -1
- package/dist/{chunk-7GJMJTRL.mjs → chunk-H4ZIN7W3.mjs} +1 -1
- package/dist/{chunk-XVBOKL6D.mjs → chunk-HDVWQ6RL.mjs} +1 -1
- package/dist/{chunk-NCADIC3I.mjs → chunk-IE3E4KQ6.mjs} +1 -1
- package/dist/{chunk-5ODZPQL2.mjs → chunk-J7RVOP5G.mjs} +1 -1
- package/dist/{chunk-77BAFSDX.mjs → chunk-JF4BWG7T.mjs} +2 -2
- package/dist/chunk-K6MB234H.mjs +10 -0
- package/dist/{chunk-DRIHXAP3.mjs → chunk-KAVZW4RV.mjs} +2 -2
- package/dist/{chunk-TDOAVBKD.mjs → chunk-KLNQ24LT.mjs} +2 -2
- package/dist/{chunk-RJWPSJX2.mjs → chunk-LRZ6BQFQ.mjs} +1 -1
- package/dist/{chunk-WXWGGDTG.mjs → chunk-LTIDSWDM.mjs} +2 -2
- package/dist/{chunk-VXB5SVQC.mjs → chunk-MAJ74VNE.mjs} +1 -1
- package/dist/{chunk-5PIO6M4F.mjs → chunk-MFNWPTNI.mjs} +2 -2
- package/dist/{chunk-DF3BVX5Z.mjs → chunk-MNAD5FJH.mjs} +1 -1
- package/dist/chunk-N53SGN23.mjs +10 -0
- package/dist/{chunk-5ULL6IBX.mjs → chunk-NVS22MIQ.mjs} +1 -1
- package/dist/{chunk-4FTKS25Q.mjs → chunk-ODDEW5IV.mjs} +2 -2
- package/dist/{chunk-N4UAXVES.mjs → chunk-OFWPRDTC.mjs} +2 -2
- package/dist/{chunk-YT36W3OS.mjs → chunk-OHZK2ZDA.mjs} +2 -2
- package/dist/{chunk-26T2EPFD.mjs → chunk-PDWICYVZ.mjs} +2 -2
- package/dist/{chunk-3CWP2VCB.mjs → chunk-PFKPY3N7.mjs} +1 -1
- package/dist/{chunk-5DOFIGHJ.mjs → chunk-Q4BSQC65.mjs} +2 -2
- package/dist/{chunk-RF4E6MLM.mjs → chunk-QKKV24WQ.mjs} +1 -1
- package/dist/chunk-QQGK5M66.mjs +10 -0
- package/dist/chunk-RBZ7SIZR.mjs +10 -0
- package/dist/{chunk-HLDCVJXD.mjs → chunk-RILRXWGE.mjs} +1 -1
- package/dist/{chunk-J7EAQSKX.mjs → chunk-RM2Y4D2M.mjs} +1 -1
- package/dist/{chunk-T3AMYEKR.mjs → chunk-RRB5F4E4.mjs} +2 -2
- package/dist/{chunk-PJM4COF5.mjs → chunk-RWHDD6Z7.mjs} +2 -2
- package/dist/{chunk-2JANDORZ.mjs → chunk-RZEGMPV2.mjs} +1 -1
- package/dist/chunk-SNQDFFKP.mjs +10 -0
- package/dist/chunk-T2XIDX6U.mjs +10 -0
- package/dist/{chunk-BW4VAHXR.mjs → chunk-TBDKTTIY.mjs} +2 -2
- package/dist/chunk-TDPODC62.mjs +10 -0
- package/dist/{chunk-WSCZ34XO.mjs → chunk-TNU3YDGL.mjs} +2 -2
- package/dist/chunk-TPNZG6FA.mjs +10 -0
- package/dist/{chunk-JB3O4ABN.mjs → chunk-TVENHRYC.mjs} +1 -1
- package/dist/chunk-UCQJ6FJO.mjs +10 -0
- package/dist/{chunk-F6JQN7YM.mjs → chunk-ULCYKB34.mjs} +1 -1
- package/dist/{chunk-DXP33KAB.mjs → chunk-UOMNE4F4.mjs} +2 -2
- package/dist/{chunk-NPJX2CEI.mjs → chunk-VDSLDZLT.mjs} +1 -1
- package/dist/{chunk-XJGQXVMR.mjs → chunk-VJ3SWDRJ.mjs} +2 -2
- package/dist/chunk-W3ZGXUFP.mjs +10 -0
- package/dist/{chunk-VHDXSFQC.mjs → chunk-WA35CT3D.mjs} +1 -1
- package/dist/chunk-WICBTAMY.mjs +10 -0
- package/dist/chunk-WN6FAICZ.mjs +10 -0
- package/dist/{chunk-PBFIKNYZ.mjs → chunk-WRQ4FPJE.mjs} +1 -1
- package/dist/{chunk-CSPZMYVG.mjs → chunk-XCL4K4MY.mjs} +1 -1
- package/dist/{chunk-IDEAEEBP.mjs → chunk-XIXHGXIN.mjs} +2 -2
- package/dist/{chunk-U2ODAIZG.mjs → chunk-XZSDCUID.mjs} +1 -1
- package/dist/{chunk-5YYWD7PK.mjs → chunk-ZAMDRHQY.mjs} +1 -1
- package/dist/{chunk-K3S22PMF.mjs → chunk-ZFLLIBX5.mjs} +2 -2
- package/dist/{chunk-LLAMYDGW.mjs → chunk-ZP4YB5RP.mjs} +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -13
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-2WAKHFPS.mjs +0 -10
- package/dist/chunk-3NQY5GPQ.mjs +0 -10
- package/dist/chunk-44OUOGJ4.mjs +0 -10
- package/dist/chunk-4N6CLPAY.mjs +0 -10
- package/dist/chunk-AMQX3KZR.mjs +0 -10
- package/dist/chunk-BKDQLDOK.mjs +0 -10
- package/dist/chunk-BXSJTXXY.mjs +0 -10
- package/dist/chunk-CIIO5D3X.mjs +0 -10
- package/dist/chunk-E6VOSF6Z.mjs +0 -10
- package/dist/chunk-ELXWR5TS.mjs +0 -10
- package/dist/chunk-FJ2JRD3H.mjs +0 -10
- package/dist/chunk-HWUESZY2.mjs +0 -10
- package/dist/chunk-I4WMXV4T.mjs +0 -10
- package/dist/chunk-IW4GXU75.mjs +0 -10
- package/dist/chunk-J3MJZQUJ.mjs +0 -10
- package/dist/chunk-J6TYT6BF.mjs +0 -10
- package/dist/chunk-K4N7GVEI.mjs +0 -10
- package/dist/chunk-NHD7I3X2.mjs +0 -10
- package/dist/chunk-QY3O34WX.mjs +0 -10
- package/dist/chunk-ROHLZINC.mjs +0 -10
- package/dist/chunk-UVVONIZB.mjs +0 -10
- package/dist/chunk-WC2NUASA.mjs +0 -10
- package/dist/chunk-ZREX7XOO.mjs +0 -10
- /package/dist/{chunk-EZXMEGV7.mjs → chunk-G6VX4SU6.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$8}from'./chunk-
|
|
1
|
+
import {a as a$8}from'./chunk-7OCDKTTZ.mjs';import {a as a$4}from'./chunk-FOEGHU3P.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {c}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {a as a$7}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$9}from'./chunk-KEVERVHK.mjs';import {a as a$6,c as c$2,e}from'./chunk-JDLUGVXG.mjs';import {g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import z,{useRef,useCallback,useEffect,useMemo,useState}from'react';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';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 {a as a$8}from'./chunk-CIIO5D3X.mjs';import {a as a$4}from'./chunk-FOEGHU
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function w(t){let e=useCallback(o=>t.subscribe(o),[t]),n=useCallback(()=>t.visibleToasts,[t]);return {visibleToasts:useSyncExternalStore(e,n,n),add:(o,i)=>t.add(o,i),close:o=>t.close(o),pauseAll:()=>t.pauseAll(),resumeAll:()=>t.resumeAll()}}var E=class{queue=[];subscriptions=new Set;maxVisibleToasts;wrapUpdate;visibleToasts=[];constructor(e){this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate;}runWithWrapUpdate(e,n){this.wrapUpdate?this.wrapUpdate(e,n):e();}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,n={}){let r="_"+Math.random().toString(36).slice(2),o={...n,content:e,key:r,timer:n.timeout?new R(()=>this.close(r),n.timeout):void 0};return this.queue.unshift(o),this.updateVisibleToasts("add"),r}close(e){let n=this.queue.findIndex(r=>r.key===e);n>=0&&(this.queue[n].onClose?.(),this.queue.splice(n,1)),this.updateVisibleToasts("remove");}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let n of this.subscriptions)n();},e);}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause();}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume();}clear(){this.queue=[],this.updateVisibleToasts("clear");}},R=class{timerId;startTime=null;remaining;callback;constructor(e,n){this.remaining=n,this.callback=e;}reset(e){this.remaining=e,this.resume();}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime);}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback();},this.remaining));}};var x={"ar-AE":{close:"\u0625\u063A\u0644\u0627\u0642",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631`,other:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631\u0627\u062A`})}.`},"bg-BG":{close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u0435`,other:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044F`})}.`},"cs-CZ":{close:"Zav\u0159\xEDt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1men\xED`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"da-DK":{close:"Luk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} besked`,other:()=>`${e.number(t.count)} beskeder`})}.`},"de-DE":{close:"Schlie\xDFen",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} Benachrichtigung`,other:()=>`${e.number(t.count)} Benachrichtigungen`})}.`},"el-GR":{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7`,other:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2`})}.`},"en-US":{close:"Close",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"es-ES":{close:"Cerrar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificaci\xF3n`,other:()=>`${e.number(t.count)} notificaciones`})}.`},"et-EE":{close:"Sule",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} teatis`,other:()=>`${e.number(t.count)} teatist`})}.`},"fi-FI":{close:"Sulje",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ilmoitus`,other:()=>`${e.number(t.count)} ilmoitusta`})}.`},"fr-FR":{close:"Fermer",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"he-IL":{close:"\u05E1\u05D2\u05D5\u05E8",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D4`,other:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D5\u05EA`})}.`},"hr-HR":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obavijest`,other:()=>`${e.number(t.count)} obavijesti`})}.`},"hu-HU":{close:"Bez\xE1r\xE1s",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`,other:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`})}.`},"it-IT":{close:"Chiudi",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica`,other:()=>`${e.number(t.count)} notifiche`})}.`},"ja-JP":{close:"\u9589\u3058\u308B",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`})}\u3002`},"ko-KR":{close:"\uB2EB\uAE30",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`,other:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`})}.`},"lt-LT":{close:"U\u017Edaryti",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} prane\u0161imas`,other:()=>`${e.number(t.count)} prane\u0161imai`})}.`},"lv-LV":{close:"Aizv\u0113rt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} pazi\u0146ojums`,other:()=>`${e.number(t.count)} pazi\u0146ojumi`})}.`},"nb-NO":{close:"Lukk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} varsling`,other:()=>`${e.number(t.count)} varsler`})}.`},"nl-NL":{close:"Sluiten",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} melding`,other:()=>`${e.number(t.count)} meldingen`})}.`},"pl-PL":{close:"Zamknij",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} powiadomienie`,few:()=>`${e.number(t.count)} powiadomienia`,many:()=>`${e.number(t.count)} powiadomie\u0144`,other:()=>`${e.number(t.count)} powiadomienia`})}.`},"pt-BR":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"pt-PT":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"ro-RO":{close:"\xCEnchide\u0163i",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificare`,other:()=>`${e.number(t.count)} notific\u0103ri`})}.`},"ru-RU":{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,other:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F`})}.`},"sk-SK":{close:"Zatvori\u0165",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1menie`,few:()=>`${e.number(t.count)} ozn\xE1menia`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"sl-SI":{close:"Zapri",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obvestilo`,two:()=>`${e.number(t.count)} obvestili`,few:()=>`${e.number(t.count)} obvestila`,other:()=>`${e.number(t.count)} obvestil`})}.`},"sr-SP":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obave\u0161tenje`,other:()=>`${e.number(t.count)} obave\u0161tenja`})}.`},"sv-SE":{close:"St\xE4ng",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} meddelande`,other:()=>`${e.number(t.count)} meddelanden`})}.`},"tr-TR":{close:"Kapat",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} bildirim`,other:()=>`${e.number(t.count)} bildirim`})}.`},"uk-UA":{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`,other:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`})}.`},"zh-CN":{close:"\u5173\u95ED",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`,other:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`})}\u3002`},"zh-TW":{close:"\u95DC\u9589",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u901A\u77E5`})}\u3002`}};function C(t,e$1,n){let{key:r,timer:o,timeout:i}=t.toast;useEffect(()=>{if(!(o==null||i==null))return o.reset(i),()=>{o.pause();}},[o,i]);let a=c$2(),s=e(),d=b(x,"@react-aria/toast"),[u,c]=useState(false);return a$6(()=>{c(true);},[]),{toastProps:{...a$9(t,{labelable:true}),role:"alertdialog","aria-modal":"false","aria-labelledby":t["aria-labelledby"]||a,"aria-describedby":t["aria-describedby"]||s,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":u?void 0:"true"},titleProps:{id:a},descriptionProps:{id:s},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>e$1.close(r)}}}var q=1,S=Symbol.for("react-aria-landmark-manager");function ce(t){return document.addEventListener("react-aria-landmark-manager-change",t),()=>document.removeEventListener("react-aria-landmark-manager-change",t)}function Z(){if(typeof document>"u")return null;let t=document[S];return t&&t.version>=q?t:(document[S]=new F,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[S])}function de(){return useSyncExternalStore(ce,Z,Z)}var F=class{landmarks=[];isListening=false;refCount=0;version=q;constructor(){this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this);}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:true}),document.addEventListener("focusin",this.focusinHandler,{capture:true}),document.addEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=true);}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:true}),document.removeEventListener("focusin",this.focusinHandler,{capture:true}),document.removeEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=false);}focusLandmark(e,n){this.landmarks.find(r=>r.ref.current===e)?.focus?.(n);}getLandmarksByRole(e){return new Set(this.landmarks.filter(n=>n.role===e))}getLandmarkByRole(e){return this.landmarks.find(n=>n.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(o=>o.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(o=>o.role==="main").length>1&&process.env.NODE_ENV!=="production"&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let o=Math.floor((n+r)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);!!(i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS)?n=o+1:r=o-1;}this.landmarks.splice(n,0,e),this.checkLabels(e.role);}updateLandmark(e){let n=this.landmarks.findIndex(r=>r.ref===e.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...e},this.checkLabels(this.landmarks[n].role));}removeLandmark(e){this.landmarks=this.landmarks.filter(n=>n.ref!==e),this.teardownIfNeeded();}checkLabels(e){let n=this.getLandmarksByRole(e);if(n.size>1){let r=[...n].filter(o=>!o.label);if(r.length>0&&process.env.NODE_ENV!=="production")console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(o=>o.ref.current));else if(process.env.NODE_ENV!=="production"){let o=[...n].map(a=>a.label);o.filter((a,s)=>o.indexOf(a)!==s).forEach(a=>{console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(s=>s.label===a).map(s=>s.ref.current));});}}}closestLandmark(e){let n=new Map(this.landmarks.map(o=>[o.ref.current,o])),r=e;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(e,{backward:n}){let r=this.closestLandmark(e),o=n?this.landmarks.length-1:0;r&&(o=this.landmarks.indexOf(r)+(n?-1:1));let i=()=>{if(o<0){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:true,cancelable:true})))return true;o=this.landmarks.length-1;}else if(o>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:true,cancelable:true})))return true;o=0;}return o<0||o>=this.landmarks.length};if(i())return;let a=o;for(;this.landmarks[o].ref.current?.closest("[aria-hidden=true]");){if(o+=n?-1:1,i())return;if(o===a)break}return this.landmarks[o]}f6Handler(e){e.key==="F6"&&(e.altKey?this.focusMain():this.navigate(g(e),e.shiftKey))&&(e.preventDefault(),e.stopPropagation());}focusMain(){let e=this.getLandmarkByRole("main");return e&&e.ref.current&&e.ref.current.isConnected?(this.focusLandmark(e.ref.current,"forward"),true):false}navigate(e,n){let r=this.getNextLandmark(e,{backward:n});if(!r)return false;if(r.lastFocused){let o=r.lastFocused;if(e$1(document.body,o))return o.focus(),true}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,n?"backward":"forward"),true):false}focusinHandler(e){let n=this.closestLandmark(g(e));n&&n.ref.current!==g(e)&&this.updateLandmark({ref:n.ref,lastFocused:g(e)});let r=e.relatedTarget;if(r){let o=this.closestLandmark(r);o&&o.ref.current===r&&o.blur();}}focusoutHandler(e){let n=g(e),r=e.relatedTarget;if(!r||r===document){let o=this.closestLandmark(n);o&&o.ref.current===n&&o.blur();}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(n,r){let o=r?.from||document.activeElement;return e.navigate(o,n==="backward")},focusNext(n){let r=n?.from||document.activeElement;return e.navigate(r,false)},focusPrevious(n){let r=n?.from||document.activeElement;return e.navigate(r,true)},focusMain(){return e.focusMain()},dispose(){e&&(e.refCount--,e.teardownIfNeeded(),e=null);}}}registerLandmark(e){return this.landmarks.find(n=>n.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}};function J(t,e){let{role:n,"aria-label":r,"aria-labelledby":o,focus:i}=t,a=de(),s=r||o,[d,u]=useState(false),c=useCallback(()=>{u(true);},[u]),f=useCallback(()=>{u(false);},[u]);return a$6(()=>{if(a)return a.registerLandmark({ref:e,label:s,role:n,focus:i||c,blur:f})},[a,s,e,n,i,c,f]),useEffect(()=>{d&&e.current?.focus();},[d,e]),{landmarkProps:{role:n,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":o}}}function _(t,e,n){let r=b(x,"@react-aria/toast"),{landmarkProps:o}=J({role:"region","aria-label":t["aria-label"]||r.format("notifications",{count:e.visibleToasts.length})},n),i=useRef(false),a=useRef(false),s=useCallback(()=>{i.current||a.current?e.pauseAll():e.resumeAll();},[e]),{hoverProps:d}=a$5({onHoverStart:()=>{i.current=true,s();},onHoverEnd:()=>{i.current=false,s();}}),u=useRef([]),c$2=useRef(e.visibleToasts),f=useRef(null);a$6(()=>{if(f.current===-1||e.visibleToasts.length===0||!n.current){u.current=[],c$2.current=e.visibleToasts;return}if(u.current=[...n.current.querySelectorAll('[role="alertdialog"]')],c$2.current.length===e.visibleToasts.length&&e.visibleToasts.every((l,p)=>l.key===c$2.current[p].key)){c$2.current=e.visibleToasts;return}let b=c$2.current.map((l,p)=>({...l,i:p,isRemoved:!e.visibleToasts.some(h=>l.key===h.key)})),y=b.findIndex(l=>l.i===f.current&&l.isRemoved);if(y>-1)if(c()==="pointer"&&m.current?.isConnected)a$7(m.current);else {let l=0,p,h;for(;l<=y;)b[l].isRemoved||(h=Math.max(0,l-1)),l++;for(;l<b.length;){if(!b[l].isRemoved){p=l-1;break}l++;}h===void 0&&p===void 0&&(h=0),h>=0&&h<u.current.length?a$7(u.current[h]):p>=0&&p<u.current.length&&a$7(u.current[p]);}c$2.current=e.visibleToasts;},[e.visibleToasts,n]);let m=useRef(null),{focusWithinProps:oe}=b$1({onFocusWithin:b=>{a.current=true,m.current=b.relatedTarget,s();},onBlurWithin:()=>{a.current=false,m.current=null,s();}});return useEffect(()=>{e.visibleToasts.length===0&&m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n,e.visibleToasts.length]),useEffect(()=>()=>{m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n]),{regionProps:c$1(o,d,oe,{tabIndex:-1,"data-react-aria-top-layer":true,onFocus:b=>{let y=g(b).closest('[role="alertdialog"]');f.current=u.current.findIndex(l=>l===y);},onBlur:()=>{f.current=-1;}})}}var Y=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6lz _1yep5z6m1",variantClassNames:{variant:{info:"_1yep5z6131",warning:"_1yep5z612x",error:"_1yep5z612p",success:"_1yep5z612t"}},defaultVariants:{},compoundVariants:[]}),ee="_1udvgpn5 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j4 _1yep5z6j5 _1yep5z6j6 _1yep5z69l _1yep5z69m _1yep5z69n";var fe=()=>{};function be({state:t,...e}){z.useRef(null);let {toastProps:r,contentProps:o,titleProps:i,descriptionProps:a,closeButtonProps:s}=C(e,t),d=useMemo(()=>({root:r,title:i,content:o,description:a,close:s}),[r,i,o,a,s]),{canClose:u=true,...c}=e.toast.content;return jsx(a$8,{elementProps:d,...c,className:a$2(Y({variant:c.variant||"info"}),c.className),onClose:u?fe:void 0})}var te=z.forwardRef(({state:t,style:e,className:n,...r},o)=>{let i=a$1(o),{regionProps:a}=_(r,t,i),s={zIndex:1,...e,...a.style};return jsx("div",{...a,ref:i,className:a$2(ee,n),style:s,children:t.visibleToasts.map(d=>jsx(be,{toast:d,state:t},d.key))})});te.displayName="ToastRegion";var ne=z.forwardRef(({toastQueue:t,portalContainer:e,...n},r)=>{let o=w(t),i=a$3(e);return o.visibleToasts.length>0?jsx(a$4,{portalContainer:i,ref:r,children:jsx(te,{state:o,...n})}):null});ne.displayName="GlobalToastRegion";export{E as a,ne as b};
|
|
10
|
+
function w(t){let e=useCallback(o=>t.subscribe(o),[t]),n=useCallback(()=>t.visibleToasts,[t]);return {visibleToasts:useSyncExternalStore(e,n,n),add:(o,i)=>t.add(o,i),close:o=>t.close(o),pauseAll:()=>t.pauseAll(),resumeAll:()=>t.resumeAll()}}var E=class{queue=[];subscriptions=new Set;maxVisibleToasts;wrapUpdate;visibleToasts=[];constructor(e){this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate;}runWithWrapUpdate(e,n){this.wrapUpdate?this.wrapUpdate(e,n):e();}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,n={}){let r="_"+Math.random().toString(36).slice(2),o={...n,content:e,key:r,timer:n.timeout?new R(()=>this.close(r),n.timeout):void 0};return this.queue.unshift(o),this.updateVisibleToasts("add"),r}close(e){let n=this.queue.findIndex(r=>r.key===e);n>=0&&(this.queue[n].onClose?.(),this.queue.splice(n,1)),this.updateVisibleToasts("remove");}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let n of this.subscriptions)n();},e);}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause();}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume();}clear(){this.queue=[],this.updateVisibleToasts("clear");}},R=class{timerId;startTime=null;remaining;callback;constructor(e,n){this.remaining=n,this.callback=e;}reset(e){this.remaining=e,this.resume();}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime);}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback();},this.remaining));}};var x={"ar-AE":{close:"\u0625\u063A\u0644\u0627\u0642",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631`,other:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631\u0627\u062A`})}.`},"bg-BG":{close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u0435`,other:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044F`})}.`},"cs-CZ":{close:"Zav\u0159\xEDt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1men\xED`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"da-DK":{close:"Luk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} besked`,other:()=>`${e.number(t.count)} beskeder`})}.`},"de-DE":{close:"Schlie\xDFen",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} Benachrichtigung`,other:()=>`${e.number(t.count)} Benachrichtigungen`})}.`},"el-GR":{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7`,other:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2`})}.`},"en-US":{close:"Close",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"es-ES":{close:"Cerrar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificaci\xF3n`,other:()=>`${e.number(t.count)} notificaciones`})}.`},"et-EE":{close:"Sule",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} teatis`,other:()=>`${e.number(t.count)} teatist`})}.`},"fi-FI":{close:"Sulje",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ilmoitus`,other:()=>`${e.number(t.count)} ilmoitusta`})}.`},"fr-FR":{close:"Fermer",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"he-IL":{close:"\u05E1\u05D2\u05D5\u05E8",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D4`,other:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D5\u05EA`})}.`},"hr-HR":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obavijest`,other:()=>`${e.number(t.count)} obavijesti`})}.`},"hu-HU":{close:"Bez\xE1r\xE1s",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`,other:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`})}.`},"it-IT":{close:"Chiudi",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica`,other:()=>`${e.number(t.count)} notifiche`})}.`},"ja-JP":{close:"\u9589\u3058\u308B",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`})}\u3002`},"ko-KR":{close:"\uB2EB\uAE30",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`,other:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`})}.`},"lt-LT":{close:"U\u017Edaryti",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} prane\u0161imas`,other:()=>`${e.number(t.count)} prane\u0161imai`})}.`},"lv-LV":{close:"Aizv\u0113rt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} pazi\u0146ojums`,other:()=>`${e.number(t.count)} pazi\u0146ojumi`})}.`},"nb-NO":{close:"Lukk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} varsling`,other:()=>`${e.number(t.count)} varsler`})}.`},"nl-NL":{close:"Sluiten",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} melding`,other:()=>`${e.number(t.count)} meldingen`})}.`},"pl-PL":{close:"Zamknij",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} powiadomienie`,few:()=>`${e.number(t.count)} powiadomienia`,many:()=>`${e.number(t.count)} powiadomie\u0144`,other:()=>`${e.number(t.count)} powiadomienia`})}.`},"pt-BR":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"pt-PT":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"ro-RO":{close:"\xCEnchide\u0163i",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificare`,other:()=>`${e.number(t.count)} notific\u0103ri`})}.`},"ru-RU":{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,other:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F`})}.`},"sk-SK":{close:"Zatvori\u0165",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1menie`,few:()=>`${e.number(t.count)} ozn\xE1menia`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"sl-SI":{close:"Zapri",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obvestilo`,two:()=>`${e.number(t.count)} obvestili`,few:()=>`${e.number(t.count)} obvestila`,other:()=>`${e.number(t.count)} obvestil`})}.`},"sr-SP":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obave\u0161tenje`,other:()=>`${e.number(t.count)} obave\u0161tenja`})}.`},"sv-SE":{close:"St\xE4ng",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} meddelande`,other:()=>`${e.number(t.count)} meddelanden`})}.`},"tr-TR":{close:"Kapat",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} bildirim`,other:()=>`${e.number(t.count)} bildirim`})}.`},"uk-UA":{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`,other:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`})}.`},"zh-CN":{close:"\u5173\u95ED",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`,other:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`})}\u3002`},"zh-TW":{close:"\u95DC\u9589",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u901A\u77E5`})}\u3002`}};function C(t,e$1,n){let{key:r,timer:o,timeout:i}=t.toast;useEffect(()=>{if(!(o==null||i==null))return o.reset(i),()=>{o.pause();}},[o,i]);let a=c$2(),s=e(),d=b(x,"@react-aria/toast"),[u,c]=useState(false);return a$6(()=>{c(true);},[]),{toastProps:{...a$9(t,{labelable:true}),role:"alertdialog","aria-modal":"false","aria-labelledby":t["aria-labelledby"]||a,"aria-describedby":t["aria-describedby"]||s,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":u?void 0:"true"},titleProps:{id:a},descriptionProps:{id:s},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>e$1.close(r)}}}var q=1,S=Symbol.for("react-aria-landmark-manager");function ce(t){return document.addEventListener("react-aria-landmark-manager-change",t),()=>document.removeEventListener("react-aria-landmark-manager-change",t)}function Z(){if(typeof document>"u")return null;let t=document[S];return t&&t.version>=q?t:(document[S]=new F,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[S])}function de(){return useSyncExternalStore(ce,Z,Z)}var F=class{landmarks=[];isListening=false;refCount=0;version=q;constructor(){this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this);}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:true}),document.addEventListener("focusin",this.focusinHandler,{capture:true}),document.addEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=true);}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:true}),document.removeEventListener("focusin",this.focusinHandler,{capture:true}),document.removeEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=false);}focusLandmark(e,n){this.landmarks.find(r=>r.ref.current===e)?.focus?.(n);}getLandmarksByRole(e){return new Set(this.landmarks.filter(n=>n.role===e))}getLandmarkByRole(e){return this.landmarks.find(n=>n.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(o=>o.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(o=>o.role==="main").length>1&&process.env.NODE_ENV!=="production"&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let o=Math.floor((n+r)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);!!(i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS)?n=o+1:r=o-1;}this.landmarks.splice(n,0,e),this.checkLabels(e.role);}updateLandmark(e){let n=this.landmarks.findIndex(r=>r.ref===e.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...e},this.checkLabels(this.landmarks[n].role));}removeLandmark(e){this.landmarks=this.landmarks.filter(n=>n.ref!==e),this.teardownIfNeeded();}checkLabels(e){let n=this.getLandmarksByRole(e);if(n.size>1){let r=[...n].filter(o=>!o.label);if(r.length>0&&process.env.NODE_ENV!=="production")console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(o=>o.ref.current));else if(process.env.NODE_ENV!=="production"){let o=[...n].map(a=>a.label);o.filter((a,s)=>o.indexOf(a)!==s).forEach(a=>{console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(s=>s.label===a).map(s=>s.ref.current));});}}}closestLandmark(e){let n=new Map(this.landmarks.map(o=>[o.ref.current,o])),r=e;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(e,{backward:n}){let r=this.closestLandmark(e),o=n?this.landmarks.length-1:0;r&&(o=this.landmarks.indexOf(r)+(n?-1:1));let i=()=>{if(o<0){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:true,cancelable:true})))return true;o=this.landmarks.length-1;}else if(o>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:true,cancelable:true})))return true;o=0;}return o<0||o>=this.landmarks.length};if(i())return;let a=o;for(;this.landmarks[o].ref.current?.closest("[aria-hidden=true]");){if(o+=n?-1:1,i())return;if(o===a)break}return this.landmarks[o]}f6Handler(e){e.key==="F6"&&(e.altKey?this.focusMain():this.navigate(g(e),e.shiftKey))&&(e.preventDefault(),e.stopPropagation());}focusMain(){let e=this.getLandmarkByRole("main");return e&&e.ref.current&&e.ref.current.isConnected?(this.focusLandmark(e.ref.current,"forward"),true):false}navigate(e,n){let r=this.getNextLandmark(e,{backward:n});if(!r)return false;if(r.lastFocused){let o=r.lastFocused;if(e$1(document.body,o))return o.focus(),true}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,n?"backward":"forward"),true):false}focusinHandler(e){let n=this.closestLandmark(g(e));n&&n.ref.current!==g(e)&&this.updateLandmark({ref:n.ref,lastFocused:g(e)});let r=e.relatedTarget;if(r){let o=this.closestLandmark(r);o&&o.ref.current===r&&o.blur();}}focusoutHandler(e){let n=g(e),r=e.relatedTarget;if(!r||r===document){let o=this.closestLandmark(n);o&&o.ref.current===n&&o.blur();}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(n,r){let o=r?.from||document.activeElement;return e.navigate(o,n==="backward")},focusNext(n){let r=n?.from||document.activeElement;return e.navigate(r,false)},focusPrevious(n){let r=n?.from||document.activeElement;return e.navigate(r,true)},focusMain(){return e.focusMain()},dispose(){e&&(e.refCount--,e.teardownIfNeeded(),e=null);}}}registerLandmark(e){return this.landmarks.find(n=>n.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}};function J(t,e){let{role:n,"aria-label":r,"aria-labelledby":o,focus:i}=t,a=de(),s=r||o,[d,u]=useState(false),c=useCallback(()=>{u(true);},[u]),f=useCallback(()=>{u(false);},[u]);return a$6(()=>{if(a)return a.registerLandmark({ref:e,label:s,role:n,focus:i||c,blur:f})},[a,s,e,n,i,c,f]),useEffect(()=>{d&&e.current?.focus();},[d,e]),{landmarkProps:{role:n,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":o}}}function _(t,e,n){let r=b(x,"@react-aria/toast"),{landmarkProps:o}=J({role:"region","aria-label":t["aria-label"]||r.format("notifications",{count:e.visibleToasts.length})},n),i=useRef(false),a=useRef(false),s=useCallback(()=>{i.current||a.current?e.pauseAll():e.resumeAll();},[e]),{hoverProps:d}=a$5({onHoverStart:()=>{i.current=true,s();},onHoverEnd:()=>{i.current=false,s();}}),u=useRef([]),c$2=useRef(e.visibleToasts),f=useRef(null);a$6(()=>{if(f.current===-1||e.visibleToasts.length===0||!n.current){u.current=[],c$2.current=e.visibleToasts;return}if(u.current=[...n.current.querySelectorAll('[role="alertdialog"]')],c$2.current.length===e.visibleToasts.length&&e.visibleToasts.every((l,p)=>l.key===c$2.current[p].key)){c$2.current=e.visibleToasts;return}let b=c$2.current.map((l,p)=>({...l,i:p,isRemoved:!e.visibleToasts.some(h=>l.key===h.key)})),y=b.findIndex(l=>l.i===f.current&&l.isRemoved);if(y>-1)if(c()==="pointer"&&m.current?.isConnected)a$7(m.current);else {let l=0,p,h;for(;l<=y;)b[l].isRemoved||(h=Math.max(0,l-1)),l++;for(;l<b.length;){if(!b[l].isRemoved){p=l-1;break}l++;}h===void 0&&p===void 0&&(h=0),h>=0&&h<u.current.length?a$7(u.current[h]):p>=0&&p<u.current.length&&a$7(u.current[p]);}c$2.current=e.visibleToasts;},[e.visibleToasts,n]);let m=useRef(null),{focusWithinProps:oe}=b$1({onFocusWithin:b=>{a.current=true,m.current=b.relatedTarget,s();},onBlurWithin:()=>{a.current=false,m.current=null,s();}});return useEffect(()=>{e.visibleToasts.length===0&&m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n,e.visibleToasts.length]),useEffect(()=>()=>{m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n]),{regionProps:c$1(o,d,oe,{tabIndex:-1,"data-react-aria-top-layer":true,onFocus:b=>{let y=g(b).closest('[role="alertdialog"]');f.current=u.current.findIndex(l=>l===y);},onBlur:()=>{f.current=-1;}})}}var Y=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6mf _1yep5z6mh",variantClassNames:{variant:{info:"_1yep5z613s",warning:"_1yep5z613n",error:"_1yep5z613d",success:"_1yep5z613i"}},defaultVariants:{},compoundVariants:[]}),ee="_1udvgpn5 _1yep5z6iz _1yep5z6j0 _1yep5z6j1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n";var fe=()=>{};function be({state:t,...e}){z.useRef(null);let {toastProps:r,contentProps:o,titleProps:i,descriptionProps:a,closeButtonProps:s}=C(e,t),d=useMemo(()=>({root:r,title:i,content:o,description:a,close:s}),[r,i,o,a,s]),{canClose:u=true,...c}=e.toast.content;return jsx(a$8,{elementProps:d,...c,className:a$2(Y({variant:c.variant||"info"}),c.className),onClose:u?fe:void 0})}var te=z.forwardRef(({state:t,style:e,className:n,...r},o)=>{let i=a$1(o),{regionProps:a}=_(r,t,i),s={zIndex:1,...e,...a.style};return jsx("div",{...a,ref:i,className:a$2(ee,n),style:s,children:t.visibleToasts.map(d=>jsx(be,{toast:d,state:t},d.key))})});te.displayName="ToastRegion";var ne=z.forwardRef(({toastQueue:t,portalContainer:e,...n},r)=>{let o=w(t),i=a$3(e);return o.visibleToasts.length>0?jsx(a$4,{portalContainer:i,ref:r,children:jsx(te,{state:o,...n})}):null});ne.displayName="GlobalToastRegion";export{E as a,ne as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-AMW7LGCF.mjs';import {c}from'./chunk-KKJ6XIU3.mjs';import {a as a$8}from'./chunk-EX2LI2CV.mjs';import {a as a$5}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-AMW7LGCF.mjs';import {c}from'./chunk-KKJ6XIU3.mjs';import {a as a$8}from'./chunk-EX2LI2CV.mjs';import {a as a$5}from'./chunk-TVENHRYC.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {e}from'./chunk-B7PSE5KC.mjs';import {a as a$7}from'./chunk-X3AXUU3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {c as c$1,a as a$9}from'./chunk-TZ4MVY4E.mjs';import {a as a$4}from'./chunk-KEVERVHK.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/12';import {XIcon as XIcon$1}from'@baseline-ui/icons/16';import {SearchIcon as SearchIcon$1}from'@baseline-ui/icons/20';import {SearchIcon}from'@baseline-ui/icons/24';import K 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
|
|
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-AMW7LGCF.mjs';import {c}from'./chunk-KKJ6XIU3.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var
|
|
10
|
+
var B={"ar-AE":{"Clear search":"\u0645\u0633\u062D \u0627\u0644\u0628\u062D\u062B"},"bg-BG":{"Clear search":"\u0418\u0437\u0447\u0438\u0441\u0442\u0432\u0430\u043D\u0435 \u043D\u0430 \u0442\u044A\u0440\u0441\u0435\u043D\u0435"},"cs-CZ":{"Clear search":"Vymazat hled\xE1n\xED"},"da-DK":{"Clear search":"Ryd s\xF8gning"},"de-DE":{"Clear search":"Suche zur\xFCcksetzen"},"el-GR":{"Clear search":"\u0391\u03C0\u03B1\u03BB\u03BF\u03B9\u03C6\u03AE \u03B1\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7\u03C2"},"en-US":{"Clear search":"Clear search"},"es-ES":{"Clear search":"Borrar b\xFAsqueda"},"et-EE":{"Clear search":"T\xFChjenda otsing"},"fi-FI":{"Clear search":"Tyhjenn\xE4 haku"},"fr-FR":{"Clear search":"Effacer la recherche"},"he-IL":{"Clear search":"\u05E0\u05E7\u05D4 \u05D7\u05D9\u05E4\u05D5\u05E9"},"hr-HR":{"Clear search":"Obri\u0161i pretragu"},"hu-HU":{"Clear search":"Keres\xE9s t\xF6rl\xE9se"},"it-IT":{"Clear search":"Cancella ricerca"},"ja-JP":{"Clear search":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2"},"ko-KR":{"Clear search":"\uAC80\uC0C9 \uC9C0\uC6B0\uAE30"},"lt-LT":{"Clear search":"I\u0161valyti ie\u0161k\u0105"},"lv-LV":{"Clear search":"Not\u012Br\u012Bt mekl\u0113\u0161anu"},"nb-NO":{"Clear search":"T\xF8m s\xF8k"},"nl-NL":{"Clear search":"Zoekactie wissen"},"pl-PL":{"Clear search":"Wyczy\u015B\u0107 zawarto\u015B\u0107 wyszukiwania"},"pt-BR":{"Clear search":"Limpar pesquisa"},"pt-PT":{"Clear search":"Limpar pesquisa"},"ro-RO":{"Clear search":"\u015Eterge\u0163i c\u0103utarea"},"ru-RU":{"Clear search":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u0438\u0441\u043A"},"sk-SK":{"Clear search":"Vymaza\u0165 vyh\u013Ead\xE1vanie"},"sl-SI":{"Clear search":"Po\u010Disti iskanje"},"sr-SP":{"Clear search":"Obri\u0161i pretragu"},"sv-SE":{"Clear search":"Rensa s\xF6kning"},"tr-TR":{"Clear search":"Aramay\u0131 temizle"},"uk-UA":{"Clear search":"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u043F\u043E\u0448\u0443\u043A"},"zh-CN":{"Clear search":"\u6E05\u9664\u641C\u7D22"},"zh-TW":{"Clear search":"\u6E05\u9664\u641C\u5C0B\u689D\u4EF6"}};function S(r,e,t){let d=b$1(B,"@react-aria/searchfield"),{isDisabled:l,isReadOnly:s,onSubmit:i,onClear:a,type:h="search"}=r,n=o=>{let u=o.key;u==="Enter"&&(l||s)&&o.preventDefault(),!(l||s)&&(u==="Enter"&&i&&(o.preventDefault(),i(e.value)),u==="Escape"&&(e.value===""&&(!t.current||t.current.value==="")?o.continuePropagation():(o.preventDefault(),e.setValue(""),a&&a())));},p=()=>{e.setValue(""),a&&a();},m=()=>{t.current?.focus();},{labelProps:c,inputProps:f,descriptionProps:_,errorMessageProps:y,...z}=a$8({...r,value:e.value,onChange:e.setValue,onKeyDown:s?r.onKeyDown:a$9(n,r.onKeyDown),type:h},t);return {labelProps:c,inputProps:{...f,defaultValue:void 0},clearButtonProps:{"aria-label":d.format("Clear search"),excludeFromTabOrder:true,preventFocusOnPress:true,isDisabled:l||s,onPress:p,onPressStart:m},descriptionProps:_,errorMessageProps:y,...z}}function b(r){let[e,t]=a$7(E(r.value),E(r.defaultValue)||"",r.onChange);return {value:e,setValue:t}}function E(r){if(r!=null)return r.toString()}var H="_19n40yy9 _1yep5z6me _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z6ey",O=a({defaultClassName:"_19n40yy0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6g9 _1yep5z6mh _1yep5z6mf _1yep5z6hs _1yep5z6f9 _1yep5z6m3 _1yep5z6e6",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3 _1yep5z610m"},variant:{primary:"_1yep5z613z",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_1yep5z6os _1yep5z6ot _1yep5z6ou"},isDisabled:{true:"_19n40yy8 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]});var W={sm:SearchIcon$1,md:SearchIcon,lg:SearchIcon},U=K.forwardRef(({className:r,size:e$1="md",variant:t="primary","data-block-id":d,"data-block-class":l,style:s,isClearFocusable:i=false,...a},h)=>{let n=K.useRef(null);[a,n]=e(a,n,c);let p=b(a),{inputProps:m,clearButtonProps:c$2}=S({...a$1(a),"aria-haspopup":false,"aria-autocomplete":"none",type:"search"},p,n),{focusProps:f,isFocusVisible:_,isFocused:y}=a$2({within:true,isTextInput:true}),z=W[e$1],o=e$1==="sm"?XIcon:XIcon$1,u=a$3({"data-block-id":d,"data-block-class":l,"data-focused":y,"data-disabled":a.isDisabled,"data-focus-visible":_}),P=a$4(a,{global:true});return delete P.id,jsxs("div",{...P,...u,className:a$6(O({size:e$1,isFocused:y,variant:t,hasText:!!p.value,isDisabled:a.isDisabled}),"BaselineUI-SearchInput",r),style:s,ref:h,children:[jsx(z,{size:e$1==="sm"?20:24}),jsx("input",{...c$1(m,f),className:H,ref:n}),p.value!==""&&jsx(a$5,{icon:o,...c$2,size:e$1==="sm"?"xs":"sm",variant:"secondary",isExcludedFromRovingFocus:!i,excludeFromTabOrder:!i,...i?{onPressStart:x=>{c$2.onPressStart?.(x),c$2.onPress?.(x);}}:{}})]})});U.displayName="SearchInput";export{U as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$b}from'./chunk-5HXTXIE5.mjs';import {a as a$3}from'./chunk-MI7DCFP2.mjs';import {d,a as a$a,c as c$2,b as b$3}from'./chunk-
|
|
1
|
+
import {a as a$b}from'./chunk-5HXTXIE5.mjs';import {a as a$3}from'./chunk-MI7DCFP2.mjs';import {d,a as a$a,c as c$2,b as b$3}from'./chunk-F2O4AP7P.mjs';import {a as a$9}from'./chunk-2NO2ITVE.mjs';import {a as a$6}from'./chunk-SNQDFFKP.mjs';import {a}from'./chunk-CGFLGZL4.mjs';import {b,c as c$3}from'./chunk-GX2IOGYR.mjs';import {b as b$2}from'./chunk-WN6FAICZ.mjs';import {a as a$7}from'./chunk-TVENHRYC.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-2VY4FAOY.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-BGMVPFYK.mjs';import {a as a$2}from'./chunk-3FYY26ED.mjs';import {c as c$1,b as b$4}from'./chunk-TZ4MVY4E.mjs';import {c}from'./chunk-JDLUGVXG.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {UndoIcon,RedoIcon}from'@baseline-ui/icons/16';import {getStroke}from'perfect-freehand';import h,{useState,useCallback,useEffect,useMemo,useRef}from'react';import {jsxs,jsx,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$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as f$2,e as e$1,x,d,q,a as a$i}from'./chunk-SMAYNDQQ.mjs';import {a as a$f}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$6}from'./chunk-KKJ6XIU3.mjs';import {c as c$8}from'./chunk-
|
|
1
|
+
import {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as f$2,e as e$1,x,d,q,a as a$i}from'./chunk-SMAYNDQQ.mjs';import {a as a$f}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$6}from'./chunk-KKJ6XIU3.mjs';import {c as c$8}from'./chunk-RBZ7SIZR.mjs';import {c as c$2,f as f$1,e as e$2,d as d$2}from'./chunk-O66FNQSB.mjs';import {a as a$g}from'./chunk-AZRPXTYJ.mjs';import {a as a$l}from'./chunk-J7K7I5U2.mjs';import {b as b$3}from'./chunk-246VHB32.mjs';import {d as d$3}from'./chunk-OC42IZG2.mjs';import {b,c as c$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c,f as f$3}from'./chunk-DECHIERQ.mjs';import {f as f$4}from'./chunk-AKES5B6C.mjs';import {a as a$8,b as b$7}from'./chunk-AC7OXVHA.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {b as b$a}from'./chunk-WWSGOGLA.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$9}from'./chunk-WL27JGVG.mjs';import {a as a$r}from'./chunk-BU5H25MV.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {c as c$9}from'./chunk-RCBUNCHV.mjs';import {a as a$q}from'./chunk-UUBOEBYZ.mjs';import {e,h,c as c$3,b as b$4,f,a as a$9,d as d$1}from'./chunk-B7PSE5KC.mjs';import {a as a$m}from'./chunk-4PYEGHW5.mjs';import {a as a$h}from'./chunk-66CUIXA6.mjs';import {b as b$5,c as c$5,a as a$o}from'./chunk-PF3OQKXP.mjs';import {a as a$k}from'./chunk-RXSYDMT6.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$6}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-YB3KW7JC.mjs';import {b as b$6,d as d$5,f as f$6}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {d as d$4}from'./chunk-AQYBKDT2.mjs';import {a as a$4}from'./chunk-RT4LMB6X.mjs';import {n,q as q$1,a as a$n,t,r as r$1}from'./chunk-MRJFGHFW.mjs';import {c as c$4}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c as c$7,a as a$j,e as e$4}from'./chunk-JDLUGVXG.mjs';import {e as e$3,g,i as i$1,f as f$5,b as b$8,a as a$p}from'./chunk-AUOQSTS5.mjs';import {a as a$a}from'./chunk-FXCHST4Z.mjs';import {a as a$e}from'./chunk-4QEH5CGK.mjs';import be,{createContext,forwardRef,useContext,useMemo,useRef,useEffect,useCallback,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightFilledIcon}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/24';/**
|
|
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 {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var ge=createContext({}),ze=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,ge),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var _e=createContext({});var lt=createContext(null),le=createContext(null),st=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,lt);let o=useContext(le);return o?jsx(Lr,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(uo,{props:e$1,listBoxRef:t,collection:n})})});function uo({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Lr,{state:n,props:r,listBoxRef:e})}function Lr({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:p$1,selectionManager:m$1}=s$1,u$1=!!o?.useDraggableCollectionState,c=!!o?.useDroppableCollectionState,{direction:f}=b$2(),{disabledBehavior:a$4,disabledKeys:x}=m$1,g=a({usage:"search",sensitivity:"base"}),{isVirtualized:R,layoutDelegate:M,dropTargetDelegate:D,CollectionRoot:v$1}=useContext(p),L=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:p$1,collator:g,ref:t,disabledKeys:x,disabledBehavior:a$4,layout:n,orientation:i,direction:f,layoutDelegate:M}),[p$1,g,t,a$4,x,i,f,e$1.keyboardDelegate,n,M]),{listBoxProps:O}=c$2({...e$1,shouldSelectOnPressUp:u$1||e$1.shouldSelectOnPressUp,keyboardDelegate:L,isVirtualized:R},s$1,t),k=useRef(u$1),d=useRef(c);useEffect(()=>{process.env.NODE_ENV!=="production"&&(k.current!==u$1&&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&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[u$1,c]);let S,E,w$1,y=false,b=null,h$1=useRef(null);if(u$1&&o){S=o.useDraggableCollectionState({collection:p$1,selectionManager:m$1,preview:o.renderDragPreview?h$1:void 0}),o.useDraggableCollection({},S,t);let Y=o.DragPreview;b=o.renderDragPreview?jsx(Y,{ref:h$1,children:o.renderDragPreview}):null;}if(c&&o){E=o.useDroppableCollectionState({collection:p$1,selectionManager:m$1});let Y=o.dropTargetDelegate||D||new o.ListDropTargetDelegate(p$1,t,{orientation:i,layout:n,direction:f});w$1=o.useDroppableCollection({keyboardDelegate:L,dropTargetDelegate:Y},E,t),y=E.isDropTarget({type:"root"});}let{focusProps:z,isFocused:j,isFocusVisible:_}=a$1(),H=s$1.collection.size===0,W={isDropTarget:y,isEmpty:H,isFocused:j,isFocusVisible:_,layout:e$1.layout||"stack",orientation:i,state:s$1},se=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:W}),te=null;H&&e$1.renderEmptyState&&(te=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(W)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,se,O,z,w$1?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":y||void 0,"data-empty":H||void 0,"data-focused":j||void 0,"data-focus-visible":_||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[lt,e$1],[le,s$1],[r,{dragAndDropHooks:o,dragState:S,dropState:E}],[_e,{elementType:"div"}],[s,{render:co}],[m,{name:"ListBoxSection",render:Er}]],children:jsx(w,{children:jsx(v$1,{collection:p$1,scrollRef:t,persistedKeys:v(m$1,o,E),renderDropIndicator:u(o,E)})})}),te,b]})})}function Er(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(le),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[p$1,m]=f(),{headingProps:u$1,groupProps:c}=f$1({heading:m,"aria-label":r$1["aria-label"]??void 0}),f$2=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),a=a$2(r$1,{global:true});return delete a.id,jsx(h.section,{...c$4(a,f$2,c),ref:e,children:jsx(ge.Provider,{value:{...u$1,ref:p$1},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var at=k(f$2,Er),ut=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(le),{dragAndDropHooks:l,dragState:s,dropState:p}=useContext(r),m=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:u,labelProps:c,descriptionProps:f,...a}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:!a.allowsSelection&&!a.hasAction&&!m,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:R}=a$6(e),{focusProps:M}=a$7(e),D=null;s&&l&&(D=l.useDraggableItem({key:o.key,hasAction:a.hasAction},s,n));let v=null;p&&l&&(v=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},p,n));let L=s&&s.isDragging(o.key),O=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...a,isHovered:g,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:L,isDropTarget:v?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let k=e.href?h.a:h.div,d=a$2(e,{global:true});return delete d.id,delete d.onClick,e.href&&u.tabIndex==null&&(u.tabIndex=-1),jsx(k,{...c$4(d,O,u,x$1,R,M,D?.dragProps,v?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":a.isSelected||void 0,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-dragging":L||void 0,"data-drop-target":v?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:c,label:c,description:f}}],[x,{isSelected:a.isSelected}]],children:O.children})})});function co(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(mo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var mo=forwardRef(po);j(d,function(e,t,o){let n=useContext(le),{isLoading:i,onLoadMore:l,scrollOffset:s,...p}=e,m=useRef(null),u=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:m,scrollOffset:s}),[l,s,n?.collection]);b$5(u,m);let c=c$3({...p,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),f={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:c$5(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:m,style:{position:"absolute",height:1,width:1}})}),i&&c.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),f),...c,role:"option",ref:t,children:c.children})})]})});var Ve=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var gi=a$a({defaultClassName:"_1fjxa6ld _1yep5z6ls _1yep5z6lr _1yep5z6ic _1yep5z6la",variantClassNames:{isDropTarget:{true:"_1yep5z6140"},orientation:{vertical:"_1yep5z617q",horizontal:"_1yep5z617r"}},defaultVariants:{},compoundVariants:[]}),Ar="_1fjxa6la _1yep5z6lq _1yep5z6is _1yep5z6it _1yep5z6iu",Ir=a$a({defaultClassName:"_1fjxa6lb _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),kr=a$a({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6j1 _1yep5z6j2 _1yep5z6j3 _1yep5z6jj _1yep5z6jk _1yep5z6jl _1yep5z6kj _1yep5z6kk _1yep5z6kl _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6la _1yep5z6ld _1yep5z6lq _1yep5z6lp _1yep5z6ln _1yep5z6lk",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z6140 _1yep5z617w _1yep5z617u _1yep5z617x _1yep5z614g _1yep5z614h _1yep5z614i"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z6125",false:"_1yep5z6124"},isDisabled:{true:"z9nup82 _1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z6jj _1yep5z6jk _1yep5z6jl",Fr="_1fjxa6l1",Br="_1fjxa6l2",Hr="_1fjxa6l0";var Nr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function dt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$7(),{triggerProps:s,overlayProps:p}=a$q({type:o},e,t),m=a=>{if(!n&&!(i==="longPress"&&!a.altKey)&&t&&t.current)switch(a.key){case "Enter":case " ":if(i==="longPress"||a.isDefaultPrevented())return;case "ArrowDown":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("first");break;case "ArrowUp":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("last");break;default:"continuePropagation"in a&&a.continuePropagation();}},u=b$9(Nr,"@react-aria/menu"),{longPressProps:c}=a$r({isDisabled:n||i!=="longPress",accessibilityDescription:u.format("longPressMessage"),onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),f={preventFocusOnPress:true,onPressStart(a){a.pointerType!=="touch"&&a.pointerType!=="keyboard"&&!n&&(a$n(a.target),e.open(a.pointerType==="virtual"?"first":null));},onPress(a){a.pointerType==="touch"&&!n&&(a$n(a.target),e.toggle());}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:c,id:l,onKeyDown:m},menuProps:{...p,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var je=new WeakMap;function ct(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:p}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...p,onKeyDown:m=>{(m.key!=="Escape"||r.shouldUseVirtualFocus)&&p.onKeyDown?.(m);}})}}function pt(r,e,t){let{id:o,key:n$1,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":p,onPressStart:m,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:a,onClick:x,onHoverStart:g$1,onHoverChange:R,onHoverEnd:M,onKeyDown:D,onKeyUp:v,onFocus:L,onFocusChange:O,onBlur:k,selectionManager:d=e.selectionManager}=r,S=!!p,E=S&&r["aria-expanded"]==="true",w=r.isDisabled??d.isDisabled(n$1),y=r.isSelected??d.isSelected(n$1),b=je.get(e),h=e.collection.getItem(n$1),z=r.onClose||b.onClose,j=n(),_=()=>{if(!S&&(h?.props?.onAction?h.props.onAction():r.onAction&&r.onAction(n$1),b.onAction)){let P=b.onAction;P(n$1,h?.value);}},H="menuitem";S||(d.selectionMode==="single"?H="menuitemradio":d.selectionMode==="multiple"&&(H="menuitemcheckbox"));let W=e$4(),se=e$4(),te=e$4(),J={id:o,"aria-disabled":w||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":W,"aria-describedby":[r["aria-describedby"],se,te].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":p,"aria-expanded":r["aria-expanded"]};if(d.selectionMode!=="none"&&!S&&(J["aria-checked"]=y),s){let P=Number(h?.index);J["aria-posinset"]=Number.isNaN(P)?void 0:P+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),he=P=>{f?.(P),Y.current=P;},Z=useRef(null),T=P=>{P.pointerType!=="keyboard"&&(Z.current={pointerType:P.pointerType}),P.pointerType==="mouse"&&(Y.current||P.target.click()),u?.(P);},ue=P=>{x?.(P),_(),r$1(P,j,h.props.href,h?.props.routerOptions);let Je=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||d.selectionMode==="none"||d.isLink(n$1):d.selectionMode!=="multiple"||d.isLink(n$1);Je=l??i??Je,z&&!S&&Je&&z(),Z.current=null;},{itemProps:re,isFocused:At}=d$3({id:o,selectionManager:d,key:n$1,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:b.shouldUseVirtualFocus}),{pressProps:eo,isPressed:to}=d$4({onPressStart:m,onPress:c,onPressUp:T,onPressChange:he,onPressEnd:a,isDisabled:w}),{hoverProps:ro}=a$5({isDisabled:w,onHoverStart(P){!b$6()&&!(E&&p)&&(d.setFocused(true),d.setFocusedKey(n$1)),g$1?.(P);},onHoverChange:R,onHoverEnd:M}),{keyboardProps:oo}=a$6({onKeyDown:P=>{if(P.repeat){P.continuePropagation();return}switch(P.key){case " ":Z.current={pointerType:"keyboard",key:" "},g(P).click(),d$5("keyboard");break;case "Enter":Z.current={pointerType:"keyboard",key:"Enter"},g(P).tagName!=="A"&&g(P).click(),d$5("keyboard");break;default:S||P.continuePropagation(),D?.(P);break}},onKeyUp:v}),{focusableProps:no}=d$6({onBlur:k,onFocus:L,onFocusChange:O},t),It=a$2(h?.props);delete It.id;let io=q$1(h?.props);return {menuItemProps:{...J,...c$4(It,io,S?{onFocus:re.onFocus,"data-collection":re["data-collection"],"data-key":re["data-key"]}:re,eo,ro,oo,no,b.shouldUseVirtualFocus||S?{onMouseDown:P=>P.preventDefault()}:void 0,w?void 0:{onClick:ue}),tabIndex:re.tabIndex!=null&&E&&!b.shouldUseVirtualFocus?-1:re.tabIndex},labelProps:{id:W},descriptionProps:{id:se},keyboardShortcutProps:{id:te},isFocused:At,isFocusVisible:At&&d.isFocused&&b$6()&&!E,isSelected:y,isPressed:to,isDisabled:w}}function mt(r){let{heading:e,"aria-label":t}=r,o=e$4([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ue=2,Po=50,bo=1e3,_r=Math.PI/12;function Kr(r){let{menuRef:e,submenuRef:t$1,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),p=useRef(void 0),m=useRef(void 0),u=useRef(void 0),c=useRef(2),[f,a]=useState(false);a$o({ref:o?t$1:void 0,onResize:()=>{t$1.current&&(l.current=t$1.current.getBoundingClientRect(),u.current=void 0);}});let g=()=>{a(false),c.current=Ue,i.current=void 0;},R=f$6(),M=t(D=>{f&&D.preventDefault();});useEffect(()=>{f&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,f]),a$j(()=>{let D=t$1.current,v=e.current;if(n||!D||!o||R!=="pointer"||!v){g();return}l.current=D.getBoundingClientRect();let L=k=>{if(k.pointerType==="touch"||k.pointerType==="pen")return;let d=Date.now();if(d-s.current<Po)return;clearTimeout(p.current),clearTimeout(m.current);let{clientX:S,clientY:E}=k;if(!i.current){i.current={x:S,y:E};return}if(!l.current)return;if(u.current||(u.current=S>l.current.right?"left":"right"),S<v.getBoundingClientRect().left||S>v.getBoundingClientRect().right||E<v.getBoundingClientRect().top||E>v.getBoundingClientRect().bottom){g();return}let w=i.current.x,y=i.current.y,b=u.current==="right"?l.current.left-w:w-l.current.right,h=Math.atan2(y-l.current.top,b)+_r,z=Math.atan2(y-l.current.bottom,b)-_r,j=Math.atan2(y-E,u.current==="left"?-(S-w):S-w),_=j<h&&j>z;c.current=_?Math.min(c.current+1,Ue):Math.max(c.current-1,0),c.current>=Ue?a(true):a(false),s.current=d,i.current={x:S,y:E},_&&(p.current=setTimeout(()=>{g(),m.current=setTimeout(()=>{let H=a$p(v).elementFromPoint(S,E);H&&e$3(v,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},bo));},O=b$8(v);return O.addEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.addEventListener("pointerdown",M,true),()=>{O.removeEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.removeEventListener("pointerdown",M,true),clearTimeout(p.current),clearTimeout(m.current),c.current=Ue;}},[n,o,e,R,a,t$1]);}function gt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:p}=r,m=c$7(),u=c$7(),{direction:c}=b$2(),f=useRef(void 0),a=useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=void 0);},[f]),x=useCallback(d=>{a(),e.open(d);},[e,a]),g$1=useCallback(()=>{a(),e.close();},[e,a]);a$j(()=>()=>{a();},[a]);let R=d=>{if(i$1(d.currentTarget))switch(d.key){case "ArrowLeft":c==="ltr"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "ArrowRight":c==="rtl"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "Escape":e$3(n.current,g(d))&&(d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break}},M={id:u,"aria-labelledby":m,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:R}},D=d=>{switch(d.key){case "ArrowRight":l||(c==="ltr"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;case "ArrowLeft":l||(c==="rtl"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;default:d.continuePropagation();break}},v=d=>{!l&&(d.pointerType==="virtual"||d.pointerType==="keyboard")&&x("first");},L=d=>{!l&&(d.pointerType==="touch"||d.pointerType==="mouse")&&x();},O=d=>{l||(d&&!e.isOpen?f.current||(f.current=setTimeout(()=>{x();},s)):d||a());};a$k(o,"focusin",d=>{e.isOpen&&e$3(o.current,g(d))&&g(d)!==t.current&&g$1();});let k=d=>d!==t.current;return Kr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:m,"aria-controls":e.isOpen?u:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:v,onPress:L,onHoverChange:O,onKeyDown:D,isOpen:e.isOpen},submenuProps:M,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:k}}}function We(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(m=null){o(m),e.open();},toggle(m=null){o(m),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(m,u)=>{i(c=>u>c.length?c:[...c.slice(0,u),m]);},closeSubmenu:(m,u)=>{i(c=>c[u]===m?c.slice(0,u):c);}}}function Pt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),p=useMemo(()=>o[s]===t,[o,t,s]),[m,u]=useState(null),c=useCallback(x=>{u(x??null),n(t,s);},[n,s,t]),f=useCallback(()=>{u(null),i(t,s);},[i,s,t]),a=useCallback(x=>{u(x??null),p?f():c(x);},[f,c,p]);return useMemo(()=>({focusStrategy:m,isOpen:p,open:c,close:f,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:a}),[p,c,f,l,m,a,s])}var bt=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,bt),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Do=createContext({}),Xl=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Do);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var xt=createContext(null);createContext(null);createContext(null);var vt=createContext(null);var Xe=createContext(null),De=createContext(null),Ce=createContext(null),Ge=createContext(null);function Eo(r){let e=We(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=dt({...r,type:"menu"},e,t),i=useRef(null);return c$9()?null:jsx(b$4,{values:[[Xe,{...n,ref:i}],[vt,e],[Ce,e],[xt,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"]}]],children:jsx(b$a,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Xr=createContext(null),Mt=class extends a$i{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Oo=k(Mt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(De),i=useContext(Ce),l=Pt({triggerKey:t.key},i),s=useRef(null),p$1=a$4(e),{parentMenuRef:m,shouldUseVirtualFocus:u}=useContext(Xr),{submenuTriggerProps:c,submenuProps:f,popoverProps:a}=gt({parentMenuRef:m,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:u},l,p$1);return jsxs(b$4,{values:[[ye,{...c,onAction:void 0,ref:p$1}],[Xe,{ref:s,...f}],[vt,l],[xt,{trigger:"SubmenuTrigger",triggerRef:p$1,placement:"end top","aria-labelledby":f["aria-labelledby"],...a}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ao=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Xe),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(Io,{props:e$1,collection:o,menuRef:t})})});function Io({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$b({...r,collection:i,children:void 0}),s=useContext(Ce),{isVirtualized:p$1,CollectionRoot:m$1}=useContext(p),{menuProps:u}=ct({...r,isVirtualized:p$1,onClose:r.onClose||s?.close},l,t),c=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),f=null;l.collection.size===0&&r.renderEmptyState&&(f=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let a=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(a,c,u),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[De,l],[_e,{elementType:"div"}],[m,{name:"MenuSection",render:$r}],[Xr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$6,null],[Ge,l.selectionManager],[Ce,s??We({})]],children:jsx(w,{children:jsx(m$1,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),f]})})}var Tt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function $r(r,e,t,o="react-aria-MenuSection"){let n=useContext(De),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:p$1,groupProps:m}=mt({heading:s,"aria-label":t.props["aria-label"]??void 0}),u=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),c=useContext(Ge),f$1=a$c(r),a=r.selectionMode!=null?new Tt(c,f$1):c,x=d$1(ye)?.shouldCloseOnSelect,g=a$2(r,{global:true});return delete g.id,jsx(h.section,{...c$4(g,u,m),ref:e,children:jsx(b$4,{values:[[ge,{...p$1,ref:l}],[Ge,a],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Ct=k(f$2,$r),ye=createContext(null),Dt=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,ye);let n=d$1(ye)?.id,i=useContext(De),l=a$4(t),s=useContext(Ge),{isVirtualized:p$1}=useContext(p),{menuItemProps:m,labelProps:u,descriptionProps:c,keyboardShortcutProps:f,...a}=pt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:p$1},i,l),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:a.isDisabled}),R=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...a,isHovered:g,isFocusVisible:a.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),M=e$1.href?h.a:h.div,D=a$2(e$1,{global:true});return delete D.id,delete D.onClick,jsx(M,{...c$4(D,R,m,x$1),ref:l,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-selected":a.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:u,label:u,description:c}}],[bt,f],[x,{isSelected:a.isSelected}]],children:R.children})})});var Rt=be.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a,...x},g)=>{let{isVirtualized:R}=useContext(p),M=o?.(r),D=s==="ListBox"?at:Ct,v=p$1==null?{}:{selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a};return jsxs(D,{id:r.id,"aria-label":r.title,...v,className:a$e(`BaselineUI-${s}-Section`,Fr,R&&!e&&Br,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:g,children:[t?M?jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:M}):jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$d,{className:a$e(wr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:Ve(x),children:L=>jsx($e,{componentName:s,item:L,...x},L.id)})]})});Rt.displayName="ListSection";var Bo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$d,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Ho=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:p=false})=>{let m=r.icon,u=l!=="none",c=r.keyboardShortcut??r.description;return jsxs(a$d,{display:"flex",alignItems:"center",gap:"lg",className:a$e(kr({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$d,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[u&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,u&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$8({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,m?jsx(m,{size:24}):null,jsx(b$7,{slot:"label",elementType:"span",children:r.label})]}),p?jsx(Bo,{componentName:s}):c?jsx(b$7,{slot:"description",className:a$e(Ir({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:c}):null]})},$e=be.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:p}=useContext(Zr);return jsx(n==="ListBox"?ut:Dt,{...c$4(a$f(i),{onPress:u=>s?.(u,r.id),onKeyDown:p?u=>{p(u,r.id),u.continuePropagation();}:void 0}),id:r.id,value:r,className:u=>a$e(Hr,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,u):t),style:u=>typeof e=="function"?e(r,u):e,textValue:r.label,ref:l,children:u=>o?o(r,u):jsx(Ho,{componentName:n,...u,item:r})})});$e.displayName="ListOption";var Qr=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Zr=be.createContext({}),zo=be.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:p$1,dragAndDropHooks:m,listBoxHandle:u,"data-block-id":c,"data-block-class":f,...a},x)=>{let g=a$4(x),R=be.useRef(false),M=be.useRef(null),D=useContext(le),{isVirtualized:v,layoutDelegate:L}=useContext(p);useEffect(()=>{D&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[D,s,o,n,i,l,t]),a$g({ref:g,isDisabled:!m});let O=useCallback(y=>g.current?.querySelector(`[data-key="${y}"][role="option"]`),[g]);useEffect(()=>{if(!v)return;let y=g.current,b=y?.ownerDocument,h=b?.defaultView;if(y==null||b==null||h==null)return;let z=()=>{let T=f$4(y);return T==null||T===b.body||T===b.documentElement},j=()=>y.querySelector('[role="option"][tabindex="0"]')??y.querySelector('[role="option"][data-focused="true"]'),_=()=>{let T=f$4(y);return T!=null&&e$3(y,T)},H=T=>T.composedPath().some(ue=>ue instanceof h.Node&&e$3(y,ue)),W=()=>{R.current=false;},se=()=>{M.current!=null&&h.cancelAnimationFrame(M.current),M.current=h.requestAnimationFrame(()=>{if(M.current=null,_())return;if(!z()){W();return}let T=j();T?.focus({preventScroll:true});});},te=T=>{Qr.has(T.key)&&(R.current=true);},J=T=>{!Qr.has(T.key)||!z()||!R.current||se();},Y=T=>{H(T)||_()||W();},he=T=>{H(T)||W();},Z=new MutationObserver(T=>{T.some(({addedNodes:ue,removedNodes:re})=>ue.length>0||re.length>0)&&R.current&&se();});return y.addEventListener("keydown",te),b.addEventListener("keydown",J,true),b.addEventListener("focusin",Y,true),b.addEventListener("pointerdown",he,true),Z.observe(y,{childList:true,subtree:true}),()=>{y.removeEventListener("keydown",te),b.removeEventListener("keydown",J,true),b.removeEventListener("focusin",Y,true),b.removeEventListener("pointerdown",he,true),Z.disconnect(),M.current!=null&&h.cancelAnimationFrame(M.current),W(),M.current=null;}},[v,g]);let k=be.useRef(null),d=useCallback(()=>{let y=k.current;y&&(y.ownerWindow.cancelAnimationFrame(y.frameId),k.current=null);},[]);useEffect(()=>d,[d]);let S=useCallback((y,b)=>{if(d(),!g.current)return;let h=()=>{let j=O(y);if(j)return j.scrollIntoView({block:"nearest",inline:"nearest",...b}),true;if(v&&L){let _=L.getItemRect(y);return _?(L.virtualizer.delegate.setVisibleRect(_),true):false}return false};if(h())return;let z=g.current.ownerDocument?.defaultView;z&&(k.current={ownerWindow:z,frameId:z.requestAnimationFrame(()=>{k.current=null,h();})});},[d,O,v,L,g]);useImperativeHandle(u,()=>({scrollIntoView:S,setFocusedKey:y=>{let b=O(y);!g.current||!b||(b.focus(),S(y));}}),[S,O,g]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},w=a.items?.[0]?.id;return jsx(st,{...a,dependencies:[...a.dependencies??[],w,...Ve(E)],"data-block-id":c,"data-block-class":f,dragAndDropHooks:m,ref:g,className:a$e(Ar,"BaselineUI-ListBox",p$1),children:y=>jsx(Ko,{item:y,isFirstCollectionItem:w===y.id,...E},y.id)})});zo.displayName="UNSAFE_ListBox";var _o=be.createContext({}),Ko=r=>{let e=useContext(_o),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$h(t,"Item is required"),"children"in t?jsx(Rt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx($e,{item:t,componentName:"ListBox",...l})};export{lt as a,le as b,dt as c,Ve as d,gi as e,Do as f,Xl as g,xt as h,vt as i,Eo as j,Oo as k,Ao as l,Rt as m,Ho as n,$e as o,Zr as p,zo as q,Ko as r};
|
|
10
|
+
var ge=createContext({}),ze=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,ge),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var _e=createContext({});var lt=createContext(null),le=createContext(null),st=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,lt);let o=useContext(le);return o?jsx(Lr,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(uo,{props:e$1,listBoxRef:t,collection:n})})});function uo({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Lr,{state:n,props:r,listBoxRef:e})}function Lr({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:p$1,selectionManager:m$1}=s$1,u$1=!!o?.useDraggableCollectionState,c=!!o?.useDroppableCollectionState,{direction:f}=b$2(),{disabledBehavior:a$4,disabledKeys:x}=m$1,g=a({usage:"search",sensitivity:"base"}),{isVirtualized:R,layoutDelegate:M,dropTargetDelegate:D,CollectionRoot:v$1}=useContext(p),L=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:p$1,collator:g,ref:t,disabledKeys:x,disabledBehavior:a$4,layout:n,orientation:i,direction:f,layoutDelegate:M}),[p$1,g,t,a$4,x,i,f,e$1.keyboardDelegate,n,M]),{listBoxProps:O}=c$2({...e$1,shouldSelectOnPressUp:u$1||e$1.shouldSelectOnPressUp,keyboardDelegate:L,isVirtualized:R},s$1,t),k=useRef(u$1),d=useRef(c);useEffect(()=>{process.env.NODE_ENV!=="production"&&(k.current!==u$1&&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&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[u$1,c]);let S,E,w$1,y=false,b=null,h$1=useRef(null);if(u$1&&o){S=o.useDraggableCollectionState({collection:p$1,selectionManager:m$1,preview:o.renderDragPreview?h$1:void 0}),o.useDraggableCollection({},S,t);let Y=o.DragPreview;b=o.renderDragPreview?jsx(Y,{ref:h$1,children:o.renderDragPreview}):null;}if(c&&o){E=o.useDroppableCollectionState({collection:p$1,selectionManager:m$1});let Y=o.dropTargetDelegate||D||new o.ListDropTargetDelegate(p$1,t,{orientation:i,layout:n,direction:f});w$1=o.useDroppableCollection({keyboardDelegate:L,dropTargetDelegate:Y},E,t),y=E.isDropTarget({type:"root"});}let{focusProps:z,isFocused:j,isFocusVisible:_}=a$1(),H=s$1.collection.size===0,W={isDropTarget:y,isEmpty:H,isFocused:j,isFocusVisible:_,layout:e$1.layout||"stack",orientation:i,state:s$1},se=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:W}),te=null;H&&e$1.renderEmptyState&&(te=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(W)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,se,O,z,w$1?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":y||void 0,"data-empty":H||void 0,"data-focused":j||void 0,"data-focus-visible":_||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[lt,e$1],[le,s$1],[r,{dragAndDropHooks:o,dragState:S,dropState:E}],[_e,{elementType:"div"}],[s,{render:co}],[m,{name:"ListBoxSection",render:Er}]],children:jsx(w,{children:jsx(v$1,{collection:p$1,scrollRef:t,persistedKeys:v(m$1,o,E),renderDropIndicator:u(o,E)})})}),te,b]})})}function Er(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(le),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[p$1,m]=f(),{headingProps:u$1,groupProps:c}=f$1({heading:m,"aria-label":r$1["aria-label"]??void 0}),f$2=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),a=a$2(r$1,{global:true});return delete a.id,jsx(h.section,{...c$4(a,f$2,c),ref:e,children:jsx(ge.Provider,{value:{...u$1,ref:p$1},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var at=k(f$2,Er),ut=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(le),{dragAndDropHooks:l,dragState:s,dropState:p}=useContext(r),m=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:u,labelProps:c,descriptionProps:f,...a}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:!a.allowsSelection&&!a.hasAction&&!m,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:R}=a$6(e),{focusProps:M}=a$7(e),D=null;s&&l&&(D=l.useDraggableItem({key:o.key,hasAction:a.hasAction},s,n));let v=null;p&&l&&(v=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},p,n));let L=s&&s.isDragging(o.key),O=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...a,isHovered:g,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:L,isDropTarget:v?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let k=e.href?h.a:h.div,d=a$2(e,{global:true});return delete d.id,delete d.onClick,e.href&&u.tabIndex==null&&(u.tabIndex=-1),jsx(k,{...c$4(d,O,u,x$1,R,M,D?.dragProps,v?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":a.isSelected||void 0,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-dragging":L||void 0,"data-drop-target":v?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:c,label:c,description:f}}],[x,{isSelected:a.isSelected}]],children:O.children})})});function co(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(mo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var mo=forwardRef(po);j(d,function(e,t,o){let n=useContext(le),{isLoading:i,onLoadMore:l,scrollOffset:s,...p}=e,m=useRef(null),u=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:m,scrollOffset:s}),[l,s,n?.collection]);b$5(u,m);let c=c$3({...p,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),f={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:c$5(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:m,style:{position:"absolute",height:1,width:1}})}),i&&c.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),f),...c,role:"option",ref:t,children:c.children})})]})});var Ve=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var gi=a$a({defaultClassName:"_1fjxa6ld _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"},orientation:{vertical:"_1yep5z618m",horizontal:"_1yep5z618n"}},defaultVariants:{},compoundVariants:[]}),Ar="_1fjxa6la _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ir=a$a({defaultClassName:"_1fjxa6lb _1yep5z6ez _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6f2"}},defaultVariants:{},compoundVariants:[]}),kr=a$a({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6ey _1yep5z6lq _1yep5z6lt _1yep5z6m6 _1yep5z6m5 _1yep5z6m3 _1yep5z6m0",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t _1yep5z615c _1yep5z615d _1yep5z615e"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z612t",false:"_1yep5z612s"},isDisabled:{true:"z9nup82 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",Fr="_1fjxa6l1",Br="_1fjxa6l2",Hr="_1fjxa6l0";var Nr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function dt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$7(),{triggerProps:s,overlayProps:p}=a$q({type:o},e,t),m=a=>{if(!n&&!(i==="longPress"&&!a.altKey)&&t&&t.current)switch(a.key){case "Enter":case " ":if(i==="longPress"||a.isDefaultPrevented())return;case "ArrowDown":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("first");break;case "ArrowUp":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("last");break;default:"continuePropagation"in a&&a.continuePropagation();}},u=b$9(Nr,"@react-aria/menu"),{longPressProps:c}=a$r({isDisabled:n||i!=="longPress",accessibilityDescription:u.format("longPressMessage"),onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),f={preventFocusOnPress:true,onPressStart(a){a.pointerType!=="touch"&&a.pointerType!=="keyboard"&&!n&&(a$n(a.target),e.open(a.pointerType==="virtual"?"first":null));},onPress(a){a.pointerType==="touch"&&!n&&(a$n(a.target),e.toggle());}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:c,id:l,onKeyDown:m},menuProps:{...p,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var je=new WeakMap;function ct(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:p}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...p,onKeyDown:m=>{(m.key!=="Escape"||r.shouldUseVirtualFocus)&&p.onKeyDown?.(m);}})}}function pt(r,e,t){let{id:o,key:n$1,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":p,onPressStart:m,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:a,onClick:x,onHoverStart:g$1,onHoverChange:R,onHoverEnd:M,onKeyDown:D,onKeyUp:v,onFocus:L,onFocusChange:O,onBlur:k,selectionManager:d=e.selectionManager}=r,S=!!p,E=S&&r["aria-expanded"]==="true",w=r.isDisabled??d.isDisabled(n$1),y=r.isSelected??d.isSelected(n$1),b=je.get(e),h=e.collection.getItem(n$1),z=r.onClose||b.onClose,j=n(),_=()=>{if(!S&&(h?.props?.onAction?h.props.onAction():r.onAction&&r.onAction(n$1),b.onAction)){let P=b.onAction;P(n$1,h?.value);}},H="menuitem";S||(d.selectionMode==="single"?H="menuitemradio":d.selectionMode==="multiple"&&(H="menuitemcheckbox"));let W=e$4(),se=e$4(),te=e$4(),J={id:o,"aria-disabled":w||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":W,"aria-describedby":[r["aria-describedby"],se,te].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":p,"aria-expanded":r["aria-expanded"]};if(d.selectionMode!=="none"&&!S&&(J["aria-checked"]=y),s){let P=Number(h?.index);J["aria-posinset"]=Number.isNaN(P)?void 0:P+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),he=P=>{f?.(P),Y.current=P;},Z=useRef(null),T=P=>{P.pointerType!=="keyboard"&&(Z.current={pointerType:P.pointerType}),P.pointerType==="mouse"&&(Y.current||P.target.click()),u?.(P);},ue=P=>{x?.(P),_(),r$1(P,j,h.props.href,h?.props.routerOptions);let Je=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||d.selectionMode==="none"||d.isLink(n$1):d.selectionMode!=="multiple"||d.isLink(n$1);Je=l??i??Je,z&&!S&&Je&&z(),Z.current=null;},{itemProps:re,isFocused:At}=d$3({id:o,selectionManager:d,key:n$1,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:b.shouldUseVirtualFocus}),{pressProps:eo,isPressed:to}=d$4({onPressStart:m,onPress:c,onPressUp:T,onPressChange:he,onPressEnd:a,isDisabled:w}),{hoverProps:ro}=a$5({isDisabled:w,onHoverStart(P){!b$6()&&!(E&&p)&&(d.setFocused(true),d.setFocusedKey(n$1)),g$1?.(P);},onHoverChange:R,onHoverEnd:M}),{keyboardProps:oo}=a$6({onKeyDown:P=>{if(P.repeat){P.continuePropagation();return}switch(P.key){case " ":Z.current={pointerType:"keyboard",key:" "},g(P).click(),d$5("keyboard");break;case "Enter":Z.current={pointerType:"keyboard",key:"Enter"},g(P).tagName!=="A"&&g(P).click(),d$5("keyboard");break;default:S||P.continuePropagation(),D?.(P);break}},onKeyUp:v}),{focusableProps:no}=d$6({onBlur:k,onFocus:L,onFocusChange:O},t),It=a$2(h?.props);delete It.id;let io=q$1(h?.props);return {menuItemProps:{...J,...c$4(It,io,S?{onFocus:re.onFocus,"data-collection":re["data-collection"],"data-key":re["data-key"]}:re,eo,ro,oo,no,b.shouldUseVirtualFocus||S?{onMouseDown:P=>P.preventDefault()}:void 0,w?void 0:{onClick:ue}),tabIndex:re.tabIndex!=null&&E&&!b.shouldUseVirtualFocus?-1:re.tabIndex},labelProps:{id:W},descriptionProps:{id:se},keyboardShortcutProps:{id:te},isFocused:At,isFocusVisible:At&&d.isFocused&&b$6()&&!E,isSelected:y,isPressed:to,isDisabled:w}}function mt(r){let{heading:e,"aria-label":t}=r,o=e$4([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ue=2,Po=50,bo=1e3,_r=Math.PI/12;function Kr(r){let{menuRef:e,submenuRef:t$1,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),p=useRef(void 0),m=useRef(void 0),u=useRef(void 0),c=useRef(2),[f,a]=useState(false);a$o({ref:o?t$1:void 0,onResize:()=>{t$1.current&&(l.current=t$1.current.getBoundingClientRect(),u.current=void 0);}});let g=()=>{a(false),c.current=Ue,i.current=void 0;},R=f$6(),M=t(D=>{f&&D.preventDefault();});useEffect(()=>{f&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,f]),a$j(()=>{let D=t$1.current,v=e.current;if(n||!D||!o||R!=="pointer"||!v){g();return}l.current=D.getBoundingClientRect();let L=k=>{if(k.pointerType==="touch"||k.pointerType==="pen")return;let d=Date.now();if(d-s.current<Po)return;clearTimeout(p.current),clearTimeout(m.current);let{clientX:S,clientY:E}=k;if(!i.current){i.current={x:S,y:E};return}if(!l.current)return;if(u.current||(u.current=S>l.current.right?"left":"right"),S<v.getBoundingClientRect().left||S>v.getBoundingClientRect().right||E<v.getBoundingClientRect().top||E>v.getBoundingClientRect().bottom){g();return}let w=i.current.x,y=i.current.y,b=u.current==="right"?l.current.left-w:w-l.current.right,h=Math.atan2(y-l.current.top,b)+_r,z=Math.atan2(y-l.current.bottom,b)-_r,j=Math.atan2(y-E,u.current==="left"?-(S-w):S-w),_=j<h&&j>z;c.current=_?Math.min(c.current+1,Ue):Math.max(c.current-1,0),c.current>=Ue?a(true):a(false),s.current=d,i.current={x:S,y:E},_&&(p.current=setTimeout(()=>{g(),m.current=setTimeout(()=>{let H=a$p(v).elementFromPoint(S,E);H&&e$3(v,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},bo));},O=b$8(v);return O.addEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.addEventListener("pointerdown",M,true),()=>{O.removeEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.removeEventListener("pointerdown",M,true),clearTimeout(p.current),clearTimeout(m.current),c.current=Ue;}},[n,o,e,R,a,t$1]);}function gt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:p}=r,m=c$7(),u=c$7(),{direction:c}=b$2(),f=useRef(void 0),a=useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=void 0);},[f]),x=useCallback(d=>{a(),e.open(d);},[e,a]),g$1=useCallback(()=>{a(),e.close();},[e,a]);a$j(()=>()=>{a();},[a]);let R=d=>{if(i$1(d.currentTarget))switch(d.key){case "ArrowLeft":c==="ltr"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "ArrowRight":c==="rtl"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "Escape":e$3(n.current,g(d))&&(d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break}},M={id:u,"aria-labelledby":m,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:R}},D=d=>{switch(d.key){case "ArrowRight":l||(c==="ltr"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;case "ArrowLeft":l||(c==="rtl"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;default:d.continuePropagation();break}},v=d=>{!l&&(d.pointerType==="virtual"||d.pointerType==="keyboard")&&x("first");},L=d=>{!l&&(d.pointerType==="touch"||d.pointerType==="mouse")&&x();},O=d=>{l||(d&&!e.isOpen?f.current||(f.current=setTimeout(()=>{x();},s)):d||a());};a$k(o,"focusin",d=>{e.isOpen&&e$3(o.current,g(d))&&g(d)!==t.current&&g$1();});let k=d=>d!==t.current;return Kr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:m,"aria-controls":e.isOpen?u:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:v,onPress:L,onHoverChange:O,onKeyDown:D,isOpen:e.isOpen},submenuProps:M,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:k}}}function We(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(m=null){o(m),e.open();},toggle(m=null){o(m),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(m,u)=>{i(c=>u>c.length?c:[...c.slice(0,u),m]);},closeSubmenu:(m,u)=>{i(c=>c[u]===m?c.slice(0,u):c);}}}function Pt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),p=useMemo(()=>o[s]===t,[o,t,s]),[m,u]=useState(null),c=useCallback(x=>{u(x??null),n(t,s);},[n,s,t]),f=useCallback(()=>{u(null),i(t,s);},[i,s,t]),a=useCallback(x=>{u(x??null),p?f():c(x);},[f,c,p]);return useMemo(()=>({focusStrategy:m,isOpen:p,open:c,close:f,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:a}),[p,c,f,l,m,a,s])}var bt=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,bt),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Do=createContext({}),Xl=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Do);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var xt=createContext(null);createContext(null);createContext(null);var vt=createContext(null);var Xe=createContext(null),De=createContext(null),Ce=createContext(null),Ge=createContext(null);function Eo(r){let e=We(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=dt({...r,type:"menu"},e,t),i=useRef(null);return c$9()?null:jsx(b$4,{values:[[Xe,{...n,ref:i}],[vt,e],[Ce,e],[xt,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"]}]],children:jsx(b$a,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Xr=createContext(null),Mt=class extends a$i{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Oo=k(Mt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(De),i=useContext(Ce),l=Pt({triggerKey:t.key},i),s=useRef(null),p$1=a$4(e),{parentMenuRef:m,shouldUseVirtualFocus:u}=useContext(Xr),{submenuTriggerProps:c,submenuProps:f,popoverProps:a}=gt({parentMenuRef:m,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:u},l,p$1);return jsxs(b$4,{values:[[ye,{...c,onAction:void 0,ref:p$1}],[Xe,{ref:s,...f}],[vt,l],[xt,{trigger:"SubmenuTrigger",triggerRef:p$1,placement:"end top","aria-labelledby":f["aria-labelledby"],...a}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ao=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Xe),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(Io,{props:e$1,collection:o,menuRef:t})})});function Io({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$b({...r,collection:i,children:void 0}),s=useContext(Ce),{isVirtualized:p$1,CollectionRoot:m$1}=useContext(p),{menuProps:u}=ct({...r,isVirtualized:p$1,onClose:r.onClose||s?.close},l,t),c=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),f=null;l.collection.size===0&&r.renderEmptyState&&(f=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let a=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(a,c,u),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[De,l],[_e,{elementType:"div"}],[m,{name:"MenuSection",render:$r}],[Xr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$6,null],[Ge,l.selectionManager],[Ce,s??We({})]],children:jsx(w,{children:jsx(m$1,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),f]})})}var Tt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function $r(r,e,t,o="react-aria-MenuSection"){let n=useContext(De),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:p$1,groupProps:m}=mt({heading:s,"aria-label":t.props["aria-label"]??void 0}),u=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),c=useContext(Ge),f$1=a$c(r),a=r.selectionMode!=null?new Tt(c,f$1):c,x=d$1(ye)?.shouldCloseOnSelect,g=a$2(r,{global:true});return delete g.id,jsx(h.section,{...c$4(g,u,m),ref:e,children:jsx(b$4,{values:[[ge,{...p$1,ref:l}],[Ge,a],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Ct=k(f$2,$r),ye=createContext(null),Dt=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,ye);let n=d$1(ye)?.id,i=useContext(De),l=a$4(t),s=useContext(Ge),{isVirtualized:p$1}=useContext(p),{menuItemProps:m,labelProps:u,descriptionProps:c,keyboardShortcutProps:f,...a}=pt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:p$1},i,l),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:a.isDisabled}),R=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...a,isHovered:g,isFocusVisible:a.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),M=e$1.href?h.a:h.div,D=a$2(e$1,{global:true});return delete D.id,delete D.onClick,jsx(M,{...c$4(D,R,m,x$1),ref:l,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-selected":a.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:u,label:u,description:c}}],[bt,f],[x,{isSelected:a.isSelected}]],children:R.children})})});var Rt=be.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a,...x},g)=>{let{isVirtualized:R}=useContext(p),M=o?.(r),D=s==="ListBox"?at:Ct,v=p$1==null?{}:{selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a};return jsxs(D,{id:r.id,"aria-label":r.title,...v,className:a$e(`BaselineUI-${s}-Section`,Fr,R&&!e&&Br,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:g,children:[t?M?jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:M}):jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$d,{className:a$e(wr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:Ve(x),children:L=>jsx($e,{componentName:s,item:L,...x},L.id)})]})});Rt.displayName="ListSection";var Bo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$d,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Ho=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:p=false})=>{let m=r.icon,u=l!=="none",c=r.keyboardShortcut??r.description;return jsxs(a$d,{display:"flex",alignItems:"center",gap:"lg",className:a$e(kr({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$d,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[u&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,u&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$8({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,m?jsx(m,{size:24}):null,jsx(b$7,{slot:"label",elementType:"span",children:r.label})]}),p?jsx(Bo,{componentName:s}):c?jsx(b$7,{slot:"description",className:a$e(Ir({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:c}):null]})},$e=be.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:p}=useContext(Zr);return jsx(n==="ListBox"?ut:Dt,{...c$4(a$f(i),{onPress:u=>s?.(u,r.id),onKeyDown:p?u=>{p(u,r.id),u.continuePropagation();}:void 0}),id:r.id,value:r,className:u=>a$e(Hr,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,u):t),style:u=>typeof e=="function"?e(r,u):e,textValue:r.label,ref:l,children:u=>o?o(r,u):jsx(Ho,{componentName:n,...u,item:r})})});$e.displayName="ListOption";var Qr=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Zr=be.createContext({}),zo=be.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:p$1,dragAndDropHooks:m,listBoxHandle:u,"data-block-id":c,"data-block-class":f,...a},x)=>{let g=a$4(x),R=be.useRef(false),M=be.useRef(null),D=useContext(le),{isVirtualized:v,layoutDelegate:L}=useContext(p);useEffect(()=>{D&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[D,s,o,n,i,l,t]),a$g({ref:g,isDisabled:!m});let O=useCallback(y=>g.current?.querySelector(`[data-key="${y}"][role="option"]`),[g]);useEffect(()=>{if(!v)return;let y=g.current,b=y?.ownerDocument,h=b?.defaultView;if(y==null||b==null||h==null)return;let z=()=>{let T=f$4(y);return T==null||T===b.body||T===b.documentElement},j=()=>y.querySelector('[role="option"][tabindex="0"]')??y.querySelector('[role="option"][data-focused="true"]'),_=()=>{let T=f$4(y);return T!=null&&e$3(y,T)},H=T=>T.composedPath().some(ue=>ue instanceof h.Node&&e$3(y,ue)),W=()=>{R.current=false;},se=()=>{M.current!=null&&h.cancelAnimationFrame(M.current),M.current=h.requestAnimationFrame(()=>{if(M.current=null,_())return;if(!z()){W();return}let T=j();T?.focus({preventScroll:true});});},te=T=>{Qr.has(T.key)&&(R.current=true);},J=T=>{!Qr.has(T.key)||!z()||!R.current||se();},Y=T=>{H(T)||_()||W();},he=T=>{H(T)||W();},Z=new MutationObserver(T=>{T.some(({addedNodes:ue,removedNodes:re})=>ue.length>0||re.length>0)&&R.current&&se();});return y.addEventListener("keydown",te),b.addEventListener("keydown",J,true),b.addEventListener("focusin",Y,true),b.addEventListener("pointerdown",he,true),Z.observe(y,{childList:true,subtree:true}),()=>{y.removeEventListener("keydown",te),b.removeEventListener("keydown",J,true),b.removeEventListener("focusin",Y,true),b.removeEventListener("pointerdown",he,true),Z.disconnect(),M.current!=null&&h.cancelAnimationFrame(M.current),W(),M.current=null;}},[v,g]);let k=be.useRef(null),d=useCallback(()=>{let y=k.current;y&&(y.ownerWindow.cancelAnimationFrame(y.frameId),k.current=null);},[]);useEffect(()=>d,[d]);let S=useCallback((y,b)=>{if(d(),!g.current)return;let h=()=>{let j=O(y);if(j)return j.scrollIntoView({block:"nearest",inline:"nearest",...b}),true;if(v&&L){let _=L.getItemRect(y);return _?(L.virtualizer.delegate.setVisibleRect(_),true):false}return false};if(h())return;let z=g.current.ownerDocument?.defaultView;z&&(k.current={ownerWindow:z,frameId:z.requestAnimationFrame(()=>{k.current=null,h();})});},[d,O,v,L,g]);useImperativeHandle(u,()=>({scrollIntoView:S,setFocusedKey:y=>{let b=O(y);!g.current||!b||(b.focus(),S(y));}}),[S,O,g]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},w=a.items?.[0]?.id;return jsx(st,{...a,dependencies:[...a.dependencies??[],w,...Ve(E)],"data-block-id":c,"data-block-class":f,dragAndDropHooks:m,ref:g,className:a$e(Ar,"BaselineUI-ListBox",p$1),children:y=>jsx(Ko,{item:y,isFirstCollectionItem:w===y.id,...E},y.id)})});zo.displayName="UNSAFE_ListBox";var _o=be.createContext({}),Ko=r=>{let e=useContext(_o),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$h(t,"Item is required"),"children"in t?jsx(Rt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx($e,{item:t,componentName:"ListBox",...l})};export{lt as a,le as b,dt as c,Ve as d,gi as e,Do as f,Xl as g,xt as h,vt as i,Eo as j,Oo as k,Ao as l,Rt as m,Ho as n,$e as o,Zr as p,zo as q,Ko as r};
|