@accounter/client 0.0.8-alpha-20251030162303-87017b2c2addf0e61478260aac336b9343f15c98 → 0.0.8-alpha-20251030164843-d2f490daba879840366288d1f62974ab25081876

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 (93) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/dist/assets/{Checkbox-CLE7WylX.js → Checkbox-dSmM5Kto.js} +1 -1
  3. package/dist/assets/{MultiSelect-SsgUtHuW.js → MultiSelect-BKzjkxRf.js} +1 -1
  4. package/dist/assets/{Progress-D7j8SJRp.js → Progress-CaCuNARE.js} +1 -1
  5. package/dist/assets/{Table-DpZKU9e6.js → Table-DxJ1YCr5.js} +1 -1
  6. package/dist/assets/{Typography-DOCvIzjw.js → Typography-rzf7AKzm.js} +1 -1
  7. package/dist/assets/{YearPickerInput-BbyQMsmW.js → YearPickerInput-Bp2ytdrx.js} +1 -1
  8. package/dist/assets/{accordion-KRd9M_7N.js → accordion-B83CGJPM.js} +1 -1
  9. package/dist/assets/{accountant-approvals-BWkXiUJx.js → accountant-approvals-DRr7UYE4.js} +1 -1
  10. package/dist/assets/{accounter-table-BvOYdMv2.js → accounter-table-CLZmYCK0.js} +1 -1
  11. package/dist/assets/{addDays-HTdY9JyJ.js → addDays-DbkSn4rN.js} +1 -1
  12. package/dist/assets/{all-charges-uOrXkSoe.js → all-charges-Cn0oGAAS.js} +1 -1
  13. package/dist/assets/{arrow-up-down-D0e6luFS.js → arrow-up-down-kJRuABuk.js} +1 -1
  14. package/dist/assets/{building-2-BScQAy2y.js → building-2-DAb5H_9e.js} +1 -1
  15. package/dist/assets/{business-qHY5sNtm.js → business-DeId1elJ.js} +1 -1
  16. package/dist/assets/{business-extended-info-BPdDug4k.js → business-extended-info-u-wZchjH.js} +1 -1
  17. package/dist/assets/{business-header-ScM944FH.js → business-header-vz6RQ5nZ.js} +1 -1
  18. package/dist/assets/{business-ledger-filters-C6zdPVNQ.js → business-ledger-filters-DyyAMsOt.js} +1 -1
  19. package/dist/assets/{business-ledger-single-D_gxQY7c.js → business-ledger-single-Cy7nqs_T.js} +1 -1
  20. package/dist/assets/{business-trip-BD6qMULS.js → business-trip-CA4-OIFH.js} +1 -1
  21. package/dist/assets/{charge-CXgCTI2e.js → charge-DkSqluIG.js} +1 -1
  22. package/dist/assets/{charges-filters-DhYogrgu.js → charges-filters-Djo_kWBf.js} +1 -1
  23. package/dist/assets/{charges-ledger-validation-K96Gpr99.js → charges-ledger-validation-DvCBQB1e.js} +1 -1
  24. package/dist/assets/{charges-table-Cff0tibm.js → charges-table-D1vDT-UP.js} +1 -1
  25. package/dist/assets/{chart-Rag7RVt5.js → chart-BMSKXrwP.js} +1 -1
  26. package/dist/assets/contracts-ZJWgQOle.js +16 -0
  27. package/dist/assets/{data-table-pagination-BenxjRXY.js → data-table-pagination-BUpZwYMw.js} +1 -1
  28. package/dist/assets/{download-csv-button-8ow10rSS.js → download-csv-button-tWswwko2.js} +1 -1
  29. package/dist/assets/{edit-issue-document-modal-2d_PTbvO.js → edit-issue-document-modal-CHR5idQt.js} +1 -1
  30. package/dist/assets/{editable-business-trip-BFJ_Mqji.js → editable-business-trip-D0UrHlFI.js} +1 -1
  31. package/dist/assets/{eye-off-BNMLF-BO.js → eye-off-CGW7uC-c.js} +1 -1
  32. package/dist/assets/{funnel-DW3_rS_8.js → funnel-Bmrsutts.js} +1 -1
  33. package/dist/assets/{index-BCiHeRl-.js → index-2vL0dn5v.js} +1 -1
  34. package/dist/assets/{index-BHA96r33.js → index-B5HkjHjI.js} +1 -1
  35. package/dist/assets/{index-Bd-SKdyy.js → index-BZ8AOwEl.js} +3 -3
  36. package/dist/assets/{index-CKNxDyu9.js → index-Babx_Mc7.js} +1 -1
  37. package/dist/assets/{index-DyLWk3js.js → index-BnhjaCUg.js} +1 -1
  38. package/dist/assets/{index-lMXNkFuw.js → index-Br0GTPfc.js} +1 -1
  39. package/dist/assets/{index-4ufIi3AX.js → index-C-VKA9Ok.js} +1 -1
  40. package/dist/assets/{index-DvvRs9Ha.js → index-C7cxxohd.js} +1 -1
  41. package/dist/assets/{index-Bo2SK7RM.js → index-CUveXkuD.js} +1 -1
  42. package/dist/assets/{index-B2VI47XT.js → index-CYX2yO-u.js} +1 -1
  43. package/dist/assets/{index-B0Je179L.js → index-D1DOb6_Y.js} +1 -1
  44. package/dist/assets/{index-q3ev6JER.js → index-D7_jh5GD.js} +1 -1
  45. package/dist/assets/{index-Dp9F68vS.js → index-DSuF8jdU.js} +1 -1
  46. package/dist/assets/{index-BPS5RB7_.js → index-DTcOeWYo.js} +1 -1
  47. package/dist/assets/{index-CqIav7Xr.js → index-Dh1--D4F.js} +1 -1
  48. package/dist/assets/{index-VD71ra9C.js → index-Dkpu6Zhk.js} +1 -1
  49. package/dist/assets/{index-NdA_oCxx.js → index-DyH8FMHQ.js} +1 -1
  50. package/dist/assets/{index-BZLSFBEt.js → index-HH5Rxplr.js} +1 -1
  51. package/dist/assets/{index-BQyZXdTq.js → index-KBivZEq1.js} +1 -1
  52. package/dist/assets/{index-2unHvdGT.js → index-NS4xXWXV.js} +1 -1
  53. package/dist/assets/{index-BDUyPP2c.js → index-cC755YI-.js} +1 -1
  54. package/dist/assets/{index-CEiIgRJ2.js → index-dSI-XOHn.js} +1 -1
  55. package/dist/assets/{index-B86FoQmY.js → index-h3vstU9e.js} +1 -1
  56. package/dist/assets/{index-1iKxq5ag.js → index-tBA1vG1Y.js} +1 -1
  57. package/dist/assets/{index-Bp6IHcih.js → index-tMg1Ls6M.js} +1 -1
  58. package/dist/assets/{index.es-C9I2aTP4.js → index.es-DNpMwt0n.js} +1 -1
  59. package/dist/assets/{insert-business-trip-modal-DVcWpJHr.js → insert-business-trip-modal-4vXkqVnt.js} +1 -1
  60. package/dist/assets/issue-document-BoFHPotT.js +1 -0
  61. package/dist/assets/{list-plus-B7wBrICK.js → list-plus-CDqpqAwS.js} +1 -1
  62. package/dist/assets/{login-page-BpgscuKm.js → login-page-Bi8pRR_Y.js} +1 -1
  63. package/dist/assets/{match-document-modal-CqP2SE2c.js → match-document-modal-CETycNjj.js} +1 -1
  64. package/dist/assets/{missing-info-charges-CIs_kE3P.js → missing-info-charges-BPeEhfPv.js} +1 -1
  65. package/dist/assets/{modal-CwuHXtxz.js → modal-8mlzJehM.js} +1 -1
  66. package/dist/assets/modify-contract-dialog-DWLEVQ1d.js +1 -0
  67. package/dist/assets/{page-layout-XgNPsCmr.js → page-layout-BfCdWwql.js} +1 -1
  68. package/dist/assets/{page-not-found-CrFJMQNO.js → page-not-found-DukC1kEI.js} +1 -1
  69. package/dist/assets/{panel-top-open-DU7alj-S.js → panel-top-open-CpMFDJrl.js} +1 -1
  70. package/dist/assets/{pencil-9DTTP5vx.js → pencil-R8t4mFRO.js} +1 -1
  71. package/dist/assets/{report-commentary-row-BdS3qqMS.js → report-commentary-row-Byk41KMN.js} +1 -1
  72. package/dist/assets/{save-i8sPy_OW.js → save-BjBw7mG5.js} +1 -1
  73. package/dist/assets/{similar-transactions-modal-CZAOYt-d.js → similar-transactions-modal-BPFaQ7dD.js} +1 -1
  74. package/dist/assets/{sub-BL9nfaPD.js → sub-dol6DnIB.js} +1 -1
  75. package/dist/assets/subMonths-Cu51bw_I.js +1 -0
  76. package/dist/assets/{summary-Dfiju7xJ.js → summary-Sj8NMKlv.js} +1 -1
  77. package/dist/assets/{toggle-expansion-button-BbVh8z6s.js → toggle-expansion-button-Buzq87-g.js} +1 -1
  78. package/dist/assets/tooltip-gvPoRI4e.js +1 -0
  79. package/dist/assets/{use-url-query-5TFyEk1x.js → use-url-query-DOEL3cY1.js} +1 -1
  80. package/dist/index.html +1 -1
  81. package/package.json +1 -1
  82. package/src/components/clients/contracts/modify-contract-dialog.tsx +1 -7
  83. package/src/components/contracts/cells/date.tsx +5 -1
  84. package/src/components/contracts/columns.tsx +1 -1
  85. package/src/components/contracts/contracts-filter.tsx +8 -9
  86. package/src/components/contracts/index.tsx +0 -1
  87. package/src/components/contracts/issue-documents-modal.tsx +5 -3
  88. package/src/components/screens/businesses/clients/contracts/contracts.tsx +2 -4
  89. package/dist/assets/contracts-C26gq1yS.js +0 -16
  90. package/dist/assets/issue-document-BxTTlJ1T.js +0 -1
  91. package/dist/assets/modify-contract-dialog-BoeamC68.js +0 -1
  92. package/dist/assets/subMonths-DHPWOZP6.js +0 -1
  93. package/dist/assets/tooltip-C-fd9L1l.js +0 -1
@@ -1 +1 @@
1
- import{fM as Ct,fN as Et,fO as Nt,r as y,eQ as X,et as Dt,ep as pr,aa as m,c5 as j,c8 as P,c7 as b,c9 as T,fm as ur,fP as mr,fQ as Tt,d8 as Rt,fR as Mt,fS as At,eu as Lt,fn as kt,c6 as z,ey as Pe,d$ as gr,fT as vr,fU as Bt,er as Ie,c_ as be,eA as zt,ba as E,eR as Ht,g as _r,fV as Vt,t as H,i as yr,G as xe,j as u,d_ as Ft,fW as Ut,fX as Xt,bI as Gt,fY as Wt,ek as Kt,R as Yt,w as Ce,fZ as qt,f_ as Qt,de as F,bb as U}from"./index-Bd-SKdyy.js";import{T as Zt}from"./Table-DpZKU9e6.js";function Jt(e,r,t){const[n,o]=Ct(t?.in,e,r),a=Ee(n,o),s=Math.abs(Et(n,o));n.setDate(n.getDate()-a*s);const i=+(Ee(n,o)===-a),c=a*(s-i);return c===0?0:c}function Ee(e,r){const t=e.getFullYear()-r.getFullYear()||e.getMonth()-r.getMonth()||e.getDate()-r.getDate()||e.getHours()-r.getHours()||e.getMinutes()-r.getMinutes()||e.getSeconds()-r.getSeconds()||e.getMilliseconds()-r.getMilliseconds();return t<0?-1:t>0?1:t}function Ne(e,r,t){const n=Nt(e,t?.in);return n.setHours(r),n}function Q(e,r){let t=e;for(;(t=t.parentElement)&&!t.matches(r););return t}function en(e,r,t){for(let n=e-1;n>=0;n-=1)if(!r[n].disabled)return n;if(t){for(let n=r.length-1;n>-1;n-=1)if(!r[n].disabled)return n}return e}function rn(e,r,t){for(let n=e+1;n<r.length;n+=1)if(!r[n].disabled)return n;if(t){for(let n=0;n<r.length;n+=1)if(!r[n].disabled)return n}return e}function tn(e,r,t){return Q(e,t)===Q(r,t)}function hr({parentSelector:e,siblingSelector:r,onKeyDown:t,loop:n=!0,activateOnFocus:o=!1,dir:a="rtl",orientation:s}){return i=>{var c;t?.(i);const d=Array.from(((c=Q(i.currentTarget,e))==null?void 0:c.querySelectorAll(r))||[]).filter(_=>tn(i.currentTarget,_,e)),f=d.findIndex(_=>i.currentTarget===_),l=rn(f,d,n),v=en(f,d,n);switch(i.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{i.stopPropagation(),i.preventDefault(),d[v].focus(),o&&d[v].click();break}case"ArrowDown":{i.stopPropagation(),i.preventDefault(),d[l].focus(),o&&d[l].click();break}case"Home":{i.stopPropagation(),i.preventDefault(),!d[0].disabled&&d[0].focus();break}case"End":{i.stopPropagation(),i.preventDefault();const _=d.length-1;!d[_].disabled&&d[_].focus();break}}}}function nn(e,r,t){var n;return t?Array.from(((n=Q(t,r))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===t):null}function De(e,r){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(r);return`${e}-${t}`}}function R(e,r){return t=>{e?.(t),r?.(t)}}function on(){const[e,r]=y.useState(-1);return[e,{setHovered:r,resetHovered:()=>r(-1)}]}const Z={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[an,J]=X(Z.context);function sn({children:e,multiple:r,value:t,defaultValue:n,onChange:o,id:a,loop:s,transitionDuration:i,disableChevronRotation:c,chevronPosition:d,chevronSize:f,order:l,chevron:v,variant:_,radius:p,classNames:g,styles:h,unstyled:O}){const $=Dt(a),[w,N]=pr({value:t,defaultValue:n,finalValue:r?[]:null,onChange:o}),A=S=>Array.isArray(w)?w.includes(S):S===w,L=S=>{const k=Array.isArray(w)?w.includes(S)?w.filter(I=>I!==S):[...w,S]:S===w?null:S;N(k)};return m.createElement(an,{value:{isItemActive:A,onChange:L,getControlId:De(`${$}-control`,Z.value),getRegionId:De(`${$}-panel`,Z.value),transitionDuration:i,disableChevronRotation:c,chevronPosition:d,chevronSize:f,order:l,chevron:v,loop:s,variant:_,radius:p,classNames:g,styles:h,unstyled:O}},e)}const[ln,Or]=X(Z.itemContext);function cn(e,r,{radius:t}){const n=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3],o=e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],a=e.fn.radius(t);return r==="default"?{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderBottom:`${P(1)} solid ${n}`}:r==="contained"?{border:`${P(1)} solid ${n}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:o},"&:first-of-type":{borderTopRightRadius:a,borderTopLeftRadius:a,"& > [data-accordion-control]":{borderTopRightRadius:a,borderTopLeftRadius:a}},"&:last-of-type":{borderBottomRightRadius:a,borderBottomLeftRadius:a,"& > [data-accordion-control]":{borderBottomRightRadius:a,borderBottomLeftRadius:a}},"& + &":{borderTop:0}}:r==="filled"?{borderRadius:a,"&[data-active]":{backgroundColor:o}}:r==="separated"?{borderRadius:a,backgroundColor:o,border:`${P(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:e.spacing.md},"&[data-active]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderColor:n}}:{}}var dn=j((e,r,{variant:t})=>({item:cn(e,t,r)})),fn=Object.defineProperty,ee=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Te=(e,r,t)=>r in e?fn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,pn=(e,r)=>{for(var t in r||(r={}))$r.call(r,t)&&Te(e,t,r[t]);if(ee)for(var t of ee(r))wr.call(r,t)&&Te(e,t,r[t]);return e},un=(e,r)=>{var t={};for(var n in e)$r.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ee)for(var n of ee(e))r.indexOf(n)<0&&wr.call(e,n)&&(t[n]=e[n]);return t};const mn={},Pr=y.forwardRef((e,r)=>{const t=b("AccordionItem",mn,e),{children:n,className:o,value:a}=t,s=un(t,["children","className","value"]),i=J(),{classes:c,cx:d}=dn({radius:i.radius},{name:"Accordion",classNames:i.classNames,styles:i.styles,unstyled:i.unstyled,variant:i.variant});return m.createElement(ln,{value:{value:a}},m.createElement(T,pn({ref:r,className:d(c.item,o),"data-active":i.isItemActive(a)||void 0},s),n))});Pr.displayName="@mantine/core/AccordionItem";var gn=Object.defineProperty,vn=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,Me=(e,r,t)=>r in e?gn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,K=(e,r)=>{for(var t in r||(r={}))yn.call(r,t)&&Me(e,t,r[t]);if(Re)for(var t of Re(r))hn.call(r,t)&&Me(e,t,r[t]);return e},On=(e,r)=>vn(e,_n(r));function $n(e,r){return r==="default"||r==="contained"?e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}):{}}var wn=j((e,{transitionDuration:r,chevronPosition:t,chevronSize:n},{variant:o})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:t==="left"?0:e.spacing.sm,marginLeft:t==="left"?e.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${r}ms ease`,marginRight:t==="right"?0:e.spacing.sm,marginLeft:t==="right"?e.spacing.lg:0,width:P(n),minWidth:P(n),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.md,paddingBottom:e.spacing.md},itemTitle:{margin:0,padding:0},control:On(K(K(K({},e.fn.focusStyles()),e.fn.fontStyles()),$n(e,o)),{width:"100%",display:"flex",alignItems:"center",flexDirection:t==="right"?"row-reverse":"row",paddingRight:e.spacing.md,paddingLeft:t==="right"?`calc(${e.spacing.md} + ${P(4)})`:e.spacing.xs,textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:disabled":K({opacity:.4,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))})})),Pn=Object.defineProperty,bn=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,br=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,Ae=(e,r,t)=>r in e?Pn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Sn=(e,r)=>{for(var t in r||(r={}))br.call(r,t)&&Ae(e,t,r[t]);if(re)for(var t of re(r))xr.call(r,t)&&Ae(e,t,r[t]);return e},jn=(e,r)=>bn(e,xn(r)),In=(e,r)=>{var t={};for(var n in e)br.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&re)for(var n of re(e))r.indexOf(n)<0&&xr.call(e,n)&&(t[n]=e[n]);return t};const Cn={},Sr=y.forwardRef((e,r)=>{const t=b("AccordionControl",Cn,e),{disabled:n,onKeyDown:o,onClick:a,chevron:s,children:i,className:c,icon:d}=t,f=In(t,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),l=J(),{value:v}=Or(),{classes:_,cx:p}=wn({transitionDuration:l.transitionDuration,chevronPosition:l.chevronPosition,chevronSize:l.chevronSize,radius:l.radius},{name:"Accordion",classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),g=l.isItemActive(v),h=typeof l.order=="number",O=`h${l.order}`,$=m.createElement(ur,jn(Sn({},f),{ref:r,"data-accordion-control":!0,disabled:n,className:p(_.control,c),onClick:w=>{a?.(w),l.onChange(v)},type:"button","data-active":g||void 0,"aria-expanded":g,"aria-controls":l.getRegionId(v),id:l.getControlId(v),unstyled:l.unstyled,onKeyDown:hr({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:l.loop,orientation:"vertical",onKeyDown:o})}),m.createElement("span",{className:_.chevron,"data-rotate":!l.disableChevronRotation&&g||void 0},s||l.chevron),m.createElement("span",{className:_.label},i),d&&m.createElement("span",{className:_.icon},d));return h?m.createElement(O,{className:_.itemTitle},$):$});Sr.displayName="@mantine/core/AccordionControl";var En=Object.defineProperty,Nn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,ke=(e,r,t)=>r in e?En(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Mn=(e,r)=>{for(var t in r||(r={}))Tn.call(r,t)&&ke(e,t,r[t]);if(Le)for(var t of Le(r))Rn.call(r,t)&&ke(e,t,r[t]);return e},An=(e,r)=>Nn(e,Dn(r)),Ln=j((e,r)=>({panel:An(Mn({},e.fn.fontStyles()),{wordBreak:"break-word",lineHeight:e.lineHeight}),content:{padding:e.spacing.md,paddingTop:`calc(${e.spacing.xs} / 2)`}})),kn=Object.defineProperty,Bn=Object.defineProperties,zn=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Be=(e,r,t)=>r in e?kn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,B=(e,r)=>{for(var t in r||(r={}))jr.call(r,t)&&Be(e,t,r[t]);if(te)for(var t of te(r))Ir.call(r,t)&&Be(e,t,r[t]);return e},$e=(e,r)=>Bn(e,zn(r)),Hn=(e,r)=>{var t={};for(var n in e)jr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&te)for(var n of te(e))r.indexOf(n)<0&&Ir.call(e,n)&&(t[n]=e[n]);return t};function Vn(e){if(!e||typeof e=="string")return 0;const r=e/36;return Math.round((4+15*r**.25+r/5)*10)}function we(e){return e?.current?e.current.scrollHeight:"auto"}const Y=typeof window<"u"&&window.requestAnimationFrame;function Fn({transitionDuration:e,transitionTimingFunction:r="ease",onTransitionEnd:t=()=>{},opened:n}){const o=y.useRef(null),a=0,s={display:"none",height:0,overflow:"hidden"},[i,c]=y.useState(n?{}:s),d=p=>{Rt.flushSync(()=>c(p))},f=p=>{d(g=>B(B({},g),p))};function l(p){return{transition:`height ${e||Vn(p)}ms ${r}`}}mr(()=>{Y(n?()=>{f({willChange:"height",display:"block",overflow:"hidden"}),Y(()=>{const p=we(o);f($e(B({},l(p)),{height:p}))})}:()=>{const p=we(o);f($e(B({},l(p)),{willChange:"height",height:p})),Y(()=>f({height:a,overflow:"hidden"}))})},[n]);const v=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){const g=we(o);g===i.height?d({}):f({height:g}),t()}else i.height===a&&(d(s),t())};function _(p={}){var g=p,{style:h={},refKey:O="ref"}=g,$=Hn(g,["style","refKey"]);const w=$[O];return $e(B({"aria-hidden":!n},$),{[O]:Tt(o,w),onTransitionEnd:v,style:B(B({boxSizing:"border-box"},h),i)})}return _}var Un=Object.defineProperty,ne=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,ze=(e,r,t)=>r in e?Un(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,q=(e,r)=>{for(var t in r||(r={}))Cr.call(r,t)&&ze(e,t,r[t]);if(ne)for(var t of ne(r))Er.call(r,t)&&ze(e,t,r[t]);return e},Xn=(e,r)=>{var t={};for(var n in e)Cr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ne)for(var n of ne(e))r.indexOf(n)<0&&Er.call(e,n)&&(t[n]=e[n]);return t};const Gn={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},Nr=y.forwardRef((e,r)=>{const t=b("Collapse",Gn,e),{children:n,in:o,transitionDuration:a,transitionTimingFunction:s,style:i,onTransitionEnd:c,animateOpacity:d}=t,f=Xn(t,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),l=Mt(),v=At(),p=(l.respectReducedMotion?v:!1)?0:a,{systemStyles:g,rest:h}=Lt(f),O=Fn({opened:o,transitionDuration:p,transitionTimingFunction:s,onTransitionEnd:c});return p===0?o?m.createElement(T,q({},h),n):null:m.createElement(T,q({},O(q(q({style:i,ref:r},h),g))),m.createElement("div",{style:{opacity:o||!d?1:0,transition:d?`opacity ${p}ms ${s}`:"none"}},n))});Nr.displayName="@mantine/core/Collapse";var Wn=Object.defineProperty,Kn=Object.defineProperties,Yn=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,He=(e,r,t)=>r in e?Wn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,qn=(e,r)=>{for(var t in r||(r={}))Dr.call(r,t)&&He(e,t,r[t]);if(oe)for(var t of oe(r))Tr.call(r,t)&&He(e,t,r[t]);return e},Qn=(e,r)=>Kn(e,Yn(r)),Zn=(e,r)=>{var t={};for(var n in e)Dr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&oe)for(var n of oe(e))r.indexOf(n)<0&&Tr.call(e,n)&&(t[n]=e[n]);return t};const Jn={};function Rr(e){const r=b("AccordionPanel",Jn,e),{children:t,className:n}=r,o=Zn(r,["children","className"]),a=J(),{value:s}=Or(),{classNames:i,styles:c,unstyled:d}=J(),{classes:f,cx:l}=Ln({radius:a.radius},{name:"Accordion",classNames:i,styles:c,unstyled:d,variant:a.variant});return m.createElement(Nr,Qn(qn({},o),{className:l(f.panel,n),in:a.isItemActive(s),transitionDuration:a.transitionDuration,role:"region",id:a.getRegionId(s),"aria-labelledby":a.getControlId(s)}),m.createElement("div",{className:f.content},t))}Rr.displayName="@mantine/core/AccordionPanel";var eo=Object.defineProperty,ro=Object.defineProperties,to=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,Ve=(e,r,t)=>r in e?eo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,no=(e,r)=>{for(var t in r||(r={}))Mr.call(r,t)&&Ve(e,t,r[t]);if(ae)for(var t of ae(r))Ar.call(r,t)&&Ve(e,t,r[t]);return e},oo=(e,r)=>ro(e,to(r)),ao=(e,r)=>{var t={};for(var n in e)Mr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ae)for(var n of ae(e))r.indexOf(n)<0&&Ar.call(e,n)&&(t[n]=e[n]);return t};const so={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:m.createElement(kt,null)};function Oe(e){const r=b("Accordion",so,e),{id:t,loop:n,children:o,multiple:a,value:s,defaultValue:i,onChange:c,transitionDuration:d,disableChevronRotation:f,chevronPosition:l,chevronSize:v,order:_,chevron:p,classNames:g,styles:h,unstyled:O,variant:$,radius:w}=r,N=ao(r,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return m.createElement(sn,{id:t,multiple:a,value:s,defaultValue:i,onChange:c,loop:n,transitionDuration:d,disableChevronRotation:f,chevronPosition:l,chevronSize:v,order:_,chevron:p,variant:$,radius:w,classNames:g,styles:h,unstyled:O},m.createElement(T,oo(no({},N),{"data-accordion":!0}),o))}Oe.Item=Pr;Oe.Control=Sr;Oe.Panel=Rr;Oe.displayName="@mantine/core/Accordion";const io={xs:P(12),sm:P(18),md:P(24),lg:P(34),xl:P(42)};var lo=j((e,{color:r,transitionDuration:t},{size:n})=>{const o=z({size:n,sizes:io}),a=r||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:a,outline:`${P(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}}),co=Object.defineProperty,se=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Fe=(e,r,t)=>r in e?co(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,fo=(e,r)=>{for(var t in r||(r={}))Lr.call(r,t)&&Fe(e,t,r[t]);if(se)for(var t of se(r))kr.call(r,t)&&Fe(e,t,r[t]);return e},po=(e,r)=>{var t={};for(var n in e)Lr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&se)for(var n of se(e))r.indexOf(n)<0&&kr.call(e,n)&&(t[n]=e[n]);return t};const uo={size:"md",transitionDuration:300},Br=y.forwardRef((e,r)=>{const t=b("Burger",uo,e),{className:n,opened:o,color:a,size:s,classNames:i,styles:c,transitionDuration:d,variant:f}=t,l=po(t,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:v,cx:_}=lo({color:a,transitionDuration:d},{classNames:i,styles:c,name:"Burger",variant:f,size:s});return m.createElement(ur,fo({className:_(v.root,n),ref:r},l),m.createElement("div",{"data-opened":o||void 0,className:v.burger}))});Br.displayName="@mantine/core/Burger";const zr=y.createContext({padding:0}),mo=zr.Provider,go=()=>y.useContext(zr).padding;var vo=j((e,{padding:r,withBorder:t,inheritPadding:n})=>{const o=z({size:r,sizes:e.spacing}),a=`calc(-1 * ${o})`,s=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{cardSection:{display:"block",marginLeft:a,marginRight:a,paddingLeft:n?o:void 0,paddingRight:n?o:void 0,borderTop:t?`${P(1)} solid ${s}`:void 0,borderBottom:t?`${P(1)} solid ${s}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:a,borderTop:0,borderBottom:t?`${P(1)} solid ${s}`:void 0},"&[data-last]":{marginBottom:a,borderBottom:0}}}}),_o=Object.defineProperty,ie=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Ue=(e,r,t)=>r in e?_o(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,yo=(e,r)=>{for(var t in r||(r={}))Hr.call(r,t)&&Ue(e,t,r[t]);if(ie)for(var t of ie(r))Vr.call(r,t)&&Ue(e,t,r[t]);return e},ho=(e,r)=>{var t={};for(var n in e)Hr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ie)for(var n of ie(e))r.indexOf(n)<0&&Vr.call(e,n)&&(t[n]=e[n]);return t};const Oo={withBorder:!1,inheritPadding:!1},Fr=y.forwardRef((e,r)=>{const t=b("CardSection",Oo,e),{className:n,withBorder:o,inheritPadding:a,unstyled:s,variant:i}=t,c=ho(t,["className","withBorder","inheritPadding","unstyled","variant"]),{classes:d,cx:f}=vo({padding:go(),withBorder:o,inheritPadding:a},{name:"Card",unstyled:s,variant:i});return m.createElement(T,yo({className:f(d.cardSection,n),ref:r},c))});Fr.displayName="@mantine/core/CardSection";const Ur=Pe(Fr);var $o=j(e=>({root:{position:"relative",overflow:"hidden",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}})),wo=Object.defineProperty,le=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Xe=(e,r,t)=>r in e?wo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Po=(e,r)=>{for(var t in r||(r={}))Xr.call(r,t)&&Xe(e,t,r[t]);if(le)for(var t of le(r))Gr.call(r,t)&&Xe(e,t,r[t]);return e},bo=(e,r)=>{var t={};for(var n in e)Xr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&le)for(var n of le(e))r.indexOf(n)<0&&Gr.call(e,n)&&(t[n]=e[n]);return t};const xo={padding:"md"},Se=y.forwardRef((e,r)=>{const t=b("Card",xo,e),{className:n,padding:o,radius:a,children:s,unstyled:i,variant:c}=t,d=bo(t,["className","padding","radius","children","unstyled","variant"]),{classes:f,cx:l}=$o(null,{name:"Card",unstyled:i,variant:c}),v=y.Children.toArray(s),_=v.map((p,g)=>typeof p=="object"&&p&&"type"in p&&p.type===Ur?y.cloneElement(p,{variant:c,padding:o,"data-first":g===0||void 0,"data-last":g===v.length-1||void 0}):p);return m.createElement(mo,{value:{padding:o}},m.createElement(gr,Po({className:l(f.root,n),radius:a,p:o,ref:r},d),_))});Se.Section=Ur;Se.displayName="@mantine/core/Card";const us=Pe(Se),[So,jo]=X("Grid component was not found in tree");var Io=Object.defineProperty,Ge=Object.getOwnPropertySymbols,Co=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,We=(e,r,t)=>r in e?Io(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,No=(e,r)=>{for(var t in r||(r={}))Co.call(r,t)&&We(e,t,r[t]);if(Ge)for(var t of Ge(r))Eo.call(r,t)&&We(e,t,r[t]);return e};const je=(e,r)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(r/e)}%`:void 0,Wr=(e,r,t)=>t||e==="auto"||e==="content"?"unset":je(e,r),Kr=(e,r)=>{if(e)return e==="auto"||r?1:0},Yr=(e,r)=>e===0?0:e?`${100/(r/e)}%`:void 0,qr=(e,r)=>typeof e<"u"?`calc(${z({size:e,sizes:r.spacing})} / 2)`:void 0;function Do({sizes:e,offsets:r,orders:t,theme:n,columns:o,gutters:a,grow:s}){return vr.reduce((i,c)=>(i[`@media (min-width: ${Bt(n.breakpoints[c])})`]={order:t[c],flexBasis:je(e[c],o),padding:qr(a[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:Wr(e[c],o,s),marginLeft:Yr(r[c],o),flexGrow:Kr(e[c],s)},i),{})}var To=j((e,{gutter:r,gutterXs:t,gutterSm:n,gutterMd:o,gutterLg:a,gutterXl:s,grow:i,offset:c,offsetXs:d,offsetSm:f,offsetMd:l,offsetLg:v,offsetXl:_,columns:p,span:g,xs:h,sm:O,md:$,lg:w,xl:N,order:A,orderXs:L,orderSm:S,orderMd:k,orderLg:I,orderXl:x})=>({col:No({boxSizing:"border-box",flexGrow:Kr(g,i),order:A,padding:qr(r,e),marginLeft:Yr(c,p),flexBasis:je(g,p),flexShrink:0,width:g==="content"?"auto":void 0,maxWidth:Wr(g,p,i)},Do({sizes:{xs:h,sm:O,md:$,lg:w,xl:N},offsets:{xs:d,sm:f,md:l,lg:v,xl:_},orders:{xs:L,sm:S,md:k,lg:I,xl:x},gutters:{xs:t,sm:n,md:o,lg:a,xl:s},theme:e,columns:p,grow:i}))})),Ro=Object.defineProperty,ce=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Ke=(e,r,t)=>r in e?Ro(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Mo=(e,r)=>{for(var t in r||(r={}))Qr.call(r,t)&&Ke(e,t,r[t]);if(ce)for(var t of ce(r))Zr.call(r,t)&&Ke(e,t,r[t]);return e},Ao=(e,r)=>{var t={};for(var n in e)Qr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))r.indexOf(n)<0&&Zr.call(e,n)&&(t[n]=e[n]);return t};const Lo={};function ko(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jr=y.forwardRef((e,r)=>{const t=b("GridCol",Lo,e),{children:n,span:o,offset:a,offsetXs:s,offsetSm:i,offsetMd:c,offsetLg:d,offsetXl:f,xs:l,sm:v,md:_,lg:p,xl:g,order:h,orderXs:O,orderSm:$,orderMd:w,orderLg:N,orderXl:A,className:L,unstyled:S,variant:k}=t,I=Ao(t,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),x=jo(),M=o||x.columns,{classes:V,cx:W}=To({gutter:x.gutter,gutterXs:x.gutterXs,gutterSm:x.gutterSm,gutterMd:x.gutterMd,gutterLg:x.gutterLg,gutterXl:x.gutterXl,offset:a,offsetXs:s,offsetSm:i,offsetMd:c,offsetLg:d,offsetXl:f,xs:l,sm:v,md:_,lg:p,xl:g,order:h,orderXs:O,orderSm:$,orderMd:w,orderLg:N,orderXl:A,grow:x.grow,columns:x.columns,span:M},{unstyled:S,name:"Grid",variant:k});return!ko(M)||M>x.columns?null:m.createElement(T,Mo({className:W(V.col,L),ref:r},I),n)});Jr.displayName="@mantine/core/Col";var Bo=Object.defineProperty,Ye=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable,qe=(e,r,t)=>r in e?Bo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Vo=(e,r)=>{for(var t in r||(r={}))zo.call(r,t)&&qe(e,t,r[t]);if(Ye)for(var t of Ye(r))Ho.call(r,t)&&qe(e,t,r[t]);return e};function Fo(e,r){return vr.reduce((t,n)=>(typeof e[n]<"u"&&(t[`@media (min-width: ${r.breakpoints[n]})`]={margin:`calc(-${z({size:e[n],sizes:r.spacing})} / 2)`}),t),{})}var Uo=j((e,{justify:r,align:t,gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c})=>({root:Vo({margin:`calc(-${z({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:r,alignItems:t},Fo({xs:o,sm:a,md:s,lg:i,xl:c},e))})),Xo=Object.defineProperty,de=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Qe=(e,r,t)=>r in e?Xo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Go=(e,r)=>{for(var t in r||(r={}))et.call(r,t)&&Qe(e,t,r[t]);if(de)for(var t of de(r))rt.call(r,t)&&Qe(e,t,r[t]);return e},Wo=(e,r)=>{var t={};for(var n in e)et.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&de)for(var n of de(e))r.indexOf(n)<0&&rt.call(e,n)&&(t[n]=e[n]);return t};const Ko={gutter:"md",justify:"flex-start",align:"stretch",columns:12},C=y.forwardRef((e,r)=>{const t=b("Grid",Ko,e),{gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c,children:d,grow:f,justify:l,align:v,columns:_,className:p,unstyled:g,variant:h}=t,O=Wo(t,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:$,cx:w}=Uo({gutter:n,justify:l,align:v,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c},{unstyled:g,name:"Grid",variant:h});return m.createElement(So,{value:{gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c,grow:f,columns:_}},m.createElement(T,Go({className:w($.root,p),ref:r},O),d))});C.Col=Jr;C.displayName="@mantine/core/Grid";function Yo({open:e,close:r,openDelay:t,closeDelay:n}){const o=y.useRef(-1),a=y.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(a.current)},i=()=>{s(),t===0?e():o.current=window.setTimeout(e,t)},c=()=>{s(),n===0?r():a.current=window.setTimeout(r,n)};return y.useEffect(()=>s,[]),{openDropdown:i,closeDropdown:c}}const[qo,Qo]=X("List component was not found in tree");var Zo=j((e,{spacing:r,center:t})=>({itemWrapper:{ref:Ie("itemWrapper"),display:"inline-flex",flexDirection:"column",whiteSpace:"normal"},item:{whiteSpace:"nowrap",lineHeight:t?1:e.lineHeight,"&:not(:first-of-type)":{marginTop:z({size:r,sizes:e.spacing})},"&[data-with-icon]":{listStyle:"none",[`& .${Ie("itemWrapper")}`]:{display:"inline-flex",alignItems:t?"center":"flex-start",flexDirection:"row"}}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}})),Jo=Object.defineProperty,fe=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,Ze=(e,r,t)=>r in e?Jo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ea=(e,r)=>{for(var t in r||(r={}))tt.call(r,t)&&Ze(e,t,r[t]);if(fe)for(var t of fe(r))nt.call(r,t)&&Ze(e,t,r[t]);return e},ra=(e,r)=>{var t={};for(var n in e)tt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&fe)for(var n of fe(e))r.indexOf(n)<0&&nt.call(e,n)&&(t[n]=e[n]);return t};const ta={},ot=y.forwardRef((e,r)=>{const t=b("ListItem",ta,e),{className:n,children:o,icon:a}=t,s=ra(t,["className","children","icon"]),{icon:i,spacing:c,center:d,listStyleType:f,size:l,withPadding:v,classNames:_,styles:p,unstyled:g,variant:h}=Qo(),O=a||i,{classes:$,cx:w}=Zo({withPadding:v,listStyleType:f,center:d,spacing:c},{classNames:_,styles:p,unstyled:g,name:"List",variant:h,size:l});return m.createElement(T,ea({component:"li",className:w($.item,n),"data-with-icon":!!O||void 0,ref:r},s),m.createElement("div",{className:$.itemWrapper},O&&m.createElement("span",{className:$.itemIcon},O),m.createElement("span",null,o)))});ot.displayName="@mantine/core/ListItem";var na=Object.defineProperty,oa=Object.defineProperties,aa=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,sa=Object.prototype.hasOwnProperty,ia=Object.prototype.propertyIsEnumerable,er=(e,r,t)=>r in e?na(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,la=(e,r)=>{for(var t in r||(r={}))sa.call(r,t)&&er(e,t,r[t]);if(Je)for(var t of Je(r))ia.call(r,t)&&er(e,t,r[t]);return e},ca=(e,r)=>oa(e,aa(r)),da=j((e,{withPadding:r,listStyleType:t},{size:n})=>({root:ca(la({},e.fn.fontStyles()),{listStyleType:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:z({size:n,sizes:e.fontSizes}),lineHeight:e.lineHeight,margin:0,paddingLeft:r?e.spacing.xl:0,listStylePosition:"inside"})})),fa=Object.defineProperty,pe=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,rr=(e,r,t)=>r in e?fa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,pa=(e,r)=>{for(var t in r||(r={}))at.call(r,t)&&rr(e,t,r[t]);if(pe)for(var t of pe(r))st.call(r,t)&&rr(e,t,r[t]);return e},ua=(e,r)=>{var t={};for(var n in e)at.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&pe)for(var n of pe(e))r.indexOf(n)<0&&st.call(e,n)&&(t[n]=e[n]);return t};const ma={type:"unordered",size:"md",spacing:0},ue=y.forwardRef((e,r)=>{const t=b("List",ma,e),{children:n,type:o,size:a,listStyleType:s,withPadding:i,center:c,spacing:d,icon:f,className:l,styles:v,classNames:_,unstyled:p,variant:g}=t,h=ua(t,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled","variant"]),{classes:O,cx:$}=da({withPadding:i,listStyleType:s,center:c,spacing:d},{classNames:_,styles:v,name:"List",unstyled:p,size:a,variant:g});return m.createElement(qo,{value:{spacing:d,center:c,icon:f,listStyleType:s,size:a,withPadding:i,classNames:_,styles:v,unstyled:p,variant:g}},m.createElement(T,pa({component:o==="unordered"?"ul":"ol",className:$(O.root,l),ref:r},h),n))});ue.Item=ot;ue.displayName="@mantine/core/List";const it={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[ga,G]=X(it.context);var va=j(e=>({divider:{marginTop:P(4),marginBottom:P(4),borderTop:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}})),_a=Object.defineProperty,me=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,tr=(e,r,t)=>r in e?_a(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ya=(e,r)=>{for(var t in r||(r={}))lt.call(r,t)&&tr(e,t,r[t]);if(me)for(var t of me(r))ct.call(r,t)&&tr(e,t,r[t]);return e},ha=(e,r)=>{var t={};for(var n in e)lt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&me)for(var n of me(e))r.indexOf(n)<0&&ct.call(e,n)&&(t[n]=e[n]);return t};const Oa={},dt=y.forwardRef((e,r)=>{const t=b("MenuDivider",Oa,e),{children:n,className:o}=t,a=ha(t,["children","className"]),{classNames:s,styles:i,unstyled:c,variant:d}=G(),{classes:f,cx:l}=va(null,{name:"Menu",classNames:s,styles:i,unstyled:c,variant:d});return m.createElement(T,ya({className:l(f.divider,o),ref:r},a))});dt.displayName="@mantine/core/MenuDivider";var $a=Object.defineProperty,ge=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,nr=(e,r,t)=>r in e?$a(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,wa=(e,r)=>{for(var t in r||(r={}))ft.call(r,t)&&nr(e,t,r[t]);if(ge)for(var t of ge(r))pt.call(r,t)&&nr(e,t,r[t]);return e},Pa=(e,r)=>{var t={};for(var n in e)ft.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))r.indexOf(n)<0&&pt.call(e,n)&&(t[n]=e[n]);return t};const ba={};function ut(e){const r=b("MenuDropdown",ba,e),{children:t,onMouseEnter:n,onMouseLeave:o}=r,a=Pa(r,["children","onMouseEnter","onMouseLeave"]),s=y.useRef(),i=G(),c=l=>{var v;(l.key==="ArrowUp"||l.key==="ArrowDown")&&(l.preventDefault(),(v=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||v.focus())},d=R(n,()=>i.trigger==="hover"&&i.openDropdown()),f=R(o,()=>i.trigger==="hover"&&i.closeDropdown());return m.createElement(be.Dropdown,wa({onMouseEnter:d,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},a),m.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},t))}ut.displayName="@mantine/core/MenuDropdown";var xa=Object.defineProperty,Sa=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,or=Object.getOwnPropertySymbols,Ia=Object.prototype.hasOwnProperty,Ca=Object.prototype.propertyIsEnumerable,ar=(e,r,t)=>r in e?xa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ea=(e,r)=>{for(var t in r||(r={}))Ia.call(r,t)&&ar(e,t,r[t]);if(or)for(var t of or(r))Ca.call(r,t)&&ar(e,t,r[t]);return e},Na=(e,r)=>Sa(e,ja(r)),Da=j((e,{color:r,radius:t})=>({item:Na(Ea({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(t),color:r?e.fn.variant({variant:"filled",primaryFallback:!1,color:r}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:r?e.fn.variant({variant:"light",color:r}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}})),Ta=Object.defineProperty,Ra=Object.defineProperties,Ma=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,sr=(e,r,t)=>r in e?Ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Aa=(e,r)=>{for(var t in r||(r={}))mt.call(r,t)&&sr(e,t,r[t]);if(ve)for(var t of ve(r))gt.call(r,t)&&sr(e,t,r[t]);return e},La=(e,r)=>Ra(e,Ma(r)),ka=(e,r)=>{var t={};for(var n in e)mt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ve)for(var n of ve(e))r.indexOf(n)<0&&gt.call(e,n)&&(t[n]=e[n]);return t};const Ba={},vt=y.forwardRef((e,r)=>{const t=b("MenuItem",Ba,e),{children:n,className:o,color:a,closeMenuOnClick:s,icon:i,rightSection:c}=t,d=ka(t,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=G(),{classes:l,cx:v,theme:_}=Da({radius:f.radius,color:a},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),p=y.useRef(),g=f.getItemIndex(p.current),h=d,O=R(h.onMouseLeave,()=>f.setHovered(-1)),$=R(h.onMouseEnter,()=>f.setHovered(f.getItemIndex(p.current))),w=R(h.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),N=R(h.onFocus,()=>f.setHovered(f.getItemIndex(p.current)));return m.createElement(T,La(Aa({component:"button",type:"button"},d),{tabIndex:-1,onFocus:N,className:v(l.item,o),ref:zt(p,r),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===g?!0:void 0,onMouseEnter:$,onMouseLeave:O,onClick:w,onKeyDown:hr({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:_.dir,orientation:"vertical",onKeyDown:h.onKeydown})}),i&&m.createElement("div",{className:l.itemIcon},i),n&&m.createElement("div",{className:l.itemLabel},n),c&&m.createElement("div",{className:l.itemRightSection},c))});vt.displayName="@mantine/core/MenuItem";const za=Pe(vt);var Ha=j(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}})),Va=Object.defineProperty,_e=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ir=(e,r,t)=>r in e?Va(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Fa=(e,r)=>{for(var t in r||(r={}))_t.call(r,t)&&ir(e,t,r[t]);if(_e)for(var t of _e(r))yt.call(r,t)&&ir(e,t,r[t]);return e},Ua=(e,r)=>{var t={};for(var n in e)_t.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))r.indexOf(n)<0&&yt.call(e,n)&&(t[n]=e[n]);return t};const Xa={},ht=y.forwardRef((e,r)=>{const t=b("MenuLabel",Xa,e),{children:n,className:o}=t,a=Ua(t,["children","className"]),{classNames:s,styles:i,unstyled:c,variant:d}=G(),{classes:f,cx:l}=Ha(null,{name:"Menu",classNames:s,styles:i,unstyled:c,variant:d});return m.createElement(E,Fa({className:l(f.label,o),ref:r},a),n)});ht.displayName="@mantine/core/MenuLabel";var Ga=Object.defineProperty,ye=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,lr=(e,r,t)=>r in e?Ga(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Wa=(e,r)=>{for(var t in r||(r={}))Ot.call(r,t)&&lr(e,t,r[t]);if(ye)for(var t of ye(r))$t.call(r,t)&&lr(e,t,r[t]);return e},Ka=(e,r)=>{var t={};for(var n in e)Ot.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))r.indexOf(n)<0&&$t.call(e,n)&&(t[n]=e[n]);return t};const Ya={refProp:"ref"},wt=y.forwardRef((e,r)=>{const t=b("MenuTarget",Ya,e),{children:n,refProp:o}=t,a=Ka(t,["children","refProp"]);if(!Ht(n))throw new Error(it.children);const s=G(),i=R(n.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=R(n.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),d=R(n.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return m.createElement(be.Target,Wa({refProp:o,popupType:"menu",ref:r},a),y.cloneElement(n,{onClick:i,onMouseEnter:c,onMouseLeave:d,"data-expanded":s.opened?!0:void 0}))});wt.displayName="@mantine/core/MenuTarget";var qa=j({dropdown:{padding:P(4)}}),Qa=Object.defineProperty,Za=Object.defineProperties,Ja=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,cr=(e,r,t)=>r in e?Qa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,dr=(e,r)=>{for(var t in r||(r={}))Pt.call(r,t)&&cr(e,t,r[t]);if(he)for(var t of he(r))bt.call(r,t)&&cr(e,t,r[t]);return e},fr=(e,r)=>Za(e,Ja(r)),es=(e,r)=>{var t={};for(var n in e)Pt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&he)for(var n of he(e))r.indexOf(n)<0&&bt.call(e,n)&&(t[n]=e[n]);return t};const rs={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function D(e){const r=b("Menu",rs,e),{children:t,onOpen:n,onClose:o,opened:a,defaultOpened:s,onChange:i,closeOnItemClick:c,loop:d,closeOnEscape:f,trigger:l,openDelay:v,closeDelay:_,classNames:p,styles:g,unstyled:h,radius:O,variant:$}=r,w=es(r,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:N,cx:A}=qa(),[L,{setHovered:S,resetHovered:k}]=on(),[I,x]=pr({value:a,defaultValue:s,finalValue:!1,onChange:i}),M=()=>{x(!1),I&&o?.()},V=()=>{x(!0),!I&&n?.()},W=()=>I?M():V(),{openDropdown:xt,closeDropdown:St}=Yo({open:V,close:M,closeDelay:_,openDelay:v}),jt=It=>nn("[data-menu-item]","[data-menu-dropdown]",It);return mr(()=>{k()},[I]),m.createElement(ga,{value:{opened:I,toggleDropdown:W,getItemIndex:jt,hovered:L,setHovered:S,closeOnItemClick:c,closeDropdown:l==="click"?M:St,openDropdown:l==="click"?V:xt,closeDropdownImmediately:M,loop:d,trigger:l,radius:O,classNames:p,styles:g,unstyled:h,variant:$}},m.createElement(be,fr(dr({},w),{radius:O,opened:I,onChange:W,defaultOpened:s,trapFocus:l==="click"&&I,closeOnEscape:f&&l==="click",__staticSelector:"Menu",classNames:fr(dr({},p),{dropdown:A(N.dropdown,p?.dropdown)}),styles:g,unstyled:h,variant:$}),t))}D.displayName="@mantine/core/Menu";D.Item=za;D.Label=ht;D.Dropdown=ut;D.Target=wt;D.Divider=dt;const ts="updateBusinessTripAccountantApproval",ns=()=>{const[{fetching:e},r]=_r(Vt),t=y.useCallback(async n=>{const o=`Error toggling accountant approval for trip [${n.businessTripId}]`,a=`${ts}-${n.businessTripId}`;H.loading("Updating accountant approval status",{id:a});try{const s=await r(n),i=yr(s,o,a);if(i)return H.success("Success",{id:a,description:"Accountant approval status updated"}),i.updateBusinessTripAccountantApproval}catch(s){console.error(`${o}: ${s}`),H.error("Error",{id:a,description:o,duration:1e5,closeButton:!0})}},[r]);return{fetching:e,updateBusinessTripAccountantApproval:t}};function os({data:e,onChange:r}){const t=xe(Ut,e),[n,o]=y.useState(t.accountantApproval),{updateBusinessTripAccountantApproval:a}=ns();return y.useEffect(()=>{n==null&&t.accountantApproval!=null&&o(t.accountantApproval)},[n,t.accountantApproval]),u.jsx(Ft,{value:n,onChange:s=>a({businessTripId:t.id,status:s}).then(r)})}const as="creditShareholdersBusinessTripTravelAndSubsistence",ss=()=>{const[{fetching:e},r]=_r(Xt),t=y.useCallback(async n=>{const o=`Error crediting shareholders for trip ID ${n.businessTripId}`,a=`${as}-${n.businessTripId}`;H.loading("Crediting Shareholders",{id:a});try{const s=await r(n),i=yr(s,o,a);i&&H.success("Shareholders Credited",{id:a,description:`${i.creditShareholdersBusinessTripTravelAndSubsistence.length} Corresponding charges were successfully generated`})}catch(s){console.error(`${o}: ${s}`),H.error("Error",{id:a,description:o,duration:1e5,closeButton:!0})}},[r]);return{fetching:e,creditShareholders:t}};function is({businessTripId:e}){const[r,t]=y.useState(!1),{creditShareholders:n}=ss();return u.jsxs(D,{shadow:"md",width:200,opened:r,children:[u.jsx(D.Target,{children:u.jsx(Br,{opened:r,onClick:o=>{o.stopPropagation(),t(a=>!a)}})}),u.jsxs(D.Dropdown,{children:[u.jsx(D.Label,{children:"Summarize Trip"}),u.jsx(Gt,{onConfirm:()=>{n({businessTripId:e})},title:"Credit shareholders with travel and subsistence surplus?",children:u.jsx(D.Item,{icon:u.jsx(Wt,{size:14}),children:"Credit surplus T&S"})})]})]})}const ms=({data:e,onChange:r})=>{const t=xe(qt,e),{name:n,dates:o,purpose:a,destination:s}=t;return u.jsxs(C,{children:[u.jsxs(C.Col,{span:12,className:"flex flex-row justify-between items-center",children:[u.jsx(E,{fz:"xl",children:n}),u.jsxs("div",{className:"flex flex-row gap-2",children:[u.jsx(os,{data:t,onChange:r}),u.jsx(Kt,{isLink:!0,content:`${window.location.origin}${Yt.BUSINESS_TRIPS.DETAIL(t.id)}`}),u.jsx(is,{businessTripId:t.id})]})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["From Date:",u.jsx(E,{fz:"lg",children:o?.start?Ce(new Date(o.start),"dd/MM/yy"):"Missing"})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["To Date:",u.jsx(E,{fz:"lg",children:o?.end?Ce(new Date(o.end),"dd/MM/yy"):"Missing"})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["Destination:",u.jsx(E,{fz:"lg",children:s?.name})]}),u.jsxs(C.Col,{xl:4,lg:6,md:12,orderMd:6,children:["Description:",u.jsx(E,{fz:"lg",children:a})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["Total Days:",u.jsx(E,{fz:"lg",children:o?ls(o.start,o.end):"Missing"})]})]})};function ls(e,r){return Jt(Ne(new Date(r),22),Ne(new Date(e),6))+1}function cs(e){return e.split("_").map(ds).join(" ")}function ds(e){return e.slice(0,1).toUpperCase()+e.slice(1,e.length).toLowerCase()}const gs=({data:e})=>{const{summary:r}=xe(Qt,e);return r?u.jsxs("div",{className:"flex flex-col gap-2 mt-5",children:[r.errors?.length&&u.jsxs(gr,{shadow:"xs",p:"md",children:[u.jsx(E,{c:"red",children:"Errors:"}),u.jsx(ue,{size:"sm",withPadding:!0,children:r.errors.map((t,n)=>u.jsx(ue.Item,{children:u.jsx(E,{c:"red",children:t})},n))})]}),u.jsxs(Zt,{highlightOnHover:!0,withBorder:!0,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Expense Type"}),u.jsxs("th",{children:["Total ",F(U.Usd)]}),u.jsxs("th",{children:["Total ",F(U.Ils)]}),u.jsxs("th",{children:["Max Taxable ",F(U.Usd)]}),u.jsxs("th",{children:["Taxable ",F(U.Usd)]}),u.jsxs("th",{children:["Taxable ",F(U.Ils)]}),u.jsx("th",{children:"Excess Expenditure"})]})}),u.jsx("tbody",{children:r.rows.map(t=>u.jsxs("tr",{children:[u.jsx("td",{children:cs(t.type)}),u.jsx("td",{children:t.totalForeignCurrency?.formatted}),u.jsx("td",{children:t.totalLocalCurrency?.formatted}),u.jsx("td",{children:t.maxTaxableForeignCurrency?.formatted}),u.jsx("td",{children:t.taxableForeignCurrency?.formatted}),u.jsx("td",{children:t.taxableLocalCurrency?.formatted}),u.jsx("td",{children:t.excessExpenditure?.formatted})]},t.type))})]}),u.jsxs(C,{justify:"flex-end",children:[u.jsxs(C.Col,{lg:2,md:4,children:["Excess Expenditure Tax:",u.jsxs(E,{fz:"lg",children:[r.excessTax??"0","%"]})]}),u.jsx(C.Col,{lg:2,md:3,className:"flex flex-col justify-end",children:u.jsx(E,{fz:"lg",children:r.excessExpenditure?.formatted??"0.00"})})]})]}):u.jsx(E,{children:"Loading..."})};export{Oe as A,Br as B,us as C,C as G,ue as L,D as M,ms as R,gs as S,Nr as a};
1
+ import{fM as Ct,fN as Et,fO as Nt,r as y,eQ as X,et as Dt,ep as pr,aa as m,c5 as j,c8 as P,c7 as b,c9 as T,fm as ur,fP as mr,fQ as Tt,d8 as Rt,fR as Mt,fS as At,eu as Lt,fn as kt,c6 as z,ey as Pe,d$ as gr,fT as vr,fU as Bt,er as Ie,c_ as be,eA as zt,ba as E,eR as Ht,g as _r,fV as Vt,t as H,i as yr,G as xe,j as u,d_ as Ft,fW as Ut,fX as Xt,bI as Gt,fY as Wt,ek as Kt,R as Yt,w as Ce,fZ as qt,f_ as Qt,de as F,bb as U}from"./index-BZ8AOwEl.js";import{T as Zt}from"./Table-DxJ1YCr5.js";function Jt(e,r,t){const[n,o]=Ct(t?.in,e,r),a=Ee(n,o),s=Math.abs(Et(n,o));n.setDate(n.getDate()-a*s);const i=+(Ee(n,o)===-a),c=a*(s-i);return c===0?0:c}function Ee(e,r){const t=e.getFullYear()-r.getFullYear()||e.getMonth()-r.getMonth()||e.getDate()-r.getDate()||e.getHours()-r.getHours()||e.getMinutes()-r.getMinutes()||e.getSeconds()-r.getSeconds()||e.getMilliseconds()-r.getMilliseconds();return t<0?-1:t>0?1:t}function Ne(e,r,t){const n=Nt(e,t?.in);return n.setHours(r),n}function Q(e,r){let t=e;for(;(t=t.parentElement)&&!t.matches(r););return t}function en(e,r,t){for(let n=e-1;n>=0;n-=1)if(!r[n].disabled)return n;if(t){for(let n=r.length-1;n>-1;n-=1)if(!r[n].disabled)return n}return e}function rn(e,r,t){for(let n=e+1;n<r.length;n+=1)if(!r[n].disabled)return n;if(t){for(let n=0;n<r.length;n+=1)if(!r[n].disabled)return n}return e}function tn(e,r,t){return Q(e,t)===Q(r,t)}function hr({parentSelector:e,siblingSelector:r,onKeyDown:t,loop:n=!0,activateOnFocus:o=!1,dir:a="rtl",orientation:s}){return i=>{var c;t?.(i);const d=Array.from(((c=Q(i.currentTarget,e))==null?void 0:c.querySelectorAll(r))||[]).filter(_=>tn(i.currentTarget,_,e)),f=d.findIndex(_=>i.currentTarget===_),l=rn(f,d,n),v=en(f,d,n);switch(i.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{i.stopPropagation(),i.preventDefault(),d[v].focus(),o&&d[v].click();break}case"ArrowDown":{i.stopPropagation(),i.preventDefault(),d[l].focus(),o&&d[l].click();break}case"Home":{i.stopPropagation(),i.preventDefault(),!d[0].disabled&&d[0].focus();break}case"End":{i.stopPropagation(),i.preventDefault();const _=d.length-1;!d[_].disabled&&d[_].focus();break}}}}function nn(e,r,t){var n;return t?Array.from(((n=Q(t,r))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===t):null}function De(e,r){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(r);return`${e}-${t}`}}function R(e,r){return t=>{e?.(t),r?.(t)}}function on(){const[e,r]=y.useState(-1);return[e,{setHovered:r,resetHovered:()=>r(-1)}]}const Z={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[an,J]=X(Z.context);function sn({children:e,multiple:r,value:t,defaultValue:n,onChange:o,id:a,loop:s,transitionDuration:i,disableChevronRotation:c,chevronPosition:d,chevronSize:f,order:l,chevron:v,variant:_,radius:p,classNames:g,styles:h,unstyled:O}){const $=Dt(a),[w,N]=pr({value:t,defaultValue:n,finalValue:r?[]:null,onChange:o}),A=S=>Array.isArray(w)?w.includes(S):S===w,L=S=>{const k=Array.isArray(w)?w.includes(S)?w.filter(I=>I!==S):[...w,S]:S===w?null:S;N(k)};return m.createElement(an,{value:{isItemActive:A,onChange:L,getControlId:De(`${$}-control`,Z.value),getRegionId:De(`${$}-panel`,Z.value),transitionDuration:i,disableChevronRotation:c,chevronPosition:d,chevronSize:f,order:l,chevron:v,loop:s,variant:_,radius:p,classNames:g,styles:h,unstyled:O}},e)}const[ln,Or]=X(Z.itemContext);function cn(e,r,{radius:t}){const n=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3],o=e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],a=e.fn.radius(t);return r==="default"?{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderBottom:`${P(1)} solid ${n}`}:r==="contained"?{border:`${P(1)} solid ${n}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:o},"&:first-of-type":{borderTopRightRadius:a,borderTopLeftRadius:a,"& > [data-accordion-control]":{borderTopRightRadius:a,borderTopLeftRadius:a}},"&:last-of-type":{borderBottomRightRadius:a,borderBottomLeftRadius:a,"& > [data-accordion-control]":{borderBottomRightRadius:a,borderBottomLeftRadius:a}},"& + &":{borderTop:0}}:r==="filled"?{borderRadius:a,"&[data-active]":{backgroundColor:o}}:r==="separated"?{borderRadius:a,backgroundColor:o,border:`${P(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:e.spacing.md},"&[data-active]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderColor:n}}:{}}var dn=j((e,r,{variant:t})=>({item:cn(e,t,r)})),fn=Object.defineProperty,ee=Object.getOwnPropertySymbols,$r=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Te=(e,r,t)=>r in e?fn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,pn=(e,r)=>{for(var t in r||(r={}))$r.call(r,t)&&Te(e,t,r[t]);if(ee)for(var t of ee(r))wr.call(r,t)&&Te(e,t,r[t]);return e},un=(e,r)=>{var t={};for(var n in e)$r.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ee)for(var n of ee(e))r.indexOf(n)<0&&wr.call(e,n)&&(t[n]=e[n]);return t};const mn={},Pr=y.forwardRef((e,r)=>{const t=b("AccordionItem",mn,e),{children:n,className:o,value:a}=t,s=un(t,["children","className","value"]),i=J(),{classes:c,cx:d}=dn({radius:i.radius},{name:"Accordion",classNames:i.classNames,styles:i.styles,unstyled:i.unstyled,variant:i.variant});return m.createElement(ln,{value:{value:a}},m.createElement(T,pn({ref:r,className:d(c.item,o),"data-active":i.isItemActive(a)||void 0},s),n))});Pr.displayName="@mantine/core/AccordionItem";var gn=Object.defineProperty,vn=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,Me=(e,r,t)=>r in e?gn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,K=(e,r)=>{for(var t in r||(r={}))yn.call(r,t)&&Me(e,t,r[t]);if(Re)for(var t of Re(r))hn.call(r,t)&&Me(e,t,r[t]);return e},On=(e,r)=>vn(e,_n(r));function $n(e,r){return r==="default"||r==="contained"?e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}):{}}var wn=j((e,{transitionDuration:r,chevronPosition:t,chevronSize:n},{variant:o})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:t==="left"?0:e.spacing.sm,marginLeft:t==="left"?e.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${r}ms ease`,marginRight:t==="right"?0:e.spacing.sm,marginLeft:t==="right"?e.spacing.lg:0,width:P(n),minWidth:P(n),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.md,paddingBottom:e.spacing.md},itemTitle:{margin:0,padding:0},control:On(K(K(K({},e.fn.focusStyles()),e.fn.fontStyles()),$n(e,o)),{width:"100%",display:"flex",alignItems:"center",flexDirection:t==="right"?"row-reverse":"row",paddingRight:e.spacing.md,paddingLeft:t==="right"?`calc(${e.spacing.md} + ${P(4)})`:e.spacing.xs,textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:disabled":K({opacity:.4,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"}))})})),Pn=Object.defineProperty,bn=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,br=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,Ae=(e,r,t)=>r in e?Pn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Sn=(e,r)=>{for(var t in r||(r={}))br.call(r,t)&&Ae(e,t,r[t]);if(re)for(var t of re(r))xr.call(r,t)&&Ae(e,t,r[t]);return e},jn=(e,r)=>bn(e,xn(r)),In=(e,r)=>{var t={};for(var n in e)br.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&re)for(var n of re(e))r.indexOf(n)<0&&xr.call(e,n)&&(t[n]=e[n]);return t};const Cn={},Sr=y.forwardRef((e,r)=>{const t=b("AccordionControl",Cn,e),{disabled:n,onKeyDown:o,onClick:a,chevron:s,children:i,className:c,icon:d}=t,f=In(t,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),l=J(),{value:v}=Or(),{classes:_,cx:p}=wn({transitionDuration:l.transitionDuration,chevronPosition:l.chevronPosition,chevronSize:l.chevronSize,radius:l.radius},{name:"Accordion",classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),g=l.isItemActive(v),h=typeof l.order=="number",O=`h${l.order}`,$=m.createElement(ur,jn(Sn({},f),{ref:r,"data-accordion-control":!0,disabled:n,className:p(_.control,c),onClick:w=>{a?.(w),l.onChange(v)},type:"button","data-active":g||void 0,"aria-expanded":g,"aria-controls":l.getRegionId(v),id:l.getControlId(v),unstyled:l.unstyled,onKeyDown:hr({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:l.loop,orientation:"vertical",onKeyDown:o})}),m.createElement("span",{className:_.chevron,"data-rotate":!l.disableChevronRotation&&g||void 0},s||l.chevron),m.createElement("span",{className:_.label},i),d&&m.createElement("span",{className:_.icon},d));return h?m.createElement(O,{className:_.itemTitle},$):$});Sr.displayName="@mantine/core/AccordionControl";var En=Object.defineProperty,Nn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,ke=(e,r,t)=>r in e?En(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Mn=(e,r)=>{for(var t in r||(r={}))Tn.call(r,t)&&ke(e,t,r[t]);if(Le)for(var t of Le(r))Rn.call(r,t)&&ke(e,t,r[t]);return e},An=(e,r)=>Nn(e,Dn(r)),Ln=j((e,r)=>({panel:An(Mn({},e.fn.fontStyles()),{wordBreak:"break-word",lineHeight:e.lineHeight}),content:{padding:e.spacing.md,paddingTop:`calc(${e.spacing.xs} / 2)`}})),kn=Object.defineProperty,Bn=Object.defineProperties,zn=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Be=(e,r,t)=>r in e?kn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,B=(e,r)=>{for(var t in r||(r={}))jr.call(r,t)&&Be(e,t,r[t]);if(te)for(var t of te(r))Ir.call(r,t)&&Be(e,t,r[t]);return e},$e=(e,r)=>Bn(e,zn(r)),Hn=(e,r)=>{var t={};for(var n in e)jr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&te)for(var n of te(e))r.indexOf(n)<0&&Ir.call(e,n)&&(t[n]=e[n]);return t};function Vn(e){if(!e||typeof e=="string")return 0;const r=e/36;return Math.round((4+15*r**.25+r/5)*10)}function we(e){return e?.current?e.current.scrollHeight:"auto"}const Y=typeof window<"u"&&window.requestAnimationFrame;function Fn({transitionDuration:e,transitionTimingFunction:r="ease",onTransitionEnd:t=()=>{},opened:n}){const o=y.useRef(null),a=0,s={display:"none",height:0,overflow:"hidden"},[i,c]=y.useState(n?{}:s),d=p=>{Rt.flushSync(()=>c(p))},f=p=>{d(g=>B(B({},g),p))};function l(p){return{transition:`height ${e||Vn(p)}ms ${r}`}}mr(()=>{Y(n?()=>{f({willChange:"height",display:"block",overflow:"hidden"}),Y(()=>{const p=we(o);f($e(B({},l(p)),{height:p}))})}:()=>{const p=we(o);f($e(B({},l(p)),{willChange:"height",height:p})),Y(()=>f({height:a,overflow:"hidden"}))})},[n]);const v=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){const g=we(o);g===i.height?d({}):f({height:g}),t()}else i.height===a&&(d(s),t())};function _(p={}){var g=p,{style:h={},refKey:O="ref"}=g,$=Hn(g,["style","refKey"]);const w=$[O];return $e(B({"aria-hidden":!n},$),{[O]:Tt(o,w),onTransitionEnd:v,style:B(B({boxSizing:"border-box"},h),i)})}return _}var Un=Object.defineProperty,ne=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,ze=(e,r,t)=>r in e?Un(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,q=(e,r)=>{for(var t in r||(r={}))Cr.call(r,t)&&ze(e,t,r[t]);if(ne)for(var t of ne(r))Er.call(r,t)&&ze(e,t,r[t]);return e},Xn=(e,r)=>{var t={};for(var n in e)Cr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ne)for(var n of ne(e))r.indexOf(n)<0&&Er.call(e,n)&&(t[n]=e[n]);return t};const Gn={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},Nr=y.forwardRef((e,r)=>{const t=b("Collapse",Gn,e),{children:n,in:o,transitionDuration:a,transitionTimingFunction:s,style:i,onTransitionEnd:c,animateOpacity:d}=t,f=Xn(t,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),l=Mt(),v=At(),p=(l.respectReducedMotion?v:!1)?0:a,{systemStyles:g,rest:h}=Lt(f),O=Fn({opened:o,transitionDuration:p,transitionTimingFunction:s,onTransitionEnd:c});return p===0?o?m.createElement(T,q({},h),n):null:m.createElement(T,q({},O(q(q({style:i,ref:r},h),g))),m.createElement("div",{style:{opacity:o||!d?1:0,transition:d?`opacity ${p}ms ${s}`:"none"}},n))});Nr.displayName="@mantine/core/Collapse";var Wn=Object.defineProperty,Kn=Object.defineProperties,Yn=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,He=(e,r,t)=>r in e?Wn(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,qn=(e,r)=>{for(var t in r||(r={}))Dr.call(r,t)&&He(e,t,r[t]);if(oe)for(var t of oe(r))Tr.call(r,t)&&He(e,t,r[t]);return e},Qn=(e,r)=>Kn(e,Yn(r)),Zn=(e,r)=>{var t={};for(var n in e)Dr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&oe)for(var n of oe(e))r.indexOf(n)<0&&Tr.call(e,n)&&(t[n]=e[n]);return t};const Jn={};function Rr(e){const r=b("AccordionPanel",Jn,e),{children:t,className:n}=r,o=Zn(r,["children","className"]),a=J(),{value:s}=Or(),{classNames:i,styles:c,unstyled:d}=J(),{classes:f,cx:l}=Ln({radius:a.radius},{name:"Accordion",classNames:i,styles:c,unstyled:d,variant:a.variant});return m.createElement(Nr,Qn(qn({},o),{className:l(f.panel,n),in:a.isItemActive(s),transitionDuration:a.transitionDuration,role:"region",id:a.getRegionId(s),"aria-labelledby":a.getControlId(s)}),m.createElement("div",{className:f.content},t))}Rr.displayName="@mantine/core/AccordionPanel";var eo=Object.defineProperty,ro=Object.defineProperties,to=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,Ve=(e,r,t)=>r in e?eo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,no=(e,r)=>{for(var t in r||(r={}))Mr.call(r,t)&&Ve(e,t,r[t]);if(ae)for(var t of ae(r))Ar.call(r,t)&&Ve(e,t,r[t]);return e},oo=(e,r)=>ro(e,to(r)),ao=(e,r)=>{var t={};for(var n in e)Mr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ae)for(var n of ae(e))r.indexOf(n)<0&&Ar.call(e,n)&&(t[n]=e[n]);return t};const so={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:m.createElement(kt,null)};function Oe(e){const r=b("Accordion",so,e),{id:t,loop:n,children:o,multiple:a,value:s,defaultValue:i,onChange:c,transitionDuration:d,disableChevronRotation:f,chevronPosition:l,chevronSize:v,order:_,chevron:p,classNames:g,styles:h,unstyled:O,variant:$,radius:w}=r,N=ao(r,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return m.createElement(sn,{id:t,multiple:a,value:s,defaultValue:i,onChange:c,loop:n,transitionDuration:d,disableChevronRotation:f,chevronPosition:l,chevronSize:v,order:_,chevron:p,variant:$,radius:w,classNames:g,styles:h,unstyled:O},m.createElement(T,oo(no({},N),{"data-accordion":!0}),o))}Oe.Item=Pr;Oe.Control=Sr;Oe.Panel=Rr;Oe.displayName="@mantine/core/Accordion";const io={xs:P(12),sm:P(18),md:P(24),lg:P(34),xl:P(42)};var lo=j((e,{color:r,transitionDuration:t},{size:n})=>{const o=z({size:n,sizes:io}),a=r||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:a,outline:`${P(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${t}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}}),co=Object.defineProperty,se=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Fe=(e,r,t)=>r in e?co(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,fo=(e,r)=>{for(var t in r||(r={}))Lr.call(r,t)&&Fe(e,t,r[t]);if(se)for(var t of se(r))kr.call(r,t)&&Fe(e,t,r[t]);return e},po=(e,r)=>{var t={};for(var n in e)Lr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&se)for(var n of se(e))r.indexOf(n)<0&&kr.call(e,n)&&(t[n]=e[n]);return t};const uo={size:"md",transitionDuration:300},Br=y.forwardRef((e,r)=>{const t=b("Burger",uo,e),{className:n,opened:o,color:a,size:s,classNames:i,styles:c,transitionDuration:d,variant:f}=t,l=po(t,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:v,cx:_}=lo({color:a,transitionDuration:d},{classNames:i,styles:c,name:"Burger",variant:f,size:s});return m.createElement(ur,fo({className:_(v.root,n),ref:r},l),m.createElement("div",{"data-opened":o||void 0,className:v.burger}))});Br.displayName="@mantine/core/Burger";const zr=y.createContext({padding:0}),mo=zr.Provider,go=()=>y.useContext(zr).padding;var vo=j((e,{padding:r,withBorder:t,inheritPadding:n})=>{const o=z({size:r,sizes:e.spacing}),a=`calc(-1 * ${o})`,s=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{cardSection:{display:"block",marginLeft:a,marginRight:a,paddingLeft:n?o:void 0,paddingRight:n?o:void 0,borderTop:t?`${P(1)} solid ${s}`:void 0,borderBottom:t?`${P(1)} solid ${s}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:a,borderTop:0,borderBottom:t?`${P(1)} solid ${s}`:void 0},"&[data-last]":{marginBottom:a,borderBottom:0}}}}),_o=Object.defineProperty,ie=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Ue=(e,r,t)=>r in e?_o(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,yo=(e,r)=>{for(var t in r||(r={}))Hr.call(r,t)&&Ue(e,t,r[t]);if(ie)for(var t of ie(r))Vr.call(r,t)&&Ue(e,t,r[t]);return e},ho=(e,r)=>{var t={};for(var n in e)Hr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ie)for(var n of ie(e))r.indexOf(n)<0&&Vr.call(e,n)&&(t[n]=e[n]);return t};const Oo={withBorder:!1,inheritPadding:!1},Fr=y.forwardRef((e,r)=>{const t=b("CardSection",Oo,e),{className:n,withBorder:o,inheritPadding:a,unstyled:s,variant:i}=t,c=ho(t,["className","withBorder","inheritPadding","unstyled","variant"]),{classes:d,cx:f}=vo({padding:go(),withBorder:o,inheritPadding:a},{name:"Card",unstyled:s,variant:i});return m.createElement(T,yo({className:f(d.cardSection,n),ref:r},c))});Fr.displayName="@mantine/core/CardSection";const Ur=Pe(Fr);var $o=j(e=>({root:{position:"relative",overflow:"hidden",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}})),wo=Object.defineProperty,le=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Xe=(e,r,t)=>r in e?wo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Po=(e,r)=>{for(var t in r||(r={}))Xr.call(r,t)&&Xe(e,t,r[t]);if(le)for(var t of le(r))Gr.call(r,t)&&Xe(e,t,r[t]);return e},bo=(e,r)=>{var t={};for(var n in e)Xr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&le)for(var n of le(e))r.indexOf(n)<0&&Gr.call(e,n)&&(t[n]=e[n]);return t};const xo={padding:"md"},Se=y.forwardRef((e,r)=>{const t=b("Card",xo,e),{className:n,padding:o,radius:a,children:s,unstyled:i,variant:c}=t,d=bo(t,["className","padding","radius","children","unstyled","variant"]),{classes:f,cx:l}=$o(null,{name:"Card",unstyled:i,variant:c}),v=y.Children.toArray(s),_=v.map((p,g)=>typeof p=="object"&&p&&"type"in p&&p.type===Ur?y.cloneElement(p,{variant:c,padding:o,"data-first":g===0||void 0,"data-last":g===v.length-1||void 0}):p);return m.createElement(mo,{value:{padding:o}},m.createElement(gr,Po({className:l(f.root,n),radius:a,p:o,ref:r},d),_))});Se.Section=Ur;Se.displayName="@mantine/core/Card";const us=Pe(Se),[So,jo]=X("Grid component was not found in tree");var Io=Object.defineProperty,Ge=Object.getOwnPropertySymbols,Co=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,We=(e,r,t)=>r in e?Io(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,No=(e,r)=>{for(var t in r||(r={}))Co.call(r,t)&&We(e,t,r[t]);if(Ge)for(var t of Ge(r))Eo.call(r,t)&&We(e,t,r[t]);return e};const je=(e,r)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(r/e)}%`:void 0,Wr=(e,r,t)=>t||e==="auto"||e==="content"?"unset":je(e,r),Kr=(e,r)=>{if(e)return e==="auto"||r?1:0},Yr=(e,r)=>e===0?0:e?`${100/(r/e)}%`:void 0,qr=(e,r)=>typeof e<"u"?`calc(${z({size:e,sizes:r.spacing})} / 2)`:void 0;function Do({sizes:e,offsets:r,orders:t,theme:n,columns:o,gutters:a,grow:s}){return vr.reduce((i,c)=>(i[`@media (min-width: ${Bt(n.breakpoints[c])})`]={order:t[c],flexBasis:je(e[c],o),padding:qr(a[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:Wr(e[c],o,s),marginLeft:Yr(r[c],o),flexGrow:Kr(e[c],s)},i),{})}var To=j((e,{gutter:r,gutterXs:t,gutterSm:n,gutterMd:o,gutterLg:a,gutterXl:s,grow:i,offset:c,offsetXs:d,offsetSm:f,offsetMd:l,offsetLg:v,offsetXl:_,columns:p,span:g,xs:h,sm:O,md:$,lg:w,xl:N,order:A,orderXs:L,orderSm:S,orderMd:k,orderLg:I,orderXl:x})=>({col:No({boxSizing:"border-box",flexGrow:Kr(g,i),order:A,padding:qr(r,e),marginLeft:Yr(c,p),flexBasis:je(g,p),flexShrink:0,width:g==="content"?"auto":void 0,maxWidth:Wr(g,p,i)},Do({sizes:{xs:h,sm:O,md:$,lg:w,xl:N},offsets:{xs:d,sm:f,md:l,lg:v,xl:_},orders:{xs:L,sm:S,md:k,lg:I,xl:x},gutters:{xs:t,sm:n,md:o,lg:a,xl:s},theme:e,columns:p,grow:i}))})),Ro=Object.defineProperty,ce=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Ke=(e,r,t)=>r in e?Ro(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Mo=(e,r)=>{for(var t in r||(r={}))Qr.call(r,t)&&Ke(e,t,r[t]);if(ce)for(var t of ce(r))Zr.call(r,t)&&Ke(e,t,r[t]);return e},Ao=(e,r)=>{var t={};for(var n in e)Qr.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ce)for(var n of ce(e))r.indexOf(n)<0&&Zr.call(e,n)&&(t[n]=e[n]);return t};const Lo={};function ko(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Jr=y.forwardRef((e,r)=>{const t=b("GridCol",Lo,e),{children:n,span:o,offset:a,offsetXs:s,offsetSm:i,offsetMd:c,offsetLg:d,offsetXl:f,xs:l,sm:v,md:_,lg:p,xl:g,order:h,orderXs:O,orderSm:$,orderMd:w,orderLg:N,orderXl:A,className:L,unstyled:S,variant:k}=t,I=Ao(t,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),x=jo(),M=o||x.columns,{classes:V,cx:W}=To({gutter:x.gutter,gutterXs:x.gutterXs,gutterSm:x.gutterSm,gutterMd:x.gutterMd,gutterLg:x.gutterLg,gutterXl:x.gutterXl,offset:a,offsetXs:s,offsetSm:i,offsetMd:c,offsetLg:d,offsetXl:f,xs:l,sm:v,md:_,lg:p,xl:g,order:h,orderXs:O,orderSm:$,orderMd:w,orderLg:N,orderXl:A,grow:x.grow,columns:x.columns,span:M},{unstyled:S,name:"Grid",variant:k});return!ko(M)||M>x.columns?null:m.createElement(T,Mo({className:W(V.col,L),ref:r},I),n)});Jr.displayName="@mantine/core/Col";var Bo=Object.defineProperty,Ye=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,Ho=Object.prototype.propertyIsEnumerable,qe=(e,r,t)=>r in e?Bo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Vo=(e,r)=>{for(var t in r||(r={}))zo.call(r,t)&&qe(e,t,r[t]);if(Ye)for(var t of Ye(r))Ho.call(r,t)&&qe(e,t,r[t]);return e};function Fo(e,r){return vr.reduce((t,n)=>(typeof e[n]<"u"&&(t[`@media (min-width: ${r.breakpoints[n]})`]={margin:`calc(-${z({size:e[n],sizes:r.spacing})} / 2)`}),t),{})}var Uo=j((e,{justify:r,align:t,gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c})=>({root:Vo({margin:`calc(-${z({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:r,alignItems:t},Fo({xs:o,sm:a,md:s,lg:i,xl:c},e))})),Xo=Object.defineProperty,de=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Qe=(e,r,t)=>r in e?Xo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Go=(e,r)=>{for(var t in r||(r={}))et.call(r,t)&&Qe(e,t,r[t]);if(de)for(var t of de(r))rt.call(r,t)&&Qe(e,t,r[t]);return e},Wo=(e,r)=>{var t={};for(var n in e)et.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&de)for(var n of de(e))r.indexOf(n)<0&&rt.call(e,n)&&(t[n]=e[n]);return t};const Ko={gutter:"md",justify:"flex-start",align:"stretch",columns:12},C=y.forwardRef((e,r)=>{const t=b("Grid",Ko,e),{gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c,children:d,grow:f,justify:l,align:v,columns:_,className:p,unstyled:g,variant:h}=t,O=Wo(t,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:$,cx:w}=Uo({gutter:n,justify:l,align:v,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c},{unstyled:g,name:"Grid",variant:h});return m.createElement(So,{value:{gutter:n,gutterXs:o,gutterSm:a,gutterMd:s,gutterLg:i,gutterXl:c,grow:f,columns:_}},m.createElement(T,Go({className:w($.root,p),ref:r},O),d))});C.Col=Jr;C.displayName="@mantine/core/Grid";function Yo({open:e,close:r,openDelay:t,closeDelay:n}){const o=y.useRef(-1),a=y.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(a.current)},i=()=>{s(),t===0?e():o.current=window.setTimeout(e,t)},c=()=>{s(),n===0?r():a.current=window.setTimeout(r,n)};return y.useEffect(()=>s,[]),{openDropdown:i,closeDropdown:c}}const[qo,Qo]=X("List component was not found in tree");var Zo=j((e,{spacing:r,center:t})=>({itemWrapper:{ref:Ie("itemWrapper"),display:"inline-flex",flexDirection:"column",whiteSpace:"normal"},item:{whiteSpace:"nowrap",lineHeight:t?1:e.lineHeight,"&:not(:first-of-type)":{marginTop:z({size:r,sizes:e.spacing})},"&[data-with-icon]":{listStyle:"none",[`& .${Ie("itemWrapper")}`]:{display:"inline-flex",alignItems:t?"center":"flex-start",flexDirection:"row"}}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}})),Jo=Object.defineProperty,fe=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,Ze=(e,r,t)=>r in e?Jo(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ea=(e,r)=>{for(var t in r||(r={}))tt.call(r,t)&&Ze(e,t,r[t]);if(fe)for(var t of fe(r))nt.call(r,t)&&Ze(e,t,r[t]);return e},ra=(e,r)=>{var t={};for(var n in e)tt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&fe)for(var n of fe(e))r.indexOf(n)<0&&nt.call(e,n)&&(t[n]=e[n]);return t};const ta={},ot=y.forwardRef((e,r)=>{const t=b("ListItem",ta,e),{className:n,children:o,icon:a}=t,s=ra(t,["className","children","icon"]),{icon:i,spacing:c,center:d,listStyleType:f,size:l,withPadding:v,classNames:_,styles:p,unstyled:g,variant:h}=Qo(),O=a||i,{classes:$,cx:w}=Zo({withPadding:v,listStyleType:f,center:d,spacing:c},{classNames:_,styles:p,unstyled:g,name:"List",variant:h,size:l});return m.createElement(T,ea({component:"li",className:w($.item,n),"data-with-icon":!!O||void 0,ref:r},s),m.createElement("div",{className:$.itemWrapper},O&&m.createElement("span",{className:$.itemIcon},O),m.createElement("span",null,o)))});ot.displayName="@mantine/core/ListItem";var na=Object.defineProperty,oa=Object.defineProperties,aa=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,sa=Object.prototype.hasOwnProperty,ia=Object.prototype.propertyIsEnumerable,er=(e,r,t)=>r in e?na(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,la=(e,r)=>{for(var t in r||(r={}))sa.call(r,t)&&er(e,t,r[t]);if(Je)for(var t of Je(r))ia.call(r,t)&&er(e,t,r[t]);return e},ca=(e,r)=>oa(e,aa(r)),da=j((e,{withPadding:r,listStyleType:t},{size:n})=>({root:ca(la({},e.fn.fontStyles()),{listStyleType:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:z({size:n,sizes:e.fontSizes}),lineHeight:e.lineHeight,margin:0,paddingLeft:r?e.spacing.xl:0,listStylePosition:"inside"})})),fa=Object.defineProperty,pe=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,rr=(e,r,t)=>r in e?fa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,pa=(e,r)=>{for(var t in r||(r={}))at.call(r,t)&&rr(e,t,r[t]);if(pe)for(var t of pe(r))st.call(r,t)&&rr(e,t,r[t]);return e},ua=(e,r)=>{var t={};for(var n in e)at.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&pe)for(var n of pe(e))r.indexOf(n)<0&&st.call(e,n)&&(t[n]=e[n]);return t};const ma={type:"unordered",size:"md",spacing:0},ue=y.forwardRef((e,r)=>{const t=b("List",ma,e),{children:n,type:o,size:a,listStyleType:s,withPadding:i,center:c,spacing:d,icon:f,className:l,styles:v,classNames:_,unstyled:p,variant:g}=t,h=ua(t,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled","variant"]),{classes:O,cx:$}=da({withPadding:i,listStyleType:s,center:c,spacing:d},{classNames:_,styles:v,name:"List",unstyled:p,size:a,variant:g});return m.createElement(qo,{value:{spacing:d,center:c,icon:f,listStyleType:s,size:a,withPadding:i,classNames:_,styles:v,unstyled:p,variant:g}},m.createElement(T,pa({component:o==="unordered"?"ul":"ol",className:$(O.root,l),ref:r},h),n))});ue.Item=ot;ue.displayName="@mantine/core/List";const it={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[ga,G]=X(it.context);var va=j(e=>({divider:{marginTop:P(4),marginBottom:P(4),borderTop:`${P(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}})),_a=Object.defineProperty,me=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,tr=(e,r,t)=>r in e?_a(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ya=(e,r)=>{for(var t in r||(r={}))lt.call(r,t)&&tr(e,t,r[t]);if(me)for(var t of me(r))ct.call(r,t)&&tr(e,t,r[t]);return e},ha=(e,r)=>{var t={};for(var n in e)lt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&me)for(var n of me(e))r.indexOf(n)<0&&ct.call(e,n)&&(t[n]=e[n]);return t};const Oa={},dt=y.forwardRef((e,r)=>{const t=b("MenuDivider",Oa,e),{children:n,className:o}=t,a=ha(t,["children","className"]),{classNames:s,styles:i,unstyled:c,variant:d}=G(),{classes:f,cx:l}=va(null,{name:"Menu",classNames:s,styles:i,unstyled:c,variant:d});return m.createElement(T,ya({className:l(f.divider,o),ref:r},a))});dt.displayName="@mantine/core/MenuDivider";var $a=Object.defineProperty,ge=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,nr=(e,r,t)=>r in e?$a(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,wa=(e,r)=>{for(var t in r||(r={}))ft.call(r,t)&&nr(e,t,r[t]);if(ge)for(var t of ge(r))pt.call(r,t)&&nr(e,t,r[t]);return e},Pa=(e,r)=>{var t={};for(var n in e)ft.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))r.indexOf(n)<0&&pt.call(e,n)&&(t[n]=e[n]);return t};const ba={};function ut(e){const r=b("MenuDropdown",ba,e),{children:t,onMouseEnter:n,onMouseLeave:o}=r,a=Pa(r,["children","onMouseEnter","onMouseLeave"]),s=y.useRef(),i=G(),c=l=>{var v;(l.key==="ArrowUp"||l.key==="ArrowDown")&&(l.preventDefault(),(v=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||v.focus())},d=R(n,()=>i.trigger==="hover"&&i.openDropdown()),f=R(o,()=>i.trigger==="hover"&&i.closeDropdown());return m.createElement(be.Dropdown,wa({onMouseEnter:d,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},a),m.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},t))}ut.displayName="@mantine/core/MenuDropdown";var xa=Object.defineProperty,Sa=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,or=Object.getOwnPropertySymbols,Ia=Object.prototype.hasOwnProperty,Ca=Object.prototype.propertyIsEnumerable,ar=(e,r,t)=>r in e?xa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ea=(e,r)=>{for(var t in r||(r={}))Ia.call(r,t)&&ar(e,t,r[t]);if(or)for(var t of or(r))Ca.call(r,t)&&ar(e,t,r[t]);return e},Na=(e,r)=>Sa(e,ja(r)),Da=j((e,{color:r,radius:t})=>({item:Na(Ea({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(t),color:r?e.fn.variant({variant:"filled",primaryFallback:!1,color:r}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:r?e.fn.variant({variant:"light",color:r}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}})),Ta=Object.defineProperty,Ra=Object.defineProperties,Ma=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,sr=(e,r,t)=>r in e?Ta(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Aa=(e,r)=>{for(var t in r||(r={}))mt.call(r,t)&&sr(e,t,r[t]);if(ve)for(var t of ve(r))gt.call(r,t)&&sr(e,t,r[t]);return e},La=(e,r)=>Ra(e,Ma(r)),ka=(e,r)=>{var t={};for(var n in e)mt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ve)for(var n of ve(e))r.indexOf(n)<0&&gt.call(e,n)&&(t[n]=e[n]);return t};const Ba={},vt=y.forwardRef((e,r)=>{const t=b("MenuItem",Ba,e),{children:n,className:o,color:a,closeMenuOnClick:s,icon:i,rightSection:c}=t,d=ka(t,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=G(),{classes:l,cx:v,theme:_}=Da({radius:f.radius,color:a},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),p=y.useRef(),g=f.getItemIndex(p.current),h=d,O=R(h.onMouseLeave,()=>f.setHovered(-1)),$=R(h.onMouseEnter,()=>f.setHovered(f.getItemIndex(p.current))),w=R(h.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),N=R(h.onFocus,()=>f.setHovered(f.getItemIndex(p.current)));return m.createElement(T,La(Aa({component:"button",type:"button"},d),{tabIndex:-1,onFocus:N,className:v(l.item,o),ref:zt(p,r),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===g?!0:void 0,onMouseEnter:$,onMouseLeave:O,onClick:w,onKeyDown:hr({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:_.dir,orientation:"vertical",onKeyDown:h.onKeydown})}),i&&m.createElement("div",{className:l.itemIcon},i),n&&m.createElement("div",{className:l.itemLabel},n),c&&m.createElement("div",{className:l.itemRightSection},c))});vt.displayName="@mantine/core/MenuItem";const za=Pe(vt);var Ha=j(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}})),Va=Object.defineProperty,_e=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ir=(e,r,t)=>r in e?Va(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Fa=(e,r)=>{for(var t in r||(r={}))_t.call(r,t)&&ir(e,t,r[t]);if(_e)for(var t of _e(r))yt.call(r,t)&&ir(e,t,r[t]);return e},Ua=(e,r)=>{var t={};for(var n in e)_t.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&_e)for(var n of _e(e))r.indexOf(n)<0&&yt.call(e,n)&&(t[n]=e[n]);return t};const Xa={},ht=y.forwardRef((e,r)=>{const t=b("MenuLabel",Xa,e),{children:n,className:o}=t,a=Ua(t,["children","className"]),{classNames:s,styles:i,unstyled:c,variant:d}=G(),{classes:f,cx:l}=Ha(null,{name:"Menu",classNames:s,styles:i,unstyled:c,variant:d});return m.createElement(E,Fa({className:l(f.label,o),ref:r},a),n)});ht.displayName="@mantine/core/MenuLabel";var Ga=Object.defineProperty,ye=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,lr=(e,r,t)=>r in e?Ga(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Wa=(e,r)=>{for(var t in r||(r={}))Ot.call(r,t)&&lr(e,t,r[t]);if(ye)for(var t of ye(r))$t.call(r,t)&&lr(e,t,r[t]);return e},Ka=(e,r)=>{var t={};for(var n in e)Ot.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))r.indexOf(n)<0&&$t.call(e,n)&&(t[n]=e[n]);return t};const Ya={refProp:"ref"},wt=y.forwardRef((e,r)=>{const t=b("MenuTarget",Ya,e),{children:n,refProp:o}=t,a=Ka(t,["children","refProp"]);if(!Ht(n))throw new Error(it.children);const s=G(),i=R(n.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=R(n.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),d=R(n.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return m.createElement(be.Target,Wa({refProp:o,popupType:"menu",ref:r},a),y.cloneElement(n,{onClick:i,onMouseEnter:c,onMouseLeave:d,"data-expanded":s.opened?!0:void 0}))});wt.displayName="@mantine/core/MenuTarget";var qa=j({dropdown:{padding:P(4)}}),Qa=Object.defineProperty,Za=Object.defineProperties,Ja=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,cr=(e,r,t)=>r in e?Qa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,dr=(e,r)=>{for(var t in r||(r={}))Pt.call(r,t)&&cr(e,t,r[t]);if(he)for(var t of he(r))bt.call(r,t)&&cr(e,t,r[t]);return e},fr=(e,r)=>Za(e,Ja(r)),es=(e,r)=>{var t={};for(var n in e)Pt.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&he)for(var n of he(e))r.indexOf(n)<0&&bt.call(e,n)&&(t[n]=e[n]);return t};const rs={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function D(e){const r=b("Menu",rs,e),{children:t,onOpen:n,onClose:o,opened:a,defaultOpened:s,onChange:i,closeOnItemClick:c,loop:d,closeOnEscape:f,trigger:l,openDelay:v,closeDelay:_,classNames:p,styles:g,unstyled:h,radius:O,variant:$}=r,w=es(r,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:N,cx:A}=qa(),[L,{setHovered:S,resetHovered:k}]=on(),[I,x]=pr({value:a,defaultValue:s,finalValue:!1,onChange:i}),M=()=>{x(!1),I&&o?.()},V=()=>{x(!0),!I&&n?.()},W=()=>I?M():V(),{openDropdown:xt,closeDropdown:St}=Yo({open:V,close:M,closeDelay:_,openDelay:v}),jt=It=>nn("[data-menu-item]","[data-menu-dropdown]",It);return mr(()=>{k()},[I]),m.createElement(ga,{value:{opened:I,toggleDropdown:W,getItemIndex:jt,hovered:L,setHovered:S,closeOnItemClick:c,closeDropdown:l==="click"?M:St,openDropdown:l==="click"?V:xt,closeDropdownImmediately:M,loop:d,trigger:l,radius:O,classNames:p,styles:g,unstyled:h,variant:$}},m.createElement(be,fr(dr({},w),{radius:O,opened:I,onChange:W,defaultOpened:s,trapFocus:l==="click"&&I,closeOnEscape:f&&l==="click",__staticSelector:"Menu",classNames:fr(dr({},p),{dropdown:A(N.dropdown,p?.dropdown)}),styles:g,unstyled:h,variant:$}),t))}D.displayName="@mantine/core/Menu";D.Item=za;D.Label=ht;D.Dropdown=ut;D.Target=wt;D.Divider=dt;const ts="updateBusinessTripAccountantApproval",ns=()=>{const[{fetching:e},r]=_r(Vt),t=y.useCallback(async n=>{const o=`Error toggling accountant approval for trip [${n.businessTripId}]`,a=`${ts}-${n.businessTripId}`;H.loading("Updating accountant approval status",{id:a});try{const s=await r(n),i=yr(s,o,a);if(i)return H.success("Success",{id:a,description:"Accountant approval status updated"}),i.updateBusinessTripAccountantApproval}catch(s){console.error(`${o}: ${s}`),H.error("Error",{id:a,description:o,duration:1e5,closeButton:!0})}},[r]);return{fetching:e,updateBusinessTripAccountantApproval:t}};function os({data:e,onChange:r}){const t=xe(Ut,e),[n,o]=y.useState(t.accountantApproval),{updateBusinessTripAccountantApproval:a}=ns();return y.useEffect(()=>{n==null&&t.accountantApproval!=null&&o(t.accountantApproval)},[n,t.accountantApproval]),u.jsx(Ft,{value:n,onChange:s=>a({businessTripId:t.id,status:s}).then(r)})}const as="creditShareholdersBusinessTripTravelAndSubsistence",ss=()=>{const[{fetching:e},r]=_r(Xt),t=y.useCallback(async n=>{const o=`Error crediting shareholders for trip ID ${n.businessTripId}`,a=`${as}-${n.businessTripId}`;H.loading("Crediting Shareholders",{id:a});try{const s=await r(n),i=yr(s,o,a);i&&H.success("Shareholders Credited",{id:a,description:`${i.creditShareholdersBusinessTripTravelAndSubsistence.length} Corresponding charges were successfully generated`})}catch(s){console.error(`${o}: ${s}`),H.error("Error",{id:a,description:o,duration:1e5,closeButton:!0})}},[r]);return{fetching:e,creditShareholders:t}};function is({businessTripId:e}){const[r,t]=y.useState(!1),{creditShareholders:n}=ss();return u.jsxs(D,{shadow:"md",width:200,opened:r,children:[u.jsx(D.Target,{children:u.jsx(Br,{opened:r,onClick:o=>{o.stopPropagation(),t(a=>!a)}})}),u.jsxs(D.Dropdown,{children:[u.jsx(D.Label,{children:"Summarize Trip"}),u.jsx(Gt,{onConfirm:()=>{n({businessTripId:e})},title:"Credit shareholders with travel and subsistence surplus?",children:u.jsx(D.Item,{icon:u.jsx(Wt,{size:14}),children:"Credit surplus T&S"})})]})]})}const ms=({data:e,onChange:r})=>{const t=xe(qt,e),{name:n,dates:o,purpose:a,destination:s}=t;return u.jsxs(C,{children:[u.jsxs(C.Col,{span:12,className:"flex flex-row justify-between items-center",children:[u.jsx(E,{fz:"xl",children:n}),u.jsxs("div",{className:"flex flex-row gap-2",children:[u.jsx(os,{data:t,onChange:r}),u.jsx(Kt,{isLink:!0,content:`${window.location.origin}${Yt.BUSINESS_TRIPS.DETAIL(t.id)}`}),u.jsx(is,{businessTripId:t.id})]})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["From Date:",u.jsx(E,{fz:"lg",children:o?.start?Ce(new Date(o.start),"dd/MM/yy"):"Missing"})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["To Date:",u.jsx(E,{fz:"lg",children:o?.end?Ce(new Date(o.end),"dd/MM/yy"):"Missing"})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["Destination:",u.jsx(E,{fz:"lg",children:s?.name})]}),u.jsxs(C.Col,{xl:4,lg:6,md:12,orderMd:6,children:["Description:",u.jsx(E,{fz:"lg",children:a})]}),u.jsxs(C.Col,{xl:2,lg:3,md:6,children:["Total Days:",u.jsx(E,{fz:"lg",children:o?ls(o.start,o.end):"Missing"})]})]})};function ls(e,r){return Jt(Ne(new Date(r),22),Ne(new Date(e),6))+1}function cs(e){return e.split("_").map(ds).join(" ")}function ds(e){return e.slice(0,1).toUpperCase()+e.slice(1,e.length).toLowerCase()}const gs=({data:e})=>{const{summary:r}=xe(Qt,e);return r?u.jsxs("div",{className:"flex flex-col gap-2 mt-5",children:[r.errors?.length&&u.jsxs(gr,{shadow:"xs",p:"md",children:[u.jsx(E,{c:"red",children:"Errors:"}),u.jsx(ue,{size:"sm",withPadding:!0,children:r.errors.map((t,n)=>u.jsx(ue.Item,{children:u.jsx(E,{c:"red",children:t})},n))})]}),u.jsxs(Zt,{highlightOnHover:!0,withBorder:!0,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Expense Type"}),u.jsxs("th",{children:["Total ",F(U.Usd)]}),u.jsxs("th",{children:["Total ",F(U.Ils)]}),u.jsxs("th",{children:["Max Taxable ",F(U.Usd)]}),u.jsxs("th",{children:["Taxable ",F(U.Usd)]}),u.jsxs("th",{children:["Taxable ",F(U.Ils)]}),u.jsx("th",{children:"Excess Expenditure"})]})}),u.jsx("tbody",{children:r.rows.map(t=>u.jsxs("tr",{children:[u.jsx("td",{children:cs(t.type)}),u.jsx("td",{children:t.totalForeignCurrency?.formatted}),u.jsx("td",{children:t.totalLocalCurrency?.formatted}),u.jsx("td",{children:t.maxTaxableForeignCurrency?.formatted}),u.jsx("td",{children:t.taxableForeignCurrency?.formatted}),u.jsx("td",{children:t.taxableLocalCurrency?.formatted}),u.jsx("td",{children:t.excessExpenditure?.formatted})]},t.type))})]}),u.jsxs(C,{justify:"flex-end",children:[u.jsxs(C.Col,{lg:2,md:4,children:["Excess Expenditure Tax:",u.jsxs(E,{fz:"lg",children:[r.excessTax??"0","%"]})]}),u.jsx(C.Col,{lg:2,md:3,className:"flex flex-col justify-end",children:u.jsx(E,{fz:"lg",children:r.excessExpenditure?.formatted??"0.00"})})]})]}):u.jsx(E,{children:"Loading..."})};export{Oe as A,Br as B,us as C,C as G,ue as L,D as M,ms as R,gs as S,Nr as a};
@@ -1 +1 @@
1
- import{j as s,T as l,B as p}from"./index-Bd-SKdyy.js";import{P as r,a as x}from"./panel-top-open-DU7alj-S.js";function u(n){const{toggleExpansion:e,isExpanded:t,onClickAction:o}=n;return s.jsx(l,{label:"Expand info",children:s.jsx(p,{variant:"default",onClick:i=>{i.stopPropagation(),e(a=>(o&&o(a),!a))},className:"size-7.5",children:t?s.jsx(r,{className:"size-5"}):s.jsx(x,{className:"size-5"})})})}export{u as T};
1
+ import{j as s,T as l,B as p}from"./index-BZ8AOwEl.js";import{P as r,a as x}from"./panel-top-open-CpMFDJrl.js";function u(n){const{toggleExpansion:e,isExpanded:t,onClickAction:o}=n;return s.jsx(l,{label:"Expand info",children:s.jsx(p,{variant:"default",onClick:i=>{i.stopPropagation(),e(a=>(o&&o(a),!a))},className:"size-7.5",children:t?s.jsx(r,{className:"size-5"}):s.jsx(x,{className:"size-5"})})})}export{u as T};
@@ -0,0 +1 @@
1
+ import{j as o,gY as t,bF as e,bG as l,bH as n}from"./index-BZ8AOwEl.js";function a({children:i,content:r,...s}){return o.jsx(t,{children:o.jsxs(e,{children:[o.jsx(l,{asChild:!0,children:i}),o.jsx(n,{...s,children:r})]})})}export{a as T};
@@ -1 +1 @@
1
- import{hB as a,r as s}from"./index-Bd-SKdyy.js";function c(){const{search:n}=a(),t=s.useMemo(()=>new URLSearchParams(n),[n]),r=s.useCallback(()=>{if(window.history.pushState){const o=t.keys().next().done?"":`?${t.toString()}`,e=window.location.protocol+"//"+window.location.host+window.location.pathname+o;window.history.pushState({path:e},"",e)}},[t]);return{query:t,queryString:()=>t.toString(),get:o=>t?.get(o),set:(o,e)=>{e==null?t.delete(o):t.set(o,e),r()}}}export{c as u};
1
+ import{hB as a,r as s}from"./index-BZ8AOwEl.js";function c(){const{search:n}=a(),t=s.useMemo(()=>new URLSearchParams(n),[n]),r=s.useCallback(()=>{if(window.history.pushState){const o=t.keys().next().done?"":`?${t.toString()}`,e=window.location.protocol+"//"+window.location.host+window.location.pathname+o;window.history.pushState({path:e},"",e)}},[t]);return{query:t,queryString:()=>t.toString(),get:o=>t?.get(o),set:(o,e)=>{e==null?t.delete(o):t.set(o,e),r()}}}export{c as u};
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" href="/icons/accounter-logo.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Accounter</title>
8
- <script type="module" crossorigin src="/assets/index-Bd-SKdyy.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BZ8AOwEl.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BrSZxw1u.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accounter/client",
3
- "version": "0.0.8-alpha-20251030162303-87017b2c2addf0e61478260aac336b9343f15c98",
3
+ "version": "0.0.8-alpha-20251030164843-d2f490daba879840366288d1f62974ab25081876",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -130,7 +130,7 @@ export function ModifyContractDialog({ clientId, contract, contractId, onDone }:
130
130
  const { createContract, creating } = useCreateContract();
131
131
 
132
132
  // Only fetch if we don't have loader data
133
- const [{ data: fetchedContractData, fetching }, fetchContract] = useQuery({
133
+ const [{ data: fetchedContractData, fetching }] = useQuery({
134
134
  query: ContractsEditModalDocument,
135
135
  pause: !contractId || !isDialogOpen,
136
136
  variables: {
@@ -138,12 +138,6 @@ export function ModifyContractDialog({ clientId, contract, contractId, onDone }:
138
138
  },
139
139
  });
140
140
 
141
- useEffect(() => {
142
- if (isDialogOpen && contractId) {
143
- fetchContract();
144
- }
145
- }, [isDialogOpen, contractId, fetchContract]);
146
-
147
141
  const form = useForm<ContractFormValues>({
148
142
  resolver: zodResolver(contractFormSchema),
149
143
  defaultValues: contract || newContractDefaultValues,
@@ -6,5 +6,9 @@ type Props = {
6
6
  };
7
7
 
8
8
  export const DateCell = ({ timelessDate }: Props): ReactElement => {
9
- return <p className="text-sm font-medium">{new Date(timelessDate).toLocaleDateString()}</p>;
9
+ return (
10
+ <p className="text-sm font-medium">
11
+ {new Date(timelessDate).toLocaleDateString(undefined, { timeZone: 'UTC' })}
12
+ </p>
13
+ );
10
14
  };
@@ -123,7 +123,7 @@ export const columns: ColumnDef<ContractRow>[] = [
123
123
  <div className="flex flex-row gap-1 items-center">
124
124
  {row.original.msCloud && (
125
125
  <Link to={row.original.msCloud} target="_blank" rel="noreferrer" className="size-8">
126
- <Button variant="link" size="sm" disabled>
126
+ <Button variant="link" size="sm">
127
127
  <LinkIcon className="size-4" />
128
128
  </Button>
129
129
  </Link>
@@ -47,7 +47,7 @@ export function ContractsFilter({ table }: Props) {
47
47
  <Label>Product Type</Label>
48
48
  <Select
49
49
  onValueChange={value =>
50
- table.getColumn('product')?.setFilterValue(value === 'NULL' ? '' : value)
50
+ table.getColumn('product')?.setFilterValue(value === 'NULL' ? undefined : value)
51
51
  }
52
52
  value={table.getColumn('product')?.getFilterValue() as Product | ''}
53
53
  >
@@ -70,7 +70,9 @@ export function ContractsFilter({ table }: Props) {
70
70
  <Label>Billing Cycle</Label>
71
71
  <Select
72
72
  onValueChange={value =>
73
- table.getColumn('billingCycle')?.setFilterValue(value === 'NULL' ? '' : value)
73
+ table
74
+ .getColumn('billingCycle')
75
+ ?.setFilterValue(value === 'NULL' ? undefined : value)
74
76
  }
75
77
  value={table.getColumn('billingCycle')?.getFilterValue() as BillingCycle | ''}
76
78
  >
@@ -96,7 +98,7 @@ export function ContractsFilter({ table }: Props) {
96
98
  <Label>Subscription Plan</Label>
97
99
  <Select
98
100
  onValueChange={value =>
99
- table.getColumn('plan')?.setFilterValue(value === 'NULL' ? '' : value)
101
+ table.getColumn('plan')?.setFilterValue(value === 'NULL' ? undefined : value)
100
102
  }
101
103
  value={table.getColumn('plan')?.getFilterValue() as SubscriptionPlan | ''}
102
104
  >
@@ -122,7 +124,9 @@ export function ContractsFilter({ table }: Props) {
122
124
  onValueChange={value =>
123
125
  table
124
126
  .getColumn('isActive')
125
- ?.setFilterValue(value === 'NULL' ? '' : value === 'active' ? true : false)
127
+ ?.setFilterValue(
128
+ value === 'NULL' ? undefined : value === 'active' ? true : false,
129
+ )
126
130
  }
127
131
  value={convertBooleanToString(
128
132
  table.getColumn('isActive')?.getFilterValue() as boolean | undefined,
@@ -140,11 +144,6 @@ export function ContractsFilter({ table }: Props) {
140
144
  </SelectContent>
141
145
  </Select>
142
146
  </div>
143
-
144
- {/* <div>
145
- <FormLabel className="text-base">Active Status</FormLabel>
146
- <Switch checked={field.value} onCheckedChange={field.onChange} />
147
- </div> */}
148
147
  </div>
149
148
  </div>
150
149
  </DialogContent>
@@ -163,7 +163,6 @@ export const ContractsTable = ({ data }: Props): ReactElement => {
163
163
  });
164
164
 
165
165
  useEffect(() => {
166
- console.log('Row selection changed:', rowSelection);
167
166
  const selectedIndexes = Object.entries(rowSelection)
168
167
  .filter(([, value]) => !!value)
169
168
  .map(([key]) => Number(key));
@@ -113,7 +113,7 @@ export const IssueDocumentsModal = ({ contractIds }: Props): ReactElement => {
113
113
  return {
114
114
  ...field,
115
115
  ...watchFieldArray[index],
116
- id: field.client?.id,
116
+ id: field.id,
117
117
  };
118
118
  });
119
119
  }, [fields, watchFieldArray]);
@@ -127,8 +127,10 @@ export const IssueDocumentsModal = ({ contractIds }: Props): ReactElement => {
127
127
  </DialogTrigger>
128
128
  <DialogContent className="min-w-[90vw] w-full max-h-[90vh] overflow-y-auto">
129
129
  <DialogHeader>
130
- <DialogTitle>Filter Contracts</DialogTitle>
131
- <DialogDescription>Filter contracts based on various criteria</DialogDescription>
130
+ <DialogTitle>Issue Documents for Contracts</DialogTitle>
131
+ <DialogDescription>
132
+ Review and issue monthly documents for the selected contracts
133
+ </DialogDescription>
132
134
  </DialogHeader>
133
135
  {fetching ? (
134
136
  <AccounterLoader />
@@ -30,7 +30,7 @@ export const ContractsScreen = (): ReactElement => {
30
30
  }
31
31
 
32
32
  // Only fetch if we don't have loader data
33
- const [{ data, fetching }, fetchContracts] = useQuery({
33
+ const [{ data, fetching }] = useQuery({
34
34
  query: ContractsScreenDocument,
35
35
  pause: !adminId || !!loaderData,
36
36
  variables: {
@@ -50,7 +50,5 @@ export const ContractsScreen = (): ReactElement => {
50
50
  return <div>Contracts not found</div>;
51
51
  }
52
52
 
53
- return (
54
- <ContractsTable data={contractsData.contractsByAdmin} onChange={async () => fetchContracts()} />
55
- );
53
+ return <ContractsTable data={contractsData.contractsByAdmin} />;
56
54
  };
@@ -1,16 +0,0 @@
1
- import{v as V,j as e,bm as q,R as ce,p as P,au as B,B as f,aM as oe,m as O,bn as $,bo as Q,bp as G,bq as R,br as de,r,D as X,aU as Y,x as J,aV as W,aW as Z,aX as ee,aY as N,al as S,am as I,an as M,ao as F,aq as x,bs as ue,bt as me,bu as xe,w as E,u as se,bv as he,G as te,bw as ge,y as je,bx as pe,c as ae,Q as fe,by as Ce,bz as ne,bA as le,bB as w,bC as p,bD as ie,bE as j,bF as ve,bG as be,av as ye,bH as De,bI as Ne,bJ as we,bK as Se,bL as Ie,bM as U,P as Me,bN as Fe,bO as Le,bP as Ae,bQ as Re,bR as Ve,a7 as ke,b as Te,bS as Pe}from"./index-Bd-SKdyy.js";import{M as Be,s as Oe,a as Ee}from"./modify-contract-dialog-BoeamC68.js";import{E as Ue}from"./eye-off-BNMLF-BO.js";import{F as ze}from"./funnel-DW3_rS_8.js";import{u as Ke,E as He}from"./edit-issue-document-modal-2d_PTbvO.js";import{s as _e}from"./subMonths-DHPWOZP6.js";/**
2
- * @license lucide-react v0.548.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const qe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],z=V("arrow-down",qe);/**
7
- * @license lucide-react v0.548.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const $e=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],K=V("arrow-up",$e);/**
12
- * @license lucide-react v0.548.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Qe=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ge=V("chevrons-up-down",Qe),H=({timelessDate:s})=>e.jsx("p",{className:"text-sm font-medium",children:new Date(s).toLocaleDateString()});function Xe({id:s,name:t}){return e.jsx("div",{className:"flex flex-wrap flex-col justify-center",children:e.jsx(q,{to:ce.BUSINESSES.DETAIL(s),target:"_blank",rel:"noreferrer",onClick:i=>i.stopPropagation(),className:"inline-flex items-center font-semibold",children:t})})}function m({column:s,title:t,className:i}){return s.getCanSort()?e.jsx("div",{className:O("flex items-center gap-2",i),children:e.jsxs($,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(f,{variant:"ghost",size:"sm",className:"data-[state=open]:bg-accent -ml-3 h-8",children:[e.jsx("span",{children:t}),s.getIsSorted()==="desc"?e.jsx(z,{}):s.getIsSorted()==="asc"?e.jsx(K,{}):e.jsx(Ge,{})]})}),e.jsxs(G,{align:"start",children:[e.jsxs(R,{onClick:()=>s.toggleSorting(!1),children:[e.jsx(K,{}),"Asc"]}),e.jsxs(R,{onClick:()=>s.toggleSorting(!0),children:[e.jsx(z,{}),"Desc"]}),e.jsx(de,{}),e.jsxs(R,{onClick:()=>s.toggleVisibility(!1),children:[e.jsx(Ue,{}),"Hide"]})]})]})}):e.jsx("div",{className:O(i),children:t})}const _=[{id:"select",header:({table:s})=>e.jsx(P,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>s.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"}),cell:({row:s})=>e.jsx(P,{checked:s.getIsSelected(),onCheckedChange:t=>s.toggleSelected(!!t),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1},{accessorKey:"isActive",header:({column:s})=>e.jsx(m,{column:s,title:"Is Active"}),cell:({row:s})=>s.getValue("isActive")?e.jsx(B,{variant:"default",children:"Active"}):e.jsx(B,{variant:"destructive",children:"Inactive"})},{accessorKey:"client.name",header:({column:s})=>e.jsx(m,{column:s,title:"Client"}),cell:({row:s})=>e.jsx(Xe,{id:s.original.client.id,name:s.original.client.name})},{accessorKey:"startDate",header:({column:s})=>e.jsx(m,{column:s,title:"Start"}),cell:({row:s})=>e.jsx(H,{timelessDate:s.getValue("startDate")})},{accessorKey:"endDate",header:({column:s})=>e.jsx(m,{column:s,title:"End"}),cell:({row:s})=>e.jsx(H,{timelessDate:s.getValue("endDate")})},{accessorKey:"purchaseOrder",header:({column:s})=>e.jsx(m,{column:s,title:"Purchase Order"}),cell:({row:s})=>e.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[s.original.msCloud&&e.jsx(q,{to:s.original.msCloud,target:"_blank",rel:"noreferrer",className:"size-8",children:e.jsx(f,{variant:"link",size:"sm",disabled:!0,children:e.jsx(oe,{className:"size-4"})})}),e.jsx("span",{className:"text-sm font-medium",children:s.getValue("purchaseOrder")})]})},{accessorKey:"product",header:({column:s})=>e.jsx(m,{column:s,title:"Product"}),cell:({row:s})=>e.jsx("p",{className:"text-sm font-medium",children:s.getValue("product")})},{accessorKey:"plan",header:({column:s})=>e.jsx(m,{column:s,title:"Subscription Plan"}),cell:({row:s})=>e.jsx("p",{className:"text-sm font-medium",children:s.getValue("plan")})},{accessorKey:"billingCycle",header:({column:s})=>e.jsx(m,{column:s,title:"Billing Cycle"}),cell:({row:s})=>e.jsx("p",{className:"text-sm font-medium",children:s.getValue("billingCycle")})},{accessorKey:"amount.raw",header:({column:s})=>e.jsx(m,{column:s,title:"Amount"}),cell:({row:s})=>e.jsx("p",{className:"text-sm font-medium",children:s.original.amount.formatted})},{accessorKey:"operationsLimit",header:({column:s})=>e.jsx(m,{column:s,title:"Operations Limit"}),cell:({row:s})=>{const t=s.getValue("operationsLimit");return t?e.jsx("p",{className:"text-sm font-medium",children:t}):null}},{accessorKey:"edit",header:"",cell:({row:s})=>e.jsx(Be,{clientId:s.original.client.id,contractId:s.original.id}),enableSorting:!1}];function Ye({table:s}){const[t,i]=r.useState(!1);return e.jsxs(X,{open:t,onOpenChange:i,children:[e.jsx(Y,{asChild:!0,children:e.jsx(f,{size:"sm",variant:"outline",children:e.jsx(ze,{className:"size-4"})})}),e.jsxs(J,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(W,{children:[e.jsx(Z,{children:"Filter Contracts"}),e.jsx(ee,{children:"Filter contracts based on various criteria"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(N,{children:"Product Type"}),e.jsxs(S,{onValueChange:a=>s.getColumn("product")?.setFilterValue(a==="NULL"?"":a),value:s.getColumn("product")?.getFilterValue(),children:[e.jsx(I,{className:"w-full",children:e.jsx(M,{})}),e.jsxs(F,{children:[e.jsx(x,{value:"NULL",className:"font-light text-xs",children:"(None)"}),Object.values(ue).map(a=>e.jsx(x,{value:a,children:a},a))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(N,{children:"Billing Cycle"}),e.jsxs(S,{onValueChange:a=>s.getColumn("billingCycle")?.setFilterValue(a==="NULL"?"":a),value:s.getColumn("billingCycle")?.getFilterValue(),children:[e.jsx(I,{className:"w-full",children:e.jsx(M,{})}),e.jsxs(F,{children:[e.jsx(x,{value:"NULL",className:"font-light text-xs",children:"(None)"}),Object.values(me).map(a=>e.jsx(x,{value:a,children:Oe(a)},a))]})]})]})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(N,{children:"Subscription Plan"}),e.jsxs(S,{onValueChange:a=>s.getColumn("plan")?.setFilterValue(a==="NULL"?"":a),value:s.getColumn("plan")?.getFilterValue(),children:[e.jsx(I,{className:"w-full",children:e.jsx(M,{})}),e.jsxs(F,{children:[e.jsx(x,{value:"NULL",className:"font-light text-xs",children:"(None)"}),Object.values(xe).map(a=>e.jsx(x,{value:a,children:Ee(a)},a))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(N,{children:"Is Active"}),e.jsxs(S,{onValueChange:a=>s.getColumn("isActive")?.setFilterValue(a==="NULL"?"":a==="active"),value:Je(s.getColumn("isActive")?.getFilterValue()),children:[e.jsx(I,{className:"w-full",children:e.jsx(M,{})}),e.jsxs(F,{children:[e.jsx(x,{value:"NULL",className:"font-light text-xs",children:"(None)"}),e.jsx(x,{value:"active",children:"Active"}),e.jsx(x,{value:"inactive",children:"Inactive"})]})]})]})]})]})]})]})}function Je(s){return s===void 0?"NULL":s?"active":"inactive"}const We=({contractIds:s})=>{const[t,i]=r.useState(!1),[a,v]=r.useState(E(_e(new Date,1),"yyyy-MM-dd")),[C,h]=r.useState([]),{issueDocuments:g}=Ke(),[{data:b,fetching:y},c]=se({query:he,variables:{issueMonth:a,contractIds:s},pause:!t});r.useEffect(()=>{b?.clientChargesDraftsByContracts&&h(b.clientChargesDraftsByContracts.map(d=>te(ge,d)))},[b,h]),r.useEffect(()=>{t&&c()},[t,c]);const n=je({values:{generateDocumentsInfo:C}}),l=r.useCallback(d=>{g(d)},[g]),{fields:o,remove:L,update:re}=pe({control:n.control,name:"generateDocumentsInfo"}),k=n.watch("generateDocumentsInfo"),T=r.useMemo(()=>o.map((d,u)=>({...d,...k[u],id:d.client?.id})),[o,k]);return e.jsxs(X,{open:t,onOpenChange:i,children:[e.jsx(Y,{asChild:!0,children:e.jsx(f,{size:"sm",variant:"outline",disabled:s.length===0,children:"Issue Documents"})}),e.jsxs(J,{className:"min-w-[90vw] w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs(W,{children:[e.jsx(Z,{children:"Filter Contracts"}),e.jsx(ee,{children:"Filter contracts based on various criteria"})]}),y?e.jsx(ae,{}):e.jsx(fe,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(l),className:"min-w-5xl w-full",children:[e.jsxs("div",{className:"flex gap-2 items-center mb-4",children:[e.jsx(N,{children:"Issue Month:"}),e.jsx(Ce,{value:new Date(a),onChange:d=>{const u=new Date(d.getFullYear(),d.getMonth(),15);v(E(u,"yyyy-MM-dd"))},popoverProps:{withinPortal:!1}})]}),e.jsxs(ne,{children:[e.jsx(le,{children:e.jsxs(w,{children:[e.jsx(p,{children:"Name"}),e.jsx(p,{children:"Document"}),e.jsx(p,{children:"Amount"}),e.jsx(p,{children:"Remark"}),e.jsx(p,{children:"Recipients"}),e.jsx(p,{})]})}),e.jsx(ie,{children:T.map(({id:d,...u},A)=>e.jsxs(w,{children:[e.jsx(j,{children:u.client?.name}),e.jsx(j,{children:u.type}),e.jsxs(j,{children:[u.income?.[0]?.price," ",u.income?.[0]?.currency]}),e.jsx(j,{children:e.jsx("span",{className:"text-sm text-gray-500 whitespace-normal max-w-50",children:u.remarks})}),e.jsx(j,{children:e.jsx("div",{className:"flex flex-col",children:u.client?.emails?.map(D=>e.jsx("span",{className:"text-sm text-gray-500",children:D},D))})}),e.jsx(j,{children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs(ve,{children:[e.jsx(be,{asChild:!0,type:"button",children:e.jsx(f,{className:"size-7.5",variant:"secondary",onClick:()=>L(A),children:e.jsx(ye,{size:16})})}),e.jsx(De,{children:e.jsx("p",{children:"Remove document"})})]}),e.jsx(He,{draft:u,onApprove:D=>{n.setValue(`generateDocumentsInfo.${A}`,D,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),re(A,{...D})}})]})})]},d))})]}),e.jsx("div",{className:"flex justify-between items-center mt-4",children:e.jsx(Ne,{onConfirm:n.handleSubmit(l),title:`Are you sure you want to issue ${T.length} documents?`,children:e.jsx(f,{children:"Issue"})})})]})})]})]})};function Ze(s){const t=te(Ve,s);return{id:t.id,isActive:t.isActive,client:{id:t.client.id,name:t.client.originalBusiness.name},purchaseOrder:t.purchaseOrders[0],startDate:t.startDate,endDate:t.endDate,amount:{raw:t.amount.raw,formatted:t.amount.formatted},billingCycle:t.billingCycle,product:t.product??void 0,plan:t.plan??void 0,operationsLimit:t.operationsLimit,msCloud:t.msCloud?.toString()??void 0}}const es=({data:s})=>{const[t,i]=r.useState([{id:"endDate",desc:!0},{id:"amount.raw",desc:!0}]),[a,v]=r.useState({}),[C,h]=r.useState([]),[g,b]=r.useState([]),y=r.useMemo(()=>s.map(n=>Ze(n)),[s]),c=we({data:y,columns:_,getCoreRowModel:Re(),onSortingChange:i,getSortedRowModel:Ae(),getPaginationRowModel:Le(),onRowSelectionChange:v,onColumnFiltersChange:h,getFilteredRowModel:Fe(),state:{sorting:t,rowSelection:a,columnFilters:C},initialState:{pagination:{pageIndex:0,pageSize:50}}});return r.useEffect(()=>{console.log("Row selection changed:",a);const n=Object.entries(a).filter(([,o])=>!!o).map(([o])=>Number(o)),l=Array.from(new Set(y.filter((o,L)=>n.includes(L)).map(o=>o.id)));(g.length!==l.length||!g.every(o=>l.includes(o)))&&b(l)},[a,y,g,C]),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center py-4 gap-4",children:[e.jsx(Ye,{table:c}),e.jsxs($,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(f,{variant:"outline",children:["Columns ",e.jsx(Se,{})]})}),e.jsx(G,{align:"end",children:c.getAllColumns().filter(n=>n.getCanHide()).map(n=>e.jsx(Ie,{className:"capitalize",checked:n.getIsVisible(),onCheckedChange:l=>n.toggleVisibility(!!l),children:n.id},n.id))})]}),e.jsx("div",{className:"ml-auto",children:e.jsx(We,{contractIds:g,className:"ml-auto"})})]}),e.jsx("div",{className:"overflow-hidden rounded-md border",children:e.jsxs(ne,{children:[e.jsx(le,{children:c.getHeaderGroups().map(n=>e.jsx(w,{children:n.headers.map(l=>e.jsx(p,{colSpan:l.colSpan,children:l.isPlaceholder?null:U(l.column.columnDef.header,l.getContext())},l.id))},n.id))}),e.jsx(ie,{children:c.getRowModel().rows?.length?c.getRowModel().rows.map(n=>e.jsx(w,{children:n.getVisibleCells().map(l=>e.jsx(j,{children:U(l.column.columnDef.cell,l.getContext())},l.id))},n.id)):e.jsx(w,{children:e.jsx(j,{colSpan:_.length,className:"h-24 text-center",children:"No results."})})})]})}),e.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[e.jsxs("div",{className:"text-muted-foreground flex-1 text-sm",children:[c.getFilteredSelectedRowModel().rows.length," of"," ",c.getFilteredRowModel().rows.length," row(s) selected."]}),e.jsx(Me,{className:"w-fit mx-0",value:c.getState().pagination.pageIndex,total:c.getPageCount(),onChange:n=>c.setPageIndex(n)})]})]})},rs=()=>{const{userContext:s}=r.useContext(ke),t=s?.context.adminBusinessId;let i;try{i=Te()}catch{}const[{data:a,fetching:v},C]=se({query:Pe,pause:!t||!!i,variables:{adminId:t??""}}),h=i||a;return!i&&v&&!h?.contractsByAdmin?e.jsx(ae,{}):!t||!h?.contractsByAdmin?e.jsx("div",{children:"Contracts not found"}):e.jsx(es,{data:h.contractsByAdmin,onChange:async()=>C()})};export{rs as ContractsScreen};
@@ -1 +0,0 @@
1
- import{j as e,dl as t}from"./index-Bd-SKdyy.js";import{P as o}from"./page-layout-XgNPsCmr.js";const n=()=>e.jsx(o,{title:"New Document",description:"Issue a document for a client",children:e.jsx(t,{})});export{n as IssueDocumentScreen};
@@ -1 +0,0 @@
1
- import{bt as w,bu as P,g as _,bT as ee,r as j,t as f,i as X,bU as te,u as ne,bV as ae,y as se,bW as S,bs as H,bb as E,z as re,a3 as ie,w as v,j as e,D as oe,aU as ce,B as D,bX as le,at as z,x as de,aV as ue,aW as me,aX as pe,Q as he,W as o,X as c,Y as l,Z as d,I as C,$ as p,au as xe,av as je,al as k,am as T,an as N,ao as O,aq as A,ag as ye,aL as ge,az as Ce,aZ as fe,bY as De,bZ as b,a5 as R,b_ as be,aF as we,a6 as ve,aE as ke,b$ as U,c0 as Te,aH as Ne}from"./index-Bd-SKdyy.js";function Oe(u){switch(u){case w.Annual:return"Annual";case w.Monthly:return"Monthly";default:throw new Error(`Unsupported Billing Cycle: ${u}`)}}function Ae(u){switch(u){case P.Enterprise:return"Enterprise";case P.Pro:return"Pro";default:throw new Error(`Unsupported Subscription plan: ${u}`)}}const Pe="createContract",Le=()=>{const[{fetching:u},s]=_(ee),x=j.useCallback(async h=>{const m=`Error creating new contract for client[${h.input.clientId}]`,r=`${Pe}-${h.input.clientId}`;f.loading("Creating contract",{id:r});try{const i=await s(h);X(i,m,r)&&f.success("Success",{id:r,description:`Contract for client ${h.input.clientId} was successfully created`})}catch(i){console.error(`${m}: ${i}`),f.error("Error",{id:r,description:m,duration:1e5,closeButton:!0})}},[s]);return{creating:u,createContract:x}},Se="updateContract",Ee=()=>{const[{fetching:u},s]=_(te),x=j.useCallback(async h=>{const m=`Error updating contract ID [${h.contractId}]`,r=`${Se}-${h.contractId}`;f.loading("Updating contract",{id:r});try{const i=await s(h),y=X(i,m,r,"updateContract");if(y)return f.success("Success",{id:r,description:"Contract updated"}),y.updateContract}catch(i){console.error(`${m}: ${i}`),f.error("Error",{id:r,description:m,duration:1e5,closeButton:!0})}},[s]);return{updating:u,updateContract:x}},Ie=ie({id:Te().optional(),startDate:U("Start date is required"),endDate:U("End date is required"),pos:ke(R()),paymentAmount:ve().min(0,"Payment amount must be non-negative"),paymentCurrency:b(Object.values(E),"Currency is required"),productType:b(Object.values(H)).optional(),msCloudLink:we().optional().or(Ne("")),billingCycle:b(Object.values(w)).optional(),subscriptionPlan:b(Object.values(P)).optional(),isActive:be(),defaultRemark:R().optional(),defaultDocumentType:b(Object.values(S)),operationsLimit:De().min(0,"Operations limit must be non-negative")}),q={startDate:"",endDate:"",pos:[],paymentAmount:0,paymentCurrency:E.Usd,productType:H.Hive,msCloudLink:void 0,billingCycle:w.Monthly,subscriptionPlan:void 0,isActive:!0,defaultRemark:void 0,defaultDocumentType:S.Proforma,operationsLimit:0};function Me({clientId:u,contract:s,contractId:x,onDone:h}){const[m,r]=j.useState(!1),[i,y]=j.useState(null),[I,F]=j.useState(""),{updateContract:M,updating:W}=Ee(),{createContract:V,creating:Z}=Le(),[{data:L,fetching:Q},$]=ne({query:ae,pause:!x||!m,variables:{contractId:x??""}});j.useEffect(()=>{m&&x&&$()},[m,x,$]);const a=se({resolver:re(Ie),defaultValues:s||q}),B=()=>{const t=I.trim();if(t){const n=a.getValues("pos");n.includes(t)||a.setValue("pos",[...n,t],{shouldDirty:!0}),F("")}},Y=t=>{const n=a.getValues("pos");a.setValue("pos",n.filter((g,J)=>J!==t),{shouldDirty:!0})};j.useEffect(()=>{s&&(y(s),a.reset({startDate:s.startDate,endDate:s.endDate,pos:s.pos,paymentAmount:s.paymentAmount,paymentCurrency:s.paymentCurrency,productType:s.productType,msCloudLink:s.msCloudLink,billingCycle:s.billingCycle,subscriptionPlan:s.subscriptionPlan,isActive:s.isActive,defaultRemark:s.defaultRemark,defaultDocumentType:s.defaultDocumentType,operationsLimit:s.operationsLimit}),r(!0))},[s,a]),j.useEffect(()=>{if(L?.contractsById){const t=L.contractsById,n={startDate:t.startDate,endDate:t.endDate,pos:t.purchaseOrders,paymentAmount:t.amount.raw,paymentCurrency:t.amount.currency,productType:t.product??void 0,msCloudLink:t.msCloud?.toString()??void 0,billingCycle:t.billingCycle,subscriptionPlan:t.plan??void 0,isActive:t.isActive,defaultRemark:t.remarks??void 0,defaultDocumentType:t.documentType,operationsLimit:t.operationsLimit};y({id:t.id,...n}),a.reset(n)}},[L,a]);const K=()=>{y(null),a.reset(q),r(!0)},G=j.useCallback(async t=>{if(i)await M({contractId:i.id,input:{amount:{raw:t.paymentAmount,currency:t.paymentCurrency},billingCycle:t.billingCycle,documentType:t.defaultDocumentType,endDate:v(new Date(t.endDate),"yyyy-MM-dd"),isActive:t.isActive,msCloud:t.msCloudLink,plan:t.subscriptionPlan,product:t.productType,purchaseOrders:t.pos,remarks:t.defaultRemark,startDate:v(new Date(t.startDate),"yyyy-MM-dd"),operationsLimit:t.operationsLimit}});else{if(!t.billingCycle){a.setError("billingCycle",{message:"Billing cycle is required"});return}await V({input:{clientId:u,amount:{raw:t.paymentAmount,currency:t.paymentCurrency},billingCycle:t.billingCycle,documentType:t.defaultDocumentType,endDate:v(new Date(t.endDate),"yyyy-MM-dd"),isActive:t.isActive,msCloud:t.msCloudLink,plan:t.subscriptionPlan,product:t.productType,purchaseOrders:t.pos,remarks:t.defaultRemark,startDate:v(new Date(t.startDate),"yyyy-MM-dd"),operationsLimit:t.operationsLimit}})}r(!1),y(null),h?.()},[i,h,V,M,u,a]);return e.jsxs(oe,{open:m,onOpenChange:r,children:[e.jsx(ce,{asChild:!0,children:e.jsx(D,{size:"sm",onClick:K,children:x?e.jsx(le,{className:"size-4"}):e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"size-4 mr-2"}),"New Contract"]})})}),e.jsxs(de,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(ue,{children:[e.jsx(me,{children:i?"Edit Contract":"Create New Contract"}),e.jsx(pe,{children:i?"Update contract details":"Add a new contract with all required details"})]}),Q?e.jsx(e.Fragment,{children:"Fetching contract details..."}):e.jsx(he,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(G),children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx(o,{control:a.control,name:"operationsLimit",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Operations Limit"}),e.jsx(d,{children:e.jsx(C,{type:"number",placeholder:"500",...t})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"pos",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Purchase Orders"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(C,{placeholder:"Add PO...",value:I,onChange:n=>F(n.target.value),onKeyDown:n=>{n.key==="Enter"&&(n.preventDefault(),B())}}),e.jsx(D,{type:"button",size:"sm",onClick:B,children:e.jsx(z,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.value?.map((n,g)=>e.jsxs(xe,{variant:"secondary",className:"gap-1 max-w-xs truncate",children:[n,g===t.value.length-1&&e.jsx(D,{variant:"ghost",size:"icon",className:"p-0 size-3",onClick:()=>Y(g),children:e.jsx(je,{className:"size-3 cursor-pointer flex-shrink-0"})})]},n))}),e.jsx(p,{})]})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx(o,{control:a.control,name:"startDate",render:({field:{onChange:t,...n}})=>e.jsxs(c,{children:[e.jsx(l,{children:"Start Date"}),e.jsx(d,{children:e.jsx(C,{type:"date",...n,onInput:g=>t(g)})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"endDate",render:({field:{onChange:t,...n}})=>e.jsxs(c,{children:[e.jsx(l,{children:"End Date"}),e.jsx(d,{children:e.jsx(C,{type:"date",...n,onInput:g=>t(g)})}),e.jsx(p,{})]})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(o,{control:a.control,name:"paymentAmount",render:({field:t})=>e.jsxs(c,{className:"md:col-span-2",children:[e.jsx(l,{children:"Payment Amount"}),e.jsx(d,{children:e.jsx(C,{type:"number",placeholder:"24000",...t,onChange:n=>{t.onChange(n?.target.value?Number(n?.target.value):void 0)}})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"paymentCurrency",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Currency"}),e.jsxs(k,{onValueChange:t.onChange,defaultValue:t.value,children:[e.jsx(d,{children:e.jsx(T,{children:e.jsx(N,{})})}),e.jsx(O,{children:Object.values(E).map(n=>e.jsx(A,{value:n,children:n},n))})]}),e.jsx(p,{})]})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx(o,{control:a.control,name:"productType",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Product Type"}),e.jsx(d,{children:e.jsx(C,{placeholder:"Cloud Services",...t})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"billingCycle",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Billing Cycle"}),e.jsxs(k,{onValueChange:t.onChange,defaultValue:t.value,children:[e.jsx(d,{children:e.jsx(T,{children:e.jsx(N,{})})}),e.jsx(O,{children:Object.values(w).map(n=>e.jsx(A,{value:n,children:Oe(n)},n))})]}),e.jsx(p,{})]})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx(o,{control:a.control,name:"subscriptionPlan",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Subscription Plan"}),e.jsx(d,{children:e.jsxs(k,{onValueChange:t.onChange,defaultValue:t.value,children:[e.jsx(d,{children:e.jsx(T,{children:e.jsx(N,{})})}),e.jsx(O,{children:Object.values(P).map(n=>e.jsx(A,{value:n,children:Ae(n)},n))})]})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"isActive",render:({field:t})=>e.jsxs(c,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[e.jsx("div",{className:"space-y-0.5",children:e.jsx(l,{className:"text-base",children:"Active Status"})}),e.jsx(d,{children:e.jsx(ye,{checked:t.value,onCheckedChange:t.onChange})})]})})]}),e.jsx(o,{control:a.control,name:"msCloudLink",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"MS Cloud Link"}),e.jsx(d,{children:e.jsx(C,{type:"url",placeholder:"https://portal.azure.com/contract-id",...t})}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"defaultDocumentType",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Default Document Type"}),e.jsxs(k,{onValueChange:t.onChange,defaultValue:t.value,children:[e.jsx(d,{children:e.jsx(T,{children:e.jsx(N,{})})}),e.jsx(O,{children:Object.values(S).map(n=>e.jsx(A,{value:n,children:ge(n)},n))})]}),e.jsx(p,{})]})}),e.jsx(o,{control:a.control,name:"defaultRemark",render:({field:t})=>e.jsxs(c,{children:[e.jsx(l,{children:"Default Remark"}),e.jsx(d,{children:e.jsx(Ce,{placeholder:"Enter default remark for this contract...",rows:3,...t})}),e.jsx(p,{})]})})]}),e.jsxs(fe,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(D,{type:"submit",disabled:Z||W,children:i?"Update Contract":"Create Contract"})]})]})})]})]})}export{Me as M,Ae as a,Oe as s};
@@ -1 +0,0 @@
1
- import{gE as n}from"./index-Bd-SKdyy.js";function a(o,s,t){return n(o,-s,t)}export{a as s};
@@ -1 +0,0 @@
1
- import{j as o,gY as t,bF as e,bG as l,bH as n}from"./index-Bd-SKdyy.js";function a({children:i,content:r,...s}){return o.jsx(t,{children:o.jsxs(e,{children:[o.jsx(l,{asChild:!0,children:i}),o.jsx(n,{...s,children:r})]})})}export{a as T};