appos 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +399 -0
  2. package/build/client/assets/IconMail-BZadZvAd.js +1 -0
  3. package/build/client/assets/_-CgPm6_fJ.js +1 -0
  4. package/build/client/assets/_index-BCLDp_mg.js +1 -0
  5. package/build/client/assets/_layout-CTmjtKOZ.js +1 -0
  6. package/build/client/assets/_layout-HsJ3Zu5t.js +1 -0
  7. package/build/client/assets/_layout-OcS85aOt.js +1 -0
  8. package/build/client/assets/app-sidebar-Bm6e4kn_.js +1 -0
  9. package/build/client/assets/app-sidebar-D2Nsi85j.js +1 -0
  10. package/build/client/assets/auth-provider-rkzBVtYX.js +1 -0
  11. package/build/client/assets/brand-CbTWw97e.js +1 -0
  12. package/build/client/assets/browser-ponyfill-D3yQFvRu.js +2 -0
  13. package/build/client/assets/button-DtZhoqpk.js +1 -0
  14. package/build/client/assets/check-D5D2EGI4.js +1 -0
  15. package/build/client/assets/checkbox-B35Nn166.js +1 -0
  16. package/build/client/assets/chunk-JG3XND5A-BetDbdG0.js +1 -0
  17. package/build/client/assets/chunk-UIGDSWPH-DeiamgQc.js +26 -0
  18. package/build/client/assets/chunk-vBKQ29Cd.js +1 -0
  19. package/build/client/assets/circle-alert-DB4JluX5.js +1 -0
  20. package/build/client/assets/compare-Br3z3FUS-BXkA2ojG.js +2 -0
  21. package/build/client/assets/compiler-runtime-Co9svCia.js +1 -0
  22. package/build/client/assets/config-ChcA_Pkv.js +1 -0
  23. package/build/client/assets/createReactComponent-C2TSpqC7.js +1 -0
  24. package/build/client/assets/dialog-CQrpvURm.js +1 -0
  25. package/build/client/assets/dist-B6TkSbxV.js +1 -0
  26. package/build/client/assets/dist-BNO39Rfs.js +1 -0
  27. package/build/client/assets/dist-BWnI-4xl.js +1 -0
  28. package/build/client/assets/dist-CA21wN5I.js +1 -0
  29. package/build/client/assets/dist-CBNvQRbZ.js +1 -0
  30. package/build/client/assets/dist-CYRPrwOb.js +1 -0
  31. package/build/client/assets/dist-DKtC0FSi.js +1 -0
  32. package/build/client/assets/dist-DhfcebhF.js +1 -0
  33. package/build/client/assets/dist-VqaKdvZu.js +1 -0
  34. package/build/client/assets/dist-Yn6lj8QC.js +5 -0
  35. package/build/client/assets/dropdown-menu-CbzduuDa.js +1 -0
  36. package/build/client/assets/empty-DQRarCKT.js +1 -0
  37. package/build/client/assets/entry.client-BN1GPjAL.js +10 -0
  38. package/build/client/assets/es2015-BJguufLZ.js +41 -0
  39. package/build/client/assets/eye-Ctrln70x.js +1 -0
  40. package/build/client/assets/file-preview-dialog-BRkWSRN4.js +14 -0
  41. package/build/client/assets/index-Del2yBnb.js +1 -0
  42. package/build/client/assets/initReactI18next-CyHiepAw.js +1 -0
  43. package/build/client/assets/input-V1lM1yoz.js +1 -0
  44. package/build/client/assets/jsx-runtime-SCjaiuzT.js +1 -0
  45. package/build/client/assets/lock-Bj7dxHab.js +1 -0
  46. package/build/client/assets/manifest-ca813980.js +1 -0
  47. package/build/client/assets/nav-user-BqPUBe9x.js +1 -0
  48. package/build/client/assets/nav-user-Yu7wt7b_.js +1 -0
  49. package/build/client/assets/org-switcher-BIuearbE.js +1 -0
  50. package/build/client/assets/password-input-bor7e4TM.js +1 -0
  51. package/build/client/assets/react-dom-Bhi-1tDD.js +1 -0
  52. package/build/client/assets/realtime-BmU1LPhx.js +1 -0
  53. package/build/client/assets/root-CS5YIV-V.js +3 -0
  54. package/build/client/assets/root-D0CFuQYc.css +2 -0
  55. package/build/client/assets/route-B9cwW-UK.js +1 -0
  56. package/build/client/assets/route-BD2nV1q2.js +1 -0
  57. package/build/client/assets/route-BEnDcljt.js +1 -0
  58. package/build/client/assets/route-BR4LdxHR.js +1 -0
  59. package/build/client/assets/route-BU5TYmVE.js +0 -0
  60. package/build/client/assets/route-BVmIPEvK.js +11 -0
  61. package/build/client/assets/route-BY244T48.js +1 -0
  62. package/build/client/assets/route-Bwd903CU.js +1 -0
  63. package/build/client/assets/route-CN9iChOk.js +1 -0
  64. package/build/client/assets/route-CQ3p9Qb1.js +1 -0
  65. package/build/client/assets/route-CVLnTONw.js +1 -0
  66. package/build/client/assets/route-CoMZag4T.js +1 -0
  67. package/build/client/assets/route-CsYSLbnx.js +1 -0
  68. package/build/client/assets/route-DWNrq2GE.js +1 -0
  69. package/build/client/assets/route-Dxfmap_u.js +1 -0
  70. package/build/client/assets/route-Gnx1fkRX.js +0 -0
  71. package/build/client/assets/route-NduA4SS_.js +1 -0
  72. package/build/client/assets/route-u2hskgE_.js +1 -0
  73. package/build/client/assets/route-v9Jwv-AW.js +1 -0
  74. package/build/client/assets/select-DATRE76_.js +1 -0
  75. package/build/client/assets/separator-Cla0V581.js +1 -0
  76. package/build/client/assets/shim-TRiHENXu.js +1 -0
  77. package/build/client/assets/sidebar-CqrdL512.js +1 -0
  78. package/build/client/assets/site-header-CZO3qBhf.js +1 -0
  79. package/build/client/assets/site-header-CwidwSv1.js +1 -0
  80. package/build/client/assets/social-providers-Bz7f1_yd.js +1 -0
  81. package/build/client/assets/test-WdoqKbLa.js +1 -0
  82. package/build/client/assets/tooltip-BeDraHQn.js +1 -0
  83. package/build/client/assets/trpc-C1CjVipH.js +6 -0
  84. package/build/client/assets/trust-indicator-D4tEs4Dr.js +20 -0
  85. package/build/client/assets/use-file-upload-CNPfWC6W.js +1 -0
  86. package/build/client/assets/useTranslation-Bz7VuQ7j.js +1 -0
  87. package/build/client/assets/utils-InBzhUf_.js +1 -0
  88. package/build/client/assets/x-4CC8aqOW.js +1 -0
  89. package/build/client/favicon.ico +0 -0
  90. package/build/client/locales/en/emails.json +11 -0
  91. package/build/client/locales/en/translation.json +411 -0
  92. package/build/client/locales/zh-CN/emails.json +11 -0
  93. package/build/client/locales/zh-CN/translation.json +1 -0
  94. package/build/client/locales/zh-TW/emails.json +11 -0
  95. package/build/client/locales/zh-TW/translation.json +1 -0
  96. package/build/client/logo-invert.png +0 -0
  97. package/build/client/logo.png +0 -0
  98. package/build/lib/adapter-factory-CLtf7vT5-CTKiMV2u.mjs +19675 -0
  99. package/build/lib/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +155 -0
  100. package/build/lib/chunk-BYI67GdN.mjs +1 -0
  101. package/build/lib/chunk-CkKlU7xI.mjs +44 -0
  102. package/build/lib/client-BtuhFgvy.mjs +65 -0
  103. package/build/lib/client.d.ts +2272 -0
  104. package/build/lib/client.js +24 -0
  105. package/build/lib/date.d.ts +1 -0
  106. package/build/lib/date.js +1 -0
  107. package/build/lib/dialect-BeMwdQoz-D41NdSow.mjs +72 -0
  108. package/build/lib/dist-cjs-B43A5HXv.mjs +169 -0
  109. package/build/lib/dist-cjs-B_wkbabY.mjs +214 -0
  110. package/build/lib/dist-cjs-BmbYbMhp.mjs +143 -0
  111. package/build/lib/dist-cjs-Cc337rwW.mjs +7 -0
  112. package/build/lib/dist-cjs-CgzfN8xY.mjs +4974 -0
  113. package/build/lib/dist-cjs-DBFcizQf.mjs +50 -0
  114. package/build/lib/dist-cjs-DC-UL-xx.mjs +97 -0
  115. package/build/lib/dist-cjs-DHlTgXUO.mjs +6975 -0
  116. package/build/lib/dist-cjs-DYAmJYzN.mjs +323 -0
  117. package/build/lib/dist-cjs-Ddm6Stp9.mjs +1294 -0
  118. package/build/lib/dist-cjs-GFGBhaZg.mjs +84 -0
  119. package/build/lib/dist-cjs-ieCOxrOi.mjs +181 -0
  120. package/build/lib/dist-cjs-nbOGa7i_.mjs +47 -0
  121. package/build/lib/dist-cjs-pN6ekzMW.mjs +66 -0
  122. package/build/lib/dist-cjs-yYlQ1OiO.mjs +102 -0
  123. package/build/lib/esm-DPet4lFW.mjs +15816 -0
  124. package/build/lib/event-streams-x9fP9BzF.mjs +185 -0
  125. package/build/lib/file-preview-dialog-Cugg8tEc.mjs +59 -0
  126. package/build/lib/kysely-adapter-BTWfu5rn.mjs +183 -0
  127. package/build/lib/magic-string.es-jZcifc5m.mjs +1013 -0
  128. package/build/lib/memory-adapter-DiU519m9.mjs +147 -0
  129. package/build/lib/node-ponyfill-Dmm1SWTU.mjs +38212 -0
  130. package/build/lib/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +155 -0
  131. package/build/lib/package-DfozRyK6.mjs +5 -0
  132. package/build/lib/react-dom-CPjM_WCt.mjs +42 -0
  133. package/build/lib/server.d.mts +76273 -0
  134. package/build/lib/server.mjs +325 -0
  135. package/build/lib/sso-oidc-Qom0PEDW.mjs +1036 -0
  136. package/build/lib/sts-CLRaHSW_.mjs +13 -0
  137. package/build/lib/sts-Dl7yZqX1.mjs +1405 -0
  138. package/build/lib/test.d.mts +8922 -0
  139. package/build/lib/test.mjs +175650 -0
  140. package/build/lib/ui/index.d.ts +1643 -0
  141. package/build/lib/ui/index.js +160 -0
  142. package/build/lib/utils.d.ts +21 -0
  143. package/build/lib/utils.js +1 -0
  144. package/build/lib/zod.d.ts +1 -0
  145. package/build/lib/zod.js +23 -0
  146. package/build/main.js +2383 -0
  147. package/build/server/assets/context-BoNg86Eh.js +35 -0
  148. package/build/server/assets/dialog-B8YbGNaz.js +54 -0
  149. package/build/server/assets/file-preview-dialog-qWSViOWQ.js +15 -0
  150. package/build/server/assets/react-CFQ4y0AA.js +13 -0
  151. package/build/server/assets/react-dom-Ca1YUVo2.js +5 -0
  152. package/build/server/assets/server-build-BMOfm0ad.js +118 -0
  153. package/build/server/assets/server.node-B2oksIp8.js +196 -0
  154. package/build/server/assets/server.node-VQzoub0A.js +1 -0
  155. package/build/server/index.js +123 -0
  156. package/package.json +224 -0
@@ -0,0 +1,11 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-preview-dialog-BRkWSRN4.js","assets/dialog-CQrpvURm.js","assets/utils-InBzhUf_.js","assets/dist-Yn6lj8QC.js","assets/dist-DhfcebhF.js","assets/jsx-runtime-SCjaiuzT.js","assets/chunk-vBKQ29Cd.js","assets/dist-BWnI-4xl.js","assets/es2015-BJguufLZ.js","assets/dist-B6TkSbxV.js","assets/react-dom-Bhi-1tDD.js","assets/dist-VqaKdvZu.js","assets/x-4CC8aqOW.js","assets/compiler-runtime-Co9svCia.js","assets/useTranslation-Bz7VuQ7j.js","assets/initReactI18next-CyHiepAw.js","assets/shim-TRiHENXu.js"])))=>i.map(i=>d[i]);
2
+ import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./react-dom-Bhi-1tDD.js";import{F as i,I as a,k as o}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as s}from"./useTranslation-Bz7VuQ7j.js";import"./initReactI18next-CyHiepAw.js";import"./shim-TRiHENXu.js";import{t as c}from"./compiler-runtime-Co9svCia.js";import{a as l,c as u,d,f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,t as b}from"./compare-Br3z3FUS-BXkA2ojG.js";import{a as x,o as S,r as C}from"./dist-BWnI-4xl.js";import"./check-D5D2EGI4.js";import{a as w,i as T,n as E,r as D,t as O}from"./select-DATRE76_.js";import{c as k,d as A,l as ee,m as te,n as ne,o as re,s as ie,u as ae}from"./use-file-upload-CNPfWC6W.js";import{t as oe}from"./eye-Ctrln70x.js";import{t as se}from"./x-4CC8aqOW.js";import{t as j}from"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import{n as M,t as N}from"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import"./dist-BNO39Rfs.js";import{a as ce,r as le}from"./dist-DhfcebhF.js";import"./dist-DKtC0FSi.js";import"./dist-VqaKdvZu.js";import"./es2015-BJguufLZ.js";import{a as ue,c as P,i as F,l as I,n as de,o as fe,r as pe,s as me,t as he,u as ge}from"./dist-Yn6lj8QC.js";import"./dist-CA21wN5I.js";import"./dist-CYRPrwOb.js";import{t as _e}from"./checkbox-B35Nn166.js";import{i as ve,n as ye,s as be,t as xe}from"./dropdown-menu-CbzduuDa.js";import{i as Se,n as Ce,t as we}from"./tooltip-BeDraHQn.js";import{a as Te,i as Ee,o as De,r as Oe,t as ke}from"./empty-DQRarCKT.js";import"./config-ChcA_Pkv.js";import{n as Ae}from"./trpc-C1CjVipH.js";import{t as je}from"./input-V1lM1yoz.js";var Me=S(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Ne=S(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Pe=S(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Fe=S(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ie=S(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Le=S(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Re=S(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),ze=S(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),L=e(t(),1),R=n(),Be=`AlertDialog`,[Ve,He]=ce(Be,[ge]),z=ge(),Ue=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,R.jsx)(fe,{...r,...n,modal:!0})};Ue.displayName=Be;var We=`AlertDialogTrigger`,Ge=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,R.jsx)(P,{...i,...r,ref:t})});Ge.displayName=We;var Ke=`AlertDialogPortal`,qe=e=>{let{__scopeAlertDialog:t,...n}=e,r=z(t);return(0,R.jsx)(ue,{...r,...n})};qe.displayName=Ke;var Je=`AlertDialogOverlay`,Ye=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,R.jsx)(F,{...i,...r,ref:t})});Ye.displayName=Je;var B=`AlertDialogContent`,[Xe,Ze]=Ve(B),Qe=C(`AlertDialogContent`),$e=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=z(n),o=L.useRef(null),s=x(t,o),c=L.useRef(null);return(0,R.jsx)(I,{contentName:B,titleName:et,docsSlug:`alert-dialog`,children:(0,R.jsx)(Xe,{scope:n,cancelRef:c,children:(0,R.jsxs)(de,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:le(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,R.jsx)(Qe,{children:r}),(0,R.jsx)(ct,{contentRef:o})]})})})});$e.displayName=B;var et=`AlertDialogTitle`,tt=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,R.jsx)(me,{...i,...r,ref:t})});tt.displayName=et;var nt=`AlertDialogDescription`,rt=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,R.jsx)(pe,{...i,...r,ref:t})});rt.displayName=nt;var it=`AlertDialogAction`,at=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=z(n);return(0,R.jsx)(he,{...i,...r,ref:t})});at.displayName=it;var ot=`AlertDialogCancel`,st=L.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Ze(ot,n),a=z(n),o=x(t,i);return(0,R.jsx)(he,{...a,...r,ref:o})});st.displayName=ot;var ct=({contentRef:e})=>{let t=`\`${B}\` requires a description for the component to be accessible for screen reader users.
3
+
4
+ You can add a description to the \`${B}\` by passing a \`${nt}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
5
+
6
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${B}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
7
+
8
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return L.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},lt=Ue,ut=qe,dt=Ye,ft=$e,pt=at,mt=st,ht=tt,gt=rt,V=c();function H(e,t){return typeof e==`function`?e(t):e}function U(e,t){return n=>{t.setState(t=>({...t,[e]:H(n,t[e])}))}}function _t(e){return e instanceof Function}function vt(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)}function yt(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i!=null&&i.length&&r(i)})};return r(e),n}function W(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
9
+ font-size: .6rem;
10
+ font-weight: bold;
11
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return i}}function G(e,t,n,r){return{debug:()=>e?.debugAll??e[t],key:!1,onChange:r}}function bt(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>i.getValue()??e.options.renderFallbackValue,getContext:W(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),G(e.options,`debugCells`,`cell.getContext`))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function xt(e,t,n,r){let i={...e._getDefaultColumnDef(),...t},a=i.accessorKey,o=i.id??(a?typeof String.prototype.replaceAll==`function`?a.replaceAll(`.`,`_`):a.replace(/\./g,`_`):void 0)??(typeof i.header==`string`?i.header:void 0),s;if(i.accessorFn?s=i.accessorFn:a&&(s=a.includes(`.`)?e=>{let t=e;for(let e of a.split(`.`))t=t?.[e];return t}:e=>e[i.accessorKey]),!o)throw Error();let c={id:`${String(o)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:W(()=>[!0],()=>[c,...c.columns?.flatMap(e=>e.getFlatColumns())],G(e.options,`debugColumns`,`column.getFlatColumns`)),getLeafColumns:W(()=>[e._getOrderColumnsFn()],e=>{var t;return(t=c.columns)!=null&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},G(e.options,`debugColumns`,`column.getLeafColumns`))};for(let t of e._features)t.createColumn==null||t.createColumn(c,e);return c}var K=`debugHeaders`;function St(e,t,n){let r={id:n.id??t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(t=>{t.createHeader==null||t.createHeader(r,e)}),r}var Ct={createTable:e=>{e.getHeaderGroups=W(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{let a=r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],o=i?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],s=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id)));return wt(t,[...a,...s,...o],e)},G(e.options,K,`getHeaderGroups`)),e.getCenterHeaderGroups=W(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id))),wt(t,n,e,`center`)),G(e.options,K,`getCenterHeaderGroups`)),e.getLeftHeaderGroups=W(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>wt(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`left`),G(e.options,K,`getLeftHeaderGroups`)),e.getRightHeaderGroups=W(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>wt(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`right`),G(e.options,K,`getRightHeaderGroups`)),e.getFooterGroups=W(()=>[e.getHeaderGroups()],e=>[...e].reverse(),G(e.options,K,`getFooterGroups`)),e.getLeftFooterGroups=W(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),G(e.options,K,`getLeftFooterGroups`)),e.getCenterFooterGroups=W(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),G(e.options,K,`getCenterFooterGroups`)),e.getRightFooterGroups=W(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),G(e.options,K,`getRightFooterGroups`)),e.getFlatHeaders=W(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),G(e.options,K,`getFlatHeaders`)),e.getLeftFlatHeaders=W(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),G(e.options,K,`getLeftFlatHeaders`)),e.getCenterFlatHeaders=W(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),G(e.options,K,`getCenterFlatHeaders`)),e.getRightFlatHeaders=W(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),G(e.options,K,`getRightFlatHeaders`)),e.getCenterLeafHeaders=W(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),G(e.options,K,`getCenterLeafHeaders`)),e.getLeftLeafHeaders=W(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),G(e.options,K,`getLeftLeafHeaders`)),e.getRightLeafHeaders=W(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),G(e.options,K,`getRightLeafHeaders`)),e.getLeafHeaders=W(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>[...e[0]?.headers??[],...t[0]?.headers??[],...n[0]?.headers??[]].map(e=>e.getLeafHeaders()).flat(),G(e.options,K,`getLeafHeaders`))}};function wt(e,t,n,r){let i=0,a=function(e,t){t===void 0&&(t=1),i=Math.max(i,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;(n=e.columns)!=null&&n.length&&a(e.columns,t+1)},0)};a(e);let o=[],s=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join(`_`),headers:[]},a=[];e.forEach(e=>{let o=[...a].reverse()[0],s=e.column.depth===i.depth,c,l=!1;if(s&&e.column.parent?c=e.column.parent:(c=e.column,l=!0),o&&o?.column===c)o.subHeaders.push(e);else{let i=St(n,c,{id:[r,t,c.id,e?.id].filter(Boolean).join(`_`),isPlaceholder:l,placeholderId:l?`${a.filter(e=>e.column===c).length}`:void 0,depth:t,index:a.length});i.subHeaders.push(e),a.push(i)}i.headers.push(e),e.headerGroup=i}),o.push(i),t>0&&s(a,t-1)};s(t.map((e,t)=>St(n,e,{depth:i,index:t})),i-1),o.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1;let i=Math.min(...r);return n+=i,e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(o[0]?.headers??[]),o}var Tt=(e,t,n,r,i,a,o)=>{let s={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t])},renderValue:t=>s.getValue(t)??e.options.renderFallbackValue,subRows:a??[],getLeafRows:()=>yt(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:W(()=>[e.getAllLeafColumns()],t=>t.map(t=>bt(e,s,t,t.id)),G(e.options,`debugRows`,`getAllCells`)),_getAllCellsByColumnId:W(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),G(e.options,`debugRows`,`getAllCellsByColumnId`))};for(let t=0;t<e._features.length;t++){let n=e._features[t];n==null||n.createRow==null||n.createRow(s,e)}return s},Et={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Dt=(e,t,n)=>{var r,i;let a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(a))};Dt.autoRemove=e=>J(e);var Ot=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ot.autoRemove=e=>J(e);var kt=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};kt.autoRemove=e=>J(e);var At=(e,t,n)=>e.getValue(t)?.includes(n);At.autoRemove=e=>J(e);var jt=(e,t,n)=>!n.some(n=>{var r;return!((r=e.getValue(t))!=null&&r.includes(n))});jt.autoRemove=e=>J(e)||!(e!=null&&e.length);var Mt=(e,t,n)=>n.some(n=>e.getValue(t)?.includes(n));Mt.autoRemove=e=>J(e)||!(e!=null&&e.length);var Nt=(e,t,n)=>e.getValue(t)===n;Nt.autoRemove=e=>J(e);var Pt=(e,t,n)=>e.getValue(t)==n;Pt.autoRemove=e=>J(e);var Ft=(e,t,n)=>{let[r,i]=n,a=e.getValue(t);return a>=r&&a<=i};Ft.resolveFilterValue=e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},Ft.autoRemove=e=>J(e)||J(e[0])&&J(e[1]);var q={includesString:Dt,includesStringSensitive:Ot,equalsString:kt,arrIncludes:At,arrIncludesAll:jt,arrIncludesSome:Mt,equals:Nt,weakEquals:Pt,inNumberRange:Ft};function J(e){return e==null||e===``}var It={getDefaultColumnDef:()=>({filterFn:`auto`}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:U(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);return typeof n==`string`?q.includesString:typeof n==`number`?q.inNumberRange:typeof n==`boolean`||typeof n==`object`&&n?q.equals:Array.isArray(n)?q.arrIncludes:q.weakEquals},e.getFilterFn=()=>_t(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?e.getAutoFilterFn():t.options.filterFns?.[e.columnDef.filterFn]??q[e.columnDef.filterFn],e.getCanFilter=()=>(e.columnDef.enableColumnFilter??!0)&&(t.options.enableColumnFilters??!0)&&(t.options.enableFilters??!0)&&!!e.accessorFn,e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>t.getState().columnFilters?.findIndex(t=>t.id===e.id)??-1,e.setFilterValue=n=>{t.setColumnFilters(t=>{let r=e.getFilterFn(),i=t?.find(t=>t.id===e.id),a=H(n,i?i.value:void 0);if(Lt(r,a,e))return t?.filter(t=>t.id!==e.id)??[];let o={id:e.id,value:a};return i?t?.map(t=>t.id===e.id?o:t)??[]:t!=null&&t.length?[...t,o]:[o]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(e=>H(t,e)?.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&Lt(t.getFilterFn(),e.value,t))}))},e.resetColumnFilters=t=>{e.setColumnFilters(t?[]:e.initialState?.columnFilters??[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Lt(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||t===void 0||typeof t==`string`&&!t}var Rt={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+(typeof r==`number`?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!vt(n))return;if(n.length===1)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2==0?(i[r-1]+i[r])/2:i[r]},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},zt={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t;return((t=e.getValue())==null||t.toString==null?void 0:t.toString())??null},aggregationFn:`auto`}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:U(`grouping`,e),groupedColumnMode:`reorder`}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(t=>t!==e.id):[...t??[],e.id])},e.getCanGroup=()=>(e.columnDef.enableGrouping??!0)&&(t.options.enableGrouping??!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue),e.getIsGrouped=()=>t.getState().grouping?.includes(e.id),e.getGroupedIndex=()=>t.getState().grouping?.indexOf(e.id),e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);if(typeof n==`number`)return Rt.sum;if(Object.prototype.toString.call(n)===`[object Date]`)return Rt.extent},e.getAggregationFn=()=>{if(!e)throw Error();return _t(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===`auto`?e.getAutoAggregationFn():t.options.aggregationFns?.[e.columnDef.aggregationFn]??Rt[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{e.setGrouping(t?[]:e.initialState?.grouping??[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((t=n.subRows)!=null&&t.length)}}};function Bt(e,t,n){if(!(t!=null&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return n===`remove`?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}var Vt={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:U(`columnOrder`,e)}),createColumn:(e,t)=>{e.getIndex=W(e=>[Qt(t,e)],t=>t.findIndex(t=>t.id===e.id),G(t.options,`debugColumns`,`getIndex`)),e.getIsFirstColumn=n=>Qt(t,n)[0]?.id===e.id,e.getIsLastColumn=n=>{let r=Qt(t,n);return r[r.length-1]?.id===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{e.setColumnOrder(t?[]:e.initialState.columnOrder??[])},e._getOrderColumnsFn=W(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(!(e!=null&&e.length))i=r;else{let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}return Bt(i,t,n)},G(e.options,`debugTable`,`_getOrderColumnsFn`))}},Ht=()=>({left:[],right:[]}),Ut={getInitialState:e=>({columnPinning:Ht(),...e}),getDefaultOptions:e=>({onColumnPinningChange:U(`columnPinning`,e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>n===`right`?{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:[...(e?.right??[]).filter(e=>!(r!=null&&r.includes(e))),...r]}:n===`left`?{left:[...(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),...r],right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}:{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))})},e.getCanPin=()=>e.getLeafColumns().some(e=>(e.columnDef.enablePinning??!0)&&(t.options.enableColumnPinning??t.options.enablePinning??!0)),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`left`:o?`right`:!1},e.getPinnedIndex=()=>{var n;let r=e.getIsPinned();return r?((n=t.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))??-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=W(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.column.id))},G(t.options,`debugRows`,`getCenterVisibleCells`)),e.getLeftVisibleCells=W(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`left`})),G(t.options,`debugRows`,`getLeftVisibleCells`)),e.getRightVisibleCells=W(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`right`})),G(t.options,`debugRows`,`getRightVisibleCells`))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>e.setColumnPinning(t?Ht():e.initialState?.columnPinning??Ht()),e.getIsSomeColumnsPinned=t=>{let n=e.getState().columnPinning;return t?!!n[t]?.length:!!(n.left?.length||n.right?.length)},e.getLeftLeafColumns=W(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),G(e.options,`debugColumns`,`getLeftLeafColumns`)),e.getRightLeafColumns=W(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),G(e.options,`debugColumns`,`getRightLeafColumns`)),e.getCenterLeafColumns=W(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.id))},G(e.options,`debugColumns`,`getCenterLeafColumns`))}};function Wt(e){return e||(typeof document<`u`?document:null)}var Gt={size:150,minSize:20,maxSize:2**53-1},Kt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),qt={getDefaultColumnDef:()=>Gt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Kt(),...e}),getDefaultOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnSizingChange:U(`columnSizing`,e),onColumnSizingInfoChange:U(`columnSizingInfo`,e)}),createColumn:(e,t)=>{e.getSize=()=>{let n=t.getState().columnSizing[e.id];return Math.min(Math.max(e.columnDef.minSize??Gt.minSize,n??e.columnDef.size??Gt.size),e.columnDef.maxSize??Gt.maxSize)},e.getStart=W(e=>[e,Qt(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),G(t.options,`debugColumns`,`getStart`)),e.getAfter=W(e=>[e,Qt(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),G(t.options,`debugColumns`,`getAfter`)),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>(e.columnDef.enableResizing??!0)&&(t.options.enableColumnResizing??!0),e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{e.subHeaders.length?e.subHeaders.forEach(n):t+=e.column.getSize()??0};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=r?.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),Xt(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],c=Xt(a)?Math.round(a.touches[0].clientX):a.clientX,l={},u=(e,n)=>{typeof n==`number`&&(t.setColumnSizingInfo(e=>{let r=t.options.columnResizeDirection===`rtl`?-1:1,i=(n-(e?.startOffset??0))*r,a=Math.max(i/(e?.startSize??0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;l[t]=Math.round(Math.max(n+n*a,0)*100)/100}),{...e,deltaOffset:i,deltaPercentage:a}}),(t.options.columnResizeMode===`onChange`||e===`end`)&&t.setColumnSizing(e=>({...e,...l})))},d=e=>u(`move`,e),f=e=>{u(`end`,e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=Wt(n),m={moveHandler:e=>d(e.clientX),upHandler:e=>{p?.removeEventListener(`mousemove`,m.moveHandler),p?.removeEventListener(`mouseup`,m.upHandler),f(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{p?.removeEventListener(`touchmove`,h.moveHandler),p?.removeEventListener(`touchend`,h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0]?.clientX)}},g=Yt()?{passive:!1}:!1;Xt(a)?(p?.addEventListener(`touchmove`,h.moveHandler,g),p?.addEventListener(`touchend`,h.upHandler,g)):(p?.addEventListener(`mousemove`,m.moveHandler,g),p?.addEventListener(`mouseup`,m.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:c,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{e.setColumnSizing(t?{}:e.initialState.columnSizing??{})},e.resetHeaderSizeInfo=t=>{e.setColumnSizingInfo(t?Kt():e.initialState.columnSizingInfo??Kt())},e.getTotalSize=()=>e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getLeftTotalSize=()=>e.getLeftHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getCenterTotalSize=()=>e.getCenterHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getRightTotalSize=()=>e.getRightHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0}},Jt=null;function Yt(){if(typeof Jt==`boolean`)return Jt;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return Jt=e,Jt}function Xt(e){return e.type===`touchstart`}var Zt={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:U(`columnVisibility`,e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{let n=e.columns;return(n.length?n.some(e=>e.getIsVisible()):t.getState().columnVisibility?.[e.id])??!0},e.getCanHide=()=>(e.columnDef.enableHiding??!0)&&(t.options.enableHiding??!0),e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=W(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),G(t.options,`debugRows`,`_getAllVisibleCells`)),e.getVisibleCells=W(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],G(t.options,`debugRows`,`getVisibleCells`))},createTable:e=>{let t=(t,n)=>W(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join(`_`)],e=>e.filter(e=>e.getIsVisible==null?void 0:e.getIsVisible()),G(e.options,`debugColumns`,t));e.getVisibleFlatColumns=t(`getVisibleFlatColumns`,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(`getVisibleLeafColumns`,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(`getLeftVisibleLeafColumns`,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(`getRightVisibleLeafColumns`,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(`getCenterVisibleLeafColumns`,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{e.setColumnVisibility(t?{}:e.initialState.columnVisibility??{})},e.toggleAllColumnsVisible=t=>{t??=!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(e.getIsVisible!=null&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>e.getIsVisible==null?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{e.toggleAllColumnsVisible(t.target?.checked)}}};function Qt(e,t){return t?t===`center`?e.getCenterVisibleLeafColumns():t===`left`?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var $t={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,`__global__`),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,`__global__`),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,`__global__`),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},en={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:U(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{var n;let r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r==`string`||typeof r==`number`}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>(e.columnDef.enableGlobalFilter??!0)&&(t.options.enableGlobalFilter??!0)&&(t.options.enableFilters??!0)&&((t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))??!0)&&!!e.accessorFn},createTable:e=>{e.getGlobalAutoFilterFn=()=>q.includesString,e.getGlobalFilterFn=()=>{let{globalFilterFn:t}=e.options;return _t(t)?t:t===`auto`?e.getGlobalAutoFilterFn():e.options.filterFns?.[t]??q[t]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},tn={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:U(`expanded`,e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{e.setExpanded(t?{}:e.initialState?.expanded??{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return typeof t==`boolean`?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{let i=r===!0?!0:!!(r!=null&&r[e.id]),a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n??=!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{let n=t.getState().expanded;return!!((t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))??(n===!0||n?.[e.id]))},e.getCanExpand=()=>{var n;return(t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))??((t.options.enableExpanding??!0)&&!!((n=e.subRows)!=null&&n.length))},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},nn=0,rn=10,an=()=>({pageIndex:nn,pageSize:rn}),on={getInitialState:e=>({...e,pagination:{...an(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:U(`pagination`,e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(e=>H(t,e)),e.resetPagination=t=>{e.setPagination(t?an():e.initialState.pagination??an())},e.setPageIndex=t=>{e.setPagination(n=>{let r=H(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n;e.setPageIndex(t?nn:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)??nn)},e.resetPageSize=t=>{var n;e.setPageSize(t?rn:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)??rn)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,H(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{let r=H(t,e.options.pageCount??-1);return typeof r==`number`&&(r=Math.max(-1,r)),{...n,pageCount:r}}),e.getPageOptions=W(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},G(e.options,`debugTable`,`getPageOptions`)),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>e.options.pageCount??Math.ceil(e.getRowCount()/e.getState().pagination.pageSize),e.getRowCount=()=>e.options.rowCount??e.getPrePaginationRowModel().rows.length}},sn=()=>({top:[],bottom:[]}),cn={getInitialState:e=>({rowPinning:sn(),...e}),getDefaultOptions:e=>({onRowPinningChange:U(`rowPinning`,e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],o=i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(e=>n===`bottom`?{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:[...(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)]}:n===`top`?{top:[...(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)],bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))}:{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))})},e.getCanPin=()=>{let{enableRowPinning:n,enablePinning:r}=t.options;return typeof n==`function`?n(e):n??r??!0},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`top`:o?`bottom`:!1},e.getPinnedIndex=()=>{let n=e.getIsPinned();return n?((n===`top`?t.getTopRows():t.getBottomRows())?.map(e=>{let{id:t}=e;return t}))?.indexOf(e.id)??-1:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>e.setRowPinning(t?sn():e.initialState?.rowPinning??sn()),e.getIsSomeRowsPinned=t=>{let n=e.getState().rowPinning;return t?!!n[t]?.length:!!(n.top?.length||n.bottom?.length)},e._getPinnedRows=(t,n,r)=>(e.options.keepPinnedRows??!0?(n??[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(n??[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r})),e.getTopRows=W(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,`top`),G(e.options,`debugRows`,`getTopRows`)),e.getBottomRows=W(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,`bottom`),G(e.options,`debugRows`,`getBottomRows`)),e.getCenterRows=W(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...t??[],...n??[]]);return e.filter(e=>!r.has(e.id))},G(e.options,`debugRows`,`getCenterRows`))}},ln={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:U(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>e.setRowSelection(t?{}:e.initialState.rowSelection??{}),e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=t===void 0?!e.getIsAllRowsSelected():t;let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=t===void 0?!e.getIsAllPageRowsSelected():t,i={...n};return e.getRowModel().rows.forEach(t=>{un(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=W(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?dn(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,`debugTable`,`getSelectedRowModel`)),e.getFilteredSelectedRowModel=W(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?dn(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,`debugTable`,`getFilteredSelectedRowModel`)),e.getGroupedSelectedRowModel=W(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?dn(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,`debugTable`,`getGroupedSelectedRowModel`)),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{let t=Object.keys(e.getState().rowSelection??{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(a=>{if(n=n===void 0?!i:n,e.getCanSelect()&&i===n)return a;let o={...a};return un(o,e.id,n,r?.selectChildren??!0,t),o})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return fn(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return pn(e,n)===`some`},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return pn(e,n)===`all`},e.getCanSelect=()=>typeof t.options.enableRowSelection==`function`?t.options.enableRowSelection(e):t.options.enableRowSelection??!0,e.getCanSelectSubRows=()=>typeof t.options.enableSubRowSelection==`function`?t.options.enableSubRowSelection(e):t.options.enableSubRowSelection??!0,e.getCanMultiSelect=()=>typeof t.options.enableMultiRowSelection==`function`?t.options.enableMultiRowSelection(e):t.options.enableMultiRowSelection??!0,e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{t&&e.toggleSelected(n.target?.checked)}}}},un=(e,t,n,r,i)=>{var a;let o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(t=>un(e,t.id,n,r,i))};function dn(e,t){let n=e.getState().rowSelection,r=[],i={},a=function(e,t){return e.map(e=>{var t;let o=fn(e,n);if(o&&(r.push(e),i[e.id]=e),(t=e.subRows)!=null&&t.length&&(e={...e,subRows:a(e.subRows)}),o)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function fn(e,t){return t[e.id]??!1}function pn(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(e=>{if(!(a&&!i)&&(e.getCanSelect()&&(fn(e,t)?a=!0:i=!1),e.subRows&&e.subRows.length)){let n=pn(e,t);n===`all`?a=!0:(n===`some`&&(a=!0),i=!1)}}),i?`all`:a?`some`:!1}var mn=/([0-9]+)/gm,hn=(e,t,n)=>Sn(Y(e.getValue(n)).toLowerCase(),Y(t.getValue(n)).toLowerCase()),gn=(e,t,n)=>Sn(Y(e.getValue(n)),Y(t.getValue(n))),_n=(e,t,n)=>xn(Y(e.getValue(n)).toLowerCase(),Y(t.getValue(n)).toLowerCase()),vn=(e,t,n)=>xn(Y(e.getValue(n)),Y(t.getValue(n))),yn=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},bn=(e,t,n)=>xn(e.getValue(n),t.getValue(n));function xn(e,t){return e===t?0:e>t?1:-1}function Y(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function Sn(e,t){let n=e.split(mn).filter(Boolean),r=t.split(mn).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),a=parseInt(t,10),o=[i,a].sort();if(isNaN(o[0])){if(e>t)return 1;if(t>e)return-1;continue}if(isNaN(o[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}var X={alphanumeric:hn,alphanumericCaseSensitive:gn,text:_n,textCaseSensitive:vn,datetime:yn,basic:bn},Cn=[Ct,Zt,Vt,Ut,Et,It,$t,en,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:`auto`,sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:U(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=t?.getValue(e.id);if(Object.prototype.toString.call(n)===`[object Date]`)return X.datetime;if(typeof n==`string`&&(r=!0,n.split(mn).length>1))return X.alphanumeric}return r?X.text:X.basic},e.getAutoSortDir=()=>typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id)==`string`?`asc`:`desc`,e.getSortingFn=()=>{if(!e)throw Error();return _t(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===`auto`?e.getAutoSortingFn():t.options.sortingFns?.[e.columnDef.sortingFn]??X[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),a=n!=null;t.setSorting(o=>{let s=o?.find(t=>t.id===e.id),c=o?.findIndex(t=>t.id===e.id),l=[],u,d=a?n:i===`desc`;return u=o!=null&&o.length&&e.getCanMultiSort()&&r?s?`toggle`:`add`:o!=null&&o.length&&c!==o.length-1?`replace`:s?`toggle`:`replace`,u===`toggle`&&(a||i||(u=`remove`)),u===`add`?(l=[...o,{id:e.id,desc:d}],l.splice(0,l.length-(t.options.maxMultiSortColCount??2**53-1))):l=u===`toggle`?o.map(t=>t.id===e.id?{...t,desc:d}:t):u===`remove`?o.filter(t=>t.id!==e.id):[{id:e.id,desc:d}],l})},e.getFirstSortDir=()=>e.columnDef.sortDescFirst??t.options.sortDescFirst??e.getAutoSortDir()===`desc`?`desc`:`asc`,e.getNextSortingOrder=n=>{let r=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==r&&(t.options.enableSortingRemoval??!0)&&(!n||(t.options.enableMultiRemove??!0))?!1:i===`desc`?`asc`:`desc`:r},e.getCanSort=()=>(e.columnDef.enableSorting??!0)&&(t.options.enableSorting??!0)&&!!e.accessorFn,e.getCanMultiSort=()=>e.columnDef.enableMultiSort??t.options.enableMultiSort??!!e.accessorFn,e.getIsSorted=()=>{let n=t.getState().sorting?.find(t=>t.id===e.id);return n?n.desc?`desc`:`asc`:!1},e.getSortIndex=()=>t.getState().sorting?.findIndex(t=>t.id===e.id)??-1,e.clearSorting=()=>{t.setSorting(t=>t!=null&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{e.setSorting(t?[]:e.initialState?.sorting??[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},zt,tn,on,cn,ln,qt];function wn(e){let t=[...Cn,...e._features??[]],n={_features:t},r=n._features.reduce((e,t)=>Object.assign(e,t.getDefaultOptions==null?void 0:t.getDefaultOptions(n)),{}),i=e=>n.options.mergeOptions?n.options.mergeOptions(r,e):{...r,...e},a={...e.initialState??{}};n._features.forEach(e=>{a=(e.getInitialState==null?void 0:e.getInitialState(a))??a});let o=[],s=!1,c={_features:t,options:{...r,...e},initialState:a,_queue:e=>{o.push(e),s||(s=!0,Promise.resolve().then(()=>{for(;o.length;)o.shift()();s=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{n.options=i(H(e,n.options))},getState:()=>n.options.state,setState:e=>{n.options.onStateChange==null||n.options.onStateChange(e)},_getRowId:(e,t,r)=>(n.options.getRowId==null?void 0:n.options.getRowId(e,t,r))??`${r?[r.id,t].join(`.`):t}`,getCoreRowModel:()=>(n._getCoreRowModel||=n.options.getCoreRowModel(n),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{let r=(t?n.getPrePaginationRowModel():n.getRowModel()).rowsById[e];if(!r&&(r=n.getCoreRowModel().rowsById[e],!r))throw Error();return r},_getDefaultColumnDef:W(()=>[n.options.defaultColumn],e=>(e??={},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t;return((t=e.renderValue())==null||t.toString==null?void 0:t.toString())??null},...n._features.reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef==null?void 0:t.getDefaultColumnDef()),{}),...e}),G(e,`debugColumns`,`_getDefaultColumnDef`)),_getColumnDefs:()=>n.options.columns,getAllColumns:W(()=>[n._getColumnDefs()],e=>{let t=function(e,r,i){return i===void 0&&(i=0),e.map(e=>{let a=xt(n,e,i,r),o=e;return a.columns=o.columns?t(o.columns,a,i+1):[],a})};return t(e)},G(e,`debugColumns`,`getAllColumns`)),getAllFlatColumns:W(()=>[n.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),G(e,`debugColumns`,`getAllFlatColumns`)),_getAllFlatColumnsById:W(()=>[n.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),G(e,`debugColumns`,`getAllFlatColumnsById`)),getAllLeafColumns:W(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),G(e,`debugColumns`,`getAllLeafColumns`)),getColumn:e=>n._getAllFlatColumnsById()[e]};Object.assign(n,c);for(let e=0;e<n._features.length;e++){let t=n._features[e];t==null||t.createTable==null||t.createTable(n)}return n}function Tn(){return e=>W(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,a){i===void 0&&(i=0);let o=[];for(let c=0;c<t.length;c++){let l=Tt(e,e._getRowId(t[c],c,a),t[c],c,i,void 0,a?.id);if(n.flatRows.push(l),n.rowsById[l.id]=l,o.push(l),e.options.getSubRows){var s;l.originalSubRows=e.options.getSubRows(t[c],c),(s=l.originalSubRows)!=null&&s.length&&(l.subRows=r(l.originalSubRows,i+1,l))}}return o};return n.rows=r(t),n},G(e.options,`debugTable`,`getRowModel`,()=>e._autoResetPageIndex()))}function En(){return e=>W(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;let r=e.getState().sorting,i=[],a=r.filter(t=>e.getColumn(t.id)?.getCanSort()),o={};a.forEach(t=>{let n=e.getColumn(t.id);n&&(o[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let s=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let n=0;n<a.length;n+=1){let r=a[n],i=o[r.id],s=i.sortUndefined,c=r?.desc??!1,l=0;if(s){let n=e.getValue(r.id),i=t.getValue(r.id),a=n===void 0,o=i===void 0;if(a||o){if(s===`first`)return a?-1:1;if(s===`last`)return a?1:-1;l=a&&o?0:a?s:-s}}if(l===0&&(l=i.sortingFn(e,t,r.id)),l!==0)return c&&(l*=-1),i.invertSorting&&(l*=-1),l}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),(t=e.subRows)!=null&&t.length&&(e.subRows=s(e.subRows))}),t};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},G(e.options,`debugTable`,`getSortedRowModel`,()=>e._autoResetPageIndex()))}function Dn(e,t){return e?On(e)?L.createElement(e,t):e:null}function On(e){return kn(e)||typeof e==`function`||An(e)}function kn(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function An(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function jn(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=L.useState(()=>({current:wn(t)})),[r,i]=L.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),e.onStateChange==null||e.onStateChange(t)}})),n.current}function Mn(e,t,n){try{return e(t)}catch(e){return h("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function Z(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),Mn(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var Nn=Z({parse:e=>e,serialize:String}),Pn=Z({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)});Z({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),Z({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),Z({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),Z({parse:e=>e.toLowerCase()===`true`,serialize:String});function Fn(e,t){return e.valueOf()===t.valueOf()}Z({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:Fn}),Z({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:Fn}),Z({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:Fn});var In=g(),Ln={};function Rn(e,t={}){let n=(0,L.useId)(),r=f(),i=v(),{history:a=`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=p.timeMs,limitUrlUpdates:h=r?.limitUrlUpdates,clearOnDefault:g=r?.clearOnDefault??!0,startTransition:_,urlKeys:b=Ln}=t,x=Object.keys(e).join(`,`),S=(0,L.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,b[e]??e])),[x,JSON.stringify(b)]),C=d(Object.values(S)),w=C.searchParams,T=(0,L.useRef)({}),E=(0,L.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),D=y.useQueuedQueries(Object.values(S)),[O,k]=(0,L.useState)(()=>zn(e,b,w??new URLSearchParams,D).state),A=(0,L.useRef)(O);if(u("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,x,O,w),Object.keys(T.current).join(`&`)!==Object.values(S).join(`&`)){let{state:t,hasChanged:r}=zn(e,b,w,D,T.current,A.current);r&&(u("[nuq+ %s `%s`] State changed: %O",n,x,{state:t,initialSearchParams:w,queuedQueries:D,queryRef:T.current,stateRef:A.current}),A.current=t,k(t)),T.current=Object.fromEntries(Object.entries(S).map(([t,n])=>[n,e[t]?.type===`multi`?w?.getAll(n):w?.get(n)??null]))}(0,L.useEffect)(()=>{let{state:t,hasChanged:r}=zn(e,b,w,D,T.current,A.current);r&&(u("[nuq+ %s `%s`] State changed: %O",n,x,{state:t,initialSearchParams:w,queuedQueries:D,queryRef:T.current,stateRef:A.current}),A.current=t,k(t))},[Object.values(S).map(e=>`${e}=${w?.getAll(e)}`).join(`&`),JSON.stringify(D)]),(0,L.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{k(a=>{let{defaultValue:o}=e[r],s=S[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(u("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,x,s,t,o,A.current),a):(A.current={...A.current,[r]:c},T.current[s]=i,u("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,x,s,t,o,A.current),A.current)})},t),{});for(let r of Object.keys(e)){let e=S[r];u("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,x),In.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=S[r];u("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,x),In.off(e,t[r])}}},[x,S]);let ee=(0,L.useCallback)((t,r={})=>{let d=Object.fromEntries(Object.keys(e).map(e=>[e,null])),f=typeof t==`function`?t(Bn(A.current,E))??d:t??d;u("[nuq+ %s `%s`] setState: %O",n,x,f);let v,b=0,w=!1,T=[];for(let[t,n]of Object.entries(f)){let i=e[t],u=S[t];if(!i)continue;(r.clearOnDefault??i.clearOnDefault??g)&&n!==null&&i.defaultValue!==void 0&&(i.eq??((e,t)=>e===t))(n,i.defaultValue)&&(n=null);let d=n===null?null:(i.serialize??String)(n);In.emit(u,{state:n,query:d});let f={key:u,query:d,options:{history:r.history??i.history??a,shallow:r.shallow??i.shallow??s,scroll:r.scroll??i.scroll??o,startTransition:r.startTransition??i.startTransition??_}};if(r?.limitUrlUpdates?.method===`debounce`||h?.method===`debounce`||i.limitUrlUpdates?.method===`debounce`){f.options.shallow===!0&&console.warn(m(422));let e=r?.limitUrlUpdates?.timeMs??h?.timeMs??i.limitUrlUpdates?.timeMs??p.timeMs,t=y.push(f,e,C);b<e&&(v=t,b=e)}else{let e=r?.limitUrlUpdates?.timeMs??i?.limitUrlUpdates?.timeMs??h?.timeMs??r.throttleMs??i.throttleMs??c;T.push(y.abort(u)),l.push(f,e),w=!0}}let D=T.reduce((e,t)=>t(e),w?l.flush(C,i):l.getPendingPromise(C));return v??D},[x,a,s,o,c,h?.method,h?.timeMs,_,S,C.updateUrl,C.getSearchParamsSnapshot,C.rateLimitFactor,i,E]);return[(0,L.useMemo)(()=>Bn(O,E),[O,E]),ee]}function zn(e,t,n,r,i,a){let o=!1,s=Object.entries(e).reduce((e,[s,c])=>{let l=t?.[s]??s,u=r[l],d=c.type===`multi`?[]:null,f=u===void 0?(c.type===`multi`?n?.getAll(l):n?.get(l))??d:u;return i&&a&&b(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(_(f)?null:Mn(c.parse,f,l))??null,i&&(i[l]=f),e)},{});if(!o){let t=Object.keys(e),n=Object.keys(a??{});o=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:s,hasChanged:o}}function Bn(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}r();function Vn(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);var Hn=1,Q=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Hn++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],L.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Wn(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||Hn++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Un=(e,t)=>{let n=t?.id||Hn++;return Q.addToast({title:e,...t,id:n}),n},Wn=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Gn=Un,Kn=Object.assign(Gn,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:()=>Q.toasts,getToasts:()=>Q.getActiveToasts()});Vn(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);var qn={message:(e,t)=>{Kn[e.variant](e.message)},redirect:(e,t)=>{e.newTab?window.open(e.url,`_blank`,`noopener,noreferrer`):window.location.href=e.url},download:(e,t)=>{let n=document.createElement(`a`);n.href=e.url,e.filename&&(n.download=e.filename),document.body.appendChild(n),n.click(),document.body.removeChild(n)},visit:(e,t)=>{t.navigate(e.path)},modal:(e,t)=>{window.dispatchEvent(new CustomEvent(`resource-table:open-modal`,{detail:{component:e.component,props:e.props||{}}}))},emit:(e,t)=>{window.dispatchEvent(new CustomEvent(e.event,{detail:e.data}))}};function Jn(e,t){e&&qn[e.type](e,t)}function Yn(e){return{key:`download`,label:`translation:admin.storage.actions.download`,bulk:!1,icon:`download`,onSuccess:e=>({type:`download`,url:e.url,filename:e.filename}),...e}}function Xn(e){return{key:`preview`,label:`translation:admin.storage.actions.preview`,bulk:!1,icon:`eye`,onSuccess:e=>a(()=>import(`./file-preview-dialog-BRkWSRN4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(t=>({type:`modal`,component:t.FilePreviewDialog,props:{url:e.url,contentType:e.contentType,filename:e.filename}})),...e}}function Zn(e){return{key:`delete`,label:`translation:admin.storage.actions.delete`,bulk:!0,confirmation:!0,icon:`trash`,standalone:!0,onSuccess:()=>({type:`message`,message:`translation:admin.storage.actions.deleteSuccess`,variant:`success`}),...e}}function Qn(e,t){if(!t)return String(e??``);if(typeof t==`function`)return t(e);switch(t){case`bytes`:return ne(typeof e==`number`?e:0);case`date`:return e?new Date(e).toLocaleDateString():``;case`datetime`:return e?new Date(e).toLocaleString():``;case`number`:return typeof e==`number`?e.toLocaleString():``;default:return String(e??``)}}function $(e){switch(e){case`download`:return te;case`eye`:case`preview`:return oe;case`trash`:case`delete`:return ze;default:return null}}async function $n({action:e,rowId:t,mutations:n,onComplete:r,navigate:i,t:a}){try{let a=await n[e.key].mutateAsync({id:t}),o={ids:[t],refetch:r,navigate:i};e.onSuccess&&Jn(await e.onSuccess(a,o),o),r()}catch(e){Kn.error(e.message||a(`translation:admin.resourceTable.errors.actionFailed`))}}async function er({action:e,ids:t,mutations:n,onComplete:r,navigate:i,t:a}){try{let a=await n[e.key].mutateAsync({ids:t}),o={ids:t,refetch:r,navigate:i};e.onSuccess&&Jn(await e.onSuccess(a,o),o),r()}catch(e){Kn.error(e.message||a(`translation:admin.resourceTable.errors.actionFailed`))}}function tr(e){let t=(0,V.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,R.jsx)(lt,{"data-slot":`alert-dialog`,...n}),t[2]=n,t[3]=r),r}function nr(e){let t=(0,V.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,R.jsx)(ut,{"data-slot":`alert-dialog-portal`,...n}),t[2]=n,t[3]=r),r}function rr(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(dt,{"data-slot":`alert-dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ir(e){let t=(0,V.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,R.jsx)(rr,{}),t[3]=i):i=t[3];let a;t[4]===n?a=t[5]:(a=j(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a?(o=(0,R.jsxs)(nr,{children:[i,(0,R.jsx)(ft,{"data-slot":`alert-dialog-content`,className:a,...r})]}),t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function ar(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(`flex flex-col gap-2 text-center sm:text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function or(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sr(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(`text-lg font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(ht,{"data-slot":`alert-dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function cr(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(gt,{"data-slot":`alert-dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function lr(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(M(),n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(pt,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ur(e){let t=(0,V.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=j(M({variant:`outline`}),n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,R.jsx)(mt,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var dr=c();function fr(e){let t=(0,dr.c)(41),{open:n,onOpenChange:r,action:i,onConfirm:a,t:o}=e;if(!i?.confirmation)return null;let s;t[0]===i.icon?s=t[1]:(s=$(i.icon),t[0]=i.icon,t[1]=s);let c=s,l=typeof i.confirmation==`object`&&i.confirmation.title?i.confirmation.title:`translation:admin.resourceTable.confirmDialog.title`,u;t[2]!==o||t[3]!==l?(u=o(l),t[2]=o,t[3]=l,t[4]=u):u=t[4];let d;t[5]===u?d=t[6]:(d=(0,R.jsx)(sr,{children:u}),t[5]=u,t[6]=d);let f=typeof i.confirmation==`object`&&i.confirmation.description?i.confirmation.description:`translation:admin.resourceTable.confirmDialog.description`,p;t[7]!==o||t[8]!==f?(p=o(f),t[7]=o,t[8]=f,t[9]=p):p=t[9];let m;t[10]===p?m=t[11]:(m=(0,R.jsx)(cr,{children:p}),t[10]=p,t[11]=m);let h;t[12]!==d||t[13]!==m?(h=(0,R.jsxs)(ar,{children:[d,m]}),t[12]=d,t[13]=m,t[14]=h):h=t[14];let g;t[15]===o?g=t[16]:(g=o(`translation:admin.resourceTable.confirmDialog.cancel`),t[15]=o,t[16]=g);let _;t[17]===g?_=t[18]:(_=(0,R.jsx)(ur,{children:g}),t[17]=g,t[18]=_);let v=i.key===`delete`,y;t[19]===v?y=t[20]:(y=j({"bg-red-500 hover:bg-destructive":v}),t[19]=v,t[20]=y);let b;t[21]===c?b=t[22]:(b=c&&(0,R.jsx)(c,{className:`size-4`}),t[21]=c,t[22]=b);let x;t[23]!==i.label||t[24]!==o?(x=o(i.label),t[23]=i.label,t[24]=o,t[25]=x):x=t[25];let S;t[26]!==a||t[27]!==y||t[28]!==b||t[29]!==x?(S=(0,R.jsxs)(lr,{className:y,onClick:a,children:[b,x]}),t[26]=a,t[27]=y,t[28]=b,t[29]=x,t[30]=S):S=t[30];let C;t[31]!==_||t[32]!==S?(C=(0,R.jsxs)(or,{children:[_,S]}),t[31]=_,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==C||t[35]!==h?(w=(0,R.jsxs)(ir,{children:[h,C]}),t[34]=C,t[35]=h,t[36]=w):w=t[36];let T;return t[37]!==r||t[38]!==n||t[39]!==w?(T=(0,R.jsx)(tr,{open:n,onOpenChange:r,children:w}),t[37]=r,t[38]=n,t[39]=w,t[40]=T):T=t[40],T}var pr=c();function mr(e){let t=(0,pr.c)(38),{actions:n,row:r,mutations:i,onComplete:a,navigate:o,t:s}=e,[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(null),f;t[0]!==i||t[1]!==o||t[2]!==a||t[3]!==r||t[4]!==s?(f=async e=>{if(e.confirmation){d(e),l(!0);return}await $n({action:e,rowId:r.id,mutations:i,onComplete:a,navigate:o,t:s})},t[0]=i,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=f):f=t[5];let p=f,m;t[6]!==i||t[7]!==o||t[8]!==a||t[9]!==r||t[10]!==u||t[11]!==s?(m=async()=>{u&&(await $n({action:u,rowId:r.id,mutations:i,onComplete:a,navigate:o,t:s}),l(!1))},t[6]=i,t[7]=o,t[8]=a,t[9]=r,t[10]=u,t[11]=s,t[12]=m):m=t[12];let h=m,g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,R.jsx)(Le,{className:`size-4`}),t[13]=g):g=t[13];let _;t[14]===s?_=t[15]:(_=s(`translation:admin.resourceTable.columns.actions`),t[14]=s,t[15]=_);let v;t[16]===_?v=t[17]:(v=(0,R.jsx)(be,{asChild:!0,children:(0,R.jsxs)(N,{variant:`ghost`,size:`sm`,children:[g,(0,R.jsx)(`span`,{className:`sr-only`,children:_})]})}),t[16]=_,t[17]=v);let y;if(t[18]!==n||t[19]!==p||t[20]!==s){let e;t[22]!==p||t[23]!==s?(e=e=>{let t=$(e.icon);return(0,R.jsxs)(ve,{onClick:()=>p(e),variant:e.key===`delete`?`destructive`:`default`,children:[t&&(0,R.jsx)(t,{className:`size-4`}),s(e.label)]},e.key)},t[22]=p,t[23]=s,t[24]=e):e=t[24],y=n.map(e),t[18]=n,t[19]=p,t[20]=s,t[21]=y}else y=t[21];let b;t[25]===y?b=t[26]:(b=(0,R.jsx)(ye,{align:`end`,children:y}),t[25]=y,t[26]=b);let x;t[27]!==v||t[28]!==b?(x=(0,R.jsxs)(xe,{children:[v,b]}),t[27]=v,t[28]=b,t[29]=x):x=t[29];let S;t[30]!==c||t[31]!==h||t[32]!==u||t[33]!==s?(S=(0,R.jsx)(fr,{open:c,onOpenChange:l,action:u,onConfirm:h,t:s}),t[30]=c,t[31]=h,t[32]=u,t[33]=s,t[34]=S):S=t[34];let C;return t[35]!==x||t[36]!==S?(C=(0,R.jsxs)(R.Fragment,{children:[x,S]}),t[35]=x,t[36]=S,t[37]=C):C=t[37],C}var hr=c();function gr(e){let t=(0,hr.c)(35),{actions:n,selectedRowIds:r,mutations:i,refetch:a,navigate:o,t:s,table:c}=e,[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(null),p,m,h,g,_;if(t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==d||t[4]!==a||t[5]!==r||t[6]!==s||t[7]!==c){_=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.filter(_r);if(!e||e.length===0){_=null;break bb0}let[l,...v]=e,y=$(l.icon),b;t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==r||t[17]!==s||t[18]!==c?(b=async e=>{await er({action:e,ids:r,mutations:i,onComplete:()=>{c.resetRowSelection(),a()},navigate:o,t:s})},t[13]=i,t[14]=o,t[15]=a,t[16]=r,t[17]=s,t[18]=c,t[19]=b):b=t[19];let x=b,S;t[20]===x?S=t[21]:(S=async e=>{if(e.confirmation){f(e),u(!0);return}await x(e)},t[20]=x,t[21]=S);let C=S,w;t[22]!==x||t[23]!==d?(w=async()=>{d&&(await x(d),u(!1),f(null))},t[22]=x,t[23]=d,t[24]=w):w=t[24],p=w,m=y&&(0,R.jsxs)(we,{children:[(0,R.jsx)(Se,{asChild:!0,children:(0,R.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>C(l),children:(0,R.jsx)(y,{className:l.key===`delete`?`size-4 text-destructive`:`size-4`})})}),(0,R.jsx)(Ce,{children:s(l.label)})]}),h=(0,R.jsx)(`div`,{className:`hidden sm:flex items-center gap-0.5`,children:v.map(e=>{let t=$(e.icon);return t?(0,R.jsxs)(we,{children:[(0,R.jsx)(Se,{asChild:!0,children:(0,R.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>C(e),children:(0,R.jsx)(t,{className:e.key===`delete`?`size-4 text-destructive`:`size-4`})})}),(0,R.jsx)(Ce,{children:s(e.label)})]},e.key):null})}),g=v.length>0&&(0,R.jsx)(`div`,{className:`sm:hidden`,children:(0,R.jsxs)(xe,{children:[(0,R.jsx)(be,{asChild:!0,children:(0,R.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-8`,children:(0,R.jsx)(Le,{className:`size-4`})})}),(0,R.jsx)(ye,{align:`end`,children:v.map(e=>{let t=$(e.icon);return(0,R.jsxs)(ve,{onClick:()=>C(e),className:e.key===`delete`?`text-destructive`:void 0,children:[t&&(0,R.jsx)(t,{className:`mr-2 size-4`}),s(e.label)]},e.key)})})]})})}t[0]=n,t[1]=i,t[2]=o,t[3]=d,t[4]=a,t[5]=r,t[6]=s,t[7]=c,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_}else p=t[8],m=t[9],h=t[10],g=t[11],_=t[12];if(_!==Symbol.for(`react.early_return_sentinel`))return _;let v;t[25]!==l||t[26]!==p||t[27]!==d||t[28]!==s?(v=(0,R.jsx)(fr,{open:l,onOpenChange:u,action:d,onConfirm:p,t:s}),t[25]=l,t[26]=p,t[27]=d,t[28]=s,t[29]=v):v=t[29];let y;return t[30]!==m||t[31]!==h||t[32]!==g||t[33]!==v?(y=(0,R.jsxs)(R.Fragment,{children:[m,h,g,v]}),t[30]=m,t[31]=h,t[32]=g,t[33]=v,t[34]=y):y=t[34],y}function _r(e){return e.bulk}function vr({config:e,router:t}){let{t:n}=s([`translation`]),r=o(),i=e.pagination.type===`cursor`,[a,c]=Rn({cursorAfter:Nn.withDefault(``),cursorBefore:Nn.withDefault(``),page:Pn.withDefault(1),pageSize:Pn.withDefault(e.pagination.defaultPageSize),search:Nn.withDefault(``),filters:Nn.withDefault(``),orderBy:Nn.withDefault(``)},{history:`push`}),{cursorAfter:l,cursorBefore:u,page:d,pageSize:f,search:p}=a,m=a.filters?JSON.parse(a.filters):{},h=a.orderBy?JSON.parse(a.orderBy):void 0,[g,_]=(0,L.useState)(h?[{id:h.column,desc:h.direction===`desc`}]:[]),[v,y]=(0,L.useState)({}),[b,x]=(0,L.useState)({open:!1,component:null,props:{}});(0,L.useEffect)(()=>{let e=e=>{x({open:!0,component:e.detail.component,props:e.detail.props})};return window.addEventListener(`resource-table:open-modal`,e),()=>{window.removeEventListener(`resource-table:open-modal`,e)}},[]);let S=e=>{let t=typeof e==`function`?e(g):e;if(_(t),t.length>0){let e=t[0];c({orderBy:JSON.stringify({column:e.id,direction:e.desc?`desc`:`asc`}),cursorAfter:null,cursorBefore:null})}else c({orderBy:``,cursorAfter:null,cursorBefore:null})},C=t.actions.download?.useMutation(),te=t.actions.preview?.useMutation(),ne=t.actions.delete?.useMutation(),oe=(0,L.useMemo)(()=>({download:C,preview:te,delete:ne}),[C,te,ne]),j={...i?{cursor:l&&l!==``?JSON.parse(l):void 0,cursorBefore:u&&u!==``?JSON.parse(u):void 0}:{page:d},pageSize:f||void 0,filters:Object.keys(m).length>0?m:void 0,search:p||void 0,orderBy:h||void 0},{data:M,isLoading:ce,refetch:le}=t[i?`listCursor`:`listOffset`].useQuery(j),ue=i?M:void 0,P=i?void 0:M,F=(0,L.useMemo)(()=>{let t=[{id:`select`,header:({table:e})=>(0,R.jsx)(_e,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&`indeterminate`,onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":n(`translation:admin.resourceTable.selection.selectAll`)}),cell:({row:e})=>(0,R.jsx)(_e,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":n(`translation:admin.resourceTable.selection.selectRow`)}),enableSorting:!1,enableHiding:!1}];for(let r of e.fields)t.push({id:r.key,accessorKey:r.key,header:({column:e})=>r.sortable?(0,R.jsxs)(N,{variant:`ghost`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),className:`-ml-4`,children:[n(r.label),e.getIsSorted()===`asc`?(0,R.jsx)(Pe,{className:`ml-2 size-3.5`}):e.getIsSorted()===`desc`?(0,R.jsx)(Me,{className:`ml-2 size-3.5`}):(0,R.jsx)(Ne,{className:`ml-2 size-3.5 opacity-50`})]}):(0,R.jsx)(`div`,{children:n(r.label)}),cell:({getValue:e})=>Qn(e(),r.format),enableSorting:r.sortable||!1});return e.actions&&e.actions.filter(e=>!e.bulk||e.standalone).length>0&&t.push({id:`actions`,header:()=>n(`translation:admin.resourceTable.columns.actions`),cell:({row:t})=>(0,R.jsx)(mr,{actions:e.actions.filter(e=>!e.bulk||e.standalone),row:t.original,mutations:oe,onComplete:le,navigate:r,t:n}),enableSorting:!1,enableHiding:!1}),t},[e.fields,e.actions,n,oe,le,r]),I=jn({data:M?.data??[],columns:F,state:{sorting:g,rowSelection:v},onSortingChange:S,onRowSelectionChange:y,getCoreRowModel:Tn(),getSortedRowModel:En(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:!0}),de=I.getSelectedRowModel().rows.map(e=>e.original.id);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4`,children:[(0,R.jsxs)(`div`,{className:`relative w-full sm:max-w-sm`,children:[(0,R.jsx)(je,{placeholder:n(`translation:admin.resourceTable.search.placeholder`),value:p,onChange:e=>c({search:e.target.value,cursorAfter:null,cursorBefore:null}),onKeyDown:e=>{e.key===`Escape`&&p&&(e.stopPropagation(),c({search:``,cursorAfter:null,cursorBefore:null}))},className:`w-full`}),p&&(0,R.jsx)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),c({search:``,cursorAfter:null,cursorBefore:null})},className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center hover:bg-accent rounded-sm p-0.5 transition-colors`,"aria-label":n(`translation:admin.resourceTable.search.clearLabel`),children:(0,R.jsx)(se,{className:`size-3.5 opacity-50 hover:opacity-100`})})]}),e.filters?.map(e=>(0,R.jsxs)(`div`,{className:`relative w-full sm:w-auto`,children:[(0,R.jsxs)(O,{value:m[e.key]?.toString(),onValueChange:t=>{c({filters:JSON.stringify({...m,[e.key]:t}),cursorAfter:null,cursorBefore:null})},children:[(0,R.jsx)(T,{className:`w-full sm:min-w-48`,onKeyDown:t=>{if(t.key===`Escape`&&m[e.key]){t.stopPropagation();let{[e.key]:n,...r}=m;c({filters:Object.keys(r).length>0?JSON.stringify(r):``,cursorAfter:null,cursorBefore:null})}},children:(0,R.jsx)(w,{placeholder:n(`translation:admin.resourceTable.filter.all`,{label:n(e.label)})})}),(0,R.jsx)(E,{children:e.options?.map(e=>(0,R.jsx)(D,{value:String(e.value),children:n(e.label)},e.value))})]},`${e.key}-${m[e.key]??`empty`}`),m[e.key]&&(0,R.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:t=>{t.preventDefault(),t.stopPropagation();let{[e.key]:n,...r}=m;c({filters:Object.keys(r).length>0?JSON.stringify(r):``,cursorAfter:null,cursorBefore:null})},className:`absolute right-8 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center hover:bg-accent rounded-sm p-0.5 transition-colors`,"aria-label":n(`translation:admin.resourceTable.filter.clearLabel`),children:(0,R.jsx)(se,{className:`size-3.5 opacity-50 hover:opacity-100`})})]},e.key))]}),(0,R.jsx)(`div`,{className:`rounded-md border overflow-x-auto`,children:(0,R.jsxs)(re,{children:[(0,R.jsx)(ae,{children:I.getHeaderGroups().map(t=>(0,R.jsx)(A,{children:de.length>0?(0,R.jsx)(ee,{colSpan:F.length,className:`h-10`,children:(0,R.jsxs)(`div`,{className:`flex items-center gap-2 -my-2`,children:[(0,R.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-4`,onClick:()=>I.resetRowSelection(),children:(0,R.jsx)(se,{className:`size-4`})}),(0,R.jsx)(`span`,{className:`text-sm font-medium ml-4`,children:n(`translation:admin.resourceTable.actions.selected`,{count:de.length})}),(0,R.jsx)(`div`,{className:`flex items-center gap-0.5 ml-auto`,children:e.actions&&(0,R.jsx)(gr,{actions:e.actions,selectedRowIds:de,mutations:oe,refetch:le,navigate:r,t:n,table:I})})]})}):t.headers.map(e=>(0,R.jsx)(ee,{children:e.isPlaceholder?null:Dn(e.column.columnDef.header,e.getContext())},e.id))},t.id))}),(0,R.jsx)(ie,{children:ce?(0,R.jsx)(A,{children:(0,R.jsx)(k,{colSpan:F.length,className:`h-24 text-center text-muted-foreground`,children:n(`translation:admin.resourceTable.loading`)})}):I.getRowModel().rows?.length?I.getRowModel().rows.map(e=>(0,R.jsx)(A,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>(0,R.jsx)(k,{children:Dn(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,R.jsx)(A,{children:(0,R.jsx)(k,{colSpan:F.length,className:`p-0`,children:(0,R.jsx)(ke,{className:`my-12`,children:(0,R.jsxs)(Ee,{children:[(0,R.jsx)(Te,{variant:`icon`,children:(0,R.jsx)(Re,{})}),(0,R.jsx)(De,{children:n(`translation:admin.resourceTable.empty.title`)}),(0,R.jsx)(Oe,{children:n(`translation:admin.resourceTable.empty.description`)})]})})})})})]})}),i?(0,R.jsxs)(`div`,{className:`flex flex-row justify-between gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.perPage`)}),(0,R.jsxs)(O,{value:f.toString(),onValueChange:e=>{c({pageSize:Number(e),cursorAfter:null,cursorBefore:null})},children:[(0,R.jsx)(T,{className:`w-[100px]`,children:(0,R.jsx)(w,{})}),(0,R.jsx)(E,{children:e.pagination.type===`cursor`&&e.pagination.pageSizeOptions.map(e=>(0,R.jsx)(D,{value:e.toString(),children:e},e))})]}),(0,R.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.results`)})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 w-fit`,children:[(0,R.jsxs)(N,{onClick:()=>c({cursorBefore:JSON.stringify(ue?.prevCursor),cursorAfter:null}),disabled:!ue?.hasPrev,variant:`outline`,size:`sm`,children:[(0,R.jsx)(Fe,{className:`size-4`}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.previous`)})]}),(0,R.jsxs)(N,{onClick:()=>{c({cursorAfter:JSON.stringify(ue?.nextCursor),cursorBefore:null})},disabled:!ue?.hasNext,variant:`outline`,size:`sm`,children:[(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.next`)}),(0,R.jsx)(Ie,{className:`size-4`})]})]})]}):(0,R.jsxs)(`div`,{className:`flex flex-row justify-between gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.perPage`)}),(0,R.jsxs)(O,{value:f.toString(),onValueChange:e=>{c({pageSize:Number(e),page:1})},children:[(0,R.jsx)(T,{className:`w-[100px]`,children:(0,R.jsx)(w,{})}),(0,R.jsx)(E,{children:e.pagination.type===`offset`&&e.pagination.pageSizeOptions.map(e=>(0,R.jsx)(D,{value:e.toString(),children:e},e))})]}),(0,R.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.results`)})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground mr-2`,children:n(`translation:admin.resourceTable.pagination.showing`,{from:(d-1)*f+1,to:Math.min(d*f,P?.total||0),total:P?.total||0})}),(0,R.jsxs)(N,{onClick:()=>c({page:Math.max(1,d-1)}),disabled:d===1,variant:`outline`,size:`sm`,children:[(0,R.jsx)(Fe,{className:`size-4`}),(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.previous`)})]}),(0,R.jsx)(`span`,{className:`flex items-center px-2 sm:px-4 text-sm`,children:n(`translation:admin.resourceTable.pagination.page`,{current:d,total:P?.totalPages||1})}),(0,R.jsxs)(N,{onClick:()=>c({page:d+1}),disabled:!P?.hasMore,variant:`outline`,size:`sm`,children:[(0,R.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.next`)}),(0,R.jsx)(Ie,{className:`size-4`})]})]})]}),b.open&&b.component&&(0,R.jsx)(b.component,{...b.props,open:b.open,onOpenChange:e=>{x(t=>({...t,open:e}))}})]})}var yr=c();const br={pagination:{type:`cursor`,defaultPageSize:25,pageSizeOptions:[25,50,100],cursorColumn:`createdAt`,tiebreaker:`id`},fields:[{key:`filename`,label:`translation:admin.storage.fields.filename`,searchable:!0,sortable:!0},{key:`contentType`,label:`translation:admin.storage.fields.contentType`},{key:`byteSize`,label:`translation:admin.storage.fields.byteSize`,sortable:!0,format:`bytes`},{key:`serviceName`,label:`translation:admin.storage.fields.serviceName`},{key:`createdAt`,label:`translation:admin.storage.fields.createdAt`,sortable:!0,format:`datetime`}],filters:[{key:`contentType`,label:`translation:admin.storage.filters.contentType.label`,type:`select`,options:[{value:`image/%`,label:`translation:admin.storage.filters.contentType.options.images`},{value:`video/%`,label:`translation:admin.storage.filters.contentType.options.videos`},{value:`audio/%`,label:`translation:admin.storage.filters.contentType.options.audio`},{value:`application/pdf`,label:`translation:admin.storage.filters.contentType.options.pdfs`},{value:`text/markdown`,label:`translation:admin.storage.filters.contentType.options.markdown`},{value:`text/%`,label:`translation:admin.storage.filters.contentType.options.text`}]},{key:`serviceName`,label:`translation:admin.storage.filters.serviceName.label`,type:`select`,options:[{value:`private`,label:`translation:admin.storage.filters.serviceName.options.private`},{value:`public`,label:`translation:admin.storage.filters.serviceName.options.public`}]}],actions:[Yn(),Xn(),Zn()]};var xr=i(function(){let e=(0,yr.c)(15),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`translation`],e[0]=t):t=e[0];let{t:n}=s(t),r;e[1]===n?r=e[2]:(r=n(`translation:admin.storage.title`),e[1]=n,e[2]=r);let i;e[3]===r?i=e[4]:(i=(0,R.jsx)(`h1`,{className:`text-3xl font-bold`,children:r}),e[3]=r,e[4]=i);let a;e[5]===n?a=e[6]:(a=n(`translation:admin.storage.description`),e[5]=n,e[6]=a);let o;e[7]===a?o=e[8]:(o=(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:a}),e[7]=a,e[8]=o);let c;e[9]!==i||e[10]!==o?(c=(0,R.jsxs)(`div`,{className:`mb-6`,children:[i,o]}),e[9]=i,e[10]=o,e[11]=c):c=e[11];let l;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsx)(vr,{config:br,router:Ae.admin.storage}),e[12]=l):l=e[12];let u;return e[13]===c?u=e[14]:(u=(0,R.jsxs)(R.Fragment,{children:[c,l]}),e[13]=c,e[14]=u),u});export{xr as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Auth - Overview`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Auth - Organizations`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Docs`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Billing`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./jsx-runtime-SCjaiuzT.js";import"./react-dom-Bhi-1tDD.js";import{F as n,r}from"./chunk-UIGDSWPH-DeiamgQc.js";import{r as i}from"./chunk-JG3XND5A-BetDbdG0.js";import{t as a}from"./useTranslation-Bz7VuQ7j.js";import"./initReactI18next-CyHiepAw.js";import"./shim-TRiHENXu.js";import"./compiler-runtime-Co9svCia.js";import"./dist-BWnI-4xl.js";import"./circle-alert-DB4JluX5.js";import{_ as o,a as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as _,s as v,t as y,u as b,v as x}from"./trust-indicator-D4tEs4Dr.js";import{t as S}from"./lock-Bj7dxHab.js";import"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import{n as C}from"./auth-provider-rkzBVtYX.js";import"./config-ChcA_Pkv.js";import{t as w}from"./input-V1lM1yoz.js";var T=e(),E=t(),D=n(function(){let{t:e}=a(),t=_(),{client:n}=C(),[D,O]=(0,T.useState)(!1),[k,A]=(0,T.useState)(null),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(null),F=(0,T.useRef)(null),I=x({resolver:o(h({email:f().email(e(`auth.forgotPassword.errors.emailInvalid`))})),defaultValues:{email:``}}),L=async t=>{try{if(O(!0),A(null),!N){A(e(`auth.forgotPassword.errors.captchaRequired`));return}let r=await n.requestPasswordReset({email:t.email,redirectTo:i(`/reset-password`),fetchOptions:{headers:{"x-captcha-response":N||``}}});if(r.error){A(e(`auth.errors.${r.error.code}`,e(`auth.forgotPassword.errors.requestFailed`))),P(null),F.current?.reset();return}M(!0)}catch(t){A(t instanceof Error?t.message:e(`auth.forgotPassword.errors.networkError`)),P(null),F.current?.reset()}finally{O(!1)}};return j?(0,E.jsxs)(s,{children:[(0,E.jsx)(s.Header,{title:e(`auth.forgotPassword.success.title`),description:e(`auth.forgotPassword.success.description`)}),(0,E.jsx)(s.Footer,{gap:`sm`,children:(0,E.jsx)(r,{to:i(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)})})]}):(0,E.jsxs)(s,{children:[(0,E.jsx)(s.Header,{title:e(`auth.forgotPassword.title`),description:e(`auth.forgotPassword.description`)}),(0,E.jsx)(s.Content,{children:(0,E.jsx)(v,{...I,children:(0,E.jsxs)(`form`,{onSubmit:I.handleSubmit(L),className:`space-y-4`,noValidate:!0,children:[(0,E.jsx)(p,{error:k}),(0,E.jsx)(m,{control:I.control,name:`email`,render:({field:t})=>(0,E.jsxs)(b,{children:[(0,E.jsx)(l,{children:e(`auth.forgotPassword.email.label`)}),(0,E.jsx)(c,{children:(0,E.jsx)(w,{...t,type:`email`,placeholder:e(`auth.forgotPassword.email.placeholder`),autoComplete:`email`,disabled:D})}),(0,E.jsx)(u,{})]})}),(0,E.jsx)(d,{ref:F,onError:()=>{A(e(`auth.forgotPassword.errors.captchaFailed`)),P(null)},onExpire:()=>P(null),onSuccess:e=>P(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,E.jsx)(g,{label:e(`auth.forgotPassword.submit`),isLoading:D,disabled:!N})]})})}),(0,E.jsxs)(s.Footer,{children:[(0,E.jsx)(r,{to:i(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)}),(0,E.jsx)(y,{icon:S,label:e(`auth.secureReset`)})]})]})});export{D as default};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./jsx-runtime-SCjaiuzT.js";import"./react-dom-Bhi-1tDD.js";import{F as n,P as r,k as i,r as a}from"./chunk-UIGDSWPH-DeiamgQc.js";import{r as o}from"./chunk-JG3XND5A-BetDbdG0.js";import{t as s}from"./useTranslation-Bz7VuQ7j.js";import"./initReactI18next-CyHiepAw.js";import"./shim-TRiHENXu.js";import"./compiler-runtime-Co9svCia.js";import"./dist-BWnI-4xl.js";import"./check-D5D2EGI4.js";import"./circle-alert-DB4JluX5.js";import{t as c}from"./password-input-bor7e4TM.js";import"./eye-Ctrln70x.js";import{_ as l,a as u,c as d,d as f,f as p,g as m,h,i as g,l as _,m as v,n as y,o as b,p as x,s as S,t as C,u as w,v as T}from"./trust-indicator-D4tEs4Dr.js";import{t as E}from"./lock-Bj7dxHab.js";import"./x-4CC8aqOW.js";import"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import"./dist-DhfcebhF.js";import"./dist-VqaKdvZu.js";import"./dist-CA21wN5I.js";import"./dist-CYRPrwOb.js";import{t as D}from"./checkbox-B35Nn166.js";import"./separator-Cla0V581.js";import{n as O}from"./auth-provider-rkzBVtYX.js";import"./config-ChcA_Pkv.js";import{t as k}from"./input-V1lM1yoz.js";import"./createReactComponent-C2TSpqC7.js";import{n as A,r as j,t as M}from"./social-providers-Bz7f1_yd.js";var N=e(),P=t(),F=n(function(){let{t:e}=s(),t=b(),{client:n,features:F}=O(),I=i(),[L]=r(),[R,z]=(0,N.useState)(!1),[B,V]=(0,N.useState)(null),[H,U]=(0,N.useState)(null),W=(0,N.useRef)(null),G=j(L.get(`returnTo`),o(`/home`)),K=F.socialProviders&&Object.values(F.socialProviders).some(e=>e),q=!!F.emailAndPassword,J=T({resolver:l(v({email:h().email(e(`auth.login.errors.emailInvalid`)),password:h().min(1,e(`auth.login.errors.passwordRequired`)).min(8,e(`auth.login.errors.passwordMinLength`)),rememberMe:x()})),defaultValues:{email:``,password:``,rememberMe:!1}}),Y=async t=>{try{if(z(!0),V(null),!H){V(e(`auth.login.errors.captchaRequired`));return}let r=await n.signIn.email({email:t.email,password:t.password,rememberMe:t.rememberMe,callbackURL:G,fetchOptions:{headers:{"x-captcha-response":H}}});if(r.error){V(e(`auth.errors.${r.error.code}`,e(`auth.login.errors.invalidCredentials`))),U(null),W.current?.reset();return}I(G)}catch(t){V(t instanceof Error?t.message:e(`auth.login.errors.networkError`)),U(null),W.current?.reset()}finally{z(!1)}};return(0,P.jsxs)(u,{children:[(0,P.jsx)(u.Header,{title:e(`auth.login.title`),description:e(`auth.login.description`)}),(0,P.jsx)(u.Content,{children:(0,P.jsxs)(`div`,{className:`space-y-4`,children:[K&&(0,P.jsx)(M,{mode:`login`,callbackURL:G,onError:e=>V(e.message)}),K&&q&&(0,P.jsx)(A,{text:e(`auth.social.orContinueWithEmail`)}),q&&(0,P.jsx)(S,{...J,children:(0,P.jsxs)(`form`,{onSubmit:J.handleSubmit(Y),className:`space-y-4`,noValidate:!0,children:[(0,P.jsx)(g,{error:B}),(0,P.jsx)(_,{control:J.control,name:`email`,render:({field:t})=>(0,P.jsxs)(w,{children:[(0,P.jsx)(f,{children:e(`auth.login.email.label`)}),(0,P.jsx)(d,{children:(0,P.jsx)(k,{...t,type:`email`,placeholder:e(`auth.login.email.placeholder`),autoComplete:`email`,disabled:R})}),(0,P.jsx)(p,{})]})}),(0,P.jsx)(_,{control:J.control,name:`password`,render:({field:t})=>(0,P.jsxs)(w,{children:[(0,P.jsx)(f,{children:e(`auth.login.password.label`)}),(0,P.jsx)(d,{children:(0,P.jsx)(c,{...t,placeholder:e(`auth.login.password.placeholder`),autoComplete:`current-password`,disabled:R})}),(0,P.jsx)(p,{})]})}),(0,P.jsx)(_,{control:J.control,name:`rememberMe`,render:({field:t})=>(0,P.jsx)(w,{children:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(d,{children:(0,P.jsx)(D,{checked:t.value,onCheckedChange:t.onChange,disabled:R})}),(0,P.jsx)(f,{className:`mt-0! cursor-pointer text-sm font-normal`,children:e(`auth.login.rememberMe`)})]})})}),(0,P.jsx)(m,{ref:W,onError:()=>{V(e(`auth.login.errors.captchaFailed`)),U(null)},onExpire:()=>U(null),onSuccess:e=>U(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,P.jsx)(y,{label:e(`auth.login.submit`),isLoading:R,disabled:!H})]})})]})}),(0,P.jsxs)(u.Footer,{children:[q&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{className:`text-center text-sm`,children:(0,P.jsx)(a,{to:o(`/forgot-password`),className:`text-primary hover:underline transition-colors duration-200`,children:e(`auth.login.forgotPassword`)})}),(0,P.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,P.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(`auth.login.noAccount`),` `]}),(0,P.jsx)(a,{to:o(`/signup`),className:`text-primary hover:underline transition-colors duration-200 font-medium`,children:e(`auth.login.signUp`)})]})]}),(0,P.jsx)(C,{icon:E,label:e(`auth.secureLogin`)})]})]})});export{F as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Home`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Auth - Users`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Auth - Authentication`}),e[0]=t):t=e[0],t});export{a as default};
File without changes
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./jsx-runtime-SCjaiuzT.js";import"./react-dom-Bhi-1tDD.js";import{F as n,P as r,k as i,r as a}from"./chunk-UIGDSWPH-DeiamgQc.js";import{r as o}from"./chunk-JG3XND5A-BetDbdG0.js";import{t as s}from"./useTranslation-Bz7VuQ7j.js";import"./initReactI18next-CyHiepAw.js";import"./shim-TRiHENXu.js";import"./compiler-runtime-Co9svCia.js";import"./dist-BWnI-4xl.js";import"./check-D5D2EGI4.js";import"./circle-alert-DB4JluX5.js";import{t as c}from"./password-input-bor7e4TM.js";import"./eye-Ctrln70x.js";import{_ as l,a as u,c as d,d as f,f as p,g as m,h,i as g,l as _,m as v,n as y,o as b,s as x,t as S,u as C,v as w}from"./trust-indicator-D4tEs4Dr.js";import{t as T}from"./lock-Bj7dxHab.js";import"./x-4CC8aqOW.js";import"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import{n as E}from"./auth-provider-rkzBVtYX.js";import"./config-ChcA_Pkv.js";import"./input-V1lM1yoz.js";var D=e(),O=t(),k=n(function(){let{t:e}=s(),t=b(),{client:n}=E(),k=i(),[A]=r(),[j,M]=(0,D.useState)(!1),[N,P]=(0,D.useState)(null),[F,I]=(0,D.useState)(null),L=(0,D.useRef)(null),R=A.get(`token`),z=A.get(`error`),B=w({resolver:l(v({newPassword:h().min(1,e(`auth.resetPassword.errors.passwordRequired`)).min(8,e(`auth.resetPassword.errors.passwordMinLength`)),confirmPassword:h().min(1,e(`auth.resetPassword.errors.passwordRequired`))}).refine(e=>e.newPassword===e.confirmPassword,{message:e(`auth.resetPassword.errors.passwordMismatch`),path:[`confirmPassword`]})),defaultValues:{newPassword:``,confirmPassword:``}}),V=async t=>{try{if(M(!0),P(null),!F){P(e(`auth.resetPassword.errors.captchaRequired`));return}if(!R){P(e(`auth.resetPassword.errors.tokenRequired`));return}let r=await n.resetPassword({newPassword:t.newPassword,token:R,fetchOptions:{headers:{"x-captcha-response":F||``}}});if(r.error){P(e(`auth.errors.${r.error.code}`,e(`auth.resetPassword.errors.resetFailed`))),I(null),L.current?.reset();return}k(`${o(`/login`)}?reset=success`)}catch(t){P(t instanceof Error?t.message:e(`auth.resetPassword.errors.networkError`)),I(null),L.current?.reset()}finally{M(!1)}};return!R||z?(0,O.jsxs)(u,{children:[(0,O.jsx)(u.Header,{title:e(`auth.resetPassword.title`),description:e(`auth.resetPassword.errors.invalidToken`),variant:`error`}),(0,O.jsxs)(u.Footer,{gap:`sm`,children:[(0,O.jsx)(a,{to:o(`/forgot-password`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium`,children:e(`auth.forgotPassword.requestNewLink`)}),(0,O.jsx)(a,{to:o(`/login`),className:`text-muted-foreground hover:underline transition-colors duration-200 text-sm`,children:e(`auth.forgotPassword.backToLogin`)})]})]}):(0,O.jsxs)(u,{children:[(0,O.jsx)(u.Header,{title:e(`auth.resetPassword.title`),description:e(`auth.resetPassword.description`)}),(0,O.jsx)(u.Content,{children:(0,O.jsx)(x,{...B,children:(0,O.jsxs)(`form`,{onSubmit:B.handleSubmit(V),className:`space-y-4`,noValidate:!0,children:[(0,O.jsx)(g,{error:N}),(0,O.jsx)(_,{control:B.control,name:`newPassword`,render:({field:t})=>(0,O.jsxs)(C,{children:[(0,O.jsx)(f,{children:e(`auth.resetPassword.newPassword.label`)}),(0,O.jsx)(d,{children:(0,O.jsx)(c,{...t,placeholder:e(`auth.resetPassword.newPassword.placeholder`),autoComplete:`new-password`,disabled:j,showStrength:!0})}),(0,O.jsx)(p,{})]})}),(0,O.jsx)(_,{control:B.control,name:`confirmPassword`,render:({field:t})=>(0,O.jsxs)(C,{children:[(0,O.jsx)(f,{children:e(`auth.resetPassword.confirmPassword.label`)}),(0,O.jsx)(d,{children:(0,O.jsx)(c,{...t,placeholder:e(`auth.resetPassword.confirmPassword.placeholder`),autoComplete:`new-password`,disabled:j})}),(0,O.jsx)(p,{})]})}),(0,O.jsx)(m,{ref:L,onError:()=>{P(e(`auth.resetPassword.errors.captchaFailed`)),I(null)},onExpire:()=>I(null),onSuccess:e=>I(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,O.jsx)(y,{label:e(`auth.resetPassword.submit`),isLoading:j,disabled:!F})]})})}),(0,O.jsxs)(u.Footer,{children:[(0,O.jsx)(a,{to:o(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)}),(0,O.jsx)(S,{icon:T,label:e(`auth.secureReset`)})]})]})});export{k as default};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./jsx-runtime-SCjaiuzT.js";import"./react-dom-Bhi-1tDD.js";import{F as n,P as r,k as i,r as a}from"./chunk-UIGDSWPH-DeiamgQc.js";import{r as o}from"./chunk-JG3XND5A-BetDbdG0.js";import{t as s}from"./useTranslation-Bz7VuQ7j.js";import"./initReactI18next-CyHiepAw.js";import"./shim-TRiHENXu.js";import"./compiler-runtime-Co9svCia.js";import{o as c}from"./dist-BWnI-4xl.js";import"./check-D5D2EGI4.js";import"./circle-alert-DB4JluX5.js";import{t as l}from"./password-input-bor7e4TM.js";import"./eye-Ctrln70x.js";import{_ as u,a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as b,o as x,s as S,t as C,u as w,v as T}from"./trust-indicator-D4tEs4Dr.js";import"./x-4CC8aqOW.js";import"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import"./separator-Cla0V581.js";import{n as E}from"./auth-provider-rkzBVtYX.js";import"./config-ChcA_Pkv.js";import{t as D}from"./input-V1lM1yoz.js";import"./createReactComponent-C2TSpqC7.js";import{n as O,r as k,t as A}from"./social-providers-Bz7f1_yd.js";var j=c(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),M=e(),N=t(),P=n(function(){let{t:e}=s(),t=x(),{client:n,features:c}=E(),P=i(),[F]=r(),[I,L]=(0,M.useState)(!1),[R,z]=(0,M.useState)(null),[B,V]=(0,M.useState)(null),H=(0,M.useRef)(null),U=k(F.get(`returnTo`),o(`/home`)),W=c.socialProviders&&Object.values(c.socialProviders).some(e=>e),G=!!c.emailAndPassword,K=T({resolver:u(y({name:g().optional(),email:g().email(e(`auth.signup.errors.emailInvalid`)),password:g().min(1,e(`auth.signup.errors.passwordRequired`)).min(8,e(`auth.signup.errors.passwordMinLength`)),confirmPassword:g().min(1,e(`auth.signup.errors.passwordRequired`))}).refine(e=>e.password===e.confirmPassword,{message:e(`auth.signup.errors.passwordMismatch`),path:[`confirmPassword`]})),defaultValues:{name:``,email:``,password:``,confirmPassword:``}}),q=async t=>{try{if(L(!0),z(null),!B){z(e(`auth.signup.errors.captchaRequired`));return}let r=await n.signUp.email({email:t.email,password:t.password,name:t.name||``,callbackURL:U,fetchOptions:{headers:{"x-captcha-response":B||``}}});if(r.error){z(e(`auth.errors.${r.error.code}`,e(`auth.signup.errors.signupFailed`))),V(null),H.current?.reset();return}P(U)}catch(t){z(t instanceof Error?t.message:e(`auth.signup.errors.networkError`)),V(null),H.current?.reset()}finally{L(!1)}};return(0,N.jsxs)(d,{children:[(0,N.jsx)(d.Header,{title:e(`auth.signup.title`),description:e(`auth.signup.description`)}),(0,N.jsx)(d.Content,{children:(0,N.jsxs)(`div`,{className:`space-y-4`,children:[W&&(0,N.jsx)(A,{mode:`signup`,callbackURL:U,onError:e=>z(e.message)}),W&&G&&(0,N.jsx)(O,{text:e(`auth.signup.divider`)}),G&&(0,N.jsx)(S,{...K,children:(0,N.jsxs)(`form`,{onSubmit:K.handleSubmit(q),className:`space-y-4`,noValidate:!0,children:[(0,N.jsx)(_,{error:R}),(0,N.jsx)(v,{control:K.control,name:`name`,render:({field:t})=>(0,N.jsxs)(w,{children:[(0,N.jsx)(p,{children:e(`auth.signup.name.label`)}),(0,N.jsx)(f,{children:(0,N.jsx)(D,{...t,type:`text`,placeholder:e(`auth.signup.name.placeholder`),autoComplete:`name`,disabled:I})}),(0,N.jsx)(m,{})]})}),(0,N.jsx)(v,{control:K.control,name:`email`,render:({field:t})=>(0,N.jsxs)(w,{children:[(0,N.jsx)(p,{children:e(`auth.signup.email.label`)}),(0,N.jsx)(f,{children:(0,N.jsx)(D,{...t,type:`email`,placeholder:e(`auth.signup.email.placeholder`),autoComplete:`email`,disabled:I})}),(0,N.jsx)(m,{})]})}),(0,N.jsx)(v,{control:K.control,name:`password`,render:({field:t})=>(0,N.jsxs)(w,{children:[(0,N.jsx)(p,{children:e(`auth.signup.password.label`)}),(0,N.jsx)(f,{children:(0,N.jsx)(l,{...t,placeholder:e(`auth.signup.password.placeholder`),autoComplete:`new-password`,disabled:I,showStrength:!0})}),(0,N.jsx)(m,{})]})}),(0,N.jsx)(v,{control:K.control,name:`confirmPassword`,render:({field:t})=>(0,N.jsxs)(w,{children:[(0,N.jsx)(p,{children:e(`auth.signup.confirmPassword.label`)}),(0,N.jsx)(f,{children:(0,N.jsx)(l,{...t,placeholder:e(`auth.signup.confirmPassword.placeholder`),autoComplete:`new-password`,disabled:I})}),(0,N.jsx)(m,{})]})}),(0,N.jsx)(h,{ref:H,onError:()=>{z(e(`auth.signup.errors.captchaFailed`)),V(null)},onExpire:()=>V(null),onSuccess:e=>V(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,N.jsx)(b,{label:e(`auth.signup.submit`),isLoading:I,disabled:!B})]})})]})}),(0,N.jsxs)(d.Footer,{children:[G&&(0,N.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,N.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(`auth.signup.hasAccount`),` `]}),(0,N.jsx)(a,{to:o(`/login`),className:`text-primary hover:underline transition-colors duration-200 font-medium`,children:e(`auth.signup.login`)})]}),(0,N.jsx)(C,{icon:j,label:e(`auth.secureSignup`)})]})]})});export{P as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(){let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(`div`,{children:`Notifications`}),e[0]=t):t=e[0],t});export{a as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./react-dom-Bhi-1tDD.js";import{t as i}from"./compiler-runtime-Co9svCia.js";import{a,n as o,o as s}from"./dist-BWnI-4xl.js";import{t as c}from"./check-D5D2EGI4.js";import{t as l}from"./utils-InBzhUf_.js";import{t as u}from"./dist-B6TkSbxV.js";import{a as d,i as f,n as p,r as m,s as h,t as g}from"./dist-BNO39Rfs.js";import{a as _,n as v,r as y,t as b}from"./dist-DhfcebhF.js";import{n as x,t as S}from"./dist-DKtC0FSi.js";import{a as C,c as w,i as T,n as E,o as D,r as O,s as k,t as A}from"./es2015-BJguufLZ.js";import{t as j}from"./dist-CA21wN5I.js";var M=s(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),N=s(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);function P(e,[t,n]){return Math.min(n,Math.max(t,e))}var F=e(t(),1),I=e(r(),1),L=n(),R=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ee=[` `,`Enter`],z=`Select`,[B,V,H]=x(z),[U,W]=_(z,[H,d]),G=d(),[te,K]=U(z),[ne,re]=U(z),ie=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:p,required:m,form:h}=e,g=G(t),[_,v]=F.useState(null),[y,x]=F.useState(null),[C,T]=F.useState(!1),E=S(l),[D,O]=b({prop:r,defaultProp:i??!1,onChange:a,caller:z}),[k,A]=b({prop:o,defaultProp:s,onChange:c,caller:z}),j=F.useRef(null),M=_?h||!!_.closest(`form`):!0,[N,P]=F.useState(new Set),I=Array.from(N).map(e=>e.props.value).join(`;`);return(0,L.jsx)(f,{...g,children:(0,L.jsxs)(te,{required:m,scope:t,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:C,onValueNodeHasChildrenChange:T,contentId:w(),value:k,onValueChange:A,open:D,onOpenChange:O,dir:E,triggerPointerDownPosRef:j,disabled:p,children:[(0,L.jsx)(B.Provider,{scope:t,children:(0,L.jsx)(ne,{scope:e.__scopeSelect,onNativeOptionAdd:F.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:F.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),M?(0,L.jsxs)(qe,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:d,value:k,onChange:e=>A(e.target.value),disabled:p,form:h,children:[k===void 0?(0,L.jsx)(`option`,{value:``}):null,Array.from(N)]},I):null]})})};ie.displayName=z;var q=`SelectTrigger`,ae=F.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,o=G(n),s=K(q,n),c=s.disabled||r,l=a(t,s.onTriggerChange),d=V(n),f=F.useRef(`touch`),[p,m,h]=Ye(e=>{let t=d().filter(e=>!e.disabled),n=Xe(t,e,t.find(e=>e.value===s.value));n!==void 0&&s.onValueChange(n.value)}),_=e=>{c||(s.onOpenChange(!0),h()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,L.jsx)(g,{asChild:!0,...o,children:(0,L.jsx)(u.button,{type:`button`,role:`combobox`,"aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":`none`,dir:s.dir,"data-state":s.open?`open`:`closed`,disabled:c,"data-disabled":c?``:void 0,"data-placeholder":Je(s.value)?``:void 0,...i,ref:l,onClick:y(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&_(e)}),onPointerDown:y(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:y(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&R.includes(e.key)&&(_(),e.preventDefault())})})})});ae.displayName=q;var oe=`SelectValue`,se=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:o,placeholder:s=``,...c}=e,l=K(oe,n),{onValueNodeHasChildrenChange:d}=l,f=o!==void 0,p=a(t,l.onValueNodeChange);return v(()=>{d(f)},[d,f]),(0,L.jsx)(u.span,{...c,ref:p,style:{pointerEvents:`none`},children:Je(l.value)?(0,L.jsx)(L.Fragment,{children:s}):o})});se.displayName=oe;var ce=`SelectIcon`,le=F.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,L.jsx)(u.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});le.displayName=ce;var ue=`SelectPortal`,de=e=>(0,L.jsx)(T,{asChild:!0,...e});de.displayName=ue;var J=`SelectContent`,fe=F.forwardRef((e,t)=>{let n=K(J,e.__scopeSelect),[r,i]=F.useState();if(v(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?I.createPortal((0,L.jsx)(pe,{scope:e.__scopeSelect,children:(0,L.jsx)(B.Slot,{scope:e.__scopeSelect,children:(0,L.jsx)(`div`,{children:e.children})})}),t):null}return(0,L.jsx)(ge,{...e,ref:t})});fe.displayName=J;var Y=10,[pe,X]=U(J),me=`SelectContentImpl`,he=o(`SelectContent.RemoveScroll`),ge=F.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,b=K(J,n),[x,S]=F.useState(null),[w,T]=F.useState(null),k=a(t,e=>S(e)),[j,M]=F.useState(null),[N,P]=F.useState(null),I=V(n),[R,ee]=F.useState(!1),z=F.useRef(!1);F.useEffect(()=>{if(x)return A(x)},[x]),O();let B=F.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&w&&(w.scrollTop=0),n===r&&w&&(w.scrollTop=w.scrollHeight),n?.focus(),document.activeElement!==i))return},[I,w]),H=F.useCallback(()=>B([j,x]),[B,j,x]);F.useEffect(()=>{R&&H()},[R,H]);let{onOpenChange:U,triggerPointerDownPosRef:W}=b;F.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||U(!1),document.removeEventListener(`pointermove`,t),W.current=null};return W.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,U,W]),F.useEffect(()=>{let e=()=>U(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[U]);let[G,te]=Ye(e=>{let t=I().filter(e=>!e.disabled),n=Xe(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=F.useCallback((e,t,n)=>{let r=!z.current&&!n;(b.value!==void 0&&b.value===t||r)&&(M(e),r&&(z.current=!0))},[b.value]),re=F.useCallback(()=>x?.focus(),[x]),ie=F.useCallback((e,t,n)=>{let r=!z.current&&!n;(b.value!==void 0&&b.value===t||r)&&P(e)},[b.value]),q=r===`popper`?be:ve,ae=q===be?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,L.jsx)(pe,{scope:n,content:x,viewport:w,onViewportChange:T,itemRefCallback:ne,selectedItem:j,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:H,selectedItemText:N,position:r,isPositioned:R,searchRef:G,children:(0,L.jsx)(E,{as:he,allowPinchZoom:!0,children:(0,L.jsx)(C,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:y(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,L.jsx)(D,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,L.jsx)(q,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...ae,onPlaced:()=>ee(!0),ref:k,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:y(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});ge.displayName=me;var _e=`SelectItemAlignedPosition`,ve=F.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,o=K(J,n),s=X(J,n),[c,l]=F.useState(null),[d,f]=F.useState(null),p=a(t,e=>f(e)),m=V(n),h=F.useRef(!1),g=F.useRef(!0),{viewport:_,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,S=F.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&_&&y&&b){let e=o.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Y,d=P(a,[Y,Math.max(Y,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Y,d=P(a,[Y,Math.max(Y,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=m(),s=window.innerHeight-Y*2,l=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),v=parseInt(u.paddingBottom,10),x=f+p+l+v+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Y,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=a.length>0&&y===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=a.length>0&&y===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}c.style.margin=`${Y}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,o.trigger,o.valueNode,c,d,_,y,b,o.dir,r]);v(()=>S(),[S]);let[C,w]=F.useState();return v(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,L.jsx)(xe,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:F.useCallback(e=>{e&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]),children:(0,L.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,L.jsx)(u.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});ve.displayName=_e;var ye=`SelectPopperPosition`,be=F.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Y,...a}=e,o=G(n);return(0,L.jsx)(m,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});be.displayName=ye;var[xe,Se]=U(J,{}),Ce=`SelectViewport`,we=F.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,o=X(Ce,n),s=Se(Ce,n),c=a(t,o.onViewportChange),l=F.useRef(0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,L.jsx)(B.Slot,{scope:n,children:(0,L.jsx)(u.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:c,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:y(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(l.current-t.scrollTop);if(e>0){let r=window.innerHeight-Y*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}l.current=t.scrollTop})})})]})});we.displayName=Ce;var Te=`SelectGroup`,[Ee,De]=U(Te),Oe=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=w();return(0,L.jsx)(Ee,{scope:n,id:i,children:(0,L.jsx)(u.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Oe.displayName=Te;var ke=`SelectLabel`,Ae=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=De(ke,n);return(0,L.jsx)(u.div,{id:i.id,...r,ref:t})});Ae.displayName=ke;var Z=`SelectItem`,[je,Me]=U(Z),Ne=F.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,c=K(Z,n),l=X(Z,n),d=c.value===r,[f,p]=F.useState(o??``),[m,h]=F.useState(!1),g=a(t,e=>l.itemRefCallback?.(e,r,i)),_=w(),v=F.useRef(`touch`),b=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,L.jsx)(je,{scope:n,value:r,disabled:i,textId:_,isSelected:d,onItemTextChange:F.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,L.jsx)(B.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:(0,L.jsx)(u.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:y(s.onFocus,()=>h(!0)),onBlur:y(s.onBlur,()=>h(!1)),onClick:y(s.onClick,()=>{v.current!==`mouse`&&b()}),onPointerUp:y(s.onPointerUp,()=>{v.current===`mouse`&&b()}),onPointerDown:y(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:y(s.onPointerMove,e=>{v.current=e.pointerType,i?l.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:y(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:y(s.onKeyDown,e=>{l.searchRef?.current!==``&&e.key===` `||(ee.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})});Ne.displayName=Z;var Q=`SelectItemText`,Pe=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...o}=e,s=K(Q,n),c=X(Q,n),l=Me(Q,n),d=re(Q,n),[f,p]=F.useState(null),m=a(t,e=>p(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=f?.textContent,g=F.useMemo(()=>(0,L.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:y}=d;return v(()=>(_(g),()=>y(g)),[_,y,g]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(u.span,{id:l.textId,...o,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?I.createPortal(o.children,s.valueNode):null]})});Pe.displayName=Q;var Fe=`SelectItemIndicator`,Ie=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Me(Fe,n).isSelected?(0,L.jsx)(u.span,{"aria-hidden":!0,...r,ref:t}):null});Ie.displayName=Fe;var Le=`SelectScrollUpButton`,Re=F.forwardRef((e,t)=>{let n=X(Le,e.__scopeSelect),r=Se(Le,e.__scopeSelect),[i,o]=F.useState(!1),s=a(t,r.onScrollButtonChange);return v(()=>{if(n.viewport&&n.isPositioned){let e=function(){o(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(Ve,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Re.displayName=Le;var ze=`SelectScrollDownButton`,Be=F.forwardRef((e,t)=>{let n=X(ze,e.__scopeSelect),r=Se(ze,e.__scopeSelect),[i,o]=F.useState(!1),s=a(t,r.onScrollButtonChange);return v(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(Ve,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Be.displayName=ze;var Ve=F.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=X(`SelectScrollButton`,n),o=F.useRef(null),s=V(n),c=F.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return F.useEffect(()=>()=>c(),[c]),v(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,L.jsx)(u.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:y(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:y(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:y(i.onPointerLeave,()=>{c()})})}),He=`SelectSeparator`,Ue=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,L.jsx)(u.div,{"aria-hidden":!0,...r,ref:t})});Ue.displayName=He;var We=`SelectArrow`,Ge=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=G(n),a=K(We,n),o=X(We,n);return a.open&&o.position===`popper`?(0,L.jsx)(p,{...i,...r,ref:t}):null});Ge.displayName=We;var Ke=`SelectBubbleInput`,qe=F.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=F.useRef(null),o=a(r,i),s=j(t);return F.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(s!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[s,t]),(0,L.jsx)(u.select,{...n,style:{...h,...n.style},ref:o,defaultValue:t})});qe.displayName=Ke;function Je(e){return e===``||e===void 0}function Ye(e){let t=k(e),n=F.useRef(``),r=F.useRef(0),i=F.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=F.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return F.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Xe(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ze(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ze(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qe=ie,$e=ae,et=se,tt=le,nt=de,rt=fe,it=we,at=Ne,ot=Pe,st=Ie,ct=Re,lt=Be,$=i();function ut(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(Qe,{"data-slot":`select`,...n}),t[2]=n,t[3]=r),r}function dt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(et,{"data-slot":`select-value`,...n}),t[2]=n,t[3]=r),r}function ft(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,size:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===r?s=t[6]:(s=l(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,L.jsx)(tt,{asChild:!0,children:(0,L.jsx)(M,{className:`size-4 opacity-50`})}),t[7]=c):c=t[7];let u;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(u=(0,L.jsxs)($e,{"data-slot":`select-trigger`,"data-size":o,className:s,...i,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=u):u=t[12],u}function pt(e){let t=(0,$.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,position:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`popper`:a,s=o===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,c;t[5]!==r||t[6]!==s?(c=l(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,L.jsx)(ht,{}),t[8]=u):u=t[8];let d=o===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`,f;t[9]===d?f=t[10]:(f=l(`p-1`,d),t[9]=d,t[10]=f);let p;t[11]!==n||t[12]!==f?(p=(0,L.jsx)(it,{className:f,children:n}),t[11]=n,t[12]=f,t[13]=p):p=t[13];let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,L.jsx)(gt,{}),t[14]=m):m=t[14];let h;return t[15]!==o||t[16]!==i||t[17]!==c||t[18]!==p?(h=(0,L.jsx)(nt,{children:(0,L.jsxs)(rt,{"data-slot":`select-content`,className:c,position:o,...i,children:[u,p,m]})}),t[15]=o,t[16]=i,t[17]=c,t[18]=p,t[19]=h):h=t[19],h}function mt(e){let t=(0,$.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=l(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,L.jsx)(st,{children:(0,L.jsx)(c,{className:`size-4`})})}),t[6]=o):o=t[6];let s;t[7]===n?s=t[8]:(s=(0,L.jsx)(ot,{children:n}),t[7]=n,t[8]=s);let u;return t[9]!==i||t[10]!==a||t[11]!==s?(u=(0,L.jsxs)(at,{"data-slot":`select-item`,className:a,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=u):u=t[12],u}function ht(e){let t=(0,$.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,L.jsx)(N,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,L.jsx)(ct,{"data-slot":`select-scroll-up-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function gt(e){let t=(0,$.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,L.jsx)(M,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,L.jsx)(lt,{"data-slot":`select-scroll-down-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}export{dt as a,ft as i,pt as n,mt as r,ut as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./compiler-runtime-Co9svCia.js";import{t as i}from"./utils-InBzhUf_.js";import{t as a}from"./dist-B6TkSbxV.js";var o=e(t(),1),s=n(),c=`Separator`,l=`horizontal`,u=[`horizontal`,`vertical`],d=o.forwardRef((e,t)=>{let{decorative:n,orientation:r=l,...i}=e,o=f(r)?r:l,c=o===`vertical`?o:void 0,u=n?{role:`none`}:{"aria-orientation":c,role:`separator`};return(0,s.jsx)(a.div,{"data-orientation":o,...u,...i,ref:t})});d.displayName=c;function f(e){return u.includes(e)}var p=d,m=r();function h(e){let t=(0,m.c)(12),n,r,a,o;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4]):({className:n,orientation:a,decorative:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o);let c=a===void 0?`horizontal`:a,l=o===void 0?!0:o,u;t[5]===n?u=t[6]:(u=i(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==c||t[9]!==r||t[10]!==u?(d=(0,s.jsx)(p,{"data-slot":`separator`,decorative:l,orientation:c,className:u,...r}),t[7]=l,t[8]=c,t[9]=r,t[10]=u,t[11]=d):d=t[11],d}export{h as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";var n=e((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),r=e(((e,t)=>{t.exports=n()}));export{r as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./compiler-runtime-Co9svCia.js";import{o as i,t as a}from"./dist-BWnI-4xl.js";import{t as o}from"./x-4CC8aqOW.js";import{t as s}from"./utils-InBzhUf_.js";import{t as c}from"./dist-CBNvQRbZ.js";import{t as l}from"./button-DtZhoqpk.js";import{a as u,i as d,n as f,o as p,r as m,s as h,t as g}from"./dist-Yn6lj8QC.js";import{t as _}from"./separator-Cla0V581.js";import{i as v,n as y,r as b,t as x}from"./tooltip-BeDraHQn.js";var S=i(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),C=r(),w=n();function T(e){let t=(0,C.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,w.jsx)(p,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function E(e){let t=(0,C.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,w.jsx)(u,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function D(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(d,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function O(e){let t=(0,C.c)(17),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,side:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let c=a===void 0?`right`:a,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,w.jsx)(D,{}),t[5]=l):l=t[5];let u=c===`right`&&`data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,d=c===`left`&&`data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,p=c===`top`&&`data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,m=c===`bottom`&&`data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t`,h;t[6]!==r||t[7]!==u||t[8]!==d||t[9]!==p||t[10]!==m?(h=s(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,u,d,p,m,r),t[6]=r,t[7]=u,t[8]=d,t[9]=p,t[10]=m,t[11]=h):h=t[11];let _;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,w.jsxs)(g,{className:`ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none`,children:[(0,w.jsx)(o,{className:`size-4`}),(0,w.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[12]=_):_=t[12];let v;return t[13]!==n||t[14]!==i||t[15]!==h?(v=(0,w.jsxs)(E,{children:[l,(0,w.jsxs)(f,{"data-slot":`sheet-content`,className:h,...i,children:[n,_]})]}),t[13]=n,t[14]=i,t[15]=h,t[16]=v):v=t[16],v}function k(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex flex-col gap-1.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function A(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`text-foreground font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(h,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function j(e){let t=(0,C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(m,{"data-slot":`sheet-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}r();var M=r(),N=e(t(),1),P=768;function F(){let e=(0,M.c)(2),[t,n]=N.useState(void 0),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(max-width: ${P-1}px)`),t=()=>{n(window.innerWidth<P)};return e.addEventListener(`change`,t),n(window.innerWidth<P),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),N.useEffect(r,i),!!t}var I=r(),L=`sidebar_state`,R=3600*24*7,z=`3rem`,B=`b`,V=N.createContext(null);function H(){let e=N.useContext(V);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function U(e){let t=(0,I.c)(39),n,r,i,a,o,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],l=t[7]):({defaultOpen:l,open:i,onOpenChange:o,className:r,style:c,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=l);let u=l===void 0?!0:l,d=F(),[f,p]=N.useState(!1),[m,h]=N.useState(u),[g,_]=N.useState(!1),[v,y]=N.useState(),x=i??m,S;t[8]!==x||t[9]!==o?(S=e=>{let t=typeof e==`function`?e(x):e;o?o(t):h(t),document.cookie=`${L}=${t}; path=/; max-age=${R}`},t[8]=x,t[9]=o,t[10]=S):S=t[10];let C=S,T;t[11]!==d||t[12]!==C?(T=()=>d?p(G):C(W),t[11]=d,t[12]=C,t[13]=T):T=t[13];let E=T,D,O;t[14]===E?(D=t[15],O=t[16]):(D=()=>{let e=e=>{e.key===B&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),E())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},O=[E],t[14]=E,t[15]=D,t[16]=O),N.useEffect(D,O);let k=x?`expanded`:`collapsed`,A;t[17]!==g||t[18]!==d||t[19]!==x||t[20]!==f||t[21]!==v||t[22]!==C||t[23]!==k||t[24]!==E?(A={state:k,open:x,setOpen:C,isMobile:d,openMobile:f,setOpenMobile:p,toggleSidebar:E,hasSecondaryContent:g,setHasSecondaryContent:_,secondaryContent:v,setSecondaryContent:y},t[17]=g,t[18]=d,t[19]=x,t[20]=f,t[21]=v,t[22]=C,t[23]=k,t[24]=E,t[25]=A):A=t[25];let j=A,M=g?`calc(var(--spacing) * 72)`:`calc(var(--spacing) * 14)`,P;t[26]!==c||t[27]!==M?(P={"--sidebar-width":M,"--sidebar-width-icon":z,...c},t[26]=c,t[27]=M,t[28]=P):P=t[28];let H=P,U;t[29]===r?U=t[30]:(U=s(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,r),t[29]=r,t[30]=U);let K;t[31]!==n||t[32]!==a||t[33]!==U||t[34]!==H?(K=(0,w.jsx)(b,{delayDuration:0,children:(0,w.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:H,className:U,...a,children:n})}),t[31]=n,t[32]=a,t[33]=U,t[34]=H,t[35]=K):K=t[35];let q;return t[36]!==j||t[37]!==K?(q=(0,w.jsx)(V.Provider,{value:j,children:K}),t[36]=j,t[37]=K,t[38]=q):q=t[38],q}function W(e){return!e}function G(e){return!e}function K(e){let t=(0,I.c)(51),n,r,i,a,o,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6]):({side:a,variant:o,collapsible:c,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c);let l=a===void 0?`left`:a,u=o===void 0?`sidebar`:o,d=c===void 0?`offcanvas`:c,{isMobile:f,state:p,openMobile:m,setOpenMobile:h,hasSecondaryContent:g}=H();if(d===`none`){let e;t[7]===r?e=t[8]:(e=s(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar`,className:e,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(f){let e=g?`calc(var(--spacing) * 72)`:`calc(var(--sidebar-width-icon) + 1px)`,r=g?`flex-row`:`flex-col`,a;t[13]===e?a=t[14]:(a={"--sidebar-width":e},t[13]=e,t[14]=a);let o=a,c;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,w.jsxs)(k,{className:`sr-only`,children:[(0,w.jsx)(A,{children:`Sidebar`}),(0,w.jsx)(j,{children:`Displays the mobile sidebar.`})]}),t[15]=c):c=t[15];let u;t[16]===r?u=t[17]:(u=s(`flex h-full w-full`,r),t[16]=r,t[17]=u);let d;t[18]!==n||t[19]!==u?(d=(0,w.jsx)(`div`,{className:u,children:n}),t[18]=n,t[19]=u,t[20]=d):d=t[20];let f;t[21]!==l||t[22]!==o||t[23]!==d?(f=(0,w.jsxs)(O,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:o,side:l,children:[c,d]}),t[21]=l,t[22]=o,t[23]=d,t[24]=f):f=t[24];let p;return t[25]!==m||t[26]!==i||t[27]!==h||t[28]!==f?(p=(0,w.jsx)(T,{open:m,onOpenChange:h,...i,children:f}),t[25]=m,t[26]=i,t[27]=h,t[28]=f,t[29]=p):p=t[29],p}let _=p===`collapsed`?d:``,v=u===`floating`||u===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,y;t[30]===v?y=t[31]:(y=s(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,v),t[30]=v,t[31]=y);let b;t[32]===y?b=t[33]:(b=(0,w.jsx)(`div`,{"data-slot":`sidebar-gap`,className:y}),t[32]=y,t[33]=b);let x=l===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,S=u===`floating`||u===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,C;t[34]!==r||t[35]!==x||t[36]!==S?(C=s(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right] duration-200 ease-linear md:flex`,x,S,r),t[34]=r,t[35]=x,t[36]=S,t[37]=C):C=t[37];let E;t[38]===n?E=t[39]:(E=(0,w.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children:n}),t[38]=n,t[39]=E);let D;t[40]!==i||t[41]!==C||t[42]!==E?(D=(0,w.jsx)(`div`,{"data-slot":`sidebar-container`,className:C,...i,children:E}),t[40]=i,t[41]=C,t[42]=E,t[43]=D):D=t[43];let M;return t[44]!==l||t[45]!==p||t[46]!==D||t[47]!==_||t[48]!==b||t[49]!==u?(M=(0,w.jsxs)(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":p,"data-collapsible":_,"data-variant":u,"data-side":l,"data-slot":`sidebar`,children:[b,D]}),t[44]=l,t[45]=p,t[46]=D,t[47]=_,t[48]=b,t[49]=u,t[50]=M):M=t[50],M}function q(e){let t=(0,I.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=H(),o;t[4]===n?o=t[5]:(o=s(`size-7`,n),t[4]=n,t[5]=o);let c;t[6]!==r||t[7]!==a?(c=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=c):c=t[8];let u,d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,w.jsx)(S,{}),d=(0,w.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=u,t[10]=d):(u=t[9],d=t[10]);let f;return t[11]!==i||t[12]!==o||t[13]!==c?(f=(0,w.jsxs)(l,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:o,onClick:c,...i,children:[u,d]}),t[11]=i,t[12]=o,t[13]=c,t[14]=f):f=t[14],f}function J(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`bg-background relative flex w-full flex-1 flex-col`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`main`,{"data-slot":`sidebar-inset`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Y(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function X(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Z(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`bg-sidebar-border mx-2 w-auto`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(_,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Q(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ee(e){let t=(0,I.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=i!==void 0&&i?a:`div`,c;t[4]===n?c=t[5]:(c=s(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,n),t[4]=n,t[5]=c);let l;return t[6]!==o||t[7]!==r||t[8]!==c?(l=(0,w.jsx)(o,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:c,...r}),t[6]=o,t[7]=r,t[8]=c,t[9]=l):l=t[9],l}function te(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ne(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`flex w-full min-w-0 flex-col gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function re(e){let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ie=c(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function ae(e){let t=(0,I.c)(28),n,r,i,o,c,l,u;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],c=t[5],l=t[6],u=t[7]):({asChild:i,isActive:o,variant:c,size:l,tooltip:u,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=c,t[6]=l,t[7]=u);let d=i===void 0?!1:i,f=o===void 0?!1:o,p=c===void 0?`default`:c,m=l===void 0?`default`:l,h=d?a:`button`,{isMobile:g,state:_}=H(),b;t[8]!==n||t[9]!==m||t[10]!==p?(b=s(ie({variant:p,size:m}),n),t[8]=n,t[9]=m,t[10]=p,t[11]=b):b=t[11];let S;t[12]!==h||t[13]!==f||t[14]!==r||t[15]!==m||t[16]!==b?(S=(0,w.jsx)(h,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":m,"data-active":f,className:b,...r}),t[12]=h,t[13]=f,t[14]=r,t[15]=m,t[16]=b,t[17]=S):S=t[17];let C=S;if(!u)return C;if(typeof u==`string`){let e;t[18]===u?e=t[19]:(e={children:u},t[18]=u,t[19]=e),u=e}let T;t[20]===C?T=t[21]:(T=(0,w.jsx)(v,{asChild:!0,children:C}),t[20]=C,t[21]=T);let E=_!==`collapsed`||g,D;t[22]!==E||t[23]!==u?(D=(0,w.jsx)(y,{side:`right`,align:`center`,hidden:E,...u}),t[22]=E,t[23]=u,t[24]=D):D=t[24];let O;return t[25]!==T||t[26]!==D?(O=(0,w.jsxs)(x,{children:[T,D]}),t[25]=T,t[26]=D,t[27]=O):O=t[27],O}export{te as a,J as c,re as d,U as f,H as h,$ as i,ne as l,q as m,Q as n,ee as o,Z as p,X as r,Y as s,K as t,ae as u};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{t}from"./compiler-runtime-Co9svCia.js";import{m as n}from"./sidebar-CqrdL512.js";import{t as r}from"./separator-Cla0V581.js";var i=t(),a=e();function o(){let e=(0,i.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`header`,{className:`flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)`,children:(0,a.jsxs)(`div`,{className:`flex w-full items-center gap-1 px-2 md:px-4`,children:[(0,a.jsx)(n,{className:`md:hidden cursor-pointer`}),(0,a.jsx)(r,{orientation:`vertical`,className:`md:hidden ml-1 mr-2.5 data-[orientation=vertical]:h-4`}),(0,a.jsx)(`h1`,{className:`text-base font-medium`,children:`Platform`}),(0,a.jsx)(`div`,{className:`ml-auto flex items-center gap-2`})]})}),e[0]=t):t=e[0],t}export{o as t};
@@ -0,0 +1 @@
1
+ import"./jsx-runtime-SCjaiuzT.js";import"./react-dom-Bhi-1tDD.js";import"./compiler-runtime-Co9svCia.js";import"./dist-BWnI-4xl.js";import"./sidebar-CqrdL512.js";import"./x-4CC8aqOW.js";import"./utils-InBzhUf_.js";import"./dist-CBNvQRbZ.js";import"./button-DtZhoqpk.js";import"./dist-B6TkSbxV.js";import"./dist-BNO39Rfs.js";import"./dist-DhfcebhF.js";import"./dist-VqaKdvZu.js";import"./es2015-BJguufLZ.js";import"./dist-Yn6lj8QC.js";import"./dist-CYRPrwOb.js";import"./separator-Cla0V581.js";import"./tooltip-BeDraHQn.js";import"./input-V1lM1yoz.js";import"./site-header-CZO3qBhf.js";
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./jsx-runtime-SCjaiuzT.js";import{k as n}from"./chunk-UIGDSWPH-DeiamgQc.js";import{r}from"./chunk-JG3XND5A-BetDbdG0.js";import{t as i}from"./useTranslation-Bz7VuQ7j.js";import{t as a}from"./compiler-runtime-Co9svCia.js";import{r as o}from"./trust-indicator-D4tEs4Dr.js";import{t as s}from"./button-DtZhoqpk.js";import{t as c}from"./separator-Cla0V581.js";import{n as l}from"./auth-provider-rkzBVtYX.js";import{t as u}from"./createReactComponent-C2TSpqC7.js";var d=u(`outline`,`brand-apple`,`BrandApple`,[[`path`,{d:`M8.286 7.008c-3.216 0 -4.286 3.23 -4.286 5.92c0 3.229 2.143 8.072 4.286 8.072c1.165 -.05 1.799 -.538 3.214 -.538c1.406 0 1.607 .538 3.214 .538s4.286 -3.229 4.286 -5.381c-.03 -.011 -2.649 -.434 -2.679 -3.23c-.02 -2.335 2.589 -3.179 2.679 -3.228c-1.096 -1.606 -3.162 -2.113 -3.75 -2.153c-1.535 -.12 -3.032 1.077 -3.75 1.077c-.729 0 -2.036 -1.077 -3.214 -1.077z`,key:`svg-0`}],[`path`,{d:`M12 4a2 2 0 0 0 2 -2a2 2 0 0 0 -2 2`,key:`svg-1`}]]),f=u(`outline`,`brand-discord`,`BrandDiscord`,[[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-0`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3`,key:`svg-2`}],[`path`,{d:`M7 16.5c3.5 1 6.5 1 10 0`,key:`svg-3`}]]),p=u(`outline`,`brand-dropbox`,`BrandDropbox`,[[`path`,{d:`M7.5 10.625l-4.5 -2.813l4.5 -2.812l4.5 2.813m-4.5 2.812l4.5 -2.813m-4.5 2.813l-4.5 2.823l4.5 2.802m0 -5.625l4.5 2.823m0 -5.636l4.5 2.791l4.5 -2.812l-4.5 -2.791l-4.5 2.813zm-4.5 8.438l4.5 -2.802m-4.5 2.802v1.123l4.5 2.627l4.5 -2.627v-1.123m-4.5 -2.802l4.5 -2.823l4.5 2.823l-4.5 2.802m-4.5 -2.802l4.5 2.802`,key:`svg-0`}]]),m=u(`outline`,`brand-facebook`,`BrandFacebook`,[[`path`,{d:`M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3`,key:`svg-0`}]]),h=u(`outline`,`brand-github`,`BrandGithub`,[[`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`,key:`svg-0`}]]),g=u(`outline`,`brand-gitlab`,`BrandGitlab`,[[`path`,{d:`M21 14l-9 7l-9 -7l3 -11l3 7h6l3 -7z`,key:`svg-0`}]]),_=u(`outline`,`brand-google`,`BrandGoogle`,[[`path`,{d:`M20.945 11a9 9 0 1 1 -3.284 -5.997l-2.655 2.392a5.5 5.5 0 1 0 2.119 6.605h-4.125v-3h7.945z`,key:`svg-0`}]]),v=u(`outline`,`brand-linkedin`,`BrandLinkedin`,[[`path`,{d:`M8 11v5`,key:`svg-0`}],[`path`,{d:`M8 8v.01`,key:`svg-1`}],[`path`,{d:`M12 16v-5`,key:`svg-2`}],[`path`,{d:`M16 16v-3a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z`,key:`svg-4`}]]),y=u(`outline`,`brand-reddit`,`BrandReddit`,[[`path`,{d:`M12 8c2.648 0 5.028 .826 6.675 2.14a2.5 2.5 0 0 1 2.326 4.36c0 3.59 -4.03 6.5 -9 6.5c-4.875 0 -8.845 -2.8 -9 -6.294l-1 -.206a2.5 2.5 0 0 1 2.326 -4.36c1.646 -1.313 4.026 -2.14 6.674 -2.14z`,key:`svg-0`}],[`path`,{d:`M12 8l1 -5l6 1`,key:`svg-1`}],[`path`,{d:`M19 4m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`circle`,{cx:`9`,cy:`13`,r:`.5`,fill:`currentColor`,key:`svg-3`}],[`circle`,{cx:`15`,cy:`13`,r:`.5`,fill:`currentColor`,key:`svg-4`}],[`path`,{d:`M10 17c.667 .333 1.333 .5 2 .5s1.333 -.167 2 -.5`,key:`svg-5`}]]),b=u(`outline`,`brand-spotify`,`BrandSpotify`,[[`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M8 11.973c2.5 -1.473 5.5 -.973 7.5 .527`,key:`svg-1`}],[`path`,{d:`M9 15c1.5 -1 4 -1 5 .5`,key:`svg-2`}],[`path`,{d:`M7 9c2 -1 6 -2 10 .5`,key:`svg-3`}]]),x=u(`outline`,`brand-twitch`,`BrandTwitch`,[[`path`,{d:`M4 5v11a1 1 0 0 0 1 1h2v4l4 -4h5.584c.266 0 .52 -.105 .707 -.293l2.415 -2.414c.187 -.188 .293 -.442 .293 -.708v-8.585a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`,key:`svg-0`}],[`path`,{d:`M16 8l0 4`,key:`svg-1`}],[`path`,{d:`M12 8l0 4`,key:`svg-2`}]]),S=u(`outline`,`brand-windows`,`BrandWindows`,[[`path`,{d:`M17.8 20l-12 -1.5c-1 -.1 -1.8 -.9 -1.8 -1.9v-9.2c0 -1 .8 -1.8 1.8 -1.9l12 -1.5c1.2 -.1 2.2 .8 2.2 1.9v12.1c0 1.2 -1.1 2.1 -2.2 1.9z`,key:`svg-0`}],[`path`,{d:`M12 5l0 14`,key:`svg-1`}],[`path`,{d:`M4 12l16 0`,key:`svg-2`}]]),C=u(`outline`,`brand-x`,`BrandX`,[[`path`,{d:`M4 4l11.733 16h4.267l-11.733 -16z`,key:`svg-0`}],[`path`,{d:`M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772`,key:`svg-1`}]]);function w(e,t=`/home`){return e&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:t}var T=a(),E=t();function D(e){let t=(0,T.c)(3),{text:n}=e,r=n===void 0?`Or continue with email`:n,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,E.jsx)(c,{className:`w-full`})}),t[0]=i):i=t[0];let a;return t[1]===r?a=t[2]:(a=(0,E.jsxs)(`div`,{className:`relative`,children:[i,(0,E.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,E.jsx)(`span`,{className:`bg-card text-muted-foreground px-2`,children:r})})]}),t[1]=r,t[2]=a),a}var O=e();const k={google:{label:`Google`,icon:_,brandColor:`#4285F4`},github:{label:`GitHub`,icon:h,brandColor:`#181717`},apple:{label:`Apple`,icon:d,brandColor:`#000000`},microsoft:{label:`Microsoft`,icon:S,brandColor:`#00A4EF`},linkedin:{label:`LinkedIn`,icon:v,brandColor:`#0A66C2`},discord:{label:`Discord`,icon:f,brandColor:`#5865F2`},dropbox:{label:`Dropbox`,icon:p,brandColor:`#0061FF`},facebook:{label:`Facebook`,icon:m,brandColor:`#1877F2`},gitlab:{label:`GitLab`,icon:g,brandColor:`#FC6D26`},reddit:{label:`Reddit`,icon:y,brandColor:`#FF4500`},spotify:{label:`Spotify`,icon:b,brandColor:`#1DB954`},twitch:{label:`Twitch`,icon:x,brandColor:`#9146FF`},twitter:{label:`X (Twitter)`,icon:C,brandColor:`#000000`}};function A(e){return k[e]}function j(e){if(!e)return[];let t=Object.keys(e).filter(t=>e[t]),n=Object.keys(k);return t.sort((e,t)=>n.indexOf(e)-n.indexOf(t))}function M({mode:e,callbackURL:t,onError:a}){let{t:c}=i(),{client:u,features:d}=l();n();let[f,p]=(0,O.useState)(null),m=j(d.socialProviders);if(m.length===0)return null;let h=m.length>2,g=async e=>{try{p(e),await u.signIn.social({provider:e,callbackURL:t||r(`/home`)})}catch(e){p(null);let t=e instanceof Error?e:Error(`Authentication failed`);a?.(t)}};return h?(0,E.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:m.map(e=>{let t=A(e),n=t.icon,r=f===e;return(0,E.jsx)(s,{type:`button`,variant:`outline`,size:`lg`,disabled:!!f,onClick:()=>g(e),className:`aspect-square p-0`,"aria-label":c(`auth.social.continueWith`,{provider:t.label}),children:r?(0,E.jsx)(o,{className:`size-5`}):(0,E.jsx)(n,{className:`size-5`})},e)})}):(0,E.jsx)(`div`,{className:`flex flex-col gap-2`,children:m.map(e=>{let t=A(e),n=t.icon;return(0,E.jsxs)(s,{type:`button`,variant:`outline`,size:`lg`,disabled:!!f,onClick:()=>g(e),className:`w-full`,children:[f===e?(0,E.jsx)(o,{className:`size-5`}):(0,E.jsx)(n,{className:`size-5`}),c(`auth.social.continueWith`,{provider:t.label})]},e)})})}export{D as n,w as r,M as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{F as t}from"./chunk-UIGDSWPH-DeiamgQc.js";import{t as n}from"./compiler-runtime-Co9svCia.js";var r=n(),i=e(),a=t(function(e){let t=(0,r.c)(4),{loaderData:n}=e,{users:a}=n,s;t[0]===a?s=t[1]:(s=a.map(o),t[0]=a,t[1]=s);let c;return t[2]===s?c=t[3]:(c=(0,i.jsx)(`div`,{children:s}),t[2]=s,t[3]=c),c});function o(e){return(0,i.jsx)(`div`,{children:e.email},e.id)}export{a as default};
@@ -0,0 +1 @@
1
+ import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./compiler-runtime-Co9svCia.js";import{a as i,r as a}from"./dist-BWnI-4xl.js";import{t as o}from"./utils-InBzhUf_.js";import{t as s}from"./dist-B6TkSbxV.js";import{a as c,i as l,n as u,o as d,r as f,t as p}from"./dist-BNO39Rfs.js";import{a as m,r as h,t as g}from"./dist-DhfcebhF.js";import{t as _}from"./dist-VqaKdvZu.js";import{c as ee,i as v,o as y}from"./es2015-BJguufLZ.js";var b=e(t(),1),x=n(),[S,te]=m(`Tooltip`,[c]),C=c(),w=`TooltipProvider`,T=700,E=`tooltip.open`,[D,O]=S(w),k=e=>{let{__scopeTooltip:t,delayDuration:n=T,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(D,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};k.displayName=w;var A=`Tooltip`,[ne,j]=S(A),M=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=O(A,e.__scopeTooltip),u=C(t),[d,f]=b.useState(null),p=ee(),m=b.useRef(0),h=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,S]=g({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(E))):c.onClose(),a?.(e)},caller:A}),te=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),w=b.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,S(!0)},[S]),T=b.useCallback(()=>{window.clearTimeout(m.current),m.current=0,S(!1)},[S]),D=b.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,S(!0),m.current=0},_)},[_,S]);return b.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,x.jsx)(l,{...u,children:(0,x.jsx)(ne,{scope:t,contentId:p,open:y,stateAttribute:te,trigger:d,onTriggerChange:f,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?D():w()},[c.isOpenDelayedRef,D,w]),onTriggerLeave:b.useCallback(()=>{h?T():(window.clearTimeout(m.current),m.current=0)},[T,h]),onOpen:w,onClose:T,disableHoverableContent:h,children:n})})};M.displayName=A;var N=`TooltipTrigger`,P=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,a=j(N,n),o=O(N,n),c=C(n),l=i(t,b.useRef(null),a.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),f=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,x.jsx)(p,{asChild:!0,...c,children:(0,x.jsx)(s.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:h(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:h(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:h(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:h(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:h(e.onBlur,a.onClose),onClick:h(e.onClick,a.onClose)})})});P.displayName=N;var F=`TooltipPortal`,[I,L]=S(F,{forceMount:void 0}),R=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=j(F,t);return(0,x.jsx)(I,{scope:t,forceMount:n,children:(0,x.jsx)(_,{present:n||a.open,children:(0,x.jsx)(v,{asChild:!0,container:i,children:r})})})};R.displayName=F;var z=`TooltipContent`,B=b.forwardRef((e,t)=>{let n=L(z,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=j(z,e.__scopeTooltip);return(0,x.jsx)(_,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(G,{side:i,...a,ref:t}):(0,x.jsx)(V,{side:i,...a,ref:t})})}),V=b.forwardRef((e,t)=>{let n=j(z,e.__scopeTooltip),r=O(z,e.__scopeTooltip),a=b.useRef(null),o=i(t,a),[s,c]=b.useState(null),{trigger:l,onClose:u}=n,d=a.current,{onPointerInTransitChange:f}=r,p=b.useCallback(()=>{c(null),f(!1)},[f]),m=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Y(r,J(r,n.getBoundingClientRect())),a=X(t.getBoundingClientRect());c(ie([...i,...a])),f(!0)},[f]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&d){let e=e=>m(e,d),t=e=>m(e,l);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),b.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!re(n,s);r?p():i&&(p(),u())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,x.jsx)(G,{...e,ref:o})}),[H,U]=S(A,{isInside:!1}),W=a(`TooltipContent`),G=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=j(z,n),l=C(n),{onClose:u}=c;return b.useEffect(()=>(document.addEventListener(E,u),()=>document.removeEventListener(E,u)),[u]),b.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,x.jsx)(y,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,x.jsxs)(f,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,x.jsx)(W,{children:r}),(0,x.jsx)(H,{scope:n,isInside:!0,children:(0,x.jsx)(d,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});B.displayName=z;var K=`TooltipArrow`,q=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=C(n);return U(K,n).isInside?null:(0,x.jsx)(u,{...i,...r,ref:t})});q.displayName=K;function J(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Y(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function X(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function re(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ie(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),ae(t)}function ae(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oe=k,Z=M,se=P,ce=R,le=B,ue=q,Q=r();function $(e){let t=(0,Q.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,x.jsx)(oe,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function de(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)($,{children:(0,x.jsx)(Z,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function fe(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(se,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function pe(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=a===void 0?0:a,c;t[5]===r?c=t[6]:(c=o(`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,r),t[5]=r,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,x.jsx)(ue,{className:`bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`}),t[7]=l):l=t[7];let u;return t[8]!==n||t[9]!==i||t[10]!==s||t[11]!==c?(u=(0,x.jsx)(ce,{children:(0,x.jsxs)(le,{"data-slot":`tooltip-content`,sideOffset:s,className:c,...i,children:[n,l]})}),t[8]=n,t[9]=i,t[10]=s,t[11]=c,t[12]=u):u=t[12],u}export{fe as i,pe as n,$ as r,de as t};