@baseline-ui/core 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.mjs +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/Avatar.mjs +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.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.mjs +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/Dialog.css +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +1 -1
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/Panel.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Table.css +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/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +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/Virtualizer.mjs +1 -1
- package/dist/{chunk-LPI2NIDI.mjs → chunk-2AKHB7Y5.mjs} +1 -1
- package/dist/chunk-2M2LI4MI.mjs +10 -0
- package/dist/chunk-2WA3KB7H.mjs +10 -0
- package/dist/{chunk-KGS3UWPG.mjs → chunk-3KWSJRYK.mjs} +1 -1
- package/dist/{chunk-AM5FU4Y7.mjs → chunk-3M3WJHOI.mjs} +1 -1
- package/dist/{chunk-5KJF7IQN.mjs → chunk-3UC5V5E3.mjs} +1 -1
- package/dist/{chunk-QUQ4VYCN.mjs → chunk-43LOJ3SH.mjs} +1 -1
- package/dist/{chunk-MFB3SWO7.mjs → chunk-46RUOB4U.mjs} +11 -11
- package/dist/{chunk-AELTF2DE.mjs → chunk-4WVW4KEK.mjs} +1 -1
- package/dist/{chunk-BYDJXA5A.mjs → chunk-5G6JNQQR.mjs} +1 -1
- package/dist/{chunk-4EANTENO.mjs → chunk-5G7ABQYJ.mjs} +1 -1
- package/dist/{chunk-IUXXTORQ.mjs → chunk-5W67PVZQ.mjs} +1 -1
- package/dist/{chunk-CTSDHAAV.mjs → chunk-676DOXEK.mjs} +2 -2
- package/dist/{chunk-AD3MLX6G.mjs → chunk-6GMU63H2.mjs} +1 -1
- package/dist/chunk-6M7PJXEE.mjs +10 -0
- package/dist/chunk-6Q5PNIYZ.mjs +10 -0
- package/dist/{chunk-R7R7JDA3.mjs → chunk-7BE6MOPW.mjs} +1 -1
- package/dist/chunk-7EQIV4GX.mjs +10 -0
- package/dist/{chunk-DZDZZRWE.mjs → chunk-7MLFM55C.mjs} +1 -1
- package/dist/chunk-7XLBV46W.mjs +10 -0
- package/dist/{chunk-BHJCYKFJ.mjs → chunk-ABXTAFKP.mjs} +1 -1
- package/dist/{chunk-TUJLNJPJ.mjs → chunk-AFOW62QN.mjs} +2 -2
- package/dist/chunk-AMVX34SS.mjs +10 -0
- package/dist/{chunk-7TE4MFKC.mjs → chunk-AN26QORL.mjs} +1 -1
- package/dist/{chunk-OYSOPCTA.mjs → chunk-BA5OA5DY.mjs} +1 -1
- package/dist/{chunk-4W5VP4NV.mjs → chunk-BAIVRB2I.mjs} +1 -1
- package/dist/{chunk-K4TTZX4T.mjs → chunk-BET5GVGQ.mjs} +1 -1
- package/dist/{chunk-7L5UOGZA.mjs → chunk-BPW4QRPV.mjs} +2 -2
- package/dist/chunk-BSSLS6MF.mjs +10 -0
- package/dist/{chunk-UUTMZQQA.mjs → chunk-CENNHSIS.mjs} +3 -3
- package/dist/{chunk-W7OTSFZS.mjs → chunk-CTBCJZEG.mjs} +1 -1
- package/dist/chunk-D5VU5TED.mjs +11 -0
- package/dist/chunk-DAI7V4TE.mjs +10 -0
- package/dist/chunk-DO5YROCG.mjs +10 -0
- package/dist/{chunk-COHK4QQW.mjs → chunk-EGLD5KVP.mjs} +2 -2
- package/dist/{chunk-BXNNVZOQ.mjs → chunk-EL5OYHOX.mjs} +1 -1
- package/dist/{chunk-CLGLEEFO.mjs → chunk-FCKJCFMD.mjs} +1 -1
- package/dist/chunk-FGSVPRDN.mjs +10 -0
- package/dist/chunk-FNCHBVLF.mjs +10 -0
- package/dist/chunk-GFBRKKX4.mjs +10 -0
- package/dist/{chunk-QU34XSML.mjs → chunk-GLAMJIYO.mjs} +2 -2
- package/dist/{chunk-NRQSR3G7.mjs → chunk-HABKIEKC.mjs} +1 -1
- package/dist/{chunk-HI44JQA7.mjs → chunk-HPUUQKKH.mjs} +2 -2
- package/dist/chunk-HZM2XZP4.mjs +10 -0
- package/dist/{chunk-ZFGTKLCU.mjs → chunk-I7SMG6PT.mjs} +1 -1
- package/dist/{chunk-TH4XPZEO.mjs → chunk-IM3E5JL4.mjs} +1 -1
- package/dist/chunk-IROFSPEN.mjs +10 -0
- package/dist/chunk-JRCDMRIW.mjs +10 -0
- package/dist/{chunk-WHN2SEWO.mjs → chunk-KHDWTXGG.mjs} +2 -2
- package/dist/{chunk-SVTTHYTR.mjs → chunk-KW3BKIG4.mjs} +1 -1
- package/dist/{chunk-EUVUJQ2Z.mjs → chunk-LBHZV4BO.mjs} +1 -1
- package/dist/{chunk-QJYPCVSD.mjs → chunk-LKSUUT3M.mjs} +1 -1
- package/dist/chunk-LQ7PGSP4.mjs +10 -0
- package/dist/chunk-LQHFBXCW.mjs +10 -0
- package/dist/{chunk-MIF6BAPG.mjs → chunk-LSPDPDB6.mjs} +1 -1
- package/dist/chunk-MCN5JU6E.mjs +10 -0
- package/dist/chunk-MHAPHPNN.mjs +10 -0
- package/dist/{chunk-4AG2RUAZ.mjs → chunk-NMK4W6K3.mjs} +2 -2
- package/dist/chunk-O23QVPUT.mjs +10 -0
- package/dist/{chunk-WTAJLO6E.mjs → chunk-O6FPWOHR.mjs} +1 -1
- package/dist/chunk-OMWMNUTI.mjs +10 -0
- package/dist/{chunk-YU5NRJT6.mjs → chunk-ONBEVR2G.mjs} +1 -1
- package/dist/{chunk-XD43CVDT.mjs → chunk-OVJT5F2R.mjs} +1 -1
- package/dist/{chunk-YPEAGD2G.mjs → chunk-OWQRYRWF.mjs} +1 -1
- package/dist/{chunk-ZZIQF6XD.mjs → chunk-PLZ6ZFEO.mjs} +1 -1
- package/dist/{chunk-PD5ZXNGT.mjs → chunk-QMV2O57M.mjs} +2 -2
- package/dist/{chunk-C2VP5IEB.mjs → chunk-QWZBZ23U.mjs} +1 -1
- package/dist/{chunk-E22TWF63.mjs → chunk-QXXKOFWM.mjs} +2 -2
- package/dist/{chunk-SZN2J2ER.mjs → chunk-R6Q7UMQS.mjs} +1 -1
- package/dist/chunk-SI5WP6I7.mjs +10 -0
- package/dist/{chunk-36ZMHBG5.mjs → chunk-T6J7G3YL.mjs} +1 -1
- package/dist/chunk-TTVYMCU3.mjs +10 -0
- package/dist/chunk-TYKMNZJ4.mjs +11 -0
- package/dist/chunk-TZGK36KC.mjs +10 -0
- package/dist/chunk-UBLCUHRL.mjs +10 -0
- package/dist/{chunk-IVGNOQSQ.mjs → chunk-UH6QIGD3.mjs} +1 -1
- package/dist/chunk-UOWKAUCQ.mjs +10 -0
- package/dist/{chunk-OZMADP4Z.mjs → chunk-UPJHL37C.mjs} +2 -2
- package/dist/chunk-USUPPN73.mjs +10 -0
- package/dist/{chunk-XWJJ4V3O.mjs → chunk-UYAFH4CW.mjs} +2 -2
- package/dist/{chunk-KJ6ZSO3I.mjs → chunk-UYUYQFOW.mjs} +1 -1
- package/dist/chunk-VFO35ZLL.mjs +10 -0
- package/dist/chunk-VXZT2JR2.mjs +10 -0
- package/dist/{chunk-R3HHMCE5.mjs → chunk-WFYFHANE.mjs} +1 -1
- package/dist/{chunk-NYCG264A.mjs → chunk-X5ORCNAU.mjs} +2 -2
- package/dist/chunk-X5ZTXDQ4.mjs +10 -0
- package/dist/{chunk-BBYODNBO.mjs → chunk-X7CKWYUD.mjs} +1 -1
- package/dist/{chunk-6G7EUNZW.mjs → chunk-XAM3AXXK.mjs} +1 -1
- package/dist/{chunk-24R46WQW.mjs → chunk-XOS3JIQX.mjs} +1 -1
- package/dist/{chunk-TSHZ7JSR.mjs → chunk-XQC3DSTW.mjs} +1 -1
- package/dist/{chunk-VETO7WNN.mjs → chunk-Y3HXPORF.mjs} +2 -2
- package/dist/chunk-YDUKC7QS.mjs +10 -0
- package/dist/{chunk-P7BN7QDF.mjs → chunk-YFBMCK5O.mjs} +1 -1
- package/dist/{chunk-4RSUKS23.mjs → chunk-YYU46XNM.mjs} +2 -2
- package/dist/{chunk-Q6PGYMYI.mjs → chunk-Z3ZMWJSV.mjs} +1 -1
- package/dist/chunk-Z4QTH4TB.mjs +10 -0
- package/dist/{chunk-UNGYVWKZ.mjs → chunk-ZA2FH3MS.mjs} +1 -1
- package/dist/hooks/useContainerScopedRef.mjs +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useI18n.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLiveInteractionModality.mjs +1 -1
- package/dist/hooks/useMedia.mjs +1 -1
- package/dist/hooks/useMutationObserver.mjs +1 -1
- package/dist/hooks/usePortalContainer.mjs +1 -1
- package/dist/hooks/usePreventFocus.mjs +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -1
- package/dist/hooks/useTextSelection.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +65 -22
- package/dist/index.js +21 -21
- package/dist/index.mjs +1 -1
- package/dist/messageIds.mjs +1 -1
- package/dist/utils/colors.mjs +1 -1
- package/dist/utils/dom.mjs +1 -1
- package/dist/utils/isInShadowDOM.mjs +1 -1
- package/dist/utils/keyboards.mjs +1 -1
- package/dist/utils/strings.mjs +1 -1
- package/intl/ar.json +1 -0
- package/intl/cs.json +1 -0
- package/intl/cy.json +1 -0
- package/intl/da.json +1 -0
- package/intl/de.json +1 -0
- package/intl/el.json +1 -0
- package/intl/en-GB.json +1 -0
- package/intl/en.json +1 -0
- package/intl/es.json +1 -0
- package/intl/fi.json +1 -0
- package/intl/fr-CA.json +1 -0
- package/intl/fr.json +1 -0
- package/intl/he.json +1 -0
- package/intl/hr.json +1 -0
- package/intl/id.json +1 -0
- package/intl/it.json +1 -0
- package/intl/ja.json +1 -0
- package/intl/ko.json +1 -0
- package/intl/ms.json +1 -0
- package/intl/nb-NO.json +1 -0
- package/intl/nl.json +1 -0
- package/intl/pl.json +1 -0
- package/intl/pt-PT.json +1 -0
- package/intl/pt.json +1 -0
- package/intl/ru.json +1 -0
- package/intl/sk.json +1 -0
- package/intl/sl.json +1 -0
- package/intl/sv.json +1 -0
- package/intl/th.json +1 -0
- package/intl/tr.json +1 -0
- package/intl/uk.json +1 -0
- package/intl/zh-Hans.json +1 -0
- package/intl/zh-Hant.json +1 -0
- package/messages.json +4 -0
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-2F3CFR22.mjs +0 -10
- package/dist/chunk-2LFMBQKQ.mjs +0 -10
- package/dist/chunk-3BEG3MEX.mjs +0 -10
- package/dist/chunk-3BG6K2G2.mjs +0 -10
- package/dist/chunk-3KCSUNRV.mjs +0 -10
- package/dist/chunk-4JQUB53Q.mjs +0 -10
- package/dist/chunk-4MHBLLHV.mjs +0 -11
- package/dist/chunk-5BKC373Y.mjs +0 -10
- package/dist/chunk-5FK5AJ7A.mjs +0 -10
- package/dist/chunk-5SHHWKFM.mjs +0 -10
- package/dist/chunk-76DKF2SK.mjs +0 -10
- package/dist/chunk-7MMO7S3R.mjs +0 -10
- package/dist/chunk-AK7XHUQW.mjs +0 -10
- package/dist/chunk-DAS5QGJX.mjs +0 -10
- package/dist/chunk-DSV6CCI6.mjs +0 -10
- package/dist/chunk-F7PGMOQF.mjs +0 -10
- package/dist/chunk-FOKMDEP7.mjs +0 -10
- package/dist/chunk-FPFGTGUC.mjs +0 -10
- package/dist/chunk-IEOHIOGL.mjs +0 -10
- package/dist/chunk-IWZXZ5LU.mjs +0 -10
- package/dist/chunk-IXRSSEHQ.mjs +0 -10
- package/dist/chunk-J4OPD7OL.mjs +0 -10
- package/dist/chunk-K7VOXFSK.mjs +0 -10
- package/dist/chunk-MDE2FQHX.mjs +0 -10
- package/dist/chunk-MYJ733MN.mjs +0 -10
- package/dist/chunk-NJKSUI2F.mjs +0 -10
- package/dist/chunk-O4DA3TPW.mjs +0 -11
- package/dist/chunk-ONEE6UCM.mjs +0 -10
- package/dist/chunk-Q4SEEMIX.mjs +0 -10
- package/dist/chunk-R4MOUAJW.mjs +0 -10
- package/dist/chunk-U3T5JTZ7.mjs +0 -10
- package/dist/chunk-UDMNDUBO.mjs +0 -10
- package/dist/chunk-VGFPT43C.mjs +0 -10
- package/dist/chunk-VJUBKX3W.mjs +0 -10
- /package/dist/{chunk-RXSX2RKA.mjs → chunk-SBGZCLF4.mjs} +0 -0
- /package/dist/{chunk-DAN62T2M.mjs → chunk-TIGGKOJQ.mjs} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-GQIS4QBN.mjs';import {a}from'./chunk-S4HLMIFK.mjs';import {j as j$1,l,c,u,e as e$1}from'./chunk-PPHSLODC.mjs';import {a as a$1}from'./chunk-ETM4MNG4.mjs';import {e,j as j$2,i,b,d}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect,version}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var Z="react-aria-clear-focus",ee="react-aria-focus";function ie(e,t){let r=useRef(true),o=useRef(null),i=u(e);useEffect(()=>(r.current=true,()=>{r.current=false;}),[]),useEffect(()=>{let s=o.current;r.current?r.current=false:(!s||t.some((a,u)=>!Object.is(a,s[u])))&&i(),o.current=t;},t);}function ue(e,t){let r=useRef(true),o=useRef(null);a$1(()=>(r.current=true,()=>{r.current=false;}),[]),a$1(()=>{r.current?r.current=false:(!o.current||t.some((i,s)=>!Object.is(i,o[s])))&&e(),o.current=t;},t);}function F(e){let{ref:t,box:r,onResize:o}=e,i=u(o);useEffect(()=>{let s=t?.current;if(!s)return;let a=b(s);if(typeof a.ResizeObserver>"u")return a.addEventListener("resize",i,false),()=>{a.removeEventListener("resize",i,false);};{let u=new a.ResizeObserver(l=>{l.length&&i();});return u.observe(s,{box:r}),()=>{s&&u.unobserve(s);}}},[t,r]);}var p=100,g=600,n={isOpen:false,screenWidth:0,screenHeight:0,screenAngle:0,screenTimeout:0,startTimeStamp:0,endTimeStamp:0,resizeTimeStamp:0,resizeTimeout:0},j=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);if(process.env.NODE_ENV==="test"&&typeof window<"u"&&!Reflect.has(window,"visualViewport")){let e=Object.assign(new EventTarget,{offsetTop:0,offsetLeft:0,pageTop:0,pageLeft:0,scale:1});Reflect.defineProperty(e,"width",{get:()=>window.innerWidth,configurable:true}),Reflect.defineProperty(e,"height",{get:()=>window.innerHeight,configurable:true}),Reflect.defineProperty(window,"visualViewport",{value:e,configurable:true,writable:true});}if(process.env.NODE_ENV==="test"&&typeof window<"u"&&!Reflect.has(window.screen,"orientation")){let e=Object.assign(new EventTarget,{type:"landscape-primary"});Reflect.defineProperty(window.screen,"orientation",{value:e,configurable:true,writable:true}),Reflect.defineProperty(window.screen.orientation,"angle",{get:()=>window.orientation??0,configurable:true});}function w(){let e=Number(window.visualViewport?.width??window.innerWidth),t=Number(window.visualViewport?.height??window.innerHeight),r=Number(window.visualViewport?.scale??1);return {width:e*r,height:t*r,angle:window.screen.orientation?.angle??0}}function y(e$1){if(!e$1||e$1.localName!=="iframe"&&e$1.localName!=="frame")return null;let t=e$1.contentDocument;return t&&(W(e$1),e(t.defaultView,"focus",x,{capture:true,passive:true}),e(t.defaultView,"blur",D,{passive:true}),e(t,"load",S,{capture:true,passive:true})),t}function W(e$1){for(let t=e$1.getRootNode?.();d(t);t=t.host.getRootNode())e(t,"focus",x,{capture:true,passive:true}),e(t,"load",S,{capture:true,passive:true});}function S(e){y(j$2(e));}function I(e){for(let t=y(e);t;t=y(e))e=i(t);return e}function _(){return document.hasFocus()?I(i()):null}function k(e){n.resizeTimeStamp<=e.timeStamp+50&&(n.resizeTimeStamp=e.timeStamp+150,window.clearTimeout(n.resizeTimeout),n.resizeTimeout=window.setTimeout(N,150));}function N(){let e=a("viewport");if(l()&&e?.includes("overlays-content"))return;let t=performance.now(),r=w(),o=t-n.startTimeStamp,i=n.screenHeight-r.height,s=n.screenAngle-r.angle;Math.abs(s)%180&&n.screenWidth-r.height<p&&(n.screenWidth=r.width,n.screenHeight=r.height,n.screenAngle=r.angle,i=0),o>g&&(window.clearTimeout(n.screenTimeout),n.screenTimeout=window.setTimeout(()=>{let a=_(),u=P(a),l=w();Math.abs(n.screenAngle-l.angle)%180||n.isOpen&&u||(n.screenWidth=l.width,n.screenHeight=l.height,n.screenAngle=l.angle,n.isOpen=false);},g)),o<=g&&i>=p&&(n.endTimeStamp=t),n.isOpen=i>=p;}function U(){let e=w(),t=n.screenAngle-e.angle;if(Math.abs(t)%180&&!n.isOpen){let r=n.screenWidth,o=n.screenHeight;n.screenWidth=o,n.screenHeight=r;}n.isOpen||(n.screenAngle=e.angle);}function x(e){let t=j$2(e);W(t);let r=P(t),o=performance.now(),i=w(),s=n.screenHeight-i.height;s<p&&r&&(n.screenWidth=i.width,n.screenHeight=i.height,n.screenAngle=i.angle,n.startTimeStamp=o),r&&window.clearTimeout(n.screenTimeout),s>=p&&r&&(n.endTimeStamp=o);}function D(){I(i());}function V(){let e$1=w();e(window.visualViewport,"resize",j$1()?N:k),e(window.screen.orientation,"change",U),e(window,"focus",x,{capture:true,passive:true}),e(window,"blur",D,{passive:true}),e(document,"load",S,{capture:true,passive:true}),n.screenWidth=e$1.width,n.screenHeight=e$1.height,n.screenAngle=e$1.angle;}typeof document<"u"&&(document.readyState!=="loading"?V():e(document,"DOMContentLoaded",V));function Re(){let e=a("viewport");return l()&&e?.includes("overlays-content")?false:n.isOpen?true:n.startTimeStamp?n.endTimeStamp>=n.startTimeStamp?true:performance.now()-n.startTimeStamp<=g?n.endTimeStamp>0||window.navigator.maxTouchPoints>0:false:window.navigator.maxTouchPoints>0}function P(e){let t=b(e);if(!(e instanceof t.Element)||!c(e))return false;let r=e instanceof t.HTMLTextAreaElement,o=e instanceof t.HTMLElement&&e.isContentEditable,i=e instanceof t.HTMLInputElement&&!j.has(e.type);return r||o||i}function Le(e){return e$1()?e.metaKey:e.ctrlKey}function Me(){return n.isOpen}function $(e,t){let{collection:r,onLoadMore:o,scrollOffset:i=1,direction:s="end"}=e,a=useRef(null),u$1=u(l=>{for(let h of l)h.isIntersecting&&o&&o();});a$1(()=>{if(t.current){let l=100*i,h=s==="start"?`${l}% 0px 0px 0px`:`0px ${l}% ${l}% ${l}%`;a.current=new IntersectionObserver(u$1,{root:b$1(t?.current),rootMargin:h}),a.current.observe(t.current);}return ()=>{a.current&&a.current.disconnect();}},[r,t,i,s]);}function Y(e){let t=version.split(".");return parseInt(t[0],10)>=19?e:e?"true":void 0}export{Z as a,ee as b,ie as c,ue as d,F as e,_ as f,Re as g,P as h,Le as i,Me as j,$ as k,Y as l};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {AvatarIcon as AvatarIcon$1}from'@baseline-ui/icons/16';import {AvatarIcon}from'@baseline-ui/icons/24';import i from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var u="_1017q4c5",m=a({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),v="_1017q4c4";var R={sm:AvatarIcon$1,md:AvatarIcon},f=i.forwardRef(({className:b,style:h,size:r="md",icon:g=R[r],name:o,imgSrc:a,showInitials:n,isDisabled:e,hasNotifications:x,imgLoading:y,"data-block-id":_,"data-block-class":q},A)=>{let[I,l]=i.useState(),[C,N]=i.useState(a);C!==a&&(N(a),l(void 0));let t=!!a&&I!==a,c=o?.split(" ").map(k=>[...k][0]).join("");return jsxs("span",{className:a$1(m({size:r,isDisabled:e}),"BaselineUI-Avatar",b),"data-disabled":e||void 0,ref:A,style:h,"aria-disabled":e,...t||!o?null:{role:"img","aria-label":o},"data-block-id":_,"data-block-class":q,children:[t?jsx("img",{src:a,alt:o,loading:y,className:v,onError:()=>{l(a);}}):null,!n&&!t&&jsx(g,{size:r==="sm"?16:24}),n&&!t?r==="sm"?[...c??""][0]:c:null,x?jsx("div",{"data-testid":"notification",className:u}):null]})});f.displayName="Avatar";export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-I7SMG6PT.mjs';import {i}from'./chunk-5VNC6UYE.mjs';import {c,b as b$2}from'./chunk-MHAPHPNN.mjs';import {c as c$1,b as b$3,a as a$3}from'./chunk-GFBRKKX4.mjs';import {d,f}from'./chunk-XOS3JIQX.mjs';import {c as c$2}from'./chunk-L3SNGDBH.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$4}from'./chunk-66CUIXA6.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$3}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import b from'react';import {jsx,jsxs}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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$6}from'./chunk-SVV6DLJH.mjs';import {a as a$k}from'./chunk-IM3E5JL4.mjs';import {a as a$a,b as b$5}from'./chunk-TFSBTGTQ.mjs';import {c as c$8,b as b$a}from'./chunk-EGLD5KVP.mjs';import {l,i,p,r,s,x,v,k,h as h$1,j,n,u,w,y,d,g,a as a$h,b as b$8}from'./chunk-YQHHE5AT.mjs';import {b,c as c$1}from'./chunk-X5ORCNAU.mjs';import {b as b$3,a as a$n}from'./chunk-XAM3AXXK.mjs';import {c as c$7,d as d$3}from'./chunk-QMV2O57M.mjs';import {a as a$4,g as g$1,c as c$6,e as e$2,b as b$9,f as f$1,d as d$4}from'./chunk-ZQOR4LCM.mjs';import {a as a$i}from'./chunk-UFN2OAM2.mjs';import {a as a$l}from'./chunk-D4NW56YQ.mjs';import {a as a$8,d as d$5}from'./chunk-GMALMQWI.mjs';import {a as a$f}from'./chunk-USMC34OO.mjs';import {b as b$6}from'./chunk-KG2EHFYA.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$c}from'./chunk-K5RYVERS.mjs';import {a as a$d}from'./chunk-NQIZ3U7Q.mjs';import {h,e as e$1,c,b as b$4,a as a$e}from'./chunk-AYQN3OH2.mjs';import {a as a$g}from'./chunk-JJG67M2S.mjs';import {e,k as k$1,l as l$1,c as c$4}from'./chunk-TZGK36KC.mjs';import {a as a$2,d as d$1,f as f$2,b as b$c}from'./chunk-GQIS4QBN.mjs';import {a as a$j}from'./chunk-Y2MIU76N.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {c as c$5}from'./chunk-HH4VLTF3.mjs';import {i as i$1,j as j$1,f,b as b$b}from'./chunk-KUDCYGII.mjs';import {a as a$9}from'./chunk-B3EZOXNU.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {l as l$2,u as u$1,q}from'./chunk-PPHSLODC.mjs';import {b as b$1,c as c$2,a as a$m}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-SVIYLH7R.mjs';import {a as a$1,c as c$3}from'./chunk-ETM4MNG4.mjs';import {b as b$7,a as a$b,i as i$2,h as h$2,j as j$2,m}from'./chunk-SD43KVTU.mjs';import {createContext,forwardRef,useRef,useState,useMemo,useContext,useEffect,useCallback}from'react';import ro from'react-dom';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var $e=class{keyMap=new Map;columnCount;rows;constructor(e){this.keyMap=new Map,this.columnCount=e?.columnCount,this.rows=[];let l=n=>{let i=this.keyMap.get(n.key);e.visitNode&&(n=e.visitNode(n)),this.keyMap.set(n.key,n);let d=new Set,a=null,u=false;if(n.type==="item"){for(let c of n.childNodes)if(c.props?.colSpan!==void 0){u=true;break}}for(let c of n.childNodes)c.type==="cell"&&u&&(c.colspan=c.props?.colSpan,c.colSpan=c.props?.colSpan,c.colIndex=a?(a.colIndex??a.index)+(a.colSpan??1):c.index),c.type==="cell"&&c.parentKey==null&&(c.parentKey=n.key),d.add(c.key),a?(a.nextKey=c.key,c.prevKey=a.key):c.prevKey=null,l(c),a=c;if(a&&(a.nextKey=null),i)for(let c of i.childNodes)d.has(c.key)||o(c);},o=n=>{this.keyMap.delete(n.key);for(let i of n.childNodes)this.keyMap.get(i.key)===i&&o(i);},r=null;for(let[n,i]of e.items.entries()){let d={...i,level:i.level??0,key:i.key??"row-"+n,type:i.type??"row",value:i.value??null,hasChildNodes:true,childNodes:[...i.childNodes],rendered:i.rendered,textValue:i.textValue??"",index:i.index??n};r?(r.nextKey=d.key,d.prevKey=r.key):d.prevKey=null,this.rows.push(d),l(d),r=d;}r&&(r.nextKey=null);}*[Symbol.iterator](){yield*[...this.rows];}get size(){return [...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let l=this.keyMap.get(e);return l?l.prevKey??null:null}getKeyAfter(e){let l=this.keyMap.get(e);return l?l.nextKey??null:null}getFirstKey(){return [...this.rows][0]?.key}getLastKey(){let e=[...this.rows];return e[e.length-1]?.key}getItem(e){return this.keyMap.get(e)??null}at(e){let l=[...this.getKeys()];return this.getItem(l[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}};var Rl="row-header-column-"+Math.random().toString(36).slice(2),ut="row-header-column-"+Math.random().toString(36).slice(2);for(;Rl===ut;)ut="row-header-column-"+Math.random().toString(36).slice(2);function je(t,e){if(e.length===0)return [];let l=[],o=new Map;for(let a of e){let u=a.parentKey,c=[a];for(;u!=null;){let s=t.get(u);if(!s)break;if(o.has(s)){s.colSpan??=0,s.colSpan++,s.colspan=s.colSpan;let{column:b,index:f}=o.get(s);if(f>c.length)break;for(let p=f;p<c.length;p++)b.splice(p,0,null);for(let p=c.length;p<b.length;p++)b[p]&&o.has(b[p])&&(o.get(b[p]).index=p);}else s.colSpan=1,s.colspan=1,c.push(s),o.set(s,{column:c,index:c.length-1});u=s.parentKey;}l.push(c),a.index=l.length-1;}let r=Math.max(...l.map(a=>a.length)),n=Array(r).fill(0).map(()=>[]),i=0;for(let a of l){let u=r-1;for(let c of a){if(c){let s=n[u],b=s.reduce((f,p)=>f+(p.colSpan??1),0);if(b<i){let f={type:"placeholder",key:"placeholder-"+c.key,colspan:i-b,colSpan:i-b,index:b,value:null,rendered:null,level:u,hasChildNodes:false,childNodes:[],textValue:""};s.length>0&&(s[s.length-1].nextKey=f.key,f.prevKey=s[s.length-1].key),s.push(f);}s.length>0&&(s[s.length-1].nextKey=c.key,c.prevKey=s[s.length-1].key),c.level=u,c.colIndex=i,s.push(c);}u--;}i++;}let d=0;for(let a of n){let u=a.reduce((c,s)=>c+(s.colSpan??1),0);if(u<e.length){let c={type:"placeholder",key:"placeholder-"+a[a.length-1].key,colSpan:e.length-u,colspan:e.length-u,index:u,value:null,rendered:null,level:d,hasChildNodes:false,childNodes:[],textValue:"",prevKey:a[a.length-1].key};a.push(c);}d++;}return n.map((a,u)=>({type:"headerrow",key:"headerrow-"+u,index:u,value:null,rendered:null,level:0,hasChildNodes:true,childNodes:a,textValue:""}))}var Re=class extends $e{headerRows;columns;rowHeaderColumnKeys;body;_size=0;constructor(e,l,o){let r=new Set,n=null,i=[];if(o?.showSelectionCheckboxes){let s={type:"column",key:Rl,value:null,textValue:"",level:0,index:o?.showDragButtons?1:0,hasChildNodes:false,rendered:null,childNodes:[],props:{isSelectionCell:true}};i.unshift(s);}if(o?.showDragButtons){let s={type:"column",key:ut,value:null,textValue:"",level:0,index:0,hasChildNodes:false,rendered:null,childNodes:[],props:{isDragButtonCell:true}};i.unshift(s);}let d=[],a=new Map,u=s=>{switch(s.type){case "body":n=s;break;case "column":a.set(s.key,s),s.hasChildNodes||(i.push(s),s.props.isRowHeader&&r.add(s.key));break;case "item":d.push(s);return}for(let b of s.childNodes)u(b);};for(let s of e)u(s);let c=je(a,i);if(c.forEach((s,b)=>d.splice(b,0,s)),super({columnCount:i.length,items:d,visitNode:s=>(s.column=i[s.index],s)}),this.columns=i,this.rowHeaderColumnKeys=r,this.body=n,this.headerRows=c,this._size=[...n.childNodes].length,this.rowHeaderColumnKeys.size===0){let s=this.columns.find(b=>!b.props?.isDragButtonCell&&!b.props?.isSelectionCell);s&&this.rowHeaderColumnKeys.add(s.key);}}*[Symbol.iterator](){yield*this.body.childNodes;}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey??null}getKeyAfter(e){return this.keyMap.get(e)?.nextKey??null}getFirstKey(){return c$6(this.body.childNodes)?.key??null}getLastKey(){return e$2(this.body.childNodes)?.key??null}getItem(e){return e===this.body.key?this.body:this.keyMap.get(e)??null}at(e){let l=[...this.getKeys()];return this.getItem(l[e])}getChildren(e){if(e===this.body.key)return this.body.childNodes;let l=this.getItem(e);return l?.type==="item"?[...l.childNodes].filter(o=>o.type==="cell"):super.getChildren(e)}getTextValue(e){let l=this.getItem(e);if(!l)return "";if(l.textValue)return l.textValue;let o=this.rowHeaderColumnKeys;if(o){let r=[];for(let n of l.childNodes){let i=this.columns[n.index];if(o.has(i.key)&&n.textValue&&r.push(n.textValue),r.length===o.size)break}return r.join(" ")}return ""}};var Kl={"ar-AE":{colorSwatchPicker:"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u0623\u0644\u0648\u0627\u0646",dropzoneLabel:"DropZone",selectPlaceholder:"\u062D\u062F\u062F \u0639\u0646\u0635\u0631\u064B\u0627",tableResizer:"\u0623\u062F\u0627\u0629 \u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645"},"bg-BG":{colorSwatchPicker:"\u0426\u0432\u0435\u0442\u043E\u0432\u0438 \u043C\u043E\u0441\u0442\u0440\u0438",dropzoneLabel:"DropZone",selectPlaceholder:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043F\u0440\u0435\u0434\u043C\u0435\u0442",tableResizer:"\u041F\u0440\u0435\u043E\u0440\u0430\u0437\u043C\u0435\u0440\u0438\u0442\u0435\u043B"},"cs-CZ":{colorSwatchPicker:"Vzorky barev",dropzoneLabel:"M\xEDsto pro p\u0159eta\u017Een\xED",selectPlaceholder:"Vyberte polo\u017Eku",tableResizer:"Zm\u011Bna velikosti"},"da-DK":{colorSwatchPicker:"Farvepr\xF8ver",dropzoneLabel:"DropZone",selectPlaceholder:"V\xE6lg et element",tableResizer:"St\xF8rrelses\xE6ndring"},"de-DE":{colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element w\xE4hlen",tableResizer:"Gr\xF6\xDFenanpassung"},"el-GR":{colorSwatchPicker:"\u03A7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03AC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1\u03C4\u03B1",dropzoneLabel:"DropZone",selectPlaceholder:"\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03AD\u03BD\u03B1 \u03B1\u03BD\u03C4\u03B9\u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF",tableResizer:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2"},"en-US":{selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"},"es-ES":{colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un art\xEDculo",tableResizer:"Cambiador de tama\xF1o"},"et-EE":{colorSwatchPicker:"V\xE4rvin\xE4idised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige \xFCksus",tableResizer:"Suuruse muutja"},"fi-FI":{colorSwatchPicker:"V\xE4rimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"},"fr-FR":{colorSwatchPicker:"\xC9chantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"S\xE9lectionner un \xE9l\xE9ment",tableResizer:"Redimensionneur"},"he-IL":{colorSwatchPicker:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05D5\u05EA \u05E6\u05D1\u05E2",dropzoneLabel:"DropZone",selectPlaceholder:"\u05D1\u05D7\u05E8 \u05E4\u05E8\u05D9\u05D8",tableResizer:"\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D2\u05D5\u05D3\u05DC"},"hr-HR":{colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spu\u0161tanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veli\u010Dine"},"hu-HU":{colorSwatchPicker:"Sz\xEDnt\xE1rak",dropzoneLabel:"DropZone",selectPlaceholder:"V\xE1lasszon ki egy elemet",tableResizer:"\xC1tm\xE9retez\u0151"},"it-IT":{colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"},"ja-JP":{colorSwatchPicker:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",dropzoneLabel:"\u30C9\u30ED\u30C3\u30D7\u30BE\u30FC\u30F3",selectPlaceholder:"\u9805\u76EE\u3092\u9078\u629E",tableResizer:"\u30B5\u30A4\u30BA\u5909\u66F4\u30C4\u30FC\u30EB"},"ko-KR":{colorSwatchPicker:"\uC0C9\uC0C1 \uACAC\uBCF8",dropzoneLabel:"\uB4DC\uB86D \uC601\uC5ED",selectPlaceholder:"\uD56D\uBAA9 \uC120\uD0DD",tableResizer:"\uD06C\uAE30 \uC870\uC815\uAE30"},"lt-LT":{colorSwatchPicker:"Spalv\u0173 pavyzd\u017Eiai",dropzoneLabel:"\u201EDropZone\u201C",selectPlaceholder:"Pasirinkite element\u0105",tableResizer:"Dyd\u017Eio keitiklis"},"lv-LV":{colorSwatchPicker:"Kr\u0101su paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izv\u0113l\u0113ties vienumu",tableResizer:"Izm\u0113ra main\u012Bt\u0101js"},"nb-NO":{colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"St\xF8rrelsesendrer"},"nl-NL":{colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"},"pl-PL":{colorSwatchPicker:"Pr\xF3bki kolor\xF3w",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"},"pt-BR":{colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"},"pt-PT":{colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"},"ro-RO":{colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zon\u0103 de plasare",selectPlaceholder:"Selecta\u021Bi un element",tableResizer:"Instrument de redimensionare"},"ru-RU":{colorSwatchPicker:"\u0426\u0432\u0435\u0442\u043E\u0432\u044B\u0435 \u043E\u0431\u0440\u0430\u0437\u0446\u044B",dropzoneLabel:"DropZone",selectPlaceholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442",tableResizer:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u0430"},"sk-SK":{colorSwatchPicker:"Vzorkovn\xEDky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte polo\u017Eku",tableResizer:"N\xE1stroj na zmenu ve\u013Ekosti"},"sl-SI":{colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"},"sr-SP":{colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veli\u010Dine"},"sv-SE":{colorSwatchPicker:"F\xE4rgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"V\xE4lj en artikel",tableResizer:"Storleks\xE4ndrare"},"tr-TR":{colorSwatchPicker:"Renk \xF6rnekleri",dropzoneLabel:"B\u0131rakma B\xF6lgesi",selectPlaceholder:"Bir \xF6\u011Fe se\xE7in",tableResizer:"Yeniden boyutland\u0131r\u0131c\u0131"},"uk-UA":{colorSwatchPicker:"\u0417\u0440\u0430\u0437\u043A\u0438 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",dropzoneLabel:"DropZone",selectPlaceholder:"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u0435\u043B\u0435\u043C\u0435\u043D\u0442",tableResizer:"\u0417\u0430\u0441\u0456\u0431 \u0437\u043C\u0456\u043D\u0435\u043D\u043D\u044F \u0440\u043E\u0437\u043C\u0456\u0440\u0443"},"zh-CN":{colorSwatchPicker:"\u989C\u8272\u8272\u677F",dropzoneLabel:"\u653E\u7F6E\u533A\u57DF",selectPlaceholder:"\u9009\u62E9\u4E00\u4E2A\u9879\u76EE",tableResizer:"\u5C3A\u5BF8\u8C03\u6574\u5668"},"zh-TW":{colorSwatchPicker:"\u8272\u7968",dropzoneLabel:"\u653E\u7F6E\u5340",selectPlaceholder:"\u9078\u53D6\u9805\u76EE",tableResizer:"\u5927\u5C0F\u8ABF\u6574\u5668"}};function jl(t){return t!=null&&(!isNaN(t)||String(t).match(/^(\d+)(?=%$)/)!==null)}function Ul(t){if(!t||typeof t=="number")return 1;let e=t.match(/^(.+)(?=fr$)/);return e?parseFloat(e[0]):(process.env.NODE_ENV!=="production"&&console.warn(`width: ${t} is not a supported format, width should be a number (ex. 150), percentage (ex. '50%') or fr unit (ex. '2fr')`,"defaulting to '1fr'"),1)}function mt(t,e){if(typeof t=="string"){let l=t.match(/^(\d+)(?=%$)/);if(!l)throw new Error("Only percentages or numbers are supported for static column widths");return e*(parseFloat(l[0])/100)}return t}function pt(t,e){return t!=null?mt(t,e):Number.MAX_SAFE_INTEGER}function bt(t,e){return t!=null?mt(t,e):0}function Dl(t,e,l,o,r){let n=t,i=Math.floor(t),d=t-i>0;t=i;let a=false,u=e.map((s,b)=>{let f=l.get(s.key)!=null?l.get(s.key)??"1fr":s.width??s.defaultWidth??o?.(b)??"1fr",p=false,m=0,T=0,g=0;jl(f)?(m=mt(f,t),p=true):(T=Ul(f),T<=0&&(p=true));let w=bt(s.minWidth??r?.(b)??0,t),S=pt(s.maxWidth,t),C=Math.max(w,Math.min(m,S));return p?g=C:m>C&&(p=true,g=C),p||(a=true),{frozen:p,baseSize:m,hypotheticalMainSize:C,min:w,max:S,flex:T,targetMainSize:g,violation:0}});for(;a;){let s=0,b=0;u.forEach(m=>{m.frozen?s+=m.targetMainSize:(s+=m.baseSize,b+=m.flex);});let f=t-s;f>0&&u.forEach(m=>{if(!m.frozen){let T=m.flex/b;m.targetMainSize=m.baseSize+T*f;}});let p=0;u.forEach(m=>{if(m.violation=0,!m.frozen){let{min:T,max:g,targetMainSize:w}=m;m.targetMainSize=Math.max(T,Math.min(w,g)),m.violation=m.targetMainSize-w,p+=m.violation;}}),a=false,u.forEach(m=>{p===0||Math.sign(p)===Math.sign(m.violation)?m.frozen=true:m.frozen||(a=true);});}let c=Zl(u);if(d&&c.length>0){let s=n.toString().split(".")[1],b=c[c.length-1].toString();c[c.length-1]=+(b+"."+s);}return c}function Zl(t){let e=0,l=0,o=[];return t.forEach(function(r){let n=r.targetMainSize,i=Math.round(n+e)-l;e+=n,l+=i,o.push(i);}),o}var Ue=class{getDefaultWidth;getDefaultMinWidth;columnWidths=new Map;columnMinWidths=new Map;columnMaxWidths=new Map;constructor(e){this.getDefaultWidth=e?.getDefaultWidth??(()=>"1fr"),this.getDefaultMinWidth=e?.getDefaultMinWidth??(()=>75);}splitColumnsIntoControlledAndUncontrolled(e){return e.reduce((l,o)=>(o.props.width!=null?l[0].set(o.key,o):l[1].set(o.key,o),l),[new Map,new Map])}recombineColumns(e,l,o,r){return new Map(e.map(n=>o.has(n.key)?[n.key,l.get(n.key)]:[n.key,r.get(n.key).props.width]))}getInitialUncontrolledWidths(e){return new Map(Array.from(e).map(([l,o])=>[l,o.props.defaultWidth??this.getDefaultWidth?.(o)??"1fr"]))}getColumnWidth(e){return this.columnWidths.get(e)??0}getColumnMinWidth(e){return this.columnMinWidths.get(e)??0}getColumnMaxWidth(e){return this.columnMaxWidths.get(e)??0}resizeColumnWidth(e,l,o,r){let n=this.columnWidths,i=true,d=new Map;return r=Math.max(this.getColumnMinWidth(o),Math.min(this.getColumnMaxWidth(o),Math.floor(r))),e.columns.forEach(a=>{a.key===o?(d.set(a.key,r),i=false):i?d.set(a.key,n.get(a.key)??0):d.set(a.key,a.props.width??l.get(a.key));}),d}buildColumnWidths(e,l,o){return this.columnWidths=new Map,this.columnMinWidths=new Map,this.columnMaxWidths=new Map,Dl(e,l.columns.map(n=>({...n.props,key:n.key})),o,n=>this.getDefaultWidth(l.columns[n]),n=>this.getDefaultMinWidth(l.columns[n])).forEach((n,i)=>{let d=l.columns[i].key,a=l.columns[i];this.columnWidths.set(d,n),this.columnMinWidths.set(d,bt(a.props.minWidth??this.getDefaultMinWidth(a),e)),this.columnMaxWidths.set(d,pt(a.props.maxWidth,e));}),this.columnWidths}};function ht(t,e){let{getDefaultWidth:l,getDefaultMinWidth:o,tableWidth:r=0}=t,[n,i]=useState(null),d=useMemo(()=>new Ue({getDefaultWidth:l,getDefaultMinWidth:o}),[l,o]),[a,u]=useMemo(()=>d.splitColumnsIntoControlledAndUncontrolled(e.collection.columns),[e.collection.columns,d]),[c,s]=useState(()=>d.getInitialUncontrolledWidths(u)),[b,f]=useState(e.collection.columns);if(e.collection.columns!==b){if(e.collection.columns.length!==b.length||e.collection.columns.some((S,C)=>S.key!==b[C].key)){let S=d.getInitialUncontrolledWidths(u);s(S);}f(e.collection.columns);}let p=useMemo(()=>d.recombineColumns(e.collection.columns,c,u,a),[e.collection.columns,c,u,a,d]),m=useCallback(S=>{i(S);},[i]),T=useCallback((S,C)=>{let D=d.resizeColumnWidth(e.collection,c,S,C),P=new Map(Array.from(u).map(([h])=>[h,D.get(h)]));return P.set(S,C),s(P),D},[u,s,d,e.collection,c]),g=useCallback(()=>{i(null);},[i]),w=useMemo(()=>d.buildColumnWidths(r,e.collection,p),[r,e.collection,p,d]);return useMemo(()=>({resizingColumn:n,updateResizedColumns:T,startResize:m,endResize:g,getColumnWidth:S=>d.getColumnWidth(S),getColumnMinWidth:S=>d.getColumnMinWidth(S),getColumnMaxWidth:S=>d.getColumnMaxWidth(S),tableState:e,columnWidths:w}),[d,w,n,T,m,g,e])}function Ml(t){let{collection:e,focusMode:l}=t,o=t.UNSAFE_selectionState||a$4(t),r=useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),n=o.setFocusedKey;o.setFocusedKey=(a,u)=>{if(l==="cell"&&a!=null){let c=e.getItem(a);if(c?.type==="item"){let s=b$9(c,e);u==="last"?a=e$2(s)?.key??null:a=c$6(s)?.key??null;}}n(a,u);};let i=useMemo(()=>new f$1(e,o),[e,o]),d=useRef(null);return useEffect(()=>{if(o.focusedKey!=null&&d.current&&!e.getItem(o.focusedKey)){let a=d.current.getItem(o.focusedKey),u=a?.parentKey!=null&&(a.type==="cell"||a.type==="rowheader"||a.type==="column")?d.current.getItem(a.parentKey):a;if(!u){o.setFocusedKey(null);return}let c=d.current.rows,s=e.rows,b=c.length-s.length,f=Math.min(b>1?Math.max(u.index-b+1,0):u.index,s.length-1),p=null;for(let m=Math.max(0,f);m<s.length;m++)if(!i.isDisabled(s[m].key)&&s[m].type!=="headerrow"){p=s[m];break}if(p===null){for(let m=f-1;m>=0;m--)if(!i.isDisabled(s[m].key)&&s[m].type!=="headerrow"){p=s[m];break}}if(p){let m=p.hasChildNodes?[...b$9(p,e)]:[],T=p.hasChildNodes&&u!==a&&a&&a.index<m.length?m[a.index].key:p.key;o.setFocusedKey(T);}else o.setFocusedKey(null);}d.current=e;},[e,i,o,o.focusedKey]),{collection:e,disabledKeys:r,isKeyboardNavigationDisabled:false,selectionManager:i}}var Jl={ascending:"descending",descending:"ascending"};function gt(t){let[e,l]=useState(false),{selectionMode:o="none",showSelectionCheckboxes:r,showDragButtons:n,treeColumn:i=null}=t,d=useMemo(()=>({showSelectionCheckboxes:r&&o!=="none",showDragButtons:n,selectionMode:o,columns:[]}),[t.children,r,o,n]),a=g$1(t,useCallback(f=>new Re(f,null,d),[d]),d),{disabledKeys:u,selectionManager:c}=Ml({...t,collection:a,disabledBehavior:t.disabledBehavior||"selection"}),[s,b]=a$5(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,t.onExpandedChange);return {collection:a,disabledKeys:u,selectionManager:c,showSelectionCheckboxes:t.showSelectionCheckboxes||false,sortDescriptor:t.sortDescriptor??null,isKeyboardNavigationDisabled:a.size===0||e,setKeyboardNavigationDisabled:l,sort(f,p){t.onSortChange?.({column:f,direction:p??(t.sortDescriptor?.column===f?Jl[t.sortDescriptor.direction]:"ascending")});},expandedKeys:s,toggleKey(f){b(p=>{let m=new Set(p);return m.has(f)?m.delete(f):m.add(f),m});},treeColumn:i}}function Tt(t,e){let l=useMemo(()=>e?t.collection.filter(e):t.collection,[t.collection,e]),o=t.selectionManager.withCollection(l);return {...t,collection:l,selectionManager:o}}var he=class{collection;disabledKeys;disabledBehavior;direction;collator;layoutDelegate;focusMode;constructor(e){if(this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||"all",this.direction=e.direction,this.collator=e.collator,!e.layout&&!e.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=e.layoutDelegate||(e.layout?new St(e.layout):new a$n(e.ref)),this.focusMode=e.focusMode??"row";}isCell(e){return e.type==="cell"}isRow(e){return e.type==="row"||e.type==="item"}isDisabled(e){return this.disabledBehavior==="all"&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!=="selection"}findPreviousKey(e,l,o=false){let r=e!=null?this.collection.getKeyBefore(e):this.collection.getLastKey();for(;r!=null;){let n=this.collection.getItem(r);if(!n)return null;if((o||!this.isDisabled(n))&&(!l||l(n)))return r;r=this.collection.getKeyBefore(r);}return null}findNextKey(e,l,o=false){let r=e!=null?this.collection.getKeyAfter(e):this.collection.getFirstKey();for(;r!=null;){let n=this.collection.getItem(r);if(!n)return null;if((o||!this.isDisabled(n))&&(!l||l(n)))return r;if(r=this.collection.getKeyAfter(r),r==null)return null}return null}getKeyForItemInRowByIndex(e,l=0){if(l<0)return null;let o=this.collection.getItem(e);if(!o)return null;let r=0;for(let n of b$9(o,this.collection)){if(n.colSpan&&n.colSpan+r>l||(n.colSpan&&(r=r+n.colSpan-1),r===l))return n.key??null;r++;}return null}getKeyBelow(e,l){let o=e,r=this.collection.getItem(o);if(!r||(this.isCell(r)&&(o=r.parentKey??null),o==null))return null;if(o=this.findNextKey(o,n=>n.type==="item",l?.includeDisabled),o!=null){if(this.isCell(r)){let n=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(o,n)}if(this.focusMode==="row")return o}return null}getKeyAbove(e,l){let o=e,r=this.collection.getItem(o);if(!r||(this.isCell(r)&&(o=r.parentKey??null),o==null))return null;if(o=this.findPreviousKey(o,n=>n.type==="item",l?.includeDisabled),o!=null){if(this.isCell(r)){let n=r.colIndex?r.colIndex:r.index;return this.getKeyForItemInRowByIndex(o,n)}if(this.focusMode==="row")return o}return null}getKeyRightOf(e){let l=this.collection.getItem(e);if(!l)return null;if(this.isRow(l)){let o=b$9(l,this.collection);return (this.direction==="rtl"?e$2(o)?.key:c$6(o)?.key)??null}if(this.isCell(l)&&l.parentKey!=null){let o=this.collection.getItem(l.parentKey);if(!o)return null;let r=b$9(o,this.collection),n=(this.direction==="rtl"?d$4(r,l.index-1):d$4(r,l.index+1))??null;return n?n.key??null:this.focusMode==="row"?l.parentKey??null:(this.direction==="rtl"?this.getFirstKey(e):this.getLastKey(e))??null}return null}getKeyLeftOf(e){let l=this.collection.getItem(e);if(!l)return null;if(this.isRow(l)){let o=b$9(l,this.collection);return (this.direction==="rtl"?c$6(o)?.key:e$2(o)?.key)??null}if(this.isCell(l)&&l.parentKey!=null){let o=this.collection.getItem(l.parentKey);if(!o)return null;let r=b$9(o,this.collection),n=(this.direction==="rtl"?d$4(r,l.index+1):d$4(r,l.index-1))??null;return n?n.key??null:this.focusMode==="row"?l.parentKey??null:(this.direction==="rtl"?this.getLastKey(e):this.getFirstKey(e))??null}return null}getFirstKey(e,l){let o=e??null,r;if(o!=null){if(r=this.collection.getItem(o),!r)return null;if(this.isCell(r)&&!l&&r.parentKey!=null){let n=this.collection.getItem(r.parentKey);return n?c$6(b$9(n,this.collection))?.key??null:null}}if(o=this.findNextKey(void 0,n=>n.type==="item"),o!=null&&(r&&this.isCell(r)&&l||this.focusMode==="cell")){let n=this.collection.getItem(o);if(!n)return null;o=c$6(b$9(n,this.collection))?.key??null;}return o}getLastKey(e,l){let o=e??null,r;if(o!=null){if(r=this.collection.getItem(o),!r)return null;if(this.isCell(r)&&!l&&r.parentKey!=null){let n=this.collection.getItem(r.parentKey);if(!n)return null;let i=b$9(n,this.collection);return e$2(i)?.key??null}}if(o=this.findPreviousKey(void 0,n=>n.type==="item"),o!=null&&(r&&this.isCell(r)&&l||this.focusMode==="cell")){let n=this.collection.getItem(o);if(!n)return null;let i=b$9(n,this.collection);o=e$2(i)?.key??null;}return o}getKeyPageAbove(e){let l=e,o=this.layoutDelegate.getItemRect(l);if(!o)return null;let r=Math.max(0,o.y+o.height-this.layoutDelegate.getVisibleRect().height);for(;o&&o.y>r&&l!=null&&(l=this.getKeyAbove(l)??null,l!=null);)o=this.layoutDelegate.getItemRect(l);return l}getKeyPageBelow(e){let l=e,o=this.layoutDelegate.getItemRect(l);if(!o)return null;let r=this.layoutDelegate.getVisibleRect().height,n=Math.min(this.layoutDelegate.getContentSize().height,o.y+r);for(;o&&o.y+o.height<n;){let i=this.getKeyBelow(l);if(i==null)break;o=this.layoutDelegate.getItemRect(i),l=i;}return l}getKeyForSearch(e,l){let o=l??null;if(!this.collator)return null;let r=this.collection;if(o=l??this.getFirstKey(),o==null)return null;let n=r.getItem(o);if(!n)return null;n.type==="cell"&&(o=n.parentKey??null);let i=false;for(;o!=null;){let d=r.getItem(o);if(!d)return null;if(d.textValue){let a=d.textValue.slice(0,e.length);if(this.collator.compare(a,e)===0)return this.isRow(d)&&this.focusMode==="cell"?c$6(b$9(d,this.collection))?.key??null:d.key}o=this.findNextKey(o,a=>a.type==="item"),o==null&&!i&&(o=this.getFirstKey(),i=true);}return null}},St=class{layout;constructor(e){this.layout=e;}getContentSize(){return this.layout.getContentSize()}getItemRect(e){return this.layout.getLayoutInfo(e)?.rect||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}};var ge=new WeakMap;function Il(t,e,l){let{isVirtualized:o,disallowTypeAhead:r,keyboardDelegate:n,focusMode:i,scrollRef:d,getRowText:a,onRowAction:u,onCellAction:c,escapeKeyBehavior:s="clearSelection",shouldSelectOnPressUp:b,keyboardNavigationBehavior:f="arrow"}=t,{selectionManager:p}=e;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let m=a$f({usage:"search",sensitivity:"base"}),{direction:T}=b$2(),g=e.selectionManager.disabledBehavior,w=useMemo(()=>n||new he({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:g,ref:l,direction:T,collator:m,focusMode:i}),[n,e.collection,e.disabledKeys,g,l,T,m,i]),{collectionProps:S}=c$7({ref:l,selectionManager:p,keyboardDelegate:w,isVirtualized:o,scrollRef:d,disallowTypeAhead:r,escapeKeyBehavior:s}),C=c$3(t.id);ge.set(e,{keyboardDelegate:w,actions:{onRowAction:u,onCellAction:c},shouldSelectOnPressUp:b,keyboardNavigationBehavior:f});let D=c$8({selectionManager:p,hasItemActions:!!(u||c),ref:l}),P=a$3(t,{labelable:true}),h=useCallback(N=>{if(p.isFocused){h$2(N.currentTarget,j$2(N))||p.setFocused(false);return}h$2(N.currentTarget,j$2(N))&&p.setFocused(true);},[p]),R=useMemo(()=>({onBlur:S.onBlur,onFocus:h}),[h,S.onBlur]),x=a$l(l,{isDisabled:e.collection.size!==0}),v=c$2(P,{role:"grid",id:C,"aria-multiselectable":p.selectionMode==="multiple"?"true":void 0},e.isKeyboardNavigationDisabled?R:S,e.collection.size===0&&{tabIndex:x?-1:0}||void 0,D);return o&&(v["aria-rowcount"]=e.collection.size,v["aria-colcount"]=e.collection.columnCount),b$a({getRowText:a},e),{gridProps:v}}var Ze=new WeakMap;function Ct(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function _e(t,e){let l=Ze.get(t);if(!l)throw new Error("Unknown grid");return `${l}-${Ct(e)}`}function wt(t,e,l){let o=Ze.get(t);if(!o)throw new Error("Unknown grid");return `${o}-${Ct(e)}-${Ct(l)}`}function De(t,e){return [...t.collection.rowHeaderColumnKeys].map(l=>wt(t,e,l)).join(" ")}var J={"ar-AE":{ascending:"\u062A\u0635\u0627\u0639\u062F\u064A",ascendingSort:t=>`\u062A\u0631\u062A\u064A\u0628 \u062D\u0633\u0628 \u0627\u0644\u0639\u0645\u0648\u062F ${t.columnName} \u0628\u062A\u0631\u062A\u064A\u0628 \u062A\u0635\u0627\u0639\u062F\u064A`,collapse:"\u0637\u064A",columnSize:t=>`${t.value} \u0628\u0627\u0644\u0628\u0643\u0633\u0644`,descending:"\u062A\u0646\u0627\u0632\u0644\u064A",descendingSort:t=>`\u062A\u0631\u062A\u064A\u0628 \u062D\u0633\u0628 \u0627\u0644\u0639\u0645\u0648\u062F ${t.columnName} \u0628\u062A\u0631\u062A\u064A\u0628 \u062A\u0646\u0627\u0632\u0644\u064A`,expand:"\u062A\u0645\u062F\u064A\u062F",resizerDescription:"\u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D Enter \u0644\u0628\u062F\u0621 \u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",select:"\u062A\u062D\u062F\u064A\u062F",selectAll:"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644",sortable:"\u0639\u0645\u0648\u062F \u0642\u0627\u0628\u0644 \u0644\u0644\u062A\u0631\u062A\u064A\u0628"},"bg-BG":{ascending:"\u0432\u044A\u0437\u0445\u043E\u0434\u044F\u0449",ascendingSort:t=>`\u0441\u043E\u0440\u0442\u0438\u0440\u0430\u043D\u043E \u043F\u043E \u043A\u043E\u043B\u043E\u043D\u0430 ${t.columnName} \u0432\u044A\u0432 \u0432\u044A\u0437\u0445\u043E\u0434\u044F\u0449 \u0440\u0435\u0434`,collapse:"\u0421\u0432\u0438\u0432\u0430\u043D\u0435",columnSize:t=>`${t.value} \u043F\u0438\u043A\u0441\u0435\u043B\u0430`,descending:"\u043D\u0438\u0437\u0445\u043E\u0434\u044F\u0449",descendingSort:t=>`\u0441\u043E\u0440\u0442\u0438\u0440\u0430\u043D\u043E \u043F\u043E \u043A\u043E\u043B\u043E\u043D\u0430 ${t.columnName} \u0432 \u043D\u0438\u0437\u0445\u043E\u0434\u044F\u0449 \u0440\u0435\u0434`,expand:"\u0420\u0430\u0437\u0448\u0438\u0440\u044F\u0432\u0430\u043D\u0435",resizerDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u201EEnter\u201C, \u0437\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0435\u0442\u0435 \u0434\u0430 \u043F\u0440\u0435\u043E\u0440\u0430\u0437\u043C\u0435\u0440\u044F\u0432\u0430\u0442\u0435",select:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435",selectAll:"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0441\u0438\u0447\u043A\u043E",sortable:"\u0441\u043E\u0440\u0442\u0438\u0440\u0430\u0449\u0430 \u043A\u043E\u043B\u043E\u043D\u0430"},"cs-CZ":{ascending:"vzestupn\u011B",ascendingSort:t=>`\u0159azeno vzestupn\u011B podle sloupce ${t.columnName}`,collapse:"Sbalit",columnSize:t=>`${t.value} pixel\u016F`,descending:"sestupn\u011B",descendingSort:t=>`\u0159azeno sestupn\u011B podle sloupce ${t.columnName}`,expand:"Rozt\xE1hnout",resizerDescription:"Stisknut\xEDm kl\xE1vesy Enter za\u010Dnete m\u011Bnit velikost",select:"Vybrat",selectAll:"Vybrat v\u0161e",sortable:"sloupec s mo\u017Enost\xED \u0159azen\xED"},"da-DK":{ascending:"stigende",ascendingSort:t=>`sorteret efter kolonne ${t.columnName} i stigende r\xE6kkef\xF8lge`,collapse:"Skjul",columnSize:t=>`${t.value} pixels`,descending:"faldende",descendingSort:t=>`sorteret efter kolonne ${t.columnName} i faldende r\xE6kkef\xF8lge`,expand:"Udvid",resizerDescription:"Tryk p\xE5 Enter for at \xE6ndre st\xF8rrelse",select:"V\xE6lg",selectAll:"V\xE6lg alle",sortable:"sorterbar kolonne"},"de-DE":{ascending:"aufsteigend",ascendingSort:t=>`sortiert nach Spalte ${t.columnName} in aufsteigender Reihenfolge`,collapse:"Reduzieren",columnSize:t=>`${t.value} Pixel`,descending:"absteigend",descendingSort:t=>`sortiert nach Spalte ${t.columnName} in absteigender Reihenfolge`,expand:"Erweitern",resizerDescription:"Eingabetaste zum Starten der Gr\xF6\xDFen\xE4nderung dr\xFCcken",select:"Ausw\xE4hlen",selectAll:"Alles ausw\xE4hlen",sortable:"sortierbare Spalte"},"el-GR":{ascending:"\u03B1\u03CD\u03BE\u03BF\u03C5\u03C3\u03B1",ascendingSort:t=>`\u03B4\u03B9\u03B1\u03BB\u03BF\u03B3\u03AE \u03B1\u03BD\u03AC \u03C3\u03C4\u03AE\u03BB\u03B7 ${t.columnName} \u03C3\u03B5 \u03B1\u03CD\u03BE\u03BF\u03C5\u03C3\u03B1 \u03C3\u03B5\u03B9\u03C1\u03AC`,collapse:"\u03A3\u03CD\u03BC\u03C0\u03C4\u03C5\u03BE\u03B7",columnSize:t=>`${t.value} pixel`,descending:"\u03C6\u03B8\u03AF\u03BD\u03BF\u03C5\u03C3\u03B1",descendingSort:t=>`\u03B4\u03B9\u03B1\u03BB\u03BF\u03B3\u03AE \u03B1\u03BD\u03AC \u03C3\u03C4\u03AE\u03BB\u03B7 ${t.columnName} \u03C3\u03B5 \u03C6\u03B8\u03AF\u03BD\u03BF\u03C5\u03C3\u03B1 \u03C3\u03B5\u03B9\u03C1\u03AC`,expand:"\u0391\u03BD\u03AC\u03C0\u03C4\u03C5\u03BE\u03B7",resizerDescription:"\u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Enter \u03B3\u03B9\u03B1 \u03AD\u03BD\u03B1\u03C1\u03BE\u03B7 \u03C4\u03B7\u03C2 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AE\u03C2 \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2",select:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE",selectAll:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03CC\u03BB\u03C9\u03BD",sortable:"\u03A3\u03C4\u03AE\u03BB\u03B7 \u03B4\u03B9\u03B1\u03BB\u03BF\u03B3\u03AE\u03C2"},"en-US":{select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:t=>`sorted by column ${t.columnName} in ascending order`,descendingSort:t=>`sorted by column ${t.columnName} in descending order`,columnSize:t=>`${t.value} pixels`,resizerDescription:"Press Enter to start resizing",expand:"Expand",collapse:"Collapse"},"es-ES":{ascending:"ascendente",ascendingSort:t=>`ordenado por columna ${t.columnName} en sentido ascendente`,collapse:"Contraer",columnSize:t=>`${t.value} p\xEDxeles`,descending:"descendente",descendingSort:t=>`ordenado por columna ${t.columnName} en orden descendente`,expand:"Ampliar",resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"},"et-EE":{ascending:"t\xF5usev j\xE4rjestus",ascendingSort:t=>`sorditud veeru j\xE4rgi ${t.columnName} t\xF5usvas j\xE4rjestuses`,collapse:"Ahenda",columnSize:t=>`${t.value} pikslit`,descending:"laskuv j\xE4rjestus",descendingSort:t=>`sorditud veeru j\xE4rgi ${t.columnName} laskuvas j\xE4rjestuses`,expand:"Laienda",resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali k\xF5ik",sortable:"sorditav veerg"},"fi-FI":{ascending:"nouseva",ascendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan nousevassa j\xE4rjestyksess\xE4`,collapse:"Pienenn\xE4",columnSize:t=>`${t.value} pikseli\xE4`,descending:"laskeva",descendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan laskevassa j\xE4rjestyksess\xE4`,expand:"Laajenna",resizerDescription:"Aloita koon muutos painamalla Enter-n\xE4pp\xE4int\xE4",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"},"fr-FR":{ascending:"croissant",ascendingSort:t=>`tri\xE9 en fonction de la colonne\xA0${t.columnName} par ordre croissant`,collapse:"R\xE9duire",columnSize:t=>`${t.value}\xA0pixels`,descending:"d\xE9croissant",descendingSort:t=>`tri\xE9 en fonction de la colonne\xA0${t.columnName} par ordre d\xE9croissant`,expand:"D\xE9velopper",resizerDescription:"Appuyez sur Entr\xE9e pour commencer le redimensionnement.",select:"S\xE9lectionner",selectAll:"S\xE9lectionner tout",sortable:"colonne triable"},"he-IL":{ascending:"\u05E2\u05D5\u05DC\u05D4",ascendingSort:t=>`\u05DE\u05D5\u05D9\u05DF \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4 ${t.columnName} \u05D1\u05E1\u05D3\u05E8 \u05E2\u05D5\u05DC\u05D4`,collapse:"\u05DB\u05D5\u05D5\u05E5",columnSize:t=>`${t.value} \u05E4\u05D9\u05E7\u05E1\u05DC\u05D9\u05DD`,descending:"\u05D9\u05D5\u05E8\u05D3",descendingSort:t=>`\u05DE\u05D5\u05D9\u05DF \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4 ${t.columnName} \u05D1\u05E1\u05D3\u05E8 \u05D9\u05D5\u05E8\u05D3`,expand:"\u05D4\u05E8\u05D7\u05D1",resizerDescription:"\u05D4\u05E7\u05E9 Enter \u05DB\u05D3\u05D9 \u05DC\u05E9\u05E0\u05D5\u05EA \u05D0\u05EA \u05D4\u05D2\u05D5\u05D3\u05DC",select:"\u05D1\u05D7\u05E8",selectAll:"\u05D1\u05D7\u05E8 \u05D4\u05DB\u05D5\u05DC",sortable:"\u05E2\u05DE\u05D5\u05D3\u05D4 \u05E9\u05E0\u05D9\u05EA\u05DF \u05DC\u05DE\u05D9\u05D9\u05DF"},"hr-HR":{ascending:"rastu\u0107i",ascendingSort:t=>`razvrstano po stupcima ${t.columnName} rastu\u0107em redoslijedom`,collapse:"Sa\u017Emi",columnSize:t=>`${t.value} piksela`,descending:"padaju\u0107i",descendingSort:t=>`razvrstano po stupcima ${t.columnName} padaju\u0107im redoslijedom`,expand:"Pro\u0161iri",resizerDescription:"Pritisnite Enter da biste zapo\u010Deli promenu veli\u010Dine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se mo\u017Ee razvrstati"},"hu-HU":{ascending:"n\xF6vekv\u0151",ascendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, n\xF6vekv\u0151 sorrendben`,collapse:"\xD6sszecsuk\xE1s",columnSize:t=>`${t.value} k\xE9ppont`,descending:"cs\xF6kken\u0151",descendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, cs\xF6kken\u0151 sorrendben`,expand:"Kibont\xE1s",resizerDescription:"Nyomja le az Enter billenty\u0171t az \xE1tm\xE9retez\xE9s megkezd\xE9s\xE9hez",select:"Kijel\xF6l\xE9s",selectAll:"\xD6sszes kijel\xF6l\xE9se",sortable:"rendezend\u0151 oszlop"},"it-IT":{ascending:"crescente",ascendingSort:t=>`in ordine crescente in base alla colonna ${t.columnName}`,collapse:"Comprimi",columnSize:t=>`${t.value} pixel`,descending:"decrescente",descendingSort:t=>`in ordine decrescente in base alla colonna ${t.columnName}`,expand:"Espandi",resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"},"ja-JP":{ascending:"\u6607\u9806",ascendingSort:t=>`\u5217 ${t.columnName} \u3092\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048`,collapse:"\u6298\u308A\u305F\u305F\u3080",columnSize:t=>`${t.value} \u30D4\u30AF\u30BB\u30EB`,descending:"\u964D\u9806",descendingSort:t=>`\u5217 ${t.columnName} \u3092\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048`,expand:"\u5C55\u958B",resizerDescription:"Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u30B5\u30A4\u30BA\u5909\u66F4\u3092\u958B\u59CB",select:"\u9078\u629E",selectAll:"\u3059\u3079\u3066\u9078\u629E",sortable:"\u4E26\u3079\u66FF\u3048\u53EF\u80FD\u306A\u5217"},"ko-KR":{ascending:"\uC624\uB984\uCC28\uC21C",ascendingSort:t=>`${t.columnName} \uC5F4\uC744 \uAE30\uC900\uC73C\uB85C \uC624\uB984\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uB428`,collapse:"\uC811\uAE30",columnSize:t=>`${t.value} \uD53D\uC140`,descending:"\uB0B4\uB9BC\uCC28\uC21C",descendingSort:t=>`${t.columnName} \uC5F4\uC744 \uAE30\uC900\uC73C\uB85C \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uB428`,expand:"\uD3BC\uCE58\uAE30",resizerDescription:"\uD06C\uAE30 \uC870\uC815\uC744 \uC2DC\uC791\uD558\uB824\uBA74 Enter\uB97C \uB204\uB974\uC138\uC694.",select:"\uC120\uD0DD",selectAll:"\uBAA8\uB450 \uC120\uD0DD",sortable:"\uC815\uB82C \uAC00\uB2A5\uD55C \uC5F4"},"lt-LT":{ascending:"did\u0117jan\u010Dia tvarka",ascendingSort:t=>`surikiuota pagal stulpel\u012F ${t.columnName} did\u0117jan\u010Dia tvarka`,collapse:"Sutraukti",columnSize:t=>`${t.value} piks.`,descending:"ma\u017E\u0117jan\u010Dia tvarka",descendingSort:t=>`surikiuota pagal stulpel\u012F ${t.columnName} ma\u017E\u0117jan\u010Dia tvarka`,expand:"I\u0161skleisti",resizerDescription:"Paspauskite \u201EEnter\u201C, kad prad\u0117tum\u0117te keisti dyd\u012F",select:"Pasirinkti",selectAll:"Pasirinkti visk\u0105",sortable:"rikiuojamas stulpelis"},"lv-LV":{ascending:"augo\u0161\u0101 sec\u012Bb\u0101",ascendingSort:t=>`k\u0101rtots p\u0113c kolonnas ${t.columnName} augo\u0161\u0101 sec\u012Bb\u0101`,collapse:"Sak\u013Caut",columnSize:t=>`${t.value} pikse\u013Ci`,descending:"dilsto\u0161\u0101 sec\u012Bb\u0101",descendingSort:t=>`k\u0101rtots p\u0113c kolonnas ${t.columnName} dilsto\u0161\u0101 sec\u012Bb\u0101`,expand:"Izv\u0113rst",resizerDescription:"Nospiediet Enter, lai s\u0101ktu izm\u0113ru main\u012B\u0161anu",select:"Atlas\u012Bt",selectAll:"Atlas\u012Bt visu",sortable:"k\u0101rtojam\u0101 kolonna"},"nb-NO":{ascending:"stigende",ascendingSort:t=>`sortert etter kolonne ${t.columnName} i stigende rekkef\xF8lge`,collapse:"Skjul",columnSize:t=>`${t.value} piksler`,descending:"synkende",descendingSort:t=>`sortert etter kolonne ${t.columnName} i synkende rekkef\xF8lge`,expand:"Utvid",resizerDescription:"Trykk p\xE5 Enter for \xE5 starte st\xF8rrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"},"nl-NL":{ascending:"oplopend",ascendingSort:t=>`gesorteerd in oplopende volgorde in kolom ${t.columnName}`,collapse:"Samenvouwen",columnSize:t=>`${t.value} pixels`,descending:"aflopend",descendingSort:t=>`gesorteerd in aflopende volgorde in kolom ${t.columnName}`,expand:"Uitvouwen",resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"},"pl-PL":{ascending:"rosn\u0105co",ascendingSort:t=>`posortowano wed\u0142ug kolumny ${t.columnName} w porz\u0105dku rosn\u0105cym`,collapse:"Zwi\u0144",columnSize:t=>`Liczba pikseli: ${t.value}`,descending:"malej\u0105co",descendingSort:t=>`posortowano wed\u0142ug kolumny ${t.columnName} w porz\u0105dku malej\u0105cym`,expand:"Rozwi\u0144",resizerDescription:"Naci\u015Bnij Enter, aby rozpocz\u0105\u0107 zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z mo\u017Cliwo\u015Bci\u0105 sortowania"},"pt-BR":{ascending:"crescente",ascendingSort:t=>`classificado pela coluna ${t.columnName} em ordem crescente`,collapse:"Recolher",columnSize:t=>`${t.value} pixels`,descending:"decrescente",descendingSort:t=>`classificado pela coluna ${t.columnName} em ordem decrescente`,expand:"Expandir",resizerDescription:"Pressione Enter para come\xE7ar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classific\xE1vel"},"pt-PT":{ascending:"ascendente",ascendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem ascendente`,collapse:"Colapsar",columnSize:t=>`${t.value} pixels`,descending:"descendente",descendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem descendente`,expand:"Expandir",resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna orden\xE1vel"},"ro-RO":{ascending:"cresc\u0103toare",ascendingSort:t=>`sortate dup\u0103 coloana ${t.columnName} \xEEn ordine cresc\u0103toare`,collapse:"Restr\xE2nge\u021Bi",columnSize:t=>`${t.value} pixeli`,descending:"descresc\u0103toare",descendingSort:t=>`sortate dup\u0103 coloana ${t.columnName} \xEEn ordine descresc\u0103toare`,expand:"Extinde\u021Bi",resizerDescription:"Ap\u0103sa\u021Bi pe Enter pentru a \xEEncepe redimensionarea",select:"Selectare",selectAll:"Selectare total\u0103",sortable:"coloan\u0103 sortabil\u0103"},"ru-RU":{ascending:"\u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u0435",ascendingSort:t=>`\u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 ${t.columnName} \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044F`,collapse:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",columnSize:t=>`${t.value} \u043F\u0438\u043A\u0441.`,descending:"\u0443\u0431\u044B\u0432\u0430\u043D\u0438\u0435",descendingSort:t=>`\u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 ${t.columnName} \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044F`,expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C",resizerDescription:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0443 Enter \u0434\u043B\u044F \u043D\u0430\u0447\u0430\u043B\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u0432",select:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",selectAll:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435",sortable:"\u0441\u043E\u0440\u0442\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u0441\u0442\u043E\u043B\u0431\u0435\u0446"},"sk-SK":{ascending:"vzostupne",ascendingSort:t=>`zoraden\xE9 zostupne pod\u013Ea st\u013Apca ${t.columnName}`,collapse:"Zbali\u0165",columnSize:t=>`Po\u010Det pixelov: ${t.value}`,descending:"zostupne",descendingSort:t=>`zoraden\xE9 zostupne pod\u013Ea st\u013Apca ${t.columnName}`,expand:"Rozbali\u0165",resizerDescription:"Stla\u010Den\xEDm kl\xE1vesu Enter za\u010Dnete zmenu ve\u013Ekosti",select:"Vybra\u0165",selectAll:"Vybra\u0165 v\u0161etko",sortable:"zoradite\u013En\xFD st\u013Apec"},"sl-SI":{ascending:"nara\u0161\u010Dajo\u010De",ascendingSort:t=>`razvr\u0161\u010Deno po stolpcu ${t.columnName} v nara\u0161\u010Dajo\u010Dem vrstnem redu`,collapse:"Strni",columnSize:t=>`${t.value} slikovnih pik`,descending:"padajo\u010De",descendingSort:t=>`razvr\u0161\u010Deno po stolpcu ${t.columnName} v padajo\u010Dem vrstnem redu`,expand:"Raz\u0161iri",resizerDescription:"Pritisnite tipko Enter da za\u010Dnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"},"sr-SP":{ascending:"rastu\u0107i",ascendingSort:t=>`sortirano po kolonama ${t.columnName} rastu\u0107im redosledom`,collapse:"Skupi",columnSize:t=>`${t.value} piksela`,descending:"padaju\u0107i",descendingSort:t=>`sortirano po kolonama ${t.columnName} padaju\u0107im redosledom`,expand:"Pro\u0161iri",resizerDescription:"Pritisnite Enter da biste zapo\u010Deli promenu veli\u010Dine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se mo\u017Ee sortirati"},"sv-SE":{ascending:"stigande",ascendingSort:t=>`sorterat p\xE5 kolumn ${t.columnName} i stigande ordning`,collapse:"D\xF6lj",columnSize:t=>`${t.value} pixlar`,descending:"fallande",descendingSort:t=>`sorterat p\xE5 kolumn ${t.columnName} i fallande ordning`,expand:"Expandera",resizerDescription:"Tryck p\xE5 Retur f\xF6r att b\xF6rja \xE4ndra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"},"tr-TR":{ascending:"artan s\u0131rada",ascendingSort:t=>`${t.columnName} s\xFCtuna g\xF6re artan d\xFCzende s\u0131rala`,collapse:"Daralt",columnSize:t=>`${t.value} piksel`,descending:"azalan s\u0131rada",descendingSort:t=>`${t.columnName} s\xFCtuna g\xF6re azalan d\xFCzende s\u0131rala`,expand:"Geni\u015Flet",resizerDescription:"Yeniden boyutland\u0131rmak i\xE7in Enter'a bas\u0131n",select:"Se\xE7",selectAll:"T\xFCm\xFCn\xFC Se\xE7",sortable:"S\u0131ralanabilir s\xFCtun"},"uk-UA":{ascending:"\u0432\u0438\u0441\u0445\u0456\u0434\u043D\u0438\u0439",ascendingSort:t=>`\u0432\u0456\u0434\u0441\u043E\u0440\u0442\u043E\u0432\u0430\u043D\u043E \u0437\u0430 \u0441\u0442\u043E\u0432\u043F\u0446\u0435\u043C ${t.columnName} \u0443 \u0432\u0438\u0441\u0445\u0456\u0434\u043D\u043E\u043C\u0443 \u043F\u043E\u0440\u044F\u0434\u043A\u0443`,collapse:"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438",columnSize:t=>`${t.value} \u043F\u0456\u043A\u0441.`,descending:"\u043D\u0438\u0437\u0445\u0456\u0434\u043D\u0438\u0439",descendingSort:t=>`\u0432\u0456\u0434\u0441\u043E\u0440\u0442\u043E\u0432\u0430\u043D\u043E \u0437\u0430 \u0441\u0442\u043E\u0432\u043F\u0446\u0435\u043C ${t.columnName} \u0443 \u043D\u0438\u0437\u0445\u0456\u0434\u043D\u043E\u043C\u0443 \u043F\u043E\u0440\u044F\u0434\u043A\u0443`,expand:"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438",resizerDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C Enter, \u0449\u043E\u0431 \u043F\u043E\u0447\u0430\u0442\u0438 \u0437\u043C\u0456\u043D\u0443 \u0440\u043E\u0437\u043C\u0456\u0440\u0443",select:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438",selectAll:"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0432\u0441\u0435",sortable:"\u0441\u043E\u0440\u0442\u0443\u0432\u0430\u043B\u044C\u043D\u0438\u0439 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C"},"zh-CN":{ascending:"\u5347\u5E8F",ascendingSort:t=>`\u6309\u5217 ${t.columnName} \u5347\u5E8F\u6392\u5E8F`,collapse:"\u6298\u53E0",columnSize:t=>`${t.value} \u50CF\u7D20`,descending:"\u964D\u5E8F",descendingSort:t=>`\u6309\u5217 ${t.columnName} \u964D\u5E8F\u6392\u5E8F`,expand:"\u6269\u5C55",resizerDescription:"\u6309 Enter \u5F00\u59CB\u8C03\u6574\u5927\u5C0F\u3002",select:"\u9009\u62E9",selectAll:"\u5168\u9009",sortable:"\u53EF\u6392\u5E8F\u7684\u5217"},"zh-TW":{ascending:"\u905E\u589E",ascendingSort:t=>`\u5DF2\u4F9D\u64DA\u300C${t.columnName}\u300D\u6B04\u905E\u589E\u6392\u5E8F`,collapse:"\u6536\u5408",columnSize:t=>`${t.value} \u50CF\u7D20`,descending:"\u905E\u6E1B",descendingSort:t=>`\u5DF2\u4F9D\u64DA\u300C${t.columnName}\u300D\u6B04\u905E\u6E1B\u6392\u5E8F`,expand:"\u5C55\u958B",resizerDescription:"\u6309 Enter \u9375\u4EE5\u958B\u59CB\u8ABF\u6574\u5927\u5C0F",select:"\u9078\u53D6",selectAll:"\u5168\u9078",sortable:"\u53EF\u6392\u5E8F\u7684\u6B04"}};var Ye=class extends he{isCell(e){return e.type==="cell"||e.type==="rowheader"||e.type==="column"}getKeyBelow(e,l){let o=this.collection.getItem(e);if(!o)return null;if(o.type==="column"){let r=c$6(b$9(o,this.collection));if(r)return r.key;let n=this.getFirstKey();return n==null||!this.collection.getItem(n)?null:super.getKeyForItemInRowByIndex(n,o.index)}return super.getKeyBelow(e,l)}getKeyAbove(e,l){let o=this.collection.getItem(e);if(!o)return null;if(o.type==="column"){let i=o.parentKey!=null?this.collection.getItem(o.parentKey):null;return i&&i.type==="column"?i.key:null}let r=super.getKeyAbove(e,l),n=r!=null?this.collection.getItem(r):null;return n&&n.type!=="headerrow"?r:this.isCell(o)?this.collection.columns[o.index].key:this.collection.columns[0].key}findNextColumnKey(e){let l=this.findNextKey(e.key,r=>r.type==="column");if(l!=null)return l;let o=this.collection.headerRows[e.level];for(let r of b$9(o,this.collection))if(r.type==="column")return r.key;return null}findPreviousColumnKey(e){let l=this.findPreviousKey(e.key,n=>n.type==="column");if(l!=null)return l;let o=this.collection.headerRows[e.level],r=[...b$9(o,this.collection)];for(let n=r.length-1;n>=0;n--){let i=r[n];if(i.type==="column")return i.key}return null}getKeyRightOf(e){let l=this.collection.getItem(e);return l?l.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(l):this.findNextColumnKey(l):super.getKeyRightOf(e):null}getKeyLeftOf(e){let l=this.collection.getItem(e);return l?l.type==="column"?this.direction==="rtl"?this.findNextColumnKey(l):this.findPreviousColumnKey(l):super.getKeyLeftOf(e):null}getKeyForSearch(e,l){if(!this.collator)return null;let o=this.collection,r=l??this.getFirstKey();if(r==null)return null;let n=o.getItem(r);n?.type==="cell"&&(r=n.parentKey??null);let i=false;for(;r!=null;){let d=o.getItem(r);if(!d)return null;if(d.textValue){let a=d.textValue.slice(0,e.length);if(this.collator.compare(a,e)===0)return d.key}for(let a of b$9(d,this.collection)){let u=o.columns[a.index];if(o.rowHeaderColumnKeys.has(u.key)&&a.textValue){let c=a.textValue.slice(0,e.length);if(this.collator.compare(c,e)===0)return (l!=null?o.getItem(l):n)?.type==="cell"?a.key:d.key}}r=this.getKeyBelow(r),r==null&&!i&&(r=this.getFirstKey(),i=true);}return null}};function xt(t,e,l){let{keyboardDelegate:o,isVirtualized:r,layoutDelegate:n,layout:i}=t,d=a$f({usage:"search",sensitivity:"base"}),{direction:a}=b$2(),u=e.selectionManager.disabledBehavior,c=useMemo(()=>o||new Ye({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:u,ref:l,direction:a,collator:d,layoutDelegate:n,layout:i}),[o,e.collection,e.disabledKeys,u,l,a,d,n,i]),s=c$3(t.id);Ze.set(e,s);let{gridProps:b}=Il({...t,id:s,keyboardDelegate:c},e,l);r&&(b["aria-rowcount"]=e.collection.size+e.collection.headerRows.length),e.treeColumn!=null&&(b.role="treegrid");let{column:f,direction:p}=e.sortDescriptor||{},m=b$6(J,"@react-aria/table"),T=useMemo(()=>{let w=e.collection.columns.find(S=>S.key===f)?.textValue??"";return p&&f?m.format(`${p}Sort`,{columnName:w}):void 0},[p,f,e.collection.columns]),g=d$1(T,l);return c$4(()=>{T&&a$g(T,"assertive",500);},[T]),{gridProps:c$2(b,g,{"aria-describedby":[g["aria-describedby"],b["aria-describedby"]].filter(Boolean).join(" ")})}}function Xe(t,e,l){let{node:o,isVirtualized:r,focusMode:n,allowsArrowNavigation:i,shouldSelectOnPressUp:d,onAction:a}=t,{direction:u}=b$2(),{keyboardDelegate:c,actions:{onCellAction:s},keyboardNavigationBehavior:b}=ge.get(e),f=n??(b==="tab"?"cell":"child"),p=useRef(null),m$1=useRef(null),T=()=>{if(l.current){let h=d$5(l.current);if(f==="child"){let R=i$2(a$b(l.current));if(m(l.current)&&l.current!==R)return;let x=a$b(l.current);if(!R||R===x.body||R===l.current){let j=m$1.current;if(j&&p.current===o.key&&h$2(l.current,j)){i$1(j);return}}let N=e.selectionManager.childFocusStrategy==="last"?kt(h):h.firstChild();if(N){i$1(N);return}}(p.current!=null&&o.key!==p.current||!m(l.current))&&i$1(l.current);}},{itemProps:g,isPressed:w}=d$3({selectionManager:e.selectionManager,key:o.key,ref:l,isVirtualized:r,focus:T,shouldSelectOnPressUp:d,onAction:s?()=>s(o.key):a,isDisabled:e.collection.size===0}),S=h=>{let R=i$2(a$b(l.current));if(!h$2(h.currentTarget,j$2(h))||e.isKeyboardNavigationDisabled||!l.current||!R)return;let x=d$5(l.current);switch(x.currentNode=R,h.key){case "ArrowLeft":{let v=u==="rtl"?x.nextNode():x.previousNode();if(f==="child"&&v===l.current&&(v=null),h.preventDefault(),h.stopPropagation(),v)i$1(v),f$2(v,{containingElement:b$c(l.current)});else {if(c.getKeyLeftOf?.(o.key)!==o.key){l.current.parentElement?.dispatchEvent(new KeyboardEvent(h.nativeEvent.type,h.nativeEvent));break}f==="cell"&&u==="rtl"?(i$1(l.current),f$2(l.current,{containingElement:b$c(l.current)})):(x.currentNode=l.current,v=u==="rtl"?x.firstChild():kt(x),v&&(i$1(v),f$2(v,{containingElement:b$c(l.current)})));}break}case "ArrowRight":{let v=u==="rtl"?x.previousNode():x.nextNode();if(f==="child"&&v===l.current&&(v=null),h.preventDefault(),h.stopPropagation(),v)i$1(v),f$2(v,{containingElement:b$c(l.current)});else {if(c.getKeyRightOf?.(o.key)!==o.key){l.current.parentElement?.dispatchEvent(new KeyboardEvent(h.nativeEvent.type,h.nativeEvent));break}f==="cell"&&u==="ltr"?(i$1(l.current),f$2(l.current,{containingElement:b$c(l.current)})):(x.currentNode=l.current,v=u==="rtl"?kt(x):x.firstChild(),v&&(i$1(v),f$2(v,{containingElement:b$c(l.current)})));}break}case "ArrowUp":case "ArrowDown":!h.altKey&&h$2(l.current,j$2(h))&&(h.stopPropagation(),h.preventDefault(),l.current.parentElement?.dispatchEvent(new KeyboardEvent(h.nativeEvent.type,h.nativeEvent)));break}},C=h=>{let R=i$2(a$b(l.current));if(!(!h$2(h.currentTarget,j$2(h))||e.isKeyboardNavigationDisabled||!l.current||!R)){if(b==="tab"&&j$2(h)!==l.current&&h.key!=="Tab"){h.stopPropagation();return}switch(h.key){case "Tab":if(b==="tab"){let x=d$5(l.current,{tabbable:true});x.currentNode=R,(h.shiftKey?x.previousNode():x.nextNode())&&h.stopPropagation();}}}},D=h=>{if(p.current=o.key,j$2(h)!==l.current){let R=j$2(h);l.current&&h$2(l.current,R)&&(m$1.current=R),b$b()||e.selectionManager.setFocusedKey(o.key);return}f==="child"&&h.relatedTarget&&h$2(l.current,h.relatedTarget)||requestAnimationFrame(()=>{f==="child"&&i$2(a$b(l.current))===l.current&&T();});},P=c$2(g,{role:"gridcell",onKeyDownCapture:b!=="tab"||i?S:void 0,onKeyDown:b==="tab"?C:void 0,"aria-colspan":o.colSpan,"aria-colindex":o.colIndex!=null?o.colIndex+1:void 0,colSpan:r?void 0:o.colSpan,onFocus:D,...f==="child"&&b==="tab"?{tabIndex:-1}:{}});return r&&(P["aria-colindex"]=(o.colIndex??o.index)+1),d&&P.tabIndex!=null&&P.onPointerDown==null&&(P.onPointerDown=h=>{let R=h.currentTarget,x=R.getAttribute("tabindex");R.removeAttribute("tabindex"),requestAnimationFrame(()=>{x!=null&&R.setAttribute("tabindex",x);});}),{gridCellProps:P,isPressed:w}}function kt(t){let e=null,l=null;do l=t.lastChild(),l&&(e=l);while(l);return e}function vt(t,e,l){let{node:o}=t,r=o.props.allowsSorting,{gridCellProps:n}=Xe({focusMode:"child",...t},e,l),i=o.props.isSelectionCell&&e.selectionManager.selectionMode==="single",{pressProps:d,isPressed:a}=d$2({isDisabled:!r||i,onPress(){e.sort(o.key);},ref:l}),{focusableProps:u}=c$5({},l),c,s=e.sortDescriptor?.column===o.key,b=e.sortDescriptor?.direction;o.props.allowsSorting&&!l$2()&&(c=s?b:"none");let f=b$6(J,"@react-aria/table"),p;r&&(p=`${f.format("sortable")}`,s&&b&&l$2()&&(p=`${p}, ${f.format(b)}`));let m=d$1(p,l),T=e.collection.size===0;return useEffect(()=>{T&&e.selectionManager.focusedKey===o.key&&e.selectionManager.setFocusedKey(null);},[T,e.selectionManager,o.key]),{columnHeaderProps:{...c$2(u,n,d,m,T?{tabIndex:-1}:null),role:"columnheader",id:_e(e,o.key),"aria-colspan":o.colSpan&&o.colSpan>1?o.colSpan:void 0,"aria-sort":c},isPressed:a}}function Ll(t,e,l){let{node:o,isVirtualized:r,shouldSelectOnPressUp:n,onAction:i}=t,{actions:d,shouldSelectOnPressUp:a}=ge.get(e),u=d.onRowAction?()=>d.onRowAction?.(o.key):i,{itemProps:c,...s}=d$3({selectionManager:e.selectionManager,key:o.key,ref:l,isVirtualized:r,shouldSelectOnPressUp:a||n,onAction:u||o?.props?.onAction?a$m(o?.props?.onAction,u):void 0,isDisabled:e.collection.size===0}),b=e.selectionManager.isSelected(o.key),f={role:"row","aria-selected":e.selectionManager.selectionMode!=="none"?b:void 0,"aria-disabled":s.isDisabled||void 0,...c};return r&&(f["aria-rowindex"]=o.index+1),{rowProps:f,...s}}var Fl={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function zt(t,e,l){let{node:o,isVirtualized:r}=t,{rowProps:n,...i}=Ll(t,e,l),{direction:d}=b$2();r&&e.treeColumn==null?n["aria-rowindex"]=o.index+1+e.collection.headerRows.length:delete n["aria-rowindex"];let a=e.treeColumn!=null&&(e.expandedKeys==="all"||e.expandedKeys.has(o.key)),u=b$6(J,"@react-aria/table"),c=a$j({"aria-label":a?u.format("collapse"):u.format("expand"),"aria-labelledby":De(e,o.key)}),s={},b={};if(e.treeColumn!=null){let m=e.collection.getItem(o.key);if(m!=null){let T=Hl(e.collection,o),g=m.props?.hasChildRows||m.props?.UNSTABLE_childItems||T?.type!=="cell",w=e.collection.getItem(o.parentKey),S=w.type==="tablebody"||w.type==="body",C=Hl(e.collection,w);for(;C&&C.type!=="item"&&C.prevKey!=null;)C=e.collection.getItem(C.prevKey);s={onKeyDown:D=>{D.key===Fl.expand[d]&&e.selectionManager.focusedKey===m.key&&g&&e.expandedKeys!=="all"&&!e.expandedKeys.has(m.key)?(e.toggleKey(m.key),D.stopPropagation()):D.key===Fl.collapse[d]&&e.selectionManager.focusedKey===m.key&&(e.expandedKeys!=="all"?g&&e.expandedKeys.has(m.key)?(e.toggleKey(m.key),D.stopPropagation()):!e.expandedKeys.has(m.key)&&m.parentKey!=null&&m.level>0&&(e.selectionManager.setFocusedKey(m.parentKey),D.stopPropagation()):e.expandedKeys==="all"&&(e.toggleKey(m.key),D.stopPropagation()));},"aria-expanded":g?e.expandedKeys==="all"||e.expandedKeys.has(o.key):void 0,"aria-level":m.level+1,"aria-posinset":m.index-(S?0:e.collection.columnCount)+1,"aria-setsize":C.index-(S?0:e.collection.columnCount)+1},b={isDisabled:i.isDisabled,onPress:()=>{i.isDisabled||(e.toggleKey(o.key),e.selectionManager.setFocused(true),e.selectionManager.setFocusedKey(o.key));},excludeFromTabOrder:true,preventFocusOnPress:true,"data-react-aria-prevent-focus":true,...c};}}let f=q(o.props),p=i.hasAction?f:{};return {rowProps:{...c$2(n,s,p),"aria-labelledby":De(e,o.key)},expandButtonProps:b,...i}}function Hl(t,e){return "lastChildKey"in e?e.lastChildKey!=null?t.getItem(e.lastChildKey):null:Array.from(e.childNodes).findLast(l=>l.parentKey===e.key)}function Rt(t,e,l){let{node:o,isVirtualized:r}=t,n={role:"row"};return r&&e.treeColumn==null&&(n["aria-rowindex"]=o.index+1),{rowProps:n}}function Kt(t,e,l){let{gridCellProps:o,isPressed:r}=Xe(t,e,l),n=t.node.column?.key;return n!=null&&e.collection.rowHeaderColumnKeys.has(n)&&(o.role="rowheader",o.id=wt(e,t.node.parentKey,n)),{gridCellProps:o,isPressed:r}}function Dt(t,e){let{key:l}=t,{checkboxProps:o}=a$k(t,e);return {checkboxProps:{...o,"aria-labelledby":`${o.id} ${De(e,l)}`}}}function Pt(t){let{isEmpty:e,isSelectAll:l,selectionMode:o}=t.selectionManager;return {checkboxProps:{"aria-label":b$6(J,"@react-aria/table").format(o==="single"?"select":"selectAll"),isSelected:l,isDisabled:o!=="multiple"||t.collection.size===0||t.collection.rows.length===1&&t.collection.rows[0].type==="loader",isIndeterminate:!e&&!l,onChange:()=>t.selectionManager.toggleSelectAll()}}}function Mt(t,e,l){let{column:o,triggerRef:r,isDisabled:n,onResizeStart:i,onResize:d,onResizeEnd:a,"aria-label":u}=t,c=b$6(J,"@react-aria/table"),s=c$3(),b=e.resizingColumn===o.key,f$1=useRef(b),p=useRef(null),m=useRef(false),T=e.tableState.isKeyboardNavigationDisabled,[g,w]=useState(false),{direction:S}=b$2(),C=useCallback(z=>{f$1.current||(p.current=e.updateResizedColumns(z.key,e.getColumnWidth(z.key)),e.startResize(z.key),e.tableState.setKeyboardNavigationDisabled(true),i?.(p.current)),f$1.current=true;},[e,i]),D=useCallback((z,K)=>{let G=e.updateResizedColumns(z.key,K);d?.(G),p.current=G;},[e,d]),P=useCallback(z=>{f$1.current&&(p.current==null&&(p.current=e.updateResizedColumns(z.key,e.getColumnWidth(z.key))),e.endResize(),e.tableState.setKeyboardNavigationDisabled(false),a?.(p.current),f$1.current=false,r?.current&&!m.current&&i$1(r.current)),p.current=null;},[e,r,a]),h=()=>{if(T){P(o);return}return false},{keyboardProps:R}=j$1({shortcuts:{Escape:()=>h(),Enter:()=>{T?P(o):C(o);}," ":()=>h(),Tab:()=>h()}}),x=useRef(0),{moveProps:v}=a$i({onMoveStart(z){x.current=e.getColumnWidth(o.key),z.pointerType==="mouse"&&w(true),C(o);},onMove(z){let{deltaX:K,deltaY:G,pointerType:lt}=z;S==="rtl"&&(K*=-1),lt==="keyboard"&&(G!==0&&K===0&&(K=G*-1),K*=10),K!==0&&(x.current+=K,D(o,x.current));},onMoveEnd(z){let{pointerType:K}=z;x.current=0,w(false),(K==="mouse"||K==="touch"&&m.current)&&P(o);}}),N=useCallback(z=>{T&&v.onKeyDown?.(z);},[T,v]),j=Math.floor(e.getColumnMinWidth(o.key)),U=Math.floor(e.getColumnMaxWidth(o.key));U===1/0&&(U=Number.MAX_SAFE_INTEGER);let Z=Math.floor(e.getColumnWidth(o.key)),_=f();_==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(_="touch");let we=r?.current==null&&(_==="keyboard"||_==="virtual")&&!b?c.format("resizerDescription"):void 0,te=d$1(we),oe={"aria-label":u,"aria-orientation":"horizontal","aria-labelledby":`${s} ${_e(e.tableState,o.key)}`,"aria-valuetext":c.format("columnSize",{value:Z}),type:"range",min:j,max:U,value:Z,...te},re=useCallback(()=>{l.current&&i$1(l.current);},[l]),ne=e.resizingColumn,me=useRef(null),Ee=u$1(C);useEffect(()=>{if(me.current!==ne&&ne!=null&&ne===o.key){m.current=i$2(a$b(l.current))===l.current,Ee(o);let z=setTimeout(()=>re(),0),K=setTimeout(re,400);return ()=>{clearTimeout(z),clearTimeout(K);}}me.current=ne;},[ne,o,re,l]);let et=z=>{let K=e.getColumnWidth(o.key),G=parseFloat(j$2(z).value);G>K?G=K+10:G=K-10,D(o,G);},{pressProps:xe}=d$2({preventFocusOnPress:true,onPressStart:z=>{if(!(z.ctrlKey||z.altKey||z.metaKey||z.shiftKey||z.pointerType==="keyboard")){if(z.pointerType==="virtual"&&e.resizingColumn!=null){P(o);return}re(),z.pointerType!=="virtual"&&C(o);}},onPress:z=>{(z.pointerType==="touch"&&m.current||z.pointerType==="mouse")&&e.resizingColumn!=null&&P(o);}}),{visuallyHiddenProps:tt}=a$c();return {resizerProps:c$2(R,{...v,onKeyDown:N},xe,{style:{touchAction:"none"}}),inputProps:c$2(tt,{id:s,onBlur:()=>{P(o);},onChange:et,disabled:n},oe),isResizing:b,isMouseResizing:g}}function Ol(){return {rowGroupProps:{role:"rowgroup"}}}function qe(){return Ol()}var Nt=class extends g{headerRows=[];columns=[];rows=[];rowHeaderColumnKeys=new Set;head=new Je(-1);columnsDirty=true;expandedKeys=new Set;withExpandedKeys(e){let l=this.clone();return l.expandedKeys=e,l.frozen=this.frozen,l.rows=Array.from(l.getRows()),l}addNode(e){super.addNode(e),this.columnsDirty||=e.type==="column",e.type==="tableheader"&&(this.head=e);}getRows(){let e=[];for(let l of this)(l.type==="tablebody"||l.type==="tablefooter")&&e.push(...this.getChildren(l.key));return e}get body(){for(let e of this)if(e.type==="tablebody")return e;return new Qe(-2)}commit(e,l,o=false){this.updateColumns(o),this.firstKey=e,this.lastKey=l,this.rows=[];for(let r of this.getRows()){let n=r.lastChildKey;if(n!=null){let i=this.getItem(n);for(;i&&i.type!=="cell";)i=i.prevKey!=null?this.getItem(i.prevKey):null;if(i){let d=(i.colIndex??i.index)+(i.colSpan??1);if(d!==this.columns.length&&!o)throw new Error(`Cell count must match column count. Found ${d} cells and ${this.columns.length} columns.`)}}this.rows.push(r);}super.commit(e,l,o);}updateColumns(e){if(!this.columnsDirty)return;this.rowHeaderColumnKeys=new Set,this.columns=[];let l=new Map,o=r=>{r.type==="column"&&(l.set(r.key,r),r.hasChildNodes||(r.index=this.columns.length,this.columns.push(r),r.props.isRowHeader&&this.rowHeaderColumnKeys.add(r.key)));for(let n of this.getChildren(r.key))o(n);};for(let r of this.getChildren(this.head.key))o(r);if(this.headerRows=je(l,this.columns),this.columnsDirty=false,this.rowHeaderColumnKeys.size===0&&this.columns.length>0&&!e)throw new Error("A table must have at least one Column with the isRowHeader prop set to true")}get columnCount(){return this.columns.length}*[Symbol.iterator](){let e=this.firstKey;for(;e!=null;){let l=this.getItem(e);l&&(yield l),e=l?.nextKey??null;}}getFirstKey(){for(let e of this)if(e.type==="tablebody")return e.firstChildKey??null;return null}getLastKey(){let e=this.lastKey;if(e==null)return null;let l=this.getItem(e);for(;l?.lastChildKey!=null&&(l.type!=="item"||this.expandedKeys.has(l.key));)l=this.getItem(l.lastChildKey);return l?.key}getKeyAfter(e){let l=this.getItem(e);if(l?.type==="column")return l.nextKey??null;if(!l)return null;if(l.type==="item"&&l.firstChildKey!=null&&this.expandedKeys.has(l.key)){let o=this.getItem(l.firstChildKey);for(;o;){if(o.type==="item")return o.key;o=o.nextKey!=null?this.getItem(o.nextKey):null;}}return super.getKeyAfter(e)}getKeyBefore(e){let l=this.getItem(e);if(l?.type==="column")return l.prevKey??null;if(!l)return null;let o=null;if(l.prevKey!=null){for(l=this.getItem(l.prevKey);l&&(l.type!=="item"||this.expandedKeys.has(l.key))&&l.lastChildKey!=null;)l=this.getItem(l.lastChildKey);o=l?.key??null;}return o==null&&(o=l.parentKey),o!=null&&this.getItem(o)?.type==="tableheader"?null:o}getChildren(e){let l=this.getItem(e);if(!l){for(let r of this.headerRows)if(r.key===e)return r.childNodes}let o=this;return l?.type==="tablebody"||l?.type==="tablefooter"?{*[Symbol.iterator](){let r=l.firstChildKey,n=r!=null?o.getItem(r):null;for(;n;){yield n;let i=o.getKeyAfter(n.key);if(n=i!=null?o.getItem(i):null,n&&n.parentKey===l.parentKey)break}}}:{*[Symbol.iterator](){let r=o.getItem(e),n=r?.firstChildKey!=null?o.getItem(r.firstChildKey):null;for(;n&&(yield n,n=n.nextKey!=null?o.getItem(n.nextKey):null,!(r?.type==="item"&&n?.type!=="cell")););}}}clone(){let e=super.clone();return e.headerRows=this.headerRows,e.columns=this.columns,e.rows=this.rows,e.rowHeaderColumnKeys=this.rowHeaderColumnKeys,e.head=this.head,e}getTextValue(e){let l=this.getItem(e);if(!l)return "";if(l.textValue)return l.textValue;let o=this.rowHeaderColumnKeys,r=[];for(let n of this.getChildren(e)){let i=this.columns[n.index];if(o.has(i.key)&&n.textValue&&r.push(n.textValue),r.length===o.size)break}return r.join(" ")}},Ft=createContext(null);forwardRef(function(e$1,l){let o=a(l),r=useRef(null),n=useRef(null),[i,d]=useState(0);a$1(()=>{let u=r.current;for(;u&&u!==o.current&&!a$2(u);)u=u.parentElement;n.current=u;},[o]),e({ref:n,box:"border-box",onResize(){d(n.current?.clientWidth??0);}}),a$1(()=>{d(n.current?.clientWidth??0);},[]);let a$4=useMemo(()=>({tableRef:r,scrollRef:n,tableWidth:i,useTableColumnResizeState:ht,onResizeStart:e$1.onResizeStart,onResize:e$1.onResize,onResizeEnd:e$1.onResizeEnd}),[r,i,e$1.onResizeStart,e$1.onResize,e$1.onResizeEnd]);return jsx(h.div,{render:e$1.render,...a$3(e$1,{global:true}),ref:o,className:e$1.className||"react-aria-ResizableTableContainer",style:e$1.style,onScroll:e$1.onScroll,children:jsx(Ft.Provider,{value:a$4,children:e$1.children})})});var no=createContext(null),Q=createContext(null),Ht=createContext(null),xa=forwardRef(function(e,l$1){[e,l$1]=e$1(e,l$1,no);let o=a$4(e),{selectionBehavior:r,selectionMode:n,disallowEmptySelection:i$1}=o,d=!!e.dragAndDropHooks?.useDraggableCollectionState,a=useMemo(()=>({selectionBehavior:n==="none"?null:r,selectionMode:n,disallowEmptySelection:i$1,allowsDragging:d}),[r,n,i$1,d]),u=jsx(so.Provider,{value:a,children:jsx(l,{...e})});return jsx(i,{content:u,createCollection:()=>new Nt,children:c=>jsx(ao,{props:e,forwardedRef:l$1,selectionState:o,collection:c})})}),io=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.table,{...e,ref:l})}),Vl={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function ao({props:t,forwardedRef:e,selectionState:l,collection:o}){[t,e]=e$1(t,e,b);let{shouldUseVirtualFocus:r$1,disallowTypeAhead:n,filter:i,...d}=t,a$1=useContext(Ft);e=a(useMemo(()=>b$1(e,a$1?.tableRef),[e,a$1?.tableRef]));let[u,c$3]=a$5(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,t.onExpandedChange);o=useMemo(()=>o.withExpandedKeys(u),[o,u]);let s$1=gt({...d,collection:o,children:void 0,UNSAFE_selectionState:l,expandedKeys:u,onExpandedChange:c$3}),b$5=Tt(s$1,i),{isVirtualized:f,layoutDelegate:p$1,dropTargetDelegate:m,CollectionRoot:T}=useContext(p),{dragAndDropHooks:g}=t,{gridProps:w}=xt({...d,layoutDelegate:p$1,isVirtualized:f},b$5,e),S=b$5.selectionManager,C=!!g?.useDraggableCollectionState,D=!!g?.useDroppableCollectionState,P=useRef(C),h=useRef(D);useEffect(()=>{process.env.NODE_ENV!=="production"&&(P.current!==C&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),h.current!==D&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[C,D]);let R,x$1,v$1,N=false,j=null,U=useRef(null),{direction:Z}=b$2(),[_]=useState(()=>new a$6);if(C&&g){R=g.useDraggableCollectionState({collection:b$5.collection,selectionManager:S,preview:g.renderDragPreview?U:void 0}),g.useDraggableCollection({},R,e);let xe=g.DragPreview;j=g.renderDragPreview?jsx(xe,{ref:U,children:g.renderDragPreview}):null;}if(D&&g){x$1=g.useDroppableCollectionState({collection:b$5.collection,selectionManager:S});let xe=new b$3({collection:b$5.collection,disabledKeys:S.disabledKeys,disabledBehavior:S.disabledBehavior,ref:e,layoutDelegate:p$1}),tt=g.dropTargetDelegate||m||new g.ListDropTargetDelegate(o.rows,e);_.setup(tt,s$1,Z),v$1=g.useDroppableCollection({keyboardDelegate:xe,dropTargetDelegate:_,onDropActivate:z=>{if(z.target.type==="item"){let K=z.target.key,G=s$1.collection.getItem(K),lt=u.has(K);G&&G.hasChildNodes&&(!lt||g?.isVirtualDragging?.())&&s$1.toggleKey(K);}},onKeyDown:z=>{let K=x$1?.target;if(K&&K.type==="item"&&K.dropPosition==="on"){let G=s$1.collection.getItem(K.key);(z.key===Vl.expand[Z]&&G?.hasChildNodes&&!s$1.expandedKeys.has(K.key)||z.key===Vl.collapse[Z]&&G?.hasChildNodes&&s$1.expandedKeys.has(K.key))&&s$1.toggleKey(K.key);}}},x$1,e),N=x$1.isDropTarget({type:"root"});}let{focusProps:we,isFocused:te,isFocusVisible:oe}=a$7(),re=c({...t,children:void 0,defaultClassName:"react-aria-Table",values:{isDropTarget:N,isFocused:te,isFocusVisible:oe,state:b$5}}),ne=!!(C&&!R?.isDisabled),me=re.style,Ee=null;a$1&&(Ee=a$1.useTableColumnResizeState({tableWidth:a$1.tableWidth},b$5),f||(me={...me,tableLayout:"fixed",width:"min-content"}));let et=a$3(t,{global:true});return jsxs(b$4,{values:[[Q,b$5],[Ht,Ee],[r,{dragAndDropHooks:g,dragState:R,dropState:x$1}],[s,{render:fo}],[b,null],[c$1,null]],children:[jsx(a$8,{children:jsx(io,{...c$2(et,re,w,we,v$1?.collectionProps),style:me,ref:e,slot:t.slot||void 0,onScroll:t.onScroll,"data-allows-dragging":ne||void 0,"data-drop-target":N||void 0,"data-focused":te||void 0,"data-focus-visible":oe||void 0,children:jsx(x,{children:jsx(T,{collection:b$5.collection,scrollRef:a$1?.scrollRef??e,persistedKeys:v(S,g,x$1)})})})}),j]})}var so=createContext(null);var Je=class extends a$h{static type="tableheader"},co=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.thead,{...e,ref:l})}),ka=k(Je,(t,e)=>{let l=useContext(Q).collection,o=h$1({items:l.headerRows,children:useCallback(a=>{if(a.type==="headerrow")return jsx(mo,{item:a});throw new Error("Unsupported node type in TableHeader: "+a.type)},[])}),{rowGroupProps:r}=qe(),{hoverProps:n,isHovered:i}=a$9({onHoverStart:t.onHoverStart,onHoverChange:t.onHoverChange,onHoverEnd:t.onHoverEnd}),d=c({...t,children:void 0,defaultClassName:"react-aria-TableHeader",values:{isHovered:i}});return jsx(co,{...c$2(a$3(t,{global:true}),r,n),...d,ref:e,"data-hovered":i||void 0,children:o})},t=>jsx(l,{dependencies:t.dependencies,items:t.columns,children:t.children})),uo=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx("div",{...e,ref:l}):jsx("tr",{...e,ref:l})});function mo({item:t}){let e=useRef(null),l=useContext(Q),{isVirtualized:o,CollectionBranch:r}=useContext(p),{rowProps:n}=Rt({node:t,isVirtualized:o},l),{checkboxProps:i}=Pt(l);return jsx(uo,{...n,ref:e,children:jsx(b$4,{values:[[a$a,{slots:{selection:i}}],[b$5,{slots:{selection:i}}]],children:jsx(r,{collection:l.collection,parent:t})})})}var Et=class extends a$h{static type="column"},po=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.th,{...e,ref:l})}),va=j(Et,(t,e,l)=>{let o=a(e),r=useContext(Q),{isVirtualized:n$1}=useContext(p),{columnHeaderProps:i,isPressed:d}=vt({node:l,isVirtualized:n$1,focusMode:t.focusMode,allowsArrowNavigation:t.allowsArrowNavigation},r,o),{isFocused:a$1,isFocusVisible:u,focusProps:c$1}=a$7(),s=useContext(Ht),b=false;if(s)b=s.resizingColumn===l.key;else if(process.env.NODE_ENV!=="production")for(let w in ["width","defaultWidth","minWidth","maxWidth"])w in l.props&&console.warn(`The ${w} prop on a <Column> only applies when a <Table> is wrapped in a <ResizableTableContainer>. If you aren't using column resizing, you can set the width of a column with CSS.`);let{hoverProps:f,isHovered:p$1}=a$9({isDisabled:!t.allowsSorting}),m=c({...t,id:void 0,children:l.rendered,defaultClassName:"react-aria-Column",values:{isHovered:p$1,isPressed:d,isFocused:a$1,isFocusVisible:u,allowsSorting:l.props.allowsSorting,sortDirection:r.sortDescriptor?.column===l.key?r.sortDescriptor.direction:void 0,isResizing:b,startResize:()=>{if(s)s.startResize(l.key),r.setKeyboardNavigationDisabled(true);else throw new Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing")},sort:w=>{r.sort(l.key,w);}}}),T=m.style;s&&(T={...T,width:s.getColumnWidth(l.key)});let g=a$3(t,{global:true});return delete g.id,jsx(po,{...c$2(g,i,c$1,f),...m,style:T,ref:o,"data-hovered":p$1||void 0,"data-pressed":d||void 0,"data-focused":a$1||void 0,"data-focus-visible":u||void 0,"data-resizing":b||void 0,"data-allows-sorting":l.props.allowsSorting||void 0,"data-sort-direction":r.sortDescriptor?.column===l.key?r.sortDescriptor.direction:void 0,children:jsx(b$4,{values:[[Wl,{column:l,triggerRef:o}],[p,n]],children:m.children})})}),Wl=createContext(null);forwardRef(function(e,l){let o=useContext(Ht);if(!o)throw new Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");let r=b$6(Kl,"react-aria-components"),{onResizeStart:n,onResize:i,onResizeEnd:d}=useContext(Ft),{column:a$1,triggerRef:u}=useContext(Wl),c$1=useRef(null),{resizerProps:s,inputProps:b,isResizing:f,isMouseResizing:p}=Mt({column:a$1,"aria-label":e["aria-label"]||r.format("tableResizer"),onResizeStart:n,onResize:i,onResizeEnd:d,triggerRef:u},o,c$1),{focusProps:m,isFocused:T,isFocusVisible:g}=a$7(),{hoverProps:w,isHovered:S}=a$9(e),C=o.getColumnMinWidth(a$1.key)>=o.getColumnWidth(a$1.key),D=o.getColumnMaxWidth(a$1.key)<=o.getColumnWidth(a$1.key),{direction:P}=b$2(),h$1="both";C?h$1=P==="rtl"?"right":"left":D?h$1=P==="rtl"?"left":"right":h$1="both";let R=a(l),[x,v]=useState("");useEffect(()=>{if(!R.current)return;let U=b$7(R.current).getComputedStyle(R.current);v(U.cursor);},[R,h$1]);let N=c({...e,defaultClassName:"react-aria-ColumnResizer",values:{isFocused:T,isFocusVisible:g,isResizing:f,isHovered:S,resizableDirection:h$1}}),j=a$3(e,{global:true});return jsxs(h.div,{ref:R,role:"presentation",...c$2(j,N,s,w),"data-hovered":S||void 0,"data-focused":T||void 0,"data-focus-visible":g||void 0,"data-resizing":f||void 0,"data-resizable-direction":h$1,children:[N.children,jsx("input",{ref:c$1,...c$2(b,m)}),f&&p&&ro.createPortal(jsx("div",{style:{position:"fixed",top:0,left:0,bottom:0,right:0,cursor:x},"data-testid":"cursor-overlay"}),a$b(R.current).body)]})});var Qe=class extends b$8{static type="tablebody"},bo=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.tbody,{...e,ref:l})}),Ra=k(Qe,(t,e,l)=>{let o=useContext(Q),{isVirtualized:r$1}=useContext(p),n=o.collection,{CollectionBranch:i}=useContext(p),{dragAndDropHooks:d,dropState:a}=useContext(r),u$1=!!d?.useDroppableCollectionState&&!a?.isDisabled,c$1=u$1&&!!a&&(a.isDropTarget({type:"root"})??false),s=n.size===0,b={isDropTarget:c$1,isEmpty:s},f=c({...t,id:void 0,children:void 0,defaultClassName:"react-aria-TableBody",values:b}),p$1,m=n.columnCount;if(s&&t.renderEmptyState&&o){let w={},S={},C={};r$1?(S["aria-colspan"]=m,C={display:"contents"}):S.colSpan=m,p$1=jsx(Te,{role:"row",...w,style:C,children:jsx(Se,{role:"rowheader",...S,style:C,children:t.renderEmptyState(b)})});}let{rowGroupProps:T}=qe(),g=a$3(t,{global:true});return jsxs(bo,{...c$2(g,f,T),ref:e,"data-empty":s||void 0,children:[u$1&&jsx(So,{}),jsx(i,{collection:n,parent:l,renderDropIndicator:u(d,a)}),p$1]})});forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.tfoot,{...e,ref:l})});var Bl=createContext({isFocusVisibleWithinRow:false}),It=class extends a$h{static type="item";filter(e,l,o){let r=e.getChildren(this.key);for(let n of r)if(o(n.textValue,n)){let i=this.clone();return l.addDescendants(i,e),i}return null}},Te=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.tr,{...e,ref:l})}),Da=k(It,(t,e,l)=>{let o=a(e),r$1=useContext(Q),{dragAndDropHooks:n,dragState:i,dropState:d}=useContext(r),{isVirtualized:a$1,CollectionBranch:u}=useContext(p),c$1=i&&!(i.isDisabled||i.selectionManager.isDisabled(l.key)),{rowProps:s,expandButtonProps:b,...f}=zt({node:l,shouldSelectOnPressUp:!!i,isVirtualized:a$1},r$1,o),{isFocused:p$1,isFocusVisible:m,focusProps:T}=a$7(),{isFocusVisible:g,focusProps:w$1}=a$7({within:true}),{hoverProps:S,isHovered:C}=a$9({isDisabled:!f.allowsSelection&&!f.hasAction&&!c$1,onHoverStart:t.onHoverStart,onHoverChange:t.onHoverChange,onHoverEnd:t.onHoverEnd}),{checkboxProps:D}=Dt({key:l.key},r$1),P;i&&n&&(P=n.useDraggableItem({key:l.key,hasDragButton:true},i,o));let h,R=useRef(null),{visuallyHiddenProps:x}=a$c();d&&n&&(h=n.useDropIndicator({target:{type:"item",key:l.key,dropPosition:"on"}},d,R));let v=useRef(null);useEffect(()=>{i&&!v.current&&process.env.NODE_ENV!=="production"&&console.warn('Draggable items in a Table must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');},[]);let N=i&&i.isDragging(l.key),{children:j,...U}=t,Z=t.hasChildItems||r$1.collection.getItem(l.lastChildKey)?.type!=="cell",_=Z&&r$1.expandedKeys.has(l.key),we=c({...U,id:void 0,defaultClassName:"react-aria-Row",defaultStyle:{"--table-row-level":l.level+1},values:{...f,state:r$1,isHovered:C,isFocused:p$1,isFocusVisible:m,selectionMode:r$1.selectionManager.selectionMode,selectionBehavior:r$1.selectionManager.selectionBehavior,isDragging:N,isDropTarget:h?.isDropTarget,isFocusVisibleWithin:g,id:l.key,hasChildItems:Z,isExpanded:_,level:l.level+1}}),te=a$3(t,{global:true});delete te.id,delete te.onClick;let oe=w(P,n,o);return jsxs(Fragment,{children:[h&&!h.isHidden&&jsx(Te,{role:"row",style:{height:0},children:jsx(Se,{role:"gridcell",colSpan:r$1.collection.columnCount,style:{padding:0},children:jsx("div",{role:"button",...x,...h.dropIndicatorProps,ref:R})})}),jsx(Te,{...c$2(te,we,s,T,S,oe.itemProps,w$1),ref:o,"data-disabled":f.isDisabled||void 0,"data-selected":f.isSelected||void 0,"data-hovered":C||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":m||void 0,"data-pressed":f.isPressed||void 0,"data-dragging":N||void 0,"data-drop-target":h?.isDropTarget||void 0,"data-selection-mode":r$1.selectionManager.selectionMode==="none"?void 0:r$1.selectionManager.selectionMode,"data-focus-visible-within":g||void 0,"data-expanded":_||void 0,"data-has-child-items":Z||void 0,"data-level":l.level+1,children:jsx(b$4,{values:[[a$a,{slots:{[a$e]:{},selection:D}}],[b$5,{slots:{[a$e]:{},selection:D}}],[a$d,{slots:{[a$e]:{},chevron:b,drag:{...oe.dragButtonProps,ref:v}}}],[y,{isSelected:f.isSelected}],[Bl,{isFocusVisibleWithinRow:g}]],children:jsx(u,{collection:r$1.collection,parent:l})})})]})},t=>{if(t.id==null&&typeof t.children=="function")throw new Error("No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.");let e=[t.value].concat(t.dependencies);return jsx(l,{dependencies:e,items:t.columns,idScope:t.id,children:t.children})}),At=class extends a$h{static type="cell"},Se=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.td,{...e,ref:l})}),Pa=j(At,(t,e,l)=>{let o=a(e),r$1=useContext(Q),{dragState:n$1}=useContext(r),{isVirtualized:i}=useContext(p);l.column=r$1.collection.columns[l.index];let{gridCellProps:d,isPressed:a$1}=Kt({node:l,shouldSelectOnPressUp:!!n$1,isVirtualized:i,focusMode:t.focusMode,allowsArrowNavigation:t.allowsArrowNavigation},r$1,o),{isFocused:u,isFocusVisible:c$1,focusProps:s}=a$7(),{hoverProps:b,isHovered:f}=a$9({}),{isFocusVisibleWithinRow:p$1}=useContext(Bl),m=l.parentKey!=null?r$1.selectionManager.isSelected(l.parentKey):false,T=l.colIndex||l.index,g=r$1.collection.getItem(l.parentKey),w=g.props.hasChildItems||r$1.collection.getItem(g.lastChildKey)?.type!=="cell",S=w&&r$1.expandedKeys.has(l.parentKey),C=r$1.selectionManager.isDisabled(l.parentKey),D=c({...t,id:void 0,defaultClassName:"react-aria-Cell",values:{isFocused:u,isFocusVisible:c$1,isFocusVisibleWithinRow:p$1,isPressed:a$1,isHovered:f,isSelected:m,id:l.key,columnIndex:T,hasChildItems:w,isExpanded:S,isDisabled:C,level:g.level+1,isTreeColumn:l.column.key===r$1.treeColumn}}),P=a$3(t,{global:true});return delete P.id,jsx(Se,{...c$2(P,D,d,s,b),ref:o,"data-focused":u||void 0,"data-focus-visible":c$1||void 0,"data-focus-visible-within-row":p$1||void 0,"data-pressed":a$1||void 0,"data-selected":m||void 0,"data-column-index":T,"data-expanded":S||void 0,"data-has-child-items":w||void 0,"data-level":g.level+1,"data-tree-column":l.column.key===r$1.treeColumn||void 0,"data-disabled":C||void 0,children:jsx(p.Provider,{value:n,children:D.children})})});function fo(t,e){e=a(e);let{dragAndDropHooks:l,dropState:o}=useContext(r),r$1=useRef(null),{dropIndicatorProps:n,isHidden:i,isDropTarget:d}=l.useDropIndicator(t,o,r$1);if(i)return null;let a$1=o&&t.target.type==="item"?(o.collection.getItem(t.target.key)?.level||0)+1:1;return jsx(To,{...t,dropIndicatorProps:n,isDropTarget:d,buttonRef:r$1,level:a$1,ref:e})}var yo=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.tr,{...e,ref:l})}),ho=forwardRef(function(e,l){let{isVirtualized:o}=useContext(p);return o?jsx(h.div,{...e,ref:l}):jsx(h.td,{...e,ref:l})});function go(t,e){let{dropIndicatorProps:l,isDropTarget:o,buttonRef:r,level:n,...i}=t,d=useContext(Q),{visuallyHiddenProps:a}=a$c(),u=c({...i,defaultClassName:"react-aria-DropIndicator",defaultStyle:{"--table-row-level":n+1},values:{isDropTarget:o}});return jsx(yo,{...a$3(t,{global:true}),...u,role:"row",ref:e,"data-drop-target":o||void 0,"aria-level":n,children:jsxs(ho,{role:"gridcell",colSpan:d.collection.columnCount,style:{padding:0},children:[jsx("div",{...a,role:"button",...l,ref:r}),u.children]})})}var To=forwardRef(go);function So(){let t=useContext(Q),{dragAndDropHooks:e,dropState:l}=useContext(r),o=useRef(null),{dropIndicatorProps:r$1}=e.useDropIndicator({target:{type:"root"}},l,o),n=l.isDropTarget({type:"root"}),{visuallyHiddenProps:i}=a$c();return !n&&r$1["aria-hidden"]?null:jsx(Te,{role:"row","aria-hidden":r$1["aria-hidden"],style:{height:0},children:jsx(Se,{role:"gridcell",colSpan:t.collection.columnCount,style:{padding:0},children:jsx("div",{role:"button",...i,...r$1,ref:o})})})}var Ma=j(d,function(e,l,o){let r=useContext(Q),{isVirtualized:n}=useContext(p),{isLoading:i,onLoadMore:d,scrollOffset:a,...u}=e,c$1=r.collection.columns.length,s=useRef(null),b=useMemo(()=>({onLoadMore:d,collection:r?.collection,sentinelRef:s,scrollOffset:a}),[d,a,r?.collection]);k$1(b,s);let f=c({...u,id:void 0,children:o.rendered,defaultClassName:"react-aria-TableLoadingIndicator",defaultStyle:{"--table-row-level":o.level+1},values:void 0}),p$1={},m={},T={};return n?(m["aria-colspan"]=c$1,T={display:"contents"}):m.colSpan=c$1,jsxs(Fragment,{children:[jsx(Te,{style:{height:0},inert:l$1(true),children:jsx(Se,{style:{padding:0,border:0},children:jsx("div",{"data-testid":"loadMoreSentinel",ref:s,style:{position:"relative",height:1,width:1}})})}),i&&f.children&&jsx(Te,{...c$2(a$3(e,{global:true}),p$1),...f,role:"row",ref:l,"aria-level":o.level+1,"data-level":o.level+1,children:jsx(Se,{role:"rowheader",...m,style:T,children:f.children})})]})});export{Ue as a,Ht as b,xa as c,ka as d,va as e,Ra as f,Da as g,Pa as h,Ma as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$3,a as a$
|
|
1
|
+
import {b as b$3,a as a$3}from'./chunk-UOWKAUCQ.mjs';import {p,o}from'./chunk-YQHHE5AT.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {e as e$1}from'./chunk-TZGK36KC.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u,b as b$4}from'./chunk-PPHSLODC.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {j,h,b as b$1,e,l,a as a$1}from'./chunk-SD43KVTU.mjs';import ct,{createContext,useRef,useCallback,useState,useEffect,useMemo,useContext}from'react';import {flushSync}from'react-dom';import {jsx,jsxs}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 {b as b$3,a as a$4}from'./chunk-5BKC373Y.mjs';import {p,o}from'./chunk-YQ
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var C=class h{x;y;constructor(e=0,t=0){this.x=e,this.y=t;}copy(){return new h(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}};var y=class h{x;y;width;height;constructor(e=0,t=0,i=0,o=0){this.x=e,this.y=t,this.width=i,this.height=o;}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new C(this.x,this.y)}get topRight(){return new C(this.maxX,this.y)}get bottomLeft(){return new C(this.x,this.maxY)}get bottomRight(){return new C(this.maxX,this.maxY)}intersects(e){return (process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of ["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),o=Math.max(this.maxX,e.maxX)-t,r=Math.max(this.maxY,e.maxY)-i;return new h(t,i,o,r)}intersection(e){if(!this.intersects(e))return new h(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new h(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new h(this.x,this.y,this.width,this.height)}};var m=class h{width;height;constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0);}copy(){return new h(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}};var at=0,ce=class{virtualizer;layoutInfo;content;rendered;viewType;key;children;reusableViews;constructor(e,t){this.virtualizer=e,this.key=++at,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null;}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null;}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new ve(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e);}},ye=class extends ce{constructor(e){super(e,"root");}},ve=class extends ce{parent;constructor(e,t,i){super(e,i),this.parent=t;}};function Xe(h,e){if(h===e)return true;if(h.size!==e.size)return false;for(let t of h)if(!e.has(t))return false;return true}var fe=class{startTime=0;velocity=new C(0,0);visibleRect=new y;setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e;}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}};var st=4;function pe(h){return h==="x"?"width":"height"}function ht(h,e,t,i,o){let r=t(h.key);if(!r)return null;let l=r.rect[h.corner][e]-i[e]-h.offset;if(l===0)return null;let n=i[e]+l,a=pe(e),s=Math.max(0,o[a]-i[a]),u=Math.max(0,Math.min(s,n));return u!==i[e]?u:null}function ut(h,e,t,i,o=()=>true){let r=pe(e),l=null;for(let[n,a]of i){if(!a||!o(a))continue;let s=a.rect.intersection(t)[r];if(a.rect.area>0&&s>=st){let u=a.rect.getCornerInRect(t)??"topLeft",c=a.rect[u][e]-t[e];(!l||(h==="end"?c<l.offset:c>l.offset))&&(l={key:n,corner:u,offset:c});}}return l}function dt(h,e,t,i){if(h==="start")return 0;let o=pe(e);return Math.max(0,t[o]-i[o])}function Ge(h,e,t,i,o){if(t==="start")return h[i]<=o;let r=pe(i);return e[r]-(h[i]+h[r])<=o}function ct(h,e,t,i,o,r,l,n,a,s){let u=c=>e==="x"?new y(c,a.y,a.width,a.height):new y(a.x,c,a.width,a.height);if(t){let c=ht(t,e,n,a,s);if(c!=null)return u(c)}if(i&&!o&&(!r||l>0)){let c=u(dt(h,e,s,a));return c.equals(a)?null:c}return null}var me=class{hasSnappedToEdge=false;hadEstimatedVisibleItems=false;wasNearAnchorEdge=false;reset(){this.hasSnappedToEdge=false,this.hadEstimatedVisibleItems=false,this.wasNearAnchorEdge=false;}captureBeforeLayout(e,t,i){return e?ut(e.edge,e.axis,i,t,e.isAnchorable):null}resolveAfterLayout(e){let{anchorInfo:t,anchor:i,postLayoutInfos:o,previousVisibleRect:r,previousContentSize:l,contentSize:n,itemSizeChanged:a,isScrolling:s,getLayoutInfo:u}=e;if(!t)return null;let c=this.hadEstimatedVisibleItems,d=this.wasNearAnchorEdge,f=false;for(let T of o.values())if(T.estimatedSize){f=true;break}if(this.hadEstimatedVisibleItems=f,c||(this.wasNearAnchorEdge=Ge(r,l,t.edge,t.axis,t.threshold)),r.area===0)return null;let g=t.axis==="x"?"width":"height",p=n[g]-l[g],L=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=true,!(L||p!==0||a))return null;let v=L||c&&d||Ge(r,l,t.edge,t.axis,t.threshold);c||(this.wasNearAnchorEdge=v);let N=L||c&&d?null:i;return ct(t.edge,t.axis,N,v,s,a,p,u,r,n)}};var ge=class{delegate;collection;layout;contentSize;visibleRect;size;persistedKeys;_visibleViews;_renderedContent;_rootView;_isScrolling;_invalidationContext;_overscanManager;_scrollAnchor;constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new m,this.visibleRect=new y,this.size=new m,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ye(this),this._isScrolling=false,this._invalidationContext={},this._overscanManager=new fe,this._scrollAnchor=new me;}isPersistedKey(e){if(this.persistedKeys.has(e))return true;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return true}return false}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:o}=e.layoutInfo;e.content=o||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content);}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let o=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,o),o}keyAtPoint(e){let t=new y(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let o of i)if(o.rect.intersects(t))return o.key;return null}relayout(e={}){let t=this.layout.UNSTABLE_getScrollAnchorInfo?.(e.layoutOptions)??null,i=null;if(t){let c=[];for(let[d,f]of this._visibleViews){let g=this.layout.getLayoutInfo(d)??f.layoutInfo;g&&c.push([d,g]);}i=this._scrollAnchor.captureBeforeLayout(t,c,this.visibleRect);}let o=this.contentSize,r=this.visibleRect;this.layout.update(e);let l=this.layout.getContentSize();this.contentSize=new m(l.width,l.height);let n=this._scrollAnchor.resolveAfterLayout({anchorInfo:t,anchor:i,postLayoutInfos:t?this.getVisibleLayoutInfos():new Map,previousVisibleRect:r,previousContentSize:o,contentSize:this.contentSize,itemSizeChanged:e.itemSizeChanged??false,isScrolling:this._isScrolling,getLayoutInfo:c=>this.layout.getLayoutInfo(c)});if(n){this.delegate.setVisibleRect(n);return}let a=this.visibleRect,s=e.contentChanged?0:a.x,u=e.contentChanged?0:a.y;if(s=Math.max(0,Math.min(this.contentSize.width-a.width,s)),u=Math.max(0,Math.min(this.contentSize.height-a.height,u)),s!==a.x||u!==a.y){let c=new y(s,u,a.width,a.height);this.delegate.setVisibleRect(c);}else this.updateSubviews();}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),o;e&&!(t&&i)?o=new y(0,0,this.contentSize.width,this.contentSize.height):o=this._overscanManager.getOverscannedRect();let r=this.layout.getVisibleLayoutInfos(o),l=new Map;for(let n of r)l.set(n.key,n);return l}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,o]of this._visibleViews){let r=e.get(i);(!r||o.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),o.parent.reuseChild(o),t.add(o));}for(let[i,o]of e){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(o),r.parent.children.add(r),this._visibleViews.set(i,r),t.delete(r);else {r.layoutInfo=o;let l=this.collection.getItem(o.key);r.content!==l&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r));}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let o=this._visibleViews.get(i);o.parent.children.delete(o),o.parent.children.add(o);}}render(e){let t=this,i=false,o=false,r=false,l=false,n=false,a=false,s=false,u=false;if(e.collection!==this.collection&&(t.collection=e.collection,i=true),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,this._scrollAnchor.reset(),i=true),e.persistedKeys&&!Xe(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,u=true),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let c=new y(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),d=new y(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(d,c)?(o=!e.visibleRect.pointEquals(this.visibleRect),r=!this.size.equals(e.size),l=this.size.width!==e.size.width,n=this.size.height!==e.size.height,i=true):u=true,t.visibleRect=e.visibleRect,t.size=e.size;}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(r||=e.invalidationContext.sizeChanged||false,l||=e.invalidationContext.widthChanged||false,n||=e.invalidationContext.heightChanged||false,o||=e.invalidationContext.offsetChanged||false,a||=e.invalidationContext.itemSizeChanged||false,s||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),i||=a||r||o||s),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(u=true)),i?this.relayout({offsetChanged:o,sizeChanged:r,widthChanged:l,heightChanged:n,itemSizeChanged:a,layoutOptionsChanged:s,layoutOptions:this._invalidationContext.layoutOptions}):u&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e);}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:true});}};var mt=typeof document<"u"?yt.useLayoutEffect:()=>{};function xe(h){let[e,t]=useState(new y(0,0,0,0)),[i,o]=useState(new m),[r,l]=useState(false),[n,a]=useState({}),s=useRef(false),[u]=useState(()=>new ge({collection:h.collection,layout:h.layout,delegate:{setVisibleRect(v){t(v),s.current=true;},renderView:h.renderView,invalidate:a}}));mt(()=>{s.current&&(s.current=false,h.onVisibleRectChange(e));});let c=useMemo(()=>h.layoutOptions!=null?{...n,layoutOptions:h.layoutOptions}:n,[n,h.layoutOptions]),d=u.render({layout:h.layout,collection:h.collection,persistedKeys:h.persistedKeys,layoutOptions:h.layoutOptions,visibleRect:e,size:i,invalidationContext:c,isScrolling:r}),f=u.contentSize,g=useCallback(()=>{l(true);},[]),p=useCallback(()=>{l(false);},[]);return useMemo(()=>({virtualizer:u,visibleViews:d,setVisibleRect:t,size:i,setSize:o,contentSize:f,isScrolling:r,startScrolling:g,endScrolling:p}),[u,d,t,i,o,f,r,g,p])}var F=class{virtualizer=null;shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}};var x=class h{type;key;parentKey;content;rect;estimatedSize;isSticky;opacity;transform;zIndex;allowOverflow;constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=false,this.isSticky=false,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=false;}copy(){let e=new h(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}};var V={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),preserveAspectRatio:false,minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},re=class extends F{gap=V.minSpace;dropIndicatorThickness=2;numColumns=0;direction="ltr";contentSize=new m;layoutInfos=new Map;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||V.minItemSize).equals(t.minItemSize||V.minItemSize)||!(e.maxItemSize||V.maxItemSize).equals(t.maxItemSize||V.maxItemSize)||!(e.minSpace||V.minSpace).equals(t.minSpace||V.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=V.minItemSize,maxItemSize:i=V.maxItemSize,preserveAspectRatio:o=V.preserveAspectRatio,minSpace:r=V.minSpace,maxHorizontalSpace:l=V.maxSpace,maxColumns:n=V.maxColumns,dropIndicatorThickness:a=V.dropIndicatorThickness,loaderHeight:s=V.loaderHeight,direction:u="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=a,this.direction=u;let c=this.virtualizer.size.width,d=Math.min(i.width,c),f=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*d),g=Math.floor(c/(t.width+r.width)),p=Math.max(1,Math.min(n,g));this.numColumns=p;let L=c-r.width*Math.max(0,p),v=Math.floor(L/p);v=Math.max(t.width,Math.min(d,v));let N=(v-t.width)/Math.max(1,d-t.width),T=t.height+Math.floor((f-t.height)*N);T=Math.max(t.height,Math.min(f,T));let O=Math.min(Math.max(l,r.width),Math.floor((c-p*v)/(p+1)));this.gap=new m(O,r.height),this.margin=Math.floor((c-p*v-O*(p+1))/2);let k=this.virtualizer.collection,j=k.size,M=k.getLastKey();for(let R=0;R<2&&M!=null;R++){if(k.getItem(M)?.type==="skeleton"){j++;break}M=k.getKeyBefore(M);}let q=Math.ceil(j/p),X=k[Symbol.iterator](),z=q>0?r.height:0,w=new Map,I=null,S=0;for(let R=0;R<q;R++){let P=0,G=[];for(let E=0;E<p;E++){let A=I||X.next().value;if(!A)break;if(A.type==="loader")continue;A.type==="skeleton"&&(I=A);let _=I?`${I.key}-${S++}`:A.key,D=this.layoutInfos.get(_),H=A;I&&(H=D&&D.content.key===_?D.content:{...I,key:_});let he=O+E*(v+O)+this.margin,ue=T,te=!o;D&&te&&(ue=D.rect.height,te=e.layoutOptionsChanged||e.sizeChanged||D.estimatedSize||D.content!==H);let nt=new y(he,z,v,ue),$=new x(A.type,_,nt);$.estimatedSize=te,$.allowOverflow=true,$.content=H,w.set(_,$),G.push($),P=Math.max(P,$.rect.height);}for(let E of G)E.rect.height=P;z+=P+r.height,I&&R===q-1&&z<this.virtualizer.size.height&&q++;}let b=k.getItem(k.getLastKey());if(b?.type==="loader"){(S>0||!b.props.isLoading)&&(s=0);let R=c-O*2,P=new y(O,z,R,s),G=new x("loader",b.key,P);w.set(b.key,G),z=G.rect.maxY;}this.layoutInfos=w,this.contentSize=new m(this.virtualizer.size.width,z);}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getDropTargetFromPoint(e,t,i){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y,this.direction==="rtl"&&this.numColumns>1&&(e=this.contentSize.width-e);let o=null;if(this.numColumns===1){let u=new y(e,Math.max(0,t-this.gap.height),1,Math.max(1,this.gap.height*2)),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.y-t),p=Math.abs(f.rect.maxY-t),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}else {let u=new y(Math.max(0,e-this.gap.width),t,this.gap.width*2,1),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.x-e),p=Math.abs(f.rect.maxX-e),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}let r=o!=null?this.getLayoutInfo(o):null;if(!r)return {type:"root"};let l={type:"item",key:r.key,dropPosition:"on"},n=this.numColumns===1?t:e,a=this.numColumns===1?r.rect.y:r.rect.x,s=this.numColumns===1?r.rect.height:r.rect.width;if(i(l))n<a+5?l.dropPosition="before":n>a+s-5&&(l.dropPosition="after");else {let u=a+s/2;n<=u&&i({...l,dropPosition:"before"})?l.dropPosition="before":n>=u&&i({...l,dropPosition:"after"})&&(l.dropPosition="after");}return l}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return this.numColumns===1?i=new y(t.rect.x,e.dropPosition==="before"?t.rect.y-this.gap.height/2-this.dropIndicatorThickness/2:t.rect.maxY+this.gap.height/2-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=new y(e.dropPosition==="before"?t.rect.x-this.gap.width/2-this.dropIndicatorThickness/2:t.rect.maxX+this.gap.width/2-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height),new x("dropIndicator",e.key+":"+e.dropPosition,i)}};var J=48,Y=class extends F{rowSize;orientation;estimatedRowSize;headingSize;estimatedHeadingSize;loaderSize;dropIndicatorThickness;gap;padding;layoutNodes;contentSize;lastCollection;rootNodes;invalidateEverything;validRect;requestedRect;constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=false,this.validRect=new y,this.requestedRect=new y,this.contentSize=new m;}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t=this.orientation==="horizontal"?"x":"y",i=this.orientation==="horizontal"?"width":"height";if(e[i]>1){let l=(this.rowSize??this.estimatedRowSize??J)+this.gap;e=e.copy();let n=Math.floor(e[t]/l)*l,a=e[i]+e[t]-n;e[t]=n,e[i]=Math.ceil(a/l)*l;}this.layoutIfNeeded(e);let o=[],r=l=>{for(let n of l)this.isVisible(n,e)&&(o.push(n.layoutInfo),n.children&&r(n.children));};return r(this.rootNodes),o}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return !this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new y(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new y(0,0,this.contentSize.width,this.contentSize.height),true):false}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return (e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let o of this.lastCollection.getKeys())t.getItem(o)||this.layoutNodes.get(o)&&this.layoutNodes.delete(o);this.lastCollection=t,this.invalidateEverything=false,this.validRect=this.requestedRect.copy();}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=this.orientation==="horizontal"?"x":"y",o=this.orientation==="horizontal"?"maxX":"maxY",r=pt(t,s=>s.type!=="content"),l=r.filter(s=>s.type==="loader"),n=[],a=t?.size===0;a&&(e=0);for(let s of r){let u=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s.type==="item"&&e+u<this.requestedRect[i]&&!this.isValid(s,e)){e+=u;continue}let c=this.orientation==="horizontal"?this.buildChild(s,e,this.padding,null):this.buildChild(s,this.padding,e,null);if(e=c.layoutInfo.rect[o]+this.gap,n.push(c),s.type==="loader"){let d=l.indexOf(s);l.splice(d,1);}if((s.type==="item"||s.type==="loader")&&e>this.requestedRect[o]){let d=r.indexOf(s);for(let f of l){let g=r.indexOf(f);e+=(g-d-1)*u;let p=this.orientation==="horizontal"?this.buildChild(f,e,this.padding,null):this.buildChild(f,this.padding,e,null);n.push(p),e=p.layoutInfo.rect[o],d=g;}e+=(r.length-d-1)*u;break}}return e=Math.max(e-this.gap,0),e+=a?0:this.padding,this.contentSize=this.orientation==="horizontal"?new m(e,this.virtualizer.size.height):new m(this.virtualizer.size.width,e),n}isValid(e,t){let i=this.layoutNodes.get(e.key),o=this.orientation==="horizontal"?"x":"y";return !this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[o]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,o){if(this.isValid(e,this.orientation==="horizontal"?t:i))return this.layoutNodes.get(e.key);let r=this.buildNode(e,t,i);return r.layoutInfo.parentKey=o??null,r.layoutInfo.allowOverflow=true,this.layoutNodes.set(e.key,r),r}buildNode(e,t,i){switch(e.type){case "section":return this.buildSection(e,t,i);case "item":return this.buildItem(e,t,i);case "header":return this.buildSectionHeader(e,t,i);case "loader":return this.buildLoader(e,t,i);case "separator":return this.buildItem(e,t,i);case "submenutrigger":return this.buildSection(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let o=new y(t,i,this.padding,0),r=new x(e.type,e.key,o);return this.orientation==="horizontal"?(o.height=this.virtualizer.contentSize.height-this.padding-i,o.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0):(o.width=this.virtualizer.contentSize.width-this.padding-t,o.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0),{layoutInfo:r,validRect:o.intersection(this.requestedRect)}}buildSection(e,t,i){let o=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,l=this.virtualizer.size.height-this.padding-i,n=this.orientation==="horizontal"?new y(t,i,0,l):new y(t,i,r,0),a=new x(e.type,e.key,n),s=this.orientation==="horizontal"?t:i,u=this.orientation==="horizontal"?"x":"y",c=this.orientation==="horizontal"?"maxX":"maxY",d=this.orientation==="horizontal"?"width":"height",f=0,g=[];for(let p of b$2(e,o)){if(p.type==="content")continue;let L=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s+L<this.requestedRect[u]&&!this.isValid(e,s)){s+=L,f++;continue}let v=this.orientation==="horizontal"?this.buildChild(p,s,i,a.key):this.buildChild(p,t,s,a.key);if(s=v.layoutInfo.rect[c]+this.gap,g.push(v),s>this.requestedRect[c]){s+=([...b$2(e,o)].length-(g.length+f))*L;break}}return s-=this.gap,n[d]=s-(this.orientation==="horizontal"?t:i),{layoutInfo:a,children:g,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.headingSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key),d=c?.layoutInfo;if(d){let f=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;n=c.layoutInfo.rect[r],a=l!==d.rect[o]||f!==g||d.estimatedSize;}else n=e.rendered?this.estimatedHeadingSize:0,a=true;}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l-i):new y(t,i,l-t,n),u=new x("header",e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.rowSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key);c?(n=c.layoutInfo.rect[r],a=l!==c.layoutInfo.rect[o]||e!==c.node||c.layoutInfo.estimatedSize):(n=this.estimatedRowSize,a=true);}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l):new y(t,i,l,n),u=new x(e.type,e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return false;let o=this.virtualizer.collection,r=i.layoutInfo,l=this.orientation==="horizontal"?"x":"y",n=this.orientation==="horizontal"?"width":"height";if(r.estimatedSize=false,r.rect[n]!==t[n]){let a=r.copy();a.rect[n]=t[n],i.layoutInfo=a,this.validRect[n]=Math.min(this.validRect[n],r.rect[l]-this.validRect[l]),i.node?.type==="item"&&(this.requestedRect[n]+=a.rect[n]-r.rect[n]),this.updateLayoutNode(e,r,a);let s=r.parentKey!=null?o.getItem(r.parentKey):null;for(;s;)this.updateLayoutNode(s.key,r,a),s=s.parentKey!=null?o.getItem(s.parentKey):null;return true}return false}updateLayoutNode(e,t,i){let o=this.layoutNodes.get(e);o&&(o.validRect=o.validRect.intersection(this.validRect),o.layoutInfo===t&&(o.layoutInfo=i));}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=this.orientation==="horizontal"?new y(Math.max(0,t.rect.x-this.dropIndicatorThickness/2),t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){let r=o.level??0,l=this.collection.getKeyAfter(e.key);for(;l!=null;){let n=this.collection.getItem(l);if(!n||n.level<=r)break;t=this.getLayoutInfo(l)||t,l=this.collection.getKeyAfter(l);}}i=this.orientation==="horizontal"?new y(t.rect.maxX-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness);}else i=t.rect;return new x("dropIndicator",e.key+":"+e.dropPosition,i)}};function pt(h,e){let t=[];for(let i of h)e(i)&&t.push(i);return t}var Be=48,le=class extends Y{lastCollection=null;columnWidths=new Map;stickyColumnIndices;lastPersistedKeys=null;persistedIndices=new Map;constructor(e){super(e),this.stickyColumnIndices=[];}get collection(){return this.virtualizer.collection}get rowHeight(){return super.rowHeight}get estimatedRowHeight(){return super.estimatedRowHeight}get headingHeight(){return super.headingHeight}get estimatedHeadingHeight(){return super.estimatedHeadingHeight}get loaderHeight(){return super.loaderHeight}columnsChanged(e,t){return !t||e.columns!==t.columns&&e.columns.length!==t.columns.length||e.columns.some((i,o)=>i.key!==t.columns[o].key||i.props.width!==t.columns[o].props.width||i.props.minWidth!==t.columns[o].props.minWidth||i.props.maxWidth!==t.columns[o].props.maxWidth)}shouldInvalidateLayoutOptions(e,t){return e.columnWidths!==t.columnWidths||super.shouldInvalidateLayoutOptions(e,t)}update(e){let t=this.virtualizer.collection;if(e.layoutOptions?.columnWidths){for(let[i,o]of e.layoutOptions.columnWidths)if(this.columnWidths.get(i)!==o){this.columnWidths=e.layoutOptions.columnWidths,e.sizeChanged=true;break}}else if(e.sizeChanged||this.columnsChanged(t,this.lastCollection)){let i=new a$4({});this.columnWidths=i.buildColumnWidths(this.virtualizer.size.width-this.padding*2,t,new Map),e.sizeChanged=true;}super.update(e);}buildCollection(){this.stickyColumnIndices=[];let e=this.virtualizer.collection;for(let r of e.columns)(this.isStickyColumn(r)||e.rowHeaderColumnKeys.has(r.key))&&this.stickyColumnIndices.push(r.index);let t=[],i=0,o=0;if(e.head){for(let r of e)switch(r.type){case "tableheader":{let l=this.buildTableHeader();i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}case "tablebody":case "tablefooter":{let l=this.buildRowGroup(i,r);i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}}i>0&&(i-=this.gap);for(let r of t)r.layoutInfo.rect.width=o;}else {let r=this.buildTableHeader();this.layoutNodes.set(r.layoutInfo.key,r);let l=this.buildBody(r.layoutInfo.rect.maxY+this.gap);l.layoutInfo.rect.width=Math.max(r.layoutInfo.rect.width,l.layoutInfo.rect.width),i=l.layoutInfo.rect.maxY,o=l.layoutInfo.rect.width,t=[r,l];}return this.lastPersistedKeys=null,this.contentSize=new m(o+this.padding*2,i+this.padding),t}buildTableHeader(){let e=this.virtualizer.collection,t=new y(this.padding,this.padding,0,0),i=new x("header",e.head?.key??"header",t);i.isSticky=true,i.zIndex=1;let o=this.padding,r=0,l=[];for(let n of e.headerRows){let a=this.buildChild(n,this.padding,o,i.key);a.layoutInfo.parentKey=i.key,o=a.layoutInfo.rect.maxY,r=Math.max(r,a.layoutInfo.rect.width),a.index=l.length,l.push(a);}return t.width=r,t.height=o-this.padding,{layoutInfo:i,children:l,validRect:i.rect,node:e.head}}buildHeaderRow(e,t,i){let o=new y(t,i,0,0),r=new x("headerrow",e.key,o),l=0,n=[];for(let a of b$2(e,this.virtualizer.collection)){let s=this.buildChild(a,t,i,r.key);s.layoutInfo.parentKey=r.key,t=s.layoutInfo.rect.maxX,l=Math.max(l,s.layoutInfo.rect.height),s.index=n.length,n.push(s);}for(let[a,s]of n.entries())s.layoutInfo.zIndex=n.length-a+1;return this.setChildHeights(n,l),o.height=l,o.width=t-o.x,{layoutInfo:r,children:n,validRect:o,node:e}}setChildHeights(e,t){for(let i of e)i.layoutInfo.rect.height!==t&&(i.layoutInfo=i.layoutInfo.copy(),i.layoutInfo.rect.height=t);}getRenderedColumnWidth(e){let t=this.virtualizer.collection,i=e.colSpan??1,o=e.colIndex??e.index,r=0;for(let l=o;l<o+i;l++){let n=t.columns[l];n?.key!=null&&(r+=this.columnWidths.get(n.key)??0);}return r}getEstimatedHeight(e,t,i,o){let r=false;if(i==null){let l=this.layoutNodes.get(e.key);l?(i=l.layoutInfo.rect.height,r=e!==l.node||t!==l.layoutInfo.rect.width||l.layoutInfo.estimatedSize):(i=o??Be,r=true);}return {height:i,isEstimated:r}}getEstimatedRowHeight(){return this.rowHeight??this.estimatedRowHeight??Be}buildColumn(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.headingHeight??this.rowHeight,this.estimatedHeadingHeight??this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:a.rect,node:e}}isStickyColumn(e){return false}buildBody(e){let t=this.virtualizer.collection;return this.buildRowGroup(e,t.body)}buildRowGroup(e,t){let i=this.virtualizer.collection,o=new y(this.padding,e,0,0),r=new x("rowgroup",t.key,o),l=e,n=0,a=[],s=this.getEstimatedRowHeight()+this.gap,u=b$2(t,i);for(let d of u){if(e+s<this.requestedRect.y&&!this.isValid(d,e)||e>this.requestedRect.maxY&&d.type!=="loader"){e+=s;continue}let f=this.buildChild(d,this.padding,e,r.key);f.layoutInfo.parentKey=r.key,f.index=a.length,e=f.layoutInfo.rect.maxY+this.gap,n=Math.max(n,f.layoutInfo.rect.width),a.push(f);}return i?.size===0?e=this.virtualizer.size.height:e-=this.gap,o.width=n,o.height=e-l,{layoutInfo:r,children:a,validRect:r.rect.intersection(this.requestedRect),node:t}}buildLoader(e,t,i){let o=super.buildLoader(e,t,i),r=this.virtualizer.collection;return o.layoutInfo.rect.width=this.layoutNodes.get(r.head?.key??"header").layoutInfo.rect.width,o.validRect=o.layoutInfo.rect.intersection(this.requestedRect),o}buildNode(e,t,i){switch(e.type){case "headerrow":return this.buildHeaderRow(e,t,i);case "item":return this.buildRow(e,t,i);case "column":case "placeholder":return this.buildColumn(e,t,i);case "cell":return this.buildCell(e,t,i);case "loader":return this.buildLoader(e,t,i);default:throw new Error("Unknown node type "+e.type)}}buildRow(e,t,i){let o=this.virtualizer.collection,r=new y(t,i,0,0),l=new x("row",e.key,r),n=[],a=0;for(let s of b$2(e,o))if(s.type==="cell")if(t>this.requestedRect.maxX){let u=this.layoutNodes.get(s.key);if(u)u.layoutInfo.rect.x=t,t+=u.layoutInfo.rect.width;else break}else {let u=this.buildChild(s,t,i,l.key);t=u.layoutInfo.rect.maxX,a=Math.max(a,u.layoutInfo.rect.height),u.index=n.length,n.push(u);}return this.setChildHeights(n,a),r.width=this.layoutNodes.get(o.head?.key??"header").layoutInfo.rect.width,r.height=a,{layoutInfo:l,children:n,validRect:r.intersection(this.requestedRect),node:e}}buildCell(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.rowHeight,this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:n,node:e}}getVisibleLayoutInfos(e){if(e.height>1){let i=this.getEstimatedRowHeight();e.y=Math.floor(e.y/i)*i,e.height=Math.ceil(e.height/i)*i;}this.layoutIfNeeded(e);let t=[];this.buildPersistedIndices();for(let i of this.rootNodes)t.push(i.layoutInfo),this.addVisibleLayoutInfos(t,i,e);return t}addVisibleLayoutInfos(e,t,i){if(!(!t.children||t.children.length===0))switch(t.layoutInfo.type){case "header":{for(let o of t.children)e.push(o.layoutInfo),this.addVisibleLayoutInfos(e,o,i);break}case "rowgroup":{let o=this.binarySearch(t.children,i.topLeft,"y"),r=this.binarySearch(t.children,i.bottomRight,"y"),l=this.persistedIndices.get(t.layoutInfo.key),n=0;for(;l&&n<l.length&&l[n]<o;){let s=l[n];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i)),n++;}for(let s=o;s<=r;s++){for(;l&&n<l.length&&l[n]<s;)n++;e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i);}for(;l&&n<l.length;){let s=l[n++];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i));}let a=t.children.at(-1);a?.layoutInfo.type==="loader"&&e.push(a.layoutInfo);break}case "headerrow":case "row":{let o=this.binarySearch(t.children,i.topLeft,"x"),r=this.binarySearch(t.children,i.topRight,"x"),l=0,n=this.persistedIndices.get(t.layoutInfo.key)||this.stickyColumnIndices;for(;l<n.length&&n[l]<o;){let a=n[l];a<t.children.length&&e.push(t.children[a].layoutInfo),l++;}for(let a=o;a<=r;a++){for(;l<n.length&&n[l]<a;)l++;e.push(t.children[a].layoutInfo);}for(;l<n.length;){let a=n[l++];a<t.children.length&&e.push(t.children[a].layoutInfo);}break}default:throw new Error("Unknown node type "+t.layoutInfo.type)}}binarySearch(e,t,i){let o=0,r=e.length-1;for(;o<=r;){let l=o+r>>1,n=e[l];if(i==="x"&&n.layoutInfo.rect.maxX<=t.x||i==="y"&&n.layoutInfo.rect.maxY<=t.y)o=l+1;else if(i==="x"&&n.layoutInfo.rect.x>t.x||i==="y"&&n.layoutInfo.rect.y>t.y)r=l-1;else return l}return Math.max(0,Math.min(e.length-1,o))}buildPersistedIndices(){if(this.virtualizer.persistedKeys!==this.lastPersistedKeys){this.lastPersistedKeys=this.virtualizer.persistedKeys,this.persistedIndices.clear();for(let e of this.virtualizer.persistedKeys){let t=this.layoutNodes.get(e)?.layoutInfo;for(;t&&t.parentKey;){let i=this.virtualizer.collection.getItem(t.key),o=this.persistedIndices.get(t.parentKey);o||(o=i?.type==="cell"||i?.type==="column"?[...this.stickyColumnIndices]:[],this.persistedIndices.set(t.parentKey,o));let r=this.layoutNodes.get(t.key)?.index;r!=null&&!o.includes(r)&&o.push(r),t=this.layoutNodes.get(t.parentKey)?.layoutInfo;}}for(let e of this.persistedIndices.values())e.sort((t,i)=>t-i);}}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(c.type!=="row"||!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=super.getDropTargetLayoutInfo(e);return t.parentKey=this.virtualizer.collection.getItem(e.key)?.parentKey??null,t}};var Le=class extends x{column=0;index=0;copy(){let e=super.copy();return e.column=this.column,e.index=this.index,e}},K={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},ne=class extends F{contentSize=new m;layoutInfos=new Map;numColumns=0;dropIndicatorThickness=2;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||!(e.minItemSize||K.minItemSize).equals(t.minItemSize||K.minItemSize)||!(e.maxItemSize||K.maxItemSize).equals(t.maxItemSize||K.maxItemSize)||!(e.minSpace||K.minSpace).equals(t.minSpace||K.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight}update(e){let{minItemSize:t=K.minItemSize,maxItemSize:i=K.maxItemSize,minSpace:o=K.minSpace,maxHorizontalSpace:r=K.maxSpace,maxColumns:l=K.maxColumns,dropIndicatorThickness:n=K.dropIndicatorThickness,loaderHeight:a=K.loaderHeight}=e.layoutOptions||{};this.dropIndicatorThickness=n;let s=this.virtualizer.size.width,u=Math.min(i.width,s),c=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*u),d=Math.floor(s/(t.width+o.width)),f=Math.max(1,Math.min(l,d)),g=s-o.width*Math.max(0,f),p=Math.floor(g/f);p=Math.max(t.width,Math.min(u,p));let L=(p-t.width)/Math.max(1,u-t.width),v=t.height+Math.floor((c-t.height)*L);v=Math.max(t.height,Math.min(c,v));let N=Math.min(Math.max(r,o.width),Math.floor((s-f*p)/(f+1)));this.margin=Math.floor((s-f*p-N*(f+1))/2);let T=Array(f).fill(o.height),O=new Map,k=0,j=(I,S)=>{let b=this.layoutInfos.get(I),R=v,P=true;b&&(R=b.rect.height/b.rect.width*p,P=e.sizeChanged||b.estimatedSize||b.content!==S);let E=(f===this.numColumns&&b&&b.index===k&&b.rect.y<this.virtualizer.visibleRect.maxY?b.column:void 0)??T.reduce((he,ue,te)=>ue<T[he]?te:he,0),A=N+E*(p+N)+this.margin,_=T[E],D=new y(A,_,p,R),H=new Le(S.type,I,D);H.estimatedSize=P,H.allowOverflow=true,H.content=S,H.column=E,H.index=k++,O.set(I,H),T[E]+=H.rect.height+o.height;},M=this.virtualizer.collection,q=0;for(let I of M)if(I.type==="skeleton"){let S=[...T];for(;!T.every((b,R)=>b!==S[R])||Math.min(...T)<this.virtualizer.size.height;){let b=`${I.key}-${q++}`,R=this.layoutInfos.get(b)?.content||{...I};j(b,R);}break}else I.type!=="loader"&&j(I.key,I);let z=M?.size===0&&M.getItem(M.getFirstKey())?.type!=="skeleton"?0:Math.max(...T),w=M.getItem(M.getLastKey());if(w?.type==="loader"){(q>0||!w.props.isLoading)&&(a=0);let I=s-N*2,S=new y(N,z,I,a),b=new x("loader",w.key,S);O.set(w.key,b),z=b.rect.maxY;}this.contentSize=new m(this.virtualizer.size.width,z),this.layoutInfos=O,this.numColumns=f;}getLayoutInfo(e){return this.layoutInfos.get(e)}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getKeyRightOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(t.rect.maxX,t.rect.y,this.virtualizer.visibleRect.maxX-t.rect.maxX,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=n.rect.x-i.x,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyLeftOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(0,t.rect.y,t.rect.x,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=i.maxX-n.rect.maxX,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyRange(e,t){let i=this.getLayoutInfo(e),o=this.getLayoutInfo(t);if(!i||!o)return [];let r=i.rect.union(o.rect),l=[];for(let n of this.layoutInfos.values())r.intersection(n.rect).area>n.rect.area/2&&l.push(n.key);return l}getDropTargetFromPoint(e,t){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let i=this.virtualizer.keyAtPoint(new C(e,t));return i==null?{type:"root"}:{type:"item",key:i,dropPosition:"on"}}};var Re=new WeakMap;function Ue(h=false,e=document){if(!Re.has(e)||h){let t=e.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";let o=e.createElement("div"),r=o.style;r.width="100px",r.height="100px",t.appendChild(o),e.body.appendChild(t);let l;t.scrollLeft>0?l="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?l="negative":l="positive-ascending"),e.body.removeChild(t),Re.set(e,l);}return Re.get(e)}function ae(h,e){let{scrollLeft:t}=h;if(e==="rtl"){let{scrollWidth:i,clientWidth:o}=h;switch(Ue(false,a$3(h))){case "negative":t=-t;break;case "positive-descending":t=i-o-t;break}}return t}function zt(h,e){e=a(e);let{scrollViewProps:t,contentProps:i}=Ie(h,e);return jsx("div",{role:"presentation",...t,ref:e,children:jsx("div",{...i,children:h.children})})}yt.forwardRef(zt);function Ie(h$1,e$2){let{contentSize:t,onVisibleRectChange:i,onSizeChange:o,innerStyle:r,onScrollStart:l$1,onScrollEnd:n,scrollDirection:a="both",onScroll:s,allowsWindowScrolling:u$1,...c}=h$1,d=useRef({scrollPosition:new C,size:new m,viewportOffset:new C,viewportSize:new m,scrollEndTime:0,scrollTimeout:null,isScrolling:false,lastVisibleRect:new y}).current,{direction:f}=b(),g=useCallback(()=>{let z=u$1?new y(d.viewportOffset.x+d.scrollPosition.x,d.viewportOffset.y+d.scrollPosition.y,Math.max(0,Math.min(d.size.width-d.viewportOffset.x,d.viewportSize.width)),Math.max(0,Math.min(d.size.height-d.viewportOffset.y,d.viewportSize.height))):new y(d.scrollPosition.x,d.scrollPosition.y,d.size.width,d.size.height);(z.area>0||d.lastVisibleRect.area>0)&&(i(z),d.lastVisibleRect=z);},[d,u$1,i]),[p,L]=useState(false),v=useCallback(z=>{let w=j(z);if(!h(w,e$2.current))return;if(s&&w===e$2.current&&s(z),w!==e$2.current){let S=e$2.current.getBoundingClientRect(),b=S.x<0?-S.x:0,R=S.y<0?-S.y:0;if(b===d.viewportOffset.x&&R===d.viewportOffset.y)return;d.viewportOffset=new C(b,R);}else {let S=w.scrollTop,b=ae(w,f);d.scrollPosition=new C(Math.max(0,Math.min(b,t.width-d.size.width)),Math.max(0,Math.min(S,t.height-d.size.height)));}let I=b$1(z.currentTarget);flushSync(()=>{g(),d.isScrolling||(d.isScrolling=true,L(true),I.dispatchEvent(new I.Event("tk.disconnect-observer")),l$1&&l$1());let S=Date.now();d.scrollEndTime<=S+50&&(d.scrollEndTime=S+300,d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.scrollTimeout=setTimeout(()=>{d.isScrolling=false,L(false),d.scrollTimeout=null,I.dispatchEvent(new I.Event("tk.connect-observer")),n&&n();},300));});},[s,e$2,f,d,t,g,l$1,n]);a$1(e$2,"scroll",v),useEffect(()=>{let z=e$2.current;if(z)return e(l(z),"scroll",w=>{j(w)!==z&&v(w);},true)},[e$2,v]),useEffect(()=>()=>{if(d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.isScrolling){let z=b$1(e$2.current);z.dispatchEvent(new z.Event("tk.connect-observer"));}},[]);let N=useRef(false),T=useCallback(z=>{let w=e$2.current;if(!w||N.current)return;N.current=true;let I=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,S=b$1(w),b=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientWidth"),R=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientHeight"),P=w.clientWidth,G=w.clientHeight,E=I&&!b?1/0:P,A=I&&!R?1/0:G,_=S.innerWidth,D=S.innerHeight,H=d.viewportSize.width!==_||d.viewportSize.height!==D;H&&(d.viewportSize=new m(_,D)),(d.size.width!==E||d.size.height!==A||H)&&(d.size=new m(E,A),z(()=>{g(),o?.(d.size);}),(!I&&P!==w.clientWidth||G!==w.clientHeight)&&(d.size=new m(w.clientWidth,w.clientHeight),z(()=>{g(),o?.(d.size);}))),N.current=false;},[e$2,d,g,o]),O=u(T);useEffect(()=>{let z=b$1(e$2.current);d.viewportSize=new m(z.innerWidth,z.innerHeight);let w=()=>{O(flushSync);};return z.addEventListener("resize",w),()=>z.removeEventListener("resize",w)},[d,e$2]);let k=useRef(null),[j$1,M]=useState({});a$2(()=>{if(!N.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){M({}),k.current=t;return}else queueMicrotask(()=>O(flushSync));k.current=t;}),a$2(()=>{O(z=>z());},[j$1]);let q=useCallback(()=>{T(flushSync);},[T]);e$1({ref:e$2,box:"border-box",onResize:q});let X={padding:0,...c.style};return a==="horizontal"?(X.overflowX="auto",X.overflowY="hidden"):a==="vertical"||t.width===d.size.width?(X.overflowY="auto",X.overflowX="hidden"):X.overflow="auto",r={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:p?"none":"auto",position:"relative",...r},{isScrolling:p,scrollViewProps:{...c,style:X},contentProps:{role:"presentation",style:r}}}function Ze(h){let{layoutInfo:e,virtualizer:t,ref:i,shouldObserveItemSize:o}=h,r=e?.key,l=useCallback(()=>{if(r!=null&&i.current){if(!b$4(i.current))return;let a=St(i.current);t.updateItemSize(r,a);}},[t,r,i]),n=u(l);return a$2(()=>{e?.estimatedSize&&n();}),useEffect(()=>{if(!o)return;let a=i.current;if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(u=>{u.length&&n();});for(let u of a.children)s.observe(u);return ()=>{s.disconnect();}},[o,i,r]),{updateSize:l}}function St(h){let e=h.style.height;h.style.height="";let t=new m(h.scrollWidth,h.scrollHeight);return h.style.height=e,t}function be(h){let{style:e,className:t,layoutInfo:i,virtualizer:o,parent:r,children:l,shouldObserveItemSize:n}=h,{direction:a}=b(),s=useRef(null);return Ze({layoutInfo:i,virtualizer:o,ref:s,shouldObserveItemSize:n}),jsx("div",{role:"presentation",ref:s,className:t,style:{...et(i,a,r),...e},children:l})}var Qe=new WeakMap;function et(h,e,t){let i=e==="rtl"?"right":"left",o=Qe.get(h);if(o&&o[i]!=null){if(!t)return o;let n=h.rect.y-t.rect.y,a=h.rect.x-t.rect.x;if(o.top===n&&o[i]===a)return o}let r={top:h.rect.y-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.y:0),[i]:h.rect.x-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.x:0),width:h.rect.width,height:h.rect.height};Object.entries(r).forEach(([n,a])=>{Number.isFinite(a)||(r[n]=void 0);});let l={position:h.isSticky?"sticky":"absolute",display:h.isSticky?"inline-block":void 0,overflow:h.allowOverflow?"visible":"hidden",opacity:h.opacity,zIndex:h.zIndex,transform:h.transform??void 0,contain:"size layout style",...r};return Qe.set(h,l),l}var ot=createContext(null),Ne=createContext(null);function rt(h){let{children:e,layout:t,layoutOptions:i,shouldObserveItemSize:o}=h,r=useMemo(()=>typeof t=="function"?new t:t,[t]),l=useRef(null),{direction:n}=b(),a=useMemo(()=>({isVirtualized:true,layoutDelegate:r,dropTargetDelegate:r.getDropTargetFromPoint?{getDropTargetFromPoint(s,u,c){let d=l.current?.current;if(d&&r.virtualizer){let{visibleRect:f}=r.virtualizer;s-=f.x-ae(d,n),u-=f.y-d.scrollTop;}return r.getDropTargetFromPoint(s,u,c)}}:void 0,CollectionRoot:Tt,CollectionBranch:Ct}),[r,n]);return jsx(p.Provider,{value:a,children:jsx(Ne.Provider,{value:{layout:r,layoutOptions:i,shouldObserveItemSize:o,scrollRefHolder:l},children:e})})}function Tt({collection:h,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){let{layout:o,layoutOptions:r,shouldObserveItemSize:l,scrollRefHolder:n}=useContext(Ne);a$2(()=>{n.current=t??null;},[n,t]);let a=o.useLayoutOptions?.(),s=xe({allowsWindowScrolling:true,layout:o,collection:h,renderView:(c,d)=>d?.render?.(d),onVisibleRectChange(c){let d=t?.current;d&&(d.scrollLeft=c.x,d.scrollTop=c.y);},persistedKeys:e,layoutOptions:useMemo(()=>r&&a?{...r,...a}:r||a,[r,a])}),{contentProps:u}=Ie({onVisibleRectChange:s.setVisibleRect,onSizeChange:s.setSize,contentSize:s.contentSize,onScrollStart:s.startScrolling,onScrollEnd:s.endScrolling,allowsWindowScrolling:true},t);return jsx("div",{...u,children:jsx(ot.Provider,{value:s,children:lt(null,s.visibleViews,i,l)})})}function Ct({parent:h,renderDropIndicator:e}){let i=useContext(ot).virtualizer.getVisibleView(h.key),{shouldObserveItemSize:o}=useContext(Ne);return lt(i,Array.from(i.children),e,o)}function lt(h,e,t,i){return e.map(o=>kt(h,o,t,i))}function kt(h,e,t,i){let o$1=jsx(be,{layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:h?.layoutInfo,shouldObserveItemSize:i,children:e.rendered},e.key),{collection:r,layout:l}=e.virtualizer,n=e.content;return n?.type==="item"&&t&&l.getDropTargetLayoutInfo&&(o$1=jsxs(yt.Fragment,{children:[tt(h,e,{type:"item",key:e.content.key,dropPosition:"before"},t),o$1,o(r,n,a=>tt(h,e,a,t))]},e.key)),o$1}function tt(h,e,t,i){let o=i(t);if(o){let r=e.virtualizer.layout.getDropTargetLayoutInfo(t);o=jsx(be,{layoutInfo:r,virtualizer:e.virtualizer,parent:h?.layoutInfo,children:o});}return o}var Q=class extends re{useLayoutOptions(){let{direction:e}=b();return useMemo(()=>({direction:e}),[e])}};var ee=class extends le{useLayoutOptions(){let e=useContext(b$3);return useMemo(()=>({columnWidths:e?.columnWidths}),[e?.columnWidths])}};var se=class extends Q{useLayoutOptions(){let{direction:e}=b();return {direction:e}}};var Rr={LIST_BOX:{layout:Y,layoutOptions:{rowHeight:36}},TREE_VIEW:{layout:Y,layoutOptions:{rowHeight:44}},IMAGE_GALLERY:{layout:se,layoutOptions:{minItemSize:new m(114,167),maxItemSize:new m(114,167),dropIndicatorThickness:2,maxHorizontalSpace:0,minSpace:new m(4,16),preserveAspectRatio:true}},TABLE:{layout:ee,layoutOptions:{rowHeight:48,headingHeight:48}}};export{m as a,Y as b,ne as c,rt as d,Q as e,ee as f,se as g,Rr as h};
|
|
10
|
+
var C=class h{x;y;constructor(e=0,t=0){this.x=e,this.y=t;}copy(){return new h(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}};var y=class h{x;y;width;height;constructor(e=0,t=0,i=0,o=0){this.x=e,this.y=t,this.width=i,this.height=o;}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new C(this.x,this.y)}get topRight(){return new C(this.maxX,this.y)}get bottomLeft(){return new C(this.x,this.maxY)}get bottomRight(){return new C(this.maxX,this.maxY)}intersects(e){return (process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of ["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),o=Math.max(this.maxX,e.maxX)-t,r=Math.max(this.maxY,e.maxY)-i;return new h(t,i,o,r)}intersection(e){if(!this.intersects(e))return new h(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new h(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new h(this.x,this.y,this.width,this.height)}};var m=class h{width;height;constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0);}copy(){return new h(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}};var nt=0,ye=class{virtualizer;layoutInfo;content;rendered;viewType;key;children;reusableViews;constructor(e,t){this.virtualizer=e,this.key=++nt,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null;}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null;}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new ve(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e);}},fe=class extends ye{constructor(e){super(e,"root");}},ve=class extends ye{parent;constructor(e,t,i){super(e,i),this.parent=t;}};function qe(h,e){if(h===e)return true;if(h.size!==e.size)return false;for(let t of h)if(!e.has(t))return false;return true}var me=class{startTime=0;velocity=new C(0,0);visibleRect=new y;setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e;}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}};var at=4;function ge(h){return h==="x"?"width":"height"}function st(h,e,t,i,o){let r=t(h.key);if(!r)return null;let l=r.rect[h.corner][e]-i[e]-h.offset;if(l===0)return null;let n=i[e]+l,a=ge(e),s=Math.max(0,o[a]-i[a]),u=Math.max(0,Math.min(s,n));return u!==i[e]?u:null}function ht(h,e,t,i,o=()=>true){let r=ge(e),l=null;for(let[n,a]of i){if(!a||!o(a))continue;let s=a.rect.intersection(t)[r];if(a.rect.area>0&&s>=at){let u=a.rect.getCornerInRect(t)??"topLeft",c=a.rect[u][e]-t[e];(!l||(h==="end"?c<l.offset:c>l.offset))&&(l={key:n,corner:u,offset:c});}}return l}function ut(h,e,t,i){if(h==="start")return 0;let o=ge(e);return Math.max(0,t[o]-i[o])}function Xe(h,e,t,i,o){if(t==="start")return h[i]<=o;let r=ge(i);return e[r]-(h[i]+h[r])<=o}function dt(h,e,t,i,o,r,l,n,a,s){let u=c=>e==="x"?new y(c,a.y,a.width,a.height):new y(a.x,c,a.width,a.height);if(t){let c=st(t,e,n,a,s);if(c!=null)return u(c)}if(i&&!o&&(!r||l>0)){let c=u(ut(h,e,s,a));return c.equals(a)?null:c}return null}var pe=class{hasSnappedToEdge=false;hadEstimatedVisibleItems=false;wasNearAnchorEdge=false;reset(){this.hasSnappedToEdge=false,this.hadEstimatedVisibleItems=false,this.wasNearAnchorEdge=false;}captureBeforeLayout(e,t,i){return e?ht(e.edge,e.axis,i,t,e.isAnchorable):null}resolveAfterLayout(e){let{anchorInfo:t,anchor:i,postLayoutInfos:o,previousVisibleRect:r,previousContentSize:l,contentSize:n,itemSizeChanged:a,isScrolling:s,getLayoutInfo:u}=e;if(!t)return null;let c=this.hadEstimatedVisibleItems,d=this.wasNearAnchorEdge,f=false;for(let T of o.values())if(T.estimatedSize){f=true;break}if(this.hadEstimatedVisibleItems=f,c||(this.wasNearAnchorEdge=Xe(r,l,t.edge,t.axis,t.threshold)),r.area===0)return null;let g=t.axis==="x"?"width":"height",p=n[g]-l[g],L=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=true,!(L||p!==0||a))return null;let x=L||c&&d||Xe(r,l,t.edge,t.axis,t.threshold);c||(this.wasNearAnchorEdge=x);let N=L||c&&d?null:i;return dt(t.edge,t.axis,N,x,s,a,p,u,r,n)}};var ze=class{delegate;collection;layout;contentSize;visibleRect;size;persistedKeys;_visibleViews;_renderedContent;_rootView;_isScrolling;_invalidationContext;_overscanManager;_scrollAnchor;constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new m,this.visibleRect=new y,this.size=new m,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new fe(this),this._isScrolling=false,this._invalidationContext={},this._overscanManager=new me,this._scrollAnchor=new pe;}isPersistedKey(e){if(this.persistedKeys.has(e))return true;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return true}return false}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:o}=e.layoutInfo;e.content=o||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content);}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let o=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,o),o}keyAtPoint(e){let t=new y(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let o of i)if(o.rect.intersects(t))return o.key;return null}relayout(e={}){let t=this.layout.UNSTABLE_getScrollAnchorInfo?.(e.layoutOptions)??null,i=null;if(t){let c=[];for(let[d,f]of this._visibleViews){let g=this.layout.getLayoutInfo(d)??f.layoutInfo;g&&c.push([d,g]);}i=this._scrollAnchor.captureBeforeLayout(t,c,this.visibleRect);}let o=this.contentSize,r=this.visibleRect;this.layout.update(e);let l=this.layout.getContentSize();this.contentSize=new m(l.width,l.height);let n=this._scrollAnchor.resolveAfterLayout({anchorInfo:t,anchor:i,postLayoutInfos:t?this.getVisibleLayoutInfos():new Map,previousVisibleRect:r,previousContentSize:o,contentSize:this.contentSize,itemSizeChanged:e.itemSizeChanged??false,isScrolling:this._isScrolling,getLayoutInfo:c=>this.layout.getLayoutInfo(c)});if(n){this.delegate.setVisibleRect(n);return}let a=this.visibleRect,s=e.contentChanged?0:a.x,u=e.contentChanged?0:a.y;if(s=Math.max(0,Math.min(this.contentSize.width-a.width,s)),u=Math.max(0,Math.min(this.contentSize.height-a.height,u)),s!==a.x||u!==a.y){let c=new y(s,u,a.width,a.height);this.delegate.setVisibleRect(c);}else this.updateSubviews();}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),o;e&&!(t&&i)?o=new y(0,0,this.contentSize.width,this.contentSize.height):o=this._overscanManager.getOverscannedRect();let r=this.layout.getVisibleLayoutInfos(o),l=new Map;for(let n of r)l.set(n.key,n);return l}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,o]of this._visibleViews){let r=e.get(i);(!r||o.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),o.parent.reuseChild(o),t.add(o));}for(let[i,o]of e){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(o),r.parent.children.add(r),this._visibleViews.set(i,r),t.delete(r);else {r.layoutInfo=o;let l=this.collection.getItem(o.key);r.content!==l&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r));}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let o=this._visibleViews.get(i);o.parent.children.delete(o),o.parent.children.add(o);}}render(e){let t=this,i=false,o=false,r=false,l=false,n=false,a=false,s=false,u=false;if(e.collection!==this.collection&&(t.collection=e.collection,i=true),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,this._scrollAnchor.reset(),i=true),e.persistedKeys&&!qe(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,u=true),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let c=new y(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),d=new y(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(d,c)?(o=!e.visibleRect.pointEquals(this.visibleRect),r=!this.size.equals(e.size),l=this.size.width!==e.size.width,n=this.size.height!==e.size.height,i=true):u=true,t.visibleRect=e.visibleRect,t.size=e.size;}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(r||=e.invalidationContext.sizeChanged||false,l||=e.invalidationContext.widthChanged||false,n||=e.invalidationContext.heightChanged||false,o||=e.invalidationContext.offsetChanged||false,a||=e.invalidationContext.itemSizeChanged||false,s||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),i||=a||r||o||s),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(u=true)),i?this.relayout({offsetChanged:o,sizeChanged:r,widthChanged:l,heightChanged:n,itemSizeChanged:a,layoutOptionsChanged:s,layoutOptions:this._invalidationContext.layoutOptions}):u&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e);}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:true});}};var ft=typeof document<"u"?ct.useLayoutEffect:()=>{};function xe(h){let[e,t]=useState(new y(0,0,0,0)),[i,o]=useState(new m),[r,l]=useState(false),[n,a]=useState({}),s=useRef(false),[u]=useState(()=>new ze({collection:h.collection,layout:h.layout,delegate:{setVisibleRect(x){t(x),s.current=true;},renderView:h.renderView,invalidate:a}}));ft(()=>{s.current&&(s.current=false,h.onVisibleRectChange(e));});let c=useMemo(()=>h.layoutOptions!=null?{...n,layoutOptions:h.layoutOptions}:n,[n,h.layoutOptions]),d=u.render({layout:h.layout,collection:h.collection,persistedKeys:h.persistedKeys,layoutOptions:h.layoutOptions,visibleRect:e,size:i,invalidationContext:c,isScrolling:r}),f=u.contentSize,g=useCallback(()=>{l(true);},[]),p=useCallback(()=>{l(false);},[]);return useMemo(()=>({virtualizer:u,visibleViews:d,setVisibleRect:t,size:i,setSize:o,contentSize:f,isScrolling:r,startScrolling:g,endScrolling:p}),[u,d,t,i,o,f,r,g,p])}var F=class{virtualizer=null;shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}};var v=class h{type;key;parentKey;content;rect;estimatedSize;isSticky;opacity;transform;zIndex;allowOverflow;constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=false,this.isSticky=false,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=false;}copy(){let e=new h(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}};var V={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),preserveAspectRatio:false,minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},re=class extends F{gap=V.minSpace;dropIndicatorThickness=2;numColumns=0;direction="ltr";contentSize=new m;layoutInfos=new Map;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||V.minItemSize).equals(t.minItemSize||V.minItemSize)||!(e.maxItemSize||V.maxItemSize).equals(t.maxItemSize||V.maxItemSize)||!(e.minSpace||V.minSpace).equals(t.minSpace||V.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=V.minItemSize,maxItemSize:i=V.maxItemSize,preserveAspectRatio:o=V.preserveAspectRatio,minSpace:r=V.minSpace,maxHorizontalSpace:l=V.maxSpace,maxColumns:n=V.maxColumns,dropIndicatorThickness:a=V.dropIndicatorThickness,loaderHeight:s=V.loaderHeight,direction:u="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=a,this.direction=u;let c=this.virtualizer.size.width,d=Math.min(i.width,c),f=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*d),g=Math.floor(c/(t.width+r.width)),p=Math.max(1,Math.min(n,g));this.numColumns=p;let L=c-r.width*Math.max(0,p),x=Math.floor(L/p);x=Math.max(t.width,Math.min(d,x));let N=(x-t.width)/Math.max(1,d-t.width),T=t.height+Math.floor((f-t.height)*N);T=Math.max(t.height,Math.min(f,T));let O=Math.min(Math.max(l,r.width),Math.floor((c-p*x)/(p+1)));this.gap=new m(O,r.height),this.margin=Math.floor((c-p*x-O*(p+1))/2);let k=this.virtualizer.collection,j=k.size,M=k.getLastKey();for(let R=0;R<2&&M!=null;R++){if(k.getItem(M)?.type==="skeleton"){j++;break}M=k.getKeyBefore(M);}let q=Math.ceil(j/p),X=k[Symbol.iterator](),z=q>0?r.height:0,b=new Map,w=null,S=0;for(let R=0;R<q;R++){let P=0,G=[];for(let E=0;E<p;E++){let A=w||X.next().value;if(!A)break;if(A.type==="loader")continue;A.type==="skeleton"&&(w=A);let _=w?`${w.key}-${S++}`:A.key,D=this.layoutInfos.get(_),H=A;w&&(H=D&&D.content.key===_?D.content:{...w,key:_});let he=O+E*(x+O)+this.margin,ue=T,te=!o;D&&te&&(ue=D.rect.height,te=e.layoutOptionsChanged||e.sizeChanged||D.estimatedSize||D.content!==H);let lt=new y(he,z,x,ue),$=new v(A.type,_,lt);$.estimatedSize=te,$.allowOverflow=true,$.content=H,b.set(_,$),G.push($),P=Math.max(P,$.rect.height);}for(let E of G)E.rect.height=P;z+=P+r.height,w&&R===q-1&&z<this.virtualizer.size.height&&q++;}let I=k.getItem(k.getLastKey());if(I?.type==="loader"){(S>0||!I.props.isLoading)&&(s=0);let R=c-O*2,P=new y(O,z,R,s),G=new v("loader",I.key,P);b.set(I.key,G),z=G.rect.maxY;}this.layoutInfos=b,this.contentSize=new m(this.virtualizer.size.width,z);}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getDropTargetFromPoint(e,t,i){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y,this.direction==="rtl"&&this.numColumns>1&&(e=this.contentSize.width-e);let o=null;if(this.numColumns===1){let u=new y(e,Math.max(0,t-this.gap.height),1,Math.max(1,this.gap.height*2)),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.y-t),p=Math.abs(f.rect.maxY-t),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}else {let u=new y(Math.max(0,e-this.gap.width),t,this.gap.width*2,1),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.x-e),p=Math.abs(f.rect.maxX-e),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}let r=o!=null?this.getLayoutInfo(o):null;if(!r)return {type:"root"};let l={type:"item",key:r.key,dropPosition:"on"},n=this.numColumns===1?t:e,a=this.numColumns===1?r.rect.y:r.rect.x,s=this.numColumns===1?r.rect.height:r.rect.width;if(i(l))n<a+5?l.dropPosition="before":n>a+s-5&&(l.dropPosition="after");else {let u=a+s/2;n<=u&&i({...l,dropPosition:"before"})?l.dropPosition="before":n>=u&&i({...l,dropPosition:"after"})&&(l.dropPosition="after");}return l}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return this.numColumns===1?i=new y(t.rect.x,e.dropPosition==="before"?t.rect.y-this.gap.height/2-this.dropIndicatorThickness/2:t.rect.maxY+this.gap.height/2-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=new y(e.dropPosition==="before"?t.rect.x-this.gap.width/2-this.dropIndicatorThickness/2:t.rect.maxX+this.gap.width/2-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height),new v("dropIndicator",e.key+":"+e.dropPosition,i)}};var J=48,Y=class extends F{rowSize;orientation;estimatedRowSize;headingSize;estimatedHeadingSize;loaderSize;dropIndicatorThickness;gap;padding;layoutNodes;contentSize;lastCollection;rootNodes;invalidateEverything;validRect;requestedRect;constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=false,this.validRect=new y,this.requestedRect=new y,this.contentSize=new m;}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t=this.orientation==="horizontal"?"x":"y",i=this.orientation==="horizontal"?"width":"height";if(e[i]>1){let l=(this.rowSize??this.estimatedRowSize??J)+this.gap;e=e.copy();let n=Math.floor(e[t]/l)*l,a=e[i]+e[t]-n;e[t]=n,e[i]=Math.ceil(a/l)*l;}this.layoutIfNeeded(e);let o=[],r=l=>{for(let n of l)this.isVisible(n,e)&&(o.push(n.layoutInfo),n.children&&r(n.children));};return r(this.rootNodes),o}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return !this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new y(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new y(0,0,this.contentSize.width,this.contentSize.height),true):false}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return (e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let o of this.lastCollection.getKeys())t.getItem(o)||this.layoutNodes.get(o)&&this.layoutNodes.delete(o);this.lastCollection=t,this.invalidateEverything=false,this.validRect=this.requestedRect.copy();}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=this.orientation==="horizontal"?"x":"y",o=this.orientation==="horizontal"?"maxX":"maxY",r=mt(t,s=>s.type!=="content"),l=r.filter(s=>s.type==="loader"),n=[],a=t?.size===0;a&&(e=0);for(let s of r){let u=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s.type==="item"&&e+u<this.requestedRect[i]&&!this.isValid(s,e)){e+=u;continue}let c=this.orientation==="horizontal"?this.buildChild(s,e,this.padding,null):this.buildChild(s,this.padding,e,null);if(e=c.layoutInfo.rect[o]+this.gap,n.push(c),s.type==="loader"){let d=l.indexOf(s);l.splice(d,1);}if((s.type==="item"||s.type==="loader")&&e>this.requestedRect[o]){let d=r.indexOf(s);for(let f of l){let g=r.indexOf(f);e+=(g-d-1)*u;let p=this.orientation==="horizontal"?this.buildChild(f,e,this.padding,null):this.buildChild(f,this.padding,e,null);n.push(p),e=p.layoutInfo.rect[o],d=g;}e+=(r.length-d-1)*u;break}}return e=Math.max(e-this.gap,0),e+=a?0:this.padding,this.contentSize=this.orientation==="horizontal"?new m(e,this.virtualizer.size.height):new m(this.virtualizer.size.width,e),n}isValid(e,t){let i=this.layoutNodes.get(e.key),o=this.orientation==="horizontal"?"x":"y";return !this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[o]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,o){if(this.isValid(e,this.orientation==="horizontal"?t:i))return this.layoutNodes.get(e.key);let r=this.buildNode(e,t,i);return r.layoutInfo.parentKey=o??null,r.layoutInfo.allowOverflow=true,this.layoutNodes.set(e.key,r),r}buildNode(e,t,i){switch(e.type){case "section":return this.buildSection(e,t,i);case "item":return this.buildItem(e,t,i);case "header":return this.buildSectionHeader(e,t,i);case "loader":return this.buildLoader(e,t,i);case "separator":return this.buildItem(e,t,i);case "submenutrigger":return this.buildSection(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let o=new y(t,i,this.padding,0),r=new v(e.type,e.key,o);return this.orientation==="horizontal"?(o.height=this.virtualizer.contentSize.height-this.padding-i,o.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0):(o.width=this.virtualizer.contentSize.width-this.padding-t,o.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0),{layoutInfo:r,validRect:o.intersection(this.requestedRect)}}buildSection(e,t,i){let o=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,l=this.virtualizer.size.height-this.padding-i,n=this.orientation==="horizontal"?new y(t,i,0,l):new y(t,i,r,0),a=new v(e.type,e.key,n),s=this.orientation==="horizontal"?t:i,u=this.orientation==="horizontal"?"x":"y",c=this.orientation==="horizontal"?"maxX":"maxY",d=this.orientation==="horizontal"?"width":"height",f=0,g=[];for(let p of b$2(e,o)){if(p.type==="content")continue;let L=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s+L<this.requestedRect[u]&&!this.isValid(e,s)){s+=L,f++;continue}let x=this.orientation==="horizontal"?this.buildChild(p,s,i,a.key):this.buildChild(p,t,s,a.key);if(s=x.layoutInfo.rect[c]+this.gap,g.push(x),s>this.requestedRect[c]){s+=([...b$2(e,o)].length-(g.length+f))*L;break}}return s-=this.gap,n[d]=s-(this.orientation==="horizontal"?t:i),{layoutInfo:a,children:g,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.headingSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key),d=c?.layoutInfo;if(d){let f=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;n=c.layoutInfo.rect[r],a=l!==d.rect[o]||f!==g||d.estimatedSize;}else n=e.rendered?this.estimatedHeadingSize:0,a=true;}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l-i):new y(t,i,l-t,n),u=new v("header",e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.rowSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key);c?(n=c.layoutInfo.rect[r],a=l!==c.layoutInfo.rect[o]||e!==c.node||c.layoutInfo.estimatedSize):(n=this.estimatedRowSize,a=true);}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l):new y(t,i,l,n),u=new v(e.type,e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return false;let o=this.virtualizer.collection,r=i.layoutInfo,l=this.orientation==="horizontal"?"x":"y",n=this.orientation==="horizontal"?"width":"height";if(r.estimatedSize=false,r.rect[n]!==t[n]){let a=r.copy();a.rect[n]=t[n],i.layoutInfo=a,this.validRect[n]=Math.min(this.validRect[n],r.rect[l]-this.validRect[l]),i.node?.type==="item"&&(this.requestedRect[n]+=a.rect[n]-r.rect[n]),this.updateLayoutNode(e,r,a);let s=r.parentKey!=null?o.getItem(r.parentKey):null;for(;s;)this.updateLayoutNode(s.key,r,a),s=s.parentKey!=null?o.getItem(s.parentKey):null;return true}return false}updateLayoutNode(e,t,i){let o=this.layoutNodes.get(e);o&&(o.validRect=o.validRect.intersection(this.validRect),o.layoutInfo===t&&(o.layoutInfo=i));}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=this.orientation==="horizontal"?new y(Math.max(0,t.rect.x-this.dropIndicatorThickness/2),t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){let r=o.level??0,l=this.collection.getKeyAfter(e.key);for(;l!=null;){let n=this.collection.getItem(l);if(!n||n.level<=r)break;t=this.getLayoutInfo(l)||t,l=this.collection.getKeyAfter(l);}}i=this.orientation==="horizontal"?new y(t.rect.maxX-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness);}else i=t.rect;return new v("dropIndicator",e.key+":"+e.dropPosition,i)}};function mt(h,e){let t=[];for(let i of h)e(i)&&t.push(i);return t}var je=48,le=class extends Y{lastCollection=null;columnWidths=new Map;stickyColumnIndices;lastPersistedKeys=null;persistedIndices=new Map;constructor(e){super(e),this.stickyColumnIndices=[];}get collection(){return this.virtualizer.collection}get rowHeight(){return super.rowHeight}get estimatedRowHeight(){return super.estimatedRowHeight}get headingHeight(){return super.headingHeight}get estimatedHeadingHeight(){return super.estimatedHeadingHeight}get loaderHeight(){return super.loaderHeight}columnsChanged(e,t){return !t||e.columns!==t.columns&&e.columns.length!==t.columns.length||e.columns.some((i,o)=>i.key!==t.columns[o].key||i.props.width!==t.columns[o].props.width||i.props.minWidth!==t.columns[o].props.minWidth||i.props.maxWidth!==t.columns[o].props.maxWidth)}shouldInvalidateLayoutOptions(e,t){return e.columnWidths!==t.columnWidths||super.shouldInvalidateLayoutOptions(e,t)}update(e){let t=this.virtualizer.collection;if(e.layoutOptions?.columnWidths){for(let[i,o]of e.layoutOptions.columnWidths)if(this.columnWidths.get(i)!==o){this.columnWidths=e.layoutOptions.columnWidths,e.sizeChanged=true;break}}else if(e.sizeChanged||this.columnsChanged(t,this.lastCollection)){let i=new a$3({});this.columnWidths=i.buildColumnWidths(this.virtualizer.size.width-this.padding*2,t,new Map),e.sizeChanged=true;}super.update(e);}buildCollection(){this.stickyColumnIndices=[];let e=this.virtualizer.collection;for(let r of e.columns)(this.isStickyColumn(r)||e.rowHeaderColumnKeys.has(r.key))&&this.stickyColumnIndices.push(r.index);let t=[],i=0,o=0;if(e.head){for(let r of e)switch(r.type){case "tableheader":{let l=this.buildTableHeader();i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}case "tablebody":case "tablefooter":{let l=this.buildRowGroup(i,r);i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}}i>0&&(i-=this.gap);for(let r of t)r.layoutInfo.rect.width=o;}else {let r=this.buildTableHeader();this.layoutNodes.set(r.layoutInfo.key,r);let l=this.buildBody(r.layoutInfo.rect.maxY+this.gap);l.layoutInfo.rect.width=Math.max(r.layoutInfo.rect.width,l.layoutInfo.rect.width),i=l.layoutInfo.rect.maxY,o=l.layoutInfo.rect.width,t=[r,l];}return this.lastPersistedKeys=null,this.contentSize=new m(o+this.padding*2,i+this.padding),t}buildTableHeader(){let e=this.virtualizer.collection,t=new y(this.padding,this.padding,0,0),i=new v("header",e.head?.key??"header",t);i.isSticky=true,i.zIndex=1;let o=this.padding,r=0,l=[];for(let n of e.headerRows){let a=this.buildChild(n,this.padding,o,i.key);a.layoutInfo.parentKey=i.key,o=a.layoutInfo.rect.maxY,r=Math.max(r,a.layoutInfo.rect.width),a.index=l.length,l.push(a);}return t.width=r,t.height=o-this.padding,{layoutInfo:i,children:l,validRect:i.rect,node:e.head}}buildHeaderRow(e,t,i){let o=new y(t,i,0,0),r=new v("headerrow",e.key,o),l=0,n=[];for(let a of b$2(e,this.virtualizer.collection)){let s=this.buildChild(a,t,i,r.key);s.layoutInfo.parentKey=r.key,t=s.layoutInfo.rect.maxX,l=Math.max(l,s.layoutInfo.rect.height),s.index=n.length,n.push(s);}for(let[a,s]of n.entries())s.layoutInfo.zIndex=n.length-a+1;return this.setChildHeights(n,l),o.height=l,o.width=t-o.x,{layoutInfo:r,children:n,validRect:o,node:e}}setChildHeights(e,t){for(let i of e)i.layoutInfo.rect.height!==t&&(i.layoutInfo=i.layoutInfo.copy(),i.layoutInfo.rect.height=t);}getRenderedColumnWidth(e){let t=this.virtualizer.collection,i=e.colSpan??1,o=e.colIndex??e.index,r=0;for(let l=o;l<o+i;l++){let n=t.columns[l];n?.key!=null&&(r+=this.columnWidths.get(n.key)??0);}return r}getEstimatedHeight(e,t,i,o){let r=false;if(i==null){let l=this.layoutNodes.get(e.key);l?(i=l.layoutInfo.rect.height,r=e!==l.node||t!==l.layoutInfo.rect.width||l.layoutInfo.estimatedSize):(i=o??je,r=true);}return {height:i,isEstimated:r}}getEstimatedRowHeight(){return this.rowHeight??this.estimatedRowHeight??je}buildColumn(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.headingHeight??this.rowHeight,this.estimatedHeadingHeight??this.estimatedRowHeight),n=new y(t,i,o,r),a=new v(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:a.rect,node:e}}isStickyColumn(e){return false}buildBody(e){let t=this.virtualizer.collection;return this.buildRowGroup(e,t.body)}buildRowGroup(e,t){let i=this.virtualizer.collection,o=new y(this.padding,e,0,0),r=new v("rowgroup",t.key,o),l=e,n=0,a=[],s=this.getEstimatedRowHeight()+this.gap,u=b$2(t,i);for(let d of u){if(e+s<this.requestedRect.y&&!this.isValid(d,e)||e>this.requestedRect.maxY&&d.type!=="loader"){e+=s;continue}let f=this.buildChild(d,this.padding,e,r.key);f.layoutInfo.parentKey=r.key,f.index=a.length,e=f.layoutInfo.rect.maxY+this.gap,n=Math.max(n,f.layoutInfo.rect.width),a.push(f);}return i?.size===0?e=this.virtualizer.size.height:e-=this.gap,o.width=n,o.height=e-l,{layoutInfo:r,children:a,validRect:r.rect.intersection(this.requestedRect),node:t}}buildLoader(e,t,i){let o=super.buildLoader(e,t,i),r=this.virtualizer.collection;return o.layoutInfo.rect.width=this.layoutNodes.get(r.head?.key??"header").layoutInfo.rect.width,o.validRect=o.layoutInfo.rect.intersection(this.requestedRect),o}buildNode(e,t,i){switch(e.type){case "headerrow":return this.buildHeaderRow(e,t,i);case "item":return this.buildRow(e,t,i);case "column":case "placeholder":return this.buildColumn(e,t,i);case "cell":return this.buildCell(e,t,i);case "loader":return this.buildLoader(e,t,i);default:throw new Error("Unknown node type "+e.type)}}buildRow(e,t,i){let o=this.virtualizer.collection,r=new y(t,i,0,0),l=new v("row",e.key,r),n=[],a=0;for(let s of b$2(e,o))if(s.type==="cell")if(t>this.requestedRect.maxX){let u=this.layoutNodes.get(s.key);if(u)u.layoutInfo.rect.x=t,t+=u.layoutInfo.rect.width;else break}else {let u=this.buildChild(s,t,i,l.key);t=u.layoutInfo.rect.maxX,a=Math.max(a,u.layoutInfo.rect.height),u.index=n.length,n.push(u);}return this.setChildHeights(n,a),r.width=this.layoutNodes.get(o.head?.key??"header").layoutInfo.rect.width,r.height=a,{layoutInfo:l,children:n,validRect:r.intersection(this.requestedRect),node:e}}buildCell(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.rowHeight,this.estimatedRowHeight),n=new y(t,i,o,r),a=new v(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:n,node:e}}getVisibleLayoutInfos(e){if(e.height>1){let i=this.getEstimatedRowHeight();e.y=Math.floor(e.y/i)*i,e.height=Math.ceil(e.height/i)*i;}this.layoutIfNeeded(e);let t=[];this.buildPersistedIndices();for(let i of this.rootNodes)t.push(i.layoutInfo),this.addVisibleLayoutInfos(t,i,e);return t}addVisibleLayoutInfos(e,t,i){if(!(!t.children||t.children.length===0))switch(t.layoutInfo.type){case "header":{for(let o of t.children)e.push(o.layoutInfo),this.addVisibleLayoutInfos(e,o,i);break}case "rowgroup":{let o=this.binarySearch(t.children,i.topLeft,"y"),r=this.binarySearch(t.children,i.bottomRight,"y"),l=this.persistedIndices.get(t.layoutInfo.key),n=0;for(;l&&n<l.length&&l[n]<o;){let s=l[n];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i)),n++;}for(let s=o;s<=r;s++){for(;l&&n<l.length&&l[n]<s;)n++;e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i);}for(;l&&n<l.length;){let s=l[n++];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i));}let a=t.children.at(-1);a?.layoutInfo.type==="loader"&&e.push(a.layoutInfo);break}case "headerrow":case "row":{let o=this.binarySearch(t.children,i.topLeft,"x"),r=this.binarySearch(t.children,i.topRight,"x"),l=0,n=this.persistedIndices.get(t.layoutInfo.key)||this.stickyColumnIndices;for(;l<n.length&&n[l]<o;){let a=n[l];a<t.children.length&&e.push(t.children[a].layoutInfo),l++;}for(let a=o;a<=r;a++){for(;l<n.length&&n[l]<a;)l++;e.push(t.children[a].layoutInfo);}for(;l<n.length;){let a=n[l++];a<t.children.length&&e.push(t.children[a].layoutInfo);}break}default:throw new Error("Unknown node type "+t.layoutInfo.type)}}binarySearch(e,t,i){let o=0,r=e.length-1;for(;o<=r;){let l=o+r>>1,n=e[l];if(i==="x"&&n.layoutInfo.rect.maxX<=t.x||i==="y"&&n.layoutInfo.rect.maxY<=t.y)o=l+1;else if(i==="x"&&n.layoutInfo.rect.x>t.x||i==="y"&&n.layoutInfo.rect.y>t.y)r=l-1;else return l}return Math.max(0,Math.min(e.length-1,o))}buildPersistedIndices(){if(this.virtualizer.persistedKeys!==this.lastPersistedKeys){this.lastPersistedKeys=this.virtualizer.persistedKeys,this.persistedIndices.clear();for(let e of this.virtualizer.persistedKeys){let t=this.layoutNodes.get(e)?.layoutInfo;for(;t&&t.parentKey;){let i=this.virtualizer.collection.getItem(t.key),o=this.persistedIndices.get(t.parentKey);o||(o=i?.type==="cell"||i?.type==="column"?[...this.stickyColumnIndices]:[],this.persistedIndices.set(t.parentKey,o));let r=this.layoutNodes.get(t.key)?.index;r!=null&&!o.includes(r)&&o.push(r),t=this.layoutNodes.get(t.parentKey)?.layoutInfo;}}for(let e of this.persistedIndices.values())e.sort((t,i)=>t-i);}}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(c.type!=="row"||!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=super.getDropTargetLayoutInfo(e);return t.parentKey=this.virtualizer.collection.getItem(e.key)?.parentKey??null,t}};var Le=class extends v{column=0;index=0;copy(){let e=super.copy();return e.column=this.column,e.index=this.index,e}},K={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},ne=class extends F{contentSize=new m;layoutInfos=new Map;numColumns=0;dropIndicatorThickness=2;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||!(e.minItemSize||K.minItemSize).equals(t.minItemSize||K.minItemSize)||!(e.maxItemSize||K.maxItemSize).equals(t.maxItemSize||K.maxItemSize)||!(e.minSpace||K.minSpace).equals(t.minSpace||K.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight}update(e){let{minItemSize:t=K.minItemSize,maxItemSize:i=K.maxItemSize,minSpace:o=K.minSpace,maxHorizontalSpace:r=K.maxSpace,maxColumns:l=K.maxColumns,dropIndicatorThickness:n=K.dropIndicatorThickness,loaderHeight:a=K.loaderHeight}=e.layoutOptions||{};this.dropIndicatorThickness=n;let s=this.virtualizer.size.width,u=Math.min(i.width,s),c=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*u),d=Math.floor(s/(t.width+o.width)),f=Math.max(1,Math.min(l,d)),g=s-o.width*Math.max(0,f),p=Math.floor(g/f);p=Math.max(t.width,Math.min(u,p));let L=(p-t.width)/Math.max(1,u-t.width),x=t.height+Math.floor((c-t.height)*L);x=Math.max(t.height,Math.min(c,x));let N=Math.min(Math.max(r,o.width),Math.floor((s-f*p)/(f+1)));this.margin=Math.floor((s-f*p-N*(f+1))/2);let T=Array(f).fill(o.height),O=new Map,k=0,j=(w,S)=>{let I=this.layoutInfos.get(w),R=x,P=true;I&&(R=I.rect.height/I.rect.width*p,P=e.sizeChanged||I.estimatedSize||I.content!==S);let E=(f===this.numColumns&&I&&I.index===k&&I.rect.y<this.virtualizer.visibleRect.maxY?I.column:void 0)??T.reduce((he,ue,te)=>ue<T[he]?te:he,0),A=N+E*(p+N)+this.margin,_=T[E],D=new y(A,_,p,R),H=new Le(S.type,w,D);H.estimatedSize=P,H.allowOverflow=true,H.content=S,H.column=E,H.index=k++,O.set(w,H),T[E]+=H.rect.height+o.height;},M=this.virtualizer.collection,q=0;for(let w of M)if(w.type==="skeleton"){let S=[...T];for(;!T.every((I,R)=>I!==S[R])||Math.min(...T)<this.virtualizer.size.height;){let I=`${w.key}-${q++}`,R=this.layoutInfos.get(I)?.content||{...w};j(I,R);}break}else w.type!=="loader"&&j(w.key,w);let z=M?.size===0&&M.getItem(M.getFirstKey())?.type!=="skeleton"?0:Math.max(...T),b=M.getItem(M.getLastKey());if(b?.type==="loader"){(q>0||!b.props.isLoading)&&(a=0);let w=s-N*2,S=new y(N,z,w,a),I=new v("loader",b.key,S);O.set(b.key,I),z=I.rect.maxY;}this.contentSize=new m(this.virtualizer.size.width,z),this.layoutInfos=O,this.numColumns=f;}getLayoutInfo(e){return this.layoutInfos.get(e)}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getKeyRightOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(t.rect.maxX,t.rect.y,this.virtualizer.visibleRect.maxX-t.rect.maxX,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=n.rect.x-i.x,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyLeftOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(0,t.rect.y,t.rect.x,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=i.maxX-n.rect.maxX,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyRange(e,t){let i=this.getLayoutInfo(e),o=this.getLayoutInfo(t);if(!i||!o)return [];let r=i.rect.union(o.rect),l=[];for(let n of this.layoutInfos.values())r.intersection(n.rect).area>n.rect.area/2&&l.push(n.key);return l}getDropTargetFromPoint(e,t){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let i=this.virtualizer.keyAtPoint(new C(e,t));return i==null?{type:"root"}:{type:"item",key:i,dropPosition:"on"}}};var Re=new WeakMap;function Be(h=false,e=document){if(!Re.has(e)||h){let t=e.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";let o=e.createElement("div"),r=o.style;r.width="100px",r.height="100px",t.appendChild(o),e.body.appendChild(t);let l;t.scrollLeft>0?l="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?l="negative":l="positive-ascending"),e.body.removeChild(t),Re.set(e,l);}return Re.get(e)}function ae(h,e){let{scrollLeft:t}=h;if(e==="rtl"){let{scrollWidth:i,clientWidth:o}=h;switch(Be(false,a$1(h))){case "negative":t=-t;break;case "positive-descending":t=i-o-t;break}}return t}function gt(h,e){e=a(e);let{scrollViewProps:t,contentProps:i}=be(h,e);return jsx("div",{role:"presentation",...t,ref:e,children:jsx("div",{...i,children:h.children})})}ct.forwardRef(gt);function be(h$1,e$2){let{contentSize:t,onVisibleRectChange:i,onSizeChange:o,innerStyle:r,onScrollStart:l$1,onScrollEnd:n,scrollDirection:a="both",onScroll:s,allowsWindowScrolling:u$1,...c}=h$1,d=useRef({scrollPosition:new C,size:new m,viewportOffset:new C,viewportSize:new m,scrollEndTime:0,scrollTimeout:null,isScrolling:false,lastVisibleRect:new y}).current,{direction:f}=b(),g=useCallback(()=>{let z=u$1?new y(d.viewportOffset.x+d.scrollPosition.x,d.viewportOffset.y+d.scrollPosition.y,Math.max(0,Math.min(d.size.width-d.viewportOffset.x,d.viewportSize.width)),Math.max(0,Math.min(d.size.height-d.viewportOffset.y,d.viewportSize.height))):new y(d.scrollPosition.x,d.scrollPosition.y,d.size.width,d.size.height);(z.area>0||d.lastVisibleRect.area>0)&&(i(z),d.lastVisibleRect=z);},[d,u$1,i]),[p,L]=useState(false),x=useCallback(z=>{let b=j(z);if(!h(b,e$2.current))return;if(s&&b===e$2.current&&s(z),b!==e$2.current){let S=e$2.current.getBoundingClientRect(),I=S.x<0?-S.x:0,R=S.y<0?-S.y:0;if(I===d.viewportOffset.x&&R===d.viewportOffset.y)return;d.viewportOffset=new C(I,R);}else {let S=b.scrollTop,I=ae(b,f);d.scrollPosition=new C(Math.max(0,Math.min(I,t.width-d.size.width)),Math.max(0,Math.min(S,t.height-d.size.height)));}let w=b$1(z.currentTarget);flushSync(()=>{g(),d.isScrolling||(d.isScrolling=true,L(true),w.dispatchEvent(new w.Event("tk.disconnect-observer")),l$1&&l$1());let S=Date.now();d.scrollEndTime<=S+50&&(d.scrollEndTime=S+300,d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.scrollTimeout=setTimeout(()=>{d.isScrolling=false,L(false),d.scrollTimeout=null,w.dispatchEvent(new w.Event("tk.connect-observer")),n&&n();},300));});},[s,e$2,f,d,t,g,l$1,n]);useEffect(()=>e(l(e$2.current,a$1(e$2.current)),"scroll",x,true),[x,e$2]),useEffect(()=>()=>{if(d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.isScrolling){let z=b$1(e$2.current);z.dispatchEvent(new z.Event("tk.connect-observer"));}},[]);let N=useRef(false),T=useCallback(z=>{let b=e$2.current;if(!b||N.current)return;N.current=true;let w=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,S=b$1(b),I=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientWidth"),R=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientHeight"),P=b.clientWidth,G=b.clientHeight,E=w&&!I?1/0:P,A=w&&!R?1/0:G,_=S.innerWidth,D=S.innerHeight,H=d.viewportSize.width!==_||d.viewportSize.height!==D;H&&(d.viewportSize=new m(_,D)),(d.size.width!==E||d.size.height!==A||H)&&(d.size=new m(E,A),z(()=>{g(),o?.(d.size);}),(!w&&P!==b.clientWidth||G!==b.clientHeight)&&(d.size=new m(b.clientWidth,b.clientHeight),z(()=>{g(),o?.(d.size);}))),N.current=false;},[e$2,d,g,o]),O=u(T);useEffect(()=>{let z=b$1(e$2.current);d.viewportSize=new m(z.innerWidth,z.innerHeight);let b=()=>{O(flushSync);};return z.addEventListener("resize",b),()=>z.removeEventListener("resize",b)},[d,e$2]);let k=useRef(null),[j$1,M]=useState({});a$2(()=>{if(!N.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){M({}),k.current=t;return}else queueMicrotask(()=>O(flushSync));k.current=t;}),a$2(()=>{O(z=>z());},[j$1]);let q=useCallback(()=>{T(flushSync);},[T]);e$1({ref:e$2,box:"border-box",onResize:q});let X={padding:0,...c.style};return a==="horizontal"?(X.overflowX="auto",X.overflowY="hidden"):a==="vertical"||t.width===d.size.width?(X.overflowY="auto",X.overflowX="hidden"):X.overflow="auto",r={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:p?"none":"auto",position:"relative",...r},{isScrolling:p,scrollViewProps:{...c,style:X},contentProps:{role:"presentation",style:r}}}function $e(h){let{layoutInfo:e,virtualizer:t,ref:i,shouldObserveItemSize:o}=h,r=e?.key,l=useCallback(()=>{if(r!=null&&i.current){if(!b$4(i.current))return;let a=bt(i.current);t.updateItemSize(r,a);}},[t,r,i]),n=u(l);return a$2(()=>{e?.estimatedSize&&n();}),useEffect(()=>{if(!o)return;let a=i.current;if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(u=>{u.length&&n();});for(let u of a.children)s.observe(u);return ()=>{s.disconnect();}},[o,i,r]),{updateSize:l}}function bt(h){let e=h.style.height;h.style.height="";let t=new m(h.scrollWidth,h.scrollHeight);return h.style.height=e,t}function Se(h){let{style:e,className:t,layoutInfo:i,virtualizer:o,parent:r,children:l,shouldObserveItemSize:n}=h,{direction:a}=b(),s=useRef(null);return $e({layoutInfo:i,virtualizer:o,ref:s,shouldObserveItemSize:n}),jsx("div",{role:"presentation",ref:s,className:t,style:{...Qe(i,a,r),...e},children:l})}var Ze=new WeakMap;function Qe(h,e,t){let i=e==="rtl"?"right":"left",o=Ze.get(h);if(o&&o[i]!=null){if(!t)return o;let n=h.rect.y-t.rect.y,a=h.rect.x-t.rect.x;if(o.top===n&&o[i]===a)return o}let r={top:h.rect.y-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.y:0),[i]:h.rect.x-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.x:0),width:h.rect.width,height:h.rect.height};Object.entries(r).forEach(([n,a])=>{Number.isFinite(a)||(r[n]=void 0);});let l={position:h.isSticky?"sticky":"absolute",display:h.isSticky?"inline-block":void 0,overflow:h.allowOverflow?"visible":"hidden",opacity:h.opacity,zIndex:h.zIndex,transform:h.transform??void 0,contain:"size layout style",...r};return Ze.set(h,l),l}var it=createContext(null),Ne=createContext(null);function ot(h){let{children:e,layout:t,layoutOptions:i,shouldObserveItemSize:o}=h,r=useMemo(()=>typeof t=="function"?new t:t,[t]),l=useRef(null),{direction:n}=b(),a=useMemo(()=>({isVirtualized:true,layoutDelegate:r,dropTargetDelegate:r.getDropTargetFromPoint?{getDropTargetFromPoint(s,u,c){let d=l.current?.current;if(d&&r.virtualizer){let{visibleRect:f}=r.virtualizer;s-=f.x-ae(d,n),u-=f.y-d.scrollTop;}return r.getDropTargetFromPoint(s,u,c)}}:void 0,CollectionRoot:Rt,CollectionBranch:Tt}),[r,n]);return jsx(p.Provider,{value:a,children:jsx(Ne.Provider,{value:{layout:r,layoutOptions:i,shouldObserveItemSize:o,scrollRefHolder:l},children:e})})}function Rt({collection:h,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){let{layout:o,layoutOptions:r,shouldObserveItemSize:l,scrollRefHolder:n}=useContext(Ne);a$2(()=>{n.current=t??null;},[n,t]);let a=o.useLayoutOptions?.(),s=xe({allowsWindowScrolling:true,layout:o,collection:h,renderView:(c,d)=>d?.render?.(d),onVisibleRectChange(c){let d=t?.current;d&&(d.scrollLeft=c.x,d.scrollTop=c.y);},persistedKeys:e,layoutOptions:useMemo(()=>r&&a?{...r,...a}:r||a,[r,a])}),{contentProps:u}=be({onVisibleRectChange:s.setVisibleRect,onSizeChange:s.setSize,contentSize:s.contentSize,onScrollStart:s.startScrolling,onScrollEnd:s.endScrolling,allowsWindowScrolling:true},t);return jsx("div",{...u,children:jsx(it.Provider,{value:s,children:rt(null,s.visibleViews,i,l)})})}function Tt({parent:h,renderDropIndicator:e}){let i=useContext(it).virtualizer.getVisibleView(h.key),{shouldObserveItemSize:o}=useContext(Ne);return rt(i,Array.from(i.children),e,o)}function rt(h,e,t,i){return e.map(o=>Ct(h,o,t,i))}function Ct(h,e,t,i){let o$1=jsx(Se,{layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:h?.layoutInfo,shouldObserveItemSize:i,children:e.rendered},e.key),{collection:r,layout:l}=e.virtualizer,n=e.content;return n?.type==="item"&&t&&l.getDropTargetLayoutInfo&&(o$1=jsxs(ct.Fragment,{children:[et(h,e,{type:"item",key:e.content.key,dropPosition:"before"},t),o$1,o(r,n,a=>et(h,e,a,t))]},e.key)),o$1}function et(h,e,t,i){let o=i(t);if(o){let r=e.virtualizer.layout.getDropTargetLayoutInfo(t);o=jsx(Se,{layoutInfo:r,virtualizer:e.virtualizer,parent:h?.layoutInfo,children:o});}return o}var Q=class extends re{useLayoutOptions(){let{direction:e}=b();return useMemo(()=>({direction:e}),[e])}};var ee=class extends le{useLayoutOptions(){let e=useContext(b$3);return useMemo(()=>({columnWidths:e?.columnWidths}),[e?.columnWidths])}};var se=class extends Q{useLayoutOptions(){let{direction:e}=b();return {direction:e}}};var xr={LIST_BOX:{layout:Y,layoutOptions:{rowHeight:36}},TREE_VIEW:{layout:Y,layoutOptions:{rowHeight:44}},IMAGE_GALLERY:{layout:se,layoutOptions:{minItemSize:new m(114,167),maxItemSize:new m(114,167),dropIndicatorThickness:2,maxHorizontalSpace:0,minSpace:new m(4,16),preserveAspectRatio:true}},TABLE:{layout:ee,layoutOptions:{rowHeight:48,headingHeight:48}}};export{m as a,Y as b,ne as c,ot as d,Q as e,ee as f,se as g,xr as h};
|