adminizer 4.1.0-build.13 → 4.1.0-build.14

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 (131) hide show
  1. package/assets/{VanillaJSONEditor-BGC0iJ01.js → VanillaJSONEditor-D-Lx670g.js} +2 -2
  2. package/assets/add-BP_u3Tjl.js +1 -0
  3. package/assets/add-form-nffmiYTh.js +1 -0
  4. package/assets/add-group-D4vcHlm-.js +1 -0
  5. package/assets/{add-group-form-BUM07NJS.js → add-group-form-gNJW11-q.js} +1 -1
  6. package/assets/add-user-DWh3Nas0.js +1 -0
  7. package/assets/add-user-form-BJ0FsZYJ.js +1 -0
  8. package/assets/{app-BYldMVaW.css → app-C3OdwOHy.css} +1 -1
  9. package/assets/{app-layout-YPlKN2l5.js → app-layout-DYsRFUuP.js} +1 -1
  10. package/assets/{app-shell-D6Uf68EA.js → app-shell-Dd9Eknik.js} +1 -1
  11. package/assets/app-sidebar-BOmu6-Sl.js +1 -0
  12. package/assets/{app-sidebar-header-BTKq0Dr0.js → app-sidebar-header-CoXSzWxk.js} +1 -1
  13. package/assets/app.js +14 -14
  14. package/assets/{breadcrumbs-B4LOvzuL.js → breadcrumbs-BmAq4fHT.js} +1 -1
  15. package/assets/{button-CTOOfwvn.js → button-C9B_5Jf_.js} +1 -1
  16. package/assets/checkbox-Fg27sL_1.js +1 -0
  17. package/assets/{compiler-runtime-tM4jBQ-T.js → compiler-runtime-hB6dAw2d.js} +1 -1
  18. package/assets/dashboard-BOltB2Hq.css +1 -0
  19. package/assets/dashboard-Ddh74NBQ.js +3 -0
  20. package/assets/{date-picker-DdGpxs8q.js → date-picker-DI1cCO7K.js} +1 -1
  21. package/assets/{dropdown-menu-CsGmdVIn.js → dropdown-menu-Bhj17ENm.js} +1 -1
  22. package/assets/{field-renderer-Q3ajtfjk.js → field-renderer-DVHZF6HS.js} +3 -3
  23. package/assets/form-BgWdwvz1.js +1 -0
  24. package/assets/form-DgtErfln.js +1 -0
  25. package/assets/{geo-json-CFYMCghL.js → geo-json-BjiyTtMu.js} +1 -1
  26. package/assets/{handsontable-BCnjOpBr.js → handsontable-4mjU_b0n.js} +1 -1
  27. package/assets/home-CHntBHJa.js +2 -0
  28. package/assets/{icon-Bz9BMaD0.js → icon-Dt0vBgDO.js} +1 -1
  29. package/assets/index-B8BS9wMC.js +1 -0
  30. package/assets/{index-Mx04mBJl.js → index-BC0yfOHo.js} +1 -1
  31. package/assets/{index-m5itSoCR.js → index-BKCgnGj_.js} +1 -1
  32. package/assets/{index-C5OL14ES.js → index-BbXEMx9n.js} +1 -1
  33. package/assets/{index-DnbQEoxZ.js → index-BykbU6Ee.js} +1 -1
  34. package/assets/index-CaJgc5EZ.js +1 -0
  35. package/assets/{index-Cb_qrizV.js → index-Cgp8OfuI.js} +1 -1
  36. package/assets/{index-CGjCQBqR.js → index-Cw5o84pO.js} +1 -1
  37. package/assets/index-DrWfGwtf.js +1 -0
  38. package/assets/{init-user-CotD_o5_.js → init-user-JfCKJ5Ce.js} +1 -1
  39. package/assets/{input-DF7Ue23C.js → input-CvRbIbk4.js} +1 -1
  40. package/assets/{input-error-BBygona6.js → input-error-DMK7cAt7.js} +1 -1
  41. package/assets/{label-C2tlefOv.js → label-CSLFe9Bz.js} +1 -1
  42. package/assets/list-B2Oa5O_Q.js +1 -0
  43. package/assets/{list-table-Cz8Wgfsa.js → list-table-DA9MhywL.js} +2 -2
  44. package/assets/{login-B7br6gt5.js → login-DQwGtdis.js} +1 -1
  45. package/assets/manifest.json +588 -568
  46. package/assets/{material-icon-CItZiB53.js → material-icon-BJg8o_fs.js} +1 -1
  47. package/assets/module-DWXp59Vg.js +1 -0
  48. package/assets/{monaco-editor-DqAqwxw4.js → monaco-editor-CJs0_GlD.js} +1 -1
  49. package/assets/{multi-select-CDlcaNFy.js → multi-select-BvRpAW8r.js} +1 -1
  50. package/assets/{nav-footer-CXKG3O4K.js → nav-footer-Bs4dmN1d.js} +1 -1
  51. package/assets/{nav-main-ByHRr3yf.js → nav-main-Bq3IMk4C.js} +1 -1
  52. package/assets/{nav-user-BVRKiqm-.js → nav-user-CbB22J5O.js} +1 -1
  53. package/assets/{pagination-render-CihJ7J2u.js → pagination-render-DuXDDbC_.js} +1 -1
  54. package/assets/{popover-_WN_Lj46.js → popover-DtoGI2b1.js} +1 -1
  55. package/assets/{register-CpRFo88B.js → register-BSogVF0h.js} +1 -1
  56. package/assets/{select-DYffGc49.js → select-BWepUw-9.js} +1 -1
  57. package/assets/{sidebar-B9HagQ6H.js → sidebar-CAHsHdjM.js} +2 -2
  58. package/assets/skeleton-COOcAA8f.js +1 -0
  59. package/assets/{sonner-Dzckw3U3.js → sonner-BI0IFOQN.js} +1 -1
  60. package/assets/{toast-editor-ZLOtXFu5.js → toast-editor-CMK7QtF1.js} +82 -82
  61. package/assets/{tooltip-CWVAD5oF.js → tooltip-DHwpLKOI.js} +1 -1
  62. package/assets/{use-appearance-Co6mO0dV.js → use-appearance-DRfIqTgw.js} +1 -1
  63. package/assets/{use-window-size-B8l6Bpkf.js → use-window-size-h0Sh_NvX.js} +1 -1
  64. package/assets/{user-info-DA4KTAOF.js → user-info-DFrmpJ4y.js} +1 -1
  65. package/assets/{user-menu-content-Biwi4u9j.js → user-menu-content-DPXQdERj.js} +1 -1
  66. package/assets/welcome-B4WCIXKf.js +1 -0
  67. package/controllers/dashboard.js +15 -1
  68. package/controllers/getAllWidgets.js +1 -1
  69. package/controllers/widgetsDB.js +2 -2
  70. package/helpers/accessRightsHelper.js +2 -2
  71. package/helpers/controllerHelper.js +1 -1
  72. package/helpers/inertiaAddHelper.js +1 -1
  73. package/index.d.ts +0 -1
  74. package/index.js +0 -1
  75. package/interfaces/adminpanelConfig.d.ts +0 -17
  76. package/interfaces/global.d.ts +3 -0
  77. package/interfaces/types.d.ts +1 -1
  78. package/lib/Adminizer.js +9 -5
  79. package/lib/catalog/Navigation.js +0 -1
  80. package/lib/media-manager/Items.js +0 -3
  81. package/lib/v4/DataAccessor.js +4 -3
  82. package/lib/v4/model/adapter/sequelize.js +8 -1
  83. package/lib/v4/model/adapter/waterline.js +5 -2
  84. package/lib/widgets/abstractAction.d.ts +1 -1
  85. package/lib/widgets/abstractCustom.d.ts +27 -12
  86. package/lib/widgets/abstractCustom.js +8 -2
  87. package/lib/widgets/abstractInfo.d.ts +1 -1
  88. package/lib/widgets/abstractInfo.js +1 -1
  89. package/lib/widgets/abstractLink.d.ts +1 -0
  90. package/lib/widgets/abstractSwitch.d.ts +1 -1
  91. package/lib/widgets/abstractWidgetBase.d.ts +1 -1
  92. package/lib/widgets/widgetHandler.d.ts +26 -3
  93. package/lib/widgets/widgetHandler.js +25 -25
  94. package/models/UserAP.d.ts +5 -2
  95. package/package.json +14 -8
  96. package/system/Router.js +6 -14
  97. package/system/bindAccessRights.js +0 -4
  98. package/system/bindDev.js +1 -0
  99. package/system/bindMediaManager.js +0 -1
  100. package/system/bindModels.js +7 -2
  101. package/system/bindNavigation.js +0 -1
  102. package/translations/ru.json +17 -8
  103. package/assets/add-EOP63mij.js +0 -1
  104. package/assets/add-form-DofA75xF.js +0 -1
  105. package/assets/add-group-CbKcu8bN.js +0 -1
  106. package/assets/add-user-FQ_0_L3C.js +0 -1
  107. package/assets/add-user-form-D1f_2noB.js +0 -1
  108. package/assets/app-sidebar-mh83eSsH.js +0 -1
  109. package/assets/checkbox-D9ub-v0l.js +0 -1
  110. package/assets/dashboard-BiLSHuF2.js +0 -1
  111. package/assets/form-D2gvtdQt.js +0 -1
  112. package/assets/form-EPWwr8yD.js +0 -1
  113. package/assets/home-Co9WBSjN.js +0 -2
  114. package/assets/index-DEzdKGnS.js +0 -1
  115. package/assets/index-DUXJYtOc.js +0 -1
  116. package/assets/index-Dllsp4Rk.js +0 -1
  117. package/assets/list-BrJBbAVm.js +0 -1
  118. package/assets/module-BA_EenoK.js +0 -1
  119. package/assets/welcome-C1kRbbWq.js +0 -1
  120. package/controllers/processInstallFinalize.d.ts +0 -1
  121. package/controllers/processInstallFinalize.js +0 -16
  122. package/controllers/processInstallStep.d.ts +0 -0
  123. package/controllers/processInstallStep.js +0 -122
  124. package/lib/installStepper/InstallStepAbstract.d.ts +0 -52
  125. package/lib/installStepper/InstallStepAbstract.js +0 -69
  126. package/lib/installStepper/finalizeStep.d.ts +0 -21
  127. package/lib/installStepper/finalizeStep.js +0 -48
  128. package/lib/installStepper/installStepper.d.ts +0 -40
  129. package/lib/installStepper/installStepper.js +0 -195
  130. package/system/bindInstallStepper.d.ts +0 -2
  131. package/system/bindInstallStepper.js +0 -23
@@ -0,0 +1 @@
1
+ import{r as m,k as te,j as _,R as ke,i as Fe}from"./app.js";import{u as Q,a as gt,c as Ne}from"./index-D5ir9iUV.js";import{P as et,d as $e}from"./index-B8BS9wMC.js";import{u as wt}from"./index-DrWfGwtf.js";function bt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}var We=te[" useId ".trim().toString()]||(()=>{}),Be=0;function ao(t){const[e,n]=m.useState(We());return Q(()=>{n(o=>o??String(Be++))},[t]),e?`radix-${e}`:""}var _e=te[" useInsertionEffect ".trim().toString()]||Q;function fo({prop:t,defaultProp:e,onChange:n=()=>{},caller:o}){const[r,i,s]=ze({defaultProp:e,onChange:n}),c=t!==void 0,f=c?t:r;{const a=m.useRef(t!==void 0);m.useEffect(()=>{const u=a.current;u!==c&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=c},[c,o])}const l=m.useCallback(a=>{var u;if(c){const h=He(a)?a(t):a;h!==t&&((u=s.current)==null||u.call(s,h))}else i(a)},[c,t,i,s]);return[f,l]}function ze({defaultProp:t,onChange:e}){const[n,o]=m.useState(t),r=m.useRef(n),i=m.useRef(e);return _e(()=>{i.current=e},[e]),m.useEffect(()=>{var s;r.current!==n&&((s=i.current)==null||s.call(i,n),r.current=n)},[n,r]),[n,o,i]}function He(t){return typeof t=="function"}function Ie(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[n,e])}var je="DismissableLayer",Pt="dismissableLayer.update",Ve="dismissableLayer.pointerDownOutside",Ye="dismissableLayer.focusOutside",Vt,ee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ue=m.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...f}=t,l=m.useContext(ee),[a,u]=m.useState(null),h=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=m.useState({}),p=wt(e,x=>u(x)),g=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(y),v=a?g.indexOf(a):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=w,A=Ke(x=>{const C=x.target,M=[...l.branches].some(O=>O.contains(C));!b||M||(r==null||r(x),s==null||s(x),x.defaultPrevented||c==null||c())},h),P=Ze(x=>{const C=x.target;[...l.branches].some(O=>O.contains(C))||(i==null||i(x),s==null||s(x),x.defaultPrevented||c==null||c())},h);return Ie(x=>{v===l.layers.size-1&&(o==null||o(x),!x.defaultPrevented&&c&&(x.preventDefault(),c()))},h),m.useEffect(()=>{if(a)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Vt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(a)),l.layers.add(a),Yt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vt)}},[a,h,n,l]),m.useEffect(()=>()=>{a&&(l.layers.delete(a),l.layersWithOutsidePointerEventsDisabled.delete(a),Yt())},[a,l]),m.useEffect(()=>{const x=()=>d({});return document.addEventListener(Pt,x),()=>document.removeEventListener(Pt,x)},[]),_.jsx(et.div,{...f,ref:p,style:{pointerEvents:E?b?"auto":"none":void 0,...t.style},onFocusCapture:bt(t.onFocusCapture,P.onFocusCapture),onBlurCapture:bt(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:bt(t.onPointerDownCapture,A.onPointerDownCapture)})});Ue.displayName=je;var Xe="DismissableLayerBranch",qe=m.forwardRef((t,e)=>{const n=m.useContext(ee),o=m.useRef(null),r=wt(e,o);return m.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),_.jsx(et.div,{...t,ref:r})});qe.displayName=Xe;function Ke(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let f=function(){ne(Ve,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=f,e.addEventListener("click",r.current,{once:!0})):f()}else e.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>o.current=!0}}function Ze(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t),o=m.useRef(!1);return m.useEffect(()=>{const r=i=>{i.target&&!o.current&&ne(Ye,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Yt(){const t=new CustomEvent(Pt);document.dispatchEvent(t)}function ne(t,e,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),o?$e(r,i):r.dispatchEvent(i)}var Ge="Portal",oe=m.forwardRef((t,e)=>{var c;const{container:n,...o}=t,[r,i]=m.useState(!1);Q(()=>i(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?ke.createPortal(_.jsx(et.div,{...o,ref:e}),s):null});oe.displayName=Ge;var uo=oe;const Je=["top","right","bottom","left"],q=Math.min,$=Math.max,dt=Math.round,ft=Math.floor,j=t=>({x:t,y:t}),Qe={left:"right",right:"left",bottom:"top",top:"bottom"},tn={start:"end",end:"start"};function Rt(t,e,n){return $(t,q(e,n))}function U(t,e){return typeof t=="function"?t(e):t}function X(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function Dt(t){return t==="y"?"height":"width"}function K(t){return["top","bottom"].includes(X(t))?"y":"x"}function Lt(t){return St(K(t))}function en(t,e,n){n===void 0&&(n=!1);const o=nt(t),r=Lt(t),i=Dt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ht(s)),[s,ht(s)]}function nn(t){const e=ht(t);return[Ct(t),e,Ct(e)]}function Ct(t){return t.replace(/start|end/g,e=>tn[e])}function on(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}function rn(t,e,n,o){const r=nt(t);let i=on(X(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(Ct)))),i}function ht(t){return t.replace(/left|right|bottom|top/g,e=>Qe[e])}function sn(t){return{top:0,right:0,bottom:0,left:0,...t}}function re(t){return typeof t!="number"?sn(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ut(t,e,n){let{reference:o,floating:r}=t;const i=K(e),s=Lt(e),c=Dt(s),f=X(e),l=i==="y",a=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(f){case"top":d={x:a,y:o.y-r.height};break;case"bottom":d={x:a,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(nt(e)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const cn=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:a,y:u}=Ut(l,o,f),h=o,d={},p=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x:v,y:E,data:b,reset:A}=await w({x:a,y:u,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});a=v??a,u=E??u,d={...d,[y]:{...d[y],...b}},A&&p<=50&&(p++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(l=A.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):A.rects),{x:a,y:u}=Ut(l,h,f)),g=-1)}return{x:a,y:u,placement:h,strategy:r,middlewareData:d}};async function it(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=U(e,t),p=re(d),y=c[h?u==="floating"?"reference":"floating":u],w=pt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:a,strategy:f})),v=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),b=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},A=pt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:f}):v);return{top:(w.top-A.top+p.top)/b.y,bottom:(A.bottom-w.bottom+p.bottom)/b.y,left:(w.left-A.left+p.left)/b.x,right:(A.right-w.right+p.right)/b.x}}const ln=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:f}=e,{element:l,padding:a=0}=U(t,e)||{};if(l==null)return{};const u=re(a),h={x:n,y:o},d=Lt(r),p=Dt(d),g=await s.getDimensions(l),y=d==="y",w=y?"top":"left",v=y?"bottom":"right",E=y?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-h[d]-i.floating[p],A=h[d]-i.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let x=P?P[E]:0;(!x||!await(s.isElement==null?void 0:s.isElement(P)))&&(x=c.floating[E]||i.floating[p]);const C=b/2-A/2,M=x/2-g[p]/2-1,O=q(u[w],M),F=q(u[v],M),N=O,D=x-g[p]-F,S=x/2-g[p]/2+C,B=Rt(N,S,D),L=!f.arrow&&nt(r)!=null&&S!==B&&i.reference[p]/2-(S<N?O:F)-g[p]/2<0,T=L?S<N?S-N:S-D:0;return{[d]:h[d]+T,data:{[d]:B,centerOffset:S-B-T,...L&&{alignmentOffset:T}},reset:L}}}),an=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:l}=e,{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=U(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=X(r),v=K(c),E=X(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(l.floating)),A=h||(E||!g?[ht(c)]:nn(c)),P=p!=="none";!h&&P&&A.push(...rn(c,g,p,b));const x=[c,...A],C=await it(e,y),M=[];let O=((o=i.flip)==null?void 0:o.overflows)||[];if(a&&M.push(C[w]),u){const S=en(r,s,b);M.push(C[S[0]],C[S[1]])}if(O=[...O,{placement:r,overflows:M}],!M.every(S=>S<=0)){var F,N;const S=(((F=i.flip)==null?void 0:F.index)||0)+1,B=x[S];if(B)return{data:{index:S,overflows:O},reset:{placement:B}};let L=(N=O.filter(T=>T.overflows[0]<=0).sort((T,R)=>T.overflows[1]-R.overflows[1])[0])==null?void 0:N.placement;if(!L)switch(d){case"bestFit":{var D;const T=(D=O.filter(R=>{if(P){const k=K(R.placement);return k===v||k==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(k=>k>0).reduce((k,I)=>k+I,0)]).sort((R,k)=>R[1]-k[1])[0])==null?void 0:D[0];T&&(L=T);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function Xt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function qt(t){return Je.some(e=>t[e]>=0)}const fn=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=U(t,e);switch(o){case"referenceHidden":{const i=await it(e,{...r,elementContext:"reference"}),s=Xt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qt(s)}}}case"escaped":{const i=await it(e,{...r,altBoundary:!0}),s=Xt(i,n.floating);return{data:{escapedOffsets:s,escaped:qt(s)}}}default:return{}}}}};async function un(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=X(n),c=nt(n),f=K(n)==="y",l=["left","top"].includes(s)?-1:1,a=i&&f?-1:1,u=U(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),f?{x:d*a,y:h*l}:{x:h*l,y:d*a}}const dn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,f=await un(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:s}}}}},hn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:y=>{let{x:w,y:v}=y;return{x:w,y:v}}},...f}=U(t,e),l={x:n,y:o},a=await it(e,f),u=K(X(r)),h=St(u);let d=l[h],p=l[u];if(i){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",v=d+a[y],E=d-a[w];d=Rt(v,d,E)}if(s){const y=u==="y"?"top":"left",w=u==="y"?"bottom":"right",v=p+a[y],E=p-a[w];p=Rt(v,p,E)}const g=c.fn({...e,[h]:d,[u]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:i,[u]:s}}}}}},pn=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:l=!0}=U(t,e),a={x:n,y:o},u=K(r),h=St(u);let d=a[h],p=a[u];const g=U(c,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const E=h==="y"?"height":"width",b=i.reference[h]-i.floating[E]+y.mainAxis,A=i.reference[h]+i.reference[E]-y.mainAxis;d<b?d=b:d>A&&(d=A)}if(l){var w,v;const E=h==="y"?"width":"height",b=["top","left"].includes(X(r)),A=i.reference[u]-i.floating[E]+(b&&((w=s.offset)==null?void 0:w[u])||0)+(b?0:y.crossAxis),P=i.reference[u]+i.reference[E]+(b?0:((v=s.offset)==null?void 0:v[u])||0)-(b?y.crossAxis:0);p<A?p=A:p>P&&(p=P)}return{[h]:d,[u]:p}}}},mn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:f=()=>{},...l}=U(t,e),a=await it(e,l),u=X(r),h=nt(r),d=K(r)==="y",{width:p,height:g}=i.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=u,y=h==="end"?"top":"bottom");const v=g-a.top-a.bottom,E=p-a.left-a.right,b=q(g-a[y],v),A=q(p-a[w],E),P=!e.middlewareData.shift;let x=b,C=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=E),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(x=v),P&&!h){const O=$(a.left,0),F=$(a.right,0),N=$(a.top,0),D=$(a.bottom,0);d?C=p-2*(O!==0||F!==0?O+F:$(a.left,a.right)):x=g-2*(N!==0||D!==0?N+D:$(a.top,a.bottom))}await f({...e,availableWidth:C,availableHeight:x});const M=await s.getDimensions(c.floating);return p!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function yt(){return typeof window<"u"}function ot(t){return ie(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(ie(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ie(t){return yt()?t instanceof Node||t instanceof W(t).Node:!1}function z(t){return yt()?t instanceof Element||t instanceof W(t).Element:!1}function V(t){return yt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Kt(t){return!yt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}function ct(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function gn(t){return["table","td","th"].includes(ot(t))}function xt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Tt(t){const e=Mt(),n=z(t)?H(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function wn(t){let e=Z(t);for(;V(e)&&!tt(e);){if(Tt(e))return e;if(xt(e))return null;e=Z(e)}return null}function Mt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tt(t){return["html","body","#document"].includes(ot(t))}function H(t){return W(t).getComputedStyle(t)}function vt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Z(t){if(ot(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||Y(t);return Kt(e)?e.host:e}function se(t){const e=Z(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&ct(e)?e:se(e)}function st(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=se(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=Ot(s);return e.concat(s,s.visualViewport||[],ct(r)?r:[],c&&n?st(c):[])}return e.concat(r,st(r,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ce(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=V(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=dt(n)!==i||dt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function kt(t){return z(t)?t:t.contextElement}function J(t){const e=kt(t);if(!V(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ce(e);let s=(i?dt(n.width):n.width)/o,c=(i?dt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const yn=j(0);function le(t){const e=W(t);return!Mt()||!e.visualViewport?yn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=kt(t);let s=j(1);e&&(o?z(o)&&(s=J(o)):s=J(t));const c=xn(i,n,o)?le(i):j(0);let f=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,a=r.width/s.x,u=r.height/s.y;if(i){const h=W(i),d=o&&z(o)?W(o):o;let p=h,g=Ot(p);for(;g&&o&&d!==p;){const y=J(g),w=g.getBoundingClientRect(),v=H(g),E=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,b=w.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;f*=y.x,l*=y.y,a*=y.x,u*=y.y,f+=E,l+=b,p=W(g),g=Ot(p)}}return pt({width:a,height:u,x:f,y:l})}function Ft(t,e){const n=vt(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function ae(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:Ft(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function vn(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=Y(o),c=e?xt(e.floating):!1;if(o===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},l=j(1);const a=j(0),u=V(o);if((u||!u&&!i)&&((ot(o)!=="body"||ct(s))&&(f=vt(o)),V(o))){const d=G(o);l=J(o),a.x=d.x+o.clientLeft,a.y=d.y+o.clientTop}const h=s&&!u&&!i?ae(s,f,!0):j(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+a.x+h.x,y:n.y*l.y-f.scrollTop*l.y+a.y+h.y}}function bn(t){return Array.from(t.getClientRects())}function An(t){const e=Y(t),n=vt(t),o=t.ownerDocument.body,r=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ft(t);const c=-n.scrollTop;return H(o).direction==="rtl"&&(s+=$(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function En(t,e){const n=W(t),o=Y(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,f=0;if(r){i=r.width,s=r.height;const l=Mt();(!l||l&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:i,height:s,x:c,y:f}}function Pn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=V(t)?J(t):j(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,f=r*i.x,l=o*i.y;return{width:s,height:c,x:f,y:l}}function Zt(t,e,n){let o;if(e==="viewport")o=En(t,n);else if(e==="document")o=An(Y(t));else if(z(e))o=Pn(e,n);else{const r=le(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return pt(o)}function fe(t,e){const n=Z(t);return n===e||!z(n)||tt(n)?!1:H(n).position==="fixed"||fe(n,e)}function Rn(t,e){const n=e.get(t);if(n)return n;let o=st(t,[],!1).filter(c=>z(c)&&ot(c)!=="body"),r=null;const i=H(t).position==="fixed";let s=i?Z(t):t;for(;z(s)&&!tt(s);){const c=H(s),f=Tt(s);!f&&c.position==="fixed"&&(r=null),(i?!f&&!r:!f&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ct(s)&&!f&&fe(t,s))?o=o.filter(a=>a!==s):r=c,s=Z(s)}return e.set(t,o),o}function Cn(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?xt(e)?[]:Rn(e,this._c):[].concat(n),o],c=s[0],f=s.reduce((l,a)=>{const u=Zt(e,a,r);return l.top=$(u.top,l.top),l.right=q(u.right,l.right),l.bottom=q(u.bottom,l.bottom),l.left=$(u.left,l.left),l},Zt(e,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function On(t){const{width:e,height:n}=ce(t);return{width:e,height:n}}function Sn(t,e,n){const o=V(e),r=Y(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const f=j(0);if(o||!o&&!i)if((ot(e)!=="body"||ct(r))&&(c=vt(e)),o){const h=G(e,!0,i,e);f.x=h.x+e.clientLeft,f.y=h.y+e.clientTop}else r&&(f.x=Ft(r));const l=r&&!o&&!i?ae(r,c):j(0),a=s.left+c.scrollLeft-f.x-l.x,u=s.top+c.scrollTop-f.y-l.y;return{x:a,y:u,width:s.width,height:s.height}}function At(t){return H(t).position==="static"}function Gt(t,e){if(!V(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function ue(t,e){const n=W(t);if(xt(t))return n;if(!V(t)){let r=Z(t);for(;r&&!tt(r);){if(z(r)&&!At(r))return r;r=Z(r)}return n}let o=Gt(t,e);for(;o&&gn(o)&&At(o);)o=Gt(o,e);return o&&tt(o)&&At(o)&&!Tt(o)?n:o||wn(t)||n}const Dn=async function(t){const e=this.getOffsetParent||ue,n=this.getDimensions,o=await n(t.floating);return{reference:Sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ln(t){return H(t).direction==="rtl"}const Tn={convertOffsetParentRelativeRectToViewportRelativeRect:vn,getDocumentElement:Y,getClippingRect:Cn,getOffsetParent:ue,getElementRects:Dn,getClientRects:bn,getDimensions:On,getScale:J,isElement:z,isRTL:Ln};function de(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Mn(t,e){let n=null,o;const r=Y(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const l=t.getBoundingClientRect(),{left:a,top:u,width:h,height:d}=l;if(c||e(),!h||!d)return;const p=ft(u),g=ft(r.clientWidth-(a+h)),y=ft(r.clientHeight-(u+d)),w=ft(a),E={rootMargin:-p+"px "+-g+"px "+-y+"px "+-w+"px",threshold:$(0,q(1,f))||1};let b=!0;function A(P){const x=P[0].intersectionRatio;if(x!==f){if(!b)return s();x?s(!1,x):o=setTimeout(()=>{s(!1,1e-7)},1e3)}x===1&&!de(l,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(A,{...E,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,E)}n.observe(t)}return s(!0),i}function kn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=kt(t),a=r||i?[...l?st(l):[],...st(e)]:[];a.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const u=l&&c?Mn(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[v]=w;v&&v.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=d)==null||E.observe(e)})),n()}),l&&!f&&d.observe(l),d.observe(e));let p,g=f?G(t):null;f&&y();function y(){const w=G(t);g&&!de(g,w)&&n(),g=w,p=requestAnimationFrame(y)}return n(),()=>{var w;a.forEach(v=>{r&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),u==null||u(),(w=d)==null||w.disconnect(),d=null,f&&cancelAnimationFrame(p)}}const Fn=dn,Nn=hn,$n=an,Wn=mn,Bn=fn,Jt=ln,_n=pn,zn=(t,e,n)=>{const o=new Map,r={platform:Tn,...n},i={...r.platform,_c:o};return cn(t,e,{...r,platform:i})};var ut=typeof document<"u"?m.useLayoutEffect:m.useEffect;function mt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!mt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!mt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function he(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Qt(t,e){const n=he(t);return Math.round(e*n)/n}function Et(t){const e=m.useRef(t);return ut(()=>{e.current=t}),e}function Hn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:f,open:l}=t,[a,u]=m.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(o);mt(h,o)||d(o);const[p,g]=m.useState(null),[y,w]=m.useState(null),v=m.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),E=m.useCallback(R=>{R!==x.current&&(x.current=R,w(R))},[]),b=i||p,A=s||y,P=m.useRef(null),x=m.useRef(null),C=m.useRef(a),M=f!=null,O=Et(f),F=Et(r),N=Et(l),D=m.useCallback(()=>{if(!P.current||!x.current)return;const R={placement:e,strategy:n,middleware:h};F.current&&(R.platform=F.current),zn(P.current,x.current,R).then(k=>{const I={...k,isPositioned:N.current!==!1};S.current&&!mt(C.current,I)&&(C.current=I,Fe.flushSync(()=>{u(I)}))})},[h,e,n,F,N]);ut(()=>{l===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[l]);const S=m.useRef(!1);ut(()=>(S.current=!0,()=>{S.current=!1}),[]),ut(()=>{if(b&&(P.current=b),A&&(x.current=A),b&&A){if(O.current)return O.current(b,A,D);D()}},[b,A,D,O,M]);const B=m.useMemo(()=>({reference:P,floating:x,setReference:v,setFloating:E}),[v,E]),L=m.useMemo(()=>({reference:b,floating:A}),[b,A]),T=m.useMemo(()=>{const R={position:n,left:0,top:0};if(!L.floating)return R;const k=Qt(L.floating,a.x),I=Qt(L.floating,a.y);return c?{...R,transform:"translate("+k+"px, "+I+"px)",...he(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:I}},[n,c,L.floating,a.x,a.y]);return m.useMemo(()=>({...a,update:D,refs:B,elements:L,floatingStyles:T}),[a,D,B,L,T])}const In=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Jt({element:o.current,padding:r}).fn(n):{}:o?Jt({element:o,padding:r}).fn(n):{}}}},jn=(t,e)=>({...Fn(t),options:[t,e]}),Vn=(t,e)=>({...Nn(t),options:[t,e]}),Yn=(t,e)=>({..._n(t),options:[t,e]}),Un=(t,e)=>({...$n(t),options:[t,e]}),Xn=(t,e)=>({...Wn(t),options:[t,e]}),qn=(t,e)=>({...Bn(t),options:[t,e]}),Kn=(t,e)=>({...In(t),options:[t,e]});var Zn="Arrow",pe=m.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return _.jsx(et.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});pe.displayName=Zn;var Gn=pe;function Jn(t){const[e,n]=m.useState(void 0);return Q(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const f=i.borderBoxSize,l=Array.isArray(f)?f[0]:f;s=l.inlineSize,c=l.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}var Nt="Popper",[me,ho]=Ne(Nt),[Qn,ge]=me(Nt),we=t=>{const{__scopePopper:e,children:n}=t,[o,r]=m.useState(null);return _.jsx(Qn,{scope:e,anchor:o,onAnchorChange:r,children:n})};we.displayName=Nt;var ye="PopperAnchor",xe=m.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=ge(ye,n),s=m.useRef(null),c=wt(e,s);return m.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:_.jsx(et.div,{...r,ref:c})});xe.displayName=ye;var $t="PopperContent",[to,eo]=me($t),ve=m.forwardRef((t,e)=>{var Wt,Bt,_t,zt,Ht,It;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:l=[],collisionPadding:a=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...g}=t,y=ge($t,n),[w,v]=m.useState(null),E=wt(e,rt=>v(rt)),[b,A]=m.useState(null),P=Jn(b),x=(P==null?void 0:P.width)??0,C=(P==null?void 0:P.height)??0,M=o+(i!=="center"?"-"+i:""),O=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},F=Array.isArray(l)?l:[l],N=F.length>0,D={padding:O,boundary:F.filter(oo),altBoundary:N},{refs:S,floatingStyles:B,placement:L,isPositioned:T,middlewareData:R}=Hn({strategy:"fixed",placement:M,whileElementsMounted:(...rt)=>kn(...rt,{animationFrame:d==="always"}),elements:{reference:y.anchor},middleware:[jn({mainAxis:r+C,alignmentAxis:s}),f&&Vn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Yn():void 0,...D}),f&&Un({...D}),Xn({...D,apply:({elements:rt,rects:jt,availableWidth:De,availableHeight:Le})=>{const{width:Te,height:Me}=jt.reference,at=rt.floating.style;at.setProperty("--radix-popper-available-width",`${De}px`),at.setProperty("--radix-popper-available-height",`${Le}px`),at.setProperty("--radix-popper-anchor-width",`${Te}px`),at.setProperty("--radix-popper-anchor-height",`${Me}px`)}}),b&&Kn({element:b,padding:c}),ro({arrowWidth:x,arrowHeight:C}),h&&qn({strategy:"referenceHidden",...D})]}),[k,I]=Ee(L),lt=gt(p);Q(()=>{T&&(lt==null||lt())},[T,lt]);const Pe=(Wt=R.arrow)==null?void 0:Wt.x,Re=(Bt=R.arrow)==null?void 0:Bt.y,Ce=((_t=R.arrow)==null?void 0:_t.centerOffset)!==0,[Oe,Se]=m.useState();return Q(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),_.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:T?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[(zt=R.transformOrigin)==null?void 0:zt.x,(Ht=R.transformOrigin)==null?void 0:Ht.y].join(" "),...((It=R.hide)==null?void 0:It.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:_.jsx(to,{scope:n,placedSide:k,onArrowChange:A,arrowX:Pe,arrowY:Re,shouldHideArrow:Ce,children:_.jsx(et.div,{"data-side":k,"data-align":I,...g,ref:E,style:{...g.style,animation:T?void 0:"none"}})})})});ve.displayName=$t;var be="PopperArrow",no={top:"bottom",right:"left",bottom:"top",left:"right"},Ae=m.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=eo(be,o),s=no[i.placedSide];return _.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:_.jsx(Gn,{...r,ref:n,style:{...r.style,display:"block"}})})});Ae.displayName=be;function oo(t){return t!==null}var ro=t=>({name:"transformOrigin",options:t,fn(e){var y,w,v;const{placement:n,rects:o,middlewareData:r}=e,s=((y=r.arrow)==null?void 0:y.centerOffset)!==0,c=s?0:t.arrowWidth,f=s?0:t.arrowHeight,[l,a]=Ee(n),u={start:"0%",center:"50%",end:"100%"}[a],h=(((w=r.arrow)==null?void 0:w.x)??0)+c/2,d=(((v=r.arrow)==null?void 0:v.y)??0)+f/2;let p="",g="";return l==="bottom"?(p=s?u:`${h}px`,g=`${-f}px`):l==="top"?(p=s?u:`${h}px`,g=`${o.floating.height+f}px`):l==="right"?(p=`${-f}px`,g=s?u:`${d}px`):l==="left"&&(p=`${o.floating.width+f}px`,g=s?u:`${d}px`),{data:{x:p,y:g}}}});function Ee(t){const[e,n="center"]=t.split("-");return[e,n]}var po=we,mo=xe,go=ve,wo=Ae;export{mo as A,go as C,Ue as D,oe as P,uo as R,Jn as a,ao as b,bt as c,ho as d,po as e,wo as f,fo as u};
@@ -1 +1 @@
1
- import{r as i,j as t}from"./app.js";import{P as o}from"./index-DEzdKGnS.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var p=e;export{p as R,s as V};
1
+ import{r as i,j as t}from"./app.js";import{P as o}from"./index-B8BS9wMC.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var p=e;export{p as R,s as V};
@@ -1,4 +1,4 @@
1
- import{c as B}from"./createLucideIcon-BFG25zNo.js";import{r as i,j as s}from"./app.js";import{c as p,u as H,a as C,P as V,D as q}from"./index-Dllsp4Rk.js";import{u as R,c as K}from"./index-DUXJYtOc.js";import{c as U,b as X}from"./index-D5ir9iUV.js";import{h as Y,u as Z,F as z,R as J}from"./index-DnbQEoxZ.js";import{P as _}from"./index-Mx04mBJl.js";import{P as D}from"./index-DEzdKGnS.js";/**
1
+ import{c as B}from"./createLucideIcon-BFG25zNo.js";import{r as i,j as s}from"./app.js";import{c as p,u as H,b as C,P as V,D as q}from"./index-CaJgc5EZ.js";import{u as R,c as K}from"./index-DrWfGwtf.js";import{c as U,b as X}from"./index-D5ir9iUV.js";import{h as Y,u as Z,F as z,R as J}from"./index-BykbU6Ee.js";import{P as _}from"./index-BC0yfOHo.js";import{P as D}from"./index-B8BS9wMC.js";/**
2
2
  * @license lucide-react v0.485.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{r as i,j as u}from"./app.js";function d(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function y(...e){return n=>{let r=!1;const o=e.map(t=>{const l=d(t,n);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let t=0;t<o.length;t++){const l=o[t];typeof l=="function"?l():d(e[t],null)}}}}function h(...e){return i.useCallback(y(...e),e)}function g(e){const n=C(e),r=i.forwardRef((o,t)=>{const{children:l,...a}=o,s=i.Children.toArray(l),f=s.find(E);if(f){const c=f.props.children,S=s.map(p=>p===f?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:p);return u.jsx(n,{...a,ref:t,children:i.isValidElement(c)?i.cloneElement(c,void 0,S):null})}return u.jsx(n,{...a,ref:t,children:l})});return r.displayName=`${e}.Slot`,r}var j=g("Slot");function C(e){const n=i.forwardRef((r,o)=>{const{children:t,...l}=r;if(i.isValidElement(t)){const a=x(t),s=b(l,t.props);return t.type!==i.Fragment&&(s.ref=o?y(o,a):a),i.cloneElement(t,s)}return i.Children.count(t)>1?i.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var m=Symbol("radix.slottable");function _(e){const n=({children:r})=>u.jsx(u.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=m,n}function E(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===m}function b(e,n){const r={...n};for(const o in n){const t=e[o],l=n[o];/^on[A-Z]/.test(o)?t&&l?r[o]=(...s)=>{l(...s),t(...s)}:t&&(r[o]=t):o==="style"?r[o]={...t,...l}:o==="className"&&(r[o]=[t,l].filter(Boolean).join(" "))}return{...e,...r}}function x(e){var o,t;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:t.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}export{j as S,_ as a,y as b,g as c,h as u};
@@ -1 +1 @@
1
- import{q as ae,S as ie,r as pe,j as r}from"./app.js";import{c as ce}from"./compiler-runtime-tM4jBQ-T.js";import{T as ne,t as de}from"./sonner-Dzckw3U3.js";import{L as K}from"./label-C2tlefOv.js";import{I as re}from"./input-DF7Ue23C.js";import oe from"./input-error-BBygona6.js";import{S as me,a as fe,b as ue,c as he,d as be}from"./select-DYffGc49.js";import{B as xe}from"./button-CTOOfwvn.js";import{i as we}from"./use-appearance-Co6mO0dV.js";import"./index-DEzdKGnS.js";import"./index-DUXJYtOc.js";import"./utils-DjqsqOe8.js";import"./index-Dllsp4Rk.js";import"./index-D5ir9iUV.js";import"./index-C5OL14ES.js";import"./index-DnbQEoxZ.js";import"./index-DwctwfU0.js";import"./index-Cb_qrizV.js";import"./chevron-down-B5XuAFRu.js";import"./createLucideIcon-BFG25zNo.js";import"./check-LAUWAnlX.js";function Ge(){const e=ce.c(110),s=ae();let V;e[0]!==s.props.defaultLocale?(V={locale:s.props.defaultLocale,confirmPassword:"",password:"",login:""},e[0]=s.props.defaultLocale,e[1]=V):V=e[1];const{post:M,data:o,setData:Q,processing:l,setError:W,errors:t,clearErrors:X}=ie(V);let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[2]=R):R=e[2],pe.useEffect(ve,R);let U;e[3]!==o.confirmPassword||e[4]!==o.password||e[5]!==s.props.confirmError||e[6]!==s.props.submitLink||e[7]!==M||e[8]!==W?(U=i=>{if(i.preventDefault(),o.password!==o.confirmPassword){W("confirmPassword",s.props.confirmError);return}M(s.props.submitLink,{onSuccess:Le,onError:je})},e[3]=o.confirmPassword,e[4]=o.password,e[5]=s.props.confirmError,e[6]=s.props.submitLink,e[7]=M,e[8]=W,e[9]=U):U=e[9];const Y=U;let z;e[10]!==X||e[11]!==Q?(z=(i,te)=>{X(),Q(i,te)},e[10]=X,e[11]=Q,e[12]=z):z=e[12];const a=z;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(ne,{position:"top-center",richColors:!0,closeButton:!0}),e[13]=O):O=e[13];let p;e[14]!==s.props.header.title?(p=r.jsx("h1",{className:"font-medium mb-2 text-xl",children:s.props.header.title}),e[14]=s.props.header.title,e[15]=p):p=e[15];let c;e[16]!==s.props.header.desc?(c=r.jsx("p",{className:"text-muted-foreground text-sm",children:s.props.header.desc}),e[16]=s.props.header.desc,e[17]=c):c=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("span",{className:"text-red-500",children:"*"}),e[18]=A):A=e[18];let n;e[19]!==s.props.loginLabel?(n=r.jsxs(K,{htmlFor:"login",children:[s.props.loginLabel,A]}),e[19]=s.props.loginLabel,e[20]=n):n=e[20];const Z=`${t.login?"border-red-500":""}`;let d;e[21]!==a?(d=i=>{a("login",i.target.value)},e[21]=a,e[22]=d):d=e[22];let m;e[23]!==o.login||e[24]!==s.props.loginLabel||e[25]!==l||e[26]!==d||e[27]!==Z?(m=r.jsx(re,{id:"login",className:Z,type:"text",required:!0,tabIndex:1,autoComplete:"username",value:o.login,disabled:l,onChange:d,placeholder:s.props.loginLabel}),e[23]=o.login,e[24]=s.props.loginLabel,e[25]=l,e[26]=d,e[27]=Z,e[28]=m):m=e[28];let f;e[29]!==t.login?(f=r.jsx(oe,{message:t.login}),e[29]=t.login,e[30]=f):f=e[30];let u;e[31]!==m||e[32]!==f?(u=r.jsxs("div",{className:"relative",children:[m,f]}),e[31]=m,e[32]=f,e[33]=u):u=e[33];let h;e[34]!==u||e[35]!==n?(h=r.jsxs("div",{className:"grid gap-4",children:[n,u]}),e[34]=u,e[35]=n,e[36]=h):h=e[36];let G;e[37]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("span",{className:"text-red-500",children:"*"}),e[37]=G):G=e[37];let b;e[38]!==s.props.passwordLabel?(b=r.jsxs(K,{htmlFor:"password",children:[s.props.passwordLabel,G]}),e[38]=s.props.passwordLabel,e[39]=b):b=e[39];const ee=`${t.password?"border-red-500":""}`;let x;e[40]!==a?(x=i=>{a("password",i.target.value)},e[40]=a,e[41]=x):x=e[41];let w;e[42]!==o.password||e[43]!==s.props.passwordLabel||e[44]!==l||e[45]!==ee||e[46]!==x?(w=r.jsx(re,{id:"password",className:ee,type:"password",required:!0,tabIndex:1,autoComplete:"new-password",value:o.password,disabled:l,onChange:x,placeholder:s.props.passwordLabel}),e[42]=o.password,e[43]=s.props.passwordLabel,e[44]=l,e[45]=ee,e[46]=x,e[47]=w):w=e[47];let g;e[48]!==t.password?(g=r.jsx(oe,{message:t.password}),e[48]=t.password,e[49]=g):g=e[49];let j;e[50]!==w||e[51]!==g?(j=r.jsxs("div",{className:"relative",children:[w,g]}),e[50]=w,e[51]=g,e[52]=j):j=e[52];let L;e[53]!==b||e[54]!==j?(L=r.jsxs("div",{className:"grid gap-4",children:[b,j]}),e[53]=b,e[54]=j,e[55]=L):L=e[55];let H;e[56]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx("span",{className:"text-red-500",children:"*"}),e[56]=H):H=e[56];let v;e[57]!==s.props.confirmPasswordLabel?(v=r.jsxs(K,{htmlFor:"confirmPassword",children:[s.props.confirmPasswordLabel,H]}),e[57]=s.props.confirmPasswordLabel,e[58]=v):v=e[58];const se=`${t.confirmPassword?"border-red-500":""}`;let N;e[59]!==a?(N=i=>{a("confirmPassword",i.target.value)},e[59]=a,e[60]=N):N=e[60];let P;e[61]!==o.confirmPassword||e[62]!==s.props.confirmPasswordLabel||e[63]!==l||e[64]!==se||e[65]!==N?(P=r.jsx(re,{id:"confirmPassword",className:se,type:"password",required:!0,tabIndex:1,autoComplete:"new-password",value:o.confirmPassword,disabled:l,onChange:N,placeholder:s.props.confirmPasswordLabel}),e[61]=o.confirmPassword,e[62]=s.props.confirmPasswordLabel,e[63]=l,e[64]=se,e[65]=N,e[66]=P):P=e[66];let S;e[67]!==t.confirmPassword?(S=r.jsx(oe,{message:t.confirmPassword}),e[67]=t.confirmPassword,e[68]=S):S=e[68];let _;e[69]!==P||e[70]!==S?(_=r.jsxs("div",{className:"relative",children:[P,S]}),e[69]=P,e[70]=S,e[71]=_):_=e[71];let y;e[72]!==v||e[73]!==_?(y=r.jsxs("div",{className:"grid gap-4",children:[v,_]}),e[72]=v,e[73]=_,e[74]=y):y=e[74];let C;e[75]!==s.props.localeLabel?(C=r.jsx(K,{htmlFor:"locale",children:s.props.localeLabel}),e[75]=s.props.localeLabel,e[76]=C):C=e[76];let E;e[77]!==a?(E=i=>a("locale",i),e[77]=a,e[78]=E):E=e[78];const le=s.props.defaultLocale;let I;e[79]!==s.props.localeLabel?(I=r.jsx(me,{className:"w-full cursor-pointer",children:r.jsx(fe,{placeholder:s.props.localeLabel})}),e[79]=s.props.localeLabel,e[80]=I):I=e[80];let B;e[81]!==s.props.locales?(B=s.props.locales.map(ge),e[81]=s.props.locales,e[82]=B):B=e[82];let k;e[83]!==B?(k=r.jsx(ue,{children:B}),e[83]=B,e[84]=k):k=e[84];let q;e[85]!==s.props.defaultLocale||e[86]!==l||e[87]!==E||e[88]!==I||e[89]!==k?(q=r.jsxs(he,{onValueChange:E,defaultValue:le,disabled:l,children:[I,k]}),e[85]=s.props.defaultLocale,e[86]=l,e[87]=E,e[88]=I,e[89]=k,e[90]=q):q=e[90];let F;e[91]!==C||e[92]!==q?(F=r.jsxs("div",{className:"grid gap-4",children:[C,q]}),e[91]=C,e[92]=q,e[93]=F):F=e[93];let T;e[94]!==s.props.submitButton||e[95]!==l?(T=r.jsx("div",{className:"flex gap-4",children:r.jsx(xe,{type:"submit",className:"w-fit cursor-pointer",disabled:l,children:s.props.submitButton})}),e[94]=s.props.submitButton,e[95]=l,e[96]=T):T=e[96];let $;e[97]!==h||e[98]!==L||e[99]!==y||e[100]!==F||e[101]!==T?($=r.jsxs("div",{className:"grid gap-5",children:[h,L,y,F,T]}),e[97]=h,e[98]=L,e[99]=y,e[100]=F,e[101]=T,e[102]=$):$=e[102];let D;e[103]!==Y||e[104]!==$?(D=r.jsx("form",{onSubmit:Y,className:"mt-6",children:$}),e[103]=Y,e[104]=$,e[105]=D):D=e[105];let J;return e[106]!==D||e[107]!==p||e[108]!==c?(J=r.jsxs("div",{className:"bg-sidebar flex min-h-svh w-full justify-center items-center",children:[O,r.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow p-6 max-w-sm w-full h-fit",children:[p,c,D]})]}),e[106]=D,e[107]=p,e[108]=c,e[109]=J):J=e[109],J}function ge(e){return r.jsx(be,{value:e,children:e.toLocaleUpperCase()},e)}function je(e){for(const s of Object.keys(e))de.error(e[s])}function Le(){}function ve(){we()}export{Ge as default};
1
+ import{q as ae,S as ie,r as pe,j as r}from"./app.js";import{c as ce}from"./compiler-runtime-hB6dAw2d.js";import{T as ne,t as de}from"./sonner-BI0IFOQN.js";import{L as K}from"./label-CSLFe9Bz.js";import{I as re}from"./input-CvRbIbk4.js";import oe from"./input-error-DMK7cAt7.js";import{S as me,a as fe,b as ue,c as he,d as be}from"./select-BWepUw-9.js";import{B as xe}from"./button-C9B_5Jf_.js";import{i as we}from"./use-appearance-DRfIqTgw.js";import"./index-B8BS9wMC.js";import"./index-DrWfGwtf.js";import"./utils-DjqsqOe8.js";import"./index-CaJgc5EZ.js";import"./index-D5ir9iUV.js";import"./index-BbXEMx9n.js";import"./index-BykbU6Ee.js";import"./index-DwctwfU0.js";import"./index-Cgp8OfuI.js";import"./chevron-down-B5XuAFRu.js";import"./createLucideIcon-BFG25zNo.js";import"./check-LAUWAnlX.js";function Ge(){const e=ce.c(110),s=ae();let V;e[0]!==s.props.defaultLocale?(V={locale:s.props.defaultLocale,confirmPassword:"",password:"",login:""},e[0]=s.props.defaultLocale,e[1]=V):V=e[1];const{post:M,data:o,setData:Q,processing:l,setError:W,errors:t,clearErrors:X}=ie(V);let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[2]=R):R=e[2],pe.useEffect(ve,R);let U;e[3]!==o.confirmPassword||e[4]!==o.password||e[5]!==s.props.confirmError||e[6]!==s.props.submitLink||e[7]!==M||e[8]!==W?(U=i=>{if(i.preventDefault(),o.password!==o.confirmPassword){W("confirmPassword",s.props.confirmError);return}M(s.props.submitLink,{onSuccess:Le,onError:je})},e[3]=o.confirmPassword,e[4]=o.password,e[5]=s.props.confirmError,e[6]=s.props.submitLink,e[7]=M,e[8]=W,e[9]=U):U=e[9];const Y=U;let z;e[10]!==X||e[11]!==Q?(z=(i,te)=>{X(),Q(i,te)},e[10]=X,e[11]=Q,e[12]=z):z=e[12];const a=z;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(ne,{position:"top-center",richColors:!0,closeButton:!0}),e[13]=O):O=e[13];let p;e[14]!==s.props.header.title?(p=r.jsx("h1",{className:"font-medium mb-2 text-xl",children:s.props.header.title}),e[14]=s.props.header.title,e[15]=p):p=e[15];let c;e[16]!==s.props.header.desc?(c=r.jsx("p",{className:"text-muted-foreground text-sm",children:s.props.header.desc}),e[16]=s.props.header.desc,e[17]=c):c=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("span",{className:"text-red-500",children:"*"}),e[18]=A):A=e[18];let n;e[19]!==s.props.loginLabel?(n=r.jsxs(K,{htmlFor:"login",children:[s.props.loginLabel,A]}),e[19]=s.props.loginLabel,e[20]=n):n=e[20];const Z=`${t.login?"border-red-500":""}`;let d;e[21]!==a?(d=i=>{a("login",i.target.value)},e[21]=a,e[22]=d):d=e[22];let m;e[23]!==o.login||e[24]!==s.props.loginLabel||e[25]!==l||e[26]!==d||e[27]!==Z?(m=r.jsx(re,{id:"login",className:Z,type:"text",required:!0,tabIndex:1,autoComplete:"username",value:o.login,disabled:l,onChange:d,placeholder:s.props.loginLabel}),e[23]=o.login,e[24]=s.props.loginLabel,e[25]=l,e[26]=d,e[27]=Z,e[28]=m):m=e[28];let f;e[29]!==t.login?(f=r.jsx(oe,{message:t.login}),e[29]=t.login,e[30]=f):f=e[30];let u;e[31]!==m||e[32]!==f?(u=r.jsxs("div",{className:"relative",children:[m,f]}),e[31]=m,e[32]=f,e[33]=u):u=e[33];let h;e[34]!==u||e[35]!==n?(h=r.jsxs("div",{className:"grid gap-4",children:[n,u]}),e[34]=u,e[35]=n,e[36]=h):h=e[36];let G;e[37]===Symbol.for("react.memo_cache_sentinel")?(G=r.jsx("span",{className:"text-red-500",children:"*"}),e[37]=G):G=e[37];let b;e[38]!==s.props.passwordLabel?(b=r.jsxs(K,{htmlFor:"password",children:[s.props.passwordLabel,G]}),e[38]=s.props.passwordLabel,e[39]=b):b=e[39];const ee=`${t.password?"border-red-500":""}`;let x;e[40]!==a?(x=i=>{a("password",i.target.value)},e[40]=a,e[41]=x):x=e[41];let w;e[42]!==o.password||e[43]!==s.props.passwordLabel||e[44]!==l||e[45]!==ee||e[46]!==x?(w=r.jsx(re,{id:"password",className:ee,type:"password",required:!0,tabIndex:1,autoComplete:"new-password",value:o.password,disabled:l,onChange:x,placeholder:s.props.passwordLabel}),e[42]=o.password,e[43]=s.props.passwordLabel,e[44]=l,e[45]=ee,e[46]=x,e[47]=w):w=e[47];let g;e[48]!==t.password?(g=r.jsx(oe,{message:t.password}),e[48]=t.password,e[49]=g):g=e[49];let j;e[50]!==w||e[51]!==g?(j=r.jsxs("div",{className:"relative",children:[w,g]}),e[50]=w,e[51]=g,e[52]=j):j=e[52];let L;e[53]!==b||e[54]!==j?(L=r.jsxs("div",{className:"grid gap-4",children:[b,j]}),e[53]=b,e[54]=j,e[55]=L):L=e[55];let H;e[56]===Symbol.for("react.memo_cache_sentinel")?(H=r.jsx("span",{className:"text-red-500",children:"*"}),e[56]=H):H=e[56];let v;e[57]!==s.props.confirmPasswordLabel?(v=r.jsxs(K,{htmlFor:"confirmPassword",children:[s.props.confirmPasswordLabel,H]}),e[57]=s.props.confirmPasswordLabel,e[58]=v):v=e[58];const se=`${t.confirmPassword?"border-red-500":""}`;let N;e[59]!==a?(N=i=>{a("confirmPassword",i.target.value)},e[59]=a,e[60]=N):N=e[60];let P;e[61]!==o.confirmPassword||e[62]!==s.props.confirmPasswordLabel||e[63]!==l||e[64]!==se||e[65]!==N?(P=r.jsx(re,{id:"confirmPassword",className:se,type:"password",required:!0,tabIndex:1,autoComplete:"new-password",value:o.confirmPassword,disabled:l,onChange:N,placeholder:s.props.confirmPasswordLabel}),e[61]=o.confirmPassword,e[62]=s.props.confirmPasswordLabel,e[63]=l,e[64]=se,e[65]=N,e[66]=P):P=e[66];let S;e[67]!==t.confirmPassword?(S=r.jsx(oe,{message:t.confirmPassword}),e[67]=t.confirmPassword,e[68]=S):S=e[68];let _;e[69]!==P||e[70]!==S?(_=r.jsxs("div",{className:"relative",children:[P,S]}),e[69]=P,e[70]=S,e[71]=_):_=e[71];let y;e[72]!==v||e[73]!==_?(y=r.jsxs("div",{className:"grid gap-4",children:[v,_]}),e[72]=v,e[73]=_,e[74]=y):y=e[74];let C;e[75]!==s.props.localeLabel?(C=r.jsx(K,{htmlFor:"locale",children:s.props.localeLabel}),e[75]=s.props.localeLabel,e[76]=C):C=e[76];let E;e[77]!==a?(E=i=>a("locale",i),e[77]=a,e[78]=E):E=e[78];const le=s.props.defaultLocale;let I;e[79]!==s.props.localeLabel?(I=r.jsx(me,{className:"w-full cursor-pointer",children:r.jsx(fe,{placeholder:s.props.localeLabel})}),e[79]=s.props.localeLabel,e[80]=I):I=e[80];let B;e[81]!==s.props.locales?(B=s.props.locales.map(ge),e[81]=s.props.locales,e[82]=B):B=e[82];let k;e[83]!==B?(k=r.jsx(ue,{children:B}),e[83]=B,e[84]=k):k=e[84];let q;e[85]!==s.props.defaultLocale||e[86]!==l||e[87]!==E||e[88]!==I||e[89]!==k?(q=r.jsxs(he,{onValueChange:E,defaultValue:le,disabled:l,children:[I,k]}),e[85]=s.props.defaultLocale,e[86]=l,e[87]=E,e[88]=I,e[89]=k,e[90]=q):q=e[90];let F;e[91]!==C||e[92]!==q?(F=r.jsxs("div",{className:"grid gap-4",children:[C,q]}),e[91]=C,e[92]=q,e[93]=F):F=e[93];let T;e[94]!==s.props.submitButton||e[95]!==l?(T=r.jsx("div",{className:"flex gap-4",children:r.jsx(xe,{type:"submit",className:"w-fit cursor-pointer",disabled:l,children:s.props.submitButton})}),e[94]=s.props.submitButton,e[95]=l,e[96]=T):T=e[96];let $;e[97]!==h||e[98]!==L||e[99]!==y||e[100]!==F||e[101]!==T?($=r.jsxs("div",{className:"grid gap-5",children:[h,L,y,F,T]}),e[97]=h,e[98]=L,e[99]=y,e[100]=F,e[101]=T,e[102]=$):$=e[102];let D;e[103]!==Y||e[104]!==$?(D=r.jsx("form",{onSubmit:Y,className:"mt-6",children:$}),e[103]=Y,e[104]=$,e[105]=D):D=e[105];let J;return e[106]!==D||e[107]!==p||e[108]!==c?(J=r.jsxs("div",{className:"bg-sidebar flex min-h-svh w-full justify-center items-center",children:[O,r.jsxs("div",{className:"rounded-xl border bg-card text-card-foreground shadow p-6 max-w-sm w-full h-fit",children:[p,c,D]})]}),e[106]=D,e[107]=p,e[108]=c,e[109]=J):J=e[109],J}function ge(e){return r.jsx(be,{value:e,children:e.toLocaleUpperCase()},e)}function je(e){for(const s of Object.keys(e))de.error(e[s])}function Le(){}function ve(){we()}export{Ge as default};
@@ -1 +1 @@
1
- import{j as l}from"./app.js";import{c as a}from"./compiler-runtime-tM4jBQ-T.js";import{c as d}from"./utils-DjqsqOe8.js";function u(s){const e=a.c(10);let i,r,t;e[0]!==s?({className:i,type:t,...r}=s,e[0]=s,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=l.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{u as I};
1
+ import{j as l}from"./app.js";import{c as a}from"./compiler-runtime-hB6dAw2d.js";import{c as d}from"./utils-DjqsqOe8.js";function u(s){const e=a.c(10);let i,r,t;e[0]!==s?({className:i,type:t,...r}=s,e[0]=s,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=l.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{u as I};
@@ -1 +1 @@
1
- import{j as a}from"./app.js";import{c}from"./compiler-runtime-tM4jBQ-T.js";import{c as i}from"./utils-DjqsqOe8.js";function f(l){const e=c.c(8);let t,s,r;e[0]!==l?({message:t,className:r,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);const m=r===void 0?"":r;let o;return e[4]!==m||e[5]!==t||e[6]!==s?(o=t?a.jsx("p",{...s,className:i("text-sm text-red-600 dark:text-red-400",m),children:t}):null,e[4]=m,e[5]=t,e[6]=s,e[7]=o):o=e[7],o}export{f as default};
1
+ import{j as a}from"./app.js";import{c}from"./compiler-runtime-hB6dAw2d.js";import{c as i}from"./utils-DjqsqOe8.js";function f(l){const e=c.c(8);let t,s,r;e[0]!==l?({message:t,className:r,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);const m=r===void 0?"":r;let o;return e[4]!==m||e[5]!==t||e[6]!==s?(o=t?a.jsx("p",{...s,className:i("text-sm text-red-600 dark:text-red-400",m),children:t}):null,e[4]=m,e[5]=t,e[6]=s,e[7]=o):o=e[7],o}export{f as default};
@@ -1 +1 @@
1
- import{r as n,j as s}from"./app.js";import{c as d}from"./compiler-runtime-tM4jBQ-T.js";import{P as m}from"./index-DEzdKGnS.js";import{c}from"./utils-DjqsqOe8.js";var u="Label",i=n.forwardRef((r,e)=>s.jsx(m.label,{...r,ref:e,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||((a=r.onMouseDown)==null||a.call(r,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName=u;var f=i;function j(r){const e=d.c(8);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==o||e[6]!==a?(l=s.jsx(f,{"data-slot":"label",className:a,...o}),e[5]=o,e[6]=a,e[7]=l):l=e[7],l}export{j as L};
1
+ import{r as n,j as s}from"./app.js";import{c as d}from"./compiler-runtime-hB6dAw2d.js";import{P as m}from"./index-B8BS9wMC.js";import{c}from"./utils-DjqsqOe8.js";var u="Label",i=n.forwardRef((r,e)=>s.jsx(m.label,{...r,ref:e,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||((a=r.onMouseDown)==null||a.call(r,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName=u;var f=i;function j(r){const e=d.c(8);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==o||e[6]!==a?(l=s.jsx(f,{"data-slot":"label",className:a,...o}),e[5]=o,e[6]=a,e[7]=l):l=e[7],l}export{j as L};
@@ -0,0 +1 @@
1
+ import{j as o}from"./app.js";import{A as r}from"./app-layout-DYsRFUuP.js";import t from"./list-table-DA9MhywL.js";import"./compiler-runtime-hB6dAw2d.js";import"./sidebar-CAHsHdjM.js";import"./index-DrWfGwtf.js";import"./button-C9B_5Jf_.js";import"./utils-DjqsqOe8.js";import"./index-Cw5o84pO.js";import"./createLucideIcon-BFG25zNo.js";import"./index-CaJgc5EZ.js";import"./index-D5ir9iUV.js";import"./index-B8BS9wMC.js";import"./index-BykbU6Ee.js";import"./index-BC0yfOHo.js";import"./tooltip-DHwpLKOI.js";import"./index-Cgp8OfuI.js";import"./app-shell-Dd9Eknik.js";import"./app-sidebar-BOmu6-Sl.js";import"./nav-main-Bq3IMk4C.js";import"./material-icon-BJg8o_fs.js";import"./chevron-right-D5q8rF7h.js";import"./index-BbXEMx9n.js";import"./index-BKCgnGj_.js";import"./chevrons-up-down-kALltqHV.js";import"./app-sidebar-header-CoXSzWxk.js";import"./breadcrumbs-BmAq4fHT.js";import"./nav-user-CbB22J5O.js";import"./dropdown-menu-Bhj17ENm.js";import"./user-info-DFrmpJ4y.js";import"./user-menu-content-DPXQdERj.js";import"./icon-Dt0vBgDO.js";import"./use-appearance-DRfIqTgw.js";import"./input-CvRbIbk4.js";import"./search-BspystAk.js";import"./sonner-BI0IFOQN.js";import"./trash-2-BoK5Xp2F.js";import"./select-BWepUw-9.js";import"./index-DwctwfU0.js";import"./chevron-down-B5XuAFRu.js";import"./check-LAUWAnlX.js";import"./pagination-render-DuXDDbC_.js";import"./chevron-left-CoMhTMUD.js";const m=[],V=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{V as default};
@@ -1,4 +1,4 @@
1
- import{j as g,r as $,J as U,q as be,f as X}from"./app.js";import{B as E}from"./button-CTOOfwvn.js";import{Icon as k}from"./icon-Bz9BMaD0.js";import{c as B}from"./createLucideIcon-BFG25zNo.js";import{c as M}from"./compiler-runtime-tM4jBQ-T.js";import{c as z}from"./utils-DjqsqOe8.js";import{I as Qe}from"./input-DF7Ue23C.js";import{S as je}from"./search-BspystAk.js";import J from"./material-icon-CItZiB53.js";import{D as Re,a as _e,b as $e,c as Fe,d as W,e as We}from"./dropdown-menu-CsGmdVIn.js";import{t as ye,T as Ye}from"./sonner-Dzckw3U3.js";import{C as De,T as Ze,a as et,b as tt,R as nt,P as ot,X as rt,O as it}from"./index-CGjCQBqR.js";import{T as lt}from"./trash-2-BoK5Xp2F.js";import{c as st,S as at,a as ut,b as gt,d as dt}from"./select-DYffGc49.js";import ct from"./pagination-render-CihJ7J2u.js";import"./index-DUXJYtOc.js";import"./index-Dllsp4Rk.js";import"./index-D5ir9iUV.js";import"./index-DEzdKGnS.js";import"./index-m5itSoCR.js";import"./index-C5OL14ES.js";import"./index-DnbQEoxZ.js";import"./index-Mx04mBJl.js";import"./index-DwctwfU0.js";import"./index-Cb_qrizV.js";import"./chevron-down-B5XuAFRu.js";import"./check-LAUWAnlX.js";import"./chevron-left-CoMhTMUD.js";import"./chevron-right-D5q8rF7h.js";/**
1
+ import{j as g,r as $,J as U,q as be,f as X}from"./app.js";import{B as E}from"./button-C9B_5Jf_.js";import{Icon as k}from"./icon-Dt0vBgDO.js";import{c as B}from"./createLucideIcon-BFG25zNo.js";import{c as M}from"./compiler-runtime-hB6dAw2d.js";import{c as z}from"./utils-DjqsqOe8.js";import{I as Qe}from"./input-CvRbIbk4.js";import{S as je}from"./search-BspystAk.js";import J from"./material-icon-BJg8o_fs.js";import{D as Re,a as _e,b as $e,c as Fe,d as W,e as We}from"./dropdown-menu-Bhj17ENm.js";import{t as ye,T as Ye}from"./sonner-BI0IFOQN.js";import{C as De,T as Ze,a as et,b as tt,R as nt,P as ot,X as rt,O as it}from"./index-Cw5o84pO.js";import{T as lt}from"./trash-2-BoK5Xp2F.js";import{c as st,S as at,a as ut,b as gt,d as dt}from"./select-BWepUw-9.js";import ct from"./pagination-render-DuXDDbC_.js";import"./index-DrWfGwtf.js";import"./index-CaJgc5EZ.js";import"./index-D5ir9iUV.js";import"./index-B8BS9wMC.js";import"./index-BKCgnGj_.js";import"./index-BbXEMx9n.js";import"./index-BykbU6Ee.js";import"./index-BC0yfOHo.js";import"./index-DwctwfU0.js";import"./index-Cgp8OfuI.js";import"./chevron-down-B5XuAFRu.js";import"./check-LAUWAnlX.js";import"./chevron-left-CoMhTMUD.js";import"./chevron-right-D5q8rF7h.js";/**
2
2
  * @license lucide-react v0.485.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -59,4 +59,4 @@ import{j as g,r as $,J as U,q as be,f as X}from"./app.js";import{B as E}from"./b
59
59
  * LICENSE.md file in the root directory of this source tree.
60
60
  *
61
61
  * @license MIT
62
- */function Te(e,t){return e?Vn(e)?$.createElement(e,t):e:null}function Vn(e){return Pn(e)||typeof e=="function"||In(e)}function Pn(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function In(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function jn(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=$.useState(()=>({current:_n(t)})),[o,r]=$.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:l=>{r(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}function Dn(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("w-full caption-bottom text-sm",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto max-h-[65vh]",children:g.jsx("table",{"data-slot":"table",className:r,...o})}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function En(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("[&_tr]:border-b",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("thead",{"data-slot":"table-header",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function An(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("[&_tr:last-child]:border-0",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("tbody",{"data-slot":"table-body",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function ve(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("tr",{"data-slot":"table-row",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function zn(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("th",{"data-slot":"table-head",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function Be(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("td",{"data-slot":"table-cell",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function Nn(e){var q;const t=M.c(28),{columns:n,data:o,notFoundContent:r,globalSearch:i,onGlobalSearch:l,searchValue:s,handleSearch:a,searchTxt:u}=e,c=i===void 0?!1:i;let p,f,d;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=$n(),f=yn(),d=Mn(),t[0]=p,t[1]=f,t[2]=d):(p=t[0],f=t[1],d=t[2]);let m;t[3]!==n||t[4]!==o?(m={data:o,columns:n,getCoreRowModel:p,getPaginationRowModel:f,getSortedRowModel:d,enableSorting:!1,manualPagination:!0},t[3]=n,t[4]=o,t[5]=m):m=t[5];const h=jn(m);let C;t[6]!==c||t[7]!==a||t[8]!==l||t[9]!==u||t[10]!==s?(C=c&&l&&g.jsxs("div",{className:"flex gap-2 p-2",children:[g.jsx(Qe,{type:"text",defaultValue:s,autoFocus:!0,placeholder:u,className:"w-full max-w-[200px] p-2 border rounded",onChange:H=>{l(H.target.value)},onKeyDown:H=>{H.key==="Enter"&&a&&a()}}),g.jsx(E,{className:"cursor-pointer",variant:"outline",size:"icon",onClick:a,children:g.jsx(k,{iconNode:je,className:"size-5"})})]}),t[6]=c,t[7]=a,t[8]=l,t[9]=u,t[10]=s,t[11]=C):C=t[11];let v;t[12]!==h?(v=h.getHeaderGroups().map(Ln),t[12]=h,t[13]=v):v=t[13];let R;t[14]!==v?(R=g.jsx(En,{className:"sticky top-0 bg-background shadow",children:v}),t[14]=v,t[15]=R):R=t[15];let _;t[16]!==n||t[17]!==r||t[18]!==h?(_=(q=h.getRowModel().rows)!=null&&q.length?h.getRowModel().rows.map(Hn):g.jsx(ve,{children:g.jsx(Be,{colSpan:n.length,className:"h-24 text-center",children:r})}),t[16]=n,t[17]=r,t[18]=h,t[19]=_):_=t[19];let F;t[20]!==_?(F=g.jsx(An,{children:_}),t[20]=_,t[21]=F):F=t[21];let y;t[22]!==F||t[23]!==R?(y=g.jsxs(Dn,{children:[R,F]}),t[22]=F,t[23]=R,t[24]=y):y=t[24];let I;return t[25]!==y||t[26]!==C?(I=g.jsxs("div",{className:"rounded-md border",children:[C,y]}),t[25]=y,t[26]=C,t[27]=I):I=t[27],I}function Hn(e){return g.jsx(ve,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(Gn)},e.id)}function Gn(e){return g.jsx(Be,{children:Te(e.column.columnDef.cell,e.getContext())},e.id)}function Ln(e){return g.jsx(ve,{children:e.headers.map(kn)},e.id)}function kn(e){return g.jsx(zn,{children:e.isPlaceholder?null:Te(e.column.columnDef.header,e.getContext())},e.id)}function On(e){const t=M.c(20),{btnTitle:n,link:o,delModal:r}=e;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(k,{iconNode:lt}),t[0]=i):i=t[0];let l;t[1]!==n?(l=g.jsx(Pt,{asChild:!0,children:g.jsxs(E,{size:"list",variant:"ghost",className:"font-normal text-destructive hover:text-destructive w-full cursor-pointer justify-start",children:[i,n]})}),t[1]=n,t[2]=l):l=t[2];let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(zt,{children:"Delete"}),t[3]=s):s=t[3];let a;t[4]!==r.text?(a=g.jsxs(Et,{children:[s,g.jsx("div",{className:"mt-2 text-base",children:r.text})]}),t[4]=r.text,t[5]=a):a=t[5];let u;t[6]!==r.yes||t[7]!==o?(u=g.jsx(Ve,{asChild:!0,children:g.jsx(E,{variant:"destructive",asChild:!0,children:g.jsx(U,{href:o,children:r.yes})})}),t[6]=r.yes,t[7]=o,t[8]=u):u=t[8];let c;t[9]!==r.no?(c=g.jsx(Ve,{asChild:!0,children:g.jsx(E,{type:"button",variant:"secondary",children:r.no})}),t[9]=r.no,t[10]=c):c=t[10];let p;t[11]!==u||t[12]!==c?(p=g.jsxs(At,{children:[u,c]}),t[11]=u,t[12]=c,t[13]=p):p=t[13];let f;t[14]!==a||t[15]!==p?(f=g.jsxs(Dt,{className:"sm:max-w-[425px]",children:[a,p]}),t[14]=a,t[15]=p,t[16]=f):f=t[16];let d;return t[17]!==l||t[18]!==f?(d=g.jsxs(Vt,{children:[l,f]}),t[17]=l,t[18]=f,t[19]=d):d=t[19],d}function Tn(e,t,n,o){const r=Math.ceil(e/t),i=(n-1)*t+1,l=Math.min(n*t,e),s=[];s.push({label:"Previous",active:!1});let a=Math.max(1,n-Math.floor(o/2)),u=Math.min(r,a+o-1);u-a+1<o&&(a=Math.max(1,u-o+1));for(let c=a;c<=u;c++)s.push({label:c.toString(),active:c===n});return s.push({label:"Next",active:!1}),{total:e,per_page:t,current_page:n,last_page:r,next_page_url:n<r?!0:null,prev_page_url:n>1?!0:null,from:i,to:l,links:s,showPages:o}}const vo=()=>{var K;const e=be(),t=e.props.data,[n,o]=$.useState(!1),[r,i]=$.useState(""),[l,s]=$.useState(!1),[a,u]=$.useState(1),[c,p]=$.useState("5"),[f,d]=$.useState("1"),[m,h]=$.useState("desc"),C=$.useRef([]);$.useEffect(()=>{const S=new URLSearchParams(window.location.search);i(S.get("globalSearch")||""),s(!!S.get("globalSearch")),u(parseInt(S.get("page")||"1")),p(S.get("count")||"5"),d(S.get("column")||"1"),h(S.get("direction")||"desc");const j=S.getAll("searchColumn"),N=S.getAll("searchColumnValue");C.current=j.map((G,P)=>({key:G,value:N[P]}))},[]),$.useEffect(()=>{document.body.removeAttribute("style")},[t]);let v=[{accessorKey:"actions",header:()=>g.jsx("div",{className:"text-center",children:e.props.header.thActionsTitle}),cell:({row:S})=>{var j,N,G;return g.jsx("div",{className:"text-center",children:g.jsxs(Re,{children:[g.jsx(_e,{asChild:!0,className:"cursor-pointer",children:g.jsx(E,{variant:"outline",size:"icon",children:g.jsx(Me,{})})}),g.jsxs($e,{className:"w-46",side:"right",align:"start",children:[g.jsxs(Fe,{children:[((j=e.props.header.crudActions)==null?void 0:j.editTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsxs(U,{href:`${e.props.header.entity.uri}/edit/${S.original.id}`,children:[g.jsx(k,{iconNode:_t}),e.props.header.crudActions.editTitle]})}),((N=e.props.header.crudActions)==null?void 0:N.viewsTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsxs(U,{href:`${e.props.header.entity.uri}/view/${S.original.id}`,children:[g.jsx(k,{iconNode:xt}),e.props.header.crudActions.viewsTitle]})}),((G=e.props.header.crudActions)==null?void 0:G.deleteTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsx(On,{btnTitle:e.props.header.crudActions.deleteTitle,delModal:e.props.header.delModal,link:`${e.props.header.entity.uri}/remove/${S.original.id}?referTo=${encodeURIComponent(window.location.search)}`})})]}),e.props.header.inlineActions&&e.props.header.inlineActions.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(We,{}),e.props.header.inlineActions.map(P=>g.jsx(W,{asChild:!0,className:"cursor-pointer",children:P.type==="blank"?g.jsxs("a",{target:"_blank",href:P.link,children:[P.icon&&g.jsx(J,{name:P.icon,className:"!text-[18px] mr-2"}),g.jsx("span",{children:P.title})]}):g.jsxs(U,{href:`${P.link}/${S.original.id}?id=${S.original.id}&entity=${e.props.header.entity.name}`,children:[P.icon&&g.jsx(J,{name:P.icon,className:"!text-[18px] mr-2"}),g.jsx("span",{children:P.title})]})},P.id))]})]})]})})}}];const R=$.useMemo(()=>Tn(t.recordsFiltered,parseInt(c),a,5),[t.recordsFiltered,c,a,r]);$.useEffect(()=>{e.props.flash&&(e.props.flash.success&&ye.success(e.props.flash.success),e.props.flash.error&&ye.error(e.props.flash.error))},[e.props.flash]);const _=$.useCallback(S=>{p(S),u(1),o(!0),X.visit(`${e.props.header.entity.uri}?count=${S}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[t]),F=$.useCallback((S,j,N,G)=>{const P=S!==void 0?S:a,qe=j!==void 0?j:m,Ue=N!==void 0?N:f,we=G!==void 0?G:r,Ke=`count=${c}&page=${P}&column=${Ue}&direction=${qe}`,Xe=we?`&globalSearch=${we}`:"",Je=C.current.map(xe=>`&searchColumn=${xe.key}&searchColumnValue=${xe.value}`).join("");return`${Ke}${Xe}${Je}`},[t,c,a,f,m,r]),y=$.useCallback(S=>{u(S),o(!0),X.visit(`${e.props.header.entity.uri}?${F(S)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[F,e.props.header.entity.uri]),I=$.useCallback((S,j)=>{d(S),h(j),o(!0),X.visit(`${e.props.header.entity.uri}?${F(void 0,j,S)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[c,a,r]),q=$.useCallback(S=>{i(S),u(1)},[t]),H=$.useCallback(()=>{o(!0),X.visit(`${e.props.header.entity.uri}?${F(1)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[t,r]),ne=$.useCallback((S,j)=>{u(1);const N=C.current.findIndex(G=>G.key===S);N>=0&&C.current.splice(N,1),j&&C.current.push({key:S,value:j})},[t]),oe=()=>{s(!1),i(""),C.current=[],u(1),d("1"),h("desc"),X.visit(`${e.props.header.entity.uri}?count=${c}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})};return v=[...v,...Nt(e.props.columns,I,ne,H,l)],g.jsxs(g.Fragment,{children:[g.jsx(Ye,{position:"top-center",richColors:!0,closeButton:!0}),g.jsxs("div",{className:`flex h-auto flex-1 flex-col gap-4 rounded-xl p-4 ${n?"opacity-50":""}`,children:[g.jsxs("div",{className:"flex gap-2 sticky top-0 z-10 bg-background py-3",children:[((K=e.props.header.crudActions)==null?void 0:K.createTitle)&&g.jsx(E,{asChild:!0,children:g.jsxs(U,{href:`${e.props.header.entity.uri}/add`,prefetch:!0,children:[g.jsx(k,{iconNode:Mt}),e.props.header.crudActions.createTitle]})}),g.jsxs(E,{className:"transition-none cursor-pointer",variant:l?"destructive":"outline",onClick:()=>{l?oe():s(!0)},children:[g.jsx(k,{iconNode:l?Ft:je}),l?e.props.header.resetBtn:e.props.header.searchBtn]}),e.props.header.actions.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"gap-2 ml-6 hidden lg:flex",children:e.props.header.actions.map(S=>g.jsx(E,{asChild:!0,variant:"outline",children:S.type==="blank"?g.jsxs("a",{href:S.link,target:"_blank",children:[S.icon&&g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]}):g.jsxs(U,{href:S.link,prefetch:!0,children:[S.icon&&g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]})},S.id))||null}),g.jsx("div",{className:"block lg:hidden ml-6",children:g.jsxs(Re,{children:[g.jsx(_e,{asChild:!0,children:g.jsx(E,{variant:"outline",size:"icon",className:"cursor-pointer",children:g.jsx(Me,{})})}),g.jsx($e,{className:"w-fit",side:"right",align:"start",children:g.jsx(Fe,{className:"grid gap-2",children:e.props.header.actions.map(S=>g.jsx(E,{asChild:!0,variant:"outline",children:g.jsxs("a",{href:S.link,target:"_blank",children:[g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]})},S.id))||null})})]})})]})]}),g.jsx(Nn,{columns:v,data:t.data,searchValue:r,searchTxt:e.props.header.searchBtn,notFoundContent:e.props.header.notFoundContent,globalSearch:l,onGlobalSearch:q,handleSearch:H},new Date().getTime()),g.jsxs("div",{className:"mt-4 flex flex-wrap justify-center md:justify-between gap-4 items-end",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-1 gap-4 items-center justify-items-center md:justify-items-normal",children:[g.jsxs("p",{className:"text-sm text-foreground/70",children:["Show ",R.from," - ",R.to," of ",R.total]}),g.jsx("div",{className:"max-w-fit",children:g.jsxs(st,{onValueChange:S=>_(S),value:c,children:[g.jsx(at,{className:"w-full cursor-pointer",children:g.jsx(ut,{placeholder:c})}),g.jsx(gt,{children:["5","10","50"].map(S=>g.jsx(dt,{value:S,children:S},S))})]})})]}),g.jsx("div",{children:t.data.length>0&&g.jsx(ct,{pagination:R,pageChange:y,currentPage:a})})]})]})]})};export{vo as default};
62
+ */function Te(e,t){return e?Vn(e)?$.createElement(e,t):e:null}function Vn(e){return Pn(e)||typeof e=="function"||In(e)}function Pn(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function In(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function jn(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=$.useState(()=>({current:_n(t)})),[o,r]=$.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:l=>{r(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}function Dn(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("w-full caption-bottom text-sm",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto max-h-[65vh]",children:g.jsx("table",{"data-slot":"table",className:r,...o})}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function En(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("[&_tr]:border-b",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("thead",{"data-slot":"table-header",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function An(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("[&_tr:last-child]:border-0",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("tbody",{"data-slot":"table-body",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function ve(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("tr",{"data-slot":"table-row",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function zn(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("th",{"data-slot":"table-head",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function Be(e){const t=M.c(8);let n,o;t[0]!==e?({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]);let r;t[3]!==n?(r=z("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==o||t[6]!==r?(i=g.jsx("td",{"data-slot":"table-cell",className:r,...o}),t[5]=o,t[6]=r,t[7]=i):i=t[7],i}function Nn(e){var q;const t=M.c(28),{columns:n,data:o,notFoundContent:r,globalSearch:i,onGlobalSearch:l,searchValue:s,handleSearch:a,searchTxt:u}=e,c=i===void 0?!1:i;let p,f,d;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=$n(),f=yn(),d=Mn(),t[0]=p,t[1]=f,t[2]=d):(p=t[0],f=t[1],d=t[2]);let m;t[3]!==n||t[4]!==o?(m={data:o,columns:n,getCoreRowModel:p,getPaginationRowModel:f,getSortedRowModel:d,enableSorting:!1,manualPagination:!0},t[3]=n,t[4]=o,t[5]=m):m=t[5];const h=jn(m);let C;t[6]!==c||t[7]!==a||t[8]!==l||t[9]!==u||t[10]!==s?(C=c&&l&&g.jsxs("div",{className:"flex gap-2 p-2",children:[g.jsx(Qe,{type:"text",defaultValue:s,autoFocus:!0,placeholder:u,className:"w-full max-w-[200px] p-2 border rounded",onChange:H=>{l(H.target.value)},onKeyDown:H=>{H.key==="Enter"&&a&&a()}}),g.jsx(E,{className:"cursor-pointer",variant:"outline",size:"icon",onClick:a,children:g.jsx(k,{iconNode:je,className:"size-5"})})]}),t[6]=c,t[7]=a,t[8]=l,t[9]=u,t[10]=s,t[11]=C):C=t[11];let v;t[12]!==h?(v=h.getHeaderGroups().map(Ln),t[12]=h,t[13]=v):v=t[13];let R;t[14]!==v?(R=g.jsx(En,{className:"sticky top-0 bg-background shadow",children:v}),t[14]=v,t[15]=R):R=t[15];let _;t[16]!==n||t[17]!==r||t[18]!==h?(_=(q=h.getRowModel().rows)!=null&&q.length?h.getRowModel().rows.map(Hn):g.jsx(ve,{children:g.jsx(Be,{colSpan:n.length,className:"h-24 text-center",children:r})}),t[16]=n,t[17]=r,t[18]=h,t[19]=_):_=t[19];let F;t[20]!==_?(F=g.jsx(An,{children:_}),t[20]=_,t[21]=F):F=t[21];let y;t[22]!==F||t[23]!==R?(y=g.jsxs(Dn,{children:[R,F]}),t[22]=F,t[23]=R,t[24]=y):y=t[24];let I;return t[25]!==y||t[26]!==C?(I=g.jsxs("div",{className:"rounded-md border",children:[C,y]}),t[25]=y,t[26]=C,t[27]=I):I=t[27],I}function Hn(e){return g.jsx(ve,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(Gn)},e.id)}function Gn(e){return g.jsx(Be,{children:Te(e.column.columnDef.cell,e.getContext())},e.id)}function Ln(e){return g.jsx(ve,{children:e.headers.map(kn)},e.id)}function kn(e){return g.jsx(zn,{children:e.isPlaceholder?null:Te(e.column.columnDef.header,e.getContext())},e.id)}function On(e){const t=M.c(20),{btnTitle:n,link:o,delModal:r}=e;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(k,{iconNode:lt}),t[0]=i):i=t[0];let l;t[1]!==n?(l=g.jsx(Pt,{asChild:!0,children:g.jsxs(E,{size:"list",variant:"ghost",className:"font-normal text-destructive hover:text-destructive w-full cursor-pointer justify-start",children:[i,n]})}),t[1]=n,t[2]=l):l=t[2];let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(zt,{children:"Delete"}),t[3]=s):s=t[3];let a;t[4]!==r.text?(a=g.jsxs(Et,{children:[s,g.jsx("div",{className:"mt-2 text-base",children:r.text})]}),t[4]=r.text,t[5]=a):a=t[5];let u;t[6]!==r.yes||t[7]!==o?(u=g.jsx(Ve,{asChild:!0,children:g.jsx(E,{variant:"destructive",asChild:!0,children:g.jsx(U,{href:o,children:r.yes})})}),t[6]=r.yes,t[7]=o,t[8]=u):u=t[8];let c;t[9]!==r.no?(c=g.jsx(Ve,{asChild:!0,children:g.jsx(E,{type:"button",variant:"secondary",children:r.no})}),t[9]=r.no,t[10]=c):c=t[10];let p;t[11]!==u||t[12]!==c?(p=g.jsxs(At,{children:[u,c]}),t[11]=u,t[12]=c,t[13]=p):p=t[13];let f;t[14]!==a||t[15]!==p?(f=g.jsxs(Dt,{className:"sm:max-w-[425px]",children:[a,p]}),t[14]=a,t[15]=p,t[16]=f):f=t[16];let d;return t[17]!==l||t[18]!==f?(d=g.jsxs(Vt,{children:[l,f]}),t[17]=l,t[18]=f,t[19]=d):d=t[19],d}function Tn(e,t,n,o){const r=Math.ceil(e/t),i=(n-1)*t+1,l=Math.min(n*t,e),s=[];s.push({label:"Previous",active:!1});let a=Math.max(1,n-Math.floor(o/2)),u=Math.min(r,a+o-1);u-a+1<o&&(a=Math.max(1,u-o+1));for(let c=a;c<=u;c++)s.push({label:c.toString(),active:c===n});return s.push({label:"Next",active:!1}),{total:e,per_page:t,current_page:n,last_page:r,next_page_url:n<r?!0:null,prev_page_url:n>1?!0:null,from:i,to:l,links:s,showPages:o}}const vo=()=>{var K;const e=be(),t=e.props.data,[n,o]=$.useState(!1),[r,i]=$.useState(""),[l,s]=$.useState(!1),[a,u]=$.useState(1),[c,p]=$.useState("5"),[f,d]=$.useState("1"),[m,h]=$.useState("desc"),C=$.useRef([]);$.useEffect(()=>{const S=new URLSearchParams(window.location.search);i(S.get("globalSearch")||""),s(!!S.get("globalSearch")),u(parseInt(S.get("page")||"1")),p(S.get("count")||"5"),d(S.get("column")||"1"),h(S.get("direction")||"desc");const j=S.getAll("searchColumn"),N=S.getAll("searchColumnValue");C.current=j.map((G,P)=>({key:G,value:N[P]}))},[]),$.useEffect(()=>{document.body.removeAttribute("style")},[t]);let v=[{accessorKey:"actions",header:()=>g.jsx("div",{className:"text-center",children:e.props.header.thActionsTitle}),cell:({row:S})=>{var j,N,G;return g.jsx("div",{className:"text-center",children:g.jsxs(Re,{children:[g.jsx(_e,{asChild:!0,className:"cursor-pointer",children:g.jsx(E,{variant:"outline",size:"icon",children:g.jsx(Me,{})})}),g.jsxs($e,{className:"w-46",side:"right",align:"start",children:[g.jsxs(Fe,{children:[((j=e.props.header.crudActions)==null?void 0:j.editTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsxs(U,{href:`${e.props.header.entity.uri}/edit/${S.original.id}`,children:[g.jsx(k,{iconNode:_t}),e.props.header.crudActions.editTitle]})}),((N=e.props.header.crudActions)==null?void 0:N.viewsTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsxs(U,{href:`${e.props.header.entity.uri}/view/${S.original.id}`,children:[g.jsx(k,{iconNode:xt}),e.props.header.crudActions.viewsTitle]})}),((G=e.props.header.crudActions)==null?void 0:G.deleteTitle)&&g.jsx(W,{asChild:!0,className:"cursor-pointer",children:g.jsx(On,{btnTitle:e.props.header.crudActions.deleteTitle,delModal:e.props.header.delModal,link:`${e.props.header.entity.uri}/remove/${S.original.id}?referTo=${encodeURIComponent(window.location.search)}`})})]}),e.props.header.inlineActions&&e.props.header.inlineActions.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(We,{}),e.props.header.inlineActions.map(P=>g.jsx(W,{asChild:!0,className:"cursor-pointer",children:P.type==="blank"?g.jsxs("a",{target:"_blank",href:P.link,children:[P.icon&&g.jsx(J,{name:P.icon,className:"!text-[18px] mr-2"}),g.jsx("span",{children:P.title})]}):g.jsxs(U,{href:`${P.link}/${S.original.id}?id=${S.original.id}&entity=${e.props.header.entity.name}`,children:[P.icon&&g.jsx(J,{name:P.icon,className:"!text-[18px] mr-2"}),g.jsx("span",{children:P.title})]})},P.id))]})]})]})})}}];const R=$.useMemo(()=>Tn(t.recordsFiltered,parseInt(c),a,5),[t.recordsFiltered,c,a,r]);$.useEffect(()=>{e.props.flash&&(e.props.flash.success&&ye.success(e.props.flash.success),e.props.flash.error&&ye.error(e.props.flash.error))},[e.props.flash]);const _=$.useCallback(S=>{p(S),u(1),o(!0),X.visit(`${e.props.header.entity.uri}?count=${S}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[t]),F=$.useCallback((S,j,N,G)=>{const P=S!==void 0?S:a,qe=j!==void 0?j:m,Ue=N!==void 0?N:f,we=G!==void 0?G:r,Ke=`count=${c}&page=${P}&column=${Ue}&direction=${qe}`,Xe=we?`&globalSearch=${we}`:"",Je=C.current.map(xe=>`&searchColumn=${xe.key}&searchColumnValue=${xe.value}`).join("");return`${Ke}${Xe}${Je}`},[t,c,a,f,m,r]),y=$.useCallback(S=>{u(S),o(!0),X.visit(`${e.props.header.entity.uri}?${F(S)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[F,e.props.header.entity.uri]),I=$.useCallback((S,j)=>{d(S),h(j),o(!0),X.visit(`${e.props.header.entity.uri}?${F(void 0,j,S)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[c,a,r]),q=$.useCallback(S=>{i(S),u(1)},[t]),H=$.useCallback(()=>{o(!0),X.visit(`${e.props.header.entity.uri}?${F(1)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})},[t,r]),ne=$.useCallback((S,j)=>{u(1);const N=C.current.findIndex(G=>G.key===S);N>=0&&C.current.splice(N,1),j&&C.current.push({key:S,value:j})},[t]),oe=()=>{s(!1),i(""),C.current=[],u(1),d("1"),h("desc"),X.visit(`${e.props.header.entity.uri}?count=${c}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>o(!1)})};return v=[...v,...Nt(e.props.columns,I,ne,H,l)],g.jsxs(g.Fragment,{children:[g.jsx(Ye,{position:"top-center",richColors:!0,closeButton:!0}),g.jsxs("div",{className:`flex h-auto flex-1 flex-col gap-4 rounded-xl p-4 ${n?"opacity-50":""}`,children:[g.jsxs("div",{className:"flex gap-2 sticky top-0 z-10 bg-background py-3",children:[((K=e.props.header.crudActions)==null?void 0:K.createTitle)&&g.jsx(E,{asChild:!0,children:g.jsxs(U,{href:`${e.props.header.entity.uri}/add`,children:[g.jsx(k,{iconNode:Mt}),e.props.header.crudActions.createTitle]})}),g.jsxs(E,{className:"transition-none cursor-pointer",variant:l?"destructive":"outline",onClick:()=>{l?oe():s(!0)},children:[g.jsx(k,{iconNode:l?Ft:je}),l?e.props.header.resetBtn:e.props.header.searchBtn]}),e.props.header.actions.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"gap-2 ml-6 hidden lg:flex",children:e.props.header.actions.map(S=>g.jsx(E,{asChild:!0,variant:"outline",children:S.type==="blank"?g.jsxs("a",{href:S.link,target:"_blank",children:[S.icon&&g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]}):g.jsxs(U,{href:S.link,children:[S.icon&&g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]})},S.id))||null}),g.jsx("div",{className:"block lg:hidden ml-6",children:g.jsxs(Re,{children:[g.jsx(_e,{asChild:!0,children:g.jsx(E,{variant:"outline",size:"icon",className:"cursor-pointer",children:g.jsx(Me,{})})}),g.jsx($e,{className:"w-fit",side:"right",align:"start",children:g.jsx(Fe,{className:"grid gap-2",children:e.props.header.actions.map(S=>g.jsx(E,{asChild:!0,variant:"outline",children:g.jsxs("a",{href:S.link,target:"_blank",children:[g.jsx(J,{name:S.icon,className:"!text-[18px]"}),S.title]})},S.id))||null})})]})})]})]}),g.jsx(Nn,{columns:v,data:t.data,searchValue:r,searchTxt:e.props.header.searchBtn,notFoundContent:e.props.header.notFoundContent,globalSearch:l,onGlobalSearch:q,handleSearch:H},new Date().getTime()),g.jsxs("div",{className:"mt-4 flex flex-wrap justify-center md:justify-between gap-4 items-end",children:[g.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-1 gap-4 items-center justify-items-center md:justify-items-normal",children:[g.jsxs("p",{className:"text-sm text-foreground/70",children:["Show ",R.from," - ",R.to," of ",R.total]}),g.jsx("div",{className:"max-w-fit",children:g.jsxs(st,{onValueChange:S=>_(S),value:c,children:[g.jsx(at,{className:"w-full cursor-pointer",children:g.jsx(ut,{placeholder:c})}),g.jsx(gt,{children:["5","10","50"].map(S=>g.jsx(dt,{value:S,children:S},S))})]})})]}),g.jsx("div",{children:t.data.length>0&&g.jsx(ct,{pagination:R,pageChange:y,currentPage:a})})]})]})]})};export{vo as default};
@@ -1,4 +1,4 @@
1
- import{r as ie,q as Ke,S as qe,j as i,J as Ve}from"./app.js";import{c as We}from"./compiler-runtime-tM4jBQ-T.js";import{L as Be}from"./label-C2tlefOv.js";import{I as Ce}from"./input-DF7Ue23C.js";import{Icon as we}from"./icon-Bz9BMaD0.js";import{B as Ae}from"./button-CTOOfwvn.js";import{T as Xe,t as Je}from"./sonner-Dzckw3U3.js";import xe from"./input-error-BBygona6.js";import{i as Ye}from"./use-appearance-Co6mO0dV.js";import{c as Qe}from"./createLucideIcon-BFG25zNo.js";import{L as Ze}from"./loader-circle-Utah5tGx.js";import"./index-DEzdKGnS.js";import"./index-DUXJYtOc.js";import"./utils-DjqsqOe8.js";/**
1
+ import{r as ie,q as Ke,S as qe,j as i,J as Ve}from"./app.js";import{c as We}from"./compiler-runtime-hB6dAw2d.js";import{L as Be}from"./label-CSLFe9Bz.js";import{I as Ce}from"./input-CvRbIbk4.js";import{Icon as we}from"./icon-Dt0vBgDO.js";import{B as Ae}from"./button-C9B_5Jf_.js";import{T as Xe,t as Je}from"./sonner-BI0IFOQN.js";import xe from"./input-error-DMK7cAt7.js";import{i as Ye}from"./use-appearance-DRfIqTgw.js";import{c as Qe}from"./createLucideIcon-BFG25zNo.js";import{L as Ze}from"./loader-circle-Utah5tGx.js";import"./index-B8BS9wMC.js";import"./index-DrWfGwtf.js";import"./utils-DjqsqOe8.js";/**
2
2
  * @license lucide-react v0.485.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.