@accounter/client 0.0.8-alpha-20251024170933-d98d02506cc646957a7dbc39cb8fe9bfe2bac635 → 0.0.8-alpha-20251027003629-e64c01111f4a4cec34d5ca9a84e02646b69f80b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/assets/{Checkbox-O_bmDshT.js → Checkbox-DjollWGm.js} +2 -2
- package/dist/assets/{Progress-DNAb6Lcr.js → Progress-AG7ZMAJu.js} +1 -1
- package/dist/assets/{Typography-KCSoinJM.js → Typography-Cd0kk1vc.js} +1 -1
- package/dist/assets/{accordion-CXrCBIkr.js → accordion-s9Ku08QQ.js} +1 -1
- package/dist/assets/{accountant-approvals-DpVkzbd9.js → accountant-approvals-Bqrsn1y5.js} +1 -1
- package/dist/assets/{all-charges-B88-JVp0.js → all-charges-BQcsaMon.js} +1 -1
- package/dist/assets/{arrow-up-down-VGHZ-r_x.js → arrow-up-down-J-i_WnHP.js} +2 -2
- package/dist/assets/{building-2-C1ZqxhA5.js → building-2-B92gXbOj.js} +2 -2
- package/dist/assets/business-CfqFJUkR.js +32 -0
- package/dist/assets/{business-header-kyLMnyZj.js → business-header-Cr5S_Mz7.js} +1 -1
- package/dist/assets/{business-transactions-single-idJgJNHY.js → business-transactions-single-BD4bLNv2.js} +1 -1
- package/dist/assets/{business-trip-C1SwPMTA.js → business-trip-DYkKK6Gk.js} +1 -1
- package/dist/assets/{charges-filters-D0LWtwp4.js → charges-filters-CoFkjW00.js} +1 -1
- package/dist/assets/{charges-ledger-validation-D0UN5-yy.js → charges-ledger-validation-D_cg1bn-.js} +1 -1
- package/dist/assets/{chart-C0g6q8sT.js → chart-CQ9Opsuw.js} +1 -1
- package/dist/assets/{data-table-pagination-Bd4MUVlc.js → data-table-pagination-CN5CnGZV.js} +3 -3
- package/dist/assets/{editable-business-trip-8FHSmyUI.js → editable-business-trip--kNXo9tv.js} +4 -4
- package/dist/assets/{index-ByawU2Ir.js → index--XWh2RKR.js} +1 -1
- package/dist/assets/{index-BRNqBfLg.js → index-Au8Djmrz.js} +1 -1
- package/dist/assets/{index-D1_IyaQG.js → index-BGHdyfCs.js} +1 -1
- package/dist/assets/{index-CiZLBY-T.js → index-BNtiIPMq.js} +1 -1
- package/dist/assets/{index-BMRiK-sA.js → index-BSmbKLQe.js} +2 -2
- package/dist/assets/{index-BuRaZ4DH.js → index-BWpLPx22.js} +1 -1
- package/dist/assets/{index--FKfT8sG.js → index-C3pV-XkD.js} +2 -2
- package/dist/assets/{index-BSCXwbPK.js → index-C66UYUUf.js} +1 -1
- package/dist/assets/{index-CvEGrHKM.js → index-C7al3ztL.js} +1 -1
- package/dist/assets/{index-ByEhIp5_.js → index-CC_fLCrA.js} +7 -7
- package/dist/assets/{index-CUFNiTlG.js → index-CS40C1qp.js} +1 -1
- package/dist/assets/{index-DJM7_Iht.js → index-Cc4HfGhd.js} +1 -1
- package/dist/assets/{index-Bco41uAi.js → index-Cw9zbBbJ.js} +1 -1
- package/dist/assets/{index-ByiR6WrS.js → index-DDGgWxhe.js} +3 -3
- package/dist/assets/{index-aTVSOG7M.js → index-DNTlYcfH.js} +1 -1
- package/dist/assets/{index-DVPWQUlL.js → index-DS_RReq_.js} +1 -1
- package/dist/assets/{index-DE1XBKEu.js → index-DVbMTBK4.js} +1 -1
- package/dist/assets/{index-Buz-IrXk.js → index-DepseT6D.js} +1 -1
- package/dist/assets/{index-B2DG6Av_.js → index-DfI9E1Fb.js} +98 -98
- package/dist/assets/{index-C-05m3Xe.js → index-DzNfXERJ.js} +1 -1
- package/dist/assets/{index-CBxS5gse.js → index-fwXllLnH.js} +1 -1
- package/dist/assets/{index-O1k5sVaE.js → index-hr9hQe_a.js} +1 -1
- package/dist/assets/{index-CAtbp5mY.js → index-n3bzj3IE.js} +1 -1
- package/dist/assets/{index.es-DvJwAZOE.js → index.es-CKlpQqlO.js} +1 -1
- package/dist/assets/{issue-document-MHaHnees.js → issue-document-B4kkfOo0.js} +1 -1
- package/dist/assets/{login-page--AsTB5y2.js → login-page-NvQKYh34.js} +1 -1
- package/dist/assets/{missing-info-charges-DptgiNMX.js → missing-info-charges-DrF2b0mO.js} +1 -1
- package/dist/assets/{page-not-found-CP-tMcOZ.js → page-not-found-7AAOkZhu.js} +1 -1
- package/dist/assets/{pencil-hO35_0S3.js → pencil-DNPAJOPL.js} +2 -2
- package/dist/assets/{report-commentary-row-DXBs2-Cb.js → report-commentary-row-CF-l1YIC.js} +1 -1
- package/dist/assets/{save-Bug88Y1k.js → save-D84vX5ea.js} +2 -2
- package/dist/assets/{sub-DOUvsu0j.js → sub-BbpGm1pj.js} +1 -1
- package/dist/assets/subMonths-0tIJizDp.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/src/components/clients/modify-client-dialog.tsx +3 -3
- package/src/components/common/modals/insert-business.tsx +1 -1
- package/dist/assets/business-CxsRSA_r.js +0 -32
- package/dist/assets/subMonths-B_ekFNhW.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/all-charges-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/all-charges-BQcsaMon.js","assets/charges-filters-CoFkjW00.js","assets/sub-BbpGm1pj.js","assets/subMonths-0tIJizDp.js","assets/index-DDGgWxhe.js","assets/Checkbox-DjollWGm.js","assets/missing-info-charges-DrF2b0mO.js","assets/charges-ledger-validation-D_cg1bn-.js","assets/Progress-AG7ZMAJu.js","assets/index-BNtiIPMq.js","assets/business-header-Cr5S_Mz7.js","assets/building-2-B92gXbOj.js","assets/business-CfqFJUkR.js","assets/save-D84vX5ea.js","assets/chart-CQ9Opsuw.js","assets/sequential-CAnleQny.js","assets/pencil-DNPAJOPL.js","assets/accordion-s9Ku08QQ.js","assets/index-C66UYUUf.js","assets/editable-business-trip--kNXo9tv.js","assets/business-trip-DYkKK6Gk.js","assets/index-Cw9zbBbJ.js","assets/Typography-Cd0kk1vc.js","assets/index-fwXllLnH.js","assets/data-table-pagination-CN5CnGZV.js","assets/arrow-up-down-J-i_WnHP.js","assets/index-DzNfXERJ.js","assets/index-CC_fLCrA.js","assets/index-C3pV-XkD.js","assets/graphql-document-dedupe-fragments-ByT8-wlV.js","assets/index-Au8Djmrz.js","assets/report-commentary-row-CF-l1YIC.js","assets/index-DS_RReq_.js","assets/index-BSmbKLQe.js","assets/index-n3bzj3IE.js","assets/index-Cc4HfGhd.js","assets/index-DVbMTBK4.js","assets/index-C7al3ztL.js","assets/accountant-approvals-Bqrsn1y5.js","assets/index-BGHdyfCs.js","assets/index-BWpLPx22.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var r9=e=>{throw TypeError(e)};var SD=(e,t,n)=>t.has(e)||r9("Cannot "+n);var ia=(e,t,n)=>(SD(e,t,"read from private field"),n?n.call(e):t.get(e)),Fu=(e,t,n)=>t.has(e)?r9("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ml=(e,t,n,i)=>(SD(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Eu=(e,t,n)=>(SD(e,t,"access private method"),n);var a9=(e,t,n,i)=>({set _(r){ml(e,t,r,n)},get _(){return ia(e,t,i)}});function Xxe(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zxe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}var xD={exports:{}},sb={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -44,452 +44,452 @@ Error generating stack: `+x.message+`
|
|
|
44
44
|
`,""):String(n.body);return{path:t,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:u}}}else if(n.formEncType==="application/json"){if(!Sl(a))return i();try{let u=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:a,formAction:o,formEncType:n.formEncType,formData:void 0,json:u,text:void 0}}}catch{return i()}}}wi(typeof FormData=="function","FormData is not available in this environment");let s,l;if(n.formData)s=zP(n.formData),l=n.formData;else if(n.body instanceof FormData)s=zP(n.body),l=n.body;else if(n.body instanceof URLSearchParams)s=n.body,l=F9(s);else if(n.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(n.body),l=F9(s)}catch{return i()}let c={formMethod:a,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Sl(c.formMethod))return{path:t,submission:c};let d=th(t);return e&&d.search&&y6(d.search)&&s.append("index",""),d.search=`?${s}`,{path:zm(d),submission:c}}function w9(e,t,n,i,r,a,o,s,l,c,d,u,m,h,v,g,k,b,w,C){let N=C?Yl(C[1])?C[1].error:C[1].data:void 0,_=r.createURL(a.location),F=r.createURL(l),B;if(d&&a.errors){let K=Object.keys(a.errors)[0];B=o.findIndex(q=>q.route.id===K)}else if(C&&Yl(C[1])){let K=C[0];B=o.findIndex(q=>q.route.id===K)-1}let T=C?C[1].statusCode:void 0,I=T&&T>=400,$={currentUrl:_,currentParams:a.matches[0]?.params||{},nextUrl:F,nextParams:o[0].params,...s,actionResult:N,actionStatus:T},j=o.map((K,q)=>{let{route:re}=K,U=null;if(B!=null&&q>B?U=!1:re.lazy?U=!0:v6(re)?d?U=QP(re,a.loaderData,a.errors):YNe(a.loaderData,a.matches[q],K)&&(U=!0):U=!1,U!==null)return HP(n,i,e,K,c,t,U);let te=I?!1:u||_.pathname+_.search===F.pathname+F.search||_.search!==F.search||XNe(a.matches[q],K),W={...$,defaultShouldRevalidate:te},le=oC(K,W);return HP(n,i,e,K,c,t,le,W)}),P=[];return v.forEach((K,q)=>{if(d||!o.some(M=>M.route.id===K.routeId)||h.has(q))return;let re=a.fetchers.get(q),U=re&&re.state!=="idle"&&re.data===void 0,te=Fm(k,K.path,b);if(!te){if(w&&U)return;P.push({key:q,routeId:K.routeId,path:K.path,matches:null,match:null,request:null,controller:null});return}if(g.has(q))return;let W=xN(te,K.path),le=new AbortController,be=Dv(r,K.path,le.signal),oe=null;if(m.has(q))m.delete(q),oe=Jv(n,i,be,te,W,c,t);else if(U)u&&(oe=Jv(n,i,be,te,W,c,t));else{let M={...$,defaultShouldRevalidate:I?!1:u};oC(W,M)&&(oe=Jv(n,i,be,te,W,c,t,M))}oe&&P.push({key:q,routeId:K.routeId,path:K.path,matches:oe,match:W,request:be,controller:le})}),{dsMatches:j,revalidatingFetchers:P}}function v6(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function QP(e,t,n){if(e.lazy)return!0;if(!v6(e))return!1;let i=t!=null&&e.id in t,r=n!=null&&n[e.id]!==void 0;return!i&&r?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!i&&!r}function YNe(e,t,n){let i=!t||n.route.id!==t.route.id,r=!e.hasOwnProperty(n.route.id);return i||r}function XNe(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function oC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function S9(e,t,n,i,r,a){let o;if(e){let c=i[e];wi(c,`No route found to patch children into: routeId = ${e}`),c.children||(c.children=[]),o=c.children}else o=n;let s=[],l=[];if(t.forEach(c=>{let d=o.find(u=>_ne(c,u));d?l.push({existingRoute:d,newRoute:c}):s.push(c)}),s.length>0){let c=Fk(s,r,[e||"_","patch",String(o?.length||"0")],i);o.push(...c)}if(a&&l.length>0)for(let c=0;c<l.length;c++){let{existingRoute:d,newRoute:u}=l[c],m=d,[h]=Fk([u],r,[],{},!0);Object.assign(m,{element:h.element?h.element:m.element,errorElement:h.errorElement?h.errorElement:m.errorElement,hydrateFallbackElement:h.hydrateFallbackElement?h.hydrateFallbackElement:m.hydrateFallbackElement})}}function _ne(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,i)=>t.children?.some(r=>_ne(n,r))):!1}var x9=new WeakMap,Fne=({key:e,route:t,manifest:n,mapRouteProperties:i})=>{let r=n[t.id];if(wi(r,"No route found in manifest"),!r.lazy||typeof r.lazy!="object")return;let a=r.lazy[e];if(!a)return;let o=x9.get(r);o||(o={},x9.set(r,o));let s=o[e];if(s)return s;let l=(async()=>{let c=vNe(e),u=r[e]!==void 0&&e!=="hasErrorBoundary";if(c)ja(!c,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),o[e]=Promise.resolve();else if(u)ja(!1,`Route "${r.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await a();m!=null&&(Object.assign(r,{[e]:m}),Object.assign(r,i(r)))}typeof r.lazy=="object"&&(r.lazy[e]=void 0,Object.values(r.lazy).every(m=>m===void 0)&&(r.lazy=void 0))})();return o[e]=l,l},N9=new WeakMap;function ZNe(e,t,n,i,r){let a=n[e.id];if(wi(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=N9.get(a);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let u=(async()=>{wi(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),h={};for(let v in m){let g=m[v];if(g===void 0)continue;let k=bNe(v),w=a[v]!==void 0&&v!=="hasErrorBoundary";k?ja(!k,"Route property "+v+" is not a supported property to be returned from a lazy route function. This property will be ignored."):w?ja(!w,`Route "${a.id}" has a static property "${v}" defined but its lazy function is also returning a value for this property. The lazy route property "${v}" will be ignored.`):h[v]=g}Object.assign(a,h),Object.assign(a,{...i(a),lazy:void 0})})();return N9.set(a,u),u.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:u}}let o=Object.keys(e.lazy),s=[],l;for(let d of o){if(r&&r.includes(d))continue;let u=Fne({key:d,route:e,manifest:n,mapRouteProperties:i});u&&(s.push(u),d===t&&(l=u))}let c=s.length>0?Promise.all(s).then(()=>{}):void 0;return c?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function C9(e){let t=e.matches.filter(r=>r.shouldLoad),n={};return(await Promise.all(t.map(r=>r.resolve()))).forEach((r,a)=>{n[t[a].route.id]=r}),n}async function JNe(e){return e.matches.some(t=>t.route.middleware)?Ene(e,()=>C9(e)):C9(e)}function Ene(e,t){return eCe(e,t,i=>i,lCe,n);function n(i,r,a){if(a)return Promise.resolve(Object.assign(a.value,{[r]:{type:"error",result:i}}));{let{matches:o}=e,s=Math.min(Math.max(o.findIndex(c=>c.route.id===r),0),Math.max(o.findIndex(c=>c.unstable_shouldCallHandler()),0)),l=Em(o,o[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:i}})}}}async function eCe(e,t,n,i,r){let{matches:a,request:o,params:s,context:l}=e,c=a.flatMap(u=>u.route.middleware?u.route.middleware.map(m=>[u.route.id,m]):[]);return await Bne({request:o,params:s,context:l},c,t,n,i,r)}async function Bne(e,t,n,i,r,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let l=t[o];if(!l)return await n();let[c,d]=l,u,m=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{return u={value:await Bne(e,t,n,i,r,a,o+1)},u.value}catch(h){return u={value:await a(h,c,u)},u.value}};try{let h=await d(e,m),v=h!=null?i(h):void 0;return r(v)?v:u?v??u.value:(u={value:await m()},u.value)}catch(h){return await a(h,c,u)}}function Dne(e,t,n,i,r){let a=Fne({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),o=ZNe(i.route,Sl(n.method)?"action":"loader",t,e,r);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function HP(e,t,n,i,r,a,o,s=null){let l=!1,c=Dne(e,t,n,i,r);return{...i,_lazyPromises:c,shouldLoad:o,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(d){return l=!0,s?typeof d=="boolean"?oC(i,{...s,defaultShouldRevalidate:d}):oC(i,s):o},resolve(d){let{lazy:u,loader:m,middleware:h}=i.route,v=l||o||d&&!Sl(n.method)&&(u||m),g=h&&h.length>0&&!m&&!u;return v&&!g?nCe({request:n,match:i,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:d,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function Jv(e,t,n,i,r,a,o,s=null){return i.map(l=>l.route.id!==r.route.id?{...l,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:Dne(e,t,n,l,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:HP(e,t,n,l,a,o,!0,s))}async function tCe(e,t,n,i,r,a){n.some(c=>c._lazyPromises?.middleware)&&await Promise.all(n.map(c=>c._lazyPromises?.middleware));let o={request:t,params:n[0].params,context:r,matches:n},l=await e({...o,fetcherKey:i,runClientMiddleware:c=>{let d=o;return Ene(d,()=>c({...d,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(c=>[c._lazyPromises?.handler,c._lazyPromises?.route]))}catch{}return l}async function nCe({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:i,handlerOverride:r,scopedContext:a}){let o,s,l=Sl(e.method),c=l?"action":"loader",d=u=>{let m,h=new Promise((k,b)=>m=b);s=()=>m(),e.signal.addEventListener("abort",s);let v=k=>typeof u!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${t.route.id}]`)):u({request:e,params:t.params,context:a},...k!==void 0?[k]:[]),g=(async()=>{try{return{type:"data",result:await(r?r(b=>v(b)):v())}}catch(k){return{type:"error",result:k}}})();return Promise.race([g,h])};try{let u=l?t.route.action:t.route.loader;if(n||i)if(u){let m,[h]=await Promise.all([d(u).catch(v=>{m=v}),n,i]);if(m!==void 0)throw m;o=h}else{await n;let m=l?t.route.action:t.route.loader;if(m)[o]=await Promise.all([d(m),i]);else if(c==="action"){let h=new URL(e.url),v=h.pathname+h.search;throw Mc(405,{method:e.method,pathname:v,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(u)o=await d(u);else{let m=new URL(e.url),h=m.pathname+m.search;throw Mc(404,{pathname:h})}}catch(u){return{type:"error",result:u}}finally{s&&e.signal.removeEventListener("abort",s)}return o}async function iCe(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function rCe(e){let{result:t,type:n}=e;if(Ine(t)){let i;try{i=await iCe(t)}catch(r){return{type:"error",error:r}}return n==="error"?{type:"error",error:new aC(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:"data",data:i,statusCode:t.status,headers:t.headers}}return n==="error"?T9(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new aC(t.init?.status||500,void 0,t.data),statusCode:by(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:by(t)?t.status:void 0}:T9(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function aCe(e,t,n,i,r){let a=e.headers.get("Location");if(wi(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!g6(a)){let o=i.slice(0,i.findIndex(s=>s.route.id===n)+1);a=UP(new URL(t.url),o,r,a),e.headers.set("Location",a)}return e}function _9(e,t,n){if(g6(e)){let i=e,r=i.startsWith("//")?new URL(t.protocol+i):new URL(i),a=qc(r.pathname,n)!=null;if(r.origin===t.origin&&a)return r.pathname+r.search+r.hash}return e}function Dv(e,t,n,i){let r=e.createURL(Tne(t)).toString(),a={signal:n};if(i&&Sl(i.formMethod)){let{formMethod:o,formEncType:s}=i;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(i.json)):s==="text/plain"?a.body=i.text:s==="application/x-www-form-urlencoded"&&i.formData?a.body=zP(i.formData):a.body=i.formData}return new Request(r,a)}function zP(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,typeof i=="string"?i:i.name);return t}function F9(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function oCe(e,t,n,i=!1,r=!1){let a={},o=null,s,l=!1,c={},d=n&&Yl(n[1])?n[1].error:void 0;return e.forEach(u=>{if(!(u.route.id in t))return;let m=u.route.id,h=t[m];if(wi(!tp(h),"Cannot handle redirect results in processLoaderData"),Yl(h)){let v=h.error;if(d!==void 0&&(v=d,d=void 0),o=o||{},r)o[m]=v;else{let g=Em(e,m);o[g.route.id]==null&&(o[g.route.id]=v)}i||(a[m]=Cne),l||(l=!0,s=by(h.error)?h.error.status:500),h.headers&&(c[m]=h.headers)}else a[m]=h.data,h.statusCode&&h.statusCode!==200&&!l&&(s=h.statusCode),h.headers&&(c[m]=h.headers)}),d!==void 0&&n&&(o={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:c}}function E9(e,t,n,i,r,a){let{loaderData:o,errors:s}=oCe(t,n,i);return r.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:d,controller:u}=l;if(u&&u.signal.aborted)return;let m=a[c];if(wi(m,"Did not find corresponding fetcher result"),Yl(m)){let h=Em(e.matches,d?.route.id);s&&s[h.route.id]||(s={...s,[h.route.id]:m.error}),e.fetchers.delete(c)}else if(tp(m))wi(!1,"Unhandled fetcher revalidation redirect");else{let h=sA(m.data);e.fetchers.set(c,h)}}),{loaderData:o,errors:s}}function B9(e,t,n,i){let r=Object.entries(t).filter(([,a])=>a!==Cne).reduce((a,[o,s])=>(a[o]=s,a),{});for(let a of n){let o=a.route.id;if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o)&&a.route.loader&&(r[o]=e[o]),i&&i.hasOwnProperty(o))break}return r}function D9(e){return e?Yl(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Em(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function bS(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Mc(e,{pathname:t,routeId:n,method:i,type:r,message:a}={}){let o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&t&&n?s=`You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:r==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s=`Route "${n}" does not match URL "${t}"`):e===404?(o="Not Found",s=`No route matches URL "${t}"`):e===405&&(o="Method Not Allowed",i&&t&&n?s=`You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:i&&(s=`Invalid request method "${i.toUpperCase()}"`)),new aC(e||500,o,new Error(s),!0)}function kS(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[i,r]=t[n];if(tp(r))return{key:i,result:r}}}function Tne(e){let t=typeof e=="string"?th(e):e;return zm({...t,hash:""})}function sCe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function lCe(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&cCe(n))}function cCe(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function dCe(e){return Ine(e.result)&&HNe.has(e.result.status)}function Yl(e){return e.type==="error"}function tp(e){return(e&&e.type)==="redirect"}function T9(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ine(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function uCe(e){return QNe.has(e.toUpperCase())}function Sl(e){return $Ne.has(e.toUpperCase())}function y6(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xN(e,t){let n=typeof t=="string"?th(t).search:t.search;if(e[e.length-1].route.index&&y6(n||""))return e[e.length-1];let i=wne(e);return i[i.length-1]}function I9(e){let{formMethod:t,formAction:n,formEncType:i,text:r,formData:a,json:o}=e;if(!(!t||!n||!i)){if(r!=null)return{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r};if(a!=null)return{formMethod:t,formAction:n,formEncType:i,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:o,text:void 0}}}function ID(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function fCe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function db(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ACe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function sA(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function mCe(e,t){try{let n=e.sessionStorage.getItem(Nne);if(n){let i=JSON.parse(n);for(let[r,a]of Object.entries(i||{}))a&&Array.isArray(a)&&t.set(r,new Set(a||[]))}}catch{}}function hCe(e,t){if(t.size>0){let n={};for(let[i,r]of t)n[i]=[...r];try{e.sessionStorage.setItem(Nne,JSON.stringify(n))}catch(i){ja(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function pCe(){let e,t,n=new Promise((i,r)=>{e=async a=>{i(a);try{await n}catch{}},t=async a=>{r(a);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Qp=S.createContext(null);Qp.displayName="DataRouter";var A1=S.createContext(null);A1.displayName="DataRouterState";S.createContext(!1);var b6=S.createContext({isTransitioning:!1});b6.displayName="ViewTransition";var One=S.createContext(new Map);One.displayName="Fetchers";var gCe=S.createContext(null);gCe.displayName="Await";var nu=S.createContext(null);nu.displayName="Navigation";var QF=S.createContext(null);QF.displayName="Location";var Jc=S.createContext({outlet:null,matches:[],isDataRoute:!1});Jc.displayName="Route";var k6=S.createContext(null);k6.displayName="RouteError";function vCe(e,{relative:t}={}){wi(Hy(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=S.useContext(nu),{hash:r,pathname:a,search:o}=zy(e,{relative:t}),s=a;return n!=="/"&&(s=a==="/"?n:Ju([n,a])),i.createHref({pathname:s,search:o,hash:r})}function Hy(){return S.useContext(QF)!=null}function uf(){return wi(Hy(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(QF).location}var Pne="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rne(e){S.useContext(nu).static||S.useLayoutEffect(e)}function m1(){let{isDataRoute:e}=S.useContext(Jc);return e?OCe():yCe()}function yCe(){wi(Hy(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Qp),{basename:t,navigator:n}=S.useContext(nu),{matches:i}=S.useContext(Jc),{pathname:r}=uf(),a=JSON.stringify($F(i)),o=S.useRef(!1);return Rne(()=>{o.current=!0}),S.useCallback((l,c={})=>{if(ja(o.current,Pne),!o.current)return;if(typeof l=="number"){n.go(l);return}let d=UF(l,JSON.parse(a),r,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ju([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,a,r,e])}var bCe=S.createContext(null);function kCe(e){let t=S.useContext(Jc).outlet;return S.useMemo(()=>t&&S.createElement(bCe.Provider,{value:e},t),[t,e])}function wCe(){let{matches:e}=S.useContext(Jc),t=e[e.length-1];return t?t.params:{}}function zy(e,{relative:t}={}){let{matches:n}=S.useContext(Jc),{pathname:i}=uf(),r=JSON.stringify($F(n));return S.useMemo(()=>UF(e,JSON.parse(r),i,t==="path"),[e,r,i,t])}function SCe(e,t,n,i,r){wi(Hy(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=S.useContext(nu),{matches:o}=S.useContext(Jc),s=o[o.length-1],l=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",u=s&&s.route;{let w=u&&u.path||"";Lne(c,!u||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
45
45
|
|
|
46
46
|
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let m=uf(),h;h=m;let v=h.pathname||"/",g=v;if(d!=="/"){let w=d.replace(/^\//,"").split("/");g="/"+v.replace(/^\//,"").split("/").slice(w.length).join("/")}let k=Fm(e,{pathname:g});return ja(u||k!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),ja(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),FCe(k&&k.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:Ju([d,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?d:Ju([d,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),o,n,i,r)}function xCe(){let e=Mne(),t=by(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:a},"ErrorBoundary")," or"," ",S.createElement("code",{style:a},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:r},n):null,o)}var NCe=S.createElement(xCe,null),CCe=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?S.createElement(Jc.Provider,{value:this.props.routeContext},S.createElement(k6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _Ce({routeContext:e,match:t,children:n}){let i=S.useContext(Qp);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Jc.Provider,{value:e},n)}function FCe(e,t=[],n=null,i=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);wi(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(n)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:u,errors:m}=n,h=d.route.loader&&!u.hasOwnProperty(d.route.id)&&(!m||m[d.route.id]===void 0);if(d.route.lazy||h){s=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,d,u)=>{let m,h=!1,v=null,g=null;n&&(m=o&&d.route.id?o[d.route.id]:void 0,v=d.route.errorElement||NCe,s&&(l<0&&u===0?(Lne("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,g=null):l===u&&(h=!0,g=d.route.hydrateFallbackElement||null)));let k=t.concat(a.slice(0,u+1)),b=()=>{let w;return m?w=v:h?w=g:d.route.Component?w=S.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,S.createElement(_Ce,{match:d,routeContext:{outlet:c,matches:k,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||u===0)?S.createElement(CCe,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:b(),routeContext:{outlet:null,matches:k,isDataRoute:!0},unstable_onError:i}):b()},null)}function w6(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ECe(e){let t=S.useContext(Qp);return wi(t,w6(e)),t}function HF(e){let t=S.useContext(A1);return wi(t,w6(e)),t}function BCe(e){let t=S.useContext(Jc);return wi(t,w6(e)),t}function zF(e){let t=BCe(e),n=t.matches[t.matches.length-1];return wi(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function DCe(){return zF("useRouteId")}function TCe(){return HF("useNavigation").navigation}function jne(){let{matches:e,loaderData:t}=HF("useMatches");return S.useMemo(()=>e.map(n=>yne(n,t)),[e,t])}function ICe(){let e=HF("useLoaderData"),t=zF("useLoaderData");return e.loaderData[t]}function Mne(){let e=S.useContext(k6),t=HF("useRouteError"),n=zF("useRouteError");return e!==void 0?e:t.errors?.[n]}function OCe(){let{router:e}=ECe("useNavigate"),t=zF("useNavigate"),n=S.useRef(!1);return Rne(()=>{n.current=!0}),S.useCallback(async(r,a={})=>{ja(n.current,Pne),n.current&&(typeof r=="number"?e.navigate(r):await e.navigate(r,{fromRouteId:t,...a}))},[e,t])}var O9={};function Lne(e,t,n){!t&&!O9[e]&&(O9[e]=!0,ja(!1,n))}var P9={};function R9(e,t){!e&&!P9[t]&&(P9[t]=!0,console.warn(t))}function PCe(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ja(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:S.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ja(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ja(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var RCe=["HydrateFallback","hydrateFallbackElement"],jCe=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function MCe({router:e,flushSync:t,unstable_onError:n}){let[i,r]=S.useState(e.state),[a,o]=S.useState(),[s,l]=S.useState({isTransitioning:!1}),[c,d]=S.useState(),[u,m]=S.useState(),[h,v]=S.useState(),g=S.useRef(new Map),k=S.useCallback(_=>{r(F=>(_.errors&&n&&Object.entries(_.errors).forEach(([B,T])=>{F.errors?.[B]!==T&&n(T)}),_))},[n]),b=S.useCallback((_,{deletedFetchers:F,flushSync:B,viewTransitionOpts:T})=>{_.fetchers.forEach(($,j)=>{$.data!==void 0&&g.current.set(j,$.data)}),F.forEach($=>g.current.delete($)),R9(B===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let I=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(R9(T==null||I,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!T||!I){t&&B?t(()=>k(_)):S.startTransition(()=>k(_));return}if(t&&B){t(()=>{u&&(c&&c.resolve(),u.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:T.currentLocation,nextLocation:T.nextLocation})});let $=e.window.document.startViewTransition(()=>{t(()=>k(_))});$.finished.finally(()=>{t(()=>{d(void 0),m(void 0),o(void 0),l({isTransitioning:!1})})}),t(()=>m($));return}u?(c&&c.resolve(),u.skipTransition(),v({state:_,currentLocation:T.currentLocation,nextLocation:T.nextLocation})):(o(_),l({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}))},[e.window,t,u,c,k]);S.useLayoutEffect(()=>e.subscribe(b),[e,b]),S.useEffect(()=>{s.isTransitioning&&!s.flushSync&&d(new jCe)},[s]),S.useEffect(()=>{if(c&&a&&e.window){let _=a,F=c.promise,B=e.window.document.startViewTransition(async()=>{S.startTransition(()=>k(_)),await F});B.finished.finally(()=>{d(void 0),m(void 0),o(void 0),l({isTransitioning:!1})}),m(B)}},[a,c,e.window,k]),S.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,u,i.location,a]),S.useEffect(()=>{!s.isTransitioning&&h&&(o(h.state),l({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),v(void 0))},[s.isTransitioning,h]);let w=S.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,F,B)=>e.navigate(_,{state:F,preventScrollReset:B?.preventScrollReset}),replace:(_,F,B)=>e.navigate(_,{replace:!0,state:F,preventScrollReset:B?.preventScrollReset})}),[e]),C=e.basename||"/",N=S.useMemo(()=>({router:e,navigator:w,static:!1,basename:C,unstable_onError:n}),[e,w,C,n]);return S.createElement(S.Fragment,null,S.createElement(Qp.Provider,{value:N},S.createElement(A1.Provider,{value:i},S.createElement(One.Provider,{value:g.current},S.createElement(b6.Provider,{value:s},S.createElement(QCe,{basename:C,location:i.location,navigationType:i.historyAction,navigator:w},S.createElement(LCe,{routes:e.routes,future:e.future,state:i,unstable_onError:n})))))),null)}var LCe=S.memo($Ce);function $Ce({routes:e,future:t,state:n,unstable_onError:i}){return SCe(e,void 0,n,i,t)}function UCe({to:e,replace:t,state:n,relative:i}){wi(Hy(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(nu);ja(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=S.useContext(Jc),{pathname:o}=uf(),s=m1(),l=UF(e,$F(a),o,i==="path"),c=JSON.stringify(l);return S.useEffect(()=>{s(JSON.parse(c),{replace:t,state:n,relative:i})},[s,c,i,t,n]),null}function $ne(e){return kCe(e.context)}function QCe({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){wi(!Hy(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),s=S.useMemo(()=>({basename:o,navigator:r,static:a,future:{}}),[o,r,a]);typeof n=="string"&&(n=th(n));let{pathname:l="/",search:c="",hash:d="",state:u=null,key:m="default"}=n,h=S.useMemo(()=>{let v=qc(l,o);return v==null?null:{location:{pathname:v,search:c,hash:d,state:u,key:m},navigationType:i}},[o,l,c,d,u,m,i]);return ja(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:S.createElement(nu.Provider,{value:s},S.createElement(QF.Provider,{children:t,value:h}))}var NN="get",CN="application/x-www-form-urlencoded";function VF(e){return e!=null&&typeof e.tagName=="string"}function HCe(e){return VF(e)&&e.tagName.toLowerCase()==="button"}function zCe(e){return VF(e)&&e.tagName.toLowerCase()==="form"}function VCe(e){return VF(e)&&e.tagName.toLowerCase()==="input"}function GCe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qCe(e,t){return e.button===0&&(!t||t==="_self")&&!GCe(e)}function VP(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map(r=>[n,r]):[[n,i]])},[]))}function KCe(e,t){let n=VP(e);return t&&t.forEach((i,r)=>{n.has(r)||t.getAll(r).forEach(a=>{n.append(r,a)})}),n}var wS=null;function WCe(){if(wS===null)try{new FormData(document.createElement("form"),0),wS=!1}catch{wS=!0}return wS}var YCe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function OD(e){return e!=null&&!YCe.has(e)?(ja(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${CN}"`),null):e}function XCe(e,t){let n,i,r,a,o;if(zCe(e)){let s=e.getAttribute("action");i=s?qc(s,t):null,n=e.getAttribute("method")||NN,r=OD(e.getAttribute("enctype"))||CN,a=new FormData(e)}else if(HCe(e)||VCe(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(i=l?qc(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||NN,r=OD(e.getAttribute("formenctype"))||OD(s.getAttribute("enctype"))||CN,a=new FormData(s,e),!WCe()){let{name:c,type:d,value:u}=e;if(d==="image"){let m=c?`${c}.`:"";a.append(`${m}x`,"0"),a.append(`${m}y`,"0")}else c&&a.append(c,u)}}else{if(VF(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=NN,i=null,r=CN,o=e}return a&&r==="text/plain"&&(o=a,a=void 0),{action:i,method:n.toLowerCase(),encType:r,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function S6(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ZCe(e,t,n){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${n}`:t&&qc(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function JCe(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function e_e(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function t_e(e,t,n){let i=await Promise.all(e.map(async r=>{let a=t.routes[r.route.id];if(a){let o=await JCe(a,n);return o.links?o.links():[]}return[]}));return a_e(i.flat(1).filter(e_e).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function j9(e,t,n,i,r,a){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,s=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return a==="assets"?t.filter((l,c)=>o(l,c)||s(l,c)):a==="data"?t.filter((l,c)=>{let d=i.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(o(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let u=l.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function n_e(e,t,{includeHydrateFallback:n}={}){return i_e(e.map(i=>{let r=t.routes[i.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))}function i_e(e){return[...new Set(e)]}function r_e(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function a_e(e,t){let n=new Set;return new Set(t),e.reduce((i,r)=>{let a=JSON.stringify(r_e(r));return n.has(a)||(n.add(a),i.push({key:a,link:r})),i},[])}function Une(){let e=S.useContext(Qp);return S6(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function o_e(){let e=S.useContext(A1);return S6(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var x6=S.createContext(void 0);x6.displayName="FrameworkContext";function Qne(){let e=S.useContext(x6);return S6(e,"You must render this element inside a <HydratedRouter> element"),e}function s_e(e,t){let n=S.useContext(x6),[i,r]=S.useState(!1),[a,o]=S.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=t,m=S.useRef(null);S.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let g=b=>{b.forEach(w=>{o(w.isIntersecting)})},k=new IntersectionObserver(g,{threshold:.5});return m.current&&k.observe(m.current),()=>{k.disconnect()}}},[e]),S.useEffect(()=>{if(i){let g=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(g)}}},[i]);let h=()=>{r(!0)},v=()=>{r(!1),o(!1)};return n?e!=="intent"?[a,m,{}]:[a,m,{onFocus:ub(s,h),onBlur:ub(l,v),onMouseEnter:ub(c,h),onMouseLeave:ub(d,v),onTouchStart:ub(u,h)}]:[!1,m,{}]}function ub(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function l_e({page:e,...t}){let{router:n}=Une(),i=S.useMemo(()=>Fm(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?S.createElement(d_e,{page:e,matches:i,...t}):null}function c_e(e){let{manifest:t,routeModules:n}=Qne(),[i,r]=S.useState([]);return S.useEffect(()=>{let a=!1;return t_e(e,t,n).then(o=>{a||r(o)}),()=>{a=!0}},[e,t,n]),i}function d_e({page:e,matches:t,...n}){let i=uf(),{manifest:r,routeModules:a}=Qne(),{basename:o}=Une(),{loaderData:s,matches:l}=o_e(),c=S.useMemo(()=>j9(e,t,l,r,i,"data"),[e,t,l,r,i]),d=S.useMemo(()=>j9(e,t,l,r,i,"assets"),[e,t,l,r,i]),u=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let v=new Set,g=!1;if(t.forEach(b=>{let w=r.routes[b.route.id];!w||!w.hasLoader||(!c.some(C=>C.route.id===b.route.id)&&b.route.id in s&&a[b.route.id]?.shouldRevalidate||w.hasClientLoader?g=!0:v.add(b.route.id))}),v.size===0)return[];let k=ZCe(e,o,"data");return g&&v.size>0&&k.searchParams.set("_routes",t.filter(b=>v.has(b.route.id)).map(b=>b.route.id).join(",")),[k.pathname+k.search]},[o,s,i,r,c,t,e,a]),m=S.useMemo(()=>n_e(d,r),[d,r]),h=c_e(d);return S.createElement(S.Fragment,null,u.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),m.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),h.map(({key:v,link:g})=>S.createElement("link",{key:v,nonce:n.nonce,...g})))}function u_e(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Hne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Hne&&(window.__reactRouterVersion="7.9.4")}catch{}function f_e(e,t){return KNe({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:mNe({window:t?.window}),hydrationData:A_e(),routes:e,mapRouteProperties:PCe,hydrationRouteProperties:RCe,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function A_e(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:m_e(e.errors)}),e}function m_e(e){if(!e)return null;let t=Object.entries(e),n={};for(let[i,r]of t)if(r&&r.__type==="RouteErrorResponse")n[i]=new aC(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let a=window[r.__subType];if(typeof a=="function")try{let o=new a(r.message);o.stack="",n[i]=o}catch{}}if(n[i]==null){let a=new Error(r.message);a.stack="",n[i]=a}}else n[i]=r;return n}var zne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qr=S.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:r,reloadDocument:a,replace:o,state:s,target:l,to:c,preventScrollReset:d,viewTransition:u,...m},h){let{basename:v}=S.useContext(nu),g=typeof c=="string"&&zne.test(c),k,b=!1;if(typeof c=="string"&&g&&(k=c,Hne))try{let I=new URL(window.location.href),$=c.startsWith("//")?new URL(I.protocol+c):new URL(c),j=qc($.pathname,v);$.origin===I.origin&&j!=null?c=j+$.search+$.hash:b=!0}catch{ja(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=vCe(c,{relative:r}),[C,N,_]=s_e(i,m),F=v_e(c,{replace:o,state:s,target:l,preventScrollReset:d,relative:r,viewTransition:u});function B(I){t&&t(I),I.defaultPrevented||F(I)}let T=S.createElement("a",{...m,..._,href:k||w,onClick:b||a?t:B,ref:u_e(h,N),target:l,"data-discover":!g&&n==="render"?"true":void 0});return C&&!g?S.createElement(S.Fragment,null,T,S.createElement(l_e,{page:w})):T});qr.displayName="Link";var h_e=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:r=!1,style:a,to:o,viewTransition:s,children:l,...c},d){let u=zy(o,{relative:c.relative}),m=uf(),h=S.useContext(A1),{navigator:v,basename:g}=S.useContext(nu),k=h!=null&&S_e(u)&&s===!0,b=v.encodeLocation?v.encodeLocation(u).pathname:u.pathname,w=m.pathname,C=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(w=w.toLowerCase(),C=C?C.toLowerCase():null,b=b.toLowerCase()),C&&g&&(C=qc(C,g)||C);const N=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let _=w===b||!r&&w.startsWith(b)&&w.charAt(N)==="/",F=C!=null&&(C===b||!r&&C.startsWith(b)&&C.charAt(b.length)==="/"),B={isActive:_,isPending:F,isTransitioning:k},T=_?t:void 0,I;typeof i=="function"?I=i(B):I=[i,_?"active":null,F?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(B):a;return S.createElement(qr,{...c,"aria-current":T,className:I,ref:d,style:$,to:o,viewTransition:s},typeof l=="function"?l(B):l)});h_e.displayName="NavLink";var p_e=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:r,state:a,method:o=NN,action:s,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,...m},h)=>{let v=k_e(),g=w_e(s,{relative:c}),k=o.toLowerCase()==="get"?"get":"post",b=typeof s=="string"&&zne.test(s),w=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let N=C.nativeEvent.submitter,_=N?.getAttribute("formmethod")||o;v(N||C.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:r,state:a,relative:c,preventScrollReset:d,viewTransition:u})};return S.createElement("form",{ref:h,method:k,action:g,onSubmit:i?l:w,...m,"data-discover":!b&&e==="render"?"true":void 0})});p_e.displayName="Form";function g_e(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vne(e){let t=S.useContext(Qp);return wi(t,g_e(e)),t}function v_e(e,{target:t,replace:n,state:i,preventScrollReset:r,relative:a,viewTransition:o}={}){let s=m1(),l=uf(),c=zy(e,{relative:a});return S.useCallback(d=>{if(qCe(d,t)){d.preventDefault();let u=n!==void 0?n:zm(l)===zm(c);s(e,{replace:u,state:i,preventScrollReset:r,relative:a,viewTransition:o})}},[l,s,c,n,i,t,e,r,a,o])}function QEt(e){ja(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(VP(e)),n=S.useRef(!1),i=uf(),r=S.useMemo(()=>KCe(i.search,n.current?null:t.current),[i.search]),a=m1(),o=S.useCallback((s,l)=>{const c=VP(typeof s=="function"?s(new URLSearchParams(r)):s);n.current=!0,a("?"+c,l)},[a,r]);return[r,o]}var y_e=0,b_e=()=>`__${String(++y_e)}__`;function k_e(){let{router:e}=Vne("useSubmit"),{basename:t}=S.useContext(nu),n=DCe();return S.useCallback(async(i,r={})=>{let{action:a,method:o,encType:s,formData:l,body:c}=XCe(i,t);if(r.navigate===!1){let d=r.fetcherKey||b_e();await e.fetch(d,n,r.action||a,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||o,formEncType:r.encType||s,flushSync:r.flushSync})}else await e.navigate(r.action||a,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||o,formEncType:r.encType||s,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[e,t,n])}function w_e(e,{relative:t}={}){let{basename:n}=S.useContext(nu),i=S.useContext(Jc);wi(i,"useFormAction must be used inside a RouteContext");let[r]=i.matches.slice(-1),a={...zy(e||".",{relative:t})},o=uf();if(e==null){a.search=o.search;let s=new URLSearchParams(a.search),l=s.getAll("index");if(l.some(d=>d==="")){s.delete("index"),l.filter(u=>u).forEach(u=>s.append("index",u));let d=s.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&r.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Ju([n,a.pathname])),zm(a)}function S_e(e,{relative:t}={}){let n=S.useContext(b6);wi(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Vne("useViewTransitionState"),r=zy(e,{relative:t});if(!n.isTransitioning)return!1;let a=qc(n.currentLocation.pathname,i)||n.currentLocation.pathname,o=qc(n.nextLocation.pathname,i)||n.nextLocation.pathname;return rC(r.pathname,o)!=null||rC(r.pathname,a)!=null}var ff=pne();const Gne=Up(ff);function x_e(e){return S.createElement(MCe,{flushSync:ff.flushSync,...e})}const N_e="modulepreload",C_e=function(e){return"/"+e},M9={},Ii=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=o?.nonce||o?.getAttribute("nonce");r=l(n.map(c=>{if(c=C_e(c),c in M9)return;M9[c]=!0;const d=c.endsWith(".css"),u=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":N_e,d||(m.as="script"),m.crossOrigin="",m.href=c,s&&m.setAttribute("nonce",s),document.head.appendChild(m),d)return new Promise((h,v)=>{m.addEventListener("load",h),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return r.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};/**
|
|
47
|
-
* @license lucide-react v0.
|
|
47
|
+
* @license lucide-react v0.546.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
51
|
*/const __e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F_e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),L9=e=>{const t=F_e(e);return t.charAt(0).toUpperCase()+t.slice(1)},qne=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),E_e=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
52
|
-
* @license lucide-react v0.
|
|
52
|
+
* @license lucide-react v0.546.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
56
|
*/var B_e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
57
|
-
* @license lucide-react v0.
|
|
57
|
+
* @license lucide-react v0.546.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
61
|
*/const D_e=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:a,iconNode:o,...s},l)=>S.createElement("svg",{ref:l,...B_e,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:qne("lucide",r),...!a&&!E_e(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,d])=>S.createElement(c,d)),...Array.isArray(a)?a:[a]]));/**
|
|
62
|
-
* @license lucide-react v0.
|
|
62
|
+
* @license lucide-react v0.546.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/const zt=(e,t)=>{const n=S.forwardRef(({className:i,...r},a)=>S.createElement(D_e,{ref:a,iconNode:t,className:qne(`lucide-${__e(L9(e))}`,`lucide-${e}`,i),...r}));return n.displayName=L9(e),n};/**
|
|
67
|
-
* @license lucide-react v0.
|
|
67
|
+
* @license lucide-react v0.546.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
71
|
*/const T_e=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]],I_e=zt("arrow-down-0-1",T_e);/**
|
|
72
|
-
* @license lucide-react v0.
|
|
72
|
+
* @license lucide-react v0.546.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/const O_e=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],P_e=zt("arrow-down-wide-narrow",O_e);/**
|
|
77
|
-
* @license lucide-react v0.
|
|
77
|
+
* @license lucide-react v0.546.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/const R_e=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],j_e=zt("arrow-left-right",R_e);/**
|
|
82
|
-
* @license lucide-react v0.
|
|
82
|
+
* @license lucide-react v0.546.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
86
|
*/const M_e=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],L_e=zt("arrow-right-left",M_e);/**
|
|
87
|
-
* @license lucide-react v0.
|
|
87
|
+
* @license lucide-react v0.546.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/const $_e=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],U_e=zt("badge-dollar-sign",$_e);/**
|
|
92
|
-
* @license lucide-react v0.
|
|
92
|
+
* @license lucide-react v0.546.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
96
|
*/const Q_e=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]],$9=zt("barcode",Q_e);/**
|
|
97
|
-
* @license lucide-react v0.
|
|
97
|
+
* @license lucide-react v0.546.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/const H_e=[["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m16 12 2 2 4-4",key:"mdajum"}],["path",{d:"M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3",key:"8arnkb"}]],z_e=zt("book-open-check",H_e);/**
|
|
102
|
-
* @license lucide-react v0.
|
|
102
|
+
* @license lucide-react v0.546.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
106
|
*/const V_e=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],G_e=zt("book",V_e);/**
|
|
107
|
-
* @license lucide-react v0.
|
|
107
|
+
* @license lucide-react v0.546.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
111
|
*/const q_e=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],U9=zt("bookmark",q_e);/**
|
|
112
|
-
* @license lucide-react v0.
|
|
112
|
+
* @license lucide-react v0.546.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
116
|
*/const K_e=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],W_e=zt("calculator",K_e);/**
|
|
117
|
-
* @license lucide-react v0.
|
|
117
|
+
* @license lucide-react v0.546.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
121
|
*/const Y_e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],sC=zt("calendar",Y_e);/**
|
|
122
|
-
* @license lucide-react v0.
|
|
122
|
+
* @license lucide-react v0.546.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
126
|
*/const X_e=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]],PD=zt("chart-column-big",X_e);/**
|
|
127
|
-
* @license lucide-react v0.
|
|
127
|
+
* @license lucide-react v0.546.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
131
|
*/const Z_e=[["path",{d:"M13 17V9",key:"1fwyjl"}],["path",{d:"M18 17v-3",key:"1sqioe"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 17V5",key:"1wzmnc"}]],J_e=zt("chart-column-decreasing",Z_e);/**
|
|
132
|
-
* @license lucide-react v0.
|
|
132
|
+
* @license lucide-react v0.546.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
136
|
*/const e2e=[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]],t2e=zt("chart-no-axes-combined",e2e);/**
|
|
137
|
-
* @license lucide-react v0.
|
|
137
|
+
* @license lucide-react v0.546.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
141
|
*/const n2e=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],i2e=zt("check-check",n2e);/**
|
|
142
|
-
* @license lucide-react v0.
|
|
142
|
+
* @license lucide-react v0.546.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
146
|
*/const r2e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kA=zt("check",r2e);/**
|
|
147
|
-
* @license lucide-react v0.
|
|
147
|
+
* @license lucide-react v0.546.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/const a2e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ti=zt("chevron-down",a2e);/**
|
|
152
|
-
* @license lucide-react v0.
|
|
152
|
+
* @license lucide-react v0.546.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
156
|
*/const o2e=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Kne=zt("chevron-left",o2e);/**
|
|
157
|
-
* @license lucide-react v0.
|
|
157
|
+
* @license lucide-react v0.546.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
161
|
*/const s2e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wne=zt("chevron-right",s2e);/**
|
|
162
|
-
* @license lucide-react v0.
|
|
162
|
+
* @license lucide-react v0.546.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
166
|
*/const l2e=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],fr=zt("chevron-up",l2e);/**
|
|
167
|
-
* @license lucide-react v0.
|
|
167
|
+
* @license lucide-react v0.546.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
171
|
*/const c2e=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]],Yne=zt("chevrons-left-right-ellipsis",c2e);/**
|
|
172
|
-
* @license lucide-react v0.
|
|
172
|
+
* @license lucide-react v0.546.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
176
|
*/const d2e=[["path",{d:"m20 17-5-5 5-5",key:"30x0n2"}],["path",{d:"m4 17 5-5-5-5",key:"16spf4"}]],Xne=zt("chevrons-right-left",d2e);/**
|
|
177
|
-
* @license lucide-react v0.
|
|
177
|
+
* @license lucide-react v0.546.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
181
|
*/const u2e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],tv=zt("circle-alert",u2e);/**
|
|
182
|
-
* @license lucide-react v0.
|
|
182
|
+
* @license lucide-react v0.546.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
186
|
*/const f2e=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],A2e=zt("circle-check-big",f2e);/**
|
|
187
|
-
* @license lucide-react v0.
|
|
187
|
+
* @license lucide-react v0.546.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
191
|
*/const m2e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Q9=zt("circle-x",m2e);/**
|
|
192
|
-
* @license lucide-react v0.
|
|
192
|
+
* @license lucide-react v0.546.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
196
|
*/const h2e=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],lC=zt("coins",h2e);/**
|
|
197
|
-
* @license lucide-react v0.
|
|
197
|
+
* @license lucide-react v0.546.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
201
|
*/const p2e=[["path",{d:"M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"1l7d7l"}],["path",{d:"M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"9955pe"}],["path",{d:"m7 15 3 3",key:"4hkfgk"}],["path",{d:"m7 21 3-3H5a2 2 0 0 1-2-2v-2",key:"1xljwe"}],["rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",key:"1cdgtw"}],["rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",key:"zi3rio"}]],g2e=zt("combine",p2e);/**
|
|
202
|
-
* @license lucide-react v0.
|
|
202
|
+
* @license lucide-react v0.546.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
206
|
*/const v2e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],y2e=zt("copy",v2e);/**
|
|
207
|
-
* @license lucide-react v0.
|
|
207
|
+
* @license lucide-react v0.546.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
211
|
*/const b2e=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Zne=zt("credit-card",b2e);/**
|
|
212
|
-
* @license lucide-react v0.
|
|
212
|
+
* @license lucide-react v0.546.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
216
|
*/const k2e=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Jne=zt("download",k2e);/**
|
|
217
|
-
* @license lucide-react v0.
|
|
217
|
+
* @license lucide-react v0.546.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
221
|
*/const w2e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],S2e=zt("external-link",w2e);/**
|
|
222
|
-
* @license lucide-react v0.
|
|
222
|
+
* @license lucide-react v0.546.0 - ISC
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
226
|
*/const x2e=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],N2e=zt("eye",x2e);/**
|
|
227
|
-
* @license lucide-react v0.
|
|
227
|
+
* @license lucide-react v0.546.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
231
|
*/const C2e=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z",key:"1iv0i2"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],_2e=zt("factory",C2e);/**
|
|
232
|
-
* @license lucide-react v0.
|
|
232
|
+
* @license lucide-react v0.546.0 - ISC
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
236
|
*/const F2e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],eie=zt("file-down",F2e);/**
|
|
237
|
-
* @license lucide-react v0.
|
|
237
|
+
* @license lucide-react v0.546.0 - ISC
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the ISC license.
|
|
240
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
241
241
|
*/const E2e=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],H9=zt("file-pen",E2e);/**
|
|
242
|
-
* @license lucide-react v0.
|
|
242
|
+
* @license lucide-react v0.546.0 - ISC
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the ISC license.
|
|
245
245
|
* See the LICENSE file in the root directory of this source tree.
|
|
246
246
|
*/const B2e=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]],z9=zt("file-plus-2",B2e);/**
|
|
247
|
-
* @license lucide-react v0.
|
|
247
|
+
* @license lucide-react v0.546.0 - ISC
|
|
248
248
|
*
|
|
249
249
|
* This source code is licensed under the ISC license.
|
|
250
250
|
* See the LICENSE file in the root directory of this source tree.
|
|
251
251
|
*/const D2e=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],V9=zt("file-question-mark",D2e);/**
|
|
252
|
-
* @license lucide-react v0.
|
|
252
|
+
* @license lucide-react v0.546.0 - ISC
|
|
253
253
|
*
|
|
254
254
|
* This source code is licensed under the ISC license.
|
|
255
255
|
* See the LICENSE file in the root directory of this source tree.
|
|
256
256
|
*/const T2e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],I2e=zt("file-text",T2e);/**
|
|
257
|
-
* @license lucide-react v0.
|
|
257
|
+
* @license lucide-react v0.546.0 - ISC
|
|
258
258
|
*
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const O2e=[["path",{d:"M15
|
|
262
|
-
* @license lucide-react v0.
|
|
261
|
+
*/const O2e=[["path",{d:"M15 2a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 21 8v7a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",key:"1vo8kb"}],["path",{d:"M15 2v4a2 2 0 0 0 2 2h4",key:"sud9ri"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],G9=zt("files",O2e);/**
|
|
262
|
+
* @license lucide-react v0.546.0 - ISC
|
|
263
263
|
*
|
|
264
264
|
* This source code is licensed under the ISC license.
|
|
265
265
|
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const P2e=[["path",{d:"M15
|
|
267
|
-
* @license lucide-react v0.
|
|
266
|
+
*/const P2e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],q9=zt("file",P2e);/**
|
|
267
|
+
* @license lucide-react v0.546.0 - ISC
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the ISC license.
|
|
270
270
|
* See the LICENSE file in the root directory of this source tree.
|
|
271
271
|
*/const R2e=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],j2e=zt("funnel",R2e);/**
|
|
272
|
-
* @license lucide-react v0.
|
|
272
|
+
* @license lucide-react v0.546.0 - ISC
|
|
273
273
|
*
|
|
274
274
|
* This source code is licensed under the ISC license.
|
|
275
275
|
* See the LICENSE file in the root directory of this source tree.
|
|
276
276
|
*/const M2e=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],L2e=zt("gift",M2e);/**
|
|
277
|
-
* @license lucide-react v0.
|
|
277
|
+
* @license lucide-react v0.546.0 - ISC
|
|
278
278
|
*
|
|
279
279
|
* This source code is licensed under the ISC license.
|
|
280
280
|
* See the LICENSE file in the root directory of this source tree.
|
|
281
281
|
*/const $2e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],tie=zt("globe",$2e);/**
|
|
282
|
-
* @license lucide-react v0.
|
|
282
|
+
* @license lucide-react v0.546.0 - ISC
|
|
283
283
|
*
|
|
284
284
|
* This source code is licensed under the ISC license.
|
|
285
285
|
* See the LICENSE file in the root directory of this source tree.
|
|
286
286
|
*/const U2e=[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]],GP=zt("hand-coins",U2e);/**
|
|
287
|
-
* @license lucide-react v0.
|
|
287
|
+
* @license lucide-react v0.546.0 - ISC
|
|
288
288
|
*
|
|
289
289
|
* This source code is licensed under the ISC license.
|
|
290
290
|
* See the LICENSE file in the root directory of this source tree.
|
|
291
291
|
*/const Q2e=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Tv=zt("house",Q2e);/**
|
|
292
|
-
* @license lucide-react v0.
|
|
292
|
+
* @license lucide-react v0.546.0 - ISC
|
|
293
293
|
*
|
|
294
294
|
* This source code is licensed under the ISC license.
|
|
295
295
|
* See the LICENSE file in the root directory of this source tree.
|
|
296
296
|
*/const H2e=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]],z2e=zt("id-card",H2e);/**
|
|
297
|
-
* @license lucide-react v0.
|
|
297
|
+
* @license lucide-react v0.546.0 - ISC
|
|
298
298
|
*
|
|
299
299
|
* This source code is licensed under the ISC license.
|
|
300
300
|
* See the LICENSE file in the root directory of this source tree.
|
|
301
301
|
*/const V2e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],nie=zt("image",V2e);/**
|
|
302
|
-
* @license lucide-react v0.
|
|
302
|
+
* @license lucide-react v0.546.0 - ISC
|
|
303
303
|
*
|
|
304
304
|
* This source code is licensed under the ISC license.
|
|
305
305
|
* See the LICENSE file in the root directory of this source tree.
|
|
306
306
|
*/const G2e=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],q2e=zt("link",G2e);/**
|
|
307
|
-
* @license lucide-react v0.
|
|
307
|
+
* @license lucide-react v0.546.0 - ISC
|
|
308
308
|
*
|
|
309
309
|
* This source code is licensed under the ISC license.
|
|
310
310
|
* See the LICENSE file in the root directory of this source tree.
|
|
311
311
|
*/const K2e=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],ey=zt("list-plus",K2e);/**
|
|
312
|
-
* @license lucide-react v0.
|
|
312
|
+
* @license lucide-react v0.546.0 - ISC
|
|
313
313
|
*
|
|
314
314
|
* This source code is licensed under the ISC license.
|
|
315
315
|
* See the LICENSE file in the root directory of this source tree.
|
|
316
316
|
*/const W2e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],wA=zt("loader-circle",W2e);/**
|
|
317
|
-
* @license lucide-react v0.
|
|
317
|
+
* @license lucide-react v0.546.0 - ISC
|
|
318
318
|
*
|
|
319
319
|
* This source code is licensed under the ISC license.
|
|
320
320
|
* See the LICENSE file in the root directory of this source tree.
|
|
321
321
|
*/const Y2e=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],iie=zt("mail",Y2e);/**
|
|
322
|
-
* @license lucide-react v0.
|
|
322
|
+
* @license lucide-react v0.546.0 - ISC
|
|
323
323
|
*
|
|
324
324
|
* This source code is licensed under the ISC license.
|
|
325
325
|
* See the LICENSE file in the root directory of this source tree.
|
|
326
326
|
*/const X2e=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Z2e=zt("map-pin",X2e);/**
|
|
327
|
-
* @license lucide-react v0.
|
|
327
|
+
* @license lucide-react v0.546.0 - ISC
|
|
328
328
|
*
|
|
329
329
|
* This source code is licensed under the ISC license.
|
|
330
330
|
* See the LICENSE file in the root directory of this source tree.
|
|
331
331
|
*/const J2e=[["path",{d:"m11 19-1.106-.552a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0l4.212 2.106a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619V12",key:"svfegj"}],["path",{d:"M15 5.764V12",key:"1ocw4k"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],eFe=zt("map-plus",J2e);/**
|
|
332
|
-
* @license lucide-react v0.
|
|
332
|
+
* @license lucide-react v0.546.0 - ISC
|
|
333
333
|
*
|
|
334
334
|
* This source code is licensed under the ISC license.
|
|
335
335
|
* See the LICENSE file in the root directory of this source tree.
|
|
336
336
|
*/const tFe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],nFe=zt("menu",tFe);/**
|
|
337
|
-
* @license lucide-react v0.
|
|
337
|
+
* @license lucide-react v0.546.0 - ISC
|
|
338
338
|
*
|
|
339
339
|
* This source code is licensed under the ISC license.
|
|
340
340
|
* See the LICENSE file in the root directory of this source tree.
|
|
341
341
|
*/const iFe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 16 3-3 3 3",key:"1idcnm"}]],rie=zt("panel-top-close",iFe);/**
|
|
342
|
-
* @license lucide-react v0.
|
|
342
|
+
* @license lucide-react v0.546.0 - ISC
|
|
343
343
|
*
|
|
344
344
|
* This source code is licensed under the ISC license.
|
|
345
345
|
* See the LICENSE file in the root directory of this source tree.
|
|
346
346
|
*/const rFe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m15 14-3 3-3-3",key:"g215vf"}]],aie=zt("panel-top-open",rFe);/**
|
|
347
|
-
* @license lucide-react v0.
|
|
347
|
+
* @license lucide-react v0.546.0 - ISC
|
|
348
348
|
*
|
|
349
349
|
* This source code is licensed under the ISC license.
|
|
350
350
|
* See the LICENSE file in the root directory of this source tree.
|
|
351
351
|
*/const aFe=[["path",{d:"M11 15h2",key:"199qp6"}],["path",{d:"M12 12v3",key:"158kv8"}],["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z",key:"1jofit"}],["path",{d:"M9 9a3 3 0 1 1 6 0",key:"jdoeu8"}]],K9=zt("parking-meter",aFe);/**
|
|
352
|
-
* @license lucide-react v0.
|
|
352
|
+
* @license lucide-react v0.546.0 - ISC
|
|
353
353
|
*
|
|
354
354
|
* This source code is licensed under the ISC license.
|
|
355
355
|
* See the LICENSE file in the root directory of this source tree.
|
|
356
356
|
*/const oFe=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],sFe=zt("phone",oFe);/**
|
|
357
|
-
* @license lucide-react v0.
|
|
357
|
+
* @license lucide-react v0.546.0 - ISC
|
|
358
358
|
*
|
|
359
359
|
* This source code is licensed under the ISC license.
|
|
360
360
|
* See the LICENSE file in the root directory of this source tree.
|
|
361
361
|
*/const lFe=[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]],cFe=zt("piggy-bank",lFe);/**
|
|
362
|
-
* @license lucide-react v0.
|
|
362
|
+
* @license lucide-react v0.546.0 - ISC
|
|
363
363
|
*
|
|
364
364
|
* This source code is licensed under the ISC license.
|
|
365
365
|
* See the LICENSE file in the root directory of this source tree.
|
|
366
366
|
*/const dFe=[["path",{d:"M2 22h20",key:"272qi7"}],["path",{d:"M6.36 17.4 4 17l-2-4 1.1-.55a2 2 0 0 1 1.8 0l.17.1a2 2 0 0 0 1.8 0L8 12 5 6l.9-.45a2 2 0 0 1 2.09.2l4.02 3a2 2 0 0 0 2.1.2l4.19-2.06a2.41 2.41 0 0 1 1.73-.17L21 7a1.4 1.4 0 0 1 .87 1.99l-.38.76c-.23.46-.6.84-1.07 1.08L7.58 17.2a2 2 0 0 1-1.22.18Z",key:"fkigj9"}]],uFe=zt("plane-takeoff",dFe);/**
|
|
367
|
-
* @license lucide-react v0.
|
|
367
|
+
* @license lucide-react v0.546.0 - ISC
|
|
368
368
|
*
|
|
369
369
|
* This source code is licensed under the ISC license.
|
|
370
370
|
* See the LICENSE file in the root directory of this source tree.
|
|
371
371
|
*/const fFe=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],AFe=zt("plane",fFe);/**
|
|
372
|
-
* @license lucide-react v0.
|
|
372
|
+
* @license lucide-react v0.546.0 - ISC
|
|
373
373
|
*
|
|
374
374
|
* This source code is licensed under the ISC license.
|
|
375
375
|
* See the LICENSE file in the root directory of this source tree.
|
|
376
376
|
*/const mFe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],SA=zt("plus",mFe);/**
|
|
377
|
-
* @license lucide-react v0.
|
|
377
|
+
* @license lucide-react v0.546.0 - ISC
|
|
378
378
|
*
|
|
379
379
|
* This source code is licensed under the ISC license.
|
|
380
380
|
* See the LICENSE file in the root directory of this source tree.
|
|
381
381
|
*/const hFe=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],pFe=zt("puzzle",hFe);/**
|
|
382
|
-
* @license lucide-react v0.
|
|
382
|
+
* @license lucide-react v0.546.0 - ISC
|
|
383
383
|
*
|
|
384
384
|
* This source code is licensed under the ISC license.
|
|
385
385
|
* See the LICENSE file in the root directory of this source tree.
|
|
386
386
|
*/const gFe=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],vFe=zt("receipt-text",gFe);/**
|
|
387
|
-
* @license lucide-react v0.
|
|
387
|
+
* @license lucide-react v0.546.0 - ISC
|
|
388
388
|
*
|
|
389
389
|
* This source code is licensed under the ISC license.
|
|
390
390
|
* See the LICENSE file in the root directory of this source tree.
|
|
391
391
|
*/const yFe=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],ty=zt("receipt",yFe);/**
|
|
392
|
-
* @license lucide-react v0.
|
|
392
|
+
* @license lucide-react v0.546.0 - ISC
|
|
393
393
|
*
|
|
394
394
|
* This source code is licensed under the ISC license.
|
|
395
395
|
* See the LICENSE file in the root directory of this source tree.
|
|
396
396
|
*/const bFe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],kFe=zt("rectangle-ellipsis",bFe);/**
|
|
397
|
-
* @license lucide-react v0.
|
|
397
|
+
* @license lucide-react v0.546.0 - ISC
|
|
398
398
|
*
|
|
399
399
|
* This source code is licensed under the ISC license.
|
|
400
400
|
* See the LICENSE file in the root directory of this source tree.
|
|
401
401
|
*/const wFe=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],SFe=zt("refresh-ccw-dot",wFe);/**
|
|
402
|
-
* @license lucide-react v0.
|
|
402
|
+
* @license lucide-react v0.546.0 - ISC
|
|
403
403
|
*
|
|
404
404
|
* This source code is licensed under the ISC license.
|
|
405
405
|
* See the LICENSE file in the root directory of this source tree.
|
|
406
406
|
*/const xFe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],W9=zt("refresh-cw",xFe);/**
|
|
407
|
-
* @license lucide-react v0.
|
|
407
|
+
* @license lucide-react v0.546.0 - ISC
|
|
408
408
|
*
|
|
409
409
|
* This source code is licensed under the ISC license.
|
|
410
410
|
* See the LICENSE file in the root directory of this source tree.
|
|
411
411
|
*/const NFe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 7.5H3",key:"1hm9pq"}],["path",{d:"M21 12H3",key:"2avoz0"}],["path",{d:"M21 16.5H3",key:"n7jzkj"}]],CFe=zt("rows-4",NFe);/**
|
|
412
|
-
* @license lucide-react v0.
|
|
412
|
+
* @license lucide-react v0.546.0 - ISC
|
|
413
413
|
*
|
|
414
414
|
* This source code is licensed under the ISC license.
|
|
415
415
|
* See the LICENSE file in the root directory of this source tree.
|
|
416
416
|
*/const _Fe=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],oie=zt("scale",_Fe);/**
|
|
417
|
-
* @license lucide-react v0.
|
|
417
|
+
* @license lucide-react v0.546.0 - ISC
|
|
418
418
|
*
|
|
419
419
|
* This source code is licensed under the ISC license.
|
|
420
420
|
* See the LICENSE file in the root directory of this source tree.
|
|
421
421
|
*/const FFe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],sie=zt("search",FFe);/**
|
|
422
|
-
* @license lucide-react v0.
|
|
422
|
+
* @license lucide-react v0.546.0 - ISC
|
|
423
423
|
*
|
|
424
424
|
* This source code is licensed under the ISC license.
|
|
425
425
|
* See the LICENSE file in the root directory of this source tree.
|
|
426
426
|
*/const EFe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],lie=zt("send",EFe);/**
|
|
427
|
-
* @license lucide-react v0.
|
|
427
|
+
* @license lucide-react v0.546.0 - ISC
|
|
428
428
|
*
|
|
429
429
|
* This source code is licensed under the ISC license.
|
|
430
430
|
* See the LICENSE file in the root directory of this source tree.
|
|
431
431
|
*/const BFe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],DFe=zt("settings",BFe);/**
|
|
432
|
-
* @license lucide-react v0.
|
|
432
|
+
* @license lucide-react v0.546.0 - ISC
|
|
433
433
|
*
|
|
434
434
|
* This source code is licensed under the ISC license.
|
|
435
435
|
* See the LICENSE file in the root directory of this source tree.
|
|
436
436
|
*/const TFe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],N6=zt("square-pen",TFe);/**
|
|
437
|
-
* @license lucide-react v0.
|
|
437
|
+
* @license lucide-react v0.546.0 - ISC
|
|
438
438
|
*
|
|
439
439
|
* This source code is licensed under the ISC license.
|
|
440
440
|
* See the LICENSE file in the root directory of this source tree.
|
|
441
441
|
*/const IFe=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],OFe=zt("tags",IFe);/**
|
|
442
|
-
* @license lucide-react v0.
|
|
442
|
+
* @license lucide-react v0.546.0 - ISC
|
|
443
443
|
*
|
|
444
444
|
* This source code is licensed under the ISC license.
|
|
445
445
|
* See the LICENSE file in the root directory of this source tree.
|
|
446
446
|
*/const PFe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],GF=zt("trash-2",PFe);/**
|
|
447
|
-
* @license lucide-react v0.
|
|
447
|
+
* @license lucide-react v0.546.0 - ISC
|
|
448
448
|
*
|
|
449
449
|
* This source code is licensed under the ISC license.
|
|
450
450
|
* See the LICENSE file in the root directory of this source tree.
|
|
451
451
|
*/const RFe=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qF=zt("trash",RFe);/**
|
|
452
|
-
* @license lucide-react v0.
|
|
452
|
+
* @license lucide-react v0.546.0 - ISC
|
|
453
453
|
*
|
|
454
454
|
* This source code is licensed under the ISC license.
|
|
455
455
|
* See the LICENSE file in the root directory of this source tree.
|
|
456
456
|
*/const jFe=[["path",{d:"M14.828 14.828 21 21",key:"ar5fw7"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"m21 3-9 9-4-4-6 6",key:"1h02xo"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}]],MFe=zt("trending-up-down",jFe);/**
|
|
457
|
-
* @license lucide-react v0.
|
|
457
|
+
* @license lucide-react v0.546.0 - ISC
|
|
458
458
|
*
|
|
459
459
|
* This source code is licensed under the ISC license.
|
|
460
460
|
* See the LICENSE file in the root directory of this source tree.
|
|
461
461
|
*/const LFe=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],cie=zt("unlink",LFe);/**
|
|
462
|
-
* @license lucide-react v0.
|
|
462
|
+
* @license lucide-react v0.546.0 - ISC
|
|
463
463
|
*
|
|
464
464
|
* This source code is licensed under the ISC license.
|
|
465
465
|
* See the LICENSE file in the root directory of this source tree.
|
|
466
466
|
*/const $Fe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],UFe=zt("user-round",$Fe);/**
|
|
467
|
-
* @license lucide-react v0.
|
|
467
|
+
* @license lucide-react v0.546.0 - ISC
|
|
468
468
|
*
|
|
469
469
|
* This source code is licensed under the ISC license.
|
|
470
470
|
* See the LICENSE file in the root directory of this source tree.
|
|
471
471
|
*/const QFe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],HFe=zt("user",QFe);/**
|
|
472
|
-
* @license lucide-react v0.
|
|
472
|
+
* @license lucide-react v0.546.0 - ISC
|
|
473
473
|
*
|
|
474
474
|
* This source code is licensed under the ISC license.
|
|
475
475
|
* See the LICENSE file in the root directory of this source tree.
|
|
476
476
|
*/const zFe=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],VFe=zt("wallet",zFe);/**
|
|
477
|
-
* @license lucide-react v0.
|
|
477
|
+
* @license lucide-react v0.546.0 - ISC
|
|
478
478
|
*
|
|
479
479
|
* This source code is licensed under the ISC license.
|
|
480
480
|
* See the LICENSE file in the root directory of this source tree.
|
|
481
481
|
*/const GFe=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],qFe=zt("wand-sparkles",GFe);/**
|
|
482
|
-
* @license lucide-react v0.
|
|
482
|
+
* @license lucide-react v0.546.0 - ISC
|
|
483
483
|
*
|
|
484
484
|
* This source code is licensed under the ISC license.
|
|
485
485
|
* See the LICENSE file in the root directory of this source tree.
|
|
486
486
|
*/const KFe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bp=zt("x",KFe);/**
|
|
487
|
-
* @license lucide-react v0.
|
|
487
|
+
* @license lucide-react v0.546.0 - ISC
|
|
488
488
|
*
|
|
489
489
|
* This source code is licensed under the ISC license.
|
|
490
490
|
* See the LICENSE file in the root directory of this source tree.
|
|
491
491
|
*/const WFe=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Y9=zt("zoom-in",WFe);/**
|
|
492
|
-
* @license lucide-react v0.
|
|
492
|
+
* @license lucide-react v0.546.0 - ISC
|
|
493
493
|
*
|
|
494
494
|
* This source code is licensed under the ISC license.
|
|
495
495
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -574,7 +574,7 @@ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}
|
|
|
574
574
|
|
|
575
575
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
576
576
|
|
|
577
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},iOe="DialogDescriptionWarning",rOe=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rae(iOe).contentName}}.`;return S.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},iE=zre,tj=Gre,rE=Kre,aE=Wre,oE=Yre,aOe=Zre,oOe=eae,aae=nae;function fc({...e}){return A.jsx(iE,{"data-slot":"dialog",...e})}function w1({...e}){return A.jsx(tj,{"data-slot":"dialog-trigger",...e})}function sOe({...e}){return A.jsx(rE,{"data-slot":"dialog-portal",...e})}function lOe({className:e,...t}){return A.jsx(aE,{"data-slot":"dialog-overlay",className:Ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function Ac({className:e,children:t,showCloseButton:n=!0,...i}){return A.jsxs(sOe,{"data-slot":"dialog-portal",children:[A.jsx(lOe,{}),A.jsxs(oE,{"data-slot":"dialog-content",className:Ft("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-1001 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-gray-200 p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-gray-950 dark:border-gray-800",e),...i,children:[t,n&&A.jsxs(aae,{"data-slot":"dialog-close",className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800 dark:data-[state=open]:text-gray-400",children:[A.jsx(bp,{}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function td({className:e,...t}){return A.jsx("div",{"data-slot":"dialog-header",className:Ft("flex flex-col gap-2 text-center sm:text-left",e),...t})}function e0({className:e,...t}){return A.jsx("div",{"data-slot":"dialog-footer",className:Ft("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function nd({className:e,...t}){return A.jsx(aOe,{"data-slot":"dialog-title",className:Ft("text-lg leading-none font-semibold",e),...t})}function nj({className:e,...t}){return A.jsx(oOe,{"data-slot":"dialog-description",className:Ft("text-gray-500 text-sm dark:text-gray-400",e),...t})}function Qn({className:e,type:t,...n}){return A.jsx("input",{type:t,"data-slot":"input",className:Ft("file:text-gray-950 placeholder:text-gray-500 selection:bg-gray-900 selection:text-gray-50 dark:bg-gray-200/30 border-gray-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:file:text-gray-50 dark:placeholder:text-gray-400 dark:selection:bg-gray-50 dark:selection:text-gray-900 dark:dark:bg-gray-800/30 dark:border-gray-800","focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50","aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...n})}var cOe="Label",oae=S.forwardRef((e,t)=>A.jsx(sn.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));oae.displayName=cOe;var dOe=oae;function xn({className:e,...t}){return A.jsx(dOe,{"data-slot":"label",className:Ft("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function sae({open:e,onOpenChange:t}){const n=l5e(new Date),i=Qi(D6(n),"yyyy-MM-dd"),r=Qi(Bie(n),"yyyy-MM-dd"),[a,o]=S.useState(i),[s,l]=S.useState(r),[c,d]=S.useState(!1),[u,m]=S.useState(""),[h,v]=lr({pause:!0,query:$Te,variables:{fromDate:a,toDate:s}});S.useEffect(()=>{if(c&&!h.fetching){if(h.error){m("Failed to fetch uniform format data. Please try again."),console.error("GraphQL error:",h.error),d(!1);return}if(h.data?.uniformFormat){const{bkmvdata:b,ini:w}=h.data.uniformFormat;if(!b||!w){m("Incomplete data received from the server. Please try again."),d(!1);return}const C=new File([new Uint8Array(az.encode(b,"ISO-8859-8"))],"bkmvdata.txt",{type:"text/plain"}),N=new File([new Uint8Array(az.encode(w,"ISO-8859-8"))],"ini.txt",{type:"text/plain"});wz(N),setTimeout(()=>wz(C),100),t(!1),o(i),l(r),d(!1)}else h.stale&&!h.data?.uniformFormat&&(m("No data returned from the server. Please try again."),d(!1))}},[h,c,a,s,i,r,t]);const g=async b=>{if(b.preventDefault(),m(""),!a||!s){m("Please select both from and to dates");return}const w=new Date(a),C=new Date(s);if(w>=C){m("From date must be before to date");return}if(C>new Date){m("To date cannot be in the future");return}d(!0);try{v({requestPolicy:"network-only"})}catch(N){m("Failed to generate files. Please try again."),console.error("Error generating files:",N),d(!1)}},k=b=>{c||(t(b),b||(o(i),l(r),m("")))};return A.jsx(fc,{open:e,onOpenChange:k,children:A.jsxs(Ac,{className:"sm:max-w-md",children:[A.jsxs(td,{children:[A.jsxs(nd,{className:"flex items-center gap-2",children:[A.jsx(sC,{className:"h-5 w-5"}),"Generate Uniform Files"]}),A.jsx(nj,{children:"Select the date range to generate and download uniform files."})]}),A.jsxs("form",{onSubmit:g,className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsxs("div",{className:"space-y-2",children:[A.jsx(xn,{htmlFor:"from-date",children:"From Date"}),A.jsx(Qn,{id:"from-date",type:"date",value:a,onChange:b=>o(b.target.value),disabled:c,required:!0})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx(xn,{htmlFor:"to-date",children:"To Date"}),A.jsx(Qn,{id:"to-date",type:"date",value:s,onChange:b=>l(b.target.value),disabled:c,required:!0})]})]}),u&&A.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-md",children:u}),A.jsxs(e0,{className:"gap-2",children:[A.jsx(bt,{type:"button",variant:"outline",onClick:()=>k(!1),disabled:c,children:"Cancel"}),A.jsx(bt,{type:"submit",disabled:c,className:"gap-2",children:c?A.jsxs(A.Fragment,{children:[A.jsx(wA,{className:"h-4 w-4 animate-spin"}),"Generating..."]}):A.jsxs(A.Fragment,{children:[A.jsx(Jne,{className:"h-4 w-4"}),"Generate & Download"]})})]})]})]})})}function uOe({...e}){return A.jsx(iE,{"data-slot":"sheet",...e})}function fOe({...e}){return A.jsx(tj,{"data-slot":"sheet-trigger",...e})}function AOe({...e}){return A.jsx(rE,{"data-slot":"sheet-portal",...e})}function mOe({className:e,...t}){return A.jsx(aE,{"data-slot":"sheet-overlay",className:Ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function hOe({className:e,children:t,side:n="right",...i}){return A.jsxs(AOe,{children:[A.jsx(mOe,{}),A.jsxs(oE,{"data-slot":"sheet-content",className:Ft("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-1001 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-gray-950",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...i,children:[t,A.jsxs(aae,{className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800",children:[A.jsx(bp,{className:"size-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}var sE="Collapsible",[pOe,zDt]=Bs(sE),[gOe,ij]=pOe(sE),lae=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:i,defaultOpen:r,disabled:a,onOpenChange:o,...s}=e,[l,c]=Kd({prop:i,defaultProp:r??!1,onChange:o,caller:sE});return A.jsx(gOe,{scope:n,disabled:a,contentId:Bo(),open:l,onOpenToggle:S.useCallback(()=>c(d=>!d),[c]),children:A.jsx(sn.div,{"data-state":sj(l),"data-disabled":a?"":void 0,...s,ref:t})})});lae.displayName=sE;var cae="CollapsibleTrigger",rj=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,...i}=e,r=ij(cae,n);return A.jsx(sn.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":sj(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...i,ref:t,onClick:Kt(e.onClick,r.onOpenToggle)})});rj.displayName=cae;var aj="CollapsibleContent",oj=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=ij(aj,e.__scopeCollapsible);return A.jsx(To,{present:n||r.open,children:({present:a})=>A.jsx(vOe,{...i,ref:t,present:a})})});oj.displayName=aj;var vOe=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:i,children:r,...a}=e,o=ij(aj,n),[s,l]=S.useState(i),c=S.useRef(null),d=ui(t,c),u=S.useRef(0),m=u.current,h=S.useRef(0),v=h.current,g=o.open||s,k=S.useRef(g),b=S.useRef(void 0);return S.useEffect(()=>{const w=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(w)},[]),Ya(()=>{const w=c.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();u.current=C.height,h.current=C.width,k.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(i)}},[o.open,i]),A.jsx(sn.div,{"data-state":sj(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&r})});function sj(e){return e?"open":"closed"}var yOe=lae,VDt=rj,GDt=oj;function bOe({...e}){return A.jsx(yOe,{"data-slot":"collapsible",...e})}function kOe({...e}){return A.jsx(rj,{"data-slot":"collapsible-trigger",...e})}function wOe({...e}){return A.jsx(oj,{"data-slot":"collapsible-content",...e})}function lj(e){const t=e+"CollectionProvider",[n,i]=Bs(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:k,children:b}=g,w=V.useRef(null),C=V.useRef(new Map).current;return A.jsx(r,{scope:k,itemMap:C,collectionRef:w,children:b})};o.displayName=t;const s=e+"CollectionSlot",l=Vm(s),c=V.forwardRef((g,k)=>{const{scope:b,children:w}=g,C=a(s,b),N=ui(k,C.collectionRef);return A.jsx(l,{ref:N,children:w})});c.displayName=s;const d=e+"CollectionItemSlot",u="data-radix-collection-item",m=Vm(d),h=V.forwardRef((g,k)=>{const{scope:b,children:w,...C}=g,N=V.useRef(null),_=ui(k,N),F=a(d,b);return V.useEffect(()=>(F.itemMap.set(N,{ref:N,...C}),()=>void F.itemMap.delete(N))),A.jsx(m,{[u]:"",ref:_,children:w})});h.displayName=d;function v(g){const k=a(e+"CollectionConsumer",g);return V.useCallback(()=>{const w=k.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(k.itemMap.values()).sort((F,B)=>C.indexOf(F.ref.current)-C.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},v,i]}var SOe=S.createContext(void 0);function S1(e){const t=S.useContext(SOe);return e||t||"ltr"}const xOe=["top","right","bottom","left"],Wd=Math.min,Es=Math.max,kC=Math.round,jS=Math.floor,ef=e=>({x:e,y:e}),NOe={left:"right",right:"left",bottom:"top",top:"bottom"},COe={start:"end",end:"start"};function sR(e,t,n){return Es(e,Wd(t,n))}function of(e,t){return typeof e=="function"?e(t):e}function Yd(e){return e.split("-")[0]}function t0(e){return e.split("-")[1]}function cj(e){return e==="x"?"y":"x"}function dj(e){return e==="y"?"height":"width"}const _Oe=new Set(["top","bottom"]);function Ud(e){return _Oe.has(Yd(e))?"y":"x"}function uj(e){return cj(Ud(e))}function FOe(e,t,n){n===void 0&&(n=!1);const i=t0(e),r=uj(e),a=dj(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=wC(o)),[o,wC(o)]}function EOe(e){const t=wC(e);return[lR(e),t,lR(t)]}function lR(e){return e.replace(/start|end/g,t=>COe[t])}const Rz=["left","right"],jz=["right","left"],BOe=["top","bottom"],DOe=["bottom","top"];function TOe(e,t,n){switch(e){case"top":case"bottom":return n?t?jz:Rz:t?Rz:jz;case"left":case"right":return t?BOe:DOe;default:return[]}}function IOe(e,t,n,i){const r=t0(e);let a=TOe(Yd(e),n==="start",i);return r&&(a=a.map(o=>o+"-"+r),t&&(a=a.concat(a.map(lR)))),a}function wC(e){return e.replace(/left|right|bottom|top/g,t=>NOe[t])}function OOe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fj(e){return typeof e!="number"?OOe(e):{top:e,right:e,bottom:e,left:e}}function Cy(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Mz(e,t,n){let{reference:i,floating:r}=e;const a=Ud(t),o=uj(t),s=dj(o),l=Yd(t),c=a==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,m=i[s]/2-r[s]/2;let h;switch(l){case"top":h={x:d,y:i.y-r.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-r.width,y:u};break;default:h={x:i.x,y:i.y}}switch(t0(t)){case"start":h[o]-=m*(n&&c?-1:1);break;case"end":h[o]+=m*(n&&c?-1:1);break}return h}const POe=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Mz(c,i,l),m=i,h={},v=0;for(let g=0;g<s.length;g++){const{name:k,fn:b}=s[g],{x:w,y:C,data:N,reset:_}=await b({x:d,y:u,initialPlacement:i,placement:m,strategy:r,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});d=w??d,u=C??u,h={...h,[k]:{...h[k],...N}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:d,y:u}=Mz(c,m,l)),g=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:h}};async function Ok(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=of(t,e),v=fj(h),k=s[m?u==="floating"?"reference":"floating":u],b=Cy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),N=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},_=Cy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:l}):w);return{top:(b.top-_.top+v.top)/N.y,bottom:(_.bottom-b.bottom+v.bottom)/N.y,left:(b.left-_.left+v.left)/N.x,right:(_.right-b.right+v.right)/N.x}}const ROe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=of(e,t)||{};if(c==null)return{};const u=fj(d),m={x:n,y:i},h=uj(r),v=dj(h),g=await o.getDimensions(c),k=h==="y",b=k?"top":"left",w=k?"bottom":"right",C=k?"clientHeight":"clientWidth",N=a.reference[v]+a.reference[h]-m[h]-a.floating[v],_=m[h]-a.reference[h],F=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let B=F?F[C]:0;(!B||!await(o.isElement==null?void 0:o.isElement(F)))&&(B=s.floating[C]||a.floating[v]);const T=N/2-_/2,I=B/2-g[v]/2-1,$=Wd(u[b],I),j=Wd(u[w],I),P=$,K=B-g[v]-j,q=B/2-g[v]/2+T,re=sR(P,q,K),U=!l.arrow&&t0(r)!=null&&q!==re&&a.reference[v]/2-(q<P?$:j)-g[v]/2<0,te=U?q<P?q-P:q-K:0;return{[h]:m[h]+te,data:{[h]:re,centerOffset:q-re-te,...U&&{alignmentOffset:te}},reset:U}}}),jOe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...k}=of(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Yd(r),w=Ud(s),C=Yd(s)===s,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=m||(C||!g?[wC(s)]:EOe(s)),F=v!=="none";!m&&F&&_.push(...IOe(s,g,v,N));const B=[s,..._],T=await Ok(t,k),I=[];let $=((i=a.flip)==null?void 0:i.overflows)||[];if(d&&I.push(T[b]),u){const q=FOe(r,o,N);I.push(T[q[0]],T[q[1]])}if($=[...$,{placement:r,overflows:I}],!I.every(q=>q<=0)){var j,P;const q=(((j=a.flip)==null?void 0:j.index)||0)+1,re=B[q];if(re&&(!(u==="alignment"?w!==Ud(re):!1)||$.every(W=>Ud(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:q,overflows:$},reset:{placement:re}};let U=(P=$.filter(te=>te.overflows[0]<=0).sort((te,W)=>te.overflows[1]-W.overflows[1])[0])==null?void 0:P.placement;if(!U)switch(h){case"bestFit":{var K;const te=(K=$.filter(W=>{if(F){const le=Ud(W.placement);return le===w||le==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(le=>le>0).reduce((le,be)=>le+be,0)]).sort((W,le)=>W[1]-le[1])[0])==null?void 0:K[0];te&&(U=te);break}case"initialPlacement":U=s;break}if(r!==U)return{reset:{placement:U}}}return{}}}};function Lz(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $z(e){return xOe.some(t=>e[t]>=0)}const MOe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...r}=of(e,t);switch(i){case"referenceHidden":{const a=await Ok(t,{...r,elementContext:"reference"}),o=Lz(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$z(o)}}}case"escaped":{const a=await Ok(t,{...r,altBoundary:!0}),o=Lz(a,n.floating);return{data:{escapedOffsets:o,escaped:$z(o)}}}default:return{}}}}};function dae(e){const t=Wd(...e.map(a=>a.left)),n=Wd(...e.map(a=>a.top)),i=Es(...e.map(a=>a.right)),r=Es(...e.map(a=>a.bottom));return{x:t,y:n,width:i-t,height:r-n}}function LOe(e){const t=e.slice().sort((r,a)=>r.y-a.y),n=[];let i=null;for(let r=0;r<t.length;r++){const a=t[r];!i||a.y-i.y>i.height/2?n.push([a]):n[n.length-1].push(a),i=a}return n.map(r=>Cy(dae(r)))}const $Oe=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:r,platform:a,strategy:o}=t,{padding:s=2,x:l,y:c}=of(e,t),d=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),u=LOe(d),m=Cy(dae(d)),h=fj(s);function v(){if(u.length===2&&u[0].left>u[1].right&&l!=null&&c!=null)return u.find(k=>l>k.left-h.left&&l<k.right+h.right&&c>k.top-h.top&&c<k.bottom+h.bottom)||m;if(u.length>=2){if(Ud(n)==="y"){const $=u[0],j=u[u.length-1],P=Yd(n)==="top",K=$.top,q=j.bottom,re=P?$.left:j.left,U=P?$.right:j.right,te=U-re,W=q-K;return{top:K,bottom:q,left:re,right:U,width:te,height:W,x:re,y:K}}const k=Yd(n)==="left",b=Es(...u.map($=>$.right)),w=Wd(...u.map($=>$.left)),C=u.filter($=>k?$.left===w:$.right===b),N=C[0].top,_=C[C.length-1].bottom,F=w,B=b,T=B-F,I=_-N;return{top:N,bottom:_,left:F,right:B,width:T,height:I,x:F,y:N}}return m}const g=await a.getElementRects({reference:{getBoundingClientRect:v},floating:i.floating,strategy:o});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},uae=new Set(["left","top"]);async function UOe(e,t){const{placement:n,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Yd(n),s=t0(n),l=Ud(n)==="y",c=uae.has(o)?-1:1,d=a&&l?-1:1,u=of(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const QOe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:a,placement:o,middlewareData:s}=t,l=await UOe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:o}}}}},HOe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:k=>{let{x:b,y:w}=k;return{x:b,y:w}}},...l}=of(e,t),c={x:n,y:i},d=await Ok(t,l),u=Ud(Yd(r)),m=cj(u);let h=c[m],v=c[u];if(a){const k=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=h+d[k],C=h-d[b];h=sR(w,h,C)}if(o){const k=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=v+d[k],C=v-d[b];v=sR(w,v,C)}const g=s.fn({...t,[m]:h,[u]:v});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[m]:a,[u]:o}}}}}},zOe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=of(e,t),d={x:n,y:i},u=Ud(r),m=cj(u);let h=d[m],v=d[u];const g=of(s,t),k=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const C=m==="y"?"height":"width",N=a.reference[m]-a.floating[C]+k.mainAxis,_=a.reference[m]+a.reference[C]-k.mainAxis;h<N?h=N:h>_&&(h=_)}if(c){var b,w;const C=m==="y"?"width":"height",N=uae.has(Yd(r)),_=a.reference[u]-a.floating[C]+(N&&((b=o.offset)==null?void 0:b[u])||0)+(N?0:k.crossAxis),F=a.reference[u]+a.reference[C]+(N?0:((w=o.offset)==null?void 0:w[u])||0)-(N?k.crossAxis:0);v<_?v=_:v>F&&(v=F)}return{[m]:h,[u]:v}}}},VOe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=of(e,t),d=await Ok(t,c),u=Yd(r),m=t0(r),h=Ud(r)==="y",{width:v,height:g}=a.floating;let k,b;u==="top"||u==="bottom"?(k=u,b=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,k=m==="end"?"top":"bottom");const w=g-d.top-d.bottom,C=v-d.left-d.right,N=Wd(g-d[k],w),_=Wd(v-d[b],C),F=!t.middlewareData.shift;let B=N,T=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=C),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(B=w),F&&!m){const $=Es(d.left,0),j=Es(d.right,0),P=Es(d.top,0),K=Es(d.bottom,0);h?T=v-2*($!==0||j!==0?$+j:Es(d.left,d.right)):B=g-2*(P!==0||K!==0?P+K:Es(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:B});const I=await o.getDimensions(s.floating);return v!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function lE(){return typeof window<"u"}function n0(e){return fae(e)?(e.nodeName||"").toLowerCase():"#document"}function oc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Af(e){var t;return(t=(fae(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fae(e){return lE()?e instanceof Node||e instanceof oc(e).Node:!1}function Xd(e){return lE()?e instanceof Element||e instanceof oc(e).Element:!1}function sf(e){return lE()?e instanceof HTMLElement||e instanceof oc(e).HTMLElement:!1}function Uz(e){return!lE()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oc(e).ShadowRoot}const GOe=new Set(["inline","contents"]);function x1(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Zd(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!GOe.has(r)}const qOe=new Set(["table","td","th"]);function KOe(e){return qOe.has(n0(e))}const WOe=[":popover-open",":modal"];function cE(e){return WOe.some(t=>{try{return e.matches(t)}catch{return!1}})}const YOe=["transform","translate","scale","rotate","perspective"],XOe=["transform","translate","scale","rotate","perspective","filter"],ZOe=["paint","layout","strict","content"];function Aj(e){const t=mj(),n=Xd(e)?Zd(e):e;return YOe.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||XOe.some(i=>(n.willChange||"").includes(i))||ZOe.some(i=>(n.contain||"").includes(i))}function JOe(e){let t=Gm(e);for(;sf(t)&&!_y(t);){if(Aj(t))return t;if(cE(t))return null;t=Gm(t)}return null}function mj(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ePe=new Set(["html","body","#document"]);function _y(e){return ePe.has(n0(e))}function Zd(e){return oc(e).getComputedStyle(e)}function dE(e){return Xd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gm(e){if(n0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uz(e)&&e.host||Af(e);return Uz(t)?t.host:t}function Aae(e){const t=Gm(e);return _y(t)?e.ownerDocument?e.ownerDocument.body:e.body:sf(t)&&x1(t)?t:Aae(t)}function bA(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Aae(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=oc(r);if(a){const s=cR(o);return t.concat(o,o.visualViewport||[],x1(r)?r:[],s&&n?bA(s):[])}return t.concat(r,bA(r,[],n))}function cR(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mae(e){const t=Zd(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=sf(e),a=r?e.offsetWidth:n,o=r?e.offsetHeight:i,s=kC(n)!==a||kC(i)!==o;return s&&(n=a,i=o),{width:n,height:i,$:s}}function hj(e){return Xd(e)?e:e.contextElement}function ry(e){const t=hj(e);if(!sf(t))return ef(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:a}=mae(t);let o=(a?kC(n.width):n.width)/i,s=(a?kC(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const tPe=ef(0);function hae(e){const t=oc(e);return!mj()||!t.visualViewport?tPe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nPe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oc(e)?!1:t}function wp(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=hj(e);let o=ef(1);t&&(i?Xd(i)&&(o=ry(i)):o=ry(e));const s=nPe(a,n,i)?hae(a):ef(0);let l=(r.left+s.x)/o.x,c=(r.top+s.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(a){const m=oc(a),h=i&&Xd(i)?oc(i):i;let v=m,g=cR(v);for(;g&&i&&h!==v;){const k=ry(g),b=g.getBoundingClientRect(),w=Zd(g),C=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*k.x,N=b.top+(g.clientTop+parseFloat(w.paddingTop))*k.y;l*=k.x,c*=k.y,d*=k.x,u*=k.y,l+=C,c+=N,v=oc(g),g=cR(v)}}return Cy({width:d,height:u,x:l,y:c})}function uE(e,t){const n=dE(e).scrollLeft;return t?t.left+n:wp(Af(e)).left+n}function pae(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-uE(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function iPe(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=Af(i),s=t?cE(t.floating):!1;if(i===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=ef(1);const d=ef(0),u=sf(i);if((u||!u&&!a)&&((n0(i)!=="body"||x1(o))&&(l=dE(i)),sf(i))){const h=wp(i);c=ry(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}const m=o&&!u&&!a?pae(o,l):ef(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function rPe(e){return Array.from(e.getClientRects())}function aPe(e){const t=Af(e),n=dE(e),i=e.ownerDocument.body,r=Es(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Es(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+uE(e);const s=-n.scrollTop;return Zd(i).direction==="rtl"&&(o+=Es(t.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:s}}const Qz=25;function oPe(e,t){const n=oc(e),i=Af(e),r=n.visualViewport;let a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(r){a=r.width,o=r.height;const d=mj();(!d||d&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}const c=uE(i);if(c<=0){const d=i.ownerDocument,u=d.body,m=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(i.clientWidth-u.clientWidth-h);v<=Qz&&(a-=v)}else c<=Qz&&(a+=c);return{width:a,height:o,x:s,y:l}}const sPe=new Set(["absolute","fixed"]);function lPe(e,t){const n=wp(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,a=sf(e)?ry(e):ef(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=r*a.x,c=i*a.y;return{width:o,height:s,x:l,y:c}}function Hz(e,t,n){let i;if(t==="viewport")i=oPe(e,n);else if(t==="document")i=aPe(Af(e));else if(Xd(t))i=lPe(t,n);else{const r=hae(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Cy(i)}function gae(e,t){const n=Gm(e);return n===t||!Xd(n)||_y(n)?!1:Zd(n).position==="fixed"||gae(n,t)}function cPe(e,t){const n=t.get(e);if(n)return n;let i=bA(e,[],!1).filter(s=>Xd(s)&&n0(s)!=="body"),r=null;const a=Zd(e).position==="fixed";let o=a?Gm(e):e;for(;Xd(o)&&!_y(o);){const s=Zd(o),l=Aj(o);!l&&s.position==="fixed"&&(r=null),(a?!l&&!r:!l&&s.position==="static"&&!!r&&sPe.has(r.position)||x1(o)&&!l&&gae(e,o))?i=i.filter(d=>d!==o):r=s,o=Gm(o)}return t.set(e,i),i}function dPe(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?cE(t)?[]:cPe(t,this._c):[].concat(n),i],s=o[0],l=o.reduce((c,d)=>{const u=Hz(t,d,r);return c.top=Es(u.top,c.top),c.right=Wd(u.right,c.right),c.bottom=Wd(u.bottom,c.bottom),c.left=Es(u.left,c.left),c},Hz(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uPe(e){const{width:t,height:n}=mae(e);return{width:t,height:n}}function fPe(e,t,n){const i=sf(t),r=Af(t),a=n==="fixed",o=wp(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=ef(0);function c(){l.x=uE(r)}if(i||!i&&!a)if((n0(t)!=="body"||x1(r))&&(s=dE(t)),i){const h=wp(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&c();a&&!i&&r&&c();const d=r&&!i&&!a?pae(r,s):ef(0),u=o.left+s.scrollLeft-l.x-d.x,m=o.top+s.scrollTop-l.y-d.y;return{x:u,y:m,width:o.width,height:o.height}}function F4(e){return Zd(e).position==="static"}function zz(e,t){if(!sf(e)||Zd(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Af(e)===n&&(n=n.ownerDocument.body),n}function vae(e,t){const n=oc(e);if(cE(e))return n;if(!sf(e)){let r=Gm(e);for(;r&&!_y(r);){if(Xd(r)&&!F4(r))return r;r=Gm(r)}return n}let i=zz(e,t);for(;i&&KOe(i)&&F4(i);)i=zz(i,t);return i&&_y(i)&&F4(i)&&!Aj(i)?n:i||JOe(e)||n}const APe=async function(e){const t=this.getOffsetParent||vae,n=this.getDimensions,i=await n(e.floating);return{reference:fPe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mPe(e){return Zd(e).direction==="rtl"}const hPe={convertOffsetParentRelativeRectToViewportRelativeRect:iPe,getDocumentElement:Af,getClippingRect:dPe,getOffsetParent:vae,getElementRects:APe,getClientRects:rPe,getDimensions:uPe,getScale:ry,isElement:Xd,isRTL:mPe};function yae(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pPe(e,t){let n=null,i;const r=Af(e);function a(){var s;clearTimeout(i),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:h}=c;if(s||t(),!m||!h)return;const v=jS(u),g=jS(r.clientWidth-(d+m)),k=jS(r.clientHeight-(u+h)),b=jS(d),C={rootMargin:-v+"px "+-g+"px "+-k+"px "+-b+"px",threshold:Es(0,Wd(1,l))||1};let N=!0;function _(F){const B=F[0].intersectionRatio;if(B!==l){if(!N)return o();B?o(!1,B):i=setTimeout(()=>{o(!1,1e-7)},1e3)}B===1&&!yae(c,e.getBoundingClientRect())&&o(),N=!1}try{n=new IntersectionObserver(_,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,C)}n.observe(e)}return o(!0),a}function bae(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=hj(e),d=r||a?[...c?bA(c):[],...bA(t)]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=c&&s?pPe(c,n):null;let m=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let v,g=l?wp(e):null;l&&k();function k(){const b=wp(e);g&&!yae(g,b)&&n(),g=b,v=requestAnimationFrame(k)}return n(),()=>{var b;d.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u?.(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const pj=QOe,fE=HOe,gj=jOe,kae=VOe,gPe=MOe,SC=ROe,wae=$Oe,Sae=zOe,xae=(e,t,n)=>{const i=new Map,r={platform:hPe,...n},a={...r.platform,_c:i};return POe(e,t,{...r,platform:a})};var vPe=typeof document<"u",yPe=function(){},TN=vPe?S.useLayoutEffect:yPe;function xC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!xC(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!xC(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Nae(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vz(e,t){const n=Nae(e);return Math.round(t*n)/n}function E4(e){const t=S.useRef(e);return TN(()=>{t.current=e}),t}function bPe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=S.useState(i);xC(m,i)||h(i);const[v,g]=S.useState(null),[k,b]=S.useState(null),w=S.useCallback(W=>{W!==F.current&&(F.current=W,g(W))},[]),C=S.useCallback(W=>{W!==B.current&&(B.current=W,b(W))},[]),N=a||v,_=o||k,F=S.useRef(null),B=S.useRef(null),T=S.useRef(d),I=l!=null,$=E4(l),j=E4(r),P=E4(c),K=S.useCallback(()=>{if(!F.current||!B.current)return;const W={placement:t,strategy:n,middleware:m};j.current&&(W.platform=j.current),xae(F.current,B.current,W).then(le=>{const be={...le,isPositioned:P.current!==!1};q.current&&!xC(T.current,be)&&(T.current=be,ff.flushSync(()=>{u(be)}))})},[m,t,n,j,P]);TN(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(W=>({...W,isPositioned:!1})))},[c]);const q=S.useRef(!1);TN(()=>(q.current=!0,()=>{q.current=!1}),[]),TN(()=>{if(N&&(F.current=N),_&&(B.current=_),N&&_){if($.current)return $.current(N,_,K);K()}},[N,_,K,$,I]);const re=S.useMemo(()=>({reference:F,floating:B,setReference:w,setFloating:C}),[w,C]),U=S.useMemo(()=>({reference:N,floating:_}),[N,_]),te=S.useMemo(()=>{const W={position:n,left:0,top:0};if(!U.floating)return W;const le=Vz(U.floating,d.x),be=Vz(U.floating,d.y);return s?{...W,transform:"translate("+le+"px, "+be+"px)",...Nae(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:le,top:be}},[n,s,U.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:K,refs:re,elements:U,floatingStyles:te}),[d,K,re,U,te])}const kPe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?SC({element:i.current,padding:r}).fn(n):{}:i?SC({element:i,padding:r}).fn(n):{}}}},wPe=(e,t)=>({...pj(e),options:[e,t]}),SPe=(e,t)=>({...fE(e),options:[e,t]}),xPe=(e,t)=>({...Sae(e),options:[e,t]}),NPe=(e,t)=>({...gj(e),options:[e,t]}),CPe=(e,t)=>({...kae(e),options:[e,t]}),_Pe=(e,t)=>({...gPe(e),options:[e,t]}),FPe=(e,t)=>({...kPe(e),options:[e,t]});var EPe="Arrow",Cae=S.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...a}=e;return A.jsx(sn.svg,{...a,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:A.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cae.displayName=EPe;var BPe=Cae;function vj(e){const[t,n]=S.useState(void 0);return Ya(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var yj="Popper",[_ae,rh]=Bs(yj),[DPe,Fae]=_ae(yj),Eae=e=>{const{__scopePopper:t,children:n}=e,[i,r]=S.useState(null);return A.jsx(DPe,{scope:t,anchor:i,onAnchorChange:r,children:n})};Eae.displayName=yj;var Bae="PopperAnchor",Dae=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,a=Fae(Bae,n),o=S.useRef(null),s=ui(t,o),l=S.useRef(null);return S.useEffect(()=>{const c=l.current;l.current=i?.current||o.current,c!==l.current&&a.onAnchorChange(l.current)}),i?null:A.jsx(sn.div,{...r,ref:s})});Dae.displayName=Bae;var bj="PopperContent",[TPe,IPe]=_ae(bj),Tae=S.forwardRef((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,k=Fae(bj,n),[b,w]=S.useState(null),C=ui(t,Y=>w(Y)),[N,_]=S.useState(null),F=vj(N),B=F?.width??0,T=F?.height??0,I=i+(a!=="center"?"-"+a:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},j=Array.isArray(c)?c:[c],P=j.length>0,K={padding:$,boundary:j.filter(PPe),altBoundary:P},{refs:q,floatingStyles:re,placement:U,isPositioned:te,middlewareData:W}=bPe({strategy:"fixed",placement:I,whileElementsMounted:(...Y)=>bae(...Y,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[wPe({mainAxis:r+T,alignmentAxis:o}),l&&SPe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?xPe():void 0,...K}),l&&NPe({...K}),CPe({...K,apply:({elements:Y,rects:ue,availableWidth:me,availableHeight:ye})=>{const{width:ae,height:ie}=ue.reference,_e=Y.floating.style;_e.setProperty("--radix-popper-available-width",`${me}px`),_e.setProperty("--radix-popper-available-height",`${ye}px`),_e.setProperty("--radix-popper-anchor-width",`${ae}px`),_e.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),N&&FPe({element:N,padding:s}),RPe({arrowWidth:B,arrowHeight:T}),m&&_Pe({strategy:"referenceHidden",...K})]}),[le,be]=Pae(U),oe=Vo(v);Ya(()=>{te&&oe?.()},[te,oe]);const M=W.arrow?.x,Q=W.arrow?.y,L=W.arrow?.centerOffset!==0,[J,ee]=S.useState();return Ya(()=>{b&&ee(window.getComputedStyle(b).zIndex)},[b]),A.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:A.jsx(TPe,{scope:n,placedSide:le,onArrowChange:_,arrowX:M,arrowY:Q,shouldHideArrow:L,children:A.jsx(sn.div,{"data-side":le,"data-align":be,...g,ref:C,style:{...g.style,animation:te?void 0:"none"}})})})});Tae.displayName=bj;var Iae="PopperArrow",OPe={top:"bottom",right:"left",bottom:"top",left:"right"},Oae=S.forwardRef(function(t,n){const{__scopePopper:i,...r}=t,a=IPe(Iae,i),o=OPe[a.placedSide];return A.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:A.jsx(BPe,{...r,ref:n,style:{...r.style,display:"block"}})})});Oae.displayName=Iae;function PPe(e){return e!==null}var RPe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=Pae(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+s/2,h=(r.arrow?.y??0)+l/2;let v="",g="";return c==="bottom"?(v=o?u:`${m}px`,g=`${-l}px`):c==="top"?(v=o?u:`${m}px`,g=`${i.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?u:`${h}px`):c==="left"&&(v=`${i.floating.width+l}px`,g=o?u:`${h}px`),{data:{x:v,y:g}}}});function Pae(e){const[t,n="center"]=e.split("-");return[t,n]}var AE=Eae,N1=Dae,mE=Tae,hE=Oae,B4="rovingFocusGroup.onEntryFocus",jPe={bubbles:!1,cancelable:!0},C1="RovingFocusGroup",[dR,Rae,MPe]=lj(C1),[LPe,pE]=Bs(C1,[MPe]),[$Pe,UPe]=LPe(C1),jae=S.forwardRef((e,t)=>A.jsx(dR.Provider,{scope:e.__scopeRovingFocusGroup,children:A.jsx(dR.Slot,{scope:e.__scopeRovingFocusGroup,children:A.jsx(QPe,{...e,ref:t})})}));jae.displayName=C1;var QPe=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,m=S.useRef(null),h=ui(t,m),v=S1(a),[g,k]=Kd({prop:o,defaultProp:s??null,onChange:l,caller:C1}),[b,w]=S.useState(!1),C=Vo(c),N=Rae(n),_=S.useRef(!1),[F,B]=S.useState(0);return S.useEffect(()=>{const T=m.current;if(T)return T.addEventListener(B4,C),()=>T.removeEventListener(B4,C)},[C]),A.jsx($Pe,{scope:n,orientation:i,dir:v,loop:r,currentTabStopId:g,onItemFocus:S.useCallback(T=>k(T),[k]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>B(T=>T+1),[]),onFocusableItemRemove:S.useCallback(()=>B(T=>T-1),[]),children:A.jsx(sn.div,{tabIndex:b||F===0?-1:0,"data-orientation":i,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:Kt(e.onMouseDown,()=>{_.current=!0}),onFocus:Kt(e.onFocus,T=>{const I=!_.current;if(T.target===T.currentTarget&&I&&!b){const $=new CustomEvent(B4,jPe);if(T.currentTarget.dispatchEvent($),!$.defaultPrevented){const j=N().filter(U=>U.focusable),P=j.find(U=>U.active),K=j.find(U=>U.id===g),re=[P,K,...j].filter(Boolean).map(U=>U.ref.current);$ae(re,d)}}_.current=!1}),onBlur:Kt(e.onBlur,()=>w(!1))})})}),Mae="RovingFocusGroupItem",Lae=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:a,children:o,...s}=e,l=Bo(),c=a||l,d=UPe(Mae,n),u=d.currentTabStopId===c,m=Rae(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=d;return S.useEffect(()=>{if(i)return h(),()=>v()},[i,h,v]),A.jsx(dR.ItemSlot,{scope:n,id:c,focusable:i,active:r,children:A.jsx(sn.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Kt(e.onMouseDown,k=>{i?d.onItemFocus(c):k.preventDefault()}),onFocus:Kt(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Kt(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){d.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const b=VPe(k,d.orientation,d.dir);if(b!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let C=m().filter(N=>N.focusable).map(N=>N.ref.current);if(b==="last")C.reverse();else if(b==="prev"||b==="next"){b==="prev"&&C.reverse();const N=C.indexOf(k.currentTarget);C=d.loop?GPe(C,N+1):C.slice(N+1)}setTimeout(()=>$ae(C))}}),children:typeof o=="function"?o({isCurrentTabStop:u,hasTabStop:g!=null}):o})})});Lae.displayName=Mae;var HPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zPe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function VPe(e,t,n){const i=zPe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return HPe[i]}function $ae(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function GPe(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Uae=jae,Qae=Lae,uR=["Enter"," "],qPe=["ArrowDown","PageUp","Home"],Hae=["ArrowUp","PageDown","End"],KPe=[...qPe,...Hae],WPe={ltr:[...uR,"ArrowRight"],rtl:[...uR,"ArrowLeft"]},YPe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_1="Menu",[Pk,XPe,ZPe]=lj(_1),[Gp,zae]=Bs(_1,[ZPe,rh,pE]),gE=rh(),Vae=pE(),[JPe,qp]=Gp(_1),[eRe,F1]=Gp(_1),Gae=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:a,modal:o=!0}=e,s=gE(t),[l,c]=S.useState(null),d=S.useRef(!1),u=Vo(a),m=S1(r);return S.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),A.jsx(AE,{...s,children:A.jsx(JPe,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:A.jsx(eRe,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:m,modal:o,children:i})})})};Gae.displayName=_1;var tRe="MenuAnchor",kj=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gE(n);return A.jsx(N1,{...r,...i,ref:t})});kj.displayName=tRe;var wj="MenuPortal",[nRe,qae]=Gp(wj,{forceMount:void 0}),Kae=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,a=qp(wj,t);return A.jsx(nRe,{scope:t,forceMount:n,children:A.jsx(To,{present:n||a.open,children:A.jsx(Yy,{asChild:!0,container:r,children:i})})})};Kae.displayName=wj;var zc="MenuContent",[iRe,Sj]=Gp(zc),Wae=S.forwardRef((e,t)=>{const n=qae(zc,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,a=qp(zc,e.__scopeMenu),o=F1(zc,e.__scopeMenu);return A.jsx(Pk.Provider,{scope:e.__scopeMenu,children:A.jsx(To,{present:i||a.open,children:A.jsx(Pk.Slot,{scope:e.__scopeMenu,children:o.modal?A.jsx(rRe,{...r,ref:t}):A.jsx(aRe,{...r,ref:t})})})})}),rRe=S.forwardRef((e,t)=>{const n=qp(zc,e.__scopeMenu),i=S.useRef(null),r=ui(t,i);return S.useEffect(()=>{const a=i.current;if(a)return tE(a)},[]),A.jsx(xj,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kt(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),aRe=S.forwardRef((e,t)=>{const n=qp(zc,e.__scopeMenu);return A.jsx(xj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),oRe=Vm("MenuContent.ScrollLock"),xj=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...g}=e,k=qp(zc,n),b=F1(zc,n),w=gE(n),C=Vae(n),N=XPe(n),[_,F]=S.useState(null),B=S.useRef(null),T=ui(t,B,k.onContentChange),I=S.useRef(0),$=S.useRef(""),j=S.useRef(0),P=S.useRef(null),K=S.useRef("right"),q=S.useRef(0),re=v?Jy:S.Fragment,U=v?{as:oRe,allowPinchZoom:!0}:void 0,te=le=>{const be=$.current+le,oe=N().filter(Y=>!Y.disabled),M=document.activeElement,Q=oe.find(Y=>Y.ref.current===M)?.textValue,L=oe.map(Y=>Y.textValue),J=vRe(L,be,Q),ee=oe.find(Y=>Y.textValue===J)?.ref.current;(function Y(ue){$.current=ue,window.clearTimeout(I.current),ue!==""&&(I.current=window.setTimeout(()=>Y(""),1e3))})(be),ee&&setTimeout(()=>ee.focus())};S.useEffect(()=>()=>window.clearTimeout(I.current),[]),JF();const W=S.useCallback(le=>K.current===P.current?.side&&bRe(le,P.current?.area),[]);return A.jsx(iRe,{scope:n,searchRef:$,onItemEnter:S.useCallback(le=>{W(le)&&le.preventDefault()},[W]),onItemLeave:S.useCallback(le=>{W(le)||(B.current?.focus(),F(null))},[W]),onTriggerLeave:S.useCallback(le=>{W(le)&&le.preventDefault()},[W]),pointerGraceTimerRef:j,onPointerGraceIntentChange:S.useCallback(le=>{P.current=le},[]),children:A.jsx(re,{...U,children:A.jsx(k1,{asChild:!0,trapped:r,onMountAutoFocus:Kt(a,le=>{le.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,children:A.jsx(Uae,{asChild:!0,...C,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:_,onCurrentTabStopIdChange:F,onEntryFocus:Kt(l,le=>{b.isUsingKeyboardRef.current||le.preventDefault()}),preventScrollOnEntryFocus:!0,children:A.jsx(mE,{role:"menu","aria-orientation":"vertical","data-state":uoe(k.open),"data-radix-menu-content":"",dir:b.dir,...w,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:Kt(g.onKeyDown,le=>{const oe=le.target.closest("[data-radix-menu-content]")===le.currentTarget,M=le.ctrlKey||le.altKey||le.metaKey,Q=le.key.length===1;oe&&(le.key==="Tab"&&le.preventDefault(),!M&&Q&&te(le.key));const L=B.current;if(le.target!==L||!KPe.includes(le.key))return;le.preventDefault();const ee=N().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);Hae.includes(le.key)&&ee.reverse(),pRe(ee)}),onBlur:Kt(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(I.current),$.current="")}),onPointerMove:Kt(e.onPointerMove,Rk(le=>{const be=le.target,oe=q.current!==le.clientX;if(le.currentTarget.contains(be)&&oe){const M=le.clientX>q.current?"right":"left";K.current=M,q.current=le.clientX}}))})})})})})})});Wae.displayName=zc;var sRe="MenuGroup",Nj=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{role:"group",...i,ref:t})});Nj.displayName=sRe;var lRe="MenuLabel",Yae=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{...i,ref:t})});Yae.displayName=lRe;var NC="MenuItem",Gz="menu.itemSelect",vE=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...r}=e,a=S.useRef(null),o=F1(NC,e.__scopeMenu),s=Sj(NC,e.__scopeMenu),l=ui(t,a),c=S.useRef(!1),d=()=>{const u=a.current;if(!n&&u){const m=new CustomEvent(Gz,{bubbles:!0,cancelable:!0});u.addEventListener(Gz,h=>i?.(h),{once:!0}),Dre(u,m),m.defaultPrevented?c.current=!1:o.onClose()}};return A.jsx(Xae,{...r,ref:l,disabled:n,onClick:Kt(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),c.current=!0},onPointerUp:Kt(e.onPointerUp,u=>{c.current||u.currentTarget?.click()}),onKeyDown:Kt(e.onKeyDown,u=>{const m=s.searchRef.current!=="";n||m&&u.key===" "||uR.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});vE.displayName=NC;var Xae=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:r,...a}=e,o=Sj(NC,n),s=Vae(n),l=S.useRef(null),c=ui(t,l),[d,u]=S.useState(!1),[m,h]=S.useState("");return S.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[a.children]),A.jsx(Pk.ItemSlot,{scope:n,disabled:i,textValue:r??m,children:A.jsx(Qae,{asChild:!0,...s,focusable:!i,children:A.jsx(sn.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...a,ref:c,onPointerMove:Kt(e.onPointerMove,Rk(v=>{i?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Kt(e.onPointerLeave,Rk(v=>o.onItemLeave(v))),onFocus:Kt(e.onFocus,()=>u(!0)),onBlur:Kt(e.onBlur,()=>u(!1))})})})}),cRe="MenuCheckboxItem",Zae=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...r}=e;return A.jsx(ioe,{scope:e.__scopeMenu,checked:n,children:A.jsx(vE,{role:"menuitemcheckbox","aria-checked":CC(n)?"mixed":n,...r,ref:t,"data-state":_j(n),onSelect:Kt(r.onSelect,()=>i?.(CC(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Zae.displayName=cRe;var Jae="MenuRadioGroup",[dRe,uRe]=Gp(Jae,{value:void 0,onValueChange:()=>{}}),eoe=S.forwardRef((e,t)=>{const{value:n,onValueChange:i,...r}=e,a=Vo(i);return A.jsx(dRe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:A.jsx(Nj,{...r,ref:t})})});eoe.displayName=Jae;var toe="MenuRadioItem",noe=S.forwardRef((e,t)=>{const{value:n,...i}=e,r=uRe(toe,e.__scopeMenu),a=n===r.value;return A.jsx(ioe,{scope:e.__scopeMenu,checked:a,children:A.jsx(vE,{role:"menuitemradio","aria-checked":a,...i,ref:t,"data-state":_j(a),onSelect:Kt(i.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});noe.displayName=toe;var Cj="MenuItemIndicator",[ioe,fRe]=Gp(Cj,{checked:!1}),roe=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...r}=e,a=fRe(Cj,n);return A.jsx(To,{present:i||CC(a.checked)||a.checked===!0,children:A.jsx(sn.span,{...r,ref:t,"data-state":_j(a.checked)})})});roe.displayName=Cj;var ARe="MenuSeparator",aoe=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});aoe.displayName=ARe;var mRe="MenuArrow",ooe=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gE(n);return A.jsx(hE,{...r,...i,ref:t})});ooe.displayName=mRe;var hRe="MenuSub",[qDt,soe]=Gp(hRe),Kb="MenuSubTrigger",loe=S.forwardRef((e,t)=>{const n=qp(Kb,e.__scopeMenu),i=F1(Kb,e.__scopeMenu),r=soe(Kb,e.__scopeMenu),a=Sj(Kb,e.__scopeMenu),o=S.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},d=S.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return S.useEffect(()=>d,[d]),S.useEffect(()=>{const u=s.current;return()=>{window.clearTimeout(u),l(null)}},[s,l]),A.jsx(kj,{asChild:!0,...c,children:A.jsx(Xae,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":uoe(n.open),...e,ref:xA(t,r.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Kt(e.onPointerMove,Rk(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Kt(e.onPointerLeave,Rk(u=>{d();const m=n.content?.getBoundingClientRect();if(m){const h=n.content?.dataset.side,v=h==="right",g=v?-5:5,k=m[v?"left":"right"],b=m[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:k,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:k,y:m.bottom}],side:h}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Kt(e.onKeyDown,u=>{const m=a.searchRef.current!=="";e.disabled||m&&u.key===" "||WPe[i.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});loe.displayName=Kb;var coe="MenuSubContent",doe=S.forwardRef((e,t)=>{const n=qae(zc,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,a=qp(zc,e.__scopeMenu),o=F1(zc,e.__scopeMenu),s=soe(coe,e.__scopeMenu),l=S.useRef(null),c=ui(t,l);return A.jsx(Pk.Provider,{scope:e.__scopeMenu,children:A.jsx(To,{present:i||a.open,children:A.jsx(Pk.Slot,{scope:e.__scopeMenu,children:A.jsx(xj,{id:s.contentId,"aria-labelledby":s.triggerId,...r,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{o.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:Kt(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Kt(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:Kt(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),m=YPe[o.dir].includes(d.key);u&&m&&(a.onOpenChange(!1),s.trigger?.focus(),d.preventDefault())})})})})})});doe.displayName=coe;function uoe(e){return e?"open":"closed"}function CC(e){return e==="indeterminate"}function _j(e){return CC(e)?"indeterminate":e?"checked":"unchecked"}function pRe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gRe(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function vRe(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=gRe(e,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function yRe(e,t){const{x:n,y:i}=e;let r=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,d=s.y,u=l.x,m=l.y;d>i!=m>i&&n<(u-c)*(i-d)/(m-d)+c&&(r=!r)}return r}function bRe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yRe(n,t)}function Rk(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kRe=Gae,wRe=kj,SRe=Kae,xRe=Wae,NRe=Nj,CRe=Yae,_Re=vE,FRe=Zae,ERe=eoe,BRe=noe,DRe=roe,TRe=aoe,IRe=ooe,ORe=loe,PRe=doe,yE="DropdownMenu",[RRe]=Bs(yE,[zae]),Ys=zae(),[jRe,foe]=RRe(yE),Aoe=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=Ys(t),c=S.useRef(null),[d,u]=Kd({prop:r,defaultProp:a??!1,onChange:o,caller:yE});return A.jsx(jRe,{scope:t,triggerId:Bo(),triggerRef:c,contentId:Bo(),open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(m=>!m),[u]),modal:s,children:A.jsx(kRe,{...l,open:d,onOpenChange:u,dir:i,modal:s,children:n})})};Aoe.displayName=yE;var moe="DropdownMenuTrigger",hoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...r}=e,a=foe(moe,n),o=Ys(n);return A.jsx(wRe,{asChild:!0,...o,children:A.jsx(sn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:xA(t,a.triggerRef),onPointerDown:Kt(e.onPointerDown,s=>{!i&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:Kt(e.onKeyDown,s=>{i||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});hoe.displayName=moe;var MRe="DropdownMenuPortal",poe=e=>{const{__scopeDropdownMenu:t,...n}=e,i=Ys(t);return A.jsx(SRe,{...i,...n})};poe.displayName=MRe;var goe="DropdownMenuContent",voe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=foe(goe,n),a=Ys(n),o=S.useRef(!1);return A.jsx(xRe,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...i,ref:t,onCloseAutoFocus:Kt(e.onCloseAutoFocus,s=>{o.current||r.triggerRef.current?.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:Kt(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!r.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});voe.displayName=goe;var LRe="DropdownMenuGroup",yoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(NRe,{...r,...i,ref:t})});yoe.displayName=LRe;var $Re="DropdownMenuLabel",boe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(CRe,{...r,...i,ref:t})});boe.displayName=$Re;var URe="DropdownMenuItem",koe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(_Re,{...r,...i,ref:t})});koe.displayName=URe;var QRe="DropdownMenuCheckboxItem",woe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(FRe,{...r,...i,ref:t})});woe.displayName=QRe;var HRe="DropdownMenuRadioGroup",zRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(ERe,{...r,...i,ref:t})});zRe.displayName=HRe;var VRe="DropdownMenuRadioItem",GRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(BRe,{...r,...i,ref:t})});GRe.displayName=VRe;var qRe="DropdownMenuItemIndicator",Soe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(DRe,{...r,...i,ref:t})});Soe.displayName=qRe;var KRe="DropdownMenuSeparator",xoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(TRe,{...r,...i,ref:t})});xoe.displayName=KRe;var WRe="DropdownMenuArrow",YRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(IRe,{...r,...i,ref:t})});YRe.displayName=WRe;var XRe="DropdownMenuSubTrigger",ZRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(ORe,{...r,...i,ref:t})});ZRe.displayName=XRe;var JRe="DropdownMenuSubContent",e3e=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(PRe,{...r,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e3e.displayName=JRe;var t3e=Aoe,n3e=hoe,i3e=poe,r3e=voe,a3e=yoe,o3e=boe,s3e=koe,l3e=woe,c3e=Soe,d3e=xoe;function Noe({...e}){return A.jsx(t3e,{"data-slot":"dropdown-menu",...e})}function Coe({...e}){return A.jsx(n3e,{"data-slot":"dropdown-menu-trigger",...e})}function _oe({className:e,sideOffset:t=4,...n}){return A.jsx(i3e,{children:A.jsx(r3e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ft("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",e),...n})})}function KDt({...e}){return A.jsx(a3e,{"data-slot":"dropdown-menu-group",...e})}function Wb({className:e,inset:t,variant:n="default",...i}){return A.jsx(s3e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ft("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...i})}function WDt({className:e,children:t,checked:n,...i}){return A.jsxs(l3e,{"data-slot":"dropdown-menu-checkbox-item",className:Ft("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50",e),checked:n,...i,children:[A.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:A.jsx(c3e,{children:A.jsx(kA,{className:"size-4"})})}),t]})}function Foe({className:e,inset:t,...n}){return A.jsx(o3e,{"data-slot":"dropdown-menu-label","data-inset":t,className:Ft("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Eoe({className:e,...t}){return A.jsx(d3e,{"data-slot":"dropdown-menu-separator",className:Ft("bg-gray-200 -mx-1 my-1 h-px dark:bg-gray-800",e),...t})}function YDt({className:e,...t}){return A.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Ft("text-gray-500 ml-auto text-xs tracking-widest dark:text-gray-400",e),...t})}function fR(e,[t,n]){return Math.min(n,Math.max(t,e))}function u3e(e,t){return S.useReducer((n,i)=>t[n][i]??n,e)}var Fj="ScrollArea",[Boe]=Bs(Fj),[f3e,id]=Boe(Fj),Doe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:r,scrollHideDelay:a=600,...o}=e,[s,l]=S.useState(null),[c,d]=S.useState(null),[u,m]=S.useState(null),[h,v]=S.useState(null),[g,k]=S.useState(null),[b,w]=S.useState(0),[C,N]=S.useState(0),[_,F]=S.useState(!1),[B,T]=S.useState(!1),I=ui(t,j=>l(j)),$=S1(r);return A.jsx(f3e,{scope:n,type:i,dir:$,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:_,onScrollbarXEnabledChange:F,scrollbarY:g,onScrollbarYChange:k,scrollbarYEnabled:B,onScrollbarYEnabledChange:T,onCornerWidthChange:w,onCornerHeightChange:N,children:A.jsx(sn.div,{dir:$,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Doe.displayName=Fj;var Toe="ScrollAreaViewport",Ioe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:r,...a}=e,o=id(Toe,n),s=S.useRef(null),l=ui(t,s,o.onViewportChange);return A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),A.jsx(sn.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:A.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});Ioe.displayName=Toe;var mf="ScrollAreaScrollbar",Ooe=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=r,s=e.orientation==="horizontal";return S.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),r.type==="hover"?A.jsx(A3e,{...i,ref:t,forceMount:n}):r.type==="scroll"?A.jsx(m3e,{...i,ref:t,forceMount:n}):r.type==="auto"?A.jsx(Poe,{...i,ref:t,forceMount:n}):r.type==="always"?A.jsx(Ej,{...i,ref:t}):null});Ooe.displayName=mf;var A3e=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),[a,o]=S.useState(!1);return S.useEffect(()=>{const s=r.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),r.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),A.jsx(To,{present:n||a,children:A.jsx(Poe,{"data-state":a?"visible":"hidden",...i,ref:t})})}),m3e=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),a=e.orientation==="horizontal",o=kE(()=>l("SCROLL_END"),100),[s,l]=u3e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,r.scrollHideDelay,l]),S.useEffect(()=>{const c=r.viewport,d=a?"scrollLeft":"scrollTop";if(c){let u=c[d];const m=()=>{const h=c[d];u!==h&&(l("SCROLL"),o()),u=h};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[r.viewport,a,l,o]),A.jsx(To,{present:n||s!=="hidden",children:A.jsx(Ej,{"data-state":s==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:Kt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Kt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Poe=S.forwardRef((e,t)=>{const n=id(mf,e.__scopeScrollArea),{forceMount:i,...r}=e,[a,o]=S.useState(!1),s=e.orientation==="horizontal",l=kE(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?c:d)}},10);return Fy(n.viewport,l),Fy(n.content,l),A.jsx(To,{present:i||a,children:A.jsx(Ej,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Ej=S.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,r=id(mf,e.__scopeScrollArea),a=S.useRef(null),o=S.useRef(0),[s,l]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=$oe(s.viewport,s.content),d={...i,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function u(m,h){return b3e(m,o.current,s,h)}return n==="horizontal"?A.jsx(h3e,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const m=r.viewport.scrollLeft,h=qz(m,s,r.dir);a.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollLeft=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollLeft=u(m,r.dir))}}):n==="vertical"?A.jsx(p3e,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const m=r.viewport.scrollTop,h=qz(m,s);a.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollTop=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollTop=u(m))}}):null}),h3e=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...r}=e,a=id(mf,e.__scopeScrollArea),[o,s]=S.useState(),l=S.useRef(null),c=ui(t,l,a.onScrollbarXChange);return S.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),A.jsx(joe,{"data-orientation":"horizontal",...r,ref:c,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bE(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Qoe(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&i({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:FC(o.paddingLeft),paddingEnd:FC(o.paddingRight)}})}})}),p3e=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...r}=e,a=id(mf,e.__scopeScrollArea),[o,s]=S.useState(),l=S.useRef(null),c=ui(t,l,a.onScrollbarYChange);return S.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),A.jsx(joe,{"data-orientation":"vertical",...r,ref:c,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bE(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Qoe(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&i({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:FC(o.paddingTop),paddingEnd:FC(o.paddingBottom)}})}})}),[g3e,Roe]=Boe(mf),joe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:r,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:u,...m}=e,h=id(mf,n),[v,g]=S.useState(null),k=ui(t,I=>g(I)),b=S.useRef(null),w=S.useRef(""),C=h.viewport,N=i.content-i.viewport,_=Vo(d),F=Vo(l),B=kE(u,10);function T(I){if(b.current){const $=I.clientX-b.current.left,j=I.clientY-b.current.top;c({x:$,y:j})}}return S.useEffect(()=>{const I=$=>{const j=$.target;v?.contains(j)&&_($,N)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[C,v,N,_]),S.useEffect(F,[i,F]),Fy(v,B),Fy(h.content,B),A.jsx(g3e,{scope:n,scrollbar:v,hasThumb:r,onThumbChange:Vo(a),onThumbPointerUp:Vo(o),onThumbPositionChange:F,onThumbPointerDown:Vo(s),children:A.jsx(sn.div,{...m,ref:k,style:{position:"absolute",...m.style},onPointerDown:Kt(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),b.current=v.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(I))}),onPointerMove:Kt(e.onPointerMove,T),onPointerUp:Kt(e.onPointerUp,I=>{const $=I.target;$.hasPointerCapture(I.pointerId)&&$.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),_C="ScrollAreaThumb",Moe=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=Roe(_C,e.__scopeScrollArea);return A.jsx(To,{present:n||r.hasThumb,children:A.jsx(v3e,{ref:t,...i})})}),v3e=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...r}=e,a=id(_C,n),o=Roe(_C,n),{onThumbPositionChange:s}=o,l=ui(t,u=>o.onThumbChange(u)),c=S.useRef(void 0),d=kE(()=>{c.current&&(c.current(),c.current=void 0)},100);return S.useEffect(()=>{const u=a.viewport;if(u){const m=()=>{if(d(),!c.current){const h=k3e(u,s);c.current=h,s()}};return s(),u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[a.viewport,d,s]),A.jsx(sn.div,{"data-state":o.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Kt(e.onPointerDownCapture,u=>{const h=u.target.getBoundingClientRect(),v=u.clientX-h.left,g=u.clientY-h.top;o.onThumbPointerDown({x:v,y:g})}),onPointerUp:Kt(e.onPointerUp,o.onThumbPointerUp)})});Moe.displayName=_C;var Bj="ScrollAreaCorner",Loe=S.forwardRef((e,t)=>{const n=id(Bj,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?A.jsx(y3e,{...e,ref:t}):null});Loe.displayName=Bj;var y3e=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,r=id(Bj,n),[a,o]=S.useState(0),[s,l]=S.useState(0),c=!!(a&&s);return Fy(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),Fy(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),o(d)}),c?A.jsx(sn.div,{...i,ref:t,style:{width:a,height:s,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function FC(e){return e?parseInt(e,10):0}function $oe(e,t){const n=e/t;return isNaN(n)?0:n}function bE(e){const t=$oe(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function b3e(e,t,n,i="ltr"){const r=bE(n),a=r/2,o=t||a,s=r-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,u=i==="ltr"?[0,d]:[d*-1,0];return Uoe([l,c],u)(e)}function qz(e,t,n="ltr"){const i=bE(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-r,o=t.content-t.viewport,s=a-i,l=n==="ltr"?[0,o]:[o*-1,0],c=fR(e,l);return Uoe([0,o],[0,s])(c)}function Uoe(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function Qoe(e,t){return e>0&&e<t}var k3e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)};function kE(e,t){const n=Vo(e),i=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(i.current),[]),S.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function Fy(e,t){const n=Vo(t);Ya(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e,n])}var w3e=Doe,S3e=Ioe,x3e=Loe;function Hoe({className:e,children:t,...n}){return A.jsxs(w3e,{"data-slot":"scroll-area",className:Ft("relative",e),...n,children:[A.jsx(S3e,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-gray-950/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 dark:focus-visible:ring-gray-300/50",children:t}),A.jsx(N3e,{}),A.jsx(x3e,{})]})}function N3e({className:e,orientation:t="vertical",...n}){return A.jsx(Ooe,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ft("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:A.jsx(Moe,{"data-slot":"scroll-area-thumb",className:"bg-gray-200 relative flex-1 rounded-full dark:bg-gray-800"})})}var zoe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C3e="VisuallyHidden",Voe=S.forwardRef((e,t)=>A.jsx(sn.span,{...e,ref:t,style:{...zoe,...e.style}}));Voe.displayName=C3e;var _3e=Voe,[wE]=Bs("Tooltip",[rh]),SE=rh(),Goe="TooltipProvider",F3e=700,AR="tooltip.open",[E3e,Dj]=wE(Goe),qoe=e=>{const{__scopeTooltip:t,delayDuration:n=F3e,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),l=S.useRef(0);return S.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),A.jsx(E3e,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i)},[i]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(c=>{s.current=c},[]),disableHoverableContent:r,children:a})};qoe.displayName=Goe;var jk="Tooltip",[B3e,E1]=wE(jk),Koe=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:r,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=Dj(jk,e.__scopeTooltip),c=SE(t),[d,u]=S.useState(null),m=Bo(),h=S.useRef(0),v=o??l.disableHoverableContent,g=s??l.delayDuration,k=S.useRef(!1),[b,w]=Kd({prop:i,defaultProp:r??!1,onChange:B=>{B?(l.onOpen(),document.dispatchEvent(new CustomEvent(AR))):l.onClose(),a?.(B)},caller:jk}),C=S.useMemo(()=>b?k.current?"delayed-open":"instant-open":"closed",[b]),N=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,w(!0)},[w]),_=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),F=S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,w(!0),h.current=0},g)},[g,w]);return S.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),A.jsx(AE,{...c,children:A.jsx(B3e,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{l.isOpenDelayedRef.current?F():N()},[l.isOpenDelayedRef,F,N]),onTriggerLeave:S.useCallback(()=>{v?_():(window.clearTimeout(h.current),h.current=0)},[_,v]),onOpen:N,onClose:_,disableHoverableContent:v,children:n})})};Koe.displayName=jk;var mR="TooltipTrigger",Woe=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=E1(mR,n),a=Dj(mR,n),o=SE(n),s=S.useRef(null),l=ui(t,s,r.onTriggerChange),c=S.useRef(!1),d=S.useRef(!1),u=S.useCallback(()=>c.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),A.jsx(N1,{asChild:!0,...o,children:A.jsx(sn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:Kt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:Kt(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:Kt(e.onPointerDown,()=>{r.open&&r.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Kt(e.onFocus,()=>{c.current||r.onOpen()}),onBlur:Kt(e.onBlur,r.onClose),onClick:Kt(e.onClick,r.onClose)})})});Woe.displayName=mR;var Tj="TooltipPortal",[D3e,T3e]=wE(Tj,{forceMount:void 0}),Yoe=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,a=E1(Tj,t);return A.jsx(D3e,{scope:t,forceMount:n,children:A.jsx(To,{present:n||a.open,children:A.jsx(Yy,{asChild:!0,container:r,children:i})})})};Yoe.displayName=Tj;var Ey="TooltipContent",Xoe=S.forwardRef((e,t)=>{const n=T3e(Ey,e.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...a}=e,o=E1(Ey,e.__scopeTooltip);return A.jsx(To,{present:i||o.open,children:o.disableHoverableContent?A.jsx(Zoe,{side:r,...a,ref:t}):A.jsx(I3e,{side:r,...a,ref:t})})}),I3e=S.forwardRef((e,t)=>{const n=E1(Ey,e.__scopeTooltip),i=Dj(Ey,e.__scopeTooltip),r=S.useRef(null),a=ui(t,r),[o,s]=S.useState(null),{trigger:l,onClose:c}=n,d=r.current,{onPointerInTransitChange:u}=i,m=S.useCallback(()=>{s(null),u(!1)},[u]),h=S.useCallback((v,g)=>{const k=v.currentTarget,b={x:v.clientX,y:v.clientY},w=j3e(b,k.getBoundingClientRect()),C=M3e(b,w),N=L3e(g.getBoundingClientRect()),_=U3e([...C,...N]);s(_),u(!0)},[u]);return S.useEffect(()=>()=>m(),[m]),S.useEffect(()=>{if(l&&d){const v=k=>h(k,d),g=k=>h(k,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,h,m]),S.useEffect(()=>{if(o){const v=g=>{const k=g.target,b={x:g.clientX,y:g.clientY},w=l?.contains(k)||d?.contains(k),C=!$3e(b,o);w?m():C&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,o,c,m]),A.jsx(Zoe,{...e,ref:a})}),[O3e,P3e]=wE(jk,{isInside:!1}),R3e=TEe("TooltipContent"),Zoe=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=E1(Ey,n),c=SE(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(AR,d),()=>document.removeEventListener(AR,d)),[d]),S.useEffect(()=>{if(l.trigger){const u=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:A.jsxs(mE,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[A.jsx(R3e,{children:i}),A.jsx(O3e,{scope:n,isInside:!0,children:A.jsx(_3e,{id:l.contentId,role:"tooltip",children:r||i})})]})})});Xoe.displayName=Ey;var Joe="TooltipArrow",ese=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=SE(n);return P3e(Joe,n).isInside?null:A.jsx(hE,{...r,...i,ref:t})});ese.displayName=Joe;function j3e(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,i,r,a)){case a:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function M3e(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function L3e(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function $3e(e,t){const{x:n,y:i}=e;let r=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,d=s.y,u=l.x,m=l.y;d>i!=m>i&&n<(u-c)*(i-d)/(m-d)+c&&(r=!r)}return r}function U3e(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),Q3e(t)}function Q3e(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const r=e[i];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(r.y-o.y)>=(a.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(r.y-o.y)>=(a.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var H3e=qoe,z3e=Koe,V3e=Woe,G3e=Yoe,q3e=Xoe,K3e=ese;function xE({delayDuration:e=0,...t}){return A.jsx(H3e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function i0({...e}){return A.jsx(xE,{children:A.jsx(z3e,{"data-slot":"tooltip",...e})})}function r0({...e}){return A.jsx(V3e,{"data-slot":"tooltip-trigger",...e})}function a0({className:e,sideOffset:t=0,children:n,...i}){return A.jsx(G3e,{children:A.jsxs(q3e,{"data-slot":"tooltip-content",sideOffset:t,className:Ft("bg-gray-900 text-gray-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-1001 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance dark:bg-gray-50 dark:text-gray-900",e),...i,children:[n,A.jsx(K3e,{className:"bg-gray-900 fill-primary z-1001 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] dark:bg-gray-50"})]})})}function tse({links:e,isCollapsed:t,closeNav:n}){const i=({sub:r,...a})=>{const o=`${a.title}-${a.href}`;return t&&r?S.createElement(X3e,{...a,sub:r,key:o,closeNav:n}):t?S.createElement(Y3e,{...a,key:o,closeNav:n}):r?S.createElement(W3e,{...a,sub:r,key:o,closeNav:n}):S.createElement(nse,{...a,key:o,closeNav:n})};return A.jsx(Hoe,{className:"h-screen pb-40",children:A.jsx(xE,{delayDuration:0,children:A.jsx("nav",{className:"grid grid-cols-1 items-start gap-2",children:e.map(i)})})})}function nse({title:e,icon:t,label:n,href:i,action:r,closeNav:a,subLink:o=!1}){return r?A.jsxs("button",{onClick:()=>{r(),a()},className:Ft(NA({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6 w-full",o&&"h-10 w-full border-l border-l-slate-500 px-2"),children:[A.jsx("div",{className:"mr-2",children:t}),e,n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]}):A.jsxs(qr,{to:i,onClick:a,className:Ft(NA({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":"page",children:[A.jsx("div",{className:"mr-2",children:t}),e,n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]})}function W3e({title:e,icon:t,label:n,sub:i,closeNav:r}){const a=!!i?.find(o=>o.href===window.location.pathname);return A.jsxs(bOe,{defaultOpen:a,children:[A.jsxs(kOe,{className:Ft(NA({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[A.jsx("div",{className:"mr-2",children:t}),A.jsx("div",{className:"font-semibold tracking-tight",children:e}),n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n}),A.jsx("span",{className:Ft('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:A.jsx(Ti,{})})]}),A.jsx(wOe,{className:"collapsibleDropdown",asChild:!0,children:A.jsx("ul",{children:i.map(o=>A.jsx("li",{className:"my-1 ml-8",children:A.jsx(nse,{...o,subLink:!0,closeNav:r})},o.title))})})]})}function Y3e({title:e,icon:t,label:n,href:i,action:r}){return A.jsxs(i0,{delayDuration:0,children:[A.jsx(r0,{asChild:!0,children:r?A.jsxs(bt,{variant:"ghost",size:"icon",className:"h-12 w-12",onClick:r,children:[t,A.jsx("span",{className:"sr-only",children:e})]}):A.jsxs(qr,{to:i,className:Ft(NA({variant:"ghost",size:"icon"}),"h-12 w-12"),children:[t,A.jsx("span",{className:"sr-only",children:e})]})}),A.jsxs(a0,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e,n&&A.jsx("span",{className:"ml-auto text-muted-foreground",children:n})]})]})}function X3e({title:e,icon:t,label:n,sub:i}){const r=!!i?.find(a=>a.href===window.location.pathname);return A.jsxs(Noe,{children:[A.jsxs(i0,{delayDuration:0,children:[A.jsx(r0,{asChild:!0,children:A.jsx(Coe,{asChild:!0,children:A.jsx(bt,{variant:r?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),A.jsxs(a0,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e," ",n&&A.jsx("span",{className:"ml-auto text-muted-foreground",children:n}),A.jsx(Ti,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),A.jsxs(_oe,{side:"right",align:"start",sideOffset:4,children:[A.jsxs(Foe,{children:[e," ",n?`(${n})`:""]}),A.jsx(Eoe,{}),i.map(({title:a,icon:o,label:s,href:l,action:c})=>A.jsx(Wb,{asChild:!c,children:c?A.jsxs("button",{onClick:c,className:Ft(NA({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6 w-full"),children:[o," ",A.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&A.jsx("span",{className:"ml-auto text-xs",children:s})]}):A.jsxs(qr,{to:l,className:Ft(NA({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6"),children:[o," ",A.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&A.jsx("span",{className:"ml-auto text-xs",children:s})]})},`${a}-${l||a}`))]})]})}const EC=[{title:"Charges",label:"",href:"",icon:A.jsx(ty,{size:18}),sub:[{title:"All Charges",label:"",href:ki.CHARGES.ALL,icon:A.jsx(ty,{size:18})},{title:"Missing Info Charges",label:"",href:ki.CHARGES.MISSING_INFO,icon:A.jsx(kFe,{size:18})},{title:"Ledger Validation",label:"",href:ki.CHARGES.LEDGER_VALIDATION,icon:A.jsx(z_e,{size:18})}]},{title:"Reports",label:"",href:"",icon:A.jsx(vFe,{size:18}),sub:[{title:"VAT Monthly Report",label:"",href:ki.REPORTS.VAT_MONTHLY,icon:A.jsx(ty,{size:18})},{title:"Trial Balance Report",label:"",href:ki.REPORTS.TRIAL_BALANCE,icon:A.jsx(oie,{size:18})},{title:"Conto Report",label:"",href:ki.REPORTS.CONTO,icon:A.jsx(pFe,{size:18})},{title:"Profit and Loss Report",label:"",href:ki.REPORTS.PROFIT_AND_LOSS(),icon:A.jsx(GP,{size:18})},{title:"Tax Report",label:"",href:ki.REPORTS.TAX(),icon:A.jsx(K9,{size:18})},{title:"Corporate Tax Ruling Compliance Report",label:"",href:ki.REPORTS.CORPORATE_TAX_RULING_COMPLIANCE(),icon:A.jsx(K9,{size:18})},{title:"Depreciation Report",label:"",href:ki.REPORTS.DEPRECIATION,icon:A.jsx(J_e,{size:18})},{title:"Shaam 6111 Report",label:"",href:ki.REPORTS.SHAAM_6111,icon:A.jsx(GP,{size:18})},{title:"Accountant Approvals",label:"",href:ki.ACCOUNTANT_APPROVALS,icon:A.jsx(W_e,{size:18})},{title:"Yearly Ledger Report",label:"",href:ki.REPORTS.YEARLY_LEDGER,icon:A.jsx(CFe,{size:18})},{title:"Transactions Balance",label:"",href:ki.REPORTS.BALANCE,icon:A.jsx(t2e,{size:18})},{title:"Validate Reports",label:"",href:ki.REPORTS.VALIDATE_REPORTS,icon:A.jsx(i2e,{size:18})},{title:"Generate Uniform Files",label:"",icon:A.jsx(Jne,{size:18})}]},{title:"Financial Entities",label:"",href:"",icon:A.jsx(z2e,{size:18}),sub:[{title:"Businesses",label:"",href:ki.BUSINESSES.ALL,icon:A.jsx(_2e,{size:18})},{title:"Business Transactions",label:"",href:ki.BUSINESSES.TRANSACTIONS,icon:A.jsx(j_e,{size:18})},{title:"Tax Categories",label:"",href:ki.TAX_CATEGORIES,icon:A.jsx(I_e,{size:18})},{title:"Sort Codes",label:"",href:ki.SORT_CODES,icon:A.jsx(G_e,{size:18})}]},{title:"Documents",label:"",href:"",icon:A.jsx(q9,{size:18}),sub:[{href:ki.DOCUMENTS.ALL,title:"All Documents",label:"",icon:A.jsx(q9,{size:18})},{title:"Issue Documents",label:"",href:ki.DOCUMENTS.ISSUE_DOCUMENTS,icon:A.jsx(H9,{size:18})},{title:"Issue Document",label:"",href:ki.DOCUMENTS.ISSUE_DOCUMENT,icon:A.jsx(H9,{size:18})}]},{href:ki.BUSINESS_TRIPS.ALL,title:"Business Trips",label:"",icon:A.jsx(uFe,{size:18})},{title:"Charts",label:"",href:"",icon:A.jsx(PD,{size:18}),sub:[{title:"Main",label:"",href:ki.CHARTS.MAIN,icon:A.jsx(PD,{size:18})},{title:"Monthly Income/Expense",label:"",href:ki.CHARTS.MONTHLY_INCOME_EXPENSE,icon:A.jsx(PD,{size:18})}]},{href:ki.SALARIES,title:"Salaries",label:"",icon:A.jsx(U_e,{size:18})},{href:ki.TAGS,title:"Tags",label:"",icon:A.jsx(OFe,{size:18})}];function Z3e(){const[e,t]=S.useState(!1),[n,i]=S.useState(!1),r=EC.map(a=>a.sub?{...a,sub:a.sub.map(o=>o.title==="Generate Uniform Files"?{...o,action:()=>{t(!1),i(!0)}}:o)}:a);return A.jsxs(A.Fragment,{children:[A.jsxs(uOe,{open:e,onOpenChange:t,children:[A.jsx(fOe,{asChild:!0,children:A.jsx(nFe,{})}),A.jsx(hOe,{side:"left",className:"px-0!",children:A.jsx("div",{className:"space-y-4 py-4",children:A.jsxs("div",{className:"px-3 py-2",children:[A.jsx("h2",{className:"mb-2 px-4 text-lg font-semibold tracking-tight",children:"Overview"}),A.jsx("div",{className:"space-y-1",children:A.jsx(tse,{isCollapsed:!1,links:r,closeNav:()=>t(!1)})})]})})})]}),A.jsx(sae,{open:n,onOpenChange:i})]})}function BC(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function J3e(e,t,n){for(let i=e-1;i>=0;i-=1)if(!t[i].disabled)return i;if(n){for(let i=t.length-1;i>-1;i-=1)if(!t[i].disabled)return i}return e}function e6e(e,t,n){for(let i=e+1;i<t.length;i+=1)if(!t[i].disabled)return i;if(n){for(let i=0;i<t.length;i+=1)if(!t[i].disabled)return i}return e}function t6e(e,t,n){return BC(e,n)===BC(t,n)}function ise({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:i=!0,activateOnFocus:r=!1,dir:a="rtl",orientation:o}){return s=>{var l;n?.(s);const c=Array.from(((l=BC(s.currentTarget,e))==null?void 0:l.querySelectorAll(t))||[]).filter(h=>t6e(s.currentTarget,h,e)),d=c.findIndex(h=>s.currentTarget===h),u=e6e(d,c,i),m=J3e(d,c,i);switch(s.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{s.stopPropagation(),s.preventDefault(),c[m].focus(),r&&c[m].click();break}case"ArrowDown":{s.stopPropagation(),s.preventDefault(),c[u].focus(),r&&c[u].click();break}case"Home":{s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const h=c.length-1;!c[h].disabled&&c[h].focus();break}}}}function n6e(e,t,n){var i;return n?Array.from(((i=BC(n,t))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===n):null}function rd(e){const t=S.createContext(null);return[({children:r,value:a})=>V.createElement(t.Provider,{value:a},r),()=>{const r=S.useContext(t);if(r===null)throw new Error(e);return r}]}function rse(e){return Array.isArray(e)?e:[e]}function Kz(e,t){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(t);return`${e}-${n}`}}const i6e=()=>{};function r6e(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||i6e:n=>{var i;n.key==="Escape"&&(e(n),(i=t.onTrigger)==null||i.call(t))}}function ic(e,t){return n=>{e?.(n),t?.(n)}}function a6e(){const[e,t]=S.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function ase({data:e}){const t=[],n=[],i=e.reduce((r,a,o)=>(a.group?r[a.group]?r[a.group].push(o):r[a.group]=[o]:n.push(o),r),{});return Object.keys(i).forEach(r=>{t.push(...i[r].map(a=>e[a]))}),t.push(...n.map(r=>e[r])),t}function o0(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==V.Fragment:!1}function ose(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ose(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function sse(){for(var e=0,t,n,i="";e<arguments.length;)(t=arguments[e++])&&(n=ose(t))&&(i&&(i+=" "),i+=n);return i}const o6e={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function s6e(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var l6e=Object.defineProperty,Wz=Object.getOwnPropertySymbols,c6e=Object.prototype.hasOwnProperty,d6e=Object.prototype.propertyIsEnumerable,Yz=(e,t,n)=>t in e?l6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xz=(e,t)=>{for(var n in t||(t={}))c6e.call(t,n)&&Yz(e,n,t[n]);if(Wz)for(var n of Wz(t))d6e.call(t,n)&&Yz(e,n,t[n]);return e};function u6e(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:Xz({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:Xz({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function B1(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function Ij(e){const t=B1(e);return(n,i,r=!0,a=!0)=>{if(typeof n=="string"&&n.includes(".")){const[s,l]=n.split("."),c=parseInt(l,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof i=="number"&&!a?i:c]}const o=typeof i=="number"?i:t();return n in e.colors?e.colors[n][o]:r?e.colors[e.primaryColor][o]:n}}function lse(e){let t="";for(let n=1;n<e.length-1;n+=1)t+=`${e[n]} ${n/(e.length-1)*100}%, `;return`${e[0]} 0%, ${t}${e[e.length-1]} 100%`}function f6e(e,...t){return`linear-gradient(${e}deg, ${lse(t)})`}function A6e(...e){return`radial-gradient(circle, ${lse(e)})`}function cse(e){const t=Ij(e),n=B1(e);return i=>{const r={from:i?.from||e.defaultGradient.from,to:i?.to||e.defaultGradient.to,deg:i?.deg||e.defaultGradient.deg};return`linear-gradient(${r.deg}deg, ${t(r.from,n(),!1)} 0%, ${t(r.to,n(),!1)} 100%)`}}function dse(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const n=t.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${e}`}return t}}const Ge=dse("rem"),s0=dse("em");function Dt({size:e,sizes:t,units:n}){return e in t?t[e]:typeof e=="number"?n==="em"?s0(e):Ge(e):e||t.md}function Jd(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function m6e(e){return t=>`@media (min-width: ${s0(Jd(Dt({size:t,sizes:e.breakpoints})))})`}function h6e(e){return t=>`@media (max-width: ${s0(Jd(Dt({size:t,sizes:e.breakpoints}))-1)})`}function p6e(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function g6e(e){let t=e.replace("#","");if(t.length===3){const o=t.split("");t=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}const n=parseInt(t,16),i=n>>16&255,r=n>>8&255,a=n&255;return{r:i,g:r,b:a,a:1}}function v6e(e){const[t,n,i,r]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:n,b:i,a:r||1}}function Oj(e){return p6e(e)?g6e(e):e.startsWith("rgb")?v6e(e):{r:0,g:0,b:0,a:1}}function Ov(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r:n,g:i,b:r}=Oj(e);return`rgba(${n}, ${i}, ${r}, ${t})`}function y6e(e=0){return{position:"absolute",top:Ge(e),right:Ge(e),left:Ge(e),bottom:Ge(e)}}function b6e(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:i,b:r,a}=Oj(e),o=1-t,s=l=>Math.round(l*o);return`rgba(${s(n)}, ${s(i)}, ${s(r)}, ${a})`}function k6e(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:i,b:r,a}=Oj(e),o=s=>Math.round(s+(255-s)*t);return`rgba(${o(n)}, ${o(i)}, ${o(r)}, ${a})`}function w6e(e){return t=>{if(typeof t=="number")return Ge(t);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function S6e(e,t){if(typeof e=="string"&&e.includes(".")){const[n,i]=e.split("."),r=parseInt(i,10);if(n in t.colors&&r>=0&&r<10)return{isSplittedColor:!0,key:n,shade:r}}return{isSplittedColor:!1}}function x6e(e){const t=Ij(e),n=B1(e),i=cse(e);return({variant:r,color:a,gradient:o,primaryFallback:s})=>{const l=S6e(a,e);switch(r){case"light":return{border:"transparent",background:Ov(t(a,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),hover:Ov(t(a,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),hover:Ov(t(a,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(a,e.colorScheme==="dark"?5:n("light")),background:"transparent",color:t(a,e.colorScheme==="dark"?5:n("light")),hover:e.colorScheme==="dark"?Ov(t(a,5,s,!1),.05):Ov(t(a,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(a,n()),hover:null};case"transparent":return{border:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:i(o),color:e.white,border:"transparent",hover:null};default:{const c=n(),d=l.isSplittedColor?l.shade:c,u=l.isSplittedColor?l.key:a;return{border:"transparent",background:t(u,d,s),color:e.white,hover:t(u,d===9?8:d+1)}}}}}function N6e(e){return t=>{const n=B1(e)(t);return e.colors[e.primaryColor][n]}}function C6e(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function _6e(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function F6e(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const No={fontStyles:s6e,themeColor:Ij,focusStyles:u6e,linearGradient:f6e,radialGradient:A6e,smallerThan:h6e,largerThan:m6e,rgba:Ov,cover:y6e,darken:b6e,lighten:k6e,radius:w6e,variant:x6e,primaryShade:B1,hover:C6e,gradient:cse,primaryColor:N6e,placeholderStyles:_6e,dimmed:F6e};var E6e=Object.defineProperty,B6e=Object.defineProperties,D6e=Object.getOwnPropertyDescriptors,Zz=Object.getOwnPropertySymbols,T6e=Object.prototype.hasOwnProperty,I6e=Object.prototype.propertyIsEnumerable,Jz=(e,t,n)=>t in e?E6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O6e=(e,t)=>{for(var n in t||(t={}))T6e.call(t,n)&&Jz(e,n,t[n]);if(Zz)for(var n of Zz(t))I6e.call(t,n)&&Jz(e,n,t[n]);return e},P6e=(e,t)=>B6e(e,D6e(t));function use(e){return P6e(O6e({},e),{fn:{fontStyles:No.fontStyles(e),themeColor:No.themeColor(e),focusStyles:No.focusStyles(e),largerThan:No.largerThan(e),smallerThan:No.smallerThan(e),radialGradient:No.radialGradient,linearGradient:No.linearGradient,gradient:No.gradient(e),rgba:No.rgba,cover:No.cover,lighten:No.lighten,darken:No.darken,primaryShade:No.primaryShade(e),radius:No.radius(e),variant:No.variant(e),hover:No.hover,primaryColor:No.primaryColor(e),placeholderStyles:No.placeholderStyles(e),dimmed:No.dimmed(e)}})}const fse=["xs","sm","md","lg","xl"],R6e={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:o6e,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},Pj=use(R6e);function j6e(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function M6e(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var L6e=(function(){function e(n){var i=this;this._insertTag=function(r){var a;i.tags.length===0?i.insertionPoint?a=i.insertionPoint.nextSibling:i.prepend?a=i.container.firstChild:a=i.before:a=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,a),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(i){i.forEach(this._insertTag)},t.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(M6e(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=j6e(r);try{a.insertRule(i,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},t.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},e})(),Ns="-ms-",DC="-moz-",nr="-webkit-",Ase="comm",Rj="rule",jj="decl",$6e="@import",mse="@keyframes",U6e="@layer",Q6e=Math.abs,NE=String.fromCharCode,H6e=Object.assign;function z6e(e,t){return as(e,0)^45?(((t<<2^as(e,0))<<2^as(e,1))<<2^as(e,2))<<2^as(e,3):0}function hse(e){return e.trim()}function V6e(e,t){return(e=t.exec(e))?e[0]:e}function ir(e,t,n){return e.replace(t,n)}function hR(e,t){return e.indexOf(t)}function as(e,t){return e.charCodeAt(t)|0}function Mk(e,t,n){return e.slice(t,n)}function Vu(e){return e.length}function Mj(e){return e.length}function MS(e,t){return t.push(e),e}function G6e(e,t){return e.map(t).join("")}var CE=1,By=1,pse=0,Bl=0,lo=0,l0="";function _E(e,t,n,i,r,a,o){return{value:e,root:t,parent:n,type:i,props:r,children:a,line:CE,column:By,length:o,return:""}}function gb(e,t){return H6e(_E("",null,null,"",null,null,0),e,{length:-e.length},t)}function q6e(){return lo}function K6e(){return lo=Bl>0?as(l0,--Bl):0,By--,lo===10&&(By=1,CE--),lo}function sc(){return lo=Bl<pse?as(l0,Bl++):0,By++,lo===10&&(By=1,CE++),lo}function tf(){return as(l0,Bl)}function IN(){return Bl}function D1(e,t){return Mk(l0,e,t)}function Lk(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gse(e){return CE=By=1,pse=Vu(l0=e),Bl=0,[]}function vse(e){return l0="",e}function ON(e){return hse(D1(Bl-1,pR(e===91?e+2:e===40?e+1:e)))}function W6e(e){for(;(lo=tf())&&lo<33;)sc();return Lk(e)>2||Lk(lo)>3?"":" "}function Y6e(e,t){for(;--t&&sc()&&!(lo<48||lo>102||lo>57&&lo<65||lo>70&&lo<97););return D1(e,IN()+(t<6&&tf()==32&&sc()==32))}function pR(e){for(;sc();)switch(lo){case e:return Bl;case 34:case 39:e!==34&&e!==39&&pR(lo);break;case 40:e===41&&pR(e);break;case 92:sc();break}return Bl}function X6e(e,t){for(;sc()&&e+lo!==57;)if(e+lo===84&&tf()===47)break;return"/*"+D1(t,Bl-1)+"*"+NE(e===47?e:sc())}function Z6e(e){for(;!Lk(tf());)sc();return D1(e,Bl)}function J6e(e){return vse(PN("",null,null,null,[""],e=gse(e),0,[0],e))}function PN(e,t,n,i,r,a,o,s,l){for(var c=0,d=0,u=o,m=0,h=0,v=0,g=1,k=1,b=1,w=0,C="",N=r,_=a,F=i,B=C;k;)switch(v=w,w=sc()){case 40:if(v!=108&&as(B,u-1)==58){hR(B+=ir(ON(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:B+=ON(w);break;case 9:case 10:case 13:case 32:B+=W6e(v);break;case 92:B+=Y6e(IN()-1,7);continue;case 47:switch(tf()){case 42:case 47:MS(eje(X6e(sc(),IN()),t,n),l);break;default:B+="/"}break;case 123*g:s[c++]=Vu(B)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:k=0;case 59+d:b==-1&&(B=ir(B,/\f/g,"")),h>0&&Vu(B)-u&&MS(h>32?tV(B+";",i,n,u-1):tV(ir(B," ","")+";",i,n,u-2),l);break;case 59:B+=";";default:if(MS(F=eV(B,t,n,c,d,r,s,C,N=[],_=[],u),a),w===123)if(d===0)PN(B,t,F,F,N,a,u,s,_);else switch(m===99&&as(B,3)===110?100:m){case 100:case 108:case 109:case 115:PN(e,F,F,i&&MS(eV(e,F,F,0,0,r,s,C,r,N=[],u),_),r,_,u,s,i?N:_);break;default:PN(B,F,F,F,[""],_,0,s,_)}}c=d=h=0,g=b=1,C=B="",u=o;break;case 58:u=1+Vu(B),h=v;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&K6e()==125)continue}switch(B+=NE(w),w*g){case 38:b=d>0?1:(B+="\f",-1);break;case 44:s[c++]=(Vu(B)-1)*b,b=1;break;case 64:tf()===45&&(B+=ON(sc())),m=tf(),d=u=Vu(C=B+=Z6e(IN())),w++;break;case 45:v===45&&Vu(B)==2&&(g=0)}}return a}function eV(e,t,n,i,r,a,o,s,l,c,d){for(var u=r-1,m=r===0?a:[""],h=Mj(m),v=0,g=0,k=0;v<i;++v)for(var b=0,w=Mk(e,u+1,u=Q6e(g=o[v])),C=e;b<h;++b)(C=hse(g>0?m[b]+" "+w:ir(w,/&\f/g,m[b])))&&(l[k++]=C);return _E(e,t,n,r===0?Rj:s,l,c,d)}function eje(e,t,n){return _E(e,t,n,Ase,NE(q6e()),Mk(e,2,-2),0)}function tV(e,t,n,i){return _E(e,t,n,jj,Mk(e,0,i),Mk(e,i+1,-1),i)}function ay(e,t){for(var n="",i=Mj(e),r=0;r<i;r++)n+=t(e[r],r,e,t)||"";return n}function tje(e,t,n,i){switch(e.type){case U6e:if(e.children.length)break;case $6e:case jj:return e.return=e.return||e.value;case Ase:return"";case mse:return e.return=e.value+"{"+ay(e.children,i)+"}";case Rj:e.value=e.props.join(",")}return Vu(n=ay(e.children,i))?e.return=e.value+"{"+n+"}":""}function nje(e){var t=Mj(e);return function(n,i,r,a){for(var o="",s=0;s<t;s++)o+=e[s](n,i,r,a)||"";return o}}function ije(e){return function(t){t.root||(t=t.return)&&e(t)}}var nV=function(t){var n=new WeakMap;return function(i){if(n.has(i))return n.get(i);var r=t(i);return n.set(i,r),r}};function yse(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rje=function(t,n,i){for(var r=0,a=0;r=a,a=tf(),r===38&&a===12&&(n[i]=1),!Lk(a);)sc();return D1(t,Bl)},aje=function(t,n){var i=-1,r=44;do switch(Lk(r)){case 0:r===38&&tf()===12&&(n[i]=1),t[i]+=rje(Bl-1,n,i);break;case 2:t[i]+=ON(r);break;case 4:if(r===44){t[++i]=tf()===58?"&\f":"",n[i]=t[i].length;break}default:t[i]+=NE(r)}while(r=sc());return t},oje=function(t,n){return vse(aje(gse(t),n))},iV=new WeakMap,sje=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,i=t.parent,r=t.column===i.column&&t.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!iV.get(i))&&!r){iV.set(t,!0);for(var a=[],o=oje(n,a),s=i.props,l=0,c=0;l<o.length;l++)for(var d=0;d<s.length;d++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[d]):s[d]+" "+o[l]}}},lje=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function bse(e,t){switch(z6e(e,t)){case 5103:return nr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return nr+e+DC+e+Ns+e+e;case 6828:case 4268:return nr+e+Ns+e+e;case 6165:return nr+e+Ns+"flex-"+e+e;case 5187:return nr+e+ir(e,/(\w+).+(:[^]+)/,nr+"box-$1$2"+Ns+"flex-$1$2")+e;case 5443:return nr+e+Ns+"flex-item-"+ir(e,/flex-|-self/,"")+e;case 4675:return nr+e+Ns+"flex-line-pack"+ir(e,/align-content|flex-|-self/,"")+e;case 5548:return nr+e+Ns+ir(e,"shrink","negative")+e;case 5292:return nr+e+Ns+ir(e,"basis","preferred-size")+e;case 6060:return nr+"box-"+ir(e,"-grow","")+nr+e+Ns+ir(e,"grow","positive")+e;case 4554:return nr+ir(e,/([^-])(transform)/g,"$1"+nr+"$2")+e;case 6187:return ir(ir(ir(e,/(zoom-|grab)/,nr+"$1"),/(image-set)/,nr+"$1"),e,"")+e;case 5495:case 3959:return ir(e,/(image-set\([^]*)/,nr+"$1$`$1");case 4968:return ir(ir(e,/(.+:)(flex-)?(.*)/,nr+"box-pack:$3"+Ns+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nr+e+e;case 4095:case 3583:case 4068:case 2532:return ir(e,/(.+)-inline(.+)/,nr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vu(e)-1-t>6)switch(as(e,t+1)){case 109:if(as(e,t+4)!==45)break;case 102:return ir(e,/(.+:)(.+)-([^]+)/,"$1"+nr+"$2-$3$1"+DC+(as(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~hR(e,"stretch")?bse(ir(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(as(e,t+1)!==115)break;case 6444:switch(as(e,Vu(e)-3-(~hR(e,"!important")&&10))){case 107:return ir(e,":",":"+nr)+e;case 101:return ir(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nr+(as(e,14)===45?"inline-":"")+"box$3$1"+nr+"$2$3$1"+Ns+"$2box$3")+e}break;case 5936:switch(as(e,t+11)){case 114:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nr+e+Ns+e+e}return e}var cje=function(t,n,i,r){if(t.length>-1&&!t.return)switch(t.type){case jj:t.return=bse(t.value,t.length);break;case mse:return ay([gb(t,{value:ir(t.value,"@","@"+nr)})],r);case Rj:if(t.length)return G6e(t.props,function(a){switch(V6e(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ay([gb(t,{props:[ir(a,/:(read-\w+)/,":"+DC+"$1")]})],r);case"::placeholder":return ay([gb(t,{props:[ir(a,/:(plac\w+)/,":"+nr+"input-$1")]}),gb(t,{props:[ir(a,/:(plac\w+)/,":"+DC+"$1")]}),gb(t,{props:[ir(a,/:(plac\w+)/,Ns+"input-$1")]})],r)}return""})}},dje=[cje],kse=function(t){var n=t.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(g){var k=g.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=t.stylisPlugins||dje,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var k=g.getAttribute("data-emotion").split(" "),b=1;b<k.length;b++)a[k[b]]=!0;s.push(g)});var l,c=[sje,lje];{var d,u=[tje,ije(function(g){d.insert(g)})],m=nje(c.concat(r,u)),h=function(k){return ay(J6e(k),m)};l=function(k,b,w,C){d=w,h(k?k+"{"+b.styles+"}":b.styles),C&&(v.inserted[b.name]=!0)}}var v={key:n,sheet:new L6e({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return v.sheet.hydrate(s),v};function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Yr.apply(null,arguments)}var D4={exports:{}},dr={};/** @license React v16.13.1
|
|
577
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},iOe="DialogDescriptionWarning",rOe=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rae(iOe).contentName}}.`;return S.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},iE=zre,tj=Gre,rE=Kre,aE=Wre,oE=Yre,aOe=Zre,oOe=eae,aae=nae;function fc({...e}){return A.jsx(iE,{"data-slot":"dialog",...e})}function w1({...e}){return A.jsx(tj,{"data-slot":"dialog-trigger",...e})}function sOe({...e}){return A.jsx(rE,{"data-slot":"dialog-portal",...e})}function lOe({className:e,...t}){return A.jsx(aE,{"data-slot":"dialog-overlay",className:Ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function Ac({className:e,children:t,showCloseButton:n=!0,...i}){return A.jsxs(sOe,{"data-slot":"dialog-portal",children:[A.jsx(lOe,{}),A.jsxs(oE,{"data-slot":"dialog-content",className:Ft("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-1001 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-gray-200 p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-gray-950 dark:border-gray-800",e),...i,children:[t,n&&A.jsxs(aae,{"data-slot":"dialog-close",className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800 dark:data-[state=open]:text-gray-400",children:[A.jsx(bp,{}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function td({className:e,...t}){return A.jsx("div",{"data-slot":"dialog-header",className:Ft("flex flex-col gap-2 text-center sm:text-left",e),...t})}function e0({className:e,...t}){return A.jsx("div",{"data-slot":"dialog-footer",className:Ft("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function nd({className:e,...t}){return A.jsx(aOe,{"data-slot":"dialog-title",className:Ft("text-lg leading-none font-semibold",e),...t})}function nj({className:e,...t}){return A.jsx(oOe,{"data-slot":"dialog-description",className:Ft("text-gray-500 text-sm dark:text-gray-400",e),...t})}function Qn({className:e,type:t,...n}){return A.jsx("input",{type:t,"data-slot":"input",className:Ft("file:text-gray-950 placeholder:text-gray-500 selection:bg-gray-900 selection:text-gray-50 dark:bg-gray-200/30 border-gray-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:file:text-gray-50 dark:placeholder:text-gray-400 dark:selection:bg-gray-50 dark:selection:text-gray-900 dark:dark:bg-gray-800/30 dark:border-gray-800","focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50","aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...n})}var cOe="Label",oae=S.forwardRef((e,t)=>A.jsx(sn.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));oae.displayName=cOe;var dOe=oae;function xn({className:e,...t}){return A.jsx(dOe,{"data-slot":"label",className:Ft("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function sae({open:e,onOpenChange:t}){const n=l5e(new Date),i=Qi(D6(n),"yyyy-MM-dd"),r=Qi(Bie(n),"yyyy-MM-dd"),[a,o]=S.useState(i),[s,l]=S.useState(r),[c,d]=S.useState(!1),[u,m]=S.useState(""),[h,v]=lr({pause:!0,query:$Te,variables:{fromDate:a,toDate:s}});S.useEffect(()=>{if(c&&!h.fetching){if(h.error){m("Failed to fetch uniform format data. Please try again."),console.error("GraphQL error:",h.error),d(!1);return}if(h.data?.uniformFormat){const{bkmvdata:b,ini:w}=h.data.uniformFormat;if(!b||!w){m("Incomplete data received from the server. Please try again."),d(!1);return}const C=new File([new Uint8Array(az.encode(b,"ISO-8859-8"))],"bkmvdata.txt",{type:"text/plain"}),N=new File([new Uint8Array(az.encode(w,"ISO-8859-8"))],"ini.txt",{type:"text/plain"});wz(N),setTimeout(()=>wz(C),100),t(!1),o(i),l(r),d(!1)}else h.stale&&!h.data?.uniformFormat&&(m("No data returned from the server. Please try again."),d(!1))}},[h,c,a,s,i,r,t]);const g=async b=>{if(b.preventDefault(),m(""),!a||!s){m("Please select both from and to dates");return}const w=new Date(a),C=new Date(s);if(w>=C){m("From date must be before to date");return}if(C>new Date){m("To date cannot be in the future");return}d(!0);try{v({requestPolicy:"network-only"})}catch(N){m("Failed to generate files. Please try again."),console.error("Error generating files:",N),d(!1)}},k=b=>{c||(t(b),b||(o(i),l(r),m("")))};return A.jsx(fc,{open:e,onOpenChange:k,children:A.jsxs(Ac,{className:"sm:max-w-md",children:[A.jsxs(td,{children:[A.jsxs(nd,{className:"flex items-center gap-2",children:[A.jsx(sC,{className:"h-5 w-5"}),"Generate Uniform Files"]}),A.jsx(nj,{children:"Select the date range to generate and download uniform files."})]}),A.jsxs("form",{onSubmit:g,className:"space-y-4",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsxs("div",{className:"space-y-2",children:[A.jsx(xn,{htmlFor:"from-date",children:"From Date"}),A.jsx(Qn,{id:"from-date",type:"date",value:a,onChange:b=>o(b.target.value),disabled:c,required:!0})]}),A.jsxs("div",{className:"space-y-2",children:[A.jsx(xn,{htmlFor:"to-date",children:"To Date"}),A.jsx(Qn,{id:"to-date",type:"date",value:s,onChange:b=>l(b.target.value),disabled:c,required:!0})]})]}),u&&A.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-md",children:u}),A.jsxs(e0,{className:"gap-2",children:[A.jsx(bt,{type:"button",variant:"outline",onClick:()=>k(!1),disabled:c,children:"Cancel"}),A.jsx(bt,{type:"submit",disabled:c,className:"gap-2",children:c?A.jsxs(A.Fragment,{children:[A.jsx(wA,{className:"h-4 w-4 animate-spin"}),"Generating..."]}):A.jsxs(A.Fragment,{children:[A.jsx(Jne,{className:"h-4 w-4"}),"Generate & Download"]})})]})]})]})})}function uOe({...e}){return A.jsx(iE,{"data-slot":"sheet",...e})}function fOe({...e}){return A.jsx(tj,{"data-slot":"sheet-trigger",...e})}function AOe({...e}){return A.jsx(rE,{"data-slot":"sheet-portal",...e})}function mOe({className:e,...t}){return A.jsx(aE,{"data-slot":"sheet-overlay",className:Ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function hOe({className:e,children:t,side:n="right",...i}){return A.jsxs(AOe,{children:[A.jsx(mOe,{}),A.jsxs(oE,{"data-slot":"sheet-content",className:Ft("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-1001 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-gray-950",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...i,children:[t,A.jsxs(aae,{className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800",children:[A.jsx(bp,{className:"size-4"}),A.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}var sE="Collapsible",[pOe,zDt]=Bs(sE),[gOe,ij]=pOe(sE),lae=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:i,defaultOpen:r,disabled:a,onOpenChange:o,...s}=e,[l,c]=Kd({prop:i,defaultProp:r??!1,onChange:o,caller:sE});return A.jsx(gOe,{scope:n,disabled:a,contentId:Bo(),open:l,onOpenToggle:S.useCallback(()=>c(d=>!d),[c]),children:A.jsx(sn.div,{"data-state":sj(l),"data-disabled":a?"":void 0,...s,ref:t})})});lae.displayName=sE;var cae="CollapsibleTrigger",rj=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,...i}=e,r=ij(cae,n);return A.jsx(sn.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":sj(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...i,ref:t,onClick:Kt(e.onClick,r.onOpenToggle)})});rj.displayName=cae;var aj="CollapsibleContent",oj=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=ij(aj,e.__scopeCollapsible);return A.jsx(To,{present:n||r.open,children:({present:a})=>A.jsx(vOe,{...i,ref:t,present:a})})});oj.displayName=aj;var vOe=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:i,children:r,...a}=e,o=ij(aj,n),[s,l]=S.useState(i),c=S.useRef(null),d=ui(t,c),u=S.useRef(0),m=u.current,h=S.useRef(0),v=h.current,g=o.open||s,k=S.useRef(g),b=S.useRef(void 0);return S.useEffect(()=>{const w=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(w)},[]),Ya(()=>{const w=c.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();u.current=C.height,h.current=C.width,k.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(i)}},[o.open,i]),A.jsx(sn.div,{"data-state":sj(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&r})});function sj(e){return e?"open":"closed"}var yOe=lae,VDt=rj,GDt=oj;function bOe({...e}){return A.jsx(yOe,{"data-slot":"collapsible",...e})}function kOe({...e}){return A.jsx(rj,{"data-slot":"collapsible-trigger",...e})}function wOe({...e}){return A.jsx(oj,{"data-slot":"collapsible-content",...e})}function lj(e){const t=e+"CollectionProvider",[n,i]=Bs(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:k,children:b}=g,w=V.useRef(null),C=V.useRef(new Map).current;return A.jsx(r,{scope:k,itemMap:C,collectionRef:w,children:b})};o.displayName=t;const s=e+"CollectionSlot",l=Vm(s),c=V.forwardRef((g,k)=>{const{scope:b,children:w}=g,C=a(s,b),N=ui(k,C.collectionRef);return A.jsx(l,{ref:N,children:w})});c.displayName=s;const d=e+"CollectionItemSlot",u="data-radix-collection-item",m=Vm(d),h=V.forwardRef((g,k)=>{const{scope:b,children:w,...C}=g,N=V.useRef(null),_=ui(k,N),F=a(d,b);return V.useEffect(()=>(F.itemMap.set(N,{ref:N,...C}),()=>void F.itemMap.delete(N))),A.jsx(m,{[u]:"",ref:_,children:w})});h.displayName=d;function v(g){const k=a(e+"CollectionConsumer",g);return V.useCallback(()=>{const w=k.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(k.itemMap.values()).sort((F,B)=>C.indexOf(F.ref.current)-C.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},v,i]}var SOe=S.createContext(void 0);function S1(e){const t=S.useContext(SOe);return e||t||"ltr"}const xOe=["top","right","bottom","left"],Wd=Math.min,Es=Math.max,kC=Math.round,jS=Math.floor,ef=e=>({x:e,y:e}),NOe={left:"right",right:"left",bottom:"top",top:"bottom"},COe={start:"end",end:"start"};function sR(e,t,n){return Es(e,Wd(t,n))}function of(e,t){return typeof e=="function"?e(t):e}function Yd(e){return e.split("-")[0]}function t0(e){return e.split("-")[1]}function cj(e){return e==="x"?"y":"x"}function dj(e){return e==="y"?"height":"width"}const _Oe=new Set(["top","bottom"]);function Ud(e){return _Oe.has(Yd(e))?"y":"x"}function uj(e){return cj(Ud(e))}function FOe(e,t,n){n===void 0&&(n=!1);const i=t0(e),r=uj(e),a=dj(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=wC(o)),[o,wC(o)]}function EOe(e){const t=wC(e);return[lR(e),t,lR(t)]}function lR(e){return e.replace(/start|end/g,t=>COe[t])}const Rz=["left","right"],jz=["right","left"],BOe=["top","bottom"],DOe=["bottom","top"];function TOe(e,t,n){switch(e){case"top":case"bottom":return n?t?jz:Rz:t?Rz:jz;case"left":case"right":return t?BOe:DOe;default:return[]}}function IOe(e,t,n,i){const r=t0(e);let a=TOe(Yd(e),n==="start",i);return r&&(a=a.map(o=>o+"-"+r),t&&(a=a.concat(a.map(lR)))),a}function wC(e){return e.replace(/left|right|bottom|top/g,t=>NOe[t])}function OOe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fj(e){return typeof e!="number"?OOe(e):{top:e,right:e,bottom:e,left:e}}function Cy(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Mz(e,t,n){let{reference:i,floating:r}=e;const a=Ud(t),o=uj(t),s=dj(o),l=Yd(t),c=a==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,m=i[s]/2-r[s]/2;let h;switch(l){case"top":h={x:d,y:i.y-r.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-r.width,y:u};break;default:h={x:i.x,y:i.y}}switch(t0(t)){case"start":h[o]-=m*(n&&c?-1:1);break;case"end":h[o]+=m*(n&&c?-1:1);break}return h}const POe=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Mz(c,i,l),m=i,h={},v=0;for(let g=0;g<s.length;g++){const{name:k,fn:b}=s[g],{x:w,y:C,data:N,reset:_}=await b({x:d,y:u,initialPlacement:i,placement:m,strategy:r,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});d=w??d,u=C??u,h={...h,[k]:{...h[k],...N}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:d,y:u}=Mz(c,m,l)),g=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:h}};async function Ok(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=of(t,e),v=fj(h),k=s[m?u==="floating"?"reference":"floating":u],b=Cy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(k)))==null||n?k:k.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),N=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},_=Cy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:l}):w);return{top:(b.top-_.top+v.top)/N.y,bottom:(_.bottom-b.bottom+v.bottom)/N.y,left:(b.left-_.left+v.left)/N.x,right:(_.right-b.right+v.right)/N.x}}const ROe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=of(e,t)||{};if(c==null)return{};const u=fj(d),m={x:n,y:i},h=uj(r),v=dj(h),g=await o.getDimensions(c),k=h==="y",b=k?"top":"left",w=k?"bottom":"right",C=k?"clientHeight":"clientWidth",N=a.reference[v]+a.reference[h]-m[h]-a.floating[v],_=m[h]-a.reference[h],F=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let B=F?F[C]:0;(!B||!await(o.isElement==null?void 0:o.isElement(F)))&&(B=s.floating[C]||a.floating[v]);const T=N/2-_/2,I=B/2-g[v]/2-1,$=Wd(u[b],I),j=Wd(u[w],I),P=$,K=B-g[v]-j,q=B/2-g[v]/2+T,re=sR(P,q,K),U=!l.arrow&&t0(r)!=null&&q!==re&&a.reference[v]/2-(q<P?$:j)-g[v]/2<0,te=U?q<P?q-P:q-K:0;return{[h]:m[h]+te,data:{[h]:re,centerOffset:q-re-te,...U&&{alignmentOffset:te}},reset:U}}}),jOe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...k}=of(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Yd(r),w=Ud(s),C=Yd(s)===s,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=m||(C||!g?[wC(s)]:EOe(s)),F=v!=="none";!m&&F&&_.push(...IOe(s,g,v,N));const B=[s,..._],T=await Ok(t,k),I=[];let $=((i=a.flip)==null?void 0:i.overflows)||[];if(d&&I.push(T[b]),u){const q=FOe(r,o,N);I.push(T[q[0]],T[q[1]])}if($=[...$,{placement:r,overflows:I}],!I.every(q=>q<=0)){var j,P;const q=(((j=a.flip)==null?void 0:j.index)||0)+1,re=B[q];if(re&&(!(u==="alignment"?w!==Ud(re):!1)||$.every(W=>Ud(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:q,overflows:$},reset:{placement:re}};let U=(P=$.filter(te=>te.overflows[0]<=0).sort((te,W)=>te.overflows[1]-W.overflows[1])[0])==null?void 0:P.placement;if(!U)switch(h){case"bestFit":{var K;const te=(K=$.filter(W=>{if(F){const le=Ud(W.placement);return le===w||le==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(le=>le>0).reduce((le,be)=>le+be,0)]).sort((W,le)=>W[1]-le[1])[0])==null?void 0:K[0];te&&(U=te);break}case"initialPlacement":U=s;break}if(r!==U)return{reset:{placement:U}}}return{}}}};function Lz(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $z(e){return xOe.some(t=>e[t]>=0)}const MOe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...r}=of(e,t);switch(i){case"referenceHidden":{const a=await Ok(t,{...r,elementContext:"reference"}),o=Lz(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$z(o)}}}case"escaped":{const a=await Ok(t,{...r,altBoundary:!0}),o=Lz(a,n.floating);return{data:{escapedOffsets:o,escaped:$z(o)}}}default:return{}}}}};function dae(e){const t=Wd(...e.map(a=>a.left)),n=Wd(...e.map(a=>a.top)),i=Es(...e.map(a=>a.right)),r=Es(...e.map(a=>a.bottom));return{x:t,y:n,width:i-t,height:r-n}}function LOe(e){const t=e.slice().sort((r,a)=>r.y-a.y),n=[];let i=null;for(let r=0;r<t.length;r++){const a=t[r];!i||a.y-i.y>i.height/2?n.push([a]):n[n.length-1].push(a),i=a}return n.map(r=>Cy(dae(r)))}const $Oe=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:r,platform:a,strategy:o}=t,{padding:s=2,x:l,y:c}=of(e,t),d=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),u=LOe(d),m=Cy(dae(d)),h=fj(s);function v(){if(u.length===2&&u[0].left>u[1].right&&l!=null&&c!=null)return u.find(k=>l>k.left-h.left&&l<k.right+h.right&&c>k.top-h.top&&c<k.bottom+h.bottom)||m;if(u.length>=2){if(Ud(n)==="y"){const $=u[0],j=u[u.length-1],P=Yd(n)==="top",K=$.top,q=j.bottom,re=P?$.left:j.left,U=P?$.right:j.right,te=U-re,W=q-K;return{top:K,bottom:q,left:re,right:U,width:te,height:W,x:re,y:K}}const k=Yd(n)==="left",b=Es(...u.map($=>$.right)),w=Wd(...u.map($=>$.left)),C=u.filter($=>k?$.left===w:$.right===b),N=C[0].top,_=C[C.length-1].bottom,F=w,B=b,T=B-F,I=_-N;return{top:N,bottom:_,left:F,right:B,width:T,height:I,x:F,y:N}}return m}const g=await a.getElementRects({reference:{getBoundingClientRect:v},floating:i.floating,strategy:o});return r.reference.x!==g.reference.x||r.reference.y!==g.reference.y||r.reference.width!==g.reference.width||r.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},uae=new Set(["left","top"]);async function UOe(e,t){const{placement:n,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Yd(n),s=t0(n),l=Ud(n)==="y",c=uae.has(o)?-1:1,d=a&&l?-1:1,u=of(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(h=s==="end"?v*-1:v),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const QOe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:a,placement:o,middlewareData:s}=t,l=await UOe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:o}}}}},HOe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:k=>{let{x:b,y:w}=k;return{x:b,y:w}}},...l}=of(e,t),c={x:n,y:i},d=await Ok(t,l),u=Ud(Yd(r)),m=cj(u);let h=c[m],v=c[u];if(a){const k=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=h+d[k],C=h-d[b];h=sR(w,h,C)}if(o){const k=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=v+d[k],C=v-d[b];v=sR(w,v,C)}const g=s.fn({...t,[m]:h,[u]:v});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[m]:a,[u]:o}}}}}},zOe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=of(e,t),d={x:n,y:i},u=Ud(r),m=cj(u);let h=d[m],v=d[u];const g=of(s,t),k=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const C=m==="y"?"height":"width",N=a.reference[m]-a.floating[C]+k.mainAxis,_=a.reference[m]+a.reference[C]-k.mainAxis;h<N?h=N:h>_&&(h=_)}if(c){var b,w;const C=m==="y"?"width":"height",N=uae.has(Yd(r)),_=a.reference[u]-a.floating[C]+(N&&((b=o.offset)==null?void 0:b[u])||0)+(N?0:k.crossAxis),F=a.reference[u]+a.reference[C]+(N?0:((w=o.offset)==null?void 0:w[u])||0)-(N?k.crossAxis:0);v<_?v=_:v>F&&(v=F)}return{[m]:h,[u]:v}}}},VOe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=of(e,t),d=await Ok(t,c),u=Yd(r),m=t0(r),h=Ud(r)==="y",{width:v,height:g}=a.floating;let k,b;u==="top"||u==="bottom"?(k=u,b=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,k=m==="end"?"top":"bottom");const w=g-d.top-d.bottom,C=v-d.left-d.right,N=Wd(g-d[k],w),_=Wd(v-d[b],C),F=!t.middlewareData.shift;let B=N,T=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=C),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(B=w),F&&!m){const $=Es(d.left,0),j=Es(d.right,0),P=Es(d.top,0),K=Es(d.bottom,0);h?T=v-2*($!==0||j!==0?$+j:Es(d.left,d.right)):B=g-2*(P!==0||K!==0?P+K:Es(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:B});const I=await o.getDimensions(s.floating);return v!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function lE(){return typeof window<"u"}function n0(e){return fae(e)?(e.nodeName||"").toLowerCase():"#document"}function oc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Af(e){var t;return(t=(fae(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fae(e){return lE()?e instanceof Node||e instanceof oc(e).Node:!1}function Xd(e){return lE()?e instanceof Element||e instanceof oc(e).Element:!1}function sf(e){return lE()?e instanceof HTMLElement||e instanceof oc(e).HTMLElement:!1}function Uz(e){return!lE()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oc(e).ShadowRoot}const GOe=new Set(["inline","contents"]);function x1(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Zd(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!GOe.has(r)}const qOe=new Set(["table","td","th"]);function KOe(e){return qOe.has(n0(e))}const WOe=[":popover-open",":modal"];function cE(e){return WOe.some(t=>{try{return e.matches(t)}catch{return!1}})}const YOe=["transform","translate","scale","rotate","perspective"],XOe=["transform","translate","scale","rotate","perspective","filter"],ZOe=["paint","layout","strict","content"];function Aj(e){const t=mj(),n=Xd(e)?Zd(e):e;return YOe.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||XOe.some(i=>(n.willChange||"").includes(i))||ZOe.some(i=>(n.contain||"").includes(i))}function JOe(e){let t=Gm(e);for(;sf(t)&&!_y(t);){if(Aj(t))return t;if(cE(t))return null;t=Gm(t)}return null}function mj(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ePe=new Set(["html","body","#document"]);function _y(e){return ePe.has(n0(e))}function Zd(e){return oc(e).getComputedStyle(e)}function dE(e){return Xd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gm(e){if(n0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uz(e)&&e.host||Af(e);return Uz(t)?t.host:t}function Aae(e){const t=Gm(e);return _y(t)?e.ownerDocument?e.ownerDocument.body:e.body:sf(t)&&x1(t)?t:Aae(t)}function bA(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Aae(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=oc(r);if(a){const s=cR(o);return t.concat(o,o.visualViewport||[],x1(r)?r:[],s&&n?bA(s):[])}return t.concat(r,bA(r,[],n))}function cR(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mae(e){const t=Zd(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=sf(e),a=r?e.offsetWidth:n,o=r?e.offsetHeight:i,s=kC(n)!==a||kC(i)!==o;return s&&(n=a,i=o),{width:n,height:i,$:s}}function hj(e){return Xd(e)?e:e.contextElement}function ry(e){const t=hj(e);if(!sf(t))return ef(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:a}=mae(t);let o=(a?kC(n.width):n.width)/i,s=(a?kC(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const tPe=ef(0);function hae(e){const t=oc(e);return!mj()||!t.visualViewport?tPe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nPe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oc(e)?!1:t}function wp(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=hj(e);let o=ef(1);t&&(i?Xd(i)&&(o=ry(i)):o=ry(e));const s=nPe(a,n,i)?hae(a):ef(0);let l=(r.left+s.x)/o.x,c=(r.top+s.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(a){const m=oc(a),h=i&&Xd(i)?oc(i):i;let v=m,g=cR(v);for(;g&&i&&h!==v;){const k=ry(g),b=g.getBoundingClientRect(),w=Zd(g),C=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*k.x,N=b.top+(g.clientTop+parseFloat(w.paddingTop))*k.y;l*=k.x,c*=k.y,d*=k.x,u*=k.y,l+=C,c+=N,v=oc(g),g=cR(v)}}return Cy({width:d,height:u,x:l,y:c})}function uE(e,t){const n=dE(e).scrollLeft;return t?t.left+n:wp(Af(e)).left+n}function pae(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-uE(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function iPe(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=Af(i),s=t?cE(t.floating):!1;if(i===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=ef(1);const d=ef(0),u=sf(i);if((u||!u&&!a)&&((n0(i)!=="body"||x1(o))&&(l=dE(i)),sf(i))){const h=wp(i);c=ry(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}const m=o&&!u&&!a?pae(o,l):ef(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function rPe(e){return Array.from(e.getClientRects())}function aPe(e){const t=Af(e),n=dE(e),i=e.ownerDocument.body,r=Es(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=Es(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+uE(e);const s=-n.scrollTop;return Zd(i).direction==="rtl"&&(o+=Es(t.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:s}}const Qz=25;function oPe(e,t){const n=oc(e),i=Af(e),r=n.visualViewport;let a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(r){a=r.width,o=r.height;const d=mj();(!d||d&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}const c=uE(i);if(c<=0){const d=i.ownerDocument,u=d.body,m=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(i.clientWidth-u.clientWidth-h);v<=Qz&&(a-=v)}else c<=Qz&&(a+=c);return{width:a,height:o,x:s,y:l}}const sPe=new Set(["absolute","fixed"]);function lPe(e,t){const n=wp(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,a=sf(e)?ry(e):ef(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=r*a.x,c=i*a.y;return{width:o,height:s,x:l,y:c}}function Hz(e,t,n){let i;if(t==="viewport")i=oPe(e,n);else if(t==="document")i=aPe(Af(e));else if(Xd(t))i=lPe(t,n);else{const r=hae(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Cy(i)}function gae(e,t){const n=Gm(e);return n===t||!Xd(n)||_y(n)?!1:Zd(n).position==="fixed"||gae(n,t)}function cPe(e,t){const n=t.get(e);if(n)return n;let i=bA(e,[],!1).filter(s=>Xd(s)&&n0(s)!=="body"),r=null;const a=Zd(e).position==="fixed";let o=a?Gm(e):e;for(;Xd(o)&&!_y(o);){const s=Zd(o),l=Aj(o);!l&&s.position==="fixed"&&(r=null),(a?!l&&!r:!l&&s.position==="static"&&!!r&&sPe.has(r.position)||x1(o)&&!l&&gae(e,o))?i=i.filter(d=>d!==o):r=s,o=Gm(o)}return t.set(e,i),i}function dPe(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?cE(t)?[]:cPe(t,this._c):[].concat(n),i],s=o[0],l=o.reduce((c,d)=>{const u=Hz(t,d,r);return c.top=Es(u.top,c.top),c.right=Wd(u.right,c.right),c.bottom=Wd(u.bottom,c.bottom),c.left=Es(u.left,c.left),c},Hz(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uPe(e){const{width:t,height:n}=mae(e);return{width:t,height:n}}function fPe(e,t,n){const i=sf(t),r=Af(t),a=n==="fixed",o=wp(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=ef(0);function c(){l.x=uE(r)}if(i||!i&&!a)if((n0(t)!=="body"||x1(r))&&(s=dE(t)),i){const h=wp(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&c();a&&!i&&r&&c();const d=r&&!i&&!a?pae(r,s):ef(0),u=o.left+s.scrollLeft-l.x-d.x,m=o.top+s.scrollTop-l.y-d.y;return{x:u,y:m,width:o.width,height:o.height}}function F4(e){return Zd(e).position==="static"}function zz(e,t){if(!sf(e)||Zd(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Af(e)===n&&(n=n.ownerDocument.body),n}function vae(e,t){const n=oc(e);if(cE(e))return n;if(!sf(e)){let r=Gm(e);for(;r&&!_y(r);){if(Xd(r)&&!F4(r))return r;r=Gm(r)}return n}let i=zz(e,t);for(;i&&KOe(i)&&F4(i);)i=zz(i,t);return i&&_y(i)&&F4(i)&&!Aj(i)?n:i||JOe(e)||n}const APe=async function(e){const t=this.getOffsetParent||vae,n=this.getDimensions,i=await n(e.floating);return{reference:fPe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mPe(e){return Zd(e).direction==="rtl"}const hPe={convertOffsetParentRelativeRectToViewportRelativeRect:iPe,getDocumentElement:Af,getClippingRect:dPe,getOffsetParent:vae,getElementRects:APe,getClientRects:rPe,getDimensions:uPe,getScale:ry,isElement:Xd,isRTL:mPe};function yae(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pPe(e,t){let n=null,i;const r=Af(e);function a(){var s;clearTimeout(i),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:h}=c;if(s||t(),!m||!h)return;const v=jS(u),g=jS(r.clientWidth-(d+m)),k=jS(r.clientHeight-(u+h)),b=jS(d),C={rootMargin:-v+"px "+-g+"px "+-k+"px "+-b+"px",threshold:Es(0,Wd(1,l))||1};let N=!0;function _(F){const B=F[0].intersectionRatio;if(B!==l){if(!N)return o();B?o(!1,B):i=setTimeout(()=>{o(!1,1e-7)},1e3)}B===1&&!yae(c,e.getBoundingClientRect())&&o(),N=!1}try{n=new IntersectionObserver(_,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,C)}n.observe(e)}return o(!0),a}function bae(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=hj(e),d=r||a?[...c?bA(c):[],...bA(t)]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=c&&s?pPe(c,n):null;let m=-1,h=null;o&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let v,g=l?wp(e):null;l&&k();function k(){const b=wp(e);g&&!yae(g,b)&&n(),g=b,v=requestAnimationFrame(k)}return n(),()=>{var b;d.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u?.(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const pj=QOe,fE=HOe,gj=jOe,kae=VOe,gPe=MOe,SC=ROe,wae=$Oe,Sae=zOe,xae=(e,t,n)=>{const i=new Map,r={platform:hPe,...n},a={...r.platform,_c:i};return POe(e,t,{...r,platform:a})};var vPe=typeof document<"u",yPe=function(){},TN=vPe?S.useLayoutEffect:yPe;function xC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!xC(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!xC(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Nae(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vz(e,t){const n=Nae(e);return Math.round(t*n)/n}function E4(e){const t=S.useRef(e);return TN(()=>{t.current=e}),t}function bPe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=S.useState(i);xC(m,i)||h(i);const[v,g]=S.useState(null),[k,b]=S.useState(null),w=S.useCallback(W=>{W!==F.current&&(F.current=W,g(W))},[]),C=S.useCallback(W=>{W!==B.current&&(B.current=W,b(W))},[]),N=a||v,_=o||k,F=S.useRef(null),B=S.useRef(null),T=S.useRef(d),I=l!=null,$=E4(l),j=E4(r),P=E4(c),K=S.useCallback(()=>{if(!F.current||!B.current)return;const W={placement:t,strategy:n,middleware:m};j.current&&(W.platform=j.current),xae(F.current,B.current,W).then(le=>{const be={...le,isPositioned:P.current!==!1};q.current&&!xC(T.current,be)&&(T.current=be,ff.flushSync(()=>{u(be)}))})},[m,t,n,j,P]);TN(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(W=>({...W,isPositioned:!1})))},[c]);const q=S.useRef(!1);TN(()=>(q.current=!0,()=>{q.current=!1}),[]),TN(()=>{if(N&&(F.current=N),_&&(B.current=_),N&&_){if($.current)return $.current(N,_,K);K()}},[N,_,K,$,I]);const re=S.useMemo(()=>({reference:F,floating:B,setReference:w,setFloating:C}),[w,C]),U=S.useMemo(()=>({reference:N,floating:_}),[N,_]),te=S.useMemo(()=>{const W={position:n,left:0,top:0};if(!U.floating)return W;const le=Vz(U.floating,d.x),be=Vz(U.floating,d.y);return s?{...W,transform:"translate("+le+"px, "+be+"px)",...Nae(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:le,top:be}},[n,s,U.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:K,refs:re,elements:U,floatingStyles:te}),[d,K,re,U,te])}const kPe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?SC({element:i.current,padding:r}).fn(n):{}:i?SC({element:i,padding:r}).fn(n):{}}}},wPe=(e,t)=>({...pj(e),options:[e,t]}),SPe=(e,t)=>({...fE(e),options:[e,t]}),xPe=(e,t)=>({...Sae(e),options:[e,t]}),NPe=(e,t)=>({...gj(e),options:[e,t]}),CPe=(e,t)=>({...kae(e),options:[e,t]}),_Pe=(e,t)=>({...gPe(e),options:[e,t]}),FPe=(e,t)=>({...kPe(e),options:[e,t]});var EPe="Arrow",Cae=S.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...a}=e;return A.jsx(sn.svg,{...a,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:A.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cae.displayName=EPe;var BPe=Cae;function vj(e){const[t,n]=S.useState(void 0);return Ya(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var yj="Popper",[_ae,rh]=Bs(yj),[DPe,Fae]=_ae(yj),Eae=e=>{const{__scopePopper:t,children:n}=e,[i,r]=S.useState(null);return A.jsx(DPe,{scope:t,anchor:i,onAnchorChange:r,children:n})};Eae.displayName=yj;var Bae="PopperAnchor",Dae=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,a=Fae(Bae,n),o=S.useRef(null),s=ui(t,o),l=S.useRef(null);return S.useEffect(()=>{const c=l.current;l.current=i?.current||o.current,c!==l.current&&a.onAnchorChange(l.current)}),i?null:A.jsx(sn.div,{...r,ref:s})});Dae.displayName=Bae;var bj="PopperContent",[TPe,IPe]=_ae(bj),Tae=S.forwardRef((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,k=Fae(bj,n),[b,w]=S.useState(null),C=ui(t,Y=>w(Y)),[N,_]=S.useState(null),F=vj(N),B=F?.width??0,T=F?.height??0,I=i+(a!=="center"?"-"+a:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},j=Array.isArray(c)?c:[c],P=j.length>0,K={padding:$,boundary:j.filter(PPe),altBoundary:P},{refs:q,floatingStyles:re,placement:U,isPositioned:te,middlewareData:W}=bPe({strategy:"fixed",placement:I,whileElementsMounted:(...Y)=>bae(...Y,{animationFrame:h==="always"}),elements:{reference:k.anchor},middleware:[wPe({mainAxis:r+T,alignmentAxis:o}),l&&SPe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?xPe():void 0,...K}),l&&NPe({...K}),CPe({...K,apply:({elements:Y,rects:ue,availableWidth:me,availableHeight:ye})=>{const{width:ae,height:ie}=ue.reference,_e=Y.floating.style;_e.setProperty("--radix-popper-available-width",`${me}px`),_e.setProperty("--radix-popper-available-height",`${ye}px`),_e.setProperty("--radix-popper-anchor-width",`${ae}px`),_e.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),N&&FPe({element:N,padding:s}),RPe({arrowWidth:B,arrowHeight:T}),m&&_Pe({strategy:"referenceHidden",...K})]}),[le,be]=Pae(U),oe=Vo(v);Ya(()=>{te&&oe?.()},[te,oe]);const M=W.arrow?.x,Q=W.arrow?.y,L=W.arrow?.centerOffset!==0,[J,ee]=S.useState();return Ya(()=>{b&&ee(window.getComputedStyle(b).zIndex)},[b]),A.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:te?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:A.jsx(TPe,{scope:n,placedSide:le,onArrowChange:_,arrowX:M,arrowY:Q,shouldHideArrow:L,children:A.jsx(sn.div,{"data-side":le,"data-align":be,...g,ref:C,style:{...g.style,animation:te?void 0:"none"}})})})});Tae.displayName=bj;var Iae="PopperArrow",OPe={top:"bottom",right:"left",bottom:"top",left:"right"},Oae=S.forwardRef(function(t,n){const{__scopePopper:i,...r}=t,a=IPe(Iae,i),o=OPe[a.placedSide];return A.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:A.jsx(BPe,{...r,ref:n,style:{...r.style,display:"block"}})})});Oae.displayName=Iae;function PPe(e){return e!==null}var RPe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=Pae(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+s/2,h=(r.arrow?.y??0)+l/2;let v="",g="";return c==="bottom"?(v=o?u:`${m}px`,g=`${-l}px`):c==="top"?(v=o?u:`${m}px`,g=`${i.floating.height+l}px`):c==="right"?(v=`${-l}px`,g=o?u:`${h}px`):c==="left"&&(v=`${i.floating.width+l}px`,g=o?u:`${h}px`),{data:{x:v,y:g}}}});function Pae(e){const[t,n="center"]=e.split("-");return[t,n]}var AE=Eae,N1=Dae,mE=Tae,hE=Oae,B4="rovingFocusGroup.onEntryFocus",jPe={bubbles:!1,cancelable:!0},C1="RovingFocusGroup",[dR,Rae,MPe]=lj(C1),[LPe,pE]=Bs(C1,[MPe]),[$Pe,UPe]=LPe(C1),jae=S.forwardRef((e,t)=>A.jsx(dR.Provider,{scope:e.__scopeRovingFocusGroup,children:A.jsx(dR.Slot,{scope:e.__scopeRovingFocusGroup,children:A.jsx(QPe,{...e,ref:t})})}));jae.displayName=C1;var QPe=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,m=S.useRef(null),h=ui(t,m),v=S1(a),[g,k]=Kd({prop:o,defaultProp:s??null,onChange:l,caller:C1}),[b,w]=S.useState(!1),C=Vo(c),N=Rae(n),_=S.useRef(!1),[F,B]=S.useState(0);return S.useEffect(()=>{const T=m.current;if(T)return T.addEventListener(B4,C),()=>T.removeEventListener(B4,C)},[C]),A.jsx($Pe,{scope:n,orientation:i,dir:v,loop:r,currentTabStopId:g,onItemFocus:S.useCallback(T=>k(T),[k]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>B(T=>T+1),[]),onFocusableItemRemove:S.useCallback(()=>B(T=>T-1),[]),children:A.jsx(sn.div,{tabIndex:b||F===0?-1:0,"data-orientation":i,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:Kt(e.onMouseDown,()=>{_.current=!0}),onFocus:Kt(e.onFocus,T=>{const I=!_.current;if(T.target===T.currentTarget&&I&&!b){const $=new CustomEvent(B4,jPe);if(T.currentTarget.dispatchEvent($),!$.defaultPrevented){const j=N().filter(U=>U.focusable),P=j.find(U=>U.active),K=j.find(U=>U.id===g),re=[P,K,...j].filter(Boolean).map(U=>U.ref.current);$ae(re,d)}}_.current=!1}),onBlur:Kt(e.onBlur,()=>w(!1))})})}),Mae="RovingFocusGroupItem",Lae=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:a,children:o,...s}=e,l=Bo(),c=a||l,d=UPe(Mae,n),u=d.currentTabStopId===c,m=Rae(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=d;return S.useEffect(()=>{if(i)return h(),()=>v()},[i,h,v]),A.jsx(dR.ItemSlot,{scope:n,id:c,focusable:i,active:r,children:A.jsx(sn.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Kt(e.onMouseDown,k=>{i?d.onItemFocus(c):k.preventDefault()}),onFocus:Kt(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Kt(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){d.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const b=VPe(k,d.orientation,d.dir);if(b!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let C=m().filter(N=>N.focusable).map(N=>N.ref.current);if(b==="last")C.reverse();else if(b==="prev"||b==="next"){b==="prev"&&C.reverse();const N=C.indexOf(k.currentTarget);C=d.loop?GPe(C,N+1):C.slice(N+1)}setTimeout(()=>$ae(C))}}),children:typeof o=="function"?o({isCurrentTabStop:u,hasTabStop:g!=null}):o})})});Lae.displayName=Mae;var HPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zPe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function VPe(e,t,n){const i=zPe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return HPe[i]}function $ae(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function GPe(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Uae=jae,Qae=Lae,uR=["Enter"," "],qPe=["ArrowDown","PageUp","Home"],Hae=["ArrowUp","PageDown","End"],KPe=[...qPe,...Hae],WPe={ltr:[...uR,"ArrowRight"],rtl:[...uR,"ArrowLeft"]},YPe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_1="Menu",[Pk,XPe,ZPe]=lj(_1),[Gp,zae]=Bs(_1,[ZPe,rh,pE]),gE=rh(),Vae=pE(),[JPe,qp]=Gp(_1),[eRe,F1]=Gp(_1),Gae=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:a,modal:o=!0}=e,s=gE(t),[l,c]=S.useState(null),d=S.useRef(!1),u=Vo(a),m=S1(r);return S.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),A.jsx(AE,{...s,children:A.jsx(JPe,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:A.jsx(eRe,{scope:t,onClose:S.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:m,modal:o,children:i})})})};Gae.displayName=_1;var tRe="MenuAnchor",kj=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gE(n);return A.jsx(N1,{...r,...i,ref:t})});kj.displayName=tRe;var wj="MenuPortal",[nRe,qae]=Gp(wj,{forceMount:void 0}),Kae=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,a=qp(wj,t);return A.jsx(nRe,{scope:t,forceMount:n,children:A.jsx(To,{present:n||a.open,children:A.jsx(Yy,{asChild:!0,container:r,children:i})})})};Kae.displayName=wj;var zc="MenuContent",[iRe,Sj]=Gp(zc),Wae=S.forwardRef((e,t)=>{const n=qae(zc,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,a=qp(zc,e.__scopeMenu),o=F1(zc,e.__scopeMenu);return A.jsx(Pk.Provider,{scope:e.__scopeMenu,children:A.jsx(To,{present:i||a.open,children:A.jsx(Pk.Slot,{scope:e.__scopeMenu,children:o.modal?A.jsx(rRe,{...r,ref:t}):A.jsx(aRe,{...r,ref:t})})})})}),rRe=S.forwardRef((e,t)=>{const n=qp(zc,e.__scopeMenu),i=S.useRef(null),r=ui(t,i);return S.useEffect(()=>{const a=i.current;if(a)return tE(a)},[]),A.jsx(xj,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kt(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),aRe=S.forwardRef((e,t)=>{const n=qp(zc,e.__scopeMenu);return A.jsx(xj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),oRe=Vm("MenuContent.ScrollLock"),xj=S.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...g}=e,k=qp(zc,n),b=F1(zc,n),w=gE(n),C=Vae(n),N=XPe(n),[_,F]=S.useState(null),B=S.useRef(null),T=ui(t,B,k.onContentChange),I=S.useRef(0),$=S.useRef(""),j=S.useRef(0),P=S.useRef(null),K=S.useRef("right"),q=S.useRef(0),re=v?Jy:S.Fragment,U=v?{as:oRe,allowPinchZoom:!0}:void 0,te=le=>{const be=$.current+le,oe=N().filter(Y=>!Y.disabled),M=document.activeElement,Q=oe.find(Y=>Y.ref.current===M)?.textValue,L=oe.map(Y=>Y.textValue),J=vRe(L,be,Q),ee=oe.find(Y=>Y.textValue===J)?.ref.current;(function Y(ue){$.current=ue,window.clearTimeout(I.current),ue!==""&&(I.current=window.setTimeout(()=>Y(""),1e3))})(be),ee&&setTimeout(()=>ee.focus())};S.useEffect(()=>()=>window.clearTimeout(I.current),[]),JF();const W=S.useCallback(le=>K.current===P.current?.side&&bRe(le,P.current?.area),[]);return A.jsx(iRe,{scope:n,searchRef:$,onItemEnter:S.useCallback(le=>{W(le)&&le.preventDefault()},[W]),onItemLeave:S.useCallback(le=>{W(le)||(B.current?.focus(),F(null))},[W]),onTriggerLeave:S.useCallback(le=>{W(le)&&le.preventDefault()},[W]),pointerGraceTimerRef:j,onPointerGraceIntentChange:S.useCallback(le=>{P.current=le},[]),children:A.jsx(re,{...U,children:A.jsx(k1,{asChild:!0,trapped:r,onMountAutoFocus:Kt(a,le=>{le.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:h,children:A.jsx(Uae,{asChild:!0,...C,dir:b.dir,orientation:"vertical",loop:i,currentTabStopId:_,onCurrentTabStopIdChange:F,onEntryFocus:Kt(l,le=>{b.isUsingKeyboardRef.current||le.preventDefault()}),preventScrollOnEntryFocus:!0,children:A.jsx(mE,{role:"menu","aria-orientation":"vertical","data-state":uoe(k.open),"data-radix-menu-content":"",dir:b.dir,...w,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:Kt(g.onKeyDown,le=>{const oe=le.target.closest("[data-radix-menu-content]")===le.currentTarget,M=le.ctrlKey||le.altKey||le.metaKey,Q=le.key.length===1;oe&&(le.key==="Tab"&&le.preventDefault(),!M&&Q&&te(le.key));const L=B.current;if(le.target!==L||!KPe.includes(le.key))return;le.preventDefault();const ee=N().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);Hae.includes(le.key)&&ee.reverse(),pRe(ee)}),onBlur:Kt(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(I.current),$.current="")}),onPointerMove:Kt(e.onPointerMove,Rk(le=>{const be=le.target,oe=q.current!==le.clientX;if(le.currentTarget.contains(be)&&oe){const M=le.clientX>q.current?"right":"left";K.current=M,q.current=le.clientX}}))})})})})})})});Wae.displayName=zc;var sRe="MenuGroup",Nj=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{role:"group",...i,ref:t})});Nj.displayName=sRe;var lRe="MenuLabel",Yae=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{...i,ref:t})});Yae.displayName=lRe;var NC="MenuItem",Gz="menu.itemSelect",vE=S.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...r}=e,a=S.useRef(null),o=F1(NC,e.__scopeMenu),s=Sj(NC,e.__scopeMenu),l=ui(t,a),c=S.useRef(!1),d=()=>{const u=a.current;if(!n&&u){const m=new CustomEvent(Gz,{bubbles:!0,cancelable:!0});u.addEventListener(Gz,h=>i?.(h),{once:!0}),Dre(u,m),m.defaultPrevented?c.current=!1:o.onClose()}};return A.jsx(Xae,{...r,ref:l,disabled:n,onClick:Kt(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),c.current=!0},onPointerUp:Kt(e.onPointerUp,u=>{c.current||u.currentTarget?.click()}),onKeyDown:Kt(e.onKeyDown,u=>{const m=s.searchRef.current!=="";n||m&&u.key===" "||uR.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});vE.displayName=NC;var Xae=S.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:r,...a}=e,o=Sj(NC,n),s=Vae(n),l=S.useRef(null),c=ui(t,l),[d,u]=S.useState(!1),[m,h]=S.useState("");return S.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[a.children]),A.jsx(Pk.ItemSlot,{scope:n,disabled:i,textValue:r??m,children:A.jsx(Qae,{asChild:!0,...s,focusable:!i,children:A.jsx(sn.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...a,ref:c,onPointerMove:Kt(e.onPointerMove,Rk(v=>{i?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Kt(e.onPointerLeave,Rk(v=>o.onItemLeave(v))),onFocus:Kt(e.onFocus,()=>u(!0)),onBlur:Kt(e.onBlur,()=>u(!1))})})})}),cRe="MenuCheckboxItem",Zae=S.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...r}=e;return A.jsx(ioe,{scope:e.__scopeMenu,checked:n,children:A.jsx(vE,{role:"menuitemcheckbox","aria-checked":CC(n)?"mixed":n,...r,ref:t,"data-state":_j(n),onSelect:Kt(r.onSelect,()=>i?.(CC(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Zae.displayName=cRe;var Jae="MenuRadioGroup",[dRe,uRe]=Gp(Jae,{value:void 0,onValueChange:()=>{}}),eoe=S.forwardRef((e,t)=>{const{value:n,onValueChange:i,...r}=e,a=Vo(i);return A.jsx(dRe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:A.jsx(Nj,{...r,ref:t})})});eoe.displayName=Jae;var toe="MenuRadioItem",noe=S.forwardRef((e,t)=>{const{value:n,...i}=e,r=uRe(toe,e.__scopeMenu),a=n===r.value;return A.jsx(ioe,{scope:e.__scopeMenu,checked:a,children:A.jsx(vE,{role:"menuitemradio","aria-checked":a,...i,ref:t,"data-state":_j(a),onSelect:Kt(i.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});noe.displayName=toe;var Cj="MenuItemIndicator",[ioe,fRe]=Gp(Cj,{checked:!1}),roe=S.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...r}=e,a=fRe(Cj,n);return A.jsx(To,{present:i||CC(a.checked)||a.checked===!0,children:A.jsx(sn.span,{...r,ref:t,"data-state":_j(a.checked)})})});roe.displayName=Cj;var ARe="MenuSeparator",aoe=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return A.jsx(sn.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});aoe.displayName=ARe;var mRe="MenuArrow",ooe=S.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gE(n);return A.jsx(hE,{...r,...i,ref:t})});ooe.displayName=mRe;var hRe="MenuSub",[qDt,soe]=Gp(hRe),Kb="MenuSubTrigger",loe=S.forwardRef((e,t)=>{const n=qp(Kb,e.__scopeMenu),i=F1(Kb,e.__scopeMenu),r=soe(Kb,e.__scopeMenu),a=Sj(Kb,e.__scopeMenu),o=S.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},d=S.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return S.useEffect(()=>d,[d]),S.useEffect(()=>{const u=s.current;return()=>{window.clearTimeout(u),l(null)}},[s,l]),A.jsx(kj,{asChild:!0,...c,children:A.jsx(Xae,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":uoe(n.open),...e,ref:xA(t,r.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Kt(e.onPointerMove,Rk(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Kt(e.onPointerLeave,Rk(u=>{d();const m=n.content?.getBoundingClientRect();if(m){const h=n.content?.dataset.side,v=h==="right",g=v?-5:5,k=m[v?"left":"right"],b=m[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:k,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:k,y:m.bottom}],side:h}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Kt(e.onKeyDown,u=>{const m=a.searchRef.current!=="";e.disabled||m&&u.key===" "||WPe[i.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});loe.displayName=Kb;var coe="MenuSubContent",doe=S.forwardRef((e,t)=>{const n=qae(zc,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,a=qp(zc,e.__scopeMenu),o=F1(zc,e.__scopeMenu),s=soe(coe,e.__scopeMenu),l=S.useRef(null),c=ui(t,l);return A.jsx(Pk.Provider,{scope:e.__scopeMenu,children:A.jsx(To,{present:i||a.open,children:A.jsx(Pk.Slot,{scope:e.__scopeMenu,children:A.jsx(xj,{id:s.contentId,"aria-labelledby":s.triggerId,...r,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{o.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:Kt(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Kt(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:Kt(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),m=YPe[o.dir].includes(d.key);u&&m&&(a.onOpenChange(!1),s.trigger?.focus(),d.preventDefault())})})})})})});doe.displayName=coe;function uoe(e){return e?"open":"closed"}function CC(e){return e==="indeterminate"}function _j(e){return CC(e)?"indeterminate":e?"checked":"unchecked"}function pRe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gRe(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function vRe(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=gRe(e,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function yRe(e,t){const{x:n,y:i}=e;let r=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,d=s.y,u=l.x,m=l.y;d>i!=m>i&&n<(u-c)*(i-d)/(m-d)+c&&(r=!r)}return r}function bRe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yRe(n,t)}function Rk(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kRe=Gae,wRe=kj,SRe=Kae,xRe=Wae,NRe=Nj,CRe=Yae,_Re=vE,FRe=Zae,ERe=eoe,BRe=noe,DRe=roe,TRe=aoe,IRe=ooe,ORe=loe,PRe=doe,yE="DropdownMenu",[RRe]=Bs(yE,[zae]),Ys=zae(),[jRe,foe]=RRe(yE),Aoe=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=Ys(t),c=S.useRef(null),[d,u]=Kd({prop:r,defaultProp:a??!1,onChange:o,caller:yE});return A.jsx(jRe,{scope:t,triggerId:Bo(),triggerRef:c,contentId:Bo(),open:d,onOpenChange:u,onOpenToggle:S.useCallback(()=>u(m=>!m),[u]),modal:s,children:A.jsx(kRe,{...l,open:d,onOpenChange:u,dir:i,modal:s,children:n})})};Aoe.displayName=yE;var moe="DropdownMenuTrigger",hoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...r}=e,a=foe(moe,n),o=Ys(n);return A.jsx(wRe,{asChild:!0,...o,children:A.jsx(sn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:xA(t,a.triggerRef),onPointerDown:Kt(e.onPointerDown,s=>{!i&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:Kt(e.onKeyDown,s=>{i||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});hoe.displayName=moe;var MRe="DropdownMenuPortal",poe=e=>{const{__scopeDropdownMenu:t,...n}=e,i=Ys(t);return A.jsx(SRe,{...i,...n})};poe.displayName=MRe;var goe="DropdownMenuContent",voe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=foe(goe,n),a=Ys(n),o=S.useRef(!1);return A.jsx(xRe,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...i,ref:t,onCloseAutoFocus:Kt(e.onCloseAutoFocus,s=>{o.current||r.triggerRef.current?.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:Kt(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!r.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});voe.displayName=goe;var LRe="DropdownMenuGroup",yoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(NRe,{...r,...i,ref:t})});yoe.displayName=LRe;var $Re="DropdownMenuLabel",boe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(CRe,{...r,...i,ref:t})});boe.displayName=$Re;var URe="DropdownMenuItem",koe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(_Re,{...r,...i,ref:t})});koe.displayName=URe;var QRe="DropdownMenuCheckboxItem",woe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(FRe,{...r,...i,ref:t})});woe.displayName=QRe;var HRe="DropdownMenuRadioGroup",zRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(ERe,{...r,...i,ref:t})});zRe.displayName=HRe;var VRe="DropdownMenuRadioItem",GRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(BRe,{...r,...i,ref:t})});GRe.displayName=VRe;var qRe="DropdownMenuItemIndicator",Soe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(DRe,{...r,...i,ref:t})});Soe.displayName=qRe;var KRe="DropdownMenuSeparator",xoe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(TRe,{...r,...i,ref:t})});xoe.displayName=KRe;var WRe="DropdownMenuArrow",YRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(IRe,{...r,...i,ref:t})});YRe.displayName=WRe;var XRe="DropdownMenuSubTrigger",ZRe=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(ORe,{...r,...i,ref:t})});ZRe.displayName=XRe;var JRe="DropdownMenuSubContent",e3e=S.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ys(n);return A.jsx(PRe,{...r,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e3e.displayName=JRe;var t3e=Aoe,n3e=hoe,i3e=poe,r3e=voe,a3e=yoe,o3e=boe,s3e=koe,l3e=woe,c3e=Soe,d3e=xoe;function Noe({...e}){return A.jsx(t3e,{"data-slot":"dropdown-menu",...e})}function Coe({...e}){return A.jsx(n3e,{"data-slot":"dropdown-menu-trigger",...e})}function _oe({className:e,sideOffset:t=4,...n}){return A.jsx(i3e,{children:A.jsx(r3e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ft("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",e),...n})})}function KDt({...e}){return A.jsx(a3e,{"data-slot":"dropdown-menu-group",...e})}function Wb({className:e,inset:t,variant:n="default",...i}){return A.jsx(s3e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ft("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...i})}function WDt({className:e,children:t,checked:n,...i}){return A.jsxs(l3e,{"data-slot":"dropdown-menu-checkbox-item",className:Ft("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50",e),checked:n,...i,children:[A.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:A.jsx(c3e,{children:A.jsx(kA,{className:"size-4"})})}),t]})}function Foe({className:e,inset:t,...n}){return A.jsx(o3e,{"data-slot":"dropdown-menu-label","data-inset":t,className:Ft("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Eoe({className:e,...t}){return A.jsx(d3e,{"data-slot":"dropdown-menu-separator",className:Ft("bg-gray-200 -mx-1 my-1 h-px dark:bg-gray-800",e),...t})}function YDt({className:e,...t}){return A.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Ft("text-gray-500 ml-auto text-xs tracking-widest dark:text-gray-400",e),...t})}function fR(e,[t,n]){return Math.min(n,Math.max(t,e))}function u3e(e,t){return S.useReducer((n,i)=>t[n][i]??n,e)}var Fj="ScrollArea",[Boe]=Bs(Fj),[f3e,id]=Boe(Fj),Doe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:r,scrollHideDelay:a=600,...o}=e,[s,l]=S.useState(null),[c,d]=S.useState(null),[u,m]=S.useState(null),[h,v]=S.useState(null),[g,k]=S.useState(null),[b,w]=S.useState(0),[C,N]=S.useState(0),[_,F]=S.useState(!1),[B,T]=S.useState(!1),I=ui(t,j=>l(j)),$=S1(r);return A.jsx(f3e,{scope:n,type:i,dir:$,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:_,onScrollbarXEnabledChange:F,scrollbarY:g,onScrollbarYChange:k,scrollbarYEnabled:B,onScrollbarYEnabledChange:T,onCornerWidthChange:w,onCornerHeightChange:N,children:A.jsx(sn.div,{dir:$,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Doe.displayName=Fj;var Toe="ScrollAreaViewport",Ioe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:r,...a}=e,o=id(Toe,n),s=S.useRef(null),l=ui(t,s,o.onViewportChange);return A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),A.jsx(sn.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:A.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});Ioe.displayName=Toe;var mf="ScrollAreaScrollbar",Ooe=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=r,s=e.orientation==="horizontal";return S.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),r.type==="hover"?A.jsx(A3e,{...i,ref:t,forceMount:n}):r.type==="scroll"?A.jsx(m3e,{...i,ref:t,forceMount:n}):r.type==="auto"?A.jsx(Poe,{...i,ref:t,forceMount:n}):r.type==="always"?A.jsx(Ej,{...i,ref:t}):null});Ooe.displayName=mf;var A3e=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),[a,o]=S.useState(!1);return S.useEffect(()=>{const s=r.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),r.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),A.jsx(To,{present:n||a,children:A.jsx(Poe,{"data-state":a?"visible":"hidden",...i,ref:t})})}),m3e=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=id(mf,e.__scopeScrollArea),a=e.orientation==="horizontal",o=kE(()=>l("SCROLL_END"),100),[s,l]=u3e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,r.scrollHideDelay,l]),S.useEffect(()=>{const c=r.viewport,d=a?"scrollLeft":"scrollTop";if(c){let u=c[d];const m=()=>{const h=c[d];u!==h&&(l("SCROLL"),o()),u=h};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[r.viewport,a,l,o]),A.jsx(To,{present:n||s!=="hidden",children:A.jsx(Ej,{"data-state":s==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:Kt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Kt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Poe=S.forwardRef((e,t)=>{const n=id(mf,e.__scopeScrollArea),{forceMount:i,...r}=e,[a,o]=S.useState(!1),s=e.orientation==="horizontal",l=kE(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?c:d)}},10);return Fy(n.viewport,l),Fy(n.content,l),A.jsx(To,{present:i||a,children:A.jsx(Ej,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Ej=S.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,r=id(mf,e.__scopeScrollArea),a=S.useRef(null),o=S.useRef(0),[s,l]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=$oe(s.viewport,s.content),d={...i,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function u(m,h){return b3e(m,o.current,s,h)}return n==="horizontal"?A.jsx(h3e,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const m=r.viewport.scrollLeft,h=qz(m,s,r.dir);a.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollLeft=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollLeft=u(m,r.dir))}}):n==="vertical"?A.jsx(p3e,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&a.current){const m=r.viewport.scrollTop,h=qz(m,s);a.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{r.viewport&&(r.viewport.scrollTop=m)},onDragScroll:m=>{r.viewport&&(r.viewport.scrollTop=u(m))}}):null}),h3e=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...r}=e,a=id(mf,e.__scopeScrollArea),[o,s]=S.useState(),l=S.useRef(null),c=ui(t,l,a.onScrollbarXChange);return S.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),A.jsx(joe,{"data-orientation":"horizontal",...r,ref:c,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bE(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Qoe(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&i({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:FC(o.paddingLeft),paddingEnd:FC(o.paddingRight)}})}})}),p3e=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...r}=e,a=id(mf,e.__scopeScrollArea),[o,s]=S.useState(),l=S.useRef(null),c=ui(t,l,a.onScrollbarYChange);return S.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),A.jsx(joe,{"data-orientation":"vertical",...r,ref:c,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bE(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Qoe(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&i({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:FC(o.paddingTop),paddingEnd:FC(o.paddingBottom)}})}})}),[g3e,Roe]=Boe(mf),joe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:r,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:u,...m}=e,h=id(mf,n),[v,g]=S.useState(null),k=ui(t,I=>g(I)),b=S.useRef(null),w=S.useRef(""),C=h.viewport,N=i.content-i.viewport,_=Vo(d),F=Vo(l),B=kE(u,10);function T(I){if(b.current){const $=I.clientX-b.current.left,j=I.clientY-b.current.top;c({x:$,y:j})}}return S.useEffect(()=>{const I=$=>{const j=$.target;v?.contains(j)&&_($,N)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[C,v,N,_]),S.useEffect(F,[i,F]),Fy(v,B),Fy(h.content,B),A.jsx(g3e,{scope:n,scrollbar:v,hasThumb:r,onThumbChange:Vo(a),onThumbPointerUp:Vo(o),onThumbPositionChange:F,onThumbPointerDown:Vo(s),children:A.jsx(sn.div,{...m,ref:k,style:{position:"absolute",...m.style},onPointerDown:Kt(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),b.current=v.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(I))}),onPointerMove:Kt(e.onPointerMove,T),onPointerUp:Kt(e.onPointerUp,I=>{const $=I.target;$.hasPointerCapture(I.pointerId)&&$.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),_C="ScrollAreaThumb",Moe=S.forwardRef((e,t)=>{const{forceMount:n,...i}=e,r=Roe(_C,e.__scopeScrollArea);return A.jsx(To,{present:n||r.hasThumb,children:A.jsx(v3e,{ref:t,...i})})}),v3e=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...r}=e,a=id(_C,n),o=Roe(_C,n),{onThumbPositionChange:s}=o,l=ui(t,u=>o.onThumbChange(u)),c=S.useRef(void 0),d=kE(()=>{c.current&&(c.current(),c.current=void 0)},100);return S.useEffect(()=>{const u=a.viewport;if(u){const m=()=>{if(d(),!c.current){const h=k3e(u,s);c.current=h,s()}};return s(),u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[a.viewport,d,s]),A.jsx(sn.div,{"data-state":o.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Kt(e.onPointerDownCapture,u=>{const h=u.target.getBoundingClientRect(),v=u.clientX-h.left,g=u.clientY-h.top;o.onThumbPointerDown({x:v,y:g})}),onPointerUp:Kt(e.onPointerUp,o.onThumbPointerUp)})});Moe.displayName=_C;var Bj="ScrollAreaCorner",Loe=S.forwardRef((e,t)=>{const n=id(Bj,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?A.jsx(y3e,{...e,ref:t}):null});Loe.displayName=Bj;var y3e=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,r=id(Bj,n),[a,o]=S.useState(0),[s,l]=S.useState(0),c=!!(a&&s);return Fy(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),Fy(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),o(d)}),c?A.jsx(sn.div,{...i,ref:t,style:{width:a,height:s,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function FC(e){return e?parseInt(e,10):0}function $oe(e,t){const n=e/t;return isNaN(n)?0:n}function bE(e){const t=$oe(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function b3e(e,t,n,i="ltr"){const r=bE(n),a=r/2,o=t||a,s=r-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,u=i==="ltr"?[0,d]:[d*-1,0];return Uoe([l,c],u)(e)}function qz(e,t,n="ltr"){const i=bE(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-r,o=t.content-t.viewport,s=a-i,l=n==="ltr"?[0,o]:[o*-1,0],c=fR(e,l);return Uoe([0,o],[0,s])(c)}function Uoe(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function Qoe(e,t){return e>0&&e<t}var k3e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)};function kE(e,t){const n=Vo(e),i=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(i.current),[]),S.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function Fy(e,t){const n=Vo(t);Ya(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e,n])}var w3e=Doe,S3e=Ioe,x3e=Loe;function Hoe({className:e,children:t,...n}){return A.jsxs(w3e,{"data-slot":"scroll-area",className:Ft("relative",e),...n,children:[A.jsx(S3e,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-gray-950/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 dark:focus-visible:ring-gray-300/50",children:t}),A.jsx(N3e,{}),A.jsx(x3e,{})]})}function N3e({className:e,orientation:t="vertical",...n}){return A.jsx(Ooe,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ft("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:A.jsx(Moe,{"data-slot":"scroll-area-thumb",className:"bg-gray-200 relative flex-1 rounded-full dark:bg-gray-800"})})}var zoe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C3e="VisuallyHidden",Voe=S.forwardRef((e,t)=>A.jsx(sn.span,{...e,ref:t,style:{...zoe,...e.style}}));Voe.displayName=C3e;var _3e=Voe,[wE]=Bs("Tooltip",[rh]),SE=rh(),Goe="TooltipProvider",F3e=700,AR="tooltip.open",[E3e,Dj]=wE(Goe),qoe=e=>{const{__scopeTooltip:t,delayDuration:n=F3e,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),l=S.useRef(0);return S.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),A.jsx(E3e,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,i)},[i]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(c=>{s.current=c},[]),disableHoverableContent:r,children:a})};qoe.displayName=Goe;var jk="Tooltip",[B3e,E1]=wE(jk),Koe=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:r,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=Dj(jk,e.__scopeTooltip),c=SE(t),[d,u]=S.useState(null),m=Bo(),h=S.useRef(0),v=o??l.disableHoverableContent,g=s??l.delayDuration,k=S.useRef(!1),[b,w]=Kd({prop:i,defaultProp:r??!1,onChange:B=>{B?(l.onOpen(),document.dispatchEvent(new CustomEvent(AR))):l.onClose(),a?.(B)},caller:jk}),C=S.useMemo(()=>b?k.current?"delayed-open":"instant-open":"closed",[b]),N=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,k.current=!1,w(!0)},[w]),_=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),F=S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{k.current=!0,w(!0),h.current=0},g)},[g,w]);return S.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),A.jsx(AE,{...c,children:A.jsx(B3e,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:u,onTriggerEnter:S.useCallback(()=>{l.isOpenDelayedRef.current?F():N()},[l.isOpenDelayedRef,F,N]),onTriggerLeave:S.useCallback(()=>{v?_():(window.clearTimeout(h.current),h.current=0)},[_,v]),onOpen:N,onClose:_,disableHoverableContent:v,children:n})})};Koe.displayName=jk;var mR="TooltipTrigger",Woe=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=E1(mR,n),a=Dj(mR,n),o=SE(n),s=S.useRef(null),l=ui(t,s,r.onTriggerChange),c=S.useRef(!1),d=S.useRef(!1),u=S.useCallback(()=>c.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),A.jsx(N1,{asChild:!0,...o,children:A.jsx(sn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:l,onPointerMove:Kt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:Kt(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:Kt(e.onPointerDown,()=>{r.open&&r.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Kt(e.onFocus,()=>{c.current||r.onOpen()}),onBlur:Kt(e.onBlur,r.onClose),onClick:Kt(e.onClick,r.onClose)})})});Woe.displayName=mR;var Tj="TooltipPortal",[D3e,T3e]=wE(Tj,{forceMount:void 0}),Yoe=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,a=E1(Tj,t);return A.jsx(D3e,{scope:t,forceMount:n,children:A.jsx(To,{present:n||a.open,children:A.jsx(Yy,{asChild:!0,container:r,children:i})})})};Yoe.displayName=Tj;var Ey="TooltipContent",Xoe=S.forwardRef((e,t)=>{const n=T3e(Ey,e.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...a}=e,o=E1(Ey,e.__scopeTooltip);return A.jsx(To,{present:i||o.open,children:o.disableHoverableContent?A.jsx(Zoe,{side:r,...a,ref:t}):A.jsx(I3e,{side:r,...a,ref:t})})}),I3e=S.forwardRef((e,t)=>{const n=E1(Ey,e.__scopeTooltip),i=Dj(Ey,e.__scopeTooltip),r=S.useRef(null),a=ui(t,r),[o,s]=S.useState(null),{trigger:l,onClose:c}=n,d=r.current,{onPointerInTransitChange:u}=i,m=S.useCallback(()=>{s(null),u(!1)},[u]),h=S.useCallback((v,g)=>{const k=v.currentTarget,b={x:v.clientX,y:v.clientY},w=j3e(b,k.getBoundingClientRect()),C=M3e(b,w),N=L3e(g.getBoundingClientRect()),_=U3e([...C,...N]);s(_),u(!0)},[u]);return S.useEffect(()=>()=>m(),[m]),S.useEffect(()=>{if(l&&d){const v=k=>h(k,d),g=k=>h(k,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[l,d,h,m]),S.useEffect(()=>{if(o){const v=g=>{const k=g.target,b={x:g.clientX,y:g.clientY},w=l?.contains(k)||d?.contains(k),C=!$3e(b,o);w?m():C&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,o,c,m]),A.jsx(Zoe,{...e,ref:a})}),[O3e,P3e]=wE(jk,{isInside:!1}),R3e=TEe("TooltipContent"),Zoe=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=E1(Ey,n),c=SE(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(AR,d),()=>document.removeEventListener(AR,d)),[d]),S.useEffect(()=>{if(l.trigger){const u=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:A.jsxs(mE,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[A.jsx(R3e,{children:i}),A.jsx(O3e,{scope:n,isInside:!0,children:A.jsx(_3e,{id:l.contentId,role:"tooltip",children:r||i})})]})})});Xoe.displayName=Ey;var Joe="TooltipArrow",ese=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=SE(n);return P3e(Joe,n).isInside?null:A.jsx(hE,{...r,...i,ref:t})});ese.displayName=Joe;function j3e(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,i,r,a)){case a:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function M3e(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function L3e(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function $3e(e,t){const{x:n,y:i}=e;let r=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,d=s.y,u=l.x,m=l.y;d>i!=m>i&&n<(u-c)*(i-d)/(m-d)+c&&(r=!r)}return r}function U3e(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),Q3e(t)}function Q3e(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const r=e[i];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(r.y-o.y)>=(a.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(r.y-o.y)>=(a.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var H3e=qoe,z3e=Koe,V3e=Woe,G3e=Yoe,q3e=Xoe,K3e=ese;function xE({delayDuration:e=0,...t}){return A.jsx(H3e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function i0({...e}){return A.jsx(xE,{children:A.jsx(z3e,{"data-slot":"tooltip",...e})})}function r0({...e}){return A.jsx(V3e,{"data-slot":"tooltip-trigger",...e})}function a0({className:e,sideOffset:t=0,children:n,...i}){return A.jsx(G3e,{children:A.jsxs(q3e,{"data-slot":"tooltip-content",sideOffset:t,className:Ft("bg-gray-900 text-gray-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-1001 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance dark:bg-gray-50 dark:text-gray-900",e),...i,children:[n,A.jsx(K3e,{className:"bg-gray-900 fill-primary z-1001 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] dark:bg-gray-50"})]})})}function tse({links:e,isCollapsed:t,closeNav:n}){const i=({sub:r,...a})=>{const o=`${a.title}-${a.href}`;return t&&r?S.createElement(X3e,{...a,sub:r,key:o,closeNav:n}):t?S.createElement(Y3e,{...a,key:o,closeNav:n}):r?S.createElement(W3e,{...a,sub:r,key:o,closeNav:n}):S.createElement(nse,{...a,key:o,closeNav:n})};return A.jsx(Hoe,{className:"h-screen pb-40",children:A.jsx(xE,{delayDuration:0,children:A.jsx("nav",{className:"grid grid-cols-1 items-start gap-2",children:e.map(i)})})})}function nse({title:e,icon:t,label:n,href:i,action:r,closeNav:a,subLink:o=!1}){return r?A.jsxs("button",{onClick:()=>{r(),a()},className:Ft(NA({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6 w-full",o&&"h-10 w-full border-l border-l-slate-500 px-2"),children:[A.jsx("div",{className:"mr-2",children:t}),e,n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]}):A.jsxs(qr,{to:i,onClick:a,className:Ft(NA({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":"page",children:[A.jsx("div",{className:"mr-2",children:t}),e,n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]})}function W3e({title:e,icon:t,label:n,sub:i,closeNav:r}){const a=!!i?.find(o=>o.href===window.location.pathname);return A.jsxs(bOe,{defaultOpen:a,children:[A.jsxs(kOe,{className:Ft(NA({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[A.jsx("div",{className:"mr-2",children:t}),A.jsx("div",{className:"font-semibold tracking-tight",children:e}),n&&A.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n}),A.jsx("span",{className:Ft('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:A.jsx(Ti,{})})]}),A.jsx(wOe,{className:"collapsibleDropdown",asChild:!0,children:A.jsx("ul",{children:i.map(o=>A.jsx("li",{className:"my-1 ml-8",children:A.jsx(nse,{...o,subLink:!0,closeNav:r})},o.title))})})]})}function Y3e({title:e,icon:t,label:n,href:i,action:r}){return A.jsxs(i0,{delayDuration:0,children:[A.jsx(r0,{asChild:!0,children:r?A.jsxs(bt,{variant:"ghost",size:"icon",className:"h-12 w-12",onClick:r,children:[t,A.jsx("span",{className:"sr-only",children:e})]}):A.jsxs(qr,{to:i,className:Ft(NA({variant:"ghost",size:"icon"}),"h-12 w-12"),children:[t,A.jsx("span",{className:"sr-only",children:e})]})}),A.jsxs(a0,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e,n&&A.jsx("span",{className:"ml-auto text-muted-foreground",children:n})]})]})}function X3e({title:e,icon:t,label:n,sub:i}){const r=!!i?.find(a=>a.href===window.location.pathname);return A.jsxs(Noe,{children:[A.jsxs(i0,{delayDuration:0,children:[A.jsx(r0,{asChild:!0,children:A.jsx(Coe,{asChild:!0,children:A.jsx(bt,{variant:r?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),A.jsxs(a0,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e," ",n&&A.jsx("span",{className:"ml-auto text-muted-foreground",children:n}),A.jsx(Ti,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),A.jsxs(_oe,{side:"right",align:"start",sideOffset:4,children:[A.jsxs(Foe,{children:[e," ",n?`(${n})`:""]}),A.jsx(Eoe,{}),i.map(({title:a,icon:o,label:s,href:l,action:c})=>A.jsx(Wb,{asChild:!c,children:c?A.jsxs("button",{onClick:c,className:Ft(NA({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6 w-full"),children:[o," ",A.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&A.jsx("span",{className:"ml-auto text-xs",children:s})]}):A.jsxs(qr,{to:l,className:Ft(NA({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6"),children:[o," ",A.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&A.jsx("span",{className:"ml-auto text-xs",children:s})]})},`${a}-${l||a}`))]})]})}const EC=[{title:"Charges",label:"",href:"",icon:A.jsx(ty,{size:18}),sub:[{title:"All Charges",label:"",href:ki.CHARGES.ALL,icon:A.jsx(ty,{size:18})},{title:"Missing Info Charges",label:"",href:ki.CHARGES.MISSING_INFO,icon:A.jsx(kFe,{size:18})},{title:"Ledger Validation",label:"",href:ki.CHARGES.LEDGER_VALIDATION,icon:A.jsx(z_e,{size:18})}]},{title:"Reports",label:"",href:"",icon:A.jsx(vFe,{size:18}),sub:[{title:"VAT Monthly Report",label:"",href:ki.REPORTS.VAT_MONTHLY,icon:A.jsx(ty,{size:18})},{title:"Trial Balance Report",label:"",href:ki.REPORTS.TRIAL_BALANCE,icon:A.jsx(oie,{size:18})},{title:"Conto Report",label:"",href:ki.REPORTS.CONTO,icon:A.jsx(pFe,{size:18})},{title:"Profit and Loss Report",label:"",href:ki.REPORTS.PROFIT_AND_LOSS(),icon:A.jsx(GP,{size:18})},{title:"Tax Report",label:"",href:ki.REPORTS.TAX(),icon:A.jsx(K9,{size:18})},{title:"Corporate Tax Ruling Compliance Report",label:"",href:ki.REPORTS.CORPORATE_TAX_RULING_COMPLIANCE(),icon:A.jsx(K9,{size:18})},{title:"Depreciation Report",label:"",href:ki.REPORTS.DEPRECIATION,icon:A.jsx(J_e,{size:18})},{title:"Shaam 6111 Report",label:"",href:ki.REPORTS.SHAAM_6111,icon:A.jsx(GP,{size:18})},{title:"Accountant Approvals",label:"",href:ki.ACCOUNTANT_APPROVALS,icon:A.jsx(W_e,{size:18})},{title:"Yearly Ledger Report",label:"",href:ki.REPORTS.YEARLY_LEDGER,icon:A.jsx(CFe,{size:18})},{title:"Transactions Balance",label:"",href:ki.REPORTS.BALANCE,icon:A.jsx(t2e,{size:18})},{title:"Validate Reports",label:"",href:ki.REPORTS.VALIDATE_REPORTS,icon:A.jsx(i2e,{size:18})},{title:"Generate Uniform Files",label:"",icon:A.jsx(Jne,{size:18})}]},{title:"Financial Entities",label:"",href:"",icon:A.jsx(z2e,{size:18}),sub:[{title:"Businesses",label:"",href:ki.BUSINESSES.ALL,icon:A.jsx(_2e,{size:18})},{title:"Business Transactions",label:"",href:ki.BUSINESSES.TRANSACTIONS,icon:A.jsx(j_e,{size:18})},{title:"Tax Categories",label:"",href:ki.TAX_CATEGORIES,icon:A.jsx(I_e,{size:18})},{title:"Sort Codes",label:"",href:ki.SORT_CODES,icon:A.jsx(G_e,{size:18})}]},{title:"Documents",label:"",href:"",icon:A.jsx(G9,{size:18}),sub:[{href:ki.DOCUMENTS.ALL,title:"All Documents",label:"",icon:A.jsx(G9,{size:18})},{title:"Issue Documents",label:"",href:ki.DOCUMENTS.ISSUE_DOCUMENTS,icon:A.jsx(H9,{size:18})},{title:"Issue Document",label:"",href:ki.DOCUMENTS.ISSUE_DOCUMENT,icon:A.jsx(H9,{size:18})}]},{href:ki.BUSINESS_TRIPS.ALL,title:"Business Trips",label:"",icon:A.jsx(uFe,{size:18})},{title:"Charts",label:"",href:"",icon:A.jsx(PD,{size:18}),sub:[{title:"Main",label:"",href:ki.CHARTS.MAIN,icon:A.jsx(PD,{size:18})},{title:"Monthly Income/Expense",label:"",href:ki.CHARTS.MONTHLY_INCOME_EXPENSE,icon:A.jsx(PD,{size:18})}]},{href:ki.SALARIES,title:"Salaries",label:"",icon:A.jsx(U_e,{size:18})},{href:ki.TAGS,title:"Tags",label:"",icon:A.jsx(OFe,{size:18})}];function Z3e(){const[e,t]=S.useState(!1),[n,i]=S.useState(!1),r=EC.map(a=>a.sub?{...a,sub:a.sub.map(o=>o.title==="Generate Uniform Files"?{...o,action:()=>{t(!1),i(!0)}}:o)}:a);return A.jsxs(A.Fragment,{children:[A.jsxs(uOe,{open:e,onOpenChange:t,children:[A.jsx(fOe,{asChild:!0,children:A.jsx(nFe,{})}),A.jsx(hOe,{side:"left",className:"px-0!",children:A.jsx("div",{className:"space-y-4 py-4",children:A.jsxs("div",{className:"px-3 py-2",children:[A.jsx("h2",{className:"mb-2 px-4 text-lg font-semibold tracking-tight",children:"Overview"}),A.jsx("div",{className:"space-y-1",children:A.jsx(tse,{isCollapsed:!1,links:r,closeNav:()=>t(!1)})})]})})})]}),A.jsx(sae,{open:n,onOpenChange:i})]})}function BC(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function J3e(e,t,n){for(let i=e-1;i>=0;i-=1)if(!t[i].disabled)return i;if(n){for(let i=t.length-1;i>-1;i-=1)if(!t[i].disabled)return i}return e}function e6e(e,t,n){for(let i=e+1;i<t.length;i+=1)if(!t[i].disabled)return i;if(n){for(let i=0;i<t.length;i+=1)if(!t[i].disabled)return i}return e}function t6e(e,t,n){return BC(e,n)===BC(t,n)}function ise({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:i=!0,activateOnFocus:r=!1,dir:a="rtl",orientation:o}){return s=>{var l;n?.(s);const c=Array.from(((l=BC(s.currentTarget,e))==null?void 0:l.querySelectorAll(t))||[]).filter(h=>t6e(s.currentTarget,h,e)),d=c.findIndex(h=>s.currentTarget===h),u=e6e(d,c,i),m=J3e(d,c,i);switch(s.key){case"ArrowRight":break;case"ArrowLeft":break;case"ArrowUp":{s.stopPropagation(),s.preventDefault(),c[m].focus(),r&&c[m].click();break}case"ArrowDown":{s.stopPropagation(),s.preventDefault(),c[u].focus(),r&&c[u].click();break}case"Home":{s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const h=c.length-1;!c[h].disabled&&c[h].focus();break}}}}function n6e(e,t,n){var i;return n?Array.from(((i=BC(n,t))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===n):null}function rd(e){const t=S.createContext(null);return[({children:r,value:a})=>V.createElement(t.Provider,{value:a},r),()=>{const r=S.useContext(t);if(r===null)throw new Error(e);return r}]}function rse(e){return Array.isArray(e)?e:[e]}function Kz(e,t){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(t);return`${e}-${n}`}}const i6e=()=>{};function r6e(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||i6e:n=>{var i;n.key==="Escape"&&(e(n),(i=t.onTrigger)==null||i.call(t))}}function ic(e,t){return n=>{e?.(n),t?.(n)}}function a6e(){const[e,t]=S.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function ase({data:e}){const t=[],n=[],i=e.reduce((r,a,o)=>(a.group?r[a.group]?r[a.group].push(o):r[a.group]=[o]:n.push(o),r),{});return Object.keys(i).forEach(r=>{t.push(...i[r].map(a=>e[a]))}),t.push(...n.map(r=>e[r])),t}function o0(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==V.Fragment:!1}function ose(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ose(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function sse(){for(var e=0,t,n,i="";e<arguments.length;)(t=arguments[e++])&&(n=ose(t))&&(i&&(i+=" "),i+=n);return i}const o6e={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function s6e(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var l6e=Object.defineProperty,Wz=Object.getOwnPropertySymbols,c6e=Object.prototype.hasOwnProperty,d6e=Object.prototype.propertyIsEnumerable,Yz=(e,t,n)=>t in e?l6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xz=(e,t)=>{for(var n in t||(t={}))c6e.call(t,n)&&Yz(e,n,t[n]);if(Wz)for(var n of Wz(t))d6e.call(t,n)&&Yz(e,n,t[n]);return e};function u6e(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:Xz({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:Xz({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function B1(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function Ij(e){const t=B1(e);return(n,i,r=!0,a=!0)=>{if(typeof n=="string"&&n.includes(".")){const[s,l]=n.split("."),c=parseInt(l,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof i=="number"&&!a?i:c]}const o=typeof i=="number"?i:t();return n in e.colors?e.colors[n][o]:r?e.colors[e.primaryColor][o]:n}}function lse(e){let t="";for(let n=1;n<e.length-1;n+=1)t+=`${e[n]} ${n/(e.length-1)*100}%, `;return`${e[0]} 0%, ${t}${e[e.length-1]} 100%`}function f6e(e,...t){return`linear-gradient(${e}deg, ${lse(t)})`}function A6e(...e){return`radial-gradient(circle, ${lse(e)})`}function cse(e){const t=Ij(e),n=B1(e);return i=>{const r={from:i?.from||e.defaultGradient.from,to:i?.to||e.defaultGradient.to,deg:i?.deg||e.defaultGradient.deg};return`linear-gradient(${r.deg}deg, ${t(r.from,n(),!1)} 0%, ${t(r.to,n(),!1)} 100%)`}}function dse(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const n=t.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${e}`}return t}}const Ge=dse("rem"),s0=dse("em");function Dt({size:e,sizes:t,units:n}){return e in t?t[e]:typeof e=="number"?n==="em"?s0(e):Ge(e):e||t.md}function Jd(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function m6e(e){return t=>`@media (min-width: ${s0(Jd(Dt({size:t,sizes:e.breakpoints})))})`}function h6e(e){return t=>`@media (max-width: ${s0(Jd(Dt({size:t,sizes:e.breakpoints}))-1)})`}function p6e(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function g6e(e){let t=e.replace("#","");if(t.length===3){const o=t.split("");t=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}const n=parseInt(t,16),i=n>>16&255,r=n>>8&255,a=n&255;return{r:i,g:r,b:a,a:1}}function v6e(e){const[t,n,i,r]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:n,b:i,a:r||1}}function Oj(e){return p6e(e)?g6e(e):e.startsWith("rgb")?v6e(e):{r:0,g:0,b:0,a:1}}function Ov(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r:n,g:i,b:r}=Oj(e);return`rgba(${n}, ${i}, ${r}, ${t})`}function y6e(e=0){return{position:"absolute",top:Ge(e),right:Ge(e),left:Ge(e),bottom:Ge(e)}}function b6e(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:i,b:r,a}=Oj(e),o=1-t,s=l=>Math.round(l*o);return`rgba(${s(n)}, ${s(i)}, ${s(r)}, ${a})`}function k6e(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:i,b:r,a}=Oj(e),o=s=>Math.round(s+(255-s)*t);return`rgba(${o(n)}, ${o(i)}, ${o(r)}, ${a})`}function w6e(e){return t=>{if(typeof t=="number")return Ge(t);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}}function S6e(e,t){if(typeof e=="string"&&e.includes(".")){const[n,i]=e.split("."),r=parseInt(i,10);if(n in t.colors&&r>=0&&r<10)return{isSplittedColor:!0,key:n,shade:r}}return{isSplittedColor:!1}}function x6e(e){const t=Ij(e),n=B1(e),i=cse(e);return({variant:r,color:a,gradient:o,primaryFallback:s})=>{const l=S6e(a,e);switch(r){case"light":return{border:"transparent",background:Ov(t(a,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),hover:Ov(t(a,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),hover:Ov(t(a,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(a,e.colorScheme==="dark"?5:n("light")),background:"transparent",color:t(a,e.colorScheme==="dark"?5:n("light")),hover:e.colorScheme==="dark"?Ov(t(a,5,s,!1),.05):Ov(t(a,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(a,n()),hover:null};case"transparent":return{border:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:i(o),color:e.white,border:"transparent",hover:null};default:{const c=n(),d=l.isSplittedColor?l.shade:c,u=l.isSplittedColor?l.key:a;return{border:"transparent",background:t(u,d,s),color:e.white,hover:t(u,d===9?8:d+1)}}}}}function N6e(e){return t=>{const n=B1(e)(t);return e.colors[e.primaryColor][n]}}function C6e(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function _6e(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function F6e(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const No={fontStyles:s6e,themeColor:Ij,focusStyles:u6e,linearGradient:f6e,radialGradient:A6e,smallerThan:h6e,largerThan:m6e,rgba:Ov,cover:y6e,darken:b6e,lighten:k6e,radius:w6e,variant:x6e,primaryShade:B1,hover:C6e,gradient:cse,primaryColor:N6e,placeholderStyles:_6e,dimmed:F6e};var E6e=Object.defineProperty,B6e=Object.defineProperties,D6e=Object.getOwnPropertyDescriptors,Zz=Object.getOwnPropertySymbols,T6e=Object.prototype.hasOwnProperty,I6e=Object.prototype.propertyIsEnumerable,Jz=(e,t,n)=>t in e?E6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O6e=(e,t)=>{for(var n in t||(t={}))T6e.call(t,n)&&Jz(e,n,t[n]);if(Zz)for(var n of Zz(t))I6e.call(t,n)&&Jz(e,n,t[n]);return e},P6e=(e,t)=>B6e(e,D6e(t));function use(e){return P6e(O6e({},e),{fn:{fontStyles:No.fontStyles(e),themeColor:No.themeColor(e),focusStyles:No.focusStyles(e),largerThan:No.largerThan(e),smallerThan:No.smallerThan(e),radialGradient:No.radialGradient,linearGradient:No.linearGradient,gradient:No.gradient(e),rgba:No.rgba,cover:No.cover,lighten:No.lighten,darken:No.darken,primaryShade:No.primaryShade(e),radius:No.radius(e),variant:No.variant(e),hover:No.hover,primaryColor:No.primaryColor(e),placeholderStyles:No.placeholderStyles(e),dimmed:No.dimmed(e)}})}const fse=["xs","sm","md","lg","xl"],R6e={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:o6e,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},Pj=use(R6e);function j6e(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function M6e(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var L6e=(function(){function e(n){var i=this;this._insertTag=function(r){var a;i.tags.length===0?i.insertionPoint?a=i.insertionPoint.nextSibling:i.prepend?a=i.container.firstChild:a=i.before:a=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,a),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(i){i.forEach(this._insertTag)},t.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(M6e(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=j6e(r);try{a.insertRule(i,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},t.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},e})(),Ns="-ms-",DC="-moz-",nr="-webkit-",Ase="comm",Rj="rule",jj="decl",$6e="@import",mse="@keyframes",U6e="@layer",Q6e=Math.abs,NE=String.fromCharCode,H6e=Object.assign;function z6e(e,t){return as(e,0)^45?(((t<<2^as(e,0))<<2^as(e,1))<<2^as(e,2))<<2^as(e,3):0}function hse(e){return e.trim()}function V6e(e,t){return(e=t.exec(e))?e[0]:e}function ir(e,t,n){return e.replace(t,n)}function hR(e,t){return e.indexOf(t)}function as(e,t){return e.charCodeAt(t)|0}function Mk(e,t,n){return e.slice(t,n)}function Vu(e){return e.length}function Mj(e){return e.length}function MS(e,t){return t.push(e),e}function G6e(e,t){return e.map(t).join("")}var CE=1,By=1,pse=0,Bl=0,lo=0,l0="";function _E(e,t,n,i,r,a,o){return{value:e,root:t,parent:n,type:i,props:r,children:a,line:CE,column:By,length:o,return:""}}function gb(e,t){return H6e(_E("",null,null,"",null,null,0),e,{length:-e.length},t)}function q6e(){return lo}function K6e(){return lo=Bl>0?as(l0,--Bl):0,By--,lo===10&&(By=1,CE--),lo}function sc(){return lo=Bl<pse?as(l0,Bl++):0,By++,lo===10&&(By=1,CE++),lo}function tf(){return as(l0,Bl)}function IN(){return Bl}function D1(e,t){return Mk(l0,e,t)}function Lk(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gse(e){return CE=By=1,pse=Vu(l0=e),Bl=0,[]}function vse(e){return l0="",e}function ON(e){return hse(D1(Bl-1,pR(e===91?e+2:e===40?e+1:e)))}function W6e(e){for(;(lo=tf())&&lo<33;)sc();return Lk(e)>2||Lk(lo)>3?"":" "}function Y6e(e,t){for(;--t&&sc()&&!(lo<48||lo>102||lo>57&&lo<65||lo>70&&lo<97););return D1(e,IN()+(t<6&&tf()==32&&sc()==32))}function pR(e){for(;sc();)switch(lo){case e:return Bl;case 34:case 39:e!==34&&e!==39&&pR(lo);break;case 40:e===41&&pR(e);break;case 92:sc();break}return Bl}function X6e(e,t){for(;sc()&&e+lo!==57;)if(e+lo===84&&tf()===47)break;return"/*"+D1(t,Bl-1)+"*"+NE(e===47?e:sc())}function Z6e(e){for(;!Lk(tf());)sc();return D1(e,Bl)}function J6e(e){return vse(PN("",null,null,null,[""],e=gse(e),0,[0],e))}function PN(e,t,n,i,r,a,o,s,l){for(var c=0,d=0,u=o,m=0,h=0,v=0,g=1,k=1,b=1,w=0,C="",N=r,_=a,F=i,B=C;k;)switch(v=w,w=sc()){case 40:if(v!=108&&as(B,u-1)==58){hR(B+=ir(ON(w),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:B+=ON(w);break;case 9:case 10:case 13:case 32:B+=W6e(v);break;case 92:B+=Y6e(IN()-1,7);continue;case 47:switch(tf()){case 42:case 47:MS(eje(X6e(sc(),IN()),t,n),l);break;default:B+="/"}break;case 123*g:s[c++]=Vu(B)*b;case 125*g:case 59:case 0:switch(w){case 0:case 125:k=0;case 59+d:b==-1&&(B=ir(B,/\f/g,"")),h>0&&Vu(B)-u&&MS(h>32?tV(B+";",i,n,u-1):tV(ir(B," ","")+";",i,n,u-2),l);break;case 59:B+=";";default:if(MS(F=eV(B,t,n,c,d,r,s,C,N=[],_=[],u),a),w===123)if(d===0)PN(B,t,F,F,N,a,u,s,_);else switch(m===99&&as(B,3)===110?100:m){case 100:case 108:case 109:case 115:PN(e,F,F,i&&MS(eV(e,F,F,0,0,r,s,C,r,N=[],u),_),r,_,u,s,i?N:_);break;default:PN(B,F,F,F,[""],_,0,s,_)}}c=d=h=0,g=b=1,C=B="",u=o;break;case 58:u=1+Vu(B),h=v;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&K6e()==125)continue}switch(B+=NE(w),w*g){case 38:b=d>0?1:(B+="\f",-1);break;case 44:s[c++]=(Vu(B)-1)*b,b=1;break;case 64:tf()===45&&(B+=ON(sc())),m=tf(),d=u=Vu(C=B+=Z6e(IN())),w++;break;case 45:v===45&&Vu(B)==2&&(g=0)}}return a}function eV(e,t,n,i,r,a,o,s,l,c,d){for(var u=r-1,m=r===0?a:[""],h=Mj(m),v=0,g=0,k=0;v<i;++v)for(var b=0,w=Mk(e,u+1,u=Q6e(g=o[v])),C=e;b<h;++b)(C=hse(g>0?m[b]+" "+w:ir(w,/&\f/g,m[b])))&&(l[k++]=C);return _E(e,t,n,r===0?Rj:s,l,c,d)}function eje(e,t,n){return _E(e,t,n,Ase,NE(q6e()),Mk(e,2,-2),0)}function tV(e,t,n,i){return _E(e,t,n,jj,Mk(e,0,i),Mk(e,i+1,-1),i)}function ay(e,t){for(var n="",i=Mj(e),r=0;r<i;r++)n+=t(e[r],r,e,t)||"";return n}function tje(e,t,n,i){switch(e.type){case U6e:if(e.children.length)break;case $6e:case jj:return e.return=e.return||e.value;case Ase:return"";case mse:return e.return=e.value+"{"+ay(e.children,i)+"}";case Rj:e.value=e.props.join(",")}return Vu(n=ay(e.children,i))?e.return=e.value+"{"+n+"}":""}function nje(e){var t=Mj(e);return function(n,i,r,a){for(var o="",s=0;s<t;s++)o+=e[s](n,i,r,a)||"";return o}}function ije(e){return function(t){t.root||(t=t.return)&&e(t)}}var nV=function(t){var n=new WeakMap;return function(i){if(n.has(i))return n.get(i);var r=t(i);return n.set(i,r),r}};function yse(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rje=function(t,n,i){for(var r=0,a=0;r=a,a=tf(),r===38&&a===12&&(n[i]=1),!Lk(a);)sc();return D1(t,Bl)},aje=function(t,n){var i=-1,r=44;do switch(Lk(r)){case 0:r===38&&tf()===12&&(n[i]=1),t[i]+=rje(Bl-1,n,i);break;case 2:t[i]+=ON(r);break;case 4:if(r===44){t[++i]=tf()===58?"&\f":"",n[i]=t[i].length;break}default:t[i]+=NE(r)}while(r=sc());return t},oje=function(t,n){return vse(aje(gse(t),n))},iV=new WeakMap,sje=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,i=t.parent,r=t.column===i.column&&t.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!iV.get(i))&&!r){iV.set(t,!0);for(var a=[],o=oje(n,a),s=i.props,l=0,c=0;l<o.length;l++)for(var d=0;d<s.length;d++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[d]):s[d]+" "+o[l]}}},lje=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function bse(e,t){switch(z6e(e,t)){case 5103:return nr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return nr+e+DC+e+Ns+e+e;case 6828:case 4268:return nr+e+Ns+e+e;case 6165:return nr+e+Ns+"flex-"+e+e;case 5187:return nr+e+ir(e,/(\w+).+(:[^]+)/,nr+"box-$1$2"+Ns+"flex-$1$2")+e;case 5443:return nr+e+Ns+"flex-item-"+ir(e,/flex-|-self/,"")+e;case 4675:return nr+e+Ns+"flex-line-pack"+ir(e,/align-content|flex-|-self/,"")+e;case 5548:return nr+e+Ns+ir(e,"shrink","negative")+e;case 5292:return nr+e+Ns+ir(e,"basis","preferred-size")+e;case 6060:return nr+"box-"+ir(e,"-grow","")+nr+e+Ns+ir(e,"grow","positive")+e;case 4554:return nr+ir(e,/([^-])(transform)/g,"$1"+nr+"$2")+e;case 6187:return ir(ir(ir(e,/(zoom-|grab)/,nr+"$1"),/(image-set)/,nr+"$1"),e,"")+e;case 5495:case 3959:return ir(e,/(image-set\([^]*)/,nr+"$1$`$1");case 4968:return ir(ir(e,/(.+:)(flex-)?(.*)/,nr+"box-pack:$3"+Ns+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nr+e+e;case 4095:case 3583:case 4068:case 2532:return ir(e,/(.+)-inline(.+)/,nr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vu(e)-1-t>6)switch(as(e,t+1)){case 109:if(as(e,t+4)!==45)break;case 102:return ir(e,/(.+:)(.+)-([^]+)/,"$1"+nr+"$2-$3$1"+DC+(as(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~hR(e,"stretch")?bse(ir(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(as(e,t+1)!==115)break;case 6444:switch(as(e,Vu(e)-3-(~hR(e,"!important")&&10))){case 107:return ir(e,":",":"+nr)+e;case 101:return ir(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nr+(as(e,14)===45?"inline-":"")+"box$3$1"+nr+"$2$3$1"+Ns+"$2box$3")+e}break;case 5936:switch(as(e,t+11)){case 114:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nr+e+Ns+ir(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nr+e+Ns+e+e}return e}var cje=function(t,n,i,r){if(t.length>-1&&!t.return)switch(t.type){case jj:t.return=bse(t.value,t.length);break;case mse:return ay([gb(t,{value:ir(t.value,"@","@"+nr)})],r);case Rj:if(t.length)return G6e(t.props,function(a){switch(V6e(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ay([gb(t,{props:[ir(a,/:(read-\w+)/,":"+DC+"$1")]})],r);case"::placeholder":return ay([gb(t,{props:[ir(a,/:(plac\w+)/,":"+nr+"input-$1")]}),gb(t,{props:[ir(a,/:(plac\w+)/,":"+DC+"$1")]}),gb(t,{props:[ir(a,/:(plac\w+)/,Ns+"input-$1")]})],r)}return""})}},dje=[cje],kse=function(t){var n=t.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(g){var k=g.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=t.stylisPlugins||dje,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var k=g.getAttribute("data-emotion").split(" "),b=1;b<k.length;b++)a[k[b]]=!0;s.push(g)});var l,c=[sje,lje];{var d,u=[tje,ije(function(g){d.insert(g)})],m=nje(c.concat(r,u)),h=function(k){return ay(J6e(k),m)};l=function(k,b,w,C){d=w,h(k?k+"{"+b.styles+"}":b.styles),C&&(v.inserted[b.name]=!0)}}var v={key:n,sheet:new L6e({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return v.sheet.hydrate(s),v};function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Yr.apply(null,arguments)}var D4={exports:{}},dr={};/** @license React v16.13.1
|
|
578
578
|
* react-is.production.min.js
|
|
579
579
|
*
|
|
580
580
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -611,7 +611,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
611
611
|
* LICENSE.md file in the root directory of this source tree.
|
|
612
612
|
*
|
|
613
613
|
* @license MIT
|
|
614
|
-
*/function Yc(e,t){return e?wit(e)?S.createElement(e,t):e:null}function wit(e){return Sit(e)||typeof e=="function"||xit(e)}function Sit(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function xit(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function g0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=S.useState(()=>({current:git(t)})),[i,r]=S.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...i,...e.state},onStateChange:o=>{r(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}function Jp({className:e,...t}){return A.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:A.jsx("table",{"data-slot":"table",className:Ft("w-full caption-bottom text-sm",e),...t})})}function eg({className:e,...t}){return A.jsx("thead",{"data-slot":"table-header",className:Ft("[&_tr]:border-b",e),...t})}function tg({className:e,...t}){return A.jsx("tbody",{"data-slot":"table-body",className:Ft("[&_tr:last-child]:border-0",e),...t})}function Go({className:e,...t}){return A.jsx("tr",{"data-slot":"table-row",className:Ft("hover:bg-gray-100/50 data-[state=selected]:bg-gray-100 border-b transition-colors dark:hover:bg-gray-800/50 dark:data-[state=selected]:bg-gray-800",e),...t})}function wl({className:e,...t}){return A.jsx("th",{"data-slot":"table-head",className:Ft("text-gray-950 h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] dark:text-gray-50",e),...t})}function Qo({className:e,...t}){return A.jsx("td",{"data-slot":"table-cell",className:Ft("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Nit="updateDocument",v0=()=>{const[{fetching:e},t]=or(y4e),n=S.useCallback(async i=>{const r=`Error updating document ID [${i.documentId}]`,a=`${Nit}-${i.documentId}`;Bt.loading("Updating document",{id:a});try{const o=await t(i),s=sr(o,r,a,"updateDocument");if(s)return Bt.success("Success",{id:a,description:"Document updated"}),s.updateDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateDocument:n}},Wme=(e,t)=>{const n=t?JSON.parse(decodeURIComponent(t)):{};return Np({fromDate:n.fromDate,toDate:n.toDate,ownerIds:n.byOwners,businessIDs:[e]})},Yme=[Zn.Unprocessed,Zn.Other],Cit=({document:e,onChange:t})=>{const{get:n}=Xp(),i="creditor"in e?e.creditor:void 0,r=!e.documentType||!Yme.includes(e.documentType),a=r&&!i?.id||Zn.Unprocessed===e.documentType,{selectableBusinesses:o,refresh:s}=h0(),l=n("chargesFilters"),c=S.useCallback(_=>Wme(_,l),[l]),d=S.useMemo(()=>{if(i||!("missingInfoSuggestions"in e)||!e.missingInfoSuggestions)return;const _=e.missingInfoSuggestions.owner,F=e.missingInfoSuggestions.counterparty;if(e.missingInfoSuggestions?.isIncome==null){if(e.debtor?.id){const B=e.debtor.id;if(_?.id===B&&F)return F;if(F?.id===B&&_)return _}}else{if(e.missingInfoSuggestions.isIncome&&_)return _;if(!e.missingInfoSuggestions.isIncome&&F)return F}},[e,i]),u=!i&&!!d,m=i??d,{name:h="Missing",id:v}=m||{},{updateDocument:g,fetching:k}=v0(),b=S.useCallback(_=>{_!==void 0&&g({documentId:e.id,fields:{creditorId:_}}).then(e.onUpdate)},[e.id,g,e.onUpdate]),[w,C]=S.useState(null),N=S.useCallback(async _=>{await b(_),s(),t?.()},[b,t,s]);return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:r&&(v?A.jsx(qr,{to:c(v),target:"_blank",rel:"noreferrer",onClick:_=>_.stopPropagation(),className:"inline-flex items-center font-semibold",children:h}):A.jsx(o8,{options:o,value:v??null,onChange:_=>_&&b(_),search:w,onSearchChange:C,placeholder:"Choose or create a business",empty:w?A.jsx(F$,{description:w,onAdd:N}):null}))})}),u&&A.jsx(aw,{onClick:()=>b(d.id),disabled:k})]})},_it=({document:e})=>{const t="amount"in e?e.amount:void 0,n="missingInfoSuggestions"in e?e.missingInfoSuggestions?.amount:void 0,i=!t&&!!n,r=t??n,{updateDocument:a,fetching:o}=v0(),s=S.useCallback(d=>{d!==void 0&&a({documentId:e.id,fields:{amount:{raw:d.raw,currency:d.currency}}}).then(e.onUpdate)},[e.id,a,e.onUpdate]),c=Zn.Other!==e.documentType&&r?.formatted==null;return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!c,color:"red",zIndex:"auto",children:A.jsx("p",{className:["whitespace-nowrap",i?"bg-yellow-400":"",Number(r?.raw)>0?"text-green-700":"text-red-500"].join(" "),children:r?.formatted})})}),i&&A.jsx(aw,{onClick:()=>s(n),disabled:o})]})},Fit=({document:e})=>{const t="date"in e?e.date:void 0,n=Zn.Other!==e.documentType,i=n&&!t,r=t?Qi(new Date(t),"dd/MM/yy"):"Missing Data",a=n?r:null;return A.jsx(co,{inline:!0,size:12,disabled:!i,color:"red",zIndex:"auto",children:A.jsx("div",{children:a})})},Eit=({document:e,onChange:t})=>{const{get:n}=Xp(),i="debtor"in e?e.debtor:void 0,r=!e.documentType||!Yme.includes(e.documentType),a=r&&!i?.id||Zn.Unprocessed===e.documentType,{selectableBusinesses:o,refresh:s}=h0(),l=n("chargesFilters"),c=S.useCallback(_=>Wme(_,l),[l]),d=S.useMemo(()=>{if(i||!("missingInfoSuggestions"in e)||!e.missingInfoSuggestions)return;const _=e.missingInfoSuggestions.owner,F=e.missingInfoSuggestions.counterparty;if(e.missingInfoSuggestions?.isIncome==null){if(e.creditor?.id){const B=e.creditor.id;if(_?.id===B&&F)return F;if(F?.id===B&&_)return _}}else{if(e.missingInfoSuggestions.isIncome&&F)return F;if(!e.missingInfoSuggestions.isIncome&&_)return _}},[e,i]),u=!i&&!!d,m=i??d,{name:h="Missing",id:v}=m||{},{updateDocument:g,fetching:k}=v0(),b=S.useCallback(_=>{_!==void 0&&g({documentId:e.id,fields:{debtorId:_}}).then(e.onUpdate)},[e.id,g,e.onUpdate]),[w,C]=S.useState(null),N=S.useCallback(async _=>{await b(_),s(),t?.()},[b,t,s]);return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:r&&(v?A.jsx(qr,{to:c(v),target:"_blank",rel:"noreferrer",onClick:_=>_.stopPropagation(),className:"inline-flex items-center font-semibold",children:h}):A.jsx(o8,{options:o,value:v??null,onChange:_=>_&&b(_),search:w,onSearchChange:C,placeholder:"Choose or create a business",empty:w?A.jsx(F$,{description:w,onAdd:N}):null}))})}),u&&A.jsx(aw,{onClick:()=>b(d.id),disabled:k})]})},Bit=({document:e})=>{let t="";if("issuedDocumentInfo"in e&&e.issuedDocumentInfo?.originalDocument?.income){const{income:n}=e.issuedDocumentInfo.originalDocument;t=n.map(i=>i.description).join(", ")}return A.jsx("div",{className:"flex flex-col align-center justify-center flex-wrap",children:A.jsx("p",{children:t})})},Dit=({document:{image:e,file:t}})=>{const[n,i]=S.useState(!1);return A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:A.jsxs(fM,{cols:1,children:[A.jsx(Mr,{disabled:!e,label:"Open Image",children:A.jsx(co,{inline:!0,size:12,disabled:!!e,color:"red",zIndex:"auto",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",disabled:!e,onClick:()=>i(!!e),children:A.jsx(nie,{className:"size-5"})})})}),A.jsx(Mr,{disabled:!t,label:"Open File",children:A.jsx(co,{inline:!0,size:12,disabled:!!t,color:"red",zIndex:"auto",children:t?A.jsx("a",{href:typeof t=="string"?t:t.href,target:"_blank",rel:"noreferrer",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",children:A.jsx(G9,{className:"size-5"})})}):A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",disabled:!0,children:A.jsx(G9,{className:"size-5"})})})})]})})}),e&&A.jsx(au,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:n,onClose:()=>i(!1),size:"30%",children:A.jsx("div",{className:"m-2",children:A.jsx(Mke,{src:e.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})},Tit=({document:e})=>{const t="serialNumber"in e?e.serialNumber:void 0,n="allocationNumber"in e?e.allocationNumber:void 0,r=Zn.Other!==e.documentType&&!t;return A.jsxs("div",{className:"flex flex-col align-center justify-center flex-wrap",children:[A.jsx(co,{inline:!0,size:12,disabled:!r,color:"red",zIndex:"auto",children:A.jsx("p",{children:t})}),n&&A.jsxs("p",{className:"text-xs",children:["(",n,")"]})]})},Iit=({document:{documentType:e},isOpen:t})=>{const n=!e||e===Zn.Unprocessed,i=e??Zn.Unprocessed,r=n?"red":t?"orange":"blue";return A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!n&&!t,color:r,zIndex:"auto",children:A.jsx("p",{children:Ik(i)})})})})},Oit=({document:e})=>{const t="vat"in e?e.vat:void 0,i=Zn.Other!==e.documentType&&t?.formatted==null;return A.jsx(co,{inline:!0,size:12,disabled:!i,color:"red",zIndex:"auto",children:A.jsx("div",{style:{color:Number(t?.raw)>0?"green":"red",whiteSpace:"nowrap"},children:t?.formatted})})},HN=[{id:"date",accessorKey:"date",sortingFn:e=>"date"in e.original&&e.original.date?new Date(e.original.date).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Fit,{document:e.original})},{id:"amount",accessorKey:"amount.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(_it,{document:e.original})},{id:"vat",accessorKey:"vat.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["VAT",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Oit,{document:e.original})},{id:"type",accessorKey:"documentType",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Type",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Iit,{document:e.original,isOpen:"issuedDocumentInfo"in e.original&&e.original.issuedDocumentInfo?.status==="OPEN"})},{id:"serial",accessorKey:"serialNumber",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Serial",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Tit,{document:e.original})},{id:"description",accessorKey:"issuedDocumentInfo.originalDocument.income",header:"Description",cell:({row:e})=>A.jsx(Bit,{document:e.original})},{id:"creditor",accessorKey:"creditor.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Creditor",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Cit,{document:e.original,onChange:e.original.onUpdate})},{id:"debtor",accessorKey:"debtor.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Debtor",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Eit,{document:e.original,onChange:e.original.onUpdate})},{id:"file",accessorKey:"file",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["files",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Dit,{document:e.original})},{id:"edit",accessorKey:"id",header:"Edit",cell:({row:e})=>A.jsxs("div",{className:"flex flex-col items-center gap-2",children:[A.jsx(D$,{onClick:e.original.editDocument,tooltip:"Edit Document"}),"issuedDocumentInfo"in e.original&&e.original.issuedDocumentInfo?.status==="OPEN"&&A.jsxs(A.Fragment,{children:[A.jsx(Ict,{documentId:e.original.id,couldIssueCreditInvoice:e.original.documentType===Zn.Invoice||e.original.documentType===Zn.InvoiceReceipt}),A.jsx(c1,{documentId:e.original.id,tooltip:"Issue Document out of This Document"})]})]})}],Xme=({documentsProps:e,onChange:t,limited:n=!1})=>{const[i,r]=S.useState(void 0),[a,o]=S.useState([]),s=S.useMemo(()=>e?.map(m=>{const h=si(dre,m);return{...h,editDocument:()=>r(h.id),onUpdate:t}}),[e,t]),[l,c]=S.useState({}),d=["date","amount","vat","type","serial","file"],u=g0({data:s,columns:n?HN.filter(m=>m.id&&d.includes(m.id)):HN,getCoreRowModel:p0(),onSortingChange:o,getSortedRowModel:q1(),onColumnVisibilityChange:c,state:{sorting:a,columnVisibility:l}});return A.jsxs(A.Fragment,{children:[A.jsxs(Jp,{children:[A.jsx(eg,{children:u.getHeaderGroups().map(m=>A.jsx(Go,{children:m.headers.map(h=>A.jsx(wl,{colSpan:h.colSpan,children:h.isPlaceholder?null:Yc(h.column.columnDef.header,h.getContext())},h.id))},m.id))}),A.jsx(tg,{children:u.getRowModel().rows?.length?u.getRowModel().rows.map(m=>A.jsx(Go,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(h=>A.jsx(Qo,{children:Yc(h.column.columnDef.cell,h.getContext())},h.id))},m.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:HN.length,className:"h-24 text-center",children:"No results."})})})]}),A.jsx(awe,{documentId:i,onDone:()=>r(void 0),onChange:t})]})},Pit=_6("inline-flex items-center justify-center rounded-md border border-gray-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",{variants:{variant:{default:"border-transparent bg-gray-900 text-gray-50 [a&]:hover:bg-gray-900/90 dark:bg-gray-50 dark:text-gray-900 dark:[a&]:hover:bg-gray-50/90",secondary:"border-transparent bg-gray-100 text-gray-900 [a&]:hover:bg-gray-100/90 dark:bg-gray-800 dark:text-gray-50 dark:[a&]:hover:bg-gray-800/90",destructive:"border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40 dark:dark:bg-red-900/60",outline:"text-gray-950 [a&]:hover:bg-gray-100 [a&]:hover:text-gray-900 dark:text-gray-50 dark:[a&]:hover:bg-gray-800 dark:[a&]:hover:text-gray-50"}},defaultVariants:{variant:"default"}});function _p({className:e,variant:t,asChild:n=!1,...i}){const r=n?E6:"span";return A.jsx(r,{"data-slot":"badge",className:Ft(Pit({variant:t}),e),...i})}const yx=({foreignAmount:e,localAmount:t,diff:n})=>{const i=e!=null&&e.currency!==vn.Ils,r=n&&n.localAmount?.formatted!==t?.formatted,a=n&&n.foreignAmount?.formatted!==e?.formatted;return A.jsx("div",{className:"flex flex-col",children:(t||r)&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"flex gap-2 items-center",children:[i&&A.jsx("p",{className:a?"line-through":"",children:e.formatted}),a&&n.foreignAmount&&A.jsx("p",{className:"border-2 border-yellow-500 rounded-md",children:n.foreignAmount.formatted})]}),A.jsxs("div",{className:"flex gap-2 items-center",children:[t!=null&&A.jsx("p",{className:r?"line-through":"",children:t.formatted}),r&&n.localAmount&&A.jsx("p",{className:"border-2 border-yellow-500 rounded-md",children:n.localAmount.formatted})]})]})})},bx=({account:e,diffAccount:t})=>{const{get:n}=Xp(),i=n("chargesFilters"),r=S.useCallback(o=>{let s={};if(i)try{const l=decodeURIComponent(i);s=JSON.parse(l)}catch(l){console.error("Failed to parse filters from URL:",l)}return Np({ownerIds:s.byOwners||[],businessIDs:[o],...s.fromDate&&{fromDate:s.fromDate},...s.toDate&&{toDate:s.toDate}})},[i]),a=t&&t?.id!==e?.id;return A.jsx("div",{className:"flex flex-col whitespace-normal",children:(e||a)&&A.jsxs(A.Fragment,{children:[e&&A.jsx(qr,{to:r(e.id),target:"_blank",rel:"noreferrer",onClick:o=>o.stopPropagation(),className:`inline-flex items-center font-semibold ${a?"line-through":""}`,children:e.name}),a&&t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:A.jsx(qr,{to:r(t.id),target:"_blank",rel:"noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex items-center font-semibold",children:t.name})})]})})},NX=({date:e,diff:t})=>{const n=e?Qi(new Date(e),"dd/MM/yy"):void 0,i=t?Qi(new Date(t),"dd/MM/yy"):void 0,r=i&&n!==i;return A.jsxs(A.Fragment,{children:[A.jsx("p",{className:r?"line-through":"",children:n??"Missing Data"}),r&&A.jsx("div",{className:"flex flex-col border-2 border-yellow-500 rounded-md",children:i})]})},CX=[{accessorKey:"invoiceDate",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Invoice Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(NX,{date:e.original.invoiceDate,diff:e.original.diff?.invoiceDate})},{accessorKey:"valueDate",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Value Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(NX,{date:e.original.valueDate,diff:e.original.diff?.valueDate})},{header:"Debit Account1",columns:[{accessorKey:"debitAccount1.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.debitAccount1,diffAccount:e.original.diff?.debitAccount1})},{accessorKey:"localCurrencyDebitAmount1.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.debitAmount1,localAmount:e.original.localCurrencyDebitAmount1,diff:e.original.diff?{foreignAmount:e.original.diff.debitAmount1,localAmount:e.original.diff.localCurrencyDebitAmount1}:void 0})}]},{header:"Credit Account1",columns:[{accessorKey:"creditAccount1.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.creditAccount1,diffAccount:e.original.diff?.creditAccount1})},{accessorKey:"localCurrencyCreditAmount1.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.creditAmount1,localAmount:e.original.localCurrencyCreditAmount1,diff:e.original.diff?{foreignAmount:e.original.diff.creditAmount1,localAmount:e.original.diff.localCurrencyCreditAmount1}:void 0})}]},{header:"Debit Account2",columns:[{accessorKey:"debitAccount2.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.debitAccount2,diffAccount:e.original.diff?.debitAccount2})},{accessorKey:"localCurrencyDebitAmount2.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.debitAmount2,localAmount:e.original.localCurrencyDebitAmount2,diff:e.original.diff?{foreignAmount:e.original.diff.debitAmount2,localAmount:e.original.diff.localCurrencyDebitAmount2}:void 0})}]},{header:"Credit Account2",columns:[{accessorKey:"creditAccount2.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.creditAccount2,diffAccount:e.original.diff?.creditAccount2})},{accessorKey:"localCurrencyCreditAmount2.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.creditAmount2,localAmount:e.original.localCurrencyCreditAmount2,diff:e.original.diff?{foreignAmount:e.original.diff.creditAmount2,localAmount:e.original.diff.localCurrencyCreditAmount2}:void 0})}]},{accessorKey:"description",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Details",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:e}})=>{const t=e.diff&&e.diff.description!==e.description;return A.jsxs("div",{className:"flex flex-col whitespace-normal",children:[A.jsx("p",{className:t?"line-through":"",children:e.description}),t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:e.diff?.description})]})}},{accessorKey:"reference",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Reference",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:e}})=>{const t=e.diff&&e.diff.reference!==e.reference;return A.jsxs("div",{className:"flex flex-col whitespace-normal",children:[A.jsx("p",{className:t?"line-through":"",children:e.reference}),t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:e.diff?.reference})]})}},{accessorKey:"matchingStatus",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Status",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:{matchingStatus:e}}})=>{if(e){const t=e==="Deleted"?"bg-red-500":e==="Diff"?"bg-yellow-500":"bg-green-500";return A.jsx(_p,{variant:"default",className:t,children:e})}return null}}];function Rit(e){let t="";switch(e){case"New":t="bg-green-100/30";break;case"Deleted":t="bg-red-100/30";break;case"Diff":t="bg-yellow-100/30";break}return t}const jit=({ledgerFragment:e})=>{const{ledger:t}=si(bre,e),[n,i]=S.useState([]),r=S.useMemo(()=>{const o=t.records.map(l=>{const c=t.validate?.differences?.find(d=>d.id===l.id);return{...l,matchingStatus:!t.validate?.matches||t.validate.matches?.includes(l.id)?void 0:c?"Diff":"Deleted",diff:c}}),s=t?.validate?.differences?.filter(l=>l.id===y1).map(l=>({...l,matchingStatus:"New"}))??[];return o.push(...s),o},[t]),a=g0({data:r,columns:CX,getCoreRowModel:p0(),onSortingChange:i,getSortedRowModel:q1(),state:{sorting:n}});return A.jsxs(Jp,{children:[A.jsx(eg,{children:a.getHeaderGroups().map(o=>A.jsx(Go,{children:o.headers.map(s=>A.jsx(wl,{colSpan:s.colSpan,children:s.isPlaceholder?null:Yc(s.column.columnDef.header,s.getContext())},s.id))},o.id))}),A.jsx(tg,{children:a.getRowModel().rows?.length?a.getRowModel().rows.map(o=>A.jsx(Go,{"data-state":o.getIsSelected()&&"selected",className:Rit(o.original.matchingStatus),children:o.getVisibleCells().map(s=>A.jsx(Qo,{children:Yc(s.column.columnDef.cell,s.getContext())},s.id))},o.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:CX.length,className:"h-24 text-center",children:"No results."})})})]})},Mit=({data:e})=>{const t=si(cre,e);return t?.errorsLedger?.validate?.errors?.length?A.jsxs(A0,{shadow:"xs",p:"md",children:[A.jsx(Xi,{c:"red",children:"Errors:"}),A.jsx(Py,{size:"sm",withPadding:!0,children:t.errorsLedger.validate.errors.map((n,i)=>A.jsx(Py.Item,{children:A.jsx(Xi,{c:"red",children:n})},i))})]}):null},Zme=({transaction:e})=>{const t="effectiveDate"in e?e.effectiveDate:void 0;return A.jsxs("div",{className:"flex flex-col justify-center",children:[A.jsx("div",{children:t&&Qi(new Date(t),"dd/MM/yy")}),e.sourceEffectiveDate&&A.jsxs("div",{className:"text-xs text-gray-500",children:["(Originally ",Qi(new Date(e.sourceEffectiveDate),"dd/MM/yy"),")"]})]})},Jme=({transaction:e})=>{const t="eventDate"in e?e.eventDate:void 0;return A.jsx("div",{className:"flex flex-col justify-center",children:t&&Qi(new Date(t),"dd/MM/yy")})},ehe=({transaction:e})=>{const t="amount"in e?e.amount:void 0;return A.jsxs("div",{style:{color:Number(t?.raw)>0?"green":"red",whiteSpace:"nowrap"},children:[t?.formatted,A.jsx("br",{}),e.cryptoExchangeRate&&A.jsxs("span",{style:{color:"gray",marginLeft:"0.5rem"},children:[`(Rate: ${e.cryptoExchangeRate.rate})`,A.jsx("br",{}),t?.raw?`${Bre(t.raw*e.cryptoExchangeRate.rate)}$`:null]})]})},the=({transaction:e})=>{const{account:t}=e,n=t.type,i=t.name;return A.jsxs("div",{className:"flex flex-col justify-center",children:[A.jsx("p",{children:n}),A.jsx("p",{children:i})]})},nhe=({transaction:e})=>{const t="sourceDescription"in e?e.sourceDescription:"Missing";return A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:t})})},ihe=({transaction:e})=>A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:e.referenceKey})}),Lit="updateTransaction",LM=()=>{const[{fetching:e},t]=or(k4e),n=S.useCallback(async i=>{const r=`Error updating transaction ID [${i.transactionId}]`,a=`${Lit}-${i.transactionId}`;Bt.loading("Updating Transaction",{id:a});try{const o=await t(i),s=sr(o,r,a,"updateTransaction");if(s)return Bt.success("Success",{id:a,description:"Transaction updated"}),s.updateTransaction}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTransaction:n}},rhe=Object.freeze({status:"aborted"});function st(e,t,n){function i(s,l){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,l);for(const d in o.prototype)d in s||Object.defineProperty(s,d,{value:o.prototype[d].bind(s)});s._zod.constr=o,s._zod.def=l}const r=n?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function o(s){var l;const c=n?.Parent?new a:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}const ahe=Symbol("zod_brand");class Ap extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class YE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const X2={};function Ws(e){return e&&Object.assign(X2,e),X2}function $it(e){return e}function Uit(e){return e}function Qit(e){}function Hit(e){throw new Error}function zit(e){}function $M(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function Qt(e,t="|"){return e.map(n=>qn(n)).join(t)}function Z2(e,t){return typeof t=="bigint"?t.toString():t}function K1(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ng(e){return e==null}function XE(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ohe(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){const l=i.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const a=n>r?n:r,o=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(t.toFixed(a).replace(".",""));return o%s/10**a}const _X=Symbol("evaluating");function Fi(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==_X)return i===void 0&&(i=_X,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Vit(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ah(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function IA(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function Git(e){return IA(e._zod.def)}function qit(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function Kit(e){const t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{const r={};for(let a=0;a<t.length;a++)r[t[a]]=i[a];return r})}function Wit(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function zR(e){return JSON.stringify(e)}const UM="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ry(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const she=K1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Fp(e){if(Ry(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Ry(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ZE(e){return Fp(e)?{...e}:Array.isArray(e)?[...e]:e}function Yit(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}const Xit=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},J2=new Set(["string","number","symbol"]),lhe=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Km(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sd(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Rt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Zit(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,a){return t??(t=e()),Reflect.set(t,i,r,a)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function qn(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function che(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const dhe={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uhe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fhe(e,t){const n=e._zod.def,i=IA(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=n.shape[a])}return ah(this,"shape",r),r},checks:[]});return sd(e,i)}function Ahe(e,t){const n=e._zod.def,i=IA(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return ah(this,"shape",r),r},checks:[]});return sd(e,i)}function mhe(e,t){if(!Fp(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=IA(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ah(this,"shape",a),a},checks:[]});return sd(e,r)}function hhe(e,t){if(!Fp(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return ah(this,"shape",i),i},checks:e._zod.def.checks};return sd(e,n)}function phe(e,t){const n=IA(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ah(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return sd(e,n)}function ghe(e,t,n){const i=IA(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=e?new e({type:"optional",innerType:r[o]}):r[o])}else for(const o in r)a[o]=e?new e({type:"optional",innerType:r[o]}):r[o];return ah(this,"shape",a),a},checks:[]});return sd(t,i)}function vhe(e,t,n){const i=IA(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const o in n){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=new e({type:"nonoptional",innerType:r[o]}))}else for(const o in r)a[o]=new e({type:"nonoptional",innerType:r[o]});return ah(this,"shape",a),a},checks:[]});return sd(t,i)}function ip(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qd(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Xb(e){return typeof e=="string"?e:e?.message}function eu(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=Xb(e.inst?._zod.def?.error?.(e))??Xb(t?.error?.(e))??Xb(n.customError?.(e))??Xb(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function JE(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function eB(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function jy(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function Jit(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function yhe(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function bhe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function ert(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return yhe(t+n)}function trt(e){return bhe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function nrt(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function irt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class rrt{constructor(...t){}}const khe=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:uhe,Class:rrt,NUMBER_FORMAT_RANGES:dhe,aborted:ip,allowsEval:she,assert:zit,assertEqual:$it,assertIs:Qit,assertNever:Hit,assertNotEqual:Uit,assignProp:ah,base64ToUint8Array:yhe,base64urlToUint8Array:ert,cached:K1,captureStackTrace:UM,cleanEnum:Jit,cleanRegex:XE,clone:sd,cloneDef:Git,createTransparentProxy:Zit,defineLazy:Fi,esc:zR,escapeRegex:Km,extend:mhe,finalizeIssue:eu,floatSafeRemainder:ohe,getElementAtPath:qit,getEnumValues:$M,getLengthableOrigin:eB,getParsedType:Xit,getSizableOrigin:JE,hexToUint8Array:nrt,isObject:Ry,isPlainObject:Fp,issue:jy,joinValues:Qt,jsonStringifyReplacer:Z2,merge:phe,mergeDefs:IA,normalizeParams:Rt,nullish:ng,numKeys:Yit,objectClone:Vit,omit:Ahe,optionalKeys:che,partial:ghe,pick:fhe,prefixIssues:Qd,primitiveTypes:lhe,promiseAllObject:Kit,propertyKeyTypes:J2,randomString:Wit,required:vhe,safeExtend:hhe,shallowClone:ZE,stringifyPrimitive:qn,uint8ArrayToBase64:bhe,uint8ArrayToBase64url:trt,uint8ArrayToHex:irt,unwrapMessage:Xb},Symbol.toStringTag,{value:"Module"})),whe=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Z2,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tB=st("$ZodError",whe),mc=st("$ZodError",whe,{Parent:Error});function QM(e,t=n=>n.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function HM(e,t=n=>n.message){const n={_errors:[]},i=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>i({issues:o}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(t(a));else{let o=n,s=0;for(;s<a.path.length;){const l=a.path[s];s===a.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(a))):o[l]=o[l]||{_errors:[]},o=o[l],s++}}};return i(e),n}function She(e,t=n=>n.message){const n={errors:[]},i=(r,a=[])=>{var o,s;for(const l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{const c=[...a,...l.path];if(c.length===0){n.errors.push(t(l));continue}let d=n,u=0;for(;u<c.length;){const m=c[u],h=u===c.length-1;typeof m=="string"?(d.properties??(d.properties={}),(o=d.properties)[m]??(o[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(s=d.items)[m]??(s[m]={errors:[]}),d=d.items[m]),h&&d.errors.push(t(l)),u++}}};return i(e),n}function xhe(e){const t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(const i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Nhe(e){const t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(const i of n)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${xhe(i.path)}`);return t.join(`
|
|
614
|
+
*/function Yc(e,t){return e?wit(e)?S.createElement(e,t):e:null}function wit(e){return Sit(e)||typeof e=="function"||xit(e)}function Sit(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function xit(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function g0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=S.useState(()=>({current:git(t)})),[i,r]=S.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...i,...e.state},onStateChange:o=>{r(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}function Jp({className:e,...t}){return A.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:A.jsx("table",{"data-slot":"table",className:Ft("w-full caption-bottom text-sm",e),...t})})}function eg({className:e,...t}){return A.jsx("thead",{"data-slot":"table-header",className:Ft("[&_tr]:border-b",e),...t})}function tg({className:e,...t}){return A.jsx("tbody",{"data-slot":"table-body",className:Ft("[&_tr:last-child]:border-0",e),...t})}function Go({className:e,...t}){return A.jsx("tr",{"data-slot":"table-row",className:Ft("hover:bg-gray-100/50 data-[state=selected]:bg-gray-100 border-b transition-colors dark:hover:bg-gray-800/50 dark:data-[state=selected]:bg-gray-800",e),...t})}function wl({className:e,...t}){return A.jsx("th",{"data-slot":"table-head",className:Ft("text-gray-950 h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] dark:text-gray-50",e),...t})}function Qo({className:e,...t}){return A.jsx("td",{"data-slot":"table-cell",className:Ft("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const Nit="updateDocument",v0=()=>{const[{fetching:e},t]=or(y4e),n=S.useCallback(async i=>{const r=`Error updating document ID [${i.documentId}]`,a=`${Nit}-${i.documentId}`;Bt.loading("Updating document",{id:a});try{const o=await t(i),s=sr(o,r,a,"updateDocument");if(s)return Bt.success("Success",{id:a,description:"Document updated"}),s.updateDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateDocument:n}},Wme=(e,t)=>{const n=t?JSON.parse(decodeURIComponent(t)):{};return Np({fromDate:n.fromDate,toDate:n.toDate,ownerIds:n.byOwners,businessIDs:[e]})},Yme=[Zn.Unprocessed,Zn.Other],Cit=({document:e,onChange:t})=>{const{get:n}=Xp(),i="creditor"in e?e.creditor:void 0,r=!e.documentType||!Yme.includes(e.documentType),a=r&&!i?.id||Zn.Unprocessed===e.documentType,{selectableBusinesses:o,refresh:s}=h0(),l=n("chargesFilters"),c=S.useCallback(_=>Wme(_,l),[l]),d=S.useMemo(()=>{if(i||!("missingInfoSuggestions"in e)||!e.missingInfoSuggestions)return;const _=e.missingInfoSuggestions.owner,F=e.missingInfoSuggestions.counterparty;if(e.missingInfoSuggestions?.isIncome==null){if(e.debtor?.id){const B=e.debtor.id;if(_?.id===B&&F)return F;if(F?.id===B&&_)return _}}else{if(e.missingInfoSuggestions.isIncome&&_)return _;if(!e.missingInfoSuggestions.isIncome&&F)return F}},[e,i]),u=!i&&!!d,m=i??d,{name:h="Missing",id:v}=m||{},{updateDocument:g,fetching:k}=v0(),b=S.useCallback(_=>{_!==void 0&&g({documentId:e.id,fields:{creditorId:_}}).then(e.onUpdate)},[e.id,g,e.onUpdate]),[w,C]=S.useState(null),N=S.useCallback(async _=>{await b(_),s(),t?.()},[b,t,s]);return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:r&&(v?A.jsx(qr,{to:c(v),target:"_blank",rel:"noreferrer",onClick:_=>_.stopPropagation(),className:"inline-flex items-center font-semibold",children:h}):A.jsx(o8,{options:o,value:v??null,onChange:_=>_&&b(_),search:w,onSearchChange:C,placeholder:"Choose or create a business",empty:w?A.jsx(F$,{description:w,onAdd:N}):null}))})}),u&&A.jsx(aw,{onClick:()=>b(d.id),disabled:k})]})},_it=({document:e})=>{const t="amount"in e?e.amount:void 0,n="missingInfoSuggestions"in e?e.missingInfoSuggestions?.amount:void 0,i=!t&&!!n,r=t??n,{updateDocument:a,fetching:o}=v0(),s=S.useCallback(d=>{d!==void 0&&a({documentId:e.id,fields:{amount:{raw:d.raw,currency:d.currency}}}).then(e.onUpdate)},[e.id,a,e.onUpdate]),c=Zn.Other!==e.documentType&&r?.formatted==null;return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!c,color:"red",zIndex:"auto",children:A.jsx("p",{className:["whitespace-nowrap",i?"bg-yellow-400":"",Number(r?.raw)>0?"text-green-700":"text-red-500"].join(" "),children:r?.formatted})})}),i&&A.jsx(aw,{onClick:()=>s(n),disabled:o})]})},Fit=({document:e})=>{const t="date"in e?e.date:void 0,n=Zn.Other!==e.documentType,i=n&&!t,r=t?Qi(new Date(t),"dd/MM/yy"):"Missing Data",a=n?r:null;return A.jsx(co,{inline:!0,size:12,disabled:!i,color:"red",zIndex:"auto",children:A.jsx("div",{children:a})})},Eit=({document:e,onChange:t})=>{const{get:n}=Xp(),i="debtor"in e?e.debtor:void 0,r=!e.documentType||!Yme.includes(e.documentType),a=r&&!i?.id||Zn.Unprocessed===e.documentType,{selectableBusinesses:o,refresh:s}=h0(),l=n("chargesFilters"),c=S.useCallback(_=>Wme(_,l),[l]),d=S.useMemo(()=>{if(i||!("missingInfoSuggestions"in e)||!e.missingInfoSuggestions)return;const _=e.missingInfoSuggestions.owner,F=e.missingInfoSuggestions.counterparty;if(e.missingInfoSuggestions?.isIncome==null){if(e.creditor?.id){const B=e.creditor.id;if(_?.id===B&&F)return F;if(F?.id===B&&_)return _}}else{if(e.missingInfoSuggestions.isIncome&&F)return F;if(!e.missingInfoSuggestions.isIncome&&_)return _}},[e,i]),u=!i&&!!d,m=i??d,{name:h="Missing",id:v}=m||{},{updateDocument:g,fetching:k}=v0(),b=S.useCallback(_=>{_!==void 0&&g({documentId:e.id,fields:{debtorId:_}}).then(e.onUpdate)},[e.id,g,e.onUpdate]),[w,C]=S.useState(null),N=S.useCallback(async _=>{await b(_),s(),t?.()},[b,t,s]);return A.jsxs("div",{className:"flex flex-wrap",children:[A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:r&&(v?A.jsx(qr,{to:c(v),target:"_blank",rel:"noreferrer",onClick:_=>_.stopPropagation(),className:"inline-flex items-center font-semibold",children:h}):A.jsx(o8,{options:o,value:v??null,onChange:_=>_&&b(_),search:w,onSearchChange:C,placeholder:"Choose or create a business",empty:w?A.jsx(F$,{description:w,onAdd:N}):null}))})}),u&&A.jsx(aw,{onClick:()=>b(d.id),disabled:k})]})},Bit=({document:e})=>{let t="";if("issuedDocumentInfo"in e&&e.issuedDocumentInfo?.originalDocument?.income){const{income:n}=e.issuedDocumentInfo.originalDocument;t=n.map(i=>i.description).join(", ")}return A.jsx("div",{className:"flex flex-col align-center justify-center flex-wrap",children:A.jsx("p",{children:t})})},Dit=({document:{image:e,file:t}})=>{const[n,i]=S.useState(!1);return A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:A.jsxs(fM,{cols:1,children:[A.jsx(Mr,{disabled:!e,label:"Open Image",children:A.jsx(co,{inline:!0,size:12,disabled:!!e,color:"red",zIndex:"auto",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",disabled:!e,onClick:()=>i(!!e),children:A.jsx(nie,{className:"size-5"})})})}),A.jsx(Mr,{disabled:!t,label:"Open File",children:A.jsx(co,{inline:!0,size:12,disabled:!!t,color:"red",zIndex:"auto",children:t?A.jsx("a",{href:typeof t=="string"?t:t.href,target:"_blank",rel:"noreferrer",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",children:A.jsx(q9,{className:"size-5"})})}):A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5",disabled:!0,children:A.jsx(q9,{className:"size-5"})})})})]})})}),e&&A.jsx(au,{classNames:{content:"overflow-y-auto drop-shadow-lg"},withCloseButton:!0,withOverlay:!1,position:"right",opened:n,onClose:()=>i(!1),size:"30%",children:A.jsx("div",{className:"m-2",children:A.jsx(Mke,{src:e.toString(),zoomLevel:3,magnifierHeight:300,magnifierWidth:300})})})]})},Tit=({document:e})=>{const t="serialNumber"in e?e.serialNumber:void 0,n="allocationNumber"in e?e.allocationNumber:void 0,r=Zn.Other!==e.documentType&&!t;return A.jsxs("div",{className:"flex flex-col align-center justify-center flex-wrap",children:[A.jsx(co,{inline:!0,size:12,disabled:!r,color:"red",zIndex:"auto",children:A.jsx("p",{children:t})}),n&&A.jsxs("p",{className:"text-xs",children:["(",n,")"]})]})},Iit=({document:{documentType:e},isOpen:t})=>{const n=!e||e===Zn.Unprocessed,i=e??Zn.Unprocessed,r=n?"red":t?"orange":"blue";return A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:A.jsx(co,{inline:!0,size:12,disabled:!n&&!t,color:r,zIndex:"auto",children:A.jsx("p",{children:Ik(i)})})})})},Oit=({document:e})=>{const t="vat"in e?e.vat:void 0,i=Zn.Other!==e.documentType&&t?.formatted==null;return A.jsx(co,{inline:!0,size:12,disabled:!i,color:"red",zIndex:"auto",children:A.jsx("div",{style:{color:Number(t?.raw)>0?"green":"red",whiteSpace:"nowrap"},children:t?.formatted})})},HN=[{id:"date",accessorKey:"date",sortingFn:e=>"date"in e.original&&e.original.date?new Date(e.original.date).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Fit,{document:e.original})},{id:"amount",accessorKey:"amount.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(_it,{document:e.original})},{id:"vat",accessorKey:"vat.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["VAT",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Oit,{document:e.original})},{id:"type",accessorKey:"documentType",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Type",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Iit,{document:e.original,isOpen:"issuedDocumentInfo"in e.original&&e.original.issuedDocumentInfo?.status==="OPEN"})},{id:"serial",accessorKey:"serialNumber",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Serial",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Tit,{document:e.original})},{id:"description",accessorKey:"issuedDocumentInfo.originalDocument.income",header:"Description",cell:({row:e})=>A.jsx(Bit,{document:e.original})},{id:"creditor",accessorKey:"creditor.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Creditor",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Cit,{document:e.original,onChange:e.original.onUpdate})},{id:"debtor",accessorKey:"debtor.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Debtor",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Eit,{document:e.original,onChange:e.original.onUpdate})},{id:"file",accessorKey:"file",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["files",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Dit,{document:e.original})},{id:"edit",accessorKey:"id",header:"Edit",cell:({row:e})=>A.jsxs("div",{className:"flex flex-col items-center gap-2",children:[A.jsx(D$,{onClick:e.original.editDocument,tooltip:"Edit Document"}),"issuedDocumentInfo"in e.original&&e.original.issuedDocumentInfo?.status==="OPEN"&&A.jsxs(A.Fragment,{children:[A.jsx(Ict,{documentId:e.original.id,couldIssueCreditInvoice:e.original.documentType===Zn.Invoice||e.original.documentType===Zn.InvoiceReceipt}),A.jsx(c1,{documentId:e.original.id,tooltip:"Issue Document out of This Document"})]})]})}],Xme=({documentsProps:e,onChange:t,limited:n=!1})=>{const[i,r]=S.useState(void 0),[a,o]=S.useState([]),s=S.useMemo(()=>e?.map(m=>{const h=si(dre,m);return{...h,editDocument:()=>r(h.id),onUpdate:t}}),[e,t]),[l,c]=S.useState({}),d=["date","amount","vat","type","serial","file"],u=g0({data:s,columns:n?HN.filter(m=>m.id&&d.includes(m.id)):HN,getCoreRowModel:p0(),onSortingChange:o,getSortedRowModel:q1(),onColumnVisibilityChange:c,state:{sorting:a,columnVisibility:l}});return A.jsxs(A.Fragment,{children:[A.jsxs(Jp,{children:[A.jsx(eg,{children:u.getHeaderGroups().map(m=>A.jsx(Go,{children:m.headers.map(h=>A.jsx(wl,{colSpan:h.colSpan,children:h.isPlaceholder?null:Yc(h.column.columnDef.header,h.getContext())},h.id))},m.id))}),A.jsx(tg,{children:u.getRowModel().rows?.length?u.getRowModel().rows.map(m=>A.jsx(Go,{"data-state":m.getIsSelected()&&"selected",children:m.getVisibleCells().map(h=>A.jsx(Qo,{children:Yc(h.column.columnDef.cell,h.getContext())},h.id))},m.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:HN.length,className:"h-24 text-center",children:"No results."})})})]}),A.jsx(awe,{documentId:i,onDone:()=>r(void 0),onChange:t})]})},Pit=_6("inline-flex items-center justify-center rounded-md border border-gray-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",{variants:{variant:{default:"border-transparent bg-gray-900 text-gray-50 [a&]:hover:bg-gray-900/90 dark:bg-gray-50 dark:text-gray-900 dark:[a&]:hover:bg-gray-50/90",secondary:"border-transparent bg-gray-100 text-gray-900 [a&]:hover:bg-gray-100/90 dark:bg-gray-800 dark:text-gray-50 dark:[a&]:hover:bg-gray-800/90",destructive:"border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40 dark:dark:bg-red-900/60",outline:"text-gray-950 [a&]:hover:bg-gray-100 [a&]:hover:text-gray-900 dark:text-gray-50 dark:[a&]:hover:bg-gray-800 dark:[a&]:hover:text-gray-50"}},defaultVariants:{variant:"default"}});function _p({className:e,variant:t,asChild:n=!1,...i}){const r=n?E6:"span";return A.jsx(r,{"data-slot":"badge",className:Ft(Pit({variant:t}),e),...i})}const yx=({foreignAmount:e,localAmount:t,diff:n})=>{const i=e!=null&&e.currency!==vn.Ils,r=n&&n.localAmount?.formatted!==t?.formatted,a=n&&n.foreignAmount?.formatted!==e?.formatted;return A.jsx("div",{className:"flex flex-col",children:(t||r)&&A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:"flex gap-2 items-center",children:[i&&A.jsx("p",{className:a?"line-through":"",children:e.formatted}),a&&n.foreignAmount&&A.jsx("p",{className:"border-2 border-yellow-500 rounded-md",children:n.foreignAmount.formatted})]}),A.jsxs("div",{className:"flex gap-2 items-center",children:[t!=null&&A.jsx("p",{className:r?"line-through":"",children:t.formatted}),r&&n.localAmount&&A.jsx("p",{className:"border-2 border-yellow-500 rounded-md",children:n.localAmount.formatted})]})]})})},bx=({account:e,diffAccount:t})=>{const{get:n}=Xp(),i=n("chargesFilters"),r=S.useCallback(o=>{let s={};if(i)try{const l=decodeURIComponent(i);s=JSON.parse(l)}catch(l){console.error("Failed to parse filters from URL:",l)}return Np({ownerIds:s.byOwners||[],businessIDs:[o],...s.fromDate&&{fromDate:s.fromDate},...s.toDate&&{toDate:s.toDate}})},[i]),a=t&&t?.id!==e?.id;return A.jsx("div",{className:"flex flex-col whitespace-normal",children:(e||a)&&A.jsxs(A.Fragment,{children:[e&&A.jsx(qr,{to:r(e.id),target:"_blank",rel:"noreferrer",onClick:o=>o.stopPropagation(),className:`inline-flex items-center font-semibold ${a?"line-through":""}`,children:e.name}),a&&t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:A.jsx(qr,{to:r(t.id),target:"_blank",rel:"noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex items-center font-semibold",children:t.name})})]})})},NX=({date:e,diff:t})=>{const n=e?Qi(new Date(e),"dd/MM/yy"):void 0,i=t?Qi(new Date(t),"dd/MM/yy"):void 0,r=i&&n!==i;return A.jsxs(A.Fragment,{children:[A.jsx("p",{className:r?"line-through":"",children:n??"Missing Data"}),r&&A.jsx("div",{className:"flex flex-col border-2 border-yellow-500 rounded-md",children:i})]})},CX=[{accessorKey:"invoiceDate",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Invoice Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(NX,{date:e.original.invoiceDate,diff:e.original.diff?.invoiceDate})},{accessorKey:"valueDate",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Value Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(NX,{date:e.original.valueDate,diff:e.original.diff?.valueDate})},{header:"Debit Account1",columns:[{accessorKey:"debitAccount1.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.debitAccount1,diffAccount:e.original.diff?.debitAccount1})},{accessorKey:"localCurrencyDebitAmount1.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.debitAmount1,localAmount:e.original.localCurrencyDebitAmount1,diff:e.original.diff?{foreignAmount:e.original.diff.debitAmount1,localAmount:e.original.diff.localCurrencyDebitAmount1}:void 0})}]},{header:"Credit Account1",columns:[{accessorKey:"creditAccount1.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.creditAccount1,diffAccount:e.original.diff?.creditAccount1})},{accessorKey:"localCurrencyCreditAmount1.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.creditAmount1,localAmount:e.original.localCurrencyCreditAmount1,diff:e.original.diff?{foreignAmount:e.original.diff.creditAmount1,localAmount:e.original.diff.localCurrencyCreditAmount1}:void 0})}]},{header:"Debit Account2",columns:[{accessorKey:"debitAccount2.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.debitAccount2,diffAccount:e.original.diff?.debitAccount2})},{accessorKey:"localCurrencyDebitAmount2.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.debitAmount2,localAmount:e.original.localCurrencyDebitAmount2,diff:e.original.diff?{foreignAmount:e.original.diff.debitAmount2,localAmount:e.original.diff.localCurrencyDebitAmount2}:void 0})}]},{header:"Credit Account2",columns:[{accessorKey:"creditAccount2.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(bx,{account:e.original.creditAccount2,diffAccount:e.original.diff?.creditAccount2})},{accessorKey:"localCurrencyCreditAmount2.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(yx,{foreignAmount:e.original.creditAmount2,localAmount:e.original.localCurrencyCreditAmount2,diff:e.original.diff?{foreignAmount:e.original.diff.creditAmount2,localAmount:e.original.diff.localCurrencyCreditAmount2}:void 0})}]},{accessorKey:"description",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Details",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:e}})=>{const t=e.diff&&e.diff.description!==e.description;return A.jsxs("div",{className:"flex flex-col whitespace-normal",children:[A.jsx("p",{className:t?"line-through":"",children:e.description}),t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:e.diff?.description})]})}},{accessorKey:"reference",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Reference",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:e}})=>{const t=e.diff&&e.diff.reference!==e.reference;return A.jsxs("div",{className:"flex flex-col whitespace-normal",children:[A.jsx("p",{className:t?"line-through":"",children:e.reference}),t&&A.jsx("div",{className:"border-2 border-yellow-500 rounded-md",children:e.diff?.reference})]})}},{accessorKey:"matchingStatus",header:({column:e})=>A.jsxs(bt,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Status",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:{original:{matchingStatus:e}}})=>{if(e){const t=e==="Deleted"?"bg-red-500":e==="Diff"?"bg-yellow-500":"bg-green-500";return A.jsx(_p,{variant:"default",className:t,children:e})}return null}}];function Rit(e){let t="";switch(e){case"New":t="bg-green-100/30";break;case"Deleted":t="bg-red-100/30";break;case"Diff":t="bg-yellow-100/30";break}return t}const jit=({ledgerFragment:e})=>{const{ledger:t}=si(bre,e),[n,i]=S.useState([]),r=S.useMemo(()=>{const o=t.records.map(l=>{const c=t.validate?.differences?.find(d=>d.id===l.id);return{...l,matchingStatus:!t.validate?.matches||t.validate.matches?.includes(l.id)?void 0:c?"Diff":"Deleted",diff:c}}),s=t?.validate?.differences?.filter(l=>l.id===y1).map(l=>({...l,matchingStatus:"New"}))??[];return o.push(...s),o},[t]),a=g0({data:r,columns:CX,getCoreRowModel:p0(),onSortingChange:i,getSortedRowModel:q1(),state:{sorting:n}});return A.jsxs(Jp,{children:[A.jsx(eg,{children:a.getHeaderGroups().map(o=>A.jsx(Go,{children:o.headers.map(s=>A.jsx(wl,{colSpan:s.colSpan,children:s.isPlaceholder?null:Yc(s.column.columnDef.header,s.getContext())},s.id))},o.id))}),A.jsx(tg,{children:a.getRowModel().rows?.length?a.getRowModel().rows.map(o=>A.jsx(Go,{"data-state":o.getIsSelected()&&"selected",className:Rit(o.original.matchingStatus),children:o.getVisibleCells().map(s=>A.jsx(Qo,{children:Yc(s.column.columnDef.cell,s.getContext())},s.id))},o.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:CX.length,className:"h-24 text-center",children:"No results."})})})]})},Mit=({data:e})=>{const t=si(cre,e);return t?.errorsLedger?.validate?.errors?.length?A.jsxs(A0,{shadow:"xs",p:"md",children:[A.jsx(Xi,{c:"red",children:"Errors:"}),A.jsx(Py,{size:"sm",withPadding:!0,children:t.errorsLedger.validate.errors.map((n,i)=>A.jsx(Py.Item,{children:A.jsx(Xi,{c:"red",children:n})},i))})]}):null},Zme=({transaction:e})=>{const t="effectiveDate"in e?e.effectiveDate:void 0;return A.jsxs("div",{className:"flex flex-col justify-center",children:[A.jsx("div",{children:t&&Qi(new Date(t),"dd/MM/yy")}),e.sourceEffectiveDate&&A.jsxs("div",{className:"text-xs text-gray-500",children:["(Originally ",Qi(new Date(e.sourceEffectiveDate),"dd/MM/yy"),")"]})]})},Jme=({transaction:e})=>{const t="eventDate"in e?e.eventDate:void 0;return A.jsx("div",{className:"flex flex-col justify-center",children:t&&Qi(new Date(t),"dd/MM/yy")})},ehe=({transaction:e})=>{const t="amount"in e?e.amount:void 0;return A.jsxs("div",{style:{color:Number(t?.raw)>0?"green":"red",whiteSpace:"nowrap"},children:[t?.formatted,A.jsx("br",{}),e.cryptoExchangeRate&&A.jsxs("span",{style:{color:"gray",marginLeft:"0.5rem"},children:[`(Rate: ${e.cryptoExchangeRate.rate})`,A.jsx("br",{}),t?.raw?`${Bre(t.raw*e.cryptoExchangeRate.rate)}$`:null]})]})},the=({transaction:e})=>{const{account:t}=e,n=t.type,i=t.name;return A.jsxs("div",{className:"flex flex-col justify-center",children:[A.jsx("p",{children:n}),A.jsx("p",{children:i})]})},nhe=({transaction:e})=>{const t="sourceDescription"in e?e.sourceDescription:"Missing";return A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:t})})},ihe=({transaction:e})=>A.jsx("div",{className:"flex flex-wrap",children:A.jsx("div",{className:"flex flex-col justify-center",children:e.referenceKey})}),Lit="updateTransaction",LM=()=>{const[{fetching:e},t]=or(k4e),n=S.useCallback(async i=>{const r=`Error updating transaction ID [${i.transactionId}]`,a=`${Lit}-${i.transactionId}`;Bt.loading("Updating Transaction",{id:a});try{const o=await t(i),s=sr(o,r,a,"updateTransaction");if(s)return Bt.success("Success",{id:a,description:"Transaction updated"}),s.updateTransaction}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTransaction:n}},rhe=Object.freeze({status:"aborted"});function st(e,t,n){function i(s,l){var c;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(c=s._zod).traits??(c.traits=new Set),s._zod.traits.add(e),t(s,l);for(const d in o.prototype)d in s||Object.defineProperty(s,d,{value:o.prototype[d].bind(s)});s._zod.constr=o,s._zod.def=l}const r=n?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function o(s){var l;const c=n?.Parent?new a:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}const ahe=Symbol("zod_brand");class Ap extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class YE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const X2={};function Ws(e){return e&&Object.assign(X2,e),X2}function $it(e){return e}function Uit(e){return e}function Qit(e){}function Hit(e){throw new Error}function zit(e){}function $M(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function Qt(e,t="|"){return e.map(n=>qn(n)).join(t)}function Z2(e,t){return typeof t=="bigint"?t.toString():t}function K1(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ng(e){return e==null}function XE(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ohe(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){const l=i.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}const a=n>r?n:r,o=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(t.toFixed(a).replace(".",""));return o%s/10**a}const _X=Symbol("evaluating");function Fi(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==_X)return i===void 0&&(i=_X,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Vit(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ah(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function IA(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function Git(e){return IA(e._zod.def)}function qit(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function Kit(e){const t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{const r={};for(let a=0;a<t.length;a++)r[t[a]]=i[a];return r})}function Wit(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function zR(e){return JSON.stringify(e)}const UM="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ry(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const she=K1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Fp(e){if(Ry(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Ry(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ZE(e){return Fp(e)?{...e}:Array.isArray(e)?[...e]:e}function Yit(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}const Xit=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},J2=new Set(["string","number","symbol"]),lhe=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Km(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sd(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Rt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Zit(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,a){return t??(t=e()),Reflect.set(t,i,r,a)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function qn(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function che(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const dhe={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uhe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function fhe(e,t){const n=e._zod.def,i=IA(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=n.shape[a])}return ah(this,"shape",r),r},checks:[]});return sd(e,i)}function Ahe(e,t){const n=e._zod.def,i=IA(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return ah(this,"shape",r),r},checks:[]});return sd(e,i)}function mhe(e,t){if(!Fp(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=IA(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ah(this,"shape",a),a},checks:[]});return sd(e,r)}function hhe(e,t){if(!Fp(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return ah(this,"shape",i),i},checks:e._zod.def.checks};return sd(e,n)}function phe(e,t){const n=IA(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ah(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return sd(e,n)}function ghe(e,t,n){const i=IA(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=e?new e({type:"optional",innerType:r[o]}):r[o])}else for(const o in r)a[o]=e?new e({type:"optional",innerType:r[o]}):r[o];return ah(this,"shape",a),a},checks:[]});return sd(t,i)}function vhe(e,t,n){const i=IA(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(n)for(const o in n){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=new e({type:"nonoptional",innerType:r[o]}))}else for(const o in r)a[o]=new e({type:"nonoptional",innerType:r[o]});return ah(this,"shape",a),a},checks:[]});return sd(t,i)}function ip(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qd(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Xb(e){return typeof e=="string"?e:e?.message}function eu(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=Xb(e.inst?._zod.def?.error?.(e))??Xb(t?.error?.(e))??Xb(n.customError?.(e))??Xb(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function JE(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function eB(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function jy(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function Jit(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function yhe(e){const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function bhe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function ert(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return yhe(t+n)}function trt(e){return bhe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function nrt(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function irt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class rrt{constructor(...t){}}const khe=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:uhe,Class:rrt,NUMBER_FORMAT_RANGES:dhe,aborted:ip,allowsEval:she,assert:zit,assertEqual:$it,assertIs:Qit,assertNever:Hit,assertNotEqual:Uit,assignProp:ah,base64ToUint8Array:yhe,base64urlToUint8Array:ert,cached:K1,captureStackTrace:UM,cleanEnum:Jit,cleanRegex:XE,clone:sd,cloneDef:Git,createTransparentProxy:Zit,defineLazy:Fi,esc:zR,escapeRegex:Km,extend:mhe,finalizeIssue:eu,floatSafeRemainder:ohe,getElementAtPath:qit,getEnumValues:$M,getLengthableOrigin:eB,getParsedType:Xit,getSizableOrigin:JE,hexToUint8Array:nrt,isObject:Ry,isPlainObject:Fp,issue:jy,joinValues:Qt,jsonStringifyReplacer:Z2,merge:phe,mergeDefs:IA,normalizeParams:Rt,nullish:ng,numKeys:Yit,objectClone:Vit,omit:Ahe,optionalKeys:che,partial:ghe,pick:fhe,prefixIssues:Qd,primitiveTypes:lhe,promiseAllObject:Kit,propertyKeyTypes:J2,randomString:Wit,required:vhe,safeExtend:hhe,shallowClone:ZE,stringifyPrimitive:qn,uint8ArrayToBase64:bhe,uint8ArrayToBase64url:trt,uint8ArrayToHex:irt,unwrapMessage:Xb},Symbol.toStringTag,{value:"Module"})),whe=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Z2,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tB=st("$ZodError",whe),mc=st("$ZodError",whe,{Parent:Error});function QM(e,t=n=>n.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function HM(e,t=n=>n.message){const n={_errors:[]},i=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>i({issues:o}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(t(a));else{let o=n,s=0;for(;s<a.path.length;){const l=a.path[s];s===a.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(a))):o[l]=o[l]||{_errors:[]},o=o[l],s++}}};return i(e),n}function She(e,t=n=>n.message){const n={errors:[]},i=(r,a=[])=>{var o,s;for(const l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{const c=[...a,...l.path];if(c.length===0){n.errors.push(t(l));continue}let d=n,u=0;for(;u<c.length;){const m=c[u],h=u===c.length-1;typeof m=="string"?(d.properties??(d.properties={}),(o=d.properties)[m]??(o[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(s=d.items)[m]??(s[m]={errors:[]}),d=d.items[m]),h&&d.errors.push(t(l)),u++}}};return i(e),n}function xhe(e){const t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(const i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Nhe(e){const t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(const i of n)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${xhe(i.path)}`);return t.join(`
|
|
615
615
|
`)}const W1=e=>(t,n,i,r)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ap;if(o.issues.length){const s=new(r?.Err??e)(o.issues.map(l=>eu(l,a,Ws())));throw UM(s,r?.callee),s}return o.value},eF=W1(mc),Y1=e=>async(t,n,i,r)=>{const a=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new(r?.Err??e)(o.issues.map(l=>eu(l,a,Ws())));throw UM(s,r?.callee),s}return o.value},tF=Y1(mc),X1=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new Ap;return a.issues.length?{success:!1,error:new(e??tB)(a.issues.map(o=>eu(o,r,Ws())))}:{success:!0,data:a.value}},Che=X1(mc),Z1=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(o=>eu(o,r,Ws())))}:{success:!0,data:a.value}},_he=Z1(mc),zM=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return W1(e)(t,n,r)},art=zM(mc),VM=e=>(t,n,i)=>W1(e)(t,n,i),ort=VM(mc),GM=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Y1(e)(t,n,r)},srt=GM(mc),qM=e=>async(t,n,i)=>Y1(e)(t,n,i),lrt=qM(mc),KM=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return X1(e)(t,n,r)},crt=KM(mc),WM=e=>(t,n,i)=>X1(e)(t,n,i),drt=WM(mc),YM=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Z1(e)(t,n,r)},urt=YM(mc),XM=e=>async(t,n,i)=>Z1(e)(t,n,i),frt=XM(mc),Fhe=/^[cC][^\s-]{8,}$/,Ehe=/^[0-9a-z]+$/,Bhe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Dhe=/^[0-9a-vA-V]{20}$/,The=/^[A-Za-z0-9]{27}$/,Ihe=/^[a-zA-Z0-9_-]{21}$/,Ohe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Art=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Phe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,My=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,mrt=My(4),hrt=My(6),prt=My(7),Rhe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,grt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vrt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,jhe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,yrt=jhe,brt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,krt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Mhe(){return new RegExp(krt,"u")}const Lhe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$he=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Uhe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qhe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hhe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ZM=/^[A-Za-z0-9_-]*$/,JM=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,zhe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Vhe=/^\+(?:[0-9]){6,14}[0-9]$/,Ghe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qhe=new RegExp(`^${Ghe}$`);function Khe(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Whe(e){return new RegExp(`^${Khe(e)}$`)}function Yhe(e){const t=Khe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ghe}T(?:${i})$`)}const Xhe=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Zhe=/^-?\d+n?$/,Jhe=/^-?\d+$/,epe=/^-?\d+(?:\.\d+)?/,tpe=/^(?:true|false)$/i,npe=/^null$/i,ipe=/^undefined$/i,rpe=/^[^A-Z]*$/,ape=/^[^a-z]*$/,ope=/^[0-9a-fA-F]*$/;function J1(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ew(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const wrt=/^[0-9a-fA-F]{32}$/,Srt=J1(22,"=="),xrt=ew(22),Nrt=/^[0-9a-fA-F]{40}$/,Crt=J1(27,"="),_rt=ew(27),Frt=/^[0-9a-fA-F]{64}$/,Ert=J1(43,"="),Brt=ew(43),Drt=/^[0-9a-fA-F]{96}$/,Trt=J1(64,""),Irt=ew(64),Ort=/^[0-9a-fA-F]{128}$/,Prt=J1(86,"=="),Rrt=ew(86),eL=Object.freeze(Object.defineProperty({__proto__:null,base64:Hhe,base64url:ZM,bigint:Zhe,boolean:tpe,browserEmail:brt,cidrv4:Uhe,cidrv6:Qhe,cuid:Fhe,cuid2:Ehe,date:qhe,datetime:Yhe,domain:zhe,duration:Ohe,e164:Vhe,email:Rhe,emoji:Mhe,extendedDuration:Art,guid:Phe,hex:ope,hostname:JM,html5Email:grt,idnEmail:yrt,integer:Jhe,ipv4:Lhe,ipv6:$he,ksuid:The,lowercase:rpe,md5_base64:Srt,md5_base64url:xrt,md5_hex:wrt,nanoid:Ihe,null:npe,number:epe,rfc5322Email:vrt,sha1_base64:Crt,sha1_base64url:_rt,sha1_hex:Nrt,sha256_base64:Ert,sha256_base64url:Brt,sha256_hex:Frt,sha384_base64:Trt,sha384_base64url:Irt,sha384_hex:Drt,sha512_base64:Prt,sha512_base64url:Rrt,sha512_hex:Ort,string:Xhe,time:Whe,ulid:Bhe,undefined:ipe,unicodeEmail:jhe,uppercase:ape,uuid:My,uuid4:mrt,uuid6:hrt,uuid7:prt,xid:Dhe},Symbol.toStringTag,{value:"Module"})),Ma=st("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),spe={number:"number",bigint:"bigint",object:"date"},tL=st("$ZodCheckLessThan",(e,t)=>{Ma.init(e,t);const n=spe[typeof t.value];e._zod.onattach.push(i=>{const r=i._zod.bag,a=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nL=st("$ZodCheckGreaterThan",(e,t)=>{Ma.init(e,t);const n=spe[typeof t.value];e._zod.onattach.push(i=>{const r=i._zod.bag,a=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lpe=st("$ZodCheckMultipleOf",(e,t)=>{Ma.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ohe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),cpe=st("$ZodCheckNumberFormat",(e,t)=>{Ma.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,a]=dhe[t.format];e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,s.minimum=r,s.maximum=a,n&&(s.pattern=Jhe)}),e._zod.check=o=>{const s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}s<r&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inst:e})}}),dpe=st("$ZodCheckBigIntFormat",(e,t)=>{Ma.init(e,t);const[n,i]=uhe[t.format];e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i}),e._zod.check=r=>{const a=r.value;a<n&&r.issues.push({origin:"bigint",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>i&&r.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inst:e})}}),upe=st("$ZodCheckMaxSize",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const r=i.value;r.size<=t.maximum||i.issues.push({origin:JE(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fpe=st("$ZodCheckMinSize",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const r=i.value;r.size>=t.minimum||i.issues.push({origin:JE(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ape=st("$ZodCheckSizeEquals",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{const r=i.value,a=r.size;if(a===t.size)return;const o=a>t.size;i.issues.push({origin:JE(r),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),mpe=st("$ZodCheckMaxLength",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const r=i.value;if(r.length<=t.maximum)return;const o=eB(r);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hpe=st("$ZodCheckMinLength",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const r=i.value;if(r.length>=t.minimum)return;const o=eB(r);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ppe=st("$ZodCheckLengthEquals",(e,t)=>{var n;Ma.init(e,t),(n=e._zod.def).when??(n.when=i=>{const r=i.value;return!ng(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{const r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{const r=i.value,a=r.length;if(a===t.length)return;const o=eB(r),s=a>t.length;i.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),tw=st("$ZodCheckStringFormat",(e,t)=>{var n,i;Ma.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),gpe=st("$ZodCheckRegex",(e,t)=>{tw.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),vpe=st("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rpe),tw.init(e,t)}),ype=st("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ape),tw.init(e,t)}),bpe=st("$ZodCheckIncludes",(e,t)=>{Ma.init(e,t);const n=Km(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),kpe=st("$ZodCheckStartsWith",(e,t)=>{Ma.init(e,t);const n=new RegExp(`^${Km(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),wpe=st("$ZodCheckEndsWith",(e,t)=>{Ma.init(e,t);const n=new RegExp(`.*${Km(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function FX(e,t,n){e.issues.length&&t.issues.push(...Qd(n,e.issues))}const Spe=st("$ZodCheckProperty",(e,t)=>{Ma.init(e,t),e._zod.check=n=>{const i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>FX(r,n,t.property));FX(i,n,t.property)}}),xpe=st("$ZodCheckMimeType",(e,t)=>{Ma.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Npe=st("$ZodCheckOverwrite",(e,t)=>{Ma.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Cpe{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
616
616
|
`).filter(o=>o),r=Math.min(...i.map(o=>o.length-o.trimStart().length)),a=i.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of a)this.content.push(o)}compile(){const t=Function,n=this?.args,r=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...n,r.join(`
|
|
617
617
|
`))}}const _pe={major:4,minor:1,patch:12},ri=st("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_pe;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const r of i)for(const a of r._zod.onattach)a(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(o,s,l)=>{let c=ip(o),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(o))continue}else if(c)continue;const m=o.issues.length,h=u._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new Ap;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,o.issues.length!==m&&(c||(c=ip(o,m)))});else{if(o.issues.length===m)continue;c||(c=ip(o,m))}}return d?d.then(()=>o):o},a=(o,s,l)=>{if(ip(o))return o.aborted=!0,o;const c=r(s,i,l);if(c instanceof Promise){if(l.async===!1)throw new Ap;return c.then(d=>e._zod.parse(d,l))}return e._zod.parse(c,l)};e._zod.run=(o,s)=>{if(s.skipChecks)return e._zod.parse(o,s);if(s.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(d=>a(d,o,s)):a(c,o,s)}const l=e._zod.parse(o,s);if(l instanceof Promise){if(s.async===!1)throw new Ap;return l.then(c=>r(c,i,s))}return r(l,i,s)}}e["~standard"]={validate:r=>{try{const a=Che(e,r);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return _he(e,r).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}}),nw=st("$ZodString",(e,t)=>{ri.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Xhe(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Lr=st("$ZodStringFormat",(e,t)=>{tw.init(e,t),nw.init(e,t)}),Fpe=st("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Phe),Lr.init(e,t)}),Epe=st("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=My(i))}else t.pattern??(t.pattern=My());Lr.init(e,t)}),Bpe=st("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rhe),Lr.init(e,t)}),Dpe=st("$ZodURL",(e,t)=>{Lr.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:JM.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Tpe=st("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Mhe()),Lr.init(e,t)}),Ipe=st("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ihe),Lr.init(e,t)}),Ope=st("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Fhe),Lr.init(e,t)}),Ppe=st("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ehe),Lr.init(e,t)}),Rpe=st("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bhe),Lr.init(e,t)}),jpe=st("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Dhe),Lr.init(e,t)}),Mpe=st("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=The),Lr.init(e,t)}),Lpe=st("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Yhe(t)),Lr.init(e,t)}),$pe=st("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=qhe),Lr.init(e,t)}),Upe=st("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Whe(t)),Lr.init(e,t)}),Qpe=st("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ohe),Lr.init(e,t)}),Hpe=st("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Lhe),Lr.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format="ipv4"})}),zpe=st("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=$he),Lr.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Vpe=st("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Uhe),Lr.init(e,t)}),Gpe=st("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qhe),Lr.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[r,a]=i;if(!a)throw new Error;const o=Number(a);if(`${o}`!==a)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function iL(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const qpe=st("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Hhe),Lr.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{iL(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Kpe(e){if(!ZM.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return iL(n)}const Wpe=st("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ZM),Lr.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{Kpe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Ype=st("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vhe),Lr.init(e,t)});function Xpe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const Zpe=st("$ZodJWT",(e,t)=>{Lr.init(e,t),e._zod.check=n=>{Xpe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Jpe=st("$ZodCustomStringFormat",(e,t)=>{Lr.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),rL=st("$ZodNumber",(e,t)=>{ri.init(e,t),e._zod.pattern=e._zod.bag.pattern??epe,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;const a=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...a?{received:a}:{}}),n}}),ege=st("$ZodNumber",(e,t)=>{cpe.init(e,t),rL.init(e,t)}),aL=st("$ZodBoolean",(e,t)=>{ri.init(e,t),e._zod.pattern=tpe,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),oL=st("$ZodBigInt",(e,t)=>{ri.init(e,t),e._zod.pattern=Zhe,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),tge=st("$ZodBigInt",(e,t)=>{dpe.init(e,t),oL.init(e,t)}),nge=st("$ZodSymbol",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),ige=st("$ZodUndefined",(e,t)=>{ri.init(e,t),e._zod.pattern=ipe,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{const r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),rge=st("$ZodNull",(e,t)=>{ri.init(e,t),e._zod.pattern=npe,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{const r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),age=st("$ZodAny",(e,t)=>{ri.init(e,t),e._zod.parse=n=>n}),oge=st("$ZodUnknown",(e,t)=>{ri.init(e,t),e._zod.parse=n=>n}),sge=st("$ZodNever",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),lge=st("$ZodVoid",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),cge=st("$ZodDate",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}const r=n.value,a=r instanceof Date;return a&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...a?{received:"Invalid Date"}:{},inst:e}),n}});function EX(e,t,n){e.issues.length&&t.issues.push(...Qd(n,e.issues)),t.value[n]=e.value}const dge=st("$ZodArray",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const a=[];for(let o=0;o<r.length;o++){const s=r[o],l=t.element._zod.run({value:s,issues:[]},i);l instanceof Promise?a.push(l.then(c=>EX(c,n,o))):EX(l,n,o)}return a.length?Promise.all(a).then(()=>n):n}});function nF(e,t,n,i){e.issues.length&&t.issues.push(...Qd(n,e.issues)),e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function uge(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=che(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function fge(e,t,n,i,r,a){const o=[],s=r.keySet,l=r.catchall._zod,c=l.def.type;for(const d of Object.keys(t)){if(s.has(d))continue;if(c==="never"){o.push(d);continue}const u=l.run({value:t[d],issues:[]},i);u instanceof Promise?e.push(u.then(m=>nF(m,n,d,t))):nF(u,n,d,t)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Age=st("$ZodObject",(e,t)=>{if(ri.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}const i=K1(()=>uge(t));Fi(e._zod,"propValues",()=>{const s=t.shape,l={};for(const c in s){const d=s[c]._zod;if(d.values){l[c]??(l[c]=new Set);for(const u of d.values)l[c].add(u)}}return l});const r=Ry,a=t.catchall;let o;e._zod.parse=(s,l)=>{o??(o=i.value);const c=s.value;if(!r(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};const d=[],u=o.shape;for(const m of o.keys){const v=u[m]._zod.run({value:c[m],issues:[]},l);v instanceof Promise?d.push(v.then(g=>nF(g,s,m,c))):nF(v,s,m,c)}return a?fge(d,c,s,l,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),mge=st("$ZodObjectJIT",(e,t)=>{Age.init(e,t);const n=e._zod.parse,i=K1(()=>uge(t)),r=m=>{const h=new Cpe(["shape","payload","ctx"]),v=i.value,g=C=>{const N=zR(C);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};h.write("const input = payload.value;");const k=Object.create(null);let b=0;for(const C of v.keys)k[C]=`key_${b++}`;h.write("const newResult = {};");for(const C of v.keys){const N=k[C],_=zR(C);h.write(`const ${N} = ${g(C)};`),h.write(`
|
|
@@ -633,7 +633,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
633
633
|
|
|
634
634
|
`)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(C,N)=>w(m,C,N)};let a;const o=Ry,s=!X2.jitless,c=s&&she.value,d=t.catchall;let u;e._zod.parse=(m,h)=>{u??(u=i.value);const v=m.value;return o(v)?s&&c&&h?.async===!1&&h.jitless!==!0?(a||(a=r(t.shape)),m=a(m,h),d?fge([],v,m,h,u,e):m):n(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m)}});function BX(e,t,n,i){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const r=e.filter(a=>!ip(a));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(o=>eu(o,i,Ws())))}),t)}const sL=st("$ZodUnion",(e,t)=>{ri.init(e,t),Fi(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Fi(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Fi(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Fi(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>XE(a.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,a)=>{if(n)return i(r,a);let o=!1;const s=[];for(const l of t.options){const c=l._zod.run({value:r.value,issues:[]},a);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}return o?Promise.all(s).then(l=>BX(l,r,e,a)):BX(s,r,e,a)}}),hge=st("$ZodDiscriminatedUnion",(e,t)=>{sL.init(e,t);const n=e._zod.parse;Fi(e._zod,"propValues",()=>{const r={};for(const a of t.options){const o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[s,l]of Object.entries(o)){r[s]||(r[s]=new Set);for(const c of l)r[s].add(c)}}return r});const i=K1(()=>{const r=t.options,a=new Map;for(const o of r){const s=o._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const l of s){if(a.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);a.set(l,o)}}return a});e._zod.parse=(r,a)=>{const o=r.value;if(!Ry(o))return r.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),r;const s=i.value.get(o?.[t.discriminator]);return s?s._zod.run(r,a):t.unionFallback?n(r,a):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),r)}}),pge=st("$ZodIntersection",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value,a=t.left._zod.run({value:r,issues:[]},i),o=t.right._zod.run({value:r,issues:[]},i);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([l,c])=>DX(n,l,c)):DX(n,a,o)}});function VR(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fp(e)&&Fp(t)){const n=Object.keys(t),i=Object.keys(e).filter(a=>n.indexOf(a)!==-1),r={...e,...t};for(const a of i){const o=VR(e[a],t[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};r[a]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=e[i],a=t[i],o=VR(r,a);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function DX(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),ip(e))return e;const i=VR(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const lL=st("$ZodTuple",(e,t)=>{ri.init(e,t);const n=t.items,i=n.length-[...n].reverse().findIndex(r=>r._zod.optin!=="optional");e._zod.parse=(r,a)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const s=[];if(!t.rest){const c=o.length>n.length,d=o.length<i-1;if(c||d)return r.issues.push({...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),r}let l=-1;for(const c of n){if(l++,l>=o.length&&l>=i)continue;const d=c._zod.run({value:o[l],issues:[]},a);d instanceof Promise?s.push(d.then(u=>kx(u,r,l))):kx(d,r,l)}if(t.rest){const c=o.slice(n.length);for(const d of c){l++;const u=t.rest._zod.run({value:d,issues:[]},a);u instanceof Promise?s.push(u.then(m=>kx(m,r,l))):kx(u,r,l)}}return s.length?Promise.all(s).then(()=>r):r}});function kx(e,t,n){e.issues.length&&t.issues.push(...Qd(n,e.issues)),t.value[n]=e.value}const gge=st("$ZodRecord",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Fp(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const a=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const l of o)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){const c=t.valueType._zod.run({value:r[l],issues:[]},i);c instanceof Promise?a.push(c.then(d=>{d.issues.length&&n.issues.push(...Qd(l,d.issues)),n.value[l]=d.value})):(c.issues.length&&n.issues.push(...Qd(l,c.issues)),n.value[l]=c.value)}let s;for(const l in r)o.has(l)||(s=s??[],s.push(l));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{n.value={};for(const o of Reflect.ownKeys(r)){if(o==="__proto__")continue;const s=t.keyType._zod.run({value:o,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(c=>eu(c,i,Ws())),input:o,path:[o],inst:e}),n.value[s.value]=s.value;continue}const l=t.valueType._zod.run({value:r[o],issues:[]},i);l instanceof Promise?a.push(l.then(c=>{c.issues.length&&n.issues.push(...Qd(o,c.issues)),n.value[s.value]=c.value})):(l.issues.length&&n.issues.push(...Qd(o,l.issues)),n.value[s.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),vge=st("$ZodMap",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const a=[];n.value=new Map;for(const[o,s]of r){const l=t.keyType._zod.run({value:o,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||c instanceof Promise?a.push(Promise.all([l,c]).then(([d,u])=>{TX(d,u,n,o,r,e,i)})):TX(l,c,n,o,r,e,i)}return a.length?Promise.all(a).then(()=>n):n}});function TX(e,t,n,i,r,a,o){e.issues.length&&(J2.has(typeof i)?n.issues.push(...Qd(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:a,issues:e.issues.map(s=>eu(s,o,Ws()))})),t.issues.length&&(J2.has(typeof i)?n.issues.push(...Qd(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:a,key:i,issues:t.issues.map(s=>eu(s,o,Ws()))})),n.value.set(e.value,t.value)}const yge=st("$ZodSet",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const a=[];n.value=new Set;for(const o of r){const s=t.valueType._zod.run({value:o,issues:[]},i);s instanceof Promise?a.push(s.then(l=>IX(l,n))):IX(s,n)}return a.length?Promise.all(a).then(()=>n):n}});function IX(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const bge=st("$ZodEnum",(e,t)=>{ri.init(e,t);const n=$M(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>J2.has(typeof r)).map(r=>typeof r=="string"?Km(r):r.toString()).join("|")})$`),e._zod.parse=(r,a)=>{const o=r.value;return i.has(o)||r.issues.push({code:"invalid_value",values:n,input:o,inst:e}),r}}),kge=st("$ZodLiteral",(e,t)=>{if(ri.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Km(n):n?Km(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,i)=>{const r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),wge=st("$ZodFile",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Sge=st("$ZodTransform",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new YE(e.constructor.name);const r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(n.value=o,n));if(r instanceof Promise)throw new Ap;return n.value=r,n}});function OX(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const xge=st("$ZodOptional",(e,t)=>{ri.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Fi(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Fi(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${XE(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(a=>OX(a,n.value)):OX(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Nge=st("$ZodNullable",(e,t)=>{ri.init(e,t),Fi(e._zod,"optin",()=>t.innerType._zod.optin),Fi(e._zod,"optout",()=>t.innerType._zod.optout),Fi(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${XE(n.source)}|null)$`):void 0}),Fi(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Cge=st("$ZodDefault",(e,t)=>{ri.init(e,t),e._zod.optin="optional",Fi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(a=>PX(a,t)):PX(r,t)}});function PX(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const _ge=st("$ZodPrefault",(e,t)=>{ri.init(e,t),e._zod.optin="optional",Fi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Fge=st("$ZodNonOptional",(e,t)=>{ri.init(e,t),Fi(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(a=>RX(a,e)):RX(r,e)}});function RX(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Ege=st("$ZodSuccess",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new YE("ZodSuccess");const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(a=>(n.value=a.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Bge=st("$ZodCatch",(e,t)=>{ri.init(e,t),Fi(e._zod,"optin",()=>t.innerType._zod.optin),Fi(e._zod,"optout",()=>t.innerType._zod.optout),Fi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>eu(o,i,Ws()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(a=>eu(a,i,Ws()))},input:n.value}),n.issues=[]),n)}}),Dge=st("$ZodNaN",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Tge=st("$ZodPipe",(e,t)=>{ri.init(e,t),Fi(e._zod,"values",()=>t.in._zod.values),Fi(e._zod,"optin",()=>t.in._zod.optin),Fi(e._zod,"optout",()=>t.out._zod.optout),Fi(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const a=t.out._zod.run(n,i);return a instanceof Promise?a.then(o=>wx(o,t.in,i)):wx(a,t.in,i)}const r=t.in._zod.run(n,i);return r instanceof Promise?r.then(a=>wx(a,t.out,i)):wx(r,t.out,i)}});function wx(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const cL=st("$ZodCodec",(e,t)=>{ri.init(e,t),Fi(e._zod,"values",()=>t.in._zod.values),Fi(e._zod,"optin",()=>t.in._zod.optin),Fi(e._zod,"optout",()=>t.out._zod.optout),Fi(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){const a=t.in._zod.run(n,i);return a instanceof Promise?a.then(o=>Sx(o,t,i)):Sx(a,t,i)}else{const a=t.out._zod.run(n,i);return a instanceof Promise?a.then(o=>Sx(o,t,i)):Sx(a,t,i)}}});function Sx(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const r=t.transform(e.value,e);return r instanceof Promise?r.then(a=>xx(e,a,t.out,n)):xx(e,r,t.out,n)}else{const r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(a=>xx(e,a,t.in,n)):xx(e,r,t.in,n)}}function xx(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Ige=st("$ZodReadonly",(e,t)=>{ri.init(e,t),Fi(e._zod,"propValues",()=>t.innerType._zod.propValues),Fi(e._zod,"values",()=>t.innerType._zod.values),Fi(e._zod,"optin",()=>t.innerType._zod.optin),Fi(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(jX):jX(r)}});function jX(e){return e.value=Object.freeze(e.value),e}const Oge=st("$ZodTemplateLiteral",(e,t)=>{ri.init(e,t);const n=[];for(const i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const a=r.startsWith("^")?1:0,o=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(a,o))}else if(i===null||lhe.has(typeof i))n.push(Km(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Pge=st("$ZodFunction",(e,t)=>(ri.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){const r=e._def.input?eF(e._def.input,i):i,a=Reflect.apply(n,this,r);return e._def.output?eF(e._def.output,a):a}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){const r=e._def.input?await tF(e._def.input,i):i,a=await Reflect.apply(n,this,r);return e._def.output?await tF(e._def.output,a):a}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{const i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new lL({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{const i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Rge=st("$ZodPromise",(e,t)=>{ri.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),jge=st("$ZodLazy",(e,t)=>{ri.init(e,t),Fi(e._zod,"innerType",()=>t.getter()),Fi(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Fi(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Fi(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Fi(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),Mge=st("$ZodCustom",(e,t)=>{Ma.init(e,t),ri.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(a=>MX(a,n,i,e));MX(r,n,i,e)}});function MX(e,t,n,i){if(!e){const r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(jy(r))}}const jrt=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return r=>{switch(r.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${r.expected}، ولكن تم إدخال ${n(r.input)}`;case"invalid_value":return r.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${qn(r.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${a} ${r.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${a} ${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${a} ${r.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${a} ${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`:a.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"`:a.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"`:a.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}`:`${i[a.format]??r.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${Qt(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`;default:return"مدخل غير مقبول"}}};function Mrt(){return{localeError:jrt()}}const Lrt=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${r.expected}, daxil olan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Yanlış dəyər: gözlənilən ${qn(r.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${a}${r.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${r.origin??"dəyər"} ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Çox kiçik: gözlənilən ${r.origin} ${a}${r.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${r.origin} ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Yanlış mətn: "${a.prefix}" ilə başlamalıdır`:a.format==="ends_with"?`Yanlış mətn: "${a.suffix}" ilə bitməlidir`:a.format==="includes"?`Yanlış mətn: "${a.includes}" daxil olmalıdır`:a.format==="regex"?`Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[a.format]??r.format}`}case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${r.keys.length>1?"lar":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function $rt(){return{localeError:Lrt()}}function LX(e,t,n,i){const r=Math.abs(e),a=r%10,o=r%100;return o>=11&&o<=19?i:a===1?t:a>=2&&a<=4?n:i}const Urt=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"лік";case"object":{if(Array.isArray(r))return"масіў";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return r=>{switch(r.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${r.expected}, атрымана ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Няправільны ўвод: чакалася ${qn(r.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);if(o){const s=Number(r.maximum),l=LX(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${o.verb} ${a}${r.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);if(o){const s=Number(r.minimum),l=LX(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${o.verb} ${a}${r.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${a.prefix}"`:a.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${a.suffix}"`:a.format==="includes"?`Няправільны радок: павінен змяшчаць "${a.includes}"`:a.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${a.pattern}`:`Няправільны ${i[a.format]??r.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`;default:return"Няправільны ўвод"}}};function Qrt(){return{localeError:Urt()}}const Hrt=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},zrt=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(i){return e[i]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return i=>{switch(i.code){case"invalid_type":return`Невалиден вход: очакван ${i.expected}, получен ${Hrt(i.input)}`;case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${qn(i.values[0])}`:`Невалидна опция: очаквано едно от ${Qt(i.values,"|")}`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${r}${i.maximum.toString()} ${a.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`Твърде малко: очаква се ${i.origin} да съдържа ${r}${i.minimum.toString()} ${a.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;if(r.format==="starts_with")return`Невалиден низ: трябва да започва с "${r.prefix}"`;if(r.format==="ends_with")return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if(r.format==="includes")return`Невалиден низ: трябва да включва "${r.includes}"`;if(r.format==="regex")return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let a="Невалиден";return r.format==="emoji"&&(a="Невалидно"),r.format==="datetime"&&(a="Невалидно"),r.format==="date"&&(a="Невалидна"),r.format==="time"&&(a="Невалидно"),r.format==="duration"&&(a="Невалидна"),`${a} ${n[r.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${Qt(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function Vrt(){return{localeError:zrt()}}const Grt=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipus invàlid: s'esperava ${r.expected}, s'ha rebut ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Valor invàlid: s'esperava ${qn(r.values[0])}`:`Opció invàlida: s'esperava una de ${Qt(r.values," o ")}`;case"too_big":{const a=r.inclusive?"com a màxim":"menys de",o=t(r.origin);return o?`Massa gran: s'esperava que ${r.origin??"el valor"} contingués ${a} ${r.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${a} ${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?"com a mínim":"més de",o=t(r.origin);return o?`Massa petit: s'esperava que ${r.origin} contingués ${a} ${r.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${a} ${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Format invàlid: ha de començar amb "${a.prefix}"`:a.format==="ends_with"?`Format invàlid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format invàlid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${a.pattern}`:`Format invàlid per a ${i[a.format]??r.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${r.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${r.origin}`;default:return"Entrada invàlida"}}};function qrt(){return{localeError:Grt()}}const Krt=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(r))return"pole";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return r=>{switch(r.code){case"invalid_type":return`Neplatný vstup: očekáváno ${r.expected}, obdrženo ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neplatný vstup: očekáváno ${qn(r.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Hodnota je příliš velká: ${r.origin??"hodnota"} musí mít ${a}${r.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${r.origin??"hodnota"} musí být ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Hodnota je příliš malá: ${r.origin??"hodnota"} musí mít ${a}${r.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${r.origin??"hodnota"} musí být ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Neplatný řetězec: musí začínat na "${a.prefix}"`:a.format==="ends_with"?`Neplatný řetězec: musí končit na "${a.suffix}"`:a.format==="includes"?`Neplatný řetězec: musí obsahovat "${a.includes}"`:a.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${a.pattern}`:`Neplatný formát ${i[a.format]??r.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${r.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${Qt(r.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${r.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${r.origin}`;default:return"Neplatný vstup"}}};function Wrt(){return{localeError:Krt()}}const Yrt=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function n(o){return e[o]??null}function i(o){return t[o]??o}const r=o=>{const s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"tal";case"object":return Array.isArray(o)?"liste":o===null?"null":Object.getPrototypeOf(o)!==Object.prototype&&o.constructor?o.constructor.name:"objekt"}return s},a={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Ugyldigt input: forventede ${i(o.expected)}, fik ${i(r(o.input))}`;case"invalid_value":return o.values.length===1?`Ugyldig værdi: forventede ${qn(o.values[0])}`:`Ugyldigt valg: forventede en af følgende ${Qt(o.values,"|")}`;case"too_big":{const s=o.inclusive?"<=":"<",l=n(o.origin),c=i(o.origin);return l?`For stor: forventede ${c??"value"} ${l.verb} ${s} ${o.maximum.toString()} ${l.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${s} ${o.maximum.toString()}`}case"too_small":{const s=o.inclusive?">=":">",l=n(o.origin),c=i(o.origin);return l?`For lille: forventede ${c} ${l.verb} ${s} ${o.minimum.toString()} ${l.unit}`:`For lille: forventede ${c} havde ${s} ${o.minimum.toString()}`}case"invalid_format":{const s=o;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${a[s.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${Qt(o.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${o.origin}`;default:return"Ugyldigt input"}}};function Xrt(){return{localeError:Yrt()}}const Zrt=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"Zahl";case"object":{if(Array.isArray(r))return"Array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return r=>{switch(r.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${r.expected}, erhalten ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ungültige Eingabe: erwartet ${qn(r.values[0])}`:`Ungültige Option: erwartet eine von ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Zu groß: erwartet, dass ${r.origin??"Wert"} ${a}${r.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${r.origin??"Wert"} ${a}${r.maximum.toString()} ist`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Zu klein: erwartet, dass ${r.origin} ${a}${r.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${a}${r.minimum.toString()} ist`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Ungültiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ungültiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ungültiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ungültiger String: muss dem Muster ${a.pattern} entsprechen`:`Ungültig: ${i[a.format]??r.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${r.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${r.origin}`;default:return"Ungültige Eingabe"}}};function Jrt(){return{localeError:Zrt()}}const eat=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},tat=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${eat(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${qn(i.values[0])}`:`Invalid option: expected one of ${Qt(i.values,"|")}`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${r}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${r}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Qt(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Lge(){return{localeError:tat()}}const nat=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},iat=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${nat(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${qn(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${Qt(i.values,"|")}`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${r}${i.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`Tro malgranda: atendiĝis ke ${i.origin} havu ${r}${i.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${n[r.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${Qt(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function rat(){return{localeError:iat()}}const aat=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(o){return e[o]??null}function i(o){return t[o]??o}const r=o=>{const s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":return Array.isArray(o)?"array":o===null?"null":Object.getPrototypeOf(o)!==Object.prototype?o.constructor.name:"object"}return s},a={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(o.expected)}, recibido ${i(r(o.input))}`;case"invalid_value":return o.values.length===1?`Entrada inválida: se esperaba ${qn(o.values[0])}`:`Opción inválida: se esperaba una de ${Qt(o.values,"|")}`;case"too_big":{const s=o.inclusive?"<=":"<",l=n(o.origin),c=i(o.origin);return l?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${s}${o.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${s}${o.maximum.toString()}`}case"too_small":{const s=o.inclusive?">=":">",l=n(o.origin),c=i(o.origin);return l?`Demasiado pequeño: se esperaba que ${c} tuviera ${s}${o.minimum.toString()} ${l.unit}`:`Demasiado pequeño: se esperaba que ${c} fuera ${s}${o.minimum.toString()}`}case"invalid_format":{const s=o;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${a[s.format]??o.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${Qt(o.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(o.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(o.origin)}`;default:return"Entrada inválida"}}};function oat(){return{localeError:aat()}}const sat=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"عدد";case"object":{if(Array.isArray(r))return"آرایه";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return r=>{switch(r.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${r.expected} میبود، ${n(r.input)} دریافت شد`;case"invalid_value":return r.values.length===1?`ورودی نامعتبر: میبایست ${qn(r.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${Qt(r.values,"|")} میبود`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`خیلی بزرگ: ${r.origin??"مقدار"} باید ${a}${r.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${r.origin??"مقدار"} باید ${a}${r.maximum.toString()} باشد`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`خیلی کوچک: ${r.origin} باید ${a}${r.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${r.origin} باید ${a}${r.minimum.toString()} باشد`}case"invalid_format":{const a=r;return a.format==="starts_with"?`رشته نامعتبر: باید با "${a.prefix}" شروع شود`:a.format==="ends_with"?`رشته نامعتبر: باید با "${a.suffix}" تمام شود`:a.format==="includes"?`رشته نامعتبر: باید شامل "${a.includes}" باشد`:a.format==="regex"?`رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد`:`${i[a.format]??r.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${Qt(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`;default:return"ورودی نامعتبر"}}};function lat(){return{localeError:sat()}}const cat=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Virheellinen syöte: täytyy olla ${qn(r.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${a}${r.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${a}${r.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen syöte: täytyy sisältää "${a.includes}"`:a.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${a.pattern}`:`Virheellinen ${i[a.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Qt(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function dat(){return{localeError:cat()}}const uat=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"nombre";case"object":{if(Array.isArray(r))return"tableau";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return r=>{switch(r.code){case"invalid_type":return`Entrée invalide : ${r.expected} attendu, ${n(r.input)} reçu`;case"invalid_value":return r.values.length===1?`Entrée invalide : ${qn(r.values[0])} attendu`:`Option invalide : une valeur parmi ${Qt(r.values,"|")} attendue`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Trop grand : ${r.origin??"valeur"} doit ${o.verb} ${a}${r.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${r.origin??"valeur"} doit être ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Trop petit : ${r.origin} doit ${o.verb} ${a}${r.minimum.toString()} ${o.unit}`:`Trop petit : ${r.origin} doit être ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${a.pattern}`:`${i[a.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${Qt(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function fat(){return{localeError:uat()}}const Aat=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return r=>{switch(r.code){case"invalid_type":return`Entrée invalide : attendu ${r.expected}, reçu ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entrée invalide : attendu ${qn(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"≤":"<",o=t(r.origin);return o?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${a}${r.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?"≥":">",o=t(r.origin);return o?`Trop petit : attendu que ${r.origin} ait ${a}${r.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${r.origin} soit ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au motif ${a.pattern}`:`${i[a.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${r.divisor}`;case"unrecognized_keys":return`Clé${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${Qt(r.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${r.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entrée invalide"}}};function mat(){return{localeError:Aat()}}const hat=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return r=>{switch(r.code){case"invalid_type":return`קלט לא תקין: צריך ${r.expected}, התקבל ${n(r.input)}`;case"invalid_value":return r.values.length===1?`קלט לא תקין: צריך ${qn(r.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`גדול מדי: ${r.origin??"value"} צריך להיות ${a}${r.maximum.toString()} ${o.unit??"elements"}`:`גדול מדי: ${r.origin??"value"} צריך להיות ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`קטן מדי: ${r.origin} צריך להיות ${a}${r.minimum.toString()} ${o.unit}`:`קטן מדי: ${r.origin} צריך להיות ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${a.prefix}"`:a.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${a.suffix}"`:a.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${a.includes}"`:a.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${a.pattern}`:`${i[a.format]??r.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${r.divisor}`;case"unrecognized_keys":return`מפתח${r.keys.length>1?"ות":""} לא מזוה${r.keys.length>1?"ים":"ה"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${r.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r.origin}`;default:return"קלט לא תקין"}}};function pat(){return{localeError:hat()}}const gat=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"szám";case"object":{if(Array.isArray(r))return"tömb";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return r=>{switch(r.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${r.expected}, a kapott érték ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Érvénytelen bemenet: a várt érték ${qn(r.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Túl nagy: ${r.origin??"érték"} mérete túl nagy ${a}${r.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${r.origin??"érték"} túl nagy: ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Túl kicsi: a bemeneti érték ${r.origin} mérete túl kicsi ${a}${r.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${r.origin} túl kicsi ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie`:a.format==="ends_with"?`Érvénytelen string: "${a.suffix}" értékkel kell végződnie`:a.format==="includes"?`Érvénytelen string: "${a.includes}" értéket kell tartalmaznia`:a.format==="regex"?`Érvénytelen string: ${a.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[a.format]??r.format}`}case"not_multiple_of":return`Érvénytelen szám: ${r.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${r.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${r.origin}`;default:return"Érvénytelen bemenet"}}};function vat(){return{localeError:gat()}}const yat=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${qn(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${a}${r.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Terlalu kecil: diharapkan ${r.origin} memiliki ${a}${r.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${i[a.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function bat(){return{localeError:yat()}}const kat=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},wat=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(i){return e[i]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${kat(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${qn(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${Qt(i.values,"|")}`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${r}${i.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${r}${i.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`Ógildur strengur: verður að byrja á "${r.prefix}"`:r.format==="ends_with"?`Ógildur strengur: verður að enda á "${r.suffix}"`:r.format==="includes"?`Ógildur strengur: verður að innihalda "${r.includes}"`:r.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${r.pattern}`:`Rangt ${n[r.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${Qt(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function Sat(){return{localeError:wat()}}const xat=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"numero";case"object":{if(Array.isArray(r))return"vettore";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input non valido: atteso ${qn(r.values[0])}`:`Opzione non valida: atteso uno tra ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Troppo grande: ${r.origin??"valore"} deve avere ${a}${r.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Troppo piccolo: ${r.origin} deve avere ${a}${r.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${r.origin} deve essere ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${i[a.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Nat(){return{localeError:xat()}}const Cat=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"数値";case"object":{if(Array.isArray(r))return"配列";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return r=>{switch(r.code){case"invalid_type":return`無効な入力: ${r.expected}が期待されましたが、${n(r.input)}が入力されました`;case"invalid_value":return r.values.length===1?`無効な入力: ${qn(r.values[0])}が期待されました`:`無効な選択: ${Qt(r.values,"、")}のいずれかである必要があります`;case"too_big":{const a=r.inclusive?"以下である":"より小さい",o=t(r.origin);return o?`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${o.unit??"要素"}${a}必要があります`:`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${a}必要があります`}case"too_small":{const a=r.inclusive?"以上である":"より大きい",o=t(r.origin);return o?`小さすぎる値: ${r.origin}は${r.minimum.toString()}${o.unit}${a}必要があります`:`小さすぎる値: ${r.origin}は${r.minimum.toString()}${a}必要があります`}case"invalid_format":{const a=r;return a.format==="starts_with"?`無効な文字列: "${a.prefix}"で始まる必要があります`:a.format==="ends_with"?`無効な文字列: "${a.suffix}"で終わる必要があります`:a.format==="includes"?`無効な文字列: "${a.includes}"を含む必要があります`:a.format==="regex"?`無効な文字列: パターン${a.pattern}に一致する必要があります`:`無効な${i[a.format]??r.format}`}case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${Qt(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`;default:return"無効な入力"}}};function _at(){return{localeError:Cat()}}const Fat=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},Eat=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(i){return e[i]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${Fat(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${qn(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Qt(i.values,"|")}-დან`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${a.verb} ${r}${i.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${a.verb} ${r}${i.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით`:r.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით`:r.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს`:r.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`:`არასწორი ${n[r.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${Qt(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Bat(){return{localeError:Eat()}}const Dat=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(r))return"អារេ (Array)";if(r===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return r=>{switch(r.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r.expected} ប៉ុន្តែទទួលបាន ${n(r.input)}`;case"invalid_value":return r.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${qn(r.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${a} ${r.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${a} ${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`តូចពេក៖ ត្រូវការ ${r.origin} ${a} ${r.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${r.origin} ${a} ${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"`:a.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"`:a.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"`:a.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[a.format]??r.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${Qt(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function $ge(){return{localeError:Dat()}}function Tat(){return $ge()}const Iat=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return r=>{switch(r.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${r.expected}, 받은 타입은 ${n(r.input)}입니다`;case"invalid_value":return r.values.length===1?`잘못된 입력: 값은 ${qn(r.values[0])} 이어야 합니다`:`잘못된 옵션: ${Qt(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const a=r.inclusive?"이하":"미만",o=a==="미만"?"이어야 합니다":"여야 합니다",s=t(r.origin),l=s?.unit??"요소";return s?`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${l} ${a}${o}`:`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${a}${o}`}case"too_small":{const a=r.inclusive?"이상":"초과",o=a==="이상"?"이어야 합니다":"여야 합니다",s=t(r.origin),l=s?.unit??"요소";return s?`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${l} ${a}${o}`:`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${a}${o}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`잘못된 문자열: "${a.prefix}"(으)로 시작해야 합니다`:a.format==="ends_with"?`잘못된 문자열: "${a.suffix}"(으)로 끝나야 합니다`:a.format==="includes"?`잘못된 문자열: "${a.includes}"을(를) 포함해야 합니다`:a.format==="regex"?`잘못된 문자열: 정규식 ${a.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[a.format]??r.format}`}case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${Qt(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`;default:return"잘못된 입력"}}};function Oat(){return{localeError:Iat()}}const Pat=e=>Zb(typeof e,e),Zb=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Db=e=>e.charAt(0).toUpperCase()+e.slice(1);function $X(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}const Rat=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(i,r,a,o){const s=e[i]??null;return s===null?s:{unit:s.unit[r],verb:s.verb[o][a?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${Pat(i.input)}, o tikėtasi - ${Zb(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${qn(i.values[0])}`:`Privalo būti vienas iš ${Qt(i.values,"|")} pasirinkimų`;case"too_big":{const r=Zb(i.origin),a=t(i.origin,$X(Number(i.maximum)),i.inclusive??!1,"smaller");if(a?.verb)return`${Db(r??i.origin??"reikšmė")} ${a.verb} ${i.maximum.toString()} ${a.unit??"elementų"}`;const o=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Db(r??i.origin??"reikšmė")} turi būti ${o} ${i.maximum.toString()} ${a?.unit}`}case"too_small":{const r=Zb(i.origin),a=t(i.origin,$X(Number(i.minimum)),i.inclusive??!1,"bigger");if(a?.verb)return`${Db(r??i.origin??"reikšmė")} ${a.verb} ${i.minimum.toString()} ${a.unit??"elementų"}`;const o=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Db(r??i.origin??"reikšmė")} turi būti ${o} ${i.minimum.toString()} ${a?.unit}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`Eilutė privalo prasidėti "${r.prefix}"`:r.format==="ends_with"?`Eilutė privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilutė privalo įtraukti "${r.includes}"`:r.format==="regex"?`Eilutė privalo atitikti ${r.pattern}`:`Neteisingas ${n[r.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${Qt(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const r=Zb(i.origin);return`${Db(r??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function jat(){return{localeError:Rat()}}const Mat=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"број";case"object":{if(Array.isArray(r))return"низа";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return r=>{switch(r.code){case"invalid_type":return`Грешен внес: се очекува ${r.expected}, примено ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${qn(r.values[0])}`:`Грешана опција: се очекува една ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${a}${r.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Премногу мал: се очекува ${r.origin} да има ${a}${r.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${r.origin} да биде ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Неважечка низа: мора да започнува со "${a.prefix}"`:a.format==="ends_with"?`Неважечка низа: мора да завршува со "${a.suffix}"`:a.format==="includes"?`Неважечка низа: мора да вклучува "${a.includes}"`:a.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${a.pattern}`:`Invalid ${i[a.format]??r.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`;default:return"Грешен внес"}}};function Lat(){return{localeError:Mat()}}const $at=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"nombor";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${qn(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Terlalu besar: dijangka ${r.origin??"nilai"} ${o.verb} ${a}${r.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Terlalu kecil: dijangka ${r.origin} ${o.verb} ${a}${r.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${i[a.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Qt(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function Uat(){return{localeError:$at()}}const Qat=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"getal";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${qn(r.values[0])}`:`Ongeldige optie: verwacht één van ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Te lang: verwacht dat ${r.origin??"waarde"} ${a}${r.maximum.toString()} ${o.unit??"elementen"} bevat`:`Te lang: verwacht dat ${r.origin??"waarde"} ${a}${r.maximum.toString()} is`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Te kort: verwacht dat ${r.origin} ${a}${r.minimum.toString()} ${o.unit} bevat`:`Te kort: verwacht dat ${r.origin} ${a}${r.minimum.toString()} is`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${i[a.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function Hat(){return{localeError:Qat()}}const zat=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"tall";case"object":{if(Array.isArray(r))return"liste";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${qn(r.values[0])}`:`Ugyldig valg: forventet en av ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`For stor(t): forventet ${r.origin??"value"} til å ha ${a}${r.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til å ha ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`For lite(n): forventet ${r.origin} til å ha ${a}${r.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${r.origin} til å ha ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Ugyldig streng: må starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: må ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: må inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: må matche mønsteret ${a.pattern}`:`Ugyldig ${i[a.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function Vat(){return{localeError:zat()}}const Gat=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"numara";case"object":{if(Array.isArray(r))return"saf";if(r===null)return"gayb";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return r=>{switch(r.code){case"invalid_type":return`Fâsit giren: umulan ${r.expected}, alınan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Fâsit giren: umulan ${qn(r.values[0])}`:`Fâsit tercih: mûteberler ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Fazla büyük: ${r.origin??"value"}, ${a}${r.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${r.origin??"value"}, ${a}${r.maximum.toString()} olmalıydı.`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Fazla küçük: ${r.origin}, ${a}${r.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${r.origin}, ${a}${r.minimum.toString()} olmalıydı.`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Fâsit metin: "${a.prefix}" ile başlamalı.`:a.format==="ends_with"?`Fâsit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`Fâsit metin: "${a.includes}" ihtivâ etmeli.`:a.format==="regex"?`Fâsit metin: ${a.pattern} nakşına uymalı.`:`Fâsit ${i[a.format]??r.format}`}case"not_multiple_of":return`Fâsit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`${r.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function qat(){return{localeError:Gat()}}const Kat=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"عدد";case"object":{if(Array.isArray(r))return"ارې";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return r=>{switch(r.code){case"invalid_type":return`ناسم ورودي: باید ${r.expected} وای, مګر ${n(r.input)} ترلاسه شو`;case"invalid_value":return r.values.length===1?`ناسم ورودي: باید ${qn(r.values[0])} وای`:`ناسم انتخاب: باید یو له ${Qt(r.values,"|")} څخه وای`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`ډیر لوی: ${r.origin??"ارزښت"} باید ${a}${r.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${r.origin??"ارزښت"} باید ${a}${r.maximum.toString()} وي`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`ډیر کوچنی: ${r.origin} باید ${a}${r.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${r.origin} باید ${a}${r.minimum.toString()} وي`}case"invalid_format":{const a=r;return a.format==="starts_with"?`ناسم متن: باید د "${a.prefix}" سره پیل شي`:a.format==="ends_with"?`ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي`:a.format==="includes"?`ناسم متن: باید "${a.includes}" ولري`:a.format==="regex"?`ناسم متن: باید د ${a.pattern} سره مطابقت ولري`:`${i[a.format]??r.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`;default:return"ناسمه ورودي"}}};function Wat(){return{localeError:Kat()}}const Yat=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"liczba";case"object":{if(Array.isArray(r))return"tablica";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return r=>{switch(r.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${r.expected}, otrzymano ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${qn(r.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${a}${r.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${a}${r.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${a.prefix}"`:a.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${a.suffix}"`:a.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${a.includes}"`:a.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${a.pattern}`:`Nieprawidłow(y/a/e) ${i[a.format]??r.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Xat(){return{localeError:Yat()}}const Zat=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"número";case"object":{if(Array.isArray(r))return"array";if(r===null)return"nulo";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipo inválido: esperado ${r.expected}, recebido ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entrada inválida: esperado ${qn(r.values[0])}`:`Opção inválida: esperada uma das ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${a}${r.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Muito pequeno: esperado que ${r.origin} tivesse ${a}${r.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Texto inválido: deve começar com "${a.prefix}"`:a.format==="ends_with"?`Texto inválido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inválido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inválido: deve corresponder ao padrão ${a.pattern}`:`${i[a.format]??r.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Chave inválida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${r.origin}`;default:return"Campo inválido"}}};function Jat(){return{localeError:Zat()}}function UX(e,t,n,i){const r=Math.abs(e),a=r%10,o=r%100;return o>=11&&o<=19?i:a===1?t:a>=2&&a<=4?n:i}const eot=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"число";case"object":{if(Array.isArray(r))return"массив";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return r=>{switch(r.code){case"invalid_type":return`Неверный ввод: ожидалось ${r.expected}, получено ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Неверный ввод: ожидалось ${qn(r.values[0])}`:`Неверный вариант: ожидалось одно из ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);if(o){const s=Number(r.maximum),l=UX(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${a}${r.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);if(o){const s=Number(r.minimum),l=UX(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${a}${r.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Неверная строка: должна начинаться с "${a.prefix}"`:a.format==="ends_with"?`Неверная строка: должна заканчиваться на "${a.suffix}"`:a.format==="includes"?`Неверная строка: должна содержать "${a.includes}"`:a.format==="regex"?`Неверная строка: должна соответствовать шаблону ${a.pattern}`:`Неверный ${i[a.format]??r.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`;default:return"Неверные входные данные"}}};function tot(){return{localeError:eot()}}const not=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"število";case"object":{if(Array.isArray(r))return"tabela";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${r.expected}, prejeto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neveljaven vnos: pričakovano ${qn(r.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${a}${r.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Premajhno: pričakovano, da bo ${r.origin} imelo ${a}${r.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${r.origin} ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Neveljaven niz: mora se začeti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se končati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${i[a.format]??r.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function iot(){return{localeError:not()}}const rot=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"antal";case"object":{if(Array.isArray(r))return"lista";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${r.expected}, fick ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ogiltig inmatning: förväntat ${qn(r.values[0])}`:`Ogiltigt val: förväntade en av ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`För stor(t): förväntade ${r.origin??"värdet"} att ha ${a}${r.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${r.origin??"värdet"} att ha ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`För lite(t): förväntade ${r.origin??"värdet"} att ha ${a}${r.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${r.origin??"värdet"} att ha ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Ogiltig sträng: måste börja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig sträng: måste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig sträng: måste innehålla "${a.includes}"`:a.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${a.pattern}"`:`Ogiltig(t) ${i[a.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${r.origin??"värdet"}`;default:return"Ogiltig input"}}};function aot(){return{localeError:rot()}}const oot=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(r))return"அணி";if(r===null)return"வெறுமை";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r.expected}, பெறப்பட்டது ${n(r.input)}`;case"invalid_value":return r.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${qn(r.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Qt(r.values,"|")} இல் ஒன்று`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${a}${r.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${a}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${a}${r.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${a}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const a=r;return a.format==="starts_with"?`தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்`:a.format==="ends_with"?`தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்`:a.format==="includes"?`தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்`:a.format==="regex"?`தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[a.format]??r.format}`}case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function sot(){return{localeError:oot()}}const lot=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(r))return"อาร์เรย์ (Array)";if(r===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return r=>{switch(r.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r.expected} แต่ได้รับ ${n(r.input)}`;case"invalid_value":return r.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${qn(r.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"ไม่เกิน":"น้อยกว่า",o=t(r.origin);return o?`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${a} ${r.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${a} ${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?"อย่างน้อย":"มากกว่า",o=t(r.origin);return o?`น้อยกว่ากำหนด: ${r.origin} ควรมี${a} ${r.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${r.origin} ควรมี${a} ${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"`:a.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"`:a.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ`:a.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[a.format]??r.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${Qt(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function cot(){return{localeError:lot()}}const dot=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},uot=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${dot(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${qn(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${Qt(i.values,"|")}`;case"too_big":{const r=i.inclusive?"<=":"<",a=t(i.origin);return a?`Çok büyük: beklenen ${i.origin??"değer"} ${r}${i.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${r}${i.maximum.toString()}`}case"too_small":{const r=i.inclusive?">=":">",a=t(i.origin);return a?`Çok küçük: beklenen ${i.origin} ${r}${i.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${i.origin} ${r}${i.minimum.toString()}`}case"invalid_format":{const r=i;return r.format==="starts_with"?`Geçersiz metin: "${r.prefix}" ile başlamalı`:r.format==="ends_with"?`Geçersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Geçersiz metin: "${r.includes}" içermeli`:r.format==="regex"?`Geçersiz metin: ${r.pattern} desenine uymalı`:`Geçersiz ${n[r.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${Qt(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function fot(){return{localeError:uot()}}const Aot=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"число";case"object":{if(Array.isArray(r))return"масив";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return r=>{switch(r.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${r.expected}, отримано ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Неправильні вхідні дані: очікується ${qn(r.values[0])}`:`Неправильна опція: очікується одне з ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Занадто велике: очікується, що ${r.origin??"значення"} ${o.verb} ${a}${r.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${r.origin??"значення"} буде ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Занадто мале: очікується, що ${r.origin} ${o.verb} ${a}${r.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${r.origin} буде ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Неправильний рядок: повинен починатися з "${a.prefix}"`:a.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${a.suffix}"`:a.format==="includes"?`Неправильний рядок: повинен містити "${a.includes}"`:a.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${a.pattern}`:`Неправильний ${i[a.format]??r.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${Qt(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`;default:return"Неправильні вхідні дані"}}};function Uge(){return{localeError:Aot()}}function mot(){return Uge()}const hot=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"نمبر";case"object":{if(Array.isArray(r))return"آرے";if(r===null)return"نل";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return r=>{switch(r.code){case"invalid_type":return`غلط ان پٹ: ${r.expected} متوقع تھا، ${n(r.input)} موصول ہوا`;case"invalid_value":return r.values.length===1?`غلط ان پٹ: ${qn(r.values[0])} متوقع تھا`:`غلط آپشن: ${Qt(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`بہت بڑا: ${r.origin??"ویلیو"} کے ${a}${r.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${r.origin??"ویلیو"} کا ${a}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`بہت چھوٹا: ${r.origin} کے ${a}${r.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${r.origin} کا ${a}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const a=r;return a.format==="starts_with"?`غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے`:a.format==="ends_with"?`غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے`:a.format==="includes"?`غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے`:a.format==="regex"?`غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے`:`غلط ${i[a.format]??r.format}`}case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${Qt(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function pot(){return{localeError:hot()}}const got=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"số";case"object":{if(Array.isArray(r))return"mảng";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return r=>{switch(r.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${r.expected}, nhận được ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Đầu vào không hợp lệ: mong đợi ${qn(r.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Quá lớn: mong đợi ${r.origin??"giá trị"} ${o.verb} ${a}${r.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${r.origin??"giá trị"} ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Quá nhỏ: mong đợi ${r.origin} ${o.verb} ${a}${r.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${r.origin} ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"`:a.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"`:a.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${a.includes}"`:a.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}`:`${i[a.format]??r.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${r.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${Qt(r.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${r.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${r.origin}`;default:return"Đầu vào không hợp lệ"}}};function vot(){return{localeError:got()}}const yot=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(r))return"数组";if(r===null)return"空值(null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return r=>{switch(r.code){case"invalid_type":return`无效输入:期望 ${r.expected},实际接收 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`无效输入:期望 ${qn(r.values[0])}`:`无效选项:期望以下之一 ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`数值过大:期望 ${r.origin??"值"} ${a}${r.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${r.origin??"值"} ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`数值过小:期望 ${r.origin} ${a}${r.minimum.toString()} ${o.unit}`:`数值过小:期望 ${r.origin} ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`无效字符串:必须以 "${a.prefix}" 开头`:a.format==="ends_with"?`无效字符串:必须以 "${a.suffix}" 结尾`:a.format==="includes"?`无效字符串:必须包含 "${a.includes}"`:a.format==="regex"?`无效字符串:必须满足正则表达式 ${a.pattern}`:`无效${i[a.format]??r.format}`}case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${Qt(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`;default:return"无效输入"}}};function bot(){return{localeError:yot()}}const kot=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return r=>{switch(r.code){case"invalid_type":return`無效的輸入值:預期為 ${r.expected},但收到 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`無效的輸入值:預期為 ${qn(r.values[0])}`:`無效的選項:預期為以下其中之一 ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`數值過大:預期 ${r.origin??"值"} 應為 ${a}${r.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${r.origin??"值"} 應為 ${a}${r.maximum.toString()}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`數值過小:預期 ${r.origin} 應為 ${a}${r.minimum.toString()} ${o.unit}`:`數值過小:預期 ${r.origin} 應為 ${a}${r.minimum.toString()}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`無效的字串:必須以 "${a.prefix}" 開頭`:a.format==="ends_with"?`無效的字串:必須以 "${a.suffix}" 結尾`:a.format==="includes"?`無效的字串:必須包含 "${a.includes}"`:a.format==="regex"?`無效的字串:必須符合格式 ${a.pattern}`:`無效的 ${i[a.format]??r.format}`}case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${Qt(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`;default:return"無效的輸入值"}}};function wot(){return{localeError:kot()}}const Sot=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(r){return e[r]??null}const n=r=>{const a=typeof r;switch(a){case"number":return Number.isNaN(r)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(r))return"akopọ";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return a},i={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return r=>{switch(r.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${r.expected}, àmọ̀ a rí ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${qn(r.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${Qt(r.values,"|")}`;case"too_big":{const a=r.inclusive?"<=":"<",o=t(r.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${r.origin??"iye"} ${o.verb} ${a}${r.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${a}${r.maximum}`}case"too_small":{const a=r.inclusive?">=":">",o=t(r.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${r.origin} ${o.verb} ${a}${r.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${a}${r.minimum}`}case"invalid_format":{const a=r;return a.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${a.prefix}"`:a.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${a.suffix}"`:a.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${a.includes}"`:a.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${a.pattern}`:`Aṣìṣe: ${i[a.format]??r.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${r.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${Qt(r.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${r.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${r.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function xot(){return{localeError:Sot()}}const Qge=Object.freeze(Object.defineProperty({__proto__:null,ar:Mrt,az:$rt,be:Qrt,bg:Vrt,ca:qrt,cs:Wrt,da:Xrt,de:Jrt,en:Lge,eo:rat,es:oat,fa:lat,fi:dat,fr:fat,frCA:mat,he:pat,hu:vat,id:bat,is:Sat,it:Nat,ja:_at,ka:Bat,kh:Tat,km:$ge,ko:Oat,lt:jat,mk:Lat,ms:Uat,nl:Hat,no:Vat,ota:qat,pl:Xat,ps:Wat,pt:Jat,ru:tot,sl:iot,sv:aot,ta:sot,th:cot,tr:fot,ua:mot,uk:Uge,ur:pot,vi:vot,yo:xot,zhCN:bot,zhTW:wot},Symbol.toStringTag,{value:"Module"})),Hge=Symbol("ZodOutput"),zge=Symbol("ZodInput");class dL{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function uL(){return new dL}const rp=uL();function Vge(e,t){return new e({type:"string",...Rt(t)})}function Gge(e,t){return new e({type:"string",coerce:!0,...Rt(t)})}function fL(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Rt(t)})}function iF(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Rt(t)})}function AL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Rt(t)})}function mL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Rt(t)})}function hL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Rt(t)})}function pL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Rt(t)})}function nB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Rt(t)})}function gL(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Rt(t)})}function vL(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Rt(t)})}function yL(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Rt(t)})}function bL(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Rt(t)})}function kL(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Rt(t)})}function wL(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Rt(t)})}function SL(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Rt(t)})}function xL(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Rt(t)})}function NL(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Rt(t)})}function CL(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Rt(t)})}function _L(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Rt(t)})}function FL(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Rt(t)})}function EL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Rt(t)})}function BL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Rt(t)})}function DL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Rt(t)})}const qge={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Kge(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Rt(t)})}function Wge(e,t){return new e({type:"string",format:"date",check:"string_format",...Rt(t)})}function Yge(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Rt(t)})}function Xge(e,t){return new e({type:"string",format:"duration",check:"string_format",...Rt(t)})}function Zge(e,t){return new e({type:"number",checks:[],...Rt(t)})}function Jge(e,t){return new e({type:"number",coerce:!0,checks:[],...Rt(t)})}function eve(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Rt(t)})}function tve(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Rt(t)})}function nve(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Rt(t)})}function ive(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Rt(t)})}function rve(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Rt(t)})}function ave(e,t){return new e({type:"boolean",...Rt(t)})}function ove(e,t){return new e({type:"boolean",coerce:!0,...Rt(t)})}function sve(e,t){return new e({type:"bigint",...Rt(t)})}function lve(e,t){return new e({type:"bigint",coerce:!0,...Rt(t)})}function cve(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Rt(t)})}function dve(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Rt(t)})}function uve(e,t){return new e({type:"symbol",...Rt(t)})}function fve(e,t){return new e({type:"undefined",...Rt(t)})}function Ave(e,t){return new e({type:"null",...Rt(t)})}function mve(e){return new e({type:"any"})}function hve(e){return new e({type:"unknown"})}function pve(e,t){return new e({type:"never",...Rt(t)})}function gve(e,t){return new e({type:"void",...Rt(t)})}function vve(e,t){return new e({type:"date",...Rt(t)})}function yve(e,t){return new e({type:"date",coerce:!0,...Rt(t)})}function bve(e,t){return new e({type:"nan",...Rt(t)})}function Ep(e,t){return new tL({check:"less_than",...Rt(t),value:e,inclusive:!1})}function Gd(e,t){return new tL({check:"less_than",...Rt(t),value:e,inclusive:!0})}function Bp(e,t){return new nL({check:"greater_than",...Rt(t),value:e,inclusive:!1})}function tc(e,t){return new nL({check:"greater_than",...Rt(t),value:e,inclusive:!0})}function kve(e){return Bp(0,e)}function wve(e){return Ep(0,e)}function Sve(e){return Gd(0,e)}function xve(e){return tc(0,e)}function qk(e,t){return new lpe({check:"multiple_of",...Rt(t),value:e})}function iB(e,t){return new upe({check:"max_size",...Rt(t),maximum:e})}function Kk(e,t){return new fpe({check:"min_size",...Rt(t),minimum:e})}function TL(e,t){return new Ape({check:"size_equals",...Rt(t),size:e})}function rB(e,t){return new mpe({check:"max_length",...Rt(t),maximum:e})}function Ly(e,t){return new hpe({check:"min_length",...Rt(t),minimum:e})}function aB(e,t){return new ppe({check:"length_equals",...Rt(t),length:e})}function IL(e,t){return new gpe({check:"string_format",format:"regex",...Rt(t),pattern:e})}function OL(e){return new vpe({check:"string_format",format:"lowercase",...Rt(e)})}function PL(e){return new ype({check:"string_format",format:"uppercase",...Rt(e)})}function RL(e,t){return new bpe({check:"string_format",format:"includes",...Rt(t),includes:e})}function jL(e,t){return new kpe({check:"string_format",format:"starts_with",...Rt(t),prefix:e})}function ML(e,t){return new wpe({check:"string_format",format:"ends_with",...Rt(t),suffix:e})}function Nve(e,t,n){return new Spe({check:"property",property:e,schema:t,...Rt(n)})}function LL(e,t){return new xpe({check:"mime_type",mime:e,...Rt(t)})}function ig(e){return new Npe({check:"overwrite",tx:e})}function $L(e){return ig(t=>t.normalize(e))}function UL(){return ig(e=>e.trim())}function QL(){return ig(e=>e.toLowerCase())}function HL(){return ig(e=>e.toUpperCase())}function Cve(e,t,n){return new e({type:"array",element:t,...Rt(n)})}function Not(e,t,n){return new e({type:"union",options:t,...Rt(n)})}function Cot(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...Rt(i)})}function _ot(e,t,n){return new e({type:"intersection",left:t,right:n})}function Fot(e,t,n,i){const r=n instanceof ri,a=r?i:n,o=r?n:null;return new e({type:"tuple",items:t,rest:o,...Rt(a)})}function Eot(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...Rt(i)})}function Bot(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...Rt(i)})}function Dot(e,t,n){return new e({type:"set",valueType:t,...Rt(n)})}function Tot(e,t,n){const i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...Rt(n)})}function Iot(e,t,n){return new e({type:"enum",entries:t,...Rt(n)})}function Oot(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Rt(n)})}function _ve(e,t){return new e({type:"file",...Rt(t)})}function Pot(e,t){return new e({type:"transform",transform:t})}function Rot(e,t){return new e({type:"optional",innerType:t})}function jot(e,t){return new e({type:"nullable",innerType:t})}function Mot(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():ZE(n)}})}function Lot(e,t,n){return new e({type:"nonoptional",innerType:t,...Rt(n)})}function $ot(e,t){return new e({type:"success",innerType:t})}function Uot(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function Qot(e,t,n){return new e({type:"pipe",in:t,out:n})}function Hot(e,t){return new e({type:"readonly",innerType:t})}function zot(e,t,n){return new e({type:"template_literal",parts:t,...Rt(n)})}function Vot(e,t){return new e({type:"lazy",getter:t})}function Got(e,t){return new e({type:"promise",innerType:t})}function Fve(e,t,n){const i=Rt(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Eve(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Rt(n)})}function Bve(e){const t=Dve(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(jy(i,n.value,t._zod.def));else{const r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(jy(r))}},e(n.value,n)));return t}function Dve(e,t){const n=new Ma({check:"custom",...Rt(t)});return n._zod.check=e,n}function Tve(e,t){const n=Rt(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),r=r.map(h=>typeof h=="string"?h.toLowerCase():h));const a=new Set(i),o=new Set(r),s=e.Codec??cL,l=e.Boolean??aL,c=e.String??nw,d=new c({type:"string",error:n.error}),u=new l({type:"boolean",error:n.error}),m=new s({type:"pipe",in:d,out:u,transform:((h,v)=>{let g=h;return n.case!=="sensitive"&&(g=g.toLowerCase()),a.has(g)?!0:o.has(g)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:v.value,inst:m,continue:!1}),{})}),reverseTransform:((h,v)=>h===!0?i[0]||"true":r[0]||"false"),error:n.error});return m}function iw(e,t,n,i={}){const r=Rt(i),a={...Rt(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(a.pattern=n),new e(a)}class GR{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??rp,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var i;const r=t._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,s);const l=t._zod.toJSONSchema?.();if(l)s.schema=l;else{const u={...n,schemaPath:[...n.schemaPath,t],path:n.path},m=t._zod.parent;if(m)s.ref=m,this.process(m,u),this.seen.get(m).isParent=!0;else{const h=s.schema;switch(r.type){case"string":{const v=h;v.type="string";const{minimum:g,maximum:k,format:b,patterns:w,contentEncoding:C}=t._zod.bag;if(typeof g=="number"&&(v.minLength=g),typeof k=="number"&&(v.maxLength=k),b&&(v.format=a[b]??b,v.format===""&&delete v.format),C&&(v.contentEncoding=C),w&&w.size>0){const N=[...w];N.length===1?v.pattern=N[0].source:N.length>1&&(s.schema.allOf=[...N.map(_=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}break}case"number":{const v=h,{minimum:g,maximum:k,format:b,multipleOf:w,exclusiveMaximum:C,exclusiveMinimum:N}=t._zod.bag;typeof b=="string"&&b.includes("int")?v.type="integer":v.type="number",typeof N=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=N,v.exclusiveMinimum=!0):v.exclusiveMinimum=N),typeof g=="number"&&(v.minimum=g,typeof N=="number"&&this.target!=="draft-4"&&(N>=g?delete v.minimum:delete v.exclusiveMinimum)),typeof C=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=C,v.exclusiveMaximum=!0):v.exclusiveMaximum=C),typeof k=="number"&&(v.maximum=k,typeof C=="number"&&this.target!=="draft-4"&&(C<=k?delete v.maximum:delete v.exclusiveMaximum)),typeof w=="number"&&(v.multipleOf=w);break}case"boolean":{const v=h;v.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=!0,h.enum=[null]):h.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const v=h,{minimum:g,maximum:k}=t._zod.bag;typeof g=="number"&&(v.minItems=g),typeof k=="number"&&(v.maxItems=k),v.type="array",v.items=this.process(r.element,{...u,path:[...u.path,"items"]});break}case"object":{const v=h;v.type="object",v.properties={};const g=r.shape;for(const w in g)v.properties[w]=this.process(g[w],{...u,path:[...u.path,"properties",w]});const k=new Set(Object.keys(g)),b=new Set([...k].filter(w=>{const C=r.shape[w]._zod;return this.io==="input"?C.optin===void 0:C.optout===void 0}));b.size>0&&(v.required=Array.from(b)),r.catchall?._zod.def.type==="never"?v.additionalProperties=!1:r.catchall?r.catchall&&(v.additionalProperties=this.process(r.catchall,{...u,path:[...u.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=!1);break}case"union":{const v=h,g=r.options.map((k,b)=>this.process(k,{...u,path:[...u.path,"anyOf",b]}));v.anyOf=g;break}case"intersection":{const v=h,g=this.process(r.left,{...u,path:[...u.path,"allOf",0]}),k=this.process(r.right,{...u,path:[...u.path,"allOf",1]}),b=C=>"allOf"in C&&Object.keys(C).length===1,w=[...b(g)?g.allOf:[g],...b(k)?k.allOf:[k]];v.allOf=w;break}case"tuple":{const v=h;v.type="array";const g=this.target==="draft-2020-12"?"prefixItems":"items",k=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",b=r.items.map((_,F)=>this.process(_,{...u,path:[...u.path,g,F]})),w=r.rest?this.process(r.rest,{...u,path:[...u.path,k,...this.target==="openapi-3.0"?[r.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=b,w&&(v.items=w)):this.target==="openapi-3.0"?(v.items={anyOf:b},w&&v.items.anyOf.push(w),v.minItems=b.length,w||(v.maxItems=b.length)):(v.items=b,w&&(v.additionalItems=w));const{minimum:C,maximum:N}=t._zod.bag;typeof C=="number"&&(v.minItems=C),typeof N=="number"&&(v.maxItems=N);break}case"record":{const v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(r.keyType,{...u,path:[...u.path,"propertyNames"]})),v.additionalProperties=this.process(r.valueType,{...u,path:[...u.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const v=h,g=$M(r.entries);g.every(k=>typeof k=="number")&&(v.type="number"),g.every(k=>typeof k=="string")&&(v.type="string"),v.enum=g;break}case"literal":{const v=h,g=[];for(const k of r.values)if(k===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(k))}else g.push(k);if(g.length!==0)if(g.length===1){const k=g[0];v.type=k===null?"null":typeof k,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[k]:v.const=k}else g.every(k=>typeof k=="number")&&(v.type="number"),g.every(k=>typeof k=="string")&&(v.type="string"),g.every(k=>typeof k=="boolean")&&(v.type="string"),g.every(k=>k===null)&&(v.type="null"),v.enum=g;break}case"file":{const v=h,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:b,mime:w}=t._zod.bag;k!==void 0&&(g.minLength=k),b!==void 0&&(g.maxLength=b),w?w.length===1?(g.contentMediaType=w[0],Object.assign(v,g)):v.anyOf=w.map(C=>({...g,contentMediaType:C})):Object.assign(v,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const v=this.process(r.innerType,u);this.target==="openapi-3.0"?(s.ref=r.innerType,h.nullable=!0):h.anyOf=[v,{type:"null"}];break}case"nonoptional":{this.process(r.innerType,u),s.ref=r.innerType;break}case"success":{const v=h;v.type="boolean";break}case"default":{this.process(r.innerType,u),s.ref=r.innerType,h.default=JSON.parse(JSON.stringify(r.defaultValue));break}case"prefault":{this.process(r.innerType,u),s.ref=r.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break}case"catch":{this.process(r.innerType,u),s.ref=r.innerType;let v;try{v=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const v=h,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=g.source;break}case"pipe":{const v=this.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;this.process(v,u),s.ref=v;break}case"readonly":{this.process(r.innerType,u),s.ref=r.innerType,h.readOnly=!0;break}case"promise":{this.process(r.innerType,u),s.ref=r.innerType;break}case"optional":{this.process(r.innerType,u),s.ref=r.innerType;break}case"lazy":{const v=t._zod.innerType;this.process(v,u),s.ref=v;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const c=this.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),this.io==="input"&&Co(t)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(t).schema}emit(t,n){const i={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},r=this.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=d=>{const u=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const g=i.external.registry.get(d[0])?.id,k=i.external.uri??(w=>w);if(g)return{ref:k(g)};const b=d[1].defId??d[1].schema.id??`schema${this.counter++}`;return d[1].defId=b,{defId:b,ref:`${k("__shared")}#/${u}/${b}`}}if(d[1]===r)return{ref:"#"};const h=`#/${u}/`,v=d[1].schema.id??`__schema${this.counter++}`;return{defId:v,ref:h+v}},o=d=>{if(d[1].schema.$ref)return;const u=d[1],{ref:m,defId:h}=a(d);u.def={...u.schema},h&&(u.defId=h);const v=u.schema;for(const g in v)delete v[g];v.$ref=m};if(i.cycles==="throw")for(const d of this.seen.entries()){const u=d[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
635
635
|
|
|
636
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of this.seen.entries()){const u=d[1];if(t===d[0]){o(d);continue}if(i.external){const h=i.external.registry.get(d[0])?.id;if(t!==d[0]&&h){o(d);continue}}if(this.metadataRegistry.get(d[0])?.id){o(d);continue}if(u.cycle){o(d);continue}if(u.count>1&&i.reused==="ref"){o(d);continue}}const s=(d,u)=>{const m=this.seen.get(d),h=m.def??m.schema,v={...h};if(m.ref===null)return;const g=m.ref;if(m.ref=null,g){s(g,u);const k=this.seen.get(g).schema;k.$ref&&(u.target==="draft-7"||u.target==="draft-4"||u.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(k)):(Object.assign(h,k),Object.assign(h,v))}m.isParent||this.override({zodSchema:d,jsonSchema:h,path:m.path??[]})};for(const d of[...this.seen.entries()].reverse())s(d[0],{target:this.target});const l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){const d=i.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");l.$id=i.external.uri(d)}Object.assign(l,r.def);const c=i.external?.defs??{};for(const d of this.seen.entries()){const u=d[1];u.def&&u.defId&&(c[u.defId]=u.def)}i.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function Ive(e,t){if(e instanceof dL){const i=new GR(t),r={};for(const s of e._idmap.entries()){const[l,c]=s;i.process(c)}const a={},o={registry:e,uri:t?.uri,defs:r};for(const s of e._idmap.entries()){const[l,c]=s;a[l]=i.emit(c,{...t,external:o})}if(Object.keys(r).length>0){const s=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:r}}return{schemas:a}}const n=new GR(t);return n.process(e),n.emit(e,t)}function Co(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Co(r.element,n);case"object":{for(const a in r.shape)if(Co(r.shape[a],n))return!0;return!1}case"union":{for(const a of r.options)if(Co(a,n))return!0;return!1}case"intersection":return Co(r.left,n)||Co(r.right,n);case"tuple":{for(const a of r.items)if(Co(a,n))return!0;return!!(r.rest&&Co(r.rest,n))}case"record":return Co(r.keyType,n)||Co(r.valueType,n);case"map":return Co(r.keyType,n)||Co(r.valueType,n);case"set":return Co(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Co(r.innerType,n);case"lazy":return Co(r.getter(),n);case"default":return Co(r.innerType,n);case"prefault":return Co(r.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Co(r.in,n)||Co(r.out,n);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${r.type}`)}const qot=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Kot=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:age,$ZodArray:dge,$ZodAsyncError:Ap,$ZodBase64:qpe,$ZodBase64URL:Wpe,$ZodBigInt:oL,$ZodBigIntFormat:tge,$ZodBoolean:aL,$ZodCIDRv4:Vpe,$ZodCIDRv6:Gpe,$ZodCUID:Ope,$ZodCUID2:Ppe,$ZodCatch:Bge,$ZodCheck:Ma,$ZodCheckBigIntFormat:dpe,$ZodCheckEndsWith:wpe,$ZodCheckGreaterThan:nL,$ZodCheckIncludes:bpe,$ZodCheckLengthEquals:ppe,$ZodCheckLessThan:tL,$ZodCheckLowerCase:vpe,$ZodCheckMaxLength:mpe,$ZodCheckMaxSize:upe,$ZodCheckMimeType:xpe,$ZodCheckMinLength:hpe,$ZodCheckMinSize:fpe,$ZodCheckMultipleOf:lpe,$ZodCheckNumberFormat:cpe,$ZodCheckOverwrite:Npe,$ZodCheckProperty:Spe,$ZodCheckRegex:gpe,$ZodCheckSizeEquals:Ape,$ZodCheckStartsWith:kpe,$ZodCheckStringFormat:tw,$ZodCheckUpperCase:ype,$ZodCodec:cL,$ZodCustom:Mge,$ZodCustomStringFormat:Jpe,$ZodDate:cge,$ZodDefault:Cge,$ZodDiscriminatedUnion:hge,$ZodE164:Ype,$ZodEmail:Bpe,$ZodEmoji:Tpe,$ZodEncodeError:YE,$ZodEnum:bge,$ZodError:tB,$ZodFile:wge,$ZodFunction:Pge,$ZodGUID:Fpe,$ZodIPv4:Hpe,$ZodIPv6:zpe,$ZodISODate:$pe,$ZodISODateTime:Lpe,$ZodISODuration:Qpe,$ZodISOTime:Upe,$ZodIntersection:pge,$ZodJWT:Zpe,$ZodKSUID:Mpe,$ZodLazy:jge,$ZodLiteral:kge,$ZodMap:vge,$ZodNaN:Dge,$ZodNanoID:Ipe,$ZodNever:sge,$ZodNonOptional:Fge,$ZodNull:rge,$ZodNullable:Nge,$ZodNumber:rL,$ZodNumberFormat:ege,$ZodObject:Age,$ZodObjectJIT:mge,$ZodOptional:xge,$ZodPipe:Tge,$ZodPrefault:_ge,$ZodPromise:Rge,$ZodReadonly:Ige,$ZodRealError:mc,$ZodRecord:gge,$ZodRegistry:dL,$ZodSet:yge,$ZodString:nw,$ZodStringFormat:Lr,$ZodSuccess:Ege,$ZodSymbol:nge,$ZodTemplateLiteral:Oge,$ZodTransform:Sge,$ZodTuple:lL,$ZodType:ri,$ZodULID:Rpe,$ZodURL:Dpe,$ZodUUID:Epe,$ZodUndefined:ige,$ZodUnion:sL,$ZodUnknown:oge,$ZodVoid:lge,$ZodXID:jpe,$brand:ahe,$constructor:st,$input:zge,$output:Hge,Doc:Cpe,JSONSchema:qot,JSONSchemaGenerator:GR,NEVER:rhe,TimePrecision:qge,_any:mve,_array:Cve,_base64:FL,_base64url:EL,_bigint:sve,_boolean:ave,_catch:Uot,_check:Dve,_cidrv4:CL,_cidrv6:_L,_coercedBigint:lve,_coercedBoolean:ove,_coercedDate:yve,_coercedNumber:Jge,_coercedString:Gge,_cuid:yL,_cuid2:bL,_custom:Fve,_date:vve,_decode:VM,_decodeAsync:qM,_default:Mot,_discriminatedUnion:Cot,_e164:BL,_email:fL,_emoji:gL,_encode:zM,_encodeAsync:GM,_endsWith:ML,_enum:Tot,_file:_ve,_float32:tve,_float64:nve,_gt:Bp,_gte:tc,_guid:iF,_includes:RL,_int:eve,_int32:ive,_int64:cve,_intersection:_ot,_ipv4:xL,_ipv6:NL,_isoDate:Wge,_isoDateTime:Kge,_isoDuration:Xge,_isoTime:Yge,_jwt:DL,_ksuid:SL,_lazy:Vot,_length:aB,_literal:Oot,_lowercase:OL,_lt:Ep,_lte:Gd,_map:Bot,_max:Gd,_maxLength:rB,_maxSize:iB,_mime:LL,_min:tc,_minLength:Ly,_minSize:Kk,_multipleOf:qk,_nan:bve,_nanoid:vL,_nativeEnum:Iot,_negative:wve,_never:pve,_nonnegative:xve,_nonoptional:Lot,_nonpositive:Sve,_normalize:$L,_null:Ave,_nullable:jot,_number:Zge,_optional:Rot,_overwrite:ig,_parse:W1,_parseAsync:Y1,_pipe:Qot,_positive:kve,_promise:Got,_property:Nve,_readonly:Hot,_record:Eot,_refine:Eve,_regex:IL,_safeDecode:WM,_safeDecodeAsync:XM,_safeEncode:KM,_safeEncodeAsync:YM,_safeParse:X1,_safeParseAsync:Z1,_set:Dot,_size:TL,_startsWith:jL,_string:Vge,_stringFormat:iw,_stringbool:Tve,_success:$ot,_superRefine:Bve,_symbol:uve,_templateLiteral:zot,_toLowerCase:QL,_toUpperCase:HL,_transform:Pot,_trim:UL,_tuple:Fot,_uint32:rve,_uint64:dve,_ulid:kL,_undefined:fve,_union:Not,_unknown:hve,_uppercase:PL,_url:nB,_uuid:AL,_uuidv4:mL,_uuidv6:hL,_uuidv7:pL,_void:gve,_xid:wL,clone:sd,config:Ws,decode:ort,decodeAsync:lrt,encode:art,encodeAsync:srt,flattenError:QM,formatError:HM,globalConfig:X2,globalRegistry:rp,isValidBase64:iL,isValidBase64URL:Kpe,isValidJWT:Xpe,locales:Qge,parse:eF,parseAsync:tF,prettifyError:Nhe,regexes:eL,registry:uL,safeDecode:drt,safeDecodeAsync:frt,safeEncode:crt,safeEncodeAsync:urt,safeParse:Che,safeParseAsync:_he,toDotPath:xhe,toJSONSchema:Ive,treeifyError:She,util:khe,version:_pe},Symbol.toStringTag,{value:"Module"})),zL=st("ZodISODateTime",(e,t)=>{Lpe.init(e,t),Xr.init(e,t)});function Ove(e){return Kge(zL,e)}const VL=st("ZodISODate",(e,t)=>{$pe.init(e,t),Xr.init(e,t)});function Pve(e){return Wge(VL,e)}const GL=st("ZodISOTime",(e,t)=>{Upe.init(e,t),Xr.init(e,t)});function Rve(e){return Yge(GL,e)}const qL=st("ZodISODuration",(e,t)=>{Qpe.init(e,t),Xr.init(e,t)});function jve(e){return Xge(qL,e)}const Wot=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:VL,ZodISODateTime:zL,ZodISODuration:qL,ZodISOTime:GL,date:Pve,datetime:Ove,duration:jve,time:Rve},Symbol.toStringTag,{value:"Module"})),Mve=(e,t)=>{tB.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>HM(e,n)},flatten:{value:n=>QM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Z2,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Z2,2)}},isEmpty:{get(){return e.issues.length===0}}})},Yot=st("ZodError",Mve),hc=st("ZodError",Mve,{Parent:Error}),Lve=W1(hc),$ve=Y1(hc),Uve=X1(hc),Qve=Z1(hc),Hve=zM(hc),zve=VM(hc),Vve=GM(hc),Gve=qM(hc),qve=KM(hc),Kve=WM(hc),Wve=YM(hc),Yve=XM(hc),gi=st("ZodType",(e,t)=>(ri.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(IA(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),e.clone=(n,i)=>sd(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Lve(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Uve(e,n,i),e.parseAsync=async(n,i)=>$ve(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Qve(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Hve(e,n,i),e.decode=(n,i)=>zve(e,n,i),e.encodeAsync=async(n,i)=>Vve(e,n,i),e.decodeAsync=async(n,i)=>Gve(e,n,i),e.safeEncode=(n,i)=>qve(e,n,i),e.safeDecode=(n,i)=>Kve(e,n,i),e.safeEncodeAsync=async(n,i)=>Wve(e,n,i),e.safeDecodeAsync=async(n,i)=>Yve(e,n,i),e.refine=(n,i)=>e.check(Rye(n,i)),e.superRefine=n=>e.check(jye(n)),e.overwrite=n=>e.check(ig(n)),e.optional=()=>oF(e),e.nullable=()=>sF(e),e.nullish=()=>oF(sF(e)),e.nonoptional=n=>xye(e,n),e.array=()=>gA(e),e.or=n=>g$([e,n]),e.and=n=>cye(e,n),e.transform=n=>lF(e,y$(n)),e.default=n=>kye(e,n),e.prefault=n=>Sye(e,n),e.catch=n=>_ye(e,n),e.pipe=n=>lF(e,n),e.readonly=()=>Bye(e),e.describe=n=>{const i=e.clone();return rp.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return rp.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return rp.get(e);const i=e.clone();return rp.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),KL=st("_ZodString",(e,t)=>{nw.init(e,t),gi.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(IL(...i)),e.includes=(...i)=>e.check(RL(...i)),e.startsWith=(...i)=>e.check(jL(...i)),e.endsWith=(...i)=>e.check(ML(...i)),e.min=(...i)=>e.check(Ly(...i)),e.max=(...i)=>e.check(rB(...i)),e.length=(...i)=>e.check(aB(...i)),e.nonempty=(...i)=>e.check(Ly(1,...i)),e.lowercase=i=>e.check(OL(i)),e.uppercase=i=>e.check(PL(i)),e.trim=()=>e.check(UL()),e.normalize=(...i)=>e.check($L(...i)),e.toLowerCase=()=>e.check(QL()),e.toUpperCase=()=>e.check(HL())}),oB=st("ZodString",(e,t)=>{nw.init(e,t),KL.init(e,t),e.email=n=>e.check(fL(WL,n)),e.url=n=>e.check(nB(sB,n)),e.jwt=n=>e.check(DL(d$,n)),e.emoji=n=>e.check(gL(YL,n)),e.guid=n=>e.check(iF(rF,n)),e.uuid=n=>e.check(AL(pA,n)),e.uuidv4=n=>e.check(mL(pA,n)),e.uuidv6=n=>e.check(hL(pA,n)),e.uuidv7=n=>e.check(pL(pA,n)),e.nanoid=n=>e.check(vL(XL,n)),e.guid=n=>e.check(iF(rF,n)),e.cuid=n=>e.check(yL(ZL,n)),e.cuid2=n=>e.check(bL(JL,n)),e.ulid=n=>e.check(kL(e$,n)),e.base64=n=>e.check(FL(s$,n)),e.base64url=n=>e.check(EL(l$,n)),e.xid=n=>e.check(wL(t$,n)),e.ksuid=n=>e.check(SL(n$,n)),e.ipv4=n=>e.check(xL(i$,n)),e.ipv6=n=>e.check(NL(r$,n)),e.cidrv4=n=>e.check(CL(a$,n)),e.cidrv6=n=>e.check(_L(o$,n)),e.e164=n=>e.check(BL(c$,n)),e.datetime=n=>e.check(Ove(n)),e.date=n=>e.check(Pve(n)),e.time=n=>e.check(Rve(n)),e.duration=n=>e.check(jve(n))});function _o(e){return Vge(oB,e)}const Xr=st("ZodStringFormat",(e,t)=>{Lr.init(e,t),KL.init(e,t)}),WL=st("ZodEmail",(e,t)=>{Bpe.init(e,t),Xr.init(e,t)});function Xot(e){return fL(WL,e)}const rF=st("ZodGUID",(e,t)=>{Fpe.init(e,t),Xr.init(e,t)});function Zot(e){return iF(rF,e)}const pA=st("ZodUUID",(e,t)=>{Epe.init(e,t),Xr.init(e,t)});function Jot(e){return AL(pA,e)}function est(e){return mL(pA,e)}function tst(e){return hL(pA,e)}function nst(e){return pL(pA,e)}const sB=st("ZodURL",(e,t)=>{Dpe.init(e,t),Xr.init(e,t)});function ist(e){return nB(sB,e)}function rst(e){return nB(sB,{protocol:/^https?$/,hostname:zhe,...Rt(e)})}const YL=st("ZodEmoji",(e,t)=>{Tpe.init(e,t),Xr.init(e,t)});function ast(e){return gL(YL,e)}const XL=st("ZodNanoID",(e,t)=>{Ipe.init(e,t),Xr.init(e,t)});function ost(e){return vL(XL,e)}const ZL=st("ZodCUID",(e,t)=>{Ope.init(e,t),Xr.init(e,t)});function sst(e){return yL(ZL,e)}const JL=st("ZodCUID2",(e,t)=>{Ppe.init(e,t),Xr.init(e,t)});function lst(e){return bL(JL,e)}const e$=st("ZodULID",(e,t)=>{Rpe.init(e,t),Xr.init(e,t)});function cst(e){return kL(e$,e)}const t$=st("ZodXID",(e,t)=>{jpe.init(e,t),Xr.init(e,t)});function dst(e){return wL(t$,e)}const n$=st("ZodKSUID",(e,t)=>{Mpe.init(e,t),Xr.init(e,t)});function ust(e){return SL(n$,e)}const i$=st("ZodIPv4",(e,t)=>{Hpe.init(e,t),Xr.init(e,t)});function fst(e){return xL(i$,e)}const r$=st("ZodIPv6",(e,t)=>{zpe.init(e,t),Xr.init(e,t)});function Ast(e){return NL(r$,e)}const a$=st("ZodCIDRv4",(e,t)=>{Vpe.init(e,t),Xr.init(e,t)});function mst(e){return CL(a$,e)}const o$=st("ZodCIDRv6",(e,t)=>{Gpe.init(e,t),Xr.init(e,t)});function hst(e){return _L(o$,e)}const s$=st("ZodBase64",(e,t)=>{qpe.init(e,t),Xr.init(e,t)});function pst(e){return FL(s$,e)}const l$=st("ZodBase64URL",(e,t)=>{Wpe.init(e,t),Xr.init(e,t)});function gst(e){return EL(l$,e)}const c$=st("ZodE164",(e,t)=>{Ype.init(e,t),Xr.init(e,t)});function vst(e){return BL(c$,e)}const d$=st("ZodJWT",(e,t)=>{Zpe.init(e,t),Xr.init(e,t)});function yst(e){return DL(d$,e)}const rw=st("ZodCustomStringFormat",(e,t)=>{Jpe.init(e,t),Xr.init(e,t)});function bst(e,t,n={}){return iw(rw,e,t,n)}function kst(e){return iw(rw,"hostname",JM,e)}function wst(e){return iw(rw,"hex",ope,e)}function Sst(e,t){const n=t?.enc??"hex",i=`${e}_${n}`,r=eL[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return iw(rw,i,r,t)}const lB=st("ZodNumber",(e,t)=>{rL.init(e,t),gi.init(e,t),e.gt=(i,r)=>e.check(Bp(i,r)),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.lt=(i,r)=>e.check(Ep(i,r)),e.lte=(i,r)=>e.check(Gd(i,r)),e.max=(i,r)=>e.check(Gd(i,r)),e.int=i=>e.check(aF(i)),e.safe=i=>e.check(aF(i)),e.positive=i=>e.check(Bp(0,i)),e.nonnegative=i=>e.check(tc(0,i)),e.negative=i=>e.check(Ep(0,i)),e.nonpositive=i=>e.check(Gd(0,i)),e.multipleOf=(i,r)=>e.check(qk(i,r)),e.step=(i,r)=>e.check(qk(i,r)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Xve(e){return Zge(lB,e)}const y0=st("ZodNumberFormat",(e,t)=>{ege.init(e,t),lB.init(e,t)});function aF(e){return eve(y0,e)}function xst(e){return tve(y0,e)}function Nst(e){return nve(y0,e)}function Cst(e){return ive(y0,e)}function _st(e){return rve(y0,e)}const cB=st("ZodBoolean",(e,t)=>{aL.init(e,t),gi.init(e,t)});function u$(e){return ave(cB,e)}const dB=st("ZodBigInt",(e,t)=>{oL.init(e,t),gi.init(e,t),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.gt=(i,r)=>e.check(Bp(i,r)),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.lt=(i,r)=>e.check(Ep(i,r)),e.lte=(i,r)=>e.check(Gd(i,r)),e.max=(i,r)=>e.check(Gd(i,r)),e.positive=i=>e.check(Bp(BigInt(0),i)),e.negative=i=>e.check(Ep(BigInt(0),i)),e.nonpositive=i=>e.check(Gd(BigInt(0),i)),e.nonnegative=i=>e.check(tc(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(qk(i,r));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Fst(e){return sve(dB,e)}const f$=st("ZodBigIntFormat",(e,t)=>{tge.init(e,t),dB.init(e,t)});function Est(e){return cve(f$,e)}function Bst(e){return dve(f$,e)}const Zve=st("ZodSymbol",(e,t)=>{nge.init(e,t),gi.init(e,t)});function Dst(e){return uve(Zve,e)}const Jve=st("ZodUndefined",(e,t)=>{ige.init(e,t),gi.init(e,t)});function Tst(e){return fve(Jve,e)}const eye=st("ZodNull",(e,t)=>{rge.init(e,t),gi.init(e,t)});function tye(e){return Ave(eye,e)}const nye=st("ZodAny",(e,t)=>{age.init(e,t),gi.init(e,t)});function Ist(){return mve(nye)}const iye=st("ZodUnknown",(e,t)=>{oge.init(e,t),gi.init(e,t)});function $y(){return hve(iye)}const rye=st("ZodNever",(e,t)=>{sge.init(e,t),gi.init(e,t)});function A$(e){return pve(rye,e)}const aye=st("ZodVoid",(e,t)=>{lge.init(e,t),gi.init(e,t)});function Ost(e){return gve(aye,e)}const m$=st("ZodDate",(e,t)=>{cge.init(e,t),gi.init(e,t),e.min=(i,r)=>e.check(tc(i,r)),e.max=(i,r)=>e.check(Gd(i,r));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Pst(e){return vve(m$,e)}const oye=st("ZodArray",(e,t)=>{dge.init(e,t),gi.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(Ly(n,i)),e.nonempty=n=>e.check(Ly(1,n)),e.max=(n,i)=>e.check(rB(n,i)),e.length=(n,i)=>e.check(aB(n,i)),e.unwrap=()=>e.element});function gA(e,t){return Cve(oye,e,t)}function Rst(e){const t=e._zod.def.shape;return fB(Object.keys(t))}const uB=st("ZodObject",(e,t)=>{mge.init(e,t),gi.init(e,t),Fi(e,"shape",()=>t.shape),e.keyof=()=>fB(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:$y()}),e.loose=()=>e.clone({...e._zod.def,catchall:$y()}),e.strict=()=>e.clone({...e._zod.def,catchall:A$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>mhe(e,n),e.safeExtend=n=>hhe(e,n),e.merge=n=>phe(e,n),e.pick=n=>fhe(e,n),e.omit=n=>Ahe(e,n),e.partial=(...n)=>ghe(b$,e,n[0]),e.required=(...n)=>vhe(k$,e,n[0])});function h$(e,t){const n={type:"object",shape:e??{},...Rt(t)};return new uB(n)}function jst(e,t){return new uB({type:"object",shape:e,catchall:A$(),...Rt(t)})}function Mst(e,t){return new uB({type:"object",shape:e,catchall:$y(),...Rt(t)})}const p$=st("ZodUnion",(e,t)=>{sL.init(e,t),gi.init(e,t),e.options=t.options});function g$(e,t){return new p$({type:"union",options:e,...Rt(t)})}const sye=st("ZodDiscriminatedUnion",(e,t)=>{p$.init(e,t),hge.init(e,t)});function Lst(e,t,n){return new sye({type:"union",options:t,discriminator:e,...Rt(n)})}const lye=st("ZodIntersection",(e,t)=>{pge.init(e,t),gi.init(e,t)});function cye(e,t){return new lye({type:"intersection",left:e,right:t})}const dye=st("ZodTuple",(e,t)=>{lL.init(e,t),gi.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function uye(e,t,n){const i=t instanceof ri,r=i?n:t,a=i?t:null;return new dye({type:"tuple",items:e,rest:a,...Rt(r)})}const v$=st("ZodRecord",(e,t)=>{gge.init(e,t),gi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function fye(e,t,n){return new v$({type:"record",keyType:e,valueType:t,...Rt(n)})}function $st(e,t,n){const i=sd(e);return i._zod.values=void 0,new v$({type:"record",keyType:i,valueType:t,...Rt(n)})}const Aye=st("ZodMap",(e,t)=>{vge.init(e,t),gi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ust(e,t,n){return new Aye({type:"map",keyType:e,valueType:t,...Rt(n)})}const mye=st("ZodSet",(e,t)=>{yge.init(e,t),gi.init(e,t),e.min=(...n)=>e.check(Kk(...n)),e.nonempty=n=>e.check(Kk(1,n)),e.max=(...n)=>e.check(iB(...n)),e.size=(...n)=>e.check(TL(...n))});function Qst(e,t){return new mye({type:"set",valueType:e,...Rt(t)})}const Wk=st("ZodEnum",(e,t)=>{bge.init(e,t),gi.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{const a={};for(const o of i)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Wk({...t,checks:[],...Rt(r),entries:a})},e.exclude=(i,r)=>{const a={...t.entries};for(const o of i)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Wk({...t,checks:[],...Rt(r),entries:a})}});function fB(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Wk({type:"enum",entries:n,...Rt(t)})}function Hst(e,t){return new Wk({type:"enum",entries:e,...Rt(t)})}const hye=st("ZodLiteral",(e,t)=>{kge.init(e,t),gi.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function pye(e,t){return new hye({type:"literal",values:Array.isArray(e)?e:[e],...Rt(t)})}const gye=st("ZodFile",(e,t)=>{wge.init(e,t),gi.init(e,t),e.min=(n,i)=>e.check(Kk(n,i)),e.max=(n,i)=>e.check(iB(n,i)),e.mime=(n,i)=>e.check(LL(Array.isArray(n)?n:[n],i))});function zst(e){return _ve(gye,e)}const vye=st("ZodTransform",(e,t)=>{Sge.init(e,t),gi.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new YE(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(jy(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(jy(o))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(a=>(n.value=a,n)):(n.value=r,n)}});function y$(e){return new vye({type:"transform",transform:e})}const b$=st("ZodOptional",(e,t)=>{xge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function oF(e){return new b$({type:"optional",innerType:e})}const yye=st("ZodNullable",(e,t)=>{Nge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sF(e){return new yye({type:"nullable",innerType:e})}function Vst(e){return oF(sF(e))}const bye=st("ZodDefault",(e,t)=>{Cge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kye(e,t){return new bye({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ZE(t)}})}const wye=st("ZodPrefault",(e,t)=>{_ge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sye(e,t){return new wye({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ZE(t)}})}const k$=st("ZodNonOptional",(e,t)=>{Fge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xye(e,t){return new k$({type:"nonoptional",innerType:e,...Rt(t)})}const Nye=st("ZodSuccess",(e,t)=>{Ege.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Gst(e){return new Nye({type:"success",innerType:e})}const Cye=st("ZodCatch",(e,t)=>{Bge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _ye(e,t){return new Cye({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Fye=st("ZodNaN",(e,t)=>{Dge.init(e,t),gi.init(e,t)});function qst(e){return bve(Fye,e)}const w$=st("ZodPipe",(e,t)=>{Tge.init(e,t),gi.init(e,t),e.in=t.in,e.out=t.out});function lF(e,t){return new w$({type:"pipe",in:e,out:t})}const S$=st("ZodCodec",(e,t)=>{w$.init(e,t),cL.init(e,t)});function Kst(e,t,n){return new S$({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Eye=st("ZodReadonly",(e,t)=>{Ige.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bye(e){return new Eye({type:"readonly",innerType:e})}const Dye=st("ZodTemplateLiteral",(e,t)=>{Oge.init(e,t),gi.init(e,t)});function Wst(e,t){return new Dye({type:"template_literal",parts:e,...Rt(t)})}const Tye=st("ZodLazy",(e,t)=>{jge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Iye(e){return new Tye({type:"lazy",getter:e})}const Oye=st("ZodPromise",(e,t)=>{Rge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yst(e){return new Oye({type:"promise",innerType:e})}const Pye=st("ZodFunction",(e,t)=>{Pge.init(e,t),gi.init(e,t)});function QX(e){return new Pye({type:"function",input:Array.isArray(e?.input)?uye(e?.input):e?.input??gA($y()),output:e?.output??$y()})}const AB=st("ZodCustom",(e,t)=>{Mge.init(e,t),gi.init(e,t)});function Xst(e){const t=new Ma({check:"custom"});return t._zod.check=e,t}function Zst(e,t){return Fve(AB,e??(()=>!0),t)}function Rye(e,t={}){return Eve(AB,e,t)}function jye(e){return Bve(e)}function Mye(e,t={error:`Input not instance of ${e.name}`}){const n=new AB({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Rt(t)});return n._zod.bag.Class=e,n}const Jst=(...e)=>Tve({Codec:S$,Boolean:cB,String:oB},...e);function elt(e){const t=Iye(()=>g$([_o(e),Xve(),u$(),tye(),gA(t),fye(_o(),t)]));return t}function tlt(e,t){return lF(y$(e),t)}const qR={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nlt(e){Ws({customError:e})}function ilt(){return Ws().customError}var KR;KR||(KR={});function rlt(e){return Gge(oB,e)}function alt(e){return Jge(lB,e)}function olt(e){return ove(cB,e)}function slt(e){return lve(dB,e)}function llt(e){return yve(m$,e)}const clt=Object.freeze(Object.defineProperty({__proto__:null,bigint:slt,boolean:olt,date:llt,number:alt,string:rlt},Symbol.toStringTag,{value:"Module"}));Ws(Lge());const jd=Object.freeze(Object.defineProperty({__proto__:null,$brand:ahe,$input:zge,$output:Hge,NEVER:rhe,TimePrecision:qge,ZodAny:nye,ZodArray:oye,ZodBase64:s$,ZodBase64URL:l$,ZodBigInt:dB,ZodBigIntFormat:f$,ZodBoolean:cB,ZodCIDRv4:a$,ZodCIDRv6:o$,ZodCUID:ZL,ZodCUID2:JL,ZodCatch:Cye,ZodCodec:S$,ZodCustom:AB,ZodCustomStringFormat:rw,ZodDate:m$,ZodDefault:bye,ZodDiscriminatedUnion:sye,ZodE164:c$,ZodEmail:WL,ZodEmoji:YL,ZodEnum:Wk,ZodError:Yot,ZodFile:gye,get ZodFirstPartyTypeKind(){return KR},ZodFunction:Pye,ZodGUID:rF,ZodIPv4:i$,ZodIPv6:r$,ZodISODate:VL,ZodISODateTime:zL,ZodISODuration:qL,ZodISOTime:GL,ZodIntersection:lye,ZodIssueCode:qR,ZodJWT:d$,ZodKSUID:n$,ZodLazy:Tye,ZodLiteral:hye,ZodMap:Aye,ZodNaN:Fye,ZodNanoID:XL,ZodNever:rye,ZodNonOptional:k$,ZodNull:eye,ZodNullable:yye,ZodNumber:lB,ZodNumberFormat:y0,ZodObject:uB,ZodOptional:b$,ZodPipe:w$,ZodPrefault:wye,ZodPromise:Oye,ZodReadonly:Eye,ZodRealError:hc,ZodRecord:v$,ZodSet:mye,ZodString:oB,ZodStringFormat:Xr,ZodSuccess:Nye,ZodSymbol:Zve,ZodTemplateLiteral:Dye,ZodTransform:vye,ZodTuple:dye,ZodType:gi,ZodULID:e$,ZodURL:sB,ZodUUID:pA,ZodUndefined:Jve,ZodUnion:p$,ZodUnknown:iye,ZodVoid:aye,ZodXID:t$,_ZodString:KL,_default:kye,_function:QX,any:Ist,array:gA,base64:pst,base64url:gst,bigint:Fst,boolean:u$,catch:_ye,check:Xst,cidrv4:mst,cidrv6:hst,clone:sd,codec:Kst,coerce:clt,config:Ws,core:Kot,cuid:sst,cuid2:lst,custom:Zst,date:Pst,decode:zve,decodeAsync:Gve,discriminatedUnion:Lst,e164:vst,email:Xot,emoji:ast,encode:Hve,encodeAsync:Vve,endsWith:ML,enum:fB,file:zst,flattenError:QM,float32:xst,float64:Nst,formatError:HM,function:QX,getErrorMap:ilt,globalRegistry:rp,gt:Bp,gte:tc,guid:Zot,hash:Sst,hex:wst,hostname:kst,httpUrl:rst,includes:RL,instanceof:Mye,int:aF,int32:Cst,int64:Est,intersection:cye,ipv4:fst,ipv6:Ast,iso:Wot,json:elt,jwt:yst,keyof:Rst,ksuid:ust,lazy:Iye,length:aB,literal:pye,locales:Qge,looseObject:Mst,lowercase:OL,lt:Ep,lte:Gd,map:Ust,maxLength:rB,maxSize:iB,mime:LL,minLength:Ly,minSize:Kk,multipleOf:qk,nan:qst,nanoid:ost,nativeEnum:Hst,negative:wve,never:A$,nonnegative:xve,nonoptional:xye,nonpositive:Sve,normalize:$L,null:tye,nullable:sF,nullish:Vst,number:Xve,object:h$,optional:oF,overwrite:ig,parse:Lve,parseAsync:$ve,partialRecord:$st,pipe:lF,positive:kve,prefault:Sye,preprocess:tlt,prettifyError:Nhe,promise:Yst,property:Nve,readonly:Bye,record:fye,refine:Rye,regex:IL,regexes:eL,registry:uL,safeDecode:Kve,safeDecodeAsync:Yve,safeEncode:qve,safeEncodeAsync:Wve,safeParse:Uve,safeParseAsync:Qve,set:Qst,setErrorMap:nlt,size:TL,startsWith:jL,strictObject:jst,string:_o,stringFormat:bst,stringbool:Jst,success:Gst,superRefine:jye,symbol:Dst,templateLiteral:Wst,toJSONSchema:Ive,toLowerCase:QL,toUpperCase:HL,transform:y$,treeifyError:She,trim:UL,tuple:uye,uint32:_st,uint64:Bst,ulid:cst,undefined:Tst,union:g$,unknown:$y,uppercase:PL,url:ist,util:khe,uuid:Jot,uuidv4:est,uuidv6:tst,uuidv7:nst,void:Ost,xid:dst},Symbol.toStringTag,{value:"Module"})),yf=CXe,Lye=V.createContext({}),Rn=({...e})=>A.jsx(Lye.Provider,{value:{name:e.name},children:A.jsx(_i,{...e})}),mB=()=>{const e=V.useContext(Lye),t=V.useContext($ye),{getFieldState:n}=H1(),i=iAe({name:e.name}),r=n(e.name,i);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},$ye=V.createContext({});function jn({className:e,...t}){const n=V.useId();return A.jsx($ye.Provider,{value:{id:n},children:A.jsx("div",{"data-slot":"form-item",className:Ft("grid gap-2",e),...t})})}function ii({className:e,...t}){const{error:n,formItemId:i}=mB();return A.jsx(xn,{"data-slot":"form-label","data-error":!!n,className:Ft("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",e),htmlFor:i,...t})}function Yn({...e}){const{error:t,formItemId:n,formDescriptionId:i,formMessageId:r}=mB();return A.jsx(E6,{"data-slot":"form-control",id:n,"aria-describedby":t?`${i} ${r}`:String(i),"aria-invalid":!!t,...e})}function eTt({className:e,...t}){const{formDescriptionId:n}=mB();return A.jsx("p",{"data-slot":"form-description",id:n,className:Ft("text-gray-500 text-sm dark:text-gray-400",e),...t})}function Xn({className:e,...t}){const{error:n,formMessageId:i}=mB(),r=n?String(n?.message??""):t.children;return r?A.jsx("p",{"data-slot":"form-message",id:i,className:Ft("text-red-500 text-sm dark:text-red-900",e),...t,children:r}):null}function x$(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var dlt=[" ","Enter","ArrowUp","ArrowDown"],ult=[" ","Enter"],Dp="Select",[hB,pB,flt]=lj(Dp),[b0]=Bs(Dp,[flt,rh]),gB=rh(),[Alt,oh]=b0(Dp),[mlt,hlt]=b0(Dp),Uye=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:r,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:m,required:h,form:v}=e,g=gB(t),[k,b]=S.useState(null),[w,C]=S.useState(null),[N,_]=S.useState(!1),F=S1(c),[B,T]=Kd({prop:i,defaultProp:r??!1,onChange:a,caller:Dp}),[I,$]=Kd({prop:o,defaultProp:s,onChange:l,caller:Dp}),j=S.useRef(null),P=k?v||!!k.closest("form"):!0,[K,q]=S.useState(new Set),re=Array.from(K).map(U=>U.props.value).join(";");return A.jsx(AE,{...g,children:A.jsxs(Alt,{required:h,scope:t,trigger:k,onTriggerChange:b,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:_,contentId:Bo(),value:I,onValueChange:$,open:B,onOpenChange:T,dir:F,triggerPointerDownPosRef:j,disabled:m,children:[A.jsx(hB.Provider,{scope:t,children:A.jsx(mlt,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(U=>{q(te=>new Set(te).add(U))},[]),onNativeOptionRemove:S.useCallback(U=>{q(te=>{const W=new Set(te);return W.delete(U),W})},[]),children:n})}),P?A.jsxs(c0e,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:I,onChange:U=>$(U.target.value),disabled:m,form:v,children:[I===void 0?A.jsx("option",{value:""}):null,Array.from(K)]},re):null]})})};Uye.displayName=Dp;var Qye="SelectTrigger",Hye=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...r}=e,a=gB(n),o=oh(Qye,n),s=o.disabled||i,l=ui(t,o.onTriggerChange),c=pB(n),d=S.useRef("touch"),[u,m,h]=u0e(g=>{const k=c().filter(C=>!C.disabled),b=k.find(C=>C.value===o.value),w=f0e(k,g,b);w!==void 0&&o.onValueChange(w.value)}),v=g=>{s||(o.onOpenChange(!0),h()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return A.jsx(N1,{asChild:!0,...a,children:A.jsx(sn.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":d0e(o.value)?"":void 0,...r,ref:l,onClick:Kt(r.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&v(g)}),onPointerDown:Kt(r.onPointerDown,g=>{d.current=g.pointerType;const k=g.target;k.hasPointerCapture(g.pointerId)&&k.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:Kt(r.onKeyDown,g=>{const k=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(k&&g.key===" ")&&dlt.includes(g.key)&&(v(),g.preventDefault())})})})});Hye.displayName=Qye;var zye="SelectValue",Vye=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:r,children:a,placeholder:o="",...s}=e,l=oh(zye,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,u=ui(t,l.onValueNodeChange);return Ya(()=>{c(d)},[c,d]),A.jsx(sn.span,{...s,ref:u,style:{pointerEvents:"none"},children:d0e(l.value)?A.jsx(A.Fragment,{children:o}):a})});Vye.displayName=zye;var plt="SelectIcon",Gye=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...r}=e;return A.jsx(sn.span,{"aria-hidden":!0,...r,ref:t,children:i||"▼"})});Gye.displayName=plt;var glt="SelectPortal",qye=e=>A.jsx(Yy,{asChild:!0,...e});qye.displayName=glt;var Tp="SelectContent",Kye=S.forwardRef((e,t)=>{const n=oh(Tp,e.__scopeSelect),[i,r]=S.useState();if(Ya(()=>{r(new DocumentFragment)},[]),!n.open){const a=i;return a?ff.createPortal(A.jsx(Wye,{scope:e.__scopeSelect,children:A.jsx(hB.Slot,{scope:e.__scopeSelect,children:A.jsx("div",{children:e.children})})}),a):null}return A.jsx(Yye,{...e,ref:t})});Kye.displayName=Tp;var Rd=10,[Wye,sh]=b0(Tp),vlt="SelectContentImpl",ylt=Vm("SelectContent.RemoveScroll"),Yye=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:k,...b}=e,w=oh(Tp,n),[C,N]=S.useState(null),[_,F]=S.useState(null),B=ui(t,Y=>N(Y)),[T,I]=S.useState(null),[$,j]=S.useState(null),P=pB(n),[K,q]=S.useState(!1),re=S.useRef(!1);S.useEffect(()=>{if(C)return tE(C)},[C]),JF();const U=S.useCallback(Y=>{const[ue,...me]=P().map(ie=>ie.ref.current),[ye]=me.slice(-1),ae=document.activeElement;for(const ie of Y)if(ie===ae||(ie?.scrollIntoView({block:"nearest"}),ie===ue&&_&&(_.scrollTop=0),ie===ye&&_&&(_.scrollTop=_.scrollHeight),ie?.focus(),document.activeElement!==ae))return},[P,_]),te=S.useCallback(()=>U([T,C]),[U,T,C]);S.useEffect(()=>{K&&te()},[K,te]);const{onOpenChange:W,triggerPointerDownPosRef:le}=w;S.useEffect(()=>{if(C){let Y={x:0,y:0};const ue=ye=>{Y={x:Math.abs(Math.round(ye.pageX)-(le.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(le.current?.y??0))}},me=ye=>{Y.x<=10&&Y.y<=10?ye.preventDefault():C.contains(ye.target)||W(!1),document.removeEventListener("pointermove",ue),le.current=null};return le.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",me,{capture:!0})}}},[C,W,le]),S.useEffect(()=>{const Y=()=>W(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[W]);const[be,oe]=u0e(Y=>{const ue=P().filter(ae=>!ae.disabled),me=ue.find(ae=>ae.ref.current===document.activeElement),ye=f0e(ue,Y,me);ye&&setTimeout(()=>ye.ref.current.focus())}),M=S.useCallback((Y,ue,me)=>{const ye=!re.current&&!me;(w.value!==void 0&&w.value===ue||ye)&&(I(Y),ye&&(re.current=!0))},[w.value]),Q=S.useCallback(()=>C?.focus(),[C]),L=S.useCallback((Y,ue,me)=>{const ye=!re.current&&!me;(w.value!==void 0&&w.value===ue||ye)&&j(Y)},[w.value]),J=i==="popper"?WR:Xye,ee=J===WR?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:k}:{};return A.jsx(Wye,{scope:n,content:C,viewport:_,onViewportChange:F,itemRefCallback:M,selectedItem:T,onItemLeave:Q,itemTextRefCallback:L,focusSelectedItem:te,selectedItemText:$,position:i,isPositioned:K,searchRef:be,children:A.jsx(Jy,{as:ylt,allowPinchZoom:!0,children:A.jsx(k1,{asChild:!0,trapped:w.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:Kt(r,Y=>{w.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:A.jsx(J,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Y=>Y.preventDefault(),...b,...ee,onPlaced:()=>q(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Kt(b.onKeyDown,Y=>{const ue=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!ue&&Y.key.length===1&&oe(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ye=P().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const ae=Y.target,ie=ye.indexOf(ae);ye=ye.slice(ie+1)}setTimeout(()=>U(ye)),Y.preventDefault()}})})})})})})});Yye.displayName=vlt;var blt="SelectItemAlignedPosition",Xye=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...r}=e,a=oh(Tp,n),o=sh(Tp,n),[s,l]=S.useState(null),[c,d]=S.useState(null),u=ui(t,B=>d(B)),m=pB(n),h=S.useRef(!1),v=S.useRef(!0),{viewport:g,selectedItem:k,selectedItemText:b,focusSelectedItem:w}=o,C=S.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&g&&k&&b){const B=a.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),$=b.getBoundingClientRect();if(a.dir!=="rtl"){const ae=$.left-T.left,ie=I.left-ae,_e=B.left-ie,we=B.width+_e,ke=Math.max(we,T.width),he=window.innerWidth-Rd,H=fR(ie,[Rd,Math.max(Rd,he-ke)]);s.style.minWidth=we+"px",s.style.left=H+"px"}else{const ae=T.right-$.right,ie=window.innerWidth-I.right-ae,_e=window.innerWidth-B.right-ie,we=B.width+_e,ke=Math.max(we,T.width),he=window.innerWidth-Rd,H=fR(ie,[Rd,Math.max(Rd,he-ke)]);s.style.minWidth=we+"px",s.style.right=H+"px"}const j=m(),P=window.innerHeight-Rd*2,K=g.scrollHeight,q=window.getComputedStyle(c),re=parseInt(q.borderTopWidth,10),U=parseInt(q.paddingTop,10),te=parseInt(q.borderBottomWidth,10),W=parseInt(q.paddingBottom,10),le=re+U+K+W+te,be=Math.min(k.offsetHeight*5,le),oe=window.getComputedStyle(g),M=parseInt(oe.paddingTop,10),Q=parseInt(oe.paddingBottom,10),L=B.top+B.height/2-Rd,J=P-L,ee=k.offsetHeight/2,Y=k.offsetTop+ee,ue=re+U+Y,me=le-ue;if(ue<=L){const ae=j.length>0&&k===j[j.length-1].ref.current;s.style.bottom="0px";const ie=c.clientHeight-g.offsetTop-g.offsetHeight,_e=Math.max(J,ee+(ae?Q:0)+ie+te),we=ue+_e;s.style.height=we+"px"}else{const ae=j.length>0&&k===j[0].ref.current;s.style.top="0px";const _e=Math.max(L,re+g.offsetTop+(ae?M:0)+ee)+me;s.style.height=_e+"px",g.scrollTop=ue-L+g.offsetTop}s.style.margin=`${Rd}px 0`,s.style.minHeight=be+"px",s.style.maxHeight=P+"px",i?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,s,c,g,k,b,a.dir,i]);Ya(()=>C(),[C]);const[N,_]=S.useState();Ya(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const F=S.useCallback(B=>{B&&v.current===!0&&(C(),w?.(),v.current=!1)},[C,w]);return A.jsx(wlt,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:F,children:A.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:A.jsx(sn.div,{...r,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Xye.displayName=blt;var klt="SelectPopperPosition",WR=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:r=Rd,...a}=e,o=gB(n);return A.jsx(mE,{...o,...a,ref:t,align:i,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});WR.displayName=klt;var[wlt,N$]=b0(Tp,{}),YR="SelectViewport",Zye=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...r}=e,a=sh(YR,n),o=N$(YR,n),s=ui(t,a.onViewportChange),l=S.useRef(0);return A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),A.jsx(hB.Slot,{scope:n,children:A.jsx(sn.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Kt(r.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=o;if(m?.current&&u){const h=Math.abs(l.current-d.scrollTop);if(h>0){const v=window.innerHeight-Rd*2,g=parseFloat(u.style.minHeight),k=parseFloat(u.style.height),b=Math.max(g,k);if(b<v){const w=b+h,C=Math.min(v,w),N=w-C;u.style.height=C+"px",u.style.bottom==="0px"&&(d.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Zye.displayName=YR;var Jye="SelectGroup",[Slt,xlt]=b0(Jye),Nlt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=Bo();return A.jsx(Slt,{scope:n,id:r,children:A.jsx(sn.div,{role:"group","aria-labelledby":r,...i,ref:t})})});Nlt.displayName=Jye;var e0e="SelectLabel",Clt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=xlt(e0e,n);return A.jsx(sn.div,{id:r.id,...i,ref:t})});Clt.displayName=e0e;var cF="SelectItem",[_lt,t0e]=b0(cF),n0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:r=!1,textValue:a,...o}=e,s=oh(cF,n),l=sh(cF,n),c=s.value===i,[d,u]=S.useState(a??""),[m,h]=S.useState(!1),v=ui(t,w=>l.itemRefCallback?.(w,i,r)),g=Bo(),k=S.useRef("touch"),b=()=>{r||(s.onValueChange(i),s.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return A.jsx(_lt,{scope:n,value:i,disabled:r,textId:g,isSelected:c,onItemTextChange:S.useCallback(w=>{u(C=>C||(w?.textContent??"").trim())},[]),children:A.jsx(hB.ItemSlot,{scope:n,value:i,disabled:r,textValue:d,children:A.jsx(sn.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:v,onFocus:Kt(o.onFocus,()=>h(!0)),onBlur:Kt(o.onBlur,()=>h(!1)),onClick:Kt(o.onClick,()=>{k.current!=="mouse"&&b()}),onPointerUp:Kt(o.onPointerUp,()=>{k.current==="mouse"&&b()}),onPointerDown:Kt(o.onPointerDown,w=>{k.current=w.pointerType}),onPointerMove:Kt(o.onPointerMove,w=>{k.current=w.pointerType,r?l.onItemLeave?.():k.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Kt(o.onPointerLeave,w=>{w.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Kt(o.onKeyDown,w=>{l.searchRef?.current!==""&&w.key===" "||(ult.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});n0e.displayName=cF;var Jb="SelectItemText",i0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:r,...a}=e,o=oh(Jb,n),s=sh(Jb,n),l=t0e(Jb,n),c=hlt(Jb,n),[d,u]=S.useState(null),m=ui(t,b=>u(b),l.onItemTextChange,b=>s.itemTextRefCallback?.(b,l.value,l.disabled)),h=d?.textContent,v=S.useMemo(()=>A.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:k}=c;return Ya(()=>(g(v),()=>k(v)),[g,k,v]),A.jsxs(A.Fragment,{children:[A.jsx(sn.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ff.createPortal(a.children,o.valueNode):null]})});i0e.displayName=Jb;var r0e="SelectItemIndicator",a0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return t0e(r0e,n).isSelected?A.jsx(sn.span,{"aria-hidden":!0,...i,ref:t}):null});a0e.displayName=r0e;var XR="SelectScrollUpButton",o0e=S.forwardRef((e,t)=>{const n=sh(XR,e.__scopeSelect),i=N$(XR,e.__scopeSelect),[r,a]=S.useState(!1),o=ui(t,i.onScrollButtonChange);return Ya(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?A.jsx(l0e,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});o0e.displayName=XR;var ZR="SelectScrollDownButton",s0e=S.forwardRef((e,t)=>{const n=sh(ZR,e.__scopeSelect),i=N$(ZR,e.__scopeSelect),[r,a]=S.useState(!1),o=ui(t,i.onScrollButtonChange);return Ya(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?A.jsx(l0e,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});s0e.displayName=ZR;var l0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...r}=e,a=sh("SelectScrollButton",n),o=S.useRef(null),s=pB(n),l=S.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return S.useEffect(()=>()=>l(),[l]),Ya(()=>{s().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),A.jsx(sn.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:Kt(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:Kt(r.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:Kt(r.onPointerLeave,()=>{l()})})}),Flt="SelectSeparator",Elt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return A.jsx(sn.div,{"aria-hidden":!0,...i,ref:t})});Elt.displayName=Flt;var JR="SelectArrow",Blt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=gB(n),a=oh(JR,n),o=sh(JR,n);return a.open&&o.position==="popper"?A.jsx(hE,{...r,...i,ref:t}):null});Blt.displayName=JR;var Dlt="SelectBubbleInput",c0e=S.forwardRef(({__scopeSelect:e,value:t,...n},i)=>{const r=S.useRef(null),a=ui(i,r),o=x$(t);return S.useEffect(()=>{const s=r.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const u=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(u)}},[o,t]),A.jsx(sn.select,{...n,style:{...zoe,...n.style},ref:a,defaultValue:t})});c0e.displayName=Dlt;function d0e(e){return e===""||e===void 0}function u0e(e){const t=Vo(e),n=S.useRef(""),i=S.useRef(0),r=S.useCallback(o=>{const s=n.current+o;t(s),(function l(c){n.current=c,window.clearTimeout(i.current),c!==""&&(i.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),a=S.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,a]}function f0e(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=Tlt(e,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Tlt(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Ilt=Uye,Olt=Hye,Plt=Vye,Rlt=Gye,jlt=qye,Mlt=Kye,Llt=Zye,$lt=n0e,Ult=i0e,Qlt=a0e,Hlt=o0e,zlt=s0e;function os({...e}){return A.jsx(Ilt,{"data-slot":"select",...e})}function ss({...e}){return A.jsx(Plt,{"data-slot":"select-value",...e})}function ls({className:e,size:t="default",children:n,...i}){return A.jsxs(Olt,{"data-slot":"select-trigger","data-size":t,className:Ft("border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 dark:hover:bg-gray-200/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-gray-800 dark:data-[placeholder]:text-gray-400 dark:[&_svg:not([class*='text-'])]:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30 dark:dark:hover:bg-gray-800/50",e),...i,children:[n,A.jsx(Rlt,{asChild:!0,children:A.jsx(Ti,{className:"size-4 opacity-50"})})]})}function cs({className:e,children:t,position:n="popper",...i}){return A.jsx(jlt,{children:A.jsxs(Mlt,{"data-slot":"select-content",className:Ft("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-1001 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[A.jsx(Vlt,{}),A.jsx(Llt,{className:Ft("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),A.jsx(Glt,{})]})})}function zo({className:e,children:t,...n}){return A.jsxs($lt,{"data-slot":"select-item",className:Ft("focus:bg-gray-100 focus:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...n,children:[A.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:A.jsx(Qlt,{children:A.jsx(kA,{className:"size-4"})})}),A.jsx(Ult,{children:t})]})}function Vlt({className:e,...t}){return A.jsx(Hlt,{"data-slot":"select-scroll-up-button",className:Ft("flex cursor-default items-center justify-center py-1",e),...t,children:A.jsx(fr,{className:"size-4"})})}function Glt({className:e,...t}){return A.jsx(zlt,{"data-slot":"select-scroll-down-button",className:Ft("flex cursor-default items-center justify-center py-1",e),...t,children:A.jsx(Ti,{className:"size-4"})})}function vB({className:e,...t}){return A.jsx("textarea",{"data-slot":"textarea",className:Ft("border-gray-200 placeholder:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-gray-800 dark:placeholder:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30",e),...t})}const A0e=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:i4e});return n&&(console.error(`Error fetching countries: ${n}`),Bt.error("Error",{description:"Unable to fetch countries"})),{fetching:t,refresh:()=>i(),countries:e?.allCountries??[]}},qlt=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:a4e});n&&(console.error(`Error fetching sort codes: ${n}`),Bt.error("Error",{description:"Unable to fetch sort codes"}));const r=S.useMemo(()=>e?.allSortCodes?.sort((o,s)=>(o.name??"")>(s.name??"")?1:-1)??[],[e]),a=S.useMemo(()=>r.map(o=>({value:o.key.toString(),label:o.name??""})),[r]);return{fetching:t,refresh:()=>i(),sortCodes:r,selectableSortCodes:a}},C$=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:o4e});n&&(console.error(`Error fetching tags: ${n}`),Bt.error("Error",{description:"Unable to fetch tags"}));const r=S.useMemo(()=>M4e(e?.allTags??[]),[e]),a=S.useMemo(()=>r.map(o=>({value:o.id,label:o.name,description:o.namePath?`${o.namePath.join(" > ")} >`:void 0})),[r]);return{fetching:t,refresh:()=>i(),tags:r,selectableTags:a}},m0e=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:s4e});n&&(console.error(`Error fetching tax categories: ${n}`),Bt.error("Error",{description:"Unable to fetch tax categories"}));const r=S.useMemo(()=>e?.taxCategories?.sort((o,s)=>o.name>s.name?1:-1)??[],[e]),a=S.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:t,refresh:()=>i(),taxCategories:r,selectableTaxCategories:a}},HX=(e,t,n)=>{if(e&&"reportValidity"in e){const i=qt(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},e3=(e,t)=>{for(const n in t.fields){const i=t.fields[n];i&&i.ref&&"reportValidity"in i.ref?HX(i.ref,n,e):i&&i.refs&&i.refs.forEach(r=>HX(r,n,e))}},zX=(e,t)=>{t.shouldUseNativeValidation&&e3(e,t);const n={};for(const i in e){const r=qt(t.fields,i),a=Object.assign(e[i]||{},{ref:r&&r.ref});if(Klt(t.names||Object.keys(e),i)){const o=Object.assign({},qt(n,i));rr(o,"root",a),rr(n,i,o)}else rr(n,i,a)}return n},Klt=(e,t)=>{const n=VX(t);return e.some(i=>VX(i).match(`^${n}\\.\\d+`))};function VX(e){return e.replace(/\]|\[/g,"")}function GX(e,t){try{var n=e()}catch(i){return t(i)}return n&&n.then?n.then(void 0,t):n}function Wlt(e,t){for(var n={};e.length;){var i=e[0],r=i.code,a=i.message,o=i.path.join(".");if(!n[o])if("unionErrors"in i){var s=i.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:r};if("unionErrors"in i&&i.unionErrors.forEach(function(d){return d.errors.forEach(function(u){return e.push(u)})}),t){var l=n[o].types,c=l&&l[i.code];n[o]=gM(o,t,n,r,c?[].concat(c,i.message):i.message)}e.shift()}return n}function Ylt(e,t){for(var n={};e.length;){var i=e[0],r=i.code,a=i.message,o=i.path.join(".");if(!n[o])if(i.code==="invalid_union"&&i.errors.length>0){var s=i.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:r};if(i.code==="invalid_union"&&i.errors.forEach(function(d){return d.forEach(function(u){return e.push(u)})}),t){var l=n[o].types,c=l&&l[i.code];n[o]=gM(o,t,n,r,c?[].concat(c,i.message):i.message)}e.shift()}return n}function _$(e,t,n){if(n===void 0&&(n={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(e))return function(i,r,a){try{return Promise.resolve(GX(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(o){return a.shouldUseNativeValidation&&e3({},a),{errors:{},values:n.raw?Object.assign({},i):o}})},function(o){if((function(s){return Array.isArray(s?.issues)})(o))return{values:{},errors:zX(Wlt(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,r,a){try{return Promise.resolve(GX(function(){return Promise.resolve((n.mode==="sync"?eF:tF)(e,i,t)).then(function(o){return a.shouldUseNativeValidation&&e3({},a),{errors:{},values:n.raw?Object.assign({},i):o}})},function(o){if((function(s){return s instanceof tB})(o))return{values:{},errors:zX(Ylt(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}const Xlt="insertNewBusiness",Zlt=()=>{const[{fetching:e},t]=or(c4e),n=S.useCallback(async i=>{const r=`Error creating business [${i.fields.name}]`,a=`${Xlt}-${i.fields.name}`;Bt.loading("Creating Business...",{id:a});try{const o=await t(i),s=sr(o,r,a,"insertNewBusiness");if(s)return Bt.success("Success",{id:a,description:`Business [${i.fields.name}] was created`}),s.insertNewBusiness}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,insertBusiness:n}},Jlt=h$({businessName:_o().min(1,"Business name is required"),locality:_o().min(1,"Locality is required"),localName:_o().optional(),govId:_o().optional(),address:_o().optional(),generalContacts:gA(_o().email()),website:_o().url().optional().or(pye("")),phone:_o().optional(),taxCategory:_o().optional(),sortCode:_o().optional(),pcn874RecordType:_o().optional(),irsCode:aF().optional(),defaultDescription:_o().optional(),defaultTags:gA(_o()),transactionPhrases:gA(_o()),emailAddresses:gA(_o().email())}).refine(e=>e.locality==="Israel"?!!e.localName&&!!e.govId:!0,{message:"Local name and company number are required for Israeli businesses",path:["localName"]});function ect(e){const n=e.defaultDescription||e.defaultTags?.length||e.transactionPhrases?.length||e.emailAddresses?.length?{description:e.defaultDescription,tags:e.defaultTags?.map(i=>({id:i})),phrases:e.transactionPhrases,emails:e.emailAddresses}:void 0;return{name:e.businessName,country:e.locality,hebrewName:e.localName,governmentId:e.govId,address:e.address,phoneNumber:e.phone,website:e.website,email:e.generalContacts?.join(", "),sortCode:e.sortCode?parseInt(e.sortCode):void 0,taxCategory:e.taxCategory,pcn874RecordType:e.pcn874RecordType,irsCode:e.irsCode,suggestions:n}}function F$({description:e,onAdd:t}){const[n,i]=S.useState(!1),{insertBusiness:r,fetching:a}=Zlt(),o=Il({resolver:_$(Jlt),defaultValues:{businessName:e,generalContacts:[],defaultTags:[],transactionPhrases:e?[e]:[],emailAddresses:[]}}),s=async l=>{const c=await r({fields:ect(l)});i(!1),o.reset(),t?.(c?.id??"")};return A.jsxs(fc,{open:n,onOpenChange:i,children:[A.jsx(w1,{asChild:!0,children:A.jsxs(bt,{children:[A.jsx(SA,{className:"size-4 mr-2"}),"New Business"]})}),A.jsxs(Ac,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[A.jsxs(td,{children:[A.jsx(nd,{children:"Create New Business"}),A.jsx(nj,{children:"Add a new business to Accounter."})]}),A.jsx(yf,{...o,children:A.jsxs("form",{onSubmit:o.handleSubmit(s),className:"space-y-6",children:[A.jsx(tct,{form:o}),A.jsx(nct,{form:o}),A.jsx(ict,{form:o}),A.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[A.jsx(bt,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),A.jsx(bt,{type:"submit",disabled:a,children:"Create Business"})]})]})})]})]})}function tct({form:e}){const[t,n]=S.useState(""),{userContext:i}=S.useContext(_M),{countries:r,fetching:a}=A0e(),{watch:o,setValue:s,control:l}=e,c=o("locality"),d=h=>{t.trim()&&(s("generalContacts",[...h,t.trim()],{shouldDirty:!0}),n(""))},u=(h,v)=>{s("generalContacts",h.filter((g,k)=>k!==v),{shouldDirty:!0})},m=c===i?.context.locality;return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Contact Information"}),A.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[A.jsx(Rn,{control:l,name:"businessName",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Business Name *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,required:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"locality",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Locality / Country *"}),A.jsx(jp,{onChange:h.onChange,data:r.map(v=>({value:v.code,label:v.name})),value:h.value,disabled:a,placeholder:"Scroll to see all options",formPart:!0}),A.jsx(Xn,{})]})}),m&&A.jsxs(A.Fragment,{children:[A.jsx(Rn,{control:l,name:"localName",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Local Name *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,placeholder:"Business name in local language"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"govId",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Government ID *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,placeholder:"Enter Government ID"})}),A.jsx(Xn,{})]})})]}),A.jsx(Rn,{control:l,name:"address",render:({field:h})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsxs(ii,{children:[A.jsx(Z2e,{className:"size-4"}),"Address"]}),A.jsx(Yn,{children:A.jsx(vB,{...h,rows:2,placeholder:"Enter business address"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"generalContacts",render:({field:h})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsxs(ii,{className:"flex items-center gap-2",children:[A.jsx(iie,{className:"size-4"}),"General Contacts"]}),A.jsx(Yn,{children:A.jsxs("div",{className:"space-y-2",children:[h.value?.map((v,g)=>A.jsxs(_p,{variant:"secondary",className:"gap-1 pr-1",children:[v,A.jsx("button",{type:"button",onClick:()=>u(h.value??[],g),className:"ml-1 hover:bg-muted rounded-sm p-0.5",children:A.jsx(bp,{className:"size-3"})})]},g)),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{value:t,onChange:v=>n(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),d(h.value??[]))},placeholder:"Add contact email",type:"email"}),A.jsx(bt,{type:"button",variant:"outline",size:"icon",disabled:!t.trim(),onClick:()=>d(h.value??[]),children:A.jsx(SA,{className:"size-4"})})]})]})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"website",render:({field:h})=>A.jsxs(jn,{children:[A.jsxs(ii,{children:[A.jsx(tie,{className:"size-4"}),"Website"]}),A.jsx(Yn,{children:A.jsx(Qn,{...h,type:"url",placeholder:"https://example.com"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"phone",render:({field:h})=>A.jsxs(jn,{children:[A.jsxs(ii,{children:[A.jsx(sFe,{className:"size-4"}),"Phone"]}),A.jsx(Yn,{children:A.jsx(Qn,{...h,type:"tel"})}),A.jsx(Xn,{})]})})]})]})}function nct({form:e}){const{selectableSortCodes:t,fetching:n,sortCodes:i}=qlt(),{selectableTaxCategories:r,fetching:a}=m0e(),{selectableTags:o,fetching:s}=C$(),{setValue:l,control:c}=e,d=S.useCallback(u=>{if(u){const m=i.find(h=>Number(h.key)===Number(u));m&&(m.defaultIrsCode?l("irsCode",m.defaultIrsCode,{shouldDirty:!0}):l("irsCode",void 0,{shouldDirty:!0}))}},[l,i]);return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Defaults"}),A.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[A.jsx(Rn,{control:c,name:"sortCode",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Sort Code"}),A.jsx(Yn,{children:A.jsx(jp,{onChange:m=>{d(m),u.onChange(m)},data:t,value:u.value,disabled:n,placeholder:"Scroll to see all options",formPart:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"taxCategory",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Tax Category"}),A.jsx(Yn,{children:A.jsx(jp,{data:r,disabled:a,value:u.value,onChange:u.onChange,placeholder:"Scroll to see all options",formPart:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"pcn874RecordType",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"PCN874 Record Type"}),A.jsxs(os,{value:u.value,onValueChange:u.onChange,children:[A.jsx(Yn,{children:A.jsx(ls,{children:A.jsx(ss,{placeholder:"Select record type"})})}),A.jsx(cs,{children:Object.entries(j4e).map(([m,h])=>A.jsx(zo,{value:m,children:`${h} (${m})`},m))})]}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"irsCode",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"IRS Code"}),A.jsx(Yn,{children:A.jsx(twe,{value:u.value??void 0,onValueChange:m=>u.onChange(m??null),hideControls:!0,decimalScale:0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"defaultDescription",render:({field:u})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsx(ii,{children:"Default Description"}),A.jsx(Yn,{children:A.jsx(Qn,{placeholder:"Enter default charge description",...u})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"defaultTags",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Tags"}),A.jsx(Yn,{children:A.jsx(q1e,{options:Object.values(o).map(({value:m,label:h})=>({label:h,value:m})),onValueChange:u.onChange,defaultValue:u.value,value:u.value,placeholder:"Select Default Tags",variant:"default",disabled:s})}),A.jsx(Xn,{})]})})]})]})}function ict({form:e}){const[t,n]=S.useState(""),[i,r]=S.useState(""),{getValues:a,setValue:o,control:s}=e,l=()=>{if(t.trim()){const m=a("transactionPhrases");e.setValue("transactionPhrases",[...m,t.trim()],{shouldDirty:!0}),n("")}},c=()=>{if(i.trim()){const m=a("emailAddresses");o("emailAddresses",[...m,i.trim()],{shouldDirty:!0}),r("")}},d=m=>{const h=a("transactionPhrases");o("transactionPhrases",h.filter((v,g)=>g!==m),{shouldDirty:!0})},u=m=>{const h=a("emailAddresses");o("emailAddresses",h.filter((v,g)=>g!==m),{shouldDirty:!0})};return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Auto Matching"})," ",A.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure patterns for automatic matching of bank transactions and documents"}),A.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[A.jsx(Rn,{control:s,name:"transactionPhrases",render:({field:m})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Transaction Phrases"}),!!m.value?.length&&A.jsx("div",{className:"flex flex-wrap gap-2",children:m.value.map((h,v)=>A.jsxs(_p,{variant:"secondary",className:"gap-1",children:[h,A.jsx(bt,{variant:"ghost",size:"icon",className:"p-0 size-3",onClick:()=>d(v),children:A.jsx(bp,{className:"size-3 cursor-pointer",onClick:()=>d(v)})})]},v))}),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{placeholder:"Add phrase...",value:t,onChange:h=>n(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),l())}}),A.jsx(bt,{type:"button",size:"sm",onClick:l,children:A.jsx(SA,{className:"size-4"})})]}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:s,name:"emailAddresses",render:({field:m})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Email Addresses"}),!!m.value?.length&&A.jsx("div",{className:"flex flex-wrap gap-2",children:m.value.map((h,v)=>A.jsxs(_p,{variant:"secondary",className:"gap-1",children:[h,A.jsx(bt,{variant:"ghost",size:"icon",className:"p-0 size-3",onClick:()=>u(v),children:A.jsx(bp,{className:"size-3 cursor-pointer"})})]},v))}),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{type:"email",placeholder:"Add email...",value:i,onChange:h=>r(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),c())}}),A.jsx(bt,{type:"button",size:"sm",onClick:c,children:A.jsx(SA,{className:"size-4"})})]}),A.jsx(Xn,{})]})})]})]})}const rct=S.createContext(null),AO={didCatch:!1,error:null};class E$ extends S.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=AO}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,i,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];(n=(i=this.props).onReset)===null||n===void 0||n.call(i,{args:a,reason:"imperative-api"}),this.setState(AO)}}componentDidCatch(t,n){var i,r;(i=(r=this.props).onError)===null||i===void 0||i.call(r,t,n)}componentDidUpdate(t,n){const{didCatch:i}=this.state,{resetKeys:r}=this.props;if(i&&n.error!==null&&act(t.resetKeys,r)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(AO)}}render(){const{children:t,fallbackRender:n,FallbackComponent:i,fallback:r}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(i)s=S.createElement(i,l);else if(r!==void 0)s=r;else throw o}return S.createElement(rct.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function act(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,i)=>!Object.is(n,t[i]))}const oct="updateTransactions",sct=()=>{const[{fetching:e},t]=or(w4e),n=S.useCallback(async i=>{const r=Array.isArray(i.transactionIds)?i.transactionIds.join(", "):i.transactionIds,a=`Error updating transactions ID [${r}]`,o=`${oct}-${r}`;Bt.loading("Updating Transactions",{id:o});try{const s=await t(i),l=sr(s,a,o,"updateTransactions");if(l)return Bt.success("Success",{id:o,description:"Transactions updated"}),l.updateTransactions.transactions.map(c=>c.id)}catch(s){console.error(`${a}: ${s}`),Bt.error("Error",{id:o,description:a,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTransactions:n}};var yB="Checkbox",[lct]=Bs(yB),[cct,B$]=lct(yB);function dct(e){const{__scopeCheckbox:t,checked:n,children:i,defaultChecked:r,disabled:a,form:o,name:s,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[m,h]=Kd({prop:n,defaultProp:r??!1,onChange:l,caller:yB}),[v,g]=S.useState(null),[k,b]=S.useState(null),w=S.useRef(!1),C=v?!!o||!!v.closest("form"):!0,N={checked:m,disabled:a,setChecked:h,control:v,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:Um(r)?!1:r,isFormControl:C,bubbleInput:k,setBubbleInput:b};return A.jsx(cct,{scope:t,...N,children:uct(u)?u(N):i})}var h0e="CheckboxTrigger",p0e=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...i},r)=>{const{control:a,value:o,disabled:s,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:v}=B$(h0e,e),g=ui(r,d),k=S.useRef(l);return S.useEffect(()=>{const b=a?.form;if(b){const w=()=>u(k.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,u]),A.jsx(sn.button,{type:"button",role:"checkbox","aria-checked":Um(l)?"mixed":l,"aria-required":c,"data-state":w0e(l),"data-disabled":s?"":void 0,disabled:s,value:o,...i,ref:g,onKeyDown:Kt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Kt(n,b=>{u(w=>Um(w)?!0:!w),v&&h&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});p0e.displayName=h0e;var g0e=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:i,checked:r,defaultChecked:a,required:o,disabled:s,value:l,onCheckedChange:c,form:d,...u}=e;return A.jsx(dct,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:s,required:o,onCheckedChange:c,name:i,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>A.jsxs(A.Fragment,{children:[A.jsx(p0e,{...u,ref:t,__scopeCheckbox:n}),m&&A.jsx(k0e,{__scopeCheckbox:n})]})})});g0e.displayName=yB;var v0e="CheckboxIndicator",y0e=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:i,...r}=e,a=B$(v0e,n);return A.jsx(To,{present:i||Um(a.checked)||a.checked===!0,children:A.jsx(sn.span,{"data-state":w0e(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});y0e.displayName=v0e;var b0e="CheckboxBubbleInput",k0e=S.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:i,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:o,required:s,disabled:l,name:c,value:d,form:u,bubbleInput:m,setBubbleInput:h}=B$(b0e,e),v=ui(n,h),g=x$(a),k=vj(i);S.useEffect(()=>{const w=m;if(!w)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,F=!r.current;if(g!==a&&_){const B=new Event("click",{bubbles:F});w.indeterminate=Um(a),_.call(w,Um(a)?!1:a),w.dispatchEvent(B)}},[m,g,a,r]);const b=S.useRef(Um(a)?!1:a);return A.jsx(sn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:s,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:v,style:{...t.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});k0e.displayName=b0e;function uct(e){return typeof e=="function"}function Um(e){return e==="indeterminate"}function w0e(e){return Um(e)?"indeterminate":e?"checked":"unchecked"}function Ip({className:e,...t}){return A.jsx(g0e,{"data-slot":"checkbox",className:Ft("peer border-gray-200 dark:bg-gray-200/30 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 dark:data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:dark:bg-gray-800/30 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900 dark:dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:border-gray-50 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...t,children:A.jsx(y0e,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:A.jsx(kA,{className:"size-3.5"})})})}const fct=[{id:"select",header:({table:e})=>A.jsx(Ip,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"}),cell:({row:e})=>A.jsx(Ip,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1},{accessorKey:"accountType",header:"Type",cell:({row:e})=>A.jsx("div",{children:e.getValue("accountType")})},{accessorKey:"accountName",header:"Account",cell:({row:e})=>A.jsx("div",{children:e.getValue("accountName")})},{accessorKey:"amountRaw",header:"Amount",cell:({row:e})=>A.jsx("div",{children:e.original.amountFormatted})},{accessorKey:"sourceDescription",header:"Description",cell:({row:e})=>A.jsx("div",{children:e.getValue("sourceDescription")})},{accessorKey:"eventDate",header:"Event Date",cell:({row:e})=>A.jsx("div",{children:Qi(e.getValue("eventDate"),"yyyy-MM-dd")})},{accessorKey:"valueDate",header:"Value Date",cell:({row:e})=>A.jsx("div",{children:e.getValue("valueDate")?Qi(e.getValue("valueDate"),"yyyy-MM-dd"):""})}];function Act({transactionId:e,counterpartyId:t,open:n,onOpenChange:i,onClose:r}){const[{data:a,fetching:o},s]=lr({pause:!0,query:LTe,variables:{transactionId:e,withMissingInfo:!0}});S.useEffect(()=>{n&&t&&s()},[n,t,s,e]);const l=S.useCallback(d=>{i(d),n&&!d&&r?.()},[i,r,n]),c=S.useMemo(()=>{const d=a?.similarTransactions.map(u=>({id:u.id,amountRaw:u.amount.raw,amountFormatted:u.amount.formatted,sourceDescription:u.sourceDescription,eventDate:new Date(u.eventDate),valueDate:u.effectiveDate?new Date(u.effectiveDate):void 0,accountType:u.account.type,accountName:u.account.name}))??[];return a&&d.length===0&&l(!1),d},[a,l]);return A.jsx(fc,{open:n&&!!t&&c.length>0,onOpenChange:l,children:A.jsx(Ac,{className:"overflow-scroll max-h-screen w-full sm:max-w-[640px] md:max-w-[768px] lg:max-w-[900px]",children:A.jsx(E$,{fallback:A.jsx("div",{children:"Error fetching similar transactions"}),children:o?A.jsx(N0,{}):t?A.jsx(mct,{data:c,counterpartyId:t,onOpenChange:l}):null})})})}function mct({data:e,counterpartyId:t,onOpenChange:n}){const[i,r]=V.useState([]),[a,o]=V.useState({}),s=g0({data:e,columns:fct,onSortingChange:r,getCoreRowModel:p0(),getSortedRowModel:q1(),onRowSelectionChange:o,state:{sorting:i,rowSelection:a}}),{updateTransactions:l}=sct(),c=S.useCallback(async()=>{const d=s.getSelectedRowModel().rows.map(u=>u.original.id);await l({transactionIds:d,fields:{counterpartyId:t}}),n(!1)},[l,n,s,t]);return S.useEffect(()=>{e.length===0&&n(!1)},[e.length,n]),e.length?A.jsxs(A.Fragment,{children:[A.jsxs(td,{className:"flex flex-row items-center justify-between",children:[A.jsx(nd,{children:"Transactions"}),A.jsx(bt,{onClick:c,children:"Approve selected"})]}),A.jsx(El,{children:A.jsxs(Jp,{children:[A.jsx(eg,{children:s.getHeaderGroups().map(d=>A.jsx(Go,{children:d.headers.map(u=>A.jsx(wl,{children:u.isPlaceholder?null:Yc(u.column.columnDef.header,u.getContext())},u.id))},d.id))}),A.jsx(tg,{children:s.getRowModel().rows.map(d=>A.jsx(Go,{"data-state":d.getIsSelected()&&"selected",children:d.getVisibleCells().map(u=>A.jsx(Qo,{children:Yc(u.column.columnDef.cell,u.getContext())},u.id))},d.id))})]})})]}):null}function S0e({transaction:e,onChange:t}){const{get:n}=Xp(),{id:i,counterparty:r,missingInfoSuggestions:a,id:o,sourceDescription:s,enableEdit:l}=e,c=!!a?.business&&l,d=c?a?.business?.name:"Missing",u=c?a?.business?.id:null,m=r?.name??d,[h,v]=S.useState(!1),{updateTransaction:g,fetching:k}=LM(),b=S.useCallback(async j=>{await g({transactionId:o,fields:{counterpartyId:j}}),v(!0)},[o,g]),w=S.useCallback(async j=>{await b(j),t?.()},[b,t]),C=n("chargesFilters"),N=S.useCallback(j=>{const P=C?JSON.parse(decodeURIComponent(C)):{};return Np({fromDate:P.fromDate,toDate:P.toDate,ownerIds:P.byOwners,businessIDs:[j]})},[C]),{selectableBusinesses:_,fetching:F}=h0(),[B,T]=S.useState(u??null),[I,$]=S.useState(s);return A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"flex flex-wrap flex-col justify-center",children:r?.id?A.jsx(qr,{to:N(r.id),target:"_blank",rel:"noreferrer",onClick:j=>j.stopPropagation(),className:"inline-flex items-center font-semibold",children:m}):A.jsxs(A.Fragment,{children:[A.jsx(o8,{options:_,value:B,onChange:T,search:I,onSearchChange:$,placeholder:"Choose or create a business",empty:I?A.jsx(F$,{description:I,onAdd:w}):null}),A.jsx(dCt,{content:"Approve",children:A.jsx(bt,{variant:"outline",size:"icon",onClick:()=>B&&b(B),disabled:k||F||!B,children:A.jsx(kA,{className:"size-4"})})})]})}),A.jsx(Act,{transactionId:i,counterpartyId:r?.id??B,open:h,onOpenChange:v,onClose:t})]})}const mO=[{accessorKey:"counterparty.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Counterparty",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(S0e,{transaction:e.original})},{accessorKey:"eventDate",sortingFn:e=>"eventDate"in e.original&&e.original.eventDate?new Date(e.original.eventDate).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Event Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Jme,{transaction:e.original})},{accessorKey:"effectiveDate",sortingFn:e=>"effectiveDate"in e.original&&e.original.effectiveDate?new Date(e.original.effectiveDate).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Debit Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Zme,{transaction:e.original})},{accessorKey:"amount.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(ehe,{transaction:e.original})},{accessorKey:"account.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(the,{transaction:e.original})},{accessorKey:"sourceDescription",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Description",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(nhe,{transaction:e.original})},{accessorKey:"referenceKey",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Reference#",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(ihe,{transaction:e.original})}],hct={accessorKey:"id",header:"Actions",cell:({row:e})=>e.original.enableEdit?A.jsxs(A.Fragment,{children:[A.jsx(D$,{onClick:e.original.editTransaction}),A.jsx(kSt,{chargeId:e.original.chargeId,transactionId:e.original.id,onDone:e.original.onUpdate})]}):e.original.enableChargeLink?A.jsx(N0e,{chargeId:e.original.chargeId}):null},x0e=({transactionsProps:e,onChange:t=()=>{},enableEdit:n,enableChargeLink:i})=>{const[r,a]=S.useState(void 0),[o,s]=S.useState([]),l=S.useMemo(()=>e.map(m=>si(ure,m)),[e]),c=S.useMemo(()=>l?.map(m=>({...m,editTransaction:()=>a(m.id),onUpdate:t,enableEdit:n,enableChargeLink:i})),[l,t,n,i]),d=S.useMemo(()=>n||i?[...mO,hct]:mO,[n,i]),u=g0({data:c,columns:d,getCoreRowModel:p0(),onSortingChange:s,getSortedRowModel:q1(),state:{sorting:o}});return A.jsxs(A.Fragment,{children:[A.jsxs(Jp,{children:[A.jsx(eg,{children:u.getHeaderGroups().map(m=>A.jsx(Go,{children:m.headers.map(h=>A.jsx(wl,{colSpan:h.colSpan,children:h.isPlaceholder?null:Yc(h.column.columnDef.header,h.getContext())},h.id))},m.id))}),A.jsx(tg,{children:u.getRowModel().rows?.length?u.getRowModel().rows.map(m=>A.jsx(Go,{children:m.getVisibleCells().map(h=>A.jsx(Qo,{children:Yc(h.column.columnDef.cell,h.getContext())},h.id))},m.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:mO.length,className:"h-24 text-center",children:"No results."})})})]}),A.jsx(vSt,{transactionID:r,close:()=>a(void 0),onChange:t})]})},pct=({transactionsProps:e,onChange:t})=>{const{transactions:n}=si(fre,e);return A.jsx(x0e,{transactionsProps:n,onChange:t,enableEdit:!0})},gct=({chargeId:e})=>{const[{data:t,fetching:n}]=lr({query:NTe,variables:{chargeId:e}}),i=S.useMemo(()=>t?.depositByCharge?.transactions?.filter(r=>r.chargeId!==e)??[],[t?.depositByCharge?.transactions,e]);return n?A.jsx(wA,{className:"h-10 w-10 animate-spin"}):t?.depositByCharge?A.jsxs("div",{children:[A.jsxs("div",{className:"text-lg font-semibold mb-4",children:['Bank Deposit "',t?.depositByCharge?.id,'" Balance:'," ",t?.depositByCharge?.balance.formatted]}),A.jsx("div",{className:"mb-4",children:A.jsx("span",{className:"text-sm text-gray-500",children:t?.depositByCharge?.isOpen?"Deposit is open":"Deposit is closed"})}),i.length===0?A.jsx("div",{className:"text-sm text-gray-500",children:"No transactions found for this deposit."}):A.jsx(x0e,{transactionsProps:i,enableChargeLink:!0})]}):A.jsx("div",{className:"text-sm text-gray-500",children:"No bank deposit found for this charge."})},vct=({chargeProps:e})=>{const t=si(Are,e);if(t.__typename!=="ConversionCharge")return A.jsx(A.Fragment,{});const{eventRate:n,officialRate:i}=t;return A.jsxs(Vs,{justify:"center",children:[i&&A.jsx(Vs.Col,{span:"content",children:A.jsx(vq,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:A.jsxs(Iy,{position:"apart",children:[A.jsx(Xi,{weight:500,children:"Official Conversion Rate"}),A.jsx(_R,{color:"green",variant:"light",children:`${Number(i.rate)} ${Jl(i.from)} => ${Jl(i.to)}`})]})})}),n&&A.jsx(Vs.Col,{span:"content",children:A.jsx(vq,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:A.jsxs(Iy,{position:"apart",children:[A.jsx(Xi,{weight:500,children:"Bank Conversion Rate"}),A.jsx(_R,{color:"green",variant:"light",children:`${Number(n.rate)} ${Jl(n.from)} => ${Jl(n.to)}`})]})})})]})},yct=({chargeProps:e})=>{const t=si(mre,e),n=S.useMemo(()=>t.__typename==="CreditcardBankCharge"&&t.creditCardTransactions?t.creditCardTransactions.map(i=>si(ure,i)):[],[t]);return n.length?A.jsxs(Jp,{children:[A.jsx(eg,{children:A.jsxs(Go,{children:[A.jsx(wl,{children:"Event Date"}),A.jsx(wl,{children:"Debit Date"}),A.jsx(wl,{children:"Amount"}),A.jsx(wl,{children:"Account"}),A.jsx(wl,{children:"Description"}),A.jsx(wl,{children:"Reference#"}),A.jsx(wl,{children:"Counterparty"}),A.jsx(wl,{children:"Charge"})]})}),A.jsx(tg,{children:n.map(i=>{const r={...i,onUpdate:()=>{},editTransaction:()=>{},enableEdit:!1,enableChargeLink:!1};return A.jsxs(Go,{children:[A.jsx(Qo,{children:A.jsx(Jme,{transaction:r})}),A.jsx(Qo,{children:A.jsx(Zme,{transaction:r})}),A.jsx(Qo,{children:A.jsx(ehe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(the,{transaction:r})}),A.jsx(Qo,{children:A.jsx(nhe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(ihe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(S0e,{transaction:r})}),A.jsx(Qo,{children:A.jsx(N0e,{chargeId:i.chargeId})})]},i.id)})})]}):null},bct=({chargeProps:e})=>{const t=si(hre,e),n=S.useMemo(()=>t.__typename!=="FinancialCharge"?[]:Object.entries(t.exchangeRates??{}).sort((i,r)=>i[0].localeCompare(r[0])),[t]);return t.__typename!=="FinancialCharge"?A.jsx(A.Fragment,{}):A.jsx("div",{className:"flex flex-row flex-wrap gap-2 px-2",children:n.map(([i,r])=>A.jsx(El,{className:"gap-0 py-2",children:A.jsxs(Kc,{className:"flex flex-col px-2",children:[A.jsx(qd,{className:"text-xl font-semibold",children:i.toLocaleUpperCase()}),A.jsxs("div",{className:"flex items-center space-x-2",children:[A.jsxs("span",{className:"whitespace-nowrap",children:[Jl(i.toLocaleUpperCase()),"1="]}),A.jsxs(_p,{variant:"default",className:"flex gap-1 rounded-lg text-md",children:[Jl(vn.Ils),r]})]})]})},i))})},kct="deleteMiscExpense",wct=()=>{const[{fetching:e},t]=or(JTe),n=S.useCallback(async i=>{const r="Error deleting misc expense",a=`${kct}-${i.id}`;Bt.loading("Deleting misc expense",{id:a});try{const o=await t(i),s=sr(o,r,a);if(s)return Bt.success("Success",{id:a,description:"Misc expense was deleted successfully"}),s.deleteMiscExpense}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteMiscExpense:n}};function Sct({miscExpenseId:e,onChange:t}){const{deleteMiscExpense:n}=wct();async function i(){try{await n({id:e}),t?.()}catch(r){const a="Failed to delete misc expense";console.error(`${a}: ${r}`),Bt.error("Error",{description:a})}}return A.jsx(vf,{onConfirm:i,title:"Are you sure you want to delete this expense?",children:A.jsx(bt,{className:"size-7.5 text-red-500",variant:"ghost",children:A.jsx(qF,{className:"size-5"})})})}const xct=({miscExpensesData:e,onChange:t})=>{const n=si(pre,e),{miscExpenses:i}=n;return A.jsxs("table",{className:"w-full h-full",children:[A.jsx("thead",{children:A.jsxs("tr",{children:[A.jsx("th",{children:"Creditor"}),A.jsx("th",{children:"Debtor"}),A.jsx("th",{children:"Amount"}),A.jsx("th",{children:"Invoice Date"}),A.jsx("th",{children:"Value Date"}),A.jsx("th",{children:"Description"}),A.jsx("th",{children:"Actions"})]})}),A.jsx("tbody",{children:i?.map(r=>A.jsxs("tr",{children:[A.jsx("td",{children:A.jsx("div",{children:r.creditor?.name})}),A.jsx("td",{children:A.jsx("div",{children:r.debtor?.name})}),A.jsx("td",{children:A.jsx("div",{children:r.amount?.formatted})}),A.jsx("td",{children:A.jsx("div",{children:r.invoiceDate})}),A.jsx("td",{children:A.jsx("div",{children:r.valueDate&&Qi(new Date(r.valueDate),"yyyy-MM-dd")})}),A.jsx("td",{children:A.jsx("div",{children:r.description})}),A.jsxs("td",{children:[A.jsx(gSt,{onDone:t,data:r}),A.jsx(Sct,{miscExpenseId:r.id,onChange:t})]})]},r?.id))})]})},Nct=({salaryRecordsProps:e})=>{const t=si(gre,e);if(t.__typename!=="SalaryCharge")return A.jsx(A.Fragment,{});const{salaryRecords:n}=t;return A.jsxs("table",{className:"w-full h-full",children:[A.jsx("thead",{children:A.jsxs("tr",{children:[A.jsx("th",{children:"Employee"}),A.jsx("th",{children:"Direct Salary"}),A.jsx("th",{children:"Base Salary"}),A.jsx("th",{children:"Pension"}),A.jsx("th",{children:"Training Fund"}),A.jsx("th",{children:"Social Security"}),A.jsx("th",{children:"Tax"})]})}),A.jsx("tbody",{children:n?.map(i=>A.jsxs("tr",{children:[A.jsx("td",{children:A.jsx("div",{children:i.employee?.name??"Missing"})}),A.jsx("td",{children:A.jsx("div",{children:i.directAmount.formatted})}),A.jsx("td",{children:A.jsx("div",{children:i.baseAmount?.formatted})}),A.jsxs("td",{children:[A.jsx("div",{children:i.pensionFund?.name}),A.jsxs("div",{children:["Employee: ",i.pensionEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.pensionEmployerAmount?.formatted]}),A.jsxs("div",{children:["Compensation: ",i.compensationsAmount?.formatted]})]}),A.jsxs("td",{children:[A.jsx("div",{children:i.trainingFund?.name}),A.jsxs("div",{children:["Employee: ",i.trainingFundEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.trainingFundEmployerAmount?.formatted]})]}),A.jsxs("td",{children:[A.jsxs("div",{children:["Employee: ",i.socialSecurityEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.socialSecurityEmployerAmount?.formatted]}),A.jsxs("div",{children:["Health: ",i.healthInsuranceAmount?.formatted]})]}),A.jsx("td",{children:A.jsx("div",{children:i.incomeTaxAmount?.formatted})})]},`${i.employee?.name}-${i.baseAmount}`))})]})};function Cct({chargeID:e,onChange:t=()=>{},fetching:n}){const[i,r]=S.useState([]),[a,o]=S.useState(e),[s,{toggle:l}]=CA(!1),[c,d]=S.useState(void 0),[{data:u,fetching:m},h]=lr({query:Id,variables:{chargeId:a}}),v=S.useCallback(()=>{h(),t()},[h,t]);S.useEffect(()=>{u?.charge&&d(u.charge)},[u]),S.useEffect(()=>{n&&h()},[n,h]),S.useEffect(()=>{e!==a&&(o(e),h())},[e,a,h]);const g=c?.__typename,k=!!c?.metadata?.ledgerCount,b=!!c?.metadata?.transactionsCount,w=!!c?.metadata?.documentsCount,C=!!c?.metadata?.receiptsCount,N=g==="SalaryCharge",_=!!c?.miscExpenses?.length,F=c?.metadata?.openDocuments,B=(c?.totalAmount?.raw??0)>0&&!C;S.useEffect(()=>{const W=[];b&&W.push("transactions"),w&&W.push("documents"),k&&W.push("ledger"),N&&W.push("salaries"),_&&W.push("miscExpenses"),g==="BankDepositCharge"&&W.push("bankDeposit"),r(W)},[b,w,k,N,_,g]);function T(W){i.includes(W)?r(le=>le.filter(be=>be!==W)):r(le=>[...le,W])}const I=vl(Id,yre,c),$=vl(Id,yz,c),j=vl(Id,bre,c),P=vl(Id,fre,c),K=vl(Id,pre,c),q=S.useMemo(()=>g==="ConversionCharge"&&vl(Id,Are,c),[c,g]),re=S.useMemo(()=>g==="FinancialCharge"&&vl(Id,hre,c),[c,g]),U=g==="SalaryCharge"&&vl(Id,gre,c),te=S.useMemo(()=>g==="CreditcardBankCharge"&&vl(Id,mre,c),[c,g]);return A.jsxs("div",{className:"flex flex-col gap-5",children:[m&&A.jsx(ad,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),vl(Id,cre,c)&&A.jsx(Mit,{data:c}),c&&A.jsxs("div",{className:"flex flex-row",children:[A.jsxs(Ri,{className:"w-full",multiple:!0,value:i,chevron:A.jsx(SA,{size:"1rem"}),styles:{chevron:{"&[data-rotate]":{transform:"rotate(45deg)"}}},children:[g==="ConversionCharge"&&A.jsxs(Ri.Item,{value:"conversion",children:[A.jsx(Ri.Control,{disabled:!b,onClick:()=>T("conversion"),children:"Conversion Info"}),A.jsx(Ri.Panel,{children:q&&A.jsx(vct,{chargeProps:c})})]}),g==="FinancialCharge"&&A.jsxs(Ri.Item,{value:"exchangeRates",children:[A.jsx(Ri.Control,{disabled:!re,onClick:()=>T("exchangeRates"),children:"Exchange Rates"}),A.jsx(Ri.Panel,{children:re&&A.jsx(bct,{chargeProps:c})})]}),b&&A.jsxs(Ri.Item,{value:"transactions",children:[A.jsx(Ri.Control,{disabled:!b,onClick:()=>T("transactions"),children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between w-full",children:["Transactions",B&&A.jsx(c1,{chargeId:c.id})]})}),A.jsx(Ri.Panel,{children:P&&A.jsx(pct,{transactionsProps:c,onChange:v})})]}),_&&A.jsxs(Ri.Item,{value:"miscExpenses",children:[A.jsx(Ri.Control,{disabled:!_,onClick:()=>T("miscExpenses"),children:"Misc Expenses"}),A.jsx(Ri.Panel,{children:K&&A.jsx(xct,{miscExpensesData:c,onChange:v})})]}),w&&A.jsxs(Ri.Item,{value:"documents",children:[A.jsx(Ri.Control,{disabled:!w,onClick:()=>T("documents"),children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between w-full",children:[A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-start",children:[w&&A.jsx(Mr,{label:"Documents Gallery",children:A.jsx(bt,{onClick:W=>{W.stopPropagation(),l()},variant:"outline",disabled:!I,size:"icon",className:"size-7.5 text-gray-500",children:A.jsx(nie,{className:"size-5"})})}),"Documents"]}),F&&A.jsx(c1,{chargeId:c.id})]})}),A.jsx(Ri.Panel,{children:$&&A.jsx(Xme,{documentsProps:si(yz,c)?.additionalDocuments,onChange:v})})]}),g==="SalaryCharge"&&A.jsxs(Ri.Item,{value:"salaries",children:[A.jsx(Ri.Control,{disabled:!N,onClick:()=>T("salaries"),children:"Salaries"}),A.jsx(Ri.Panel,{children:U&&A.jsx(Nct,{salaryRecordsProps:c})})]}),c.__typename==="BusinessTripCharge"&&A.jsxs(Ri.Item,{value:"businessTrip",children:[A.jsx(Ri.Control,{onClick:()=>T("businessTrip"),children:"Business Trip"}),A.jsx(Ri.Panel,{children:A.jsx(EYe,{data:c.businessTrip})})]}),g==="CreditcardBankCharge"&&A.jsxs(Ri.Item,{value:"creditcard",children:[A.jsx(Ri.Control,{onClick:()=>T("creditcard"),children:"CreditCard Transactions"}),A.jsx(Ri.Panel,{children:te&&A.jsx(yct,{chargeProps:c})})]}),g==="BankDepositCharge"&&A.jsxs(Ri.Item,{value:"bankDeposit",children:[A.jsx(Ri.Control,{onClick:()=>T("bankDeposit"),children:"Bank Deposit"}),A.jsx(Ri.Panel,{children:A.jsx(gct,{chargeId:c.id})})]}),k&&A.jsxs(Ri.Item,{value:"ledger",children:[A.jsx(Ri.Control,{disabled:!k,onClick:W=>{W.stopPropagation(),T("ledger")},children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-start w-full",children:[!c.metadata?.isLedgerLocked&&A.jsx(Zvt,{chargeId:c.id,onChange:v,variant:"outline"}),"Ledger Records"]})}),A.jsx(Ri.Panel,{children:j&&A.jsx(jit,{ledgerFragment:c})})]})]}),I&&A.jsx(Sn,{maw:"1/6",children:A.jsx(Vj,{in:s,transitionDuration:500,transitionTimingFunction:"linear",children:A.jsx(Tnt,{chargeProps:c,onChange:v})})})]}),!m&&!c&&A.jsx("p",{children:"Error fetching extended information for this charge"})]})}const _ct=({setEditCharge:e,setInsertDocument:t,setMatchDocuments:n,toggleMergeCharge:i,isSelectedForMerge:r,data:a,isAllOpened:o})=>{const[s,l]=S.useState(!1),[c,d]=S.useState(si(Mh,a)),[{data:u,fetching:m},h]=lr({query:xTe,pause:!0,variables:{chargeId:a.id}}),v=h;S.useEffect(()=>{const b=u?.charge;b&&d(si(Mh,b))},[u]),S.useEffect(()=>{d(si(Mh,a))},[a]),S.useEffect(()=>{l(o)},[o]);const g=S.useMemo(()=>!!(c.metadata?.documentsCount||c.metadata?.transactionsCount||c.metadata?.ledgerCount||c.metadata?.miscExpensesCount),[c.metadata?.documentsCount,c.metadata?.transactionsCount,c.metadata?.ledgerCount,c.metadata?.miscExpensesCount]),k=(c?.totalAmount?.raw??0)>0;return A.jsxs(A.Fragment,{children:[A.jsxs("tr",{onClick:()=>{g&&(l(b=>!b),v())},children:[A.jsx(ptt,{data:c}),A.jsx(dtt,{data:c}),A.jsx(IYe,{data:c}),A.jsx(gtt,{data:c}),vl(Mh,wre,c)?A.jsx(ctt,{data:c}):A.jsx("td",{}),A.jsx(ftt,{data:c,onChange:v}),vl(Mh,Sre,c)?A.jsx(mtt,{data:c,onChange:v}):A.jsx("td",{}),vl(Mh,xre,c)?A.jsx(htt,{data:c}):A.jsx("td",{}),vl(Mh,kre,c)?A.jsx(OYe,{data:c}):A.jsx("td",{}),A.jsx(Att,{data:c}),A.jsx(TYe,{data:c,onChange:v}),A.jsx("td",{children:A.jsxs("div",{className:"flex flex-col gap-2",children:[e&&A.jsx(D$,{onClick:b=>{b.stopPropagation(),e(v)}}),i&&A.jsx(eyt,{toggleMergeSelected:()=>i(v),mergeSelected:r})]})}),A.jsx("td",{children:A.jsxs("div",{className:"flex flex-col gap-2",children:[A.jsx(Btt,{chargeId:c.id,chargeType:c.__typename,setInsertDocument:t?()=>t(v):void 0,setMatchDocuments:n,onChange:v,isIncome:k}),g&&A.jsx(Jvt,{toggleExpansion:l,isExpanded:s,onClickAction:()=>v()})]})})]}),g&&s&&A.jsx("tr",{children:A.jsx("td",{colSpan:13,children:A.jsx(A0,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:A.jsx(Cct,{chargeID:c.id,onChange:v,fetching:m})})})})]})},Fct=({setEditChargeId:e,setInsertDocument:t,setMatchDocuments:n,toggleMergeCharge:i,mergeSelectedCharges:r,data:a,isAllOpened:o})=>{const s=a?.map(l=>si(kTe,l))??[];return A.jsxs(Yp,{striped:!0,highlightOnHover:!0,children:[A.jsx("thead",{className:"sticky top-0 z-20",children:A.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[A.jsx("th",{children:"Type"}),A.jsx("th",{children:"Date"}),A.jsx("th",{children:"Amount"}),A.jsx("th",{children:"Vat"}),A.jsx("th",{children:"Counterparty"}),A.jsx("th",{children:"Description"}),A.jsx("th",{children:"Tags"}),A.jsx("th",{children:"Tax Category"}),A.jsx("th",{children:"Business Trip"}),A.jsx("th",{children:"More Info"}),A.jsx("th",{children:"Accountant Approval"}),A.jsx("th",{children:"Edit"}),A.jsx("th",{children:"More Info"})]})}),A.jsx("tbody",{children:s?.map(l=>A.jsx(_ct,{data:l,setEditCharge:e?c=>e({id:l.id,onChange:c}):void 0,setInsertDocument:t?c=>t({id:l.id,onChange:c}):void 0,setMatchDocuments:n?()=>n({id:l.id,ownerId:l.owner.id}):void 0,toggleMergeCharge:i?c=>i(l.id,c):void 0,isSelectedForMerge:r?.has(l.id)??!1,isAllOpened:o},l.id))})]})};function rg(e){return`/charges/${e}`}const Ect=({chargeId:e})=>{const{chargeId:t}=wCe(),n=e||t;let i;try{i=ICe()}catch{}const[r,a]=S.useState(void 0),[o,s]=S.useState(void 0),[l,c]=S.useState(void 0),[{data:d,fetching:u},m]=lr({query:Cre,pause:!n||!!i,variables:{chargeId:n??""}});S.useEffect(()=>{n&&!i&&m()},[n,i,m]);const h=i||d,v=!i&&u;return n?A.jsxs(A.Fragment,{children:[v?A.jsx(N0,{}):A.jsx(Fct,{setEditChargeId:a,setInsertDocument:s,setMatchDocuments:c,data:h?.charge?[h.charge]:[],isAllOpened:!0}),r&&A.jsx(hSt,{chargeId:r?.id,close:()=>a(void 0),onChange:r.onChange}),o&&A.jsx(bSt,{chargeId:o.id,onChange:o.onChange,close:()=>s(void 0)}),l&&A.jsx(HNt,{chargeId:l.id,ownerId:l.ownerId,setMatchDocuments:()=>c(void 0)})]}):A.jsx("div",{children:"Charge not found"})},Bct=Object.freeze(Object.defineProperty({__proto__:null,Charge:Ect,getChargeHref:rg},Symbol.toStringTag,{value:"Module"}));function N0e(e){return A.jsx(Mr,{label:"To Charge",children:A.jsx(bt,{onClick:t=>{t.stopPropagation(),window.open(rg(e.chargeId),"_blank","noreferrer")},...e,className:Ft("size-7.5",e.className),variant:"ghost",children:A.jsx(S2e,{className:"size-5"})})})}const Dct="closeDocument",Tct=()=>{const[{fetching:e},t]=or(VTe),n=S.useCallback(async i=>{const r=`Error closing document ID [${i.documentId}]`,a=`${Dct}-${i.documentId}`;Bt.loading("Closing Document...",{id:a});try{const o=await t(i),s=sr(o,r,a,"closeDocument");if(s)return Bt.success("Success",{id:a,description:"Document closed"}),s.closeDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,closeDocument:n}};function Ict({documentId:e,couldIssueCreditInvoice:t,...n}){const{closeDocument:i}=Tct(),[r,a]=S.useState(!1),[o,s]=S.useState(!1),l=S.useCallback(()=>{i({documentId:e})},[i,e]);return t?A.jsxs(A.Fragment,{children:[A.jsx(Mr,{label:"Close Document",children:A.jsx(bt,{className:"size-7.5 text-red-600",variant:"ghost",...n,onClick:()=>a(!0),children:A.jsx(Q9,{className:"size-5"})})}),A.jsx(fc,{open:r,onOpenChange:a,children:A.jsxs(Ac,{className:"sm:max-w-[425px]",children:[A.jsx(td,{children:A.jsx(nd,{children:"Should Issue Credit Invoice?"})}),A.jsxs(e0,{children:[A.jsx(bt,{onClick:()=>{a(!1),l()},variant:"secondary",children:"Just Close"}),A.jsx(bt,{onClick:()=>{a(!1),s(!0)},variant:"default",children:"Issue Credit Invoice"})]})]})}),A.jsx(c1,{documentId:e,documentType:Zn.CreditInvoice,open:o,setOpen:s})]}):A.jsx(vf,{onConfirm:l,title:"Are you sure you want to close this document?",children:A.jsx(bt,{className:"size-7.5 text-red-600",variant:"ghost",...n,children:A.jsx(Q9,{className:"size-5"})})})}function aw(e){return A.jsx(bt,{...e,variant:"ghost",className:Ft("size-7.5 text-green-500",e.className),children:A.jsx(kA,{className:"size-5"})})}const k0=({content:e,isLink:t})=>A.jsx(bt,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>B4e(e),children:t?A.jsx(q2e,{className:"size-5"}):A.jsx(y2e,{className:"size-5"})}),Oct="deleteDocument",Pct=()=>{const[{fetching:e},t]=or(ZTe),n=S.useCallback(async i=>{const r=`Error deleting document ID [${i.documentId}]`,a=`${Oct}-${i.documentId}`;Bt.loading("Deleting Document",{id:a});try{const o=await t(i),s=sr(o,r,a);if(s)return Bt.success("Success",{id:a,description:"Document was deleted"}),s.deleteDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,deleteDocument:n}};function Rct({documentId:e}){const{deleteDocument:t}=Pct();function n(){t({documentId:e})}return A.jsx(vf,{onConfirm:n,title:"Are you sure you want to delete this document?",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5 text-red-500",children:A.jsx(qF,{className:"size-5"})})})}function jct(e,t){const n=new Uint8Array([239,187,191]),i=new Blob([n,e],{type:"text/csv;charset=UTF-8"}),r=URL.createObjectURL(i),a=document.createElement("a");a.href=r,a.download=`${t}.csv`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}const Mct=({createFileVariables:e,buttonProps:t,buttonContent:n,label:i})=>{const r=S.useCallback(()=>{e().then(({fileContent:a,fileName:o})=>{jct(a,o)})},[e]);return A.jsxs(i0,{children:[A.jsx(r0,{children:A.jsx(bt,{variant:"outline",className:"p-2",...t,onClick:r,children:n||A.jsx(eie,{size:20})})}),A.jsx(a0,{children:A.jsx("p",{children:i||"Download CSV"})})]})};function D$(e){return A.jsx(Mr,{disabled:!e.tooltip,label:e.tooltip,children:A.jsx(bt,{className:"size-7.5",variant:"ghost",...e,children:A.jsx(N6,{className:"size-5"})})})}function Lct(){const e=m1(),{authService:t}=S.useContext(qE),n=async()=>{await t.logout(),e(ki.LOGIN)};return A.jsx(bt,{variant:"ghost",onClick:n,children:"Log out"})}/*!
|
|
636
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of this.seen.entries()){const u=d[1];if(t===d[0]){o(d);continue}if(i.external){const h=i.external.registry.get(d[0])?.id;if(t!==d[0]&&h){o(d);continue}}if(this.metadataRegistry.get(d[0])?.id){o(d);continue}if(u.cycle){o(d);continue}if(u.count>1&&i.reused==="ref"){o(d);continue}}const s=(d,u)=>{const m=this.seen.get(d),h=m.def??m.schema,v={...h};if(m.ref===null)return;const g=m.ref;if(m.ref=null,g){s(g,u);const k=this.seen.get(g).schema;k.$ref&&(u.target==="draft-7"||u.target==="draft-4"||u.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(k)):(Object.assign(h,k),Object.assign(h,v))}m.isParent||this.override({zodSchema:d,jsonSchema:h,path:m.path??[]})};for(const d of[...this.seen.entries()].reverse())s(d[0],{target:this.target});const l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){const d=i.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");l.$id=i.external.uri(d)}Object.assign(l,r.def);const c=i.external?.defs??{};for(const d of this.seen.entries()){const u=d[1];u.def&&u.defId&&(c[u.defId]=u.def)}i.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function Ive(e,t){if(e instanceof dL){const i=new GR(t),r={};for(const s of e._idmap.entries()){const[l,c]=s;i.process(c)}const a={},o={registry:e,uri:t?.uri,defs:r};for(const s of e._idmap.entries()){const[l,c]=s;a[l]=i.emit(c,{...t,external:o})}if(Object.keys(r).length>0){const s=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:r}}return{schemas:a}}const n=new GR(t);return n.process(e),n.emit(e,t)}function Co(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Co(r.element,n);case"object":{for(const a in r.shape)if(Co(r.shape[a],n))return!0;return!1}case"union":{for(const a of r.options)if(Co(a,n))return!0;return!1}case"intersection":return Co(r.left,n)||Co(r.right,n);case"tuple":{for(const a of r.items)if(Co(a,n))return!0;return!!(r.rest&&Co(r.rest,n))}case"record":return Co(r.keyType,n)||Co(r.valueType,n);case"map":return Co(r.keyType,n)||Co(r.valueType,n);case"set":return Co(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Co(r.innerType,n);case"lazy":return Co(r.getter(),n);case"default":return Co(r.innerType,n);case"prefault":return Co(r.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Co(r.in,n)||Co(r.out,n);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${r.type}`)}const qot=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Kot=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:age,$ZodArray:dge,$ZodAsyncError:Ap,$ZodBase64:qpe,$ZodBase64URL:Wpe,$ZodBigInt:oL,$ZodBigIntFormat:tge,$ZodBoolean:aL,$ZodCIDRv4:Vpe,$ZodCIDRv6:Gpe,$ZodCUID:Ope,$ZodCUID2:Ppe,$ZodCatch:Bge,$ZodCheck:Ma,$ZodCheckBigIntFormat:dpe,$ZodCheckEndsWith:wpe,$ZodCheckGreaterThan:nL,$ZodCheckIncludes:bpe,$ZodCheckLengthEquals:ppe,$ZodCheckLessThan:tL,$ZodCheckLowerCase:vpe,$ZodCheckMaxLength:mpe,$ZodCheckMaxSize:upe,$ZodCheckMimeType:xpe,$ZodCheckMinLength:hpe,$ZodCheckMinSize:fpe,$ZodCheckMultipleOf:lpe,$ZodCheckNumberFormat:cpe,$ZodCheckOverwrite:Npe,$ZodCheckProperty:Spe,$ZodCheckRegex:gpe,$ZodCheckSizeEquals:Ape,$ZodCheckStartsWith:kpe,$ZodCheckStringFormat:tw,$ZodCheckUpperCase:ype,$ZodCodec:cL,$ZodCustom:Mge,$ZodCustomStringFormat:Jpe,$ZodDate:cge,$ZodDefault:Cge,$ZodDiscriminatedUnion:hge,$ZodE164:Ype,$ZodEmail:Bpe,$ZodEmoji:Tpe,$ZodEncodeError:YE,$ZodEnum:bge,$ZodError:tB,$ZodFile:wge,$ZodFunction:Pge,$ZodGUID:Fpe,$ZodIPv4:Hpe,$ZodIPv6:zpe,$ZodISODate:$pe,$ZodISODateTime:Lpe,$ZodISODuration:Qpe,$ZodISOTime:Upe,$ZodIntersection:pge,$ZodJWT:Zpe,$ZodKSUID:Mpe,$ZodLazy:jge,$ZodLiteral:kge,$ZodMap:vge,$ZodNaN:Dge,$ZodNanoID:Ipe,$ZodNever:sge,$ZodNonOptional:Fge,$ZodNull:rge,$ZodNullable:Nge,$ZodNumber:rL,$ZodNumberFormat:ege,$ZodObject:Age,$ZodObjectJIT:mge,$ZodOptional:xge,$ZodPipe:Tge,$ZodPrefault:_ge,$ZodPromise:Rge,$ZodReadonly:Ige,$ZodRealError:mc,$ZodRecord:gge,$ZodRegistry:dL,$ZodSet:yge,$ZodString:nw,$ZodStringFormat:Lr,$ZodSuccess:Ege,$ZodSymbol:nge,$ZodTemplateLiteral:Oge,$ZodTransform:Sge,$ZodTuple:lL,$ZodType:ri,$ZodULID:Rpe,$ZodURL:Dpe,$ZodUUID:Epe,$ZodUndefined:ige,$ZodUnion:sL,$ZodUnknown:oge,$ZodVoid:lge,$ZodXID:jpe,$brand:ahe,$constructor:st,$input:zge,$output:Hge,Doc:Cpe,JSONSchema:qot,JSONSchemaGenerator:GR,NEVER:rhe,TimePrecision:qge,_any:mve,_array:Cve,_base64:FL,_base64url:EL,_bigint:sve,_boolean:ave,_catch:Uot,_check:Dve,_cidrv4:CL,_cidrv6:_L,_coercedBigint:lve,_coercedBoolean:ove,_coercedDate:yve,_coercedNumber:Jge,_coercedString:Gge,_cuid:yL,_cuid2:bL,_custom:Fve,_date:vve,_decode:VM,_decodeAsync:qM,_default:Mot,_discriminatedUnion:Cot,_e164:BL,_email:fL,_emoji:gL,_encode:zM,_encodeAsync:GM,_endsWith:ML,_enum:Tot,_file:_ve,_float32:tve,_float64:nve,_gt:Bp,_gte:tc,_guid:iF,_includes:RL,_int:eve,_int32:ive,_int64:cve,_intersection:_ot,_ipv4:xL,_ipv6:NL,_isoDate:Wge,_isoDateTime:Kge,_isoDuration:Xge,_isoTime:Yge,_jwt:DL,_ksuid:SL,_lazy:Vot,_length:aB,_literal:Oot,_lowercase:OL,_lt:Ep,_lte:Gd,_map:Bot,_max:Gd,_maxLength:rB,_maxSize:iB,_mime:LL,_min:tc,_minLength:Ly,_minSize:Kk,_multipleOf:qk,_nan:bve,_nanoid:vL,_nativeEnum:Iot,_negative:wve,_never:pve,_nonnegative:xve,_nonoptional:Lot,_nonpositive:Sve,_normalize:$L,_null:Ave,_nullable:jot,_number:Zge,_optional:Rot,_overwrite:ig,_parse:W1,_parseAsync:Y1,_pipe:Qot,_positive:kve,_promise:Got,_property:Nve,_readonly:Hot,_record:Eot,_refine:Eve,_regex:IL,_safeDecode:WM,_safeDecodeAsync:XM,_safeEncode:KM,_safeEncodeAsync:YM,_safeParse:X1,_safeParseAsync:Z1,_set:Dot,_size:TL,_startsWith:jL,_string:Vge,_stringFormat:iw,_stringbool:Tve,_success:$ot,_superRefine:Bve,_symbol:uve,_templateLiteral:zot,_toLowerCase:QL,_toUpperCase:HL,_transform:Pot,_trim:UL,_tuple:Fot,_uint32:rve,_uint64:dve,_ulid:kL,_undefined:fve,_union:Not,_unknown:hve,_uppercase:PL,_url:nB,_uuid:AL,_uuidv4:mL,_uuidv6:hL,_uuidv7:pL,_void:gve,_xid:wL,clone:sd,config:Ws,decode:ort,decodeAsync:lrt,encode:art,encodeAsync:srt,flattenError:QM,formatError:HM,globalConfig:X2,globalRegistry:rp,isValidBase64:iL,isValidBase64URL:Kpe,isValidJWT:Xpe,locales:Qge,parse:eF,parseAsync:tF,prettifyError:Nhe,regexes:eL,registry:uL,safeDecode:drt,safeDecodeAsync:frt,safeEncode:crt,safeEncodeAsync:urt,safeParse:Che,safeParseAsync:_he,toDotPath:xhe,toJSONSchema:Ive,treeifyError:She,util:khe,version:_pe},Symbol.toStringTag,{value:"Module"})),zL=st("ZodISODateTime",(e,t)=>{Lpe.init(e,t),Xr.init(e,t)});function Ove(e){return Kge(zL,e)}const VL=st("ZodISODate",(e,t)=>{$pe.init(e,t),Xr.init(e,t)});function Pve(e){return Wge(VL,e)}const GL=st("ZodISOTime",(e,t)=>{Upe.init(e,t),Xr.init(e,t)});function Rve(e){return Yge(GL,e)}const qL=st("ZodISODuration",(e,t)=>{Qpe.init(e,t),Xr.init(e,t)});function jve(e){return Xge(qL,e)}const Wot=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:VL,ZodISODateTime:zL,ZodISODuration:qL,ZodISOTime:GL,date:Pve,datetime:Ove,duration:jve,time:Rve},Symbol.toStringTag,{value:"Module"})),Mve=(e,t)=>{tB.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>HM(e,n)},flatten:{value:n=>QM(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Z2,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Z2,2)}},isEmpty:{get(){return e.issues.length===0}}})},Yot=st("ZodError",Mve),hc=st("ZodError",Mve,{Parent:Error}),Lve=W1(hc),$ve=Y1(hc),Uve=X1(hc),Qve=Z1(hc),Hve=zM(hc),zve=VM(hc),Vve=GM(hc),Gve=qM(hc),qve=KM(hc),Kve=WM(hc),Wve=YM(hc),Yve=XM(hc),gi=st("ZodType",(e,t)=>(ri.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(IA(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]})),e.clone=(n,i)=>sd(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Lve(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Uve(e,n,i),e.parseAsync=async(n,i)=>$ve(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Qve(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Hve(e,n,i),e.decode=(n,i)=>zve(e,n,i),e.encodeAsync=async(n,i)=>Vve(e,n,i),e.decodeAsync=async(n,i)=>Gve(e,n,i),e.safeEncode=(n,i)=>qve(e,n,i),e.safeDecode=(n,i)=>Kve(e,n,i),e.safeEncodeAsync=async(n,i)=>Wve(e,n,i),e.safeDecodeAsync=async(n,i)=>Yve(e,n,i),e.refine=(n,i)=>e.check(Rye(n,i)),e.superRefine=n=>e.check(jye(n)),e.overwrite=n=>e.check(ig(n)),e.optional=()=>oF(e),e.nullable=()=>sF(e),e.nullish=()=>oF(sF(e)),e.nonoptional=n=>xye(e,n),e.array=()=>gA(e),e.or=n=>g$([e,n]),e.and=n=>cye(e,n),e.transform=n=>lF(e,y$(n)),e.default=n=>kye(e,n),e.prefault=n=>Sye(e,n),e.catch=n=>_ye(e,n),e.pipe=n=>lF(e,n),e.readonly=()=>Bye(e),e.describe=n=>{const i=e.clone();return rp.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return rp.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return rp.get(e);const i=e.clone();return rp.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),KL=st("_ZodString",(e,t)=>{nw.init(e,t),gi.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(IL(...i)),e.includes=(...i)=>e.check(RL(...i)),e.startsWith=(...i)=>e.check(jL(...i)),e.endsWith=(...i)=>e.check(ML(...i)),e.min=(...i)=>e.check(Ly(...i)),e.max=(...i)=>e.check(rB(...i)),e.length=(...i)=>e.check(aB(...i)),e.nonempty=(...i)=>e.check(Ly(1,...i)),e.lowercase=i=>e.check(OL(i)),e.uppercase=i=>e.check(PL(i)),e.trim=()=>e.check(UL()),e.normalize=(...i)=>e.check($L(...i)),e.toLowerCase=()=>e.check(QL()),e.toUpperCase=()=>e.check(HL())}),oB=st("ZodString",(e,t)=>{nw.init(e,t),KL.init(e,t),e.email=n=>e.check(fL(WL,n)),e.url=n=>e.check(nB(sB,n)),e.jwt=n=>e.check(DL(d$,n)),e.emoji=n=>e.check(gL(YL,n)),e.guid=n=>e.check(iF(rF,n)),e.uuid=n=>e.check(AL(pA,n)),e.uuidv4=n=>e.check(mL(pA,n)),e.uuidv6=n=>e.check(hL(pA,n)),e.uuidv7=n=>e.check(pL(pA,n)),e.nanoid=n=>e.check(vL(XL,n)),e.guid=n=>e.check(iF(rF,n)),e.cuid=n=>e.check(yL(ZL,n)),e.cuid2=n=>e.check(bL(JL,n)),e.ulid=n=>e.check(kL(e$,n)),e.base64=n=>e.check(FL(s$,n)),e.base64url=n=>e.check(EL(l$,n)),e.xid=n=>e.check(wL(t$,n)),e.ksuid=n=>e.check(SL(n$,n)),e.ipv4=n=>e.check(xL(i$,n)),e.ipv6=n=>e.check(NL(r$,n)),e.cidrv4=n=>e.check(CL(a$,n)),e.cidrv6=n=>e.check(_L(o$,n)),e.e164=n=>e.check(BL(c$,n)),e.datetime=n=>e.check(Ove(n)),e.date=n=>e.check(Pve(n)),e.time=n=>e.check(Rve(n)),e.duration=n=>e.check(jve(n))});function _o(e){return Vge(oB,e)}const Xr=st("ZodStringFormat",(e,t)=>{Lr.init(e,t),KL.init(e,t)}),WL=st("ZodEmail",(e,t)=>{Bpe.init(e,t),Xr.init(e,t)});function Xot(e){return fL(WL,e)}const rF=st("ZodGUID",(e,t)=>{Fpe.init(e,t),Xr.init(e,t)});function Zot(e){return iF(rF,e)}const pA=st("ZodUUID",(e,t)=>{Epe.init(e,t),Xr.init(e,t)});function Jot(e){return AL(pA,e)}function est(e){return mL(pA,e)}function tst(e){return hL(pA,e)}function nst(e){return pL(pA,e)}const sB=st("ZodURL",(e,t)=>{Dpe.init(e,t),Xr.init(e,t)});function ist(e){return nB(sB,e)}function rst(e){return nB(sB,{protocol:/^https?$/,hostname:zhe,...Rt(e)})}const YL=st("ZodEmoji",(e,t)=>{Tpe.init(e,t),Xr.init(e,t)});function ast(e){return gL(YL,e)}const XL=st("ZodNanoID",(e,t)=>{Ipe.init(e,t),Xr.init(e,t)});function ost(e){return vL(XL,e)}const ZL=st("ZodCUID",(e,t)=>{Ope.init(e,t),Xr.init(e,t)});function sst(e){return yL(ZL,e)}const JL=st("ZodCUID2",(e,t)=>{Ppe.init(e,t),Xr.init(e,t)});function lst(e){return bL(JL,e)}const e$=st("ZodULID",(e,t)=>{Rpe.init(e,t),Xr.init(e,t)});function cst(e){return kL(e$,e)}const t$=st("ZodXID",(e,t)=>{jpe.init(e,t),Xr.init(e,t)});function dst(e){return wL(t$,e)}const n$=st("ZodKSUID",(e,t)=>{Mpe.init(e,t),Xr.init(e,t)});function ust(e){return SL(n$,e)}const i$=st("ZodIPv4",(e,t)=>{Hpe.init(e,t),Xr.init(e,t)});function fst(e){return xL(i$,e)}const r$=st("ZodIPv6",(e,t)=>{zpe.init(e,t),Xr.init(e,t)});function Ast(e){return NL(r$,e)}const a$=st("ZodCIDRv4",(e,t)=>{Vpe.init(e,t),Xr.init(e,t)});function mst(e){return CL(a$,e)}const o$=st("ZodCIDRv6",(e,t)=>{Gpe.init(e,t),Xr.init(e,t)});function hst(e){return _L(o$,e)}const s$=st("ZodBase64",(e,t)=>{qpe.init(e,t),Xr.init(e,t)});function pst(e){return FL(s$,e)}const l$=st("ZodBase64URL",(e,t)=>{Wpe.init(e,t),Xr.init(e,t)});function gst(e){return EL(l$,e)}const c$=st("ZodE164",(e,t)=>{Ype.init(e,t),Xr.init(e,t)});function vst(e){return BL(c$,e)}const d$=st("ZodJWT",(e,t)=>{Zpe.init(e,t),Xr.init(e,t)});function yst(e){return DL(d$,e)}const rw=st("ZodCustomStringFormat",(e,t)=>{Jpe.init(e,t),Xr.init(e,t)});function bst(e,t,n={}){return iw(rw,e,t,n)}function kst(e){return iw(rw,"hostname",JM,e)}function wst(e){return iw(rw,"hex",ope,e)}function Sst(e,t){const n=t?.enc??"hex",i=`${e}_${n}`,r=eL[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return iw(rw,i,r,t)}const lB=st("ZodNumber",(e,t)=>{rL.init(e,t),gi.init(e,t),e.gt=(i,r)=>e.check(Bp(i,r)),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.lt=(i,r)=>e.check(Ep(i,r)),e.lte=(i,r)=>e.check(Gd(i,r)),e.max=(i,r)=>e.check(Gd(i,r)),e.int=i=>e.check(aF(i)),e.safe=i=>e.check(aF(i)),e.positive=i=>e.check(Bp(0,i)),e.nonnegative=i=>e.check(tc(0,i)),e.negative=i=>e.check(Ep(0,i)),e.nonpositive=i=>e.check(Gd(0,i)),e.multipleOf=(i,r)=>e.check(qk(i,r)),e.step=(i,r)=>e.check(qk(i,r)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Xve(e){return Zge(lB,e)}const y0=st("ZodNumberFormat",(e,t)=>{ege.init(e,t),lB.init(e,t)});function aF(e){return eve(y0,e)}function xst(e){return tve(y0,e)}function Nst(e){return nve(y0,e)}function Cst(e){return ive(y0,e)}function _st(e){return rve(y0,e)}const cB=st("ZodBoolean",(e,t)=>{aL.init(e,t),gi.init(e,t)});function u$(e){return ave(cB,e)}const dB=st("ZodBigInt",(e,t)=>{oL.init(e,t),gi.init(e,t),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.gt=(i,r)=>e.check(Bp(i,r)),e.gte=(i,r)=>e.check(tc(i,r)),e.min=(i,r)=>e.check(tc(i,r)),e.lt=(i,r)=>e.check(Ep(i,r)),e.lte=(i,r)=>e.check(Gd(i,r)),e.max=(i,r)=>e.check(Gd(i,r)),e.positive=i=>e.check(Bp(BigInt(0),i)),e.negative=i=>e.check(Ep(BigInt(0),i)),e.nonpositive=i=>e.check(Gd(BigInt(0),i)),e.nonnegative=i=>e.check(tc(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(qk(i,r));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Fst(e){return sve(dB,e)}const f$=st("ZodBigIntFormat",(e,t)=>{tge.init(e,t),dB.init(e,t)});function Est(e){return cve(f$,e)}function Bst(e){return dve(f$,e)}const Zve=st("ZodSymbol",(e,t)=>{nge.init(e,t),gi.init(e,t)});function Dst(e){return uve(Zve,e)}const Jve=st("ZodUndefined",(e,t)=>{ige.init(e,t),gi.init(e,t)});function Tst(e){return fve(Jve,e)}const eye=st("ZodNull",(e,t)=>{rge.init(e,t),gi.init(e,t)});function tye(e){return Ave(eye,e)}const nye=st("ZodAny",(e,t)=>{age.init(e,t),gi.init(e,t)});function Ist(){return mve(nye)}const iye=st("ZodUnknown",(e,t)=>{oge.init(e,t),gi.init(e,t)});function $y(){return hve(iye)}const rye=st("ZodNever",(e,t)=>{sge.init(e,t),gi.init(e,t)});function A$(e){return pve(rye,e)}const aye=st("ZodVoid",(e,t)=>{lge.init(e,t),gi.init(e,t)});function Ost(e){return gve(aye,e)}const m$=st("ZodDate",(e,t)=>{cge.init(e,t),gi.init(e,t),e.min=(i,r)=>e.check(tc(i,r)),e.max=(i,r)=>e.check(Gd(i,r));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Pst(e){return vve(m$,e)}const oye=st("ZodArray",(e,t)=>{dge.init(e,t),gi.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(Ly(n,i)),e.nonempty=n=>e.check(Ly(1,n)),e.max=(n,i)=>e.check(rB(n,i)),e.length=(n,i)=>e.check(aB(n,i)),e.unwrap=()=>e.element});function gA(e,t){return Cve(oye,e,t)}function Rst(e){const t=e._zod.def.shape;return fB(Object.keys(t))}const uB=st("ZodObject",(e,t)=>{mge.init(e,t),gi.init(e,t),Fi(e,"shape",()=>t.shape),e.keyof=()=>fB(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:$y()}),e.loose=()=>e.clone({...e._zod.def,catchall:$y()}),e.strict=()=>e.clone({...e._zod.def,catchall:A$()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>mhe(e,n),e.safeExtend=n=>hhe(e,n),e.merge=n=>phe(e,n),e.pick=n=>fhe(e,n),e.omit=n=>Ahe(e,n),e.partial=(...n)=>ghe(b$,e,n[0]),e.required=(...n)=>vhe(k$,e,n[0])});function h$(e,t){const n={type:"object",shape:e??{},...Rt(t)};return new uB(n)}function jst(e,t){return new uB({type:"object",shape:e,catchall:A$(),...Rt(t)})}function Mst(e,t){return new uB({type:"object",shape:e,catchall:$y(),...Rt(t)})}const p$=st("ZodUnion",(e,t)=>{sL.init(e,t),gi.init(e,t),e.options=t.options});function g$(e,t){return new p$({type:"union",options:e,...Rt(t)})}const sye=st("ZodDiscriminatedUnion",(e,t)=>{p$.init(e,t),hge.init(e,t)});function Lst(e,t,n){return new sye({type:"union",options:t,discriminator:e,...Rt(n)})}const lye=st("ZodIntersection",(e,t)=>{pge.init(e,t),gi.init(e,t)});function cye(e,t){return new lye({type:"intersection",left:e,right:t})}const dye=st("ZodTuple",(e,t)=>{lL.init(e,t),gi.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function uye(e,t,n){const i=t instanceof ri,r=i?n:t,a=i?t:null;return new dye({type:"tuple",items:e,rest:a,...Rt(r)})}const v$=st("ZodRecord",(e,t)=>{gge.init(e,t),gi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function fye(e,t,n){return new v$({type:"record",keyType:e,valueType:t,...Rt(n)})}function $st(e,t,n){const i=sd(e);return i._zod.values=void 0,new v$({type:"record",keyType:i,valueType:t,...Rt(n)})}const Aye=st("ZodMap",(e,t)=>{vge.init(e,t),gi.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ust(e,t,n){return new Aye({type:"map",keyType:e,valueType:t,...Rt(n)})}const mye=st("ZodSet",(e,t)=>{yge.init(e,t),gi.init(e,t),e.min=(...n)=>e.check(Kk(...n)),e.nonempty=n=>e.check(Kk(1,n)),e.max=(...n)=>e.check(iB(...n)),e.size=(...n)=>e.check(TL(...n))});function Qst(e,t){return new mye({type:"set",valueType:e,...Rt(t)})}const Wk=st("ZodEnum",(e,t)=>{bge.init(e,t),gi.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{const a={};for(const o of i)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Wk({...t,checks:[],...Rt(r),entries:a})},e.exclude=(i,r)=>{const a={...t.entries};for(const o of i)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Wk({...t,checks:[],...Rt(r),entries:a})}});function fB(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Wk({type:"enum",entries:n,...Rt(t)})}function Hst(e,t){return new Wk({type:"enum",entries:e,...Rt(t)})}const hye=st("ZodLiteral",(e,t)=>{kge.init(e,t),gi.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function pye(e,t){return new hye({type:"literal",values:Array.isArray(e)?e:[e],...Rt(t)})}const gye=st("ZodFile",(e,t)=>{wge.init(e,t),gi.init(e,t),e.min=(n,i)=>e.check(Kk(n,i)),e.max=(n,i)=>e.check(iB(n,i)),e.mime=(n,i)=>e.check(LL(Array.isArray(n)?n:[n],i))});function zst(e){return _ve(gye,e)}const vye=st("ZodTransform",(e,t)=>{Sge.init(e,t),gi.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new YE(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(jy(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(jy(o))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(a=>(n.value=a,n)):(n.value=r,n)}});function y$(e){return new vye({type:"transform",transform:e})}const b$=st("ZodOptional",(e,t)=>{xge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function oF(e){return new b$({type:"optional",innerType:e})}const yye=st("ZodNullable",(e,t)=>{Nge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function sF(e){return new yye({type:"nullable",innerType:e})}function Vst(e){return oF(sF(e))}const bye=st("ZodDefault",(e,t)=>{Cge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kye(e,t){return new bye({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ZE(t)}})}const wye=st("ZodPrefault",(e,t)=>{_ge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sye(e,t){return new wye({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ZE(t)}})}const k$=st("ZodNonOptional",(e,t)=>{Fge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xye(e,t){return new k$({type:"nonoptional",innerType:e,...Rt(t)})}const Nye=st("ZodSuccess",(e,t)=>{Ege.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Gst(e){return new Nye({type:"success",innerType:e})}const Cye=st("ZodCatch",(e,t)=>{Bge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _ye(e,t){return new Cye({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Fye=st("ZodNaN",(e,t)=>{Dge.init(e,t),gi.init(e,t)});function qst(e){return bve(Fye,e)}const w$=st("ZodPipe",(e,t)=>{Tge.init(e,t),gi.init(e,t),e.in=t.in,e.out=t.out});function lF(e,t){return new w$({type:"pipe",in:e,out:t})}const S$=st("ZodCodec",(e,t)=>{w$.init(e,t),cL.init(e,t)});function Kst(e,t,n){return new S$({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Eye=st("ZodReadonly",(e,t)=>{Ige.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Bye(e){return new Eye({type:"readonly",innerType:e})}const Dye=st("ZodTemplateLiteral",(e,t)=>{Oge.init(e,t),gi.init(e,t)});function Wst(e,t){return new Dye({type:"template_literal",parts:e,...Rt(t)})}const Tye=st("ZodLazy",(e,t)=>{jge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Iye(e){return new Tye({type:"lazy",getter:e})}const Oye=st("ZodPromise",(e,t)=>{Rge.init(e,t),gi.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Yst(e){return new Oye({type:"promise",innerType:e})}const Pye=st("ZodFunction",(e,t)=>{Pge.init(e,t),gi.init(e,t)});function QX(e){return new Pye({type:"function",input:Array.isArray(e?.input)?uye(e?.input):e?.input??gA($y()),output:e?.output??$y()})}const AB=st("ZodCustom",(e,t)=>{Mge.init(e,t),gi.init(e,t)});function Xst(e){const t=new Ma({check:"custom"});return t._zod.check=e,t}function Zst(e,t){return Fve(AB,e??(()=>!0),t)}function Rye(e,t={}){return Eve(AB,e,t)}function jye(e){return Bve(e)}function Mye(e,t={error:`Input not instance of ${e.name}`}){const n=new AB({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Rt(t)});return n._zod.bag.Class=e,n}const Jst=(...e)=>Tve({Codec:S$,Boolean:cB,String:oB},...e);function elt(e){const t=Iye(()=>g$([_o(e),Xve(),u$(),tye(),gA(t),fye(_o(),t)]));return t}function tlt(e,t){return lF(y$(e),t)}const qR={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function nlt(e){Ws({customError:e})}function ilt(){return Ws().customError}var KR;KR||(KR={});function rlt(e){return Gge(oB,e)}function alt(e){return Jge(lB,e)}function olt(e){return ove(cB,e)}function slt(e){return lve(dB,e)}function llt(e){return yve(m$,e)}const clt=Object.freeze(Object.defineProperty({__proto__:null,bigint:slt,boolean:olt,date:llt,number:alt,string:rlt},Symbol.toStringTag,{value:"Module"}));Ws(Lge());const jd=Object.freeze(Object.defineProperty({__proto__:null,$brand:ahe,$input:zge,$output:Hge,NEVER:rhe,TimePrecision:qge,ZodAny:nye,ZodArray:oye,ZodBase64:s$,ZodBase64URL:l$,ZodBigInt:dB,ZodBigIntFormat:f$,ZodBoolean:cB,ZodCIDRv4:a$,ZodCIDRv6:o$,ZodCUID:ZL,ZodCUID2:JL,ZodCatch:Cye,ZodCodec:S$,ZodCustom:AB,ZodCustomStringFormat:rw,ZodDate:m$,ZodDefault:bye,ZodDiscriminatedUnion:sye,ZodE164:c$,ZodEmail:WL,ZodEmoji:YL,ZodEnum:Wk,ZodError:Yot,ZodFile:gye,get ZodFirstPartyTypeKind(){return KR},ZodFunction:Pye,ZodGUID:rF,ZodIPv4:i$,ZodIPv6:r$,ZodISODate:VL,ZodISODateTime:zL,ZodISODuration:qL,ZodISOTime:GL,ZodIntersection:lye,ZodIssueCode:qR,ZodJWT:d$,ZodKSUID:n$,ZodLazy:Tye,ZodLiteral:hye,ZodMap:Aye,ZodNaN:Fye,ZodNanoID:XL,ZodNever:rye,ZodNonOptional:k$,ZodNull:eye,ZodNullable:yye,ZodNumber:lB,ZodNumberFormat:y0,ZodObject:uB,ZodOptional:b$,ZodPipe:w$,ZodPrefault:wye,ZodPromise:Oye,ZodReadonly:Eye,ZodRealError:hc,ZodRecord:v$,ZodSet:mye,ZodString:oB,ZodStringFormat:Xr,ZodSuccess:Nye,ZodSymbol:Zve,ZodTemplateLiteral:Dye,ZodTransform:vye,ZodTuple:dye,ZodType:gi,ZodULID:e$,ZodURL:sB,ZodUUID:pA,ZodUndefined:Jve,ZodUnion:p$,ZodUnknown:iye,ZodVoid:aye,ZodXID:t$,_ZodString:KL,_default:kye,_function:QX,any:Ist,array:gA,base64:pst,base64url:gst,bigint:Fst,boolean:u$,catch:_ye,check:Xst,cidrv4:mst,cidrv6:hst,clone:sd,codec:Kst,coerce:clt,config:Ws,core:Kot,cuid:sst,cuid2:lst,custom:Zst,date:Pst,decode:zve,decodeAsync:Gve,discriminatedUnion:Lst,e164:vst,email:Xot,emoji:ast,encode:Hve,encodeAsync:Vve,endsWith:ML,enum:fB,file:zst,flattenError:QM,float32:xst,float64:Nst,formatError:HM,function:QX,getErrorMap:ilt,globalRegistry:rp,gt:Bp,gte:tc,guid:Zot,hash:Sst,hex:wst,hostname:kst,httpUrl:rst,includes:RL,instanceof:Mye,int:aF,int32:Cst,int64:Est,intersection:cye,ipv4:fst,ipv6:Ast,iso:Wot,json:elt,jwt:yst,keyof:Rst,ksuid:ust,lazy:Iye,length:aB,literal:pye,locales:Qge,looseObject:Mst,lowercase:OL,lt:Ep,lte:Gd,map:Ust,maxLength:rB,maxSize:iB,mime:LL,minLength:Ly,minSize:Kk,multipleOf:qk,nan:qst,nanoid:ost,nativeEnum:Hst,negative:wve,never:A$,nonnegative:xve,nonoptional:xye,nonpositive:Sve,normalize:$L,null:tye,nullable:sF,nullish:Vst,number:Xve,object:h$,optional:oF,overwrite:ig,parse:Lve,parseAsync:$ve,partialRecord:$st,pipe:lF,positive:kve,prefault:Sye,preprocess:tlt,prettifyError:Nhe,promise:Yst,property:Nve,readonly:Bye,record:fye,refine:Rye,regex:IL,regexes:eL,registry:uL,safeDecode:Kve,safeDecodeAsync:Yve,safeEncode:qve,safeEncodeAsync:Wve,safeParse:Uve,safeParseAsync:Qve,set:Qst,setErrorMap:nlt,size:TL,startsWith:jL,strictObject:jst,string:_o,stringFormat:bst,stringbool:Jst,success:Gst,superRefine:jye,symbol:Dst,templateLiteral:Wst,toJSONSchema:Ive,toLowerCase:QL,toUpperCase:HL,transform:y$,treeifyError:She,trim:UL,tuple:uye,uint32:_st,uint64:Bst,ulid:cst,undefined:Tst,union:g$,unknown:$y,uppercase:PL,url:ist,util:khe,uuid:Jot,uuidv4:est,uuidv6:tst,uuidv7:nst,void:Ost,xid:dst},Symbol.toStringTag,{value:"Module"})),yf=CXe,Lye=V.createContext({}),Rn=({...e})=>A.jsx(Lye.Provider,{value:{name:e.name},children:A.jsx(_i,{...e})}),mB=()=>{const e=V.useContext(Lye),t=V.useContext($ye),{getFieldState:n}=H1(),i=iAe({name:e.name}),r=n(e.name,i);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},$ye=V.createContext({});function jn({className:e,...t}){const n=V.useId();return A.jsx($ye.Provider,{value:{id:n},children:A.jsx("div",{"data-slot":"form-item",className:Ft("grid gap-2",e),...t})})}function ii({className:e,...t}){const{error:n,formItemId:i}=mB();return A.jsx(xn,{"data-slot":"form-label","data-error":!!n,className:Ft("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",e),htmlFor:i,...t})}function Yn({...e}){const{error:t,formItemId:n,formDescriptionId:i,formMessageId:r}=mB();return A.jsx(E6,{"data-slot":"form-control",id:n,"aria-describedby":t?`${i} ${r}`:String(i),"aria-invalid":!!t,...e})}function eTt({className:e,...t}){const{formDescriptionId:n}=mB();return A.jsx("p",{"data-slot":"form-description",id:n,className:Ft("text-gray-500 text-sm dark:text-gray-400",e),...t})}function Xn({className:e,...t}){const{error:n,formMessageId:i}=mB(),r=n?String(n?.message??""):t.children;return r?A.jsx("p",{"data-slot":"form-message",id:i,className:Ft("text-red-500 text-sm dark:text-red-900",e),...t,children:r}):null}function x$(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var dlt=[" ","Enter","ArrowUp","ArrowDown"],ult=[" ","Enter"],Dp="Select",[hB,pB,flt]=lj(Dp),[b0]=Bs(Dp,[flt,rh]),gB=rh(),[Alt,oh]=b0(Dp),[mlt,hlt]=b0(Dp),Uye=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:r,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:m,required:h,form:v}=e,g=gB(t),[k,b]=S.useState(null),[w,C]=S.useState(null),[N,_]=S.useState(!1),F=S1(c),[B,T]=Kd({prop:i,defaultProp:r??!1,onChange:a,caller:Dp}),[I,$]=Kd({prop:o,defaultProp:s,onChange:l,caller:Dp}),j=S.useRef(null),P=k?v||!!k.closest("form"):!0,[K,q]=S.useState(new Set),re=Array.from(K).map(U=>U.props.value).join(";");return A.jsx(AE,{...g,children:A.jsxs(Alt,{required:h,scope:t,trigger:k,onTriggerChange:b,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:N,onValueNodeHasChildrenChange:_,contentId:Bo(),value:I,onValueChange:$,open:B,onOpenChange:T,dir:F,triggerPointerDownPosRef:j,disabled:m,children:[A.jsx(hB.Provider,{scope:t,children:A.jsx(mlt,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(U=>{q(te=>new Set(te).add(U))},[]),onNativeOptionRemove:S.useCallback(U=>{q(te=>{const W=new Set(te);return W.delete(U),W})},[]),children:n})}),P?A.jsxs(c0e,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:u,value:I,onChange:U=>$(U.target.value),disabled:m,form:v,children:[I===void 0?A.jsx("option",{value:""}):null,Array.from(K)]},re):null]})})};Uye.displayName=Dp;var Qye="SelectTrigger",Hye=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...r}=e,a=gB(n),o=oh(Qye,n),s=o.disabled||i,l=ui(t,o.onTriggerChange),c=pB(n),d=S.useRef("touch"),[u,m,h]=u0e(g=>{const k=c().filter(C=>!C.disabled),b=k.find(C=>C.value===o.value),w=f0e(k,g,b);w!==void 0&&o.onValueChange(w.value)}),v=g=>{s||(o.onOpenChange(!0),h()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return A.jsx(N1,{asChild:!0,...a,children:A.jsx(sn.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":d0e(o.value)?"":void 0,...r,ref:l,onClick:Kt(r.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&v(g)}),onPointerDown:Kt(r.onPointerDown,g=>{d.current=g.pointerType;const k=g.target;k.hasPointerCapture(g.pointerId)&&k.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:Kt(r.onKeyDown,g=>{const k=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(k&&g.key===" ")&&dlt.includes(g.key)&&(v(),g.preventDefault())})})})});Hye.displayName=Qye;var zye="SelectValue",Vye=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:r,children:a,placeholder:o="",...s}=e,l=oh(zye,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,u=ui(t,l.onValueNodeChange);return Ya(()=>{c(d)},[c,d]),A.jsx(sn.span,{...s,ref:u,style:{pointerEvents:"none"},children:d0e(l.value)?A.jsx(A.Fragment,{children:o}):a})});Vye.displayName=zye;var plt="SelectIcon",Gye=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...r}=e;return A.jsx(sn.span,{"aria-hidden":!0,...r,ref:t,children:i||"▼"})});Gye.displayName=plt;var glt="SelectPortal",qye=e=>A.jsx(Yy,{asChild:!0,...e});qye.displayName=glt;var Tp="SelectContent",Kye=S.forwardRef((e,t)=>{const n=oh(Tp,e.__scopeSelect),[i,r]=S.useState();if(Ya(()=>{r(new DocumentFragment)},[]),!n.open){const a=i;return a?ff.createPortal(A.jsx(Wye,{scope:e.__scopeSelect,children:A.jsx(hB.Slot,{scope:e.__scopeSelect,children:A.jsx("div",{children:e.children})})}),a):null}return A.jsx(Yye,{...e,ref:t})});Kye.displayName=Tp;var Rd=10,[Wye,sh]=b0(Tp),vlt="SelectContentImpl",ylt=Vm("SelectContent.RemoveScroll"),Yye=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:k,...b}=e,w=oh(Tp,n),[C,N]=S.useState(null),[_,F]=S.useState(null),B=ui(t,Y=>N(Y)),[T,I]=S.useState(null),[$,j]=S.useState(null),P=pB(n),[K,q]=S.useState(!1),re=S.useRef(!1);S.useEffect(()=>{if(C)return tE(C)},[C]),JF();const U=S.useCallback(Y=>{const[ue,...me]=P().map(ie=>ie.ref.current),[ye]=me.slice(-1),ae=document.activeElement;for(const ie of Y)if(ie===ae||(ie?.scrollIntoView({block:"nearest"}),ie===ue&&_&&(_.scrollTop=0),ie===ye&&_&&(_.scrollTop=_.scrollHeight),ie?.focus(),document.activeElement!==ae))return},[P,_]),te=S.useCallback(()=>U([T,C]),[U,T,C]);S.useEffect(()=>{K&&te()},[K,te]);const{onOpenChange:W,triggerPointerDownPosRef:le}=w;S.useEffect(()=>{if(C){let Y={x:0,y:0};const ue=ye=>{Y={x:Math.abs(Math.round(ye.pageX)-(le.current?.x??0)),y:Math.abs(Math.round(ye.pageY)-(le.current?.y??0))}},me=ye=>{Y.x<=10&&Y.y<=10?ye.preventDefault():C.contains(ye.target)||W(!1),document.removeEventListener("pointermove",ue),le.current=null};return le.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",me,{capture:!0})}}},[C,W,le]),S.useEffect(()=>{const Y=()=>W(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[W]);const[be,oe]=u0e(Y=>{const ue=P().filter(ae=>!ae.disabled),me=ue.find(ae=>ae.ref.current===document.activeElement),ye=f0e(ue,Y,me);ye&&setTimeout(()=>ye.ref.current.focus())}),M=S.useCallback((Y,ue,me)=>{const ye=!re.current&&!me;(w.value!==void 0&&w.value===ue||ye)&&(I(Y),ye&&(re.current=!0))},[w.value]),Q=S.useCallback(()=>C?.focus(),[C]),L=S.useCallback((Y,ue,me)=>{const ye=!re.current&&!me;(w.value!==void 0&&w.value===ue||ye)&&j(Y)},[w.value]),J=i==="popper"?WR:Xye,ee=J===WR?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:k}:{};return A.jsx(Wye,{scope:n,content:C,viewport:_,onViewportChange:F,itemRefCallback:M,selectedItem:T,onItemLeave:Q,itemTextRefCallback:L,focusSelectedItem:te,selectedItemText:$,position:i,isPositioned:K,searchRef:be,children:A.jsx(Jy,{as:ylt,allowPinchZoom:!0,children:A.jsx(k1,{asChild:!0,trapped:w.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:Kt(r,Y=>{w.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:A.jsx(Wy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:A.jsx(J,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Y=>Y.preventDefault(),...b,...ee,onPlaced:()=>q(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Kt(b.onKeyDown,Y=>{const ue=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!ue&&Y.key.length===1&&oe(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ye=P().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const ae=Y.target,ie=ye.indexOf(ae);ye=ye.slice(ie+1)}setTimeout(()=>U(ye)),Y.preventDefault()}})})})})})})});Yye.displayName=vlt;var blt="SelectItemAlignedPosition",Xye=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...r}=e,a=oh(Tp,n),o=sh(Tp,n),[s,l]=S.useState(null),[c,d]=S.useState(null),u=ui(t,B=>d(B)),m=pB(n),h=S.useRef(!1),v=S.useRef(!0),{viewport:g,selectedItem:k,selectedItemText:b,focusSelectedItem:w}=o,C=S.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&g&&k&&b){const B=a.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),$=b.getBoundingClientRect();if(a.dir!=="rtl"){const ae=$.left-T.left,ie=I.left-ae,_e=B.left-ie,we=B.width+_e,ke=Math.max(we,T.width),he=window.innerWidth-Rd,H=fR(ie,[Rd,Math.max(Rd,he-ke)]);s.style.minWidth=we+"px",s.style.left=H+"px"}else{const ae=T.right-$.right,ie=window.innerWidth-I.right-ae,_e=window.innerWidth-B.right-ie,we=B.width+_e,ke=Math.max(we,T.width),he=window.innerWidth-Rd,H=fR(ie,[Rd,Math.max(Rd,he-ke)]);s.style.minWidth=we+"px",s.style.right=H+"px"}const j=m(),P=window.innerHeight-Rd*2,K=g.scrollHeight,q=window.getComputedStyle(c),re=parseInt(q.borderTopWidth,10),U=parseInt(q.paddingTop,10),te=parseInt(q.borderBottomWidth,10),W=parseInt(q.paddingBottom,10),le=re+U+K+W+te,be=Math.min(k.offsetHeight*5,le),oe=window.getComputedStyle(g),M=parseInt(oe.paddingTop,10),Q=parseInt(oe.paddingBottom,10),L=B.top+B.height/2-Rd,J=P-L,ee=k.offsetHeight/2,Y=k.offsetTop+ee,ue=re+U+Y,me=le-ue;if(ue<=L){const ae=j.length>0&&k===j[j.length-1].ref.current;s.style.bottom="0px";const ie=c.clientHeight-g.offsetTop-g.offsetHeight,_e=Math.max(J,ee+(ae?Q:0)+ie+te),we=ue+_e;s.style.height=we+"px"}else{const ae=j.length>0&&k===j[0].ref.current;s.style.top="0px";const _e=Math.max(L,re+g.offsetTop+(ae?M:0)+ee)+me;s.style.height=_e+"px",g.scrollTop=ue-L+g.offsetTop}s.style.margin=`${Rd}px 0`,s.style.minHeight=be+"px",s.style.maxHeight=P+"px",i?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,s,c,g,k,b,a.dir,i]);Ya(()=>C(),[C]);const[N,_]=S.useState();Ya(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const F=S.useCallback(B=>{B&&v.current===!0&&(C(),w?.(),v.current=!1)},[C,w]);return A.jsx(wlt,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:F,children:A.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:A.jsx(sn.div,{...r,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Xye.displayName=blt;var klt="SelectPopperPosition",WR=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:r=Rd,...a}=e,o=gB(n);return A.jsx(mE,{...o,...a,ref:t,align:i,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});WR.displayName=klt;var[wlt,N$]=b0(Tp,{}),YR="SelectViewport",Zye=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...r}=e,a=sh(YR,n),o=N$(YR,n),s=ui(t,a.onViewportChange),l=S.useRef(0);return A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),A.jsx(hB.Slot,{scope:n,children:A.jsx(sn.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Kt(r.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=o;if(m?.current&&u){const h=Math.abs(l.current-d.scrollTop);if(h>0){const v=window.innerHeight-Rd*2,g=parseFloat(u.style.minHeight),k=parseFloat(u.style.height),b=Math.max(g,k);if(b<v){const w=b+h,C=Math.min(v,w),N=w-C;u.style.height=C+"px",u.style.bottom==="0px"&&(d.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Zye.displayName=YR;var Jye="SelectGroup",[Slt,xlt]=b0(Jye),Nlt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=Bo();return A.jsx(Slt,{scope:n,id:r,children:A.jsx(sn.div,{role:"group","aria-labelledby":r,...i,ref:t})})});Nlt.displayName=Jye;var e0e="SelectLabel",Clt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=xlt(e0e,n);return A.jsx(sn.div,{id:r.id,...i,ref:t})});Clt.displayName=e0e;var cF="SelectItem",[_lt,t0e]=b0(cF),n0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:r=!1,textValue:a,...o}=e,s=oh(cF,n),l=sh(cF,n),c=s.value===i,[d,u]=S.useState(a??""),[m,h]=S.useState(!1),v=ui(t,w=>l.itemRefCallback?.(w,i,r)),g=Bo(),k=S.useRef("touch"),b=()=>{r||(s.onValueChange(i),s.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return A.jsx(_lt,{scope:n,value:i,disabled:r,textId:g,isSelected:c,onItemTextChange:S.useCallback(w=>{u(C=>C||(w?.textContent??"").trim())},[]),children:A.jsx(hB.ItemSlot,{scope:n,value:i,disabled:r,textValue:d,children:A.jsx(sn.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:v,onFocus:Kt(o.onFocus,()=>h(!0)),onBlur:Kt(o.onBlur,()=>h(!1)),onClick:Kt(o.onClick,()=>{k.current!=="mouse"&&b()}),onPointerUp:Kt(o.onPointerUp,()=>{k.current==="mouse"&&b()}),onPointerDown:Kt(o.onPointerDown,w=>{k.current=w.pointerType}),onPointerMove:Kt(o.onPointerMove,w=>{k.current=w.pointerType,r?l.onItemLeave?.():k.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Kt(o.onPointerLeave,w=>{w.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:Kt(o.onKeyDown,w=>{l.searchRef?.current!==""&&w.key===" "||(ult.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});n0e.displayName=cF;var Jb="SelectItemText",i0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:r,...a}=e,o=oh(Jb,n),s=sh(Jb,n),l=t0e(Jb,n),c=hlt(Jb,n),[d,u]=S.useState(null),m=ui(t,b=>u(b),l.onItemTextChange,b=>s.itemTextRefCallback?.(b,l.value,l.disabled)),h=d?.textContent,v=S.useMemo(()=>A.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:k}=c;return Ya(()=>(g(v),()=>k(v)),[g,k,v]),A.jsxs(A.Fragment,{children:[A.jsx(sn.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ff.createPortal(a.children,o.valueNode):null]})});i0e.displayName=Jb;var r0e="SelectItemIndicator",a0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return t0e(r0e,n).isSelected?A.jsx(sn.span,{"aria-hidden":!0,...i,ref:t}):null});a0e.displayName=r0e;var XR="SelectScrollUpButton",o0e=S.forwardRef((e,t)=>{const n=sh(XR,e.__scopeSelect),i=N$(XR,e.__scopeSelect),[r,a]=S.useState(!1),o=ui(t,i.onScrollButtonChange);return Ya(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?A.jsx(l0e,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});o0e.displayName=XR;var ZR="SelectScrollDownButton",s0e=S.forwardRef((e,t)=>{const n=sh(ZR,e.__scopeSelect),i=N$(ZR,e.__scopeSelect),[r,a]=S.useState(!1),o=ui(t,i.onScrollButtonChange);return Ya(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),r?A.jsx(l0e,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});s0e.displayName=ZR;var l0e=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...r}=e,a=sh("SelectScrollButton",n),o=S.useRef(null),s=pB(n),l=S.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return S.useEffect(()=>()=>l(),[l]),Ya(()=>{s().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),A.jsx(sn.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:Kt(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(i,50))}),onPointerMove:Kt(r.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(i,50))}),onPointerLeave:Kt(r.onPointerLeave,()=>{l()})})}),Flt="SelectSeparator",Elt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return A.jsx(sn.div,{"aria-hidden":!0,...i,ref:t})});Elt.displayName=Flt;var JR="SelectArrow",Blt=S.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,r=gB(n),a=oh(JR,n),o=sh(JR,n);return a.open&&o.position==="popper"?A.jsx(hE,{...r,...i,ref:t}):null});Blt.displayName=JR;var Dlt="SelectBubbleInput",c0e=S.forwardRef(({__scopeSelect:e,value:t,...n},i)=>{const r=S.useRef(null),a=ui(i,r),o=x$(t);return S.useEffect(()=>{const s=r.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const u=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(u)}},[o,t]),A.jsx(sn.select,{...n,style:{...zoe,...n.style},ref:a,defaultValue:t})});c0e.displayName=Dlt;function d0e(e){return e===""||e===void 0}function u0e(e){const t=Vo(e),n=S.useRef(""),i=S.useRef(0),r=S.useCallback(o=>{const s=n.current+o;t(s),(function l(c){n.current=c,window.clearTimeout(i.current),c!==""&&(i.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),a=S.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,a]}function f0e(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=Tlt(e,Math.max(a,0));r.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Tlt(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var Ilt=Uye,Olt=Hye,Plt=Vye,Rlt=Gye,jlt=qye,Mlt=Kye,Llt=Zye,$lt=n0e,Ult=i0e,Qlt=a0e,Hlt=o0e,zlt=s0e;function os({...e}){return A.jsx(Ilt,{"data-slot":"select",...e})}function ss({...e}){return A.jsx(Plt,{"data-slot":"select-value",...e})}function ls({className:e,size:t="default",children:n,...i}){return A.jsxs(Olt,{"data-slot":"select-trigger","data-size":t,className:Ft("border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 dark:hover:bg-gray-200/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-gray-800 dark:data-[placeholder]:text-gray-400 dark:[&_svg:not([class*='text-'])]:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30 dark:dark:hover:bg-gray-800/50",e),...i,children:[n,A.jsx(Rlt,{asChild:!0,children:A.jsx(Ti,{className:"size-4 opacity-50"})})]})}function cs({className:e,children:t,position:n="popper",...i}){return A.jsx(jlt,{children:A.jsxs(Mlt,{"data-slot":"select-content",className:Ft("bg-white text-gray-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-1001 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...i,children:[A.jsx(Vlt,{}),A.jsx(Llt,{className:Ft("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),A.jsx(Glt,{})]})})}function zo({className:e,children:t,...n}){return A.jsxs($lt,{"data-slot":"select-item",className:Ft("focus:bg-gray-100 focus:text-gray-900 [&_svg:not([class*='text-'])]:text-gray-500 relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...n,children:[A.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:A.jsx(Qlt,{children:A.jsx(kA,{className:"size-4"})})}),A.jsx(Ult,{children:t})]})}function Vlt({className:e,...t}){return A.jsx(Hlt,{"data-slot":"select-scroll-up-button",className:Ft("flex cursor-default items-center justify-center py-1",e),...t,children:A.jsx(fr,{className:"size-4"})})}function Glt({className:e,...t}){return A.jsx(zlt,{"data-slot":"select-scroll-down-button",className:Ft("flex cursor-default items-center justify-center py-1",e),...t,children:A.jsx(Ti,{className:"size-4"})})}function vB({className:e,...t}){return A.jsx("textarea",{"data-slot":"textarea",className:Ft("border-gray-200 placeholder:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-gray-800 dark:placeholder:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30",e),...t})}const A0e=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:i4e});return n&&(console.error(`Error fetching countries: ${n}`),Bt.error("Error",{description:"Unable to fetch countries"})),{fetching:t,refresh:()=>i(),countries:e?.allCountries??[]}},qlt=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:a4e});n&&(console.error(`Error fetching sort codes: ${n}`),Bt.error("Error",{description:"Unable to fetch sort codes"}));const r=S.useMemo(()=>e?.allSortCodes?.sort((o,s)=>(o.name??"")>(s.name??"")?1:-1)??[],[e]),a=S.useMemo(()=>r.map(o=>({value:o.key.toString(),label:o.name??""})),[r]);return{fetching:t,refresh:()=>i(),sortCodes:r,selectableSortCodes:a}},C$=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:o4e});n&&(console.error(`Error fetching tags: ${n}`),Bt.error("Error",{description:"Unable to fetch tags"}));const r=S.useMemo(()=>M4e(e?.allTags??[]),[e]),a=S.useMemo(()=>r.map(o=>({value:o.id,label:o.name,description:o.namePath?`${o.namePath.join(" > ")} >`:void 0})),[r]);return{fetching:t,refresh:()=>i(),tags:r,selectableTags:a}},m0e=()=>{const[{data:e,fetching:t,error:n},i]=lr({query:s4e});n&&(console.error(`Error fetching tax categories: ${n}`),Bt.error("Error",{description:"Unable to fetch tax categories"}));const r=S.useMemo(()=>e?.taxCategories?.sort((o,s)=>o.name>s.name?1:-1)??[],[e]),a=S.useMemo(()=>r.map(o=>({value:o.id,label:o.name})),[r]);return{fetching:t,refresh:()=>i(),taxCategories:r,selectableTaxCategories:a}},HX=(e,t,n)=>{if(e&&"reportValidity"in e){const i=qt(n,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},e3=(e,t)=>{for(const n in t.fields){const i=t.fields[n];i&&i.ref&&"reportValidity"in i.ref?HX(i.ref,n,e):i&&i.refs&&i.refs.forEach(r=>HX(r,n,e))}},zX=(e,t)=>{t.shouldUseNativeValidation&&e3(e,t);const n={};for(const i in e){const r=qt(t.fields,i),a=Object.assign(e[i]||{},{ref:r&&r.ref});if(Klt(t.names||Object.keys(e),i)){const o=Object.assign({},qt(n,i));rr(o,"root",a),rr(n,i,o)}else rr(n,i,a)}return n},Klt=(e,t)=>{const n=VX(t);return e.some(i=>VX(i).match(`^${n}\\.\\d+`))};function VX(e){return e.replace(/\]|\[/g,"")}function GX(e,t){try{var n=e()}catch(i){return t(i)}return n&&n.then?n.then(void 0,t):n}function Wlt(e,t){for(var n={};e.length;){var i=e[0],r=i.code,a=i.message,o=i.path.join(".");if(!n[o])if("unionErrors"in i){var s=i.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:r};if("unionErrors"in i&&i.unionErrors.forEach(function(d){return d.errors.forEach(function(u){return e.push(u)})}),t){var l=n[o].types,c=l&&l[i.code];n[o]=gM(o,t,n,r,c?[].concat(c,i.message):i.message)}e.shift()}return n}function Ylt(e,t){for(var n={};e.length;){var i=e[0],r=i.code,a=i.message,o=i.path.join(".");if(!n[o])if(i.code==="invalid_union"&&i.errors.length>0){var s=i.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:r};if(i.code==="invalid_union"&&i.errors.forEach(function(d){return d.forEach(function(u){return e.push(u)})}),t){var l=n[o].types,c=l&&l[i.code];n[o]=gM(o,t,n,r,c?[].concat(c,i.message):i.message)}e.shift()}return n}function _$(e,t,n){if(n===void 0&&(n={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(e))return function(i,r,a){try{return Promise.resolve(GX(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(o){return a.shouldUseNativeValidation&&e3({},a),{errors:{},values:n.raw?Object.assign({},i):o}})},function(o){if((function(s){return Array.isArray(s?.issues)})(o))return{values:{},errors:zX(Wlt(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,r,a){try{return Promise.resolve(GX(function(){return Promise.resolve((n.mode==="sync"?eF:tF)(e,i,t)).then(function(o){return a.shouldUseNativeValidation&&e3({},a),{errors:{},values:n.raw?Object.assign({},i):o}})},function(o){if((function(s){return s instanceof tB})(o))return{values:{},errors:zX(Ylt(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}const Xlt="insertNewBusiness",Zlt=()=>{const[{fetching:e},t]=or(c4e),n=S.useCallback(async i=>{const r=`Error creating business [${i.fields.name}]`,a=`${Xlt}-${i.fields.name}`;Bt.loading("Creating Business...",{id:a});try{const o=await t(i),s=sr(o,r,a,"insertNewBusiness");if(s)return Bt.success("Success",{id:a,description:`Business [${i.fields.name}] was created`}),s.insertNewBusiness}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,insertBusiness:n}},Jlt=h$({businessName:_o().min(1,"Business name is required"),locality:_o().min(1,"Locality is required"),localName:_o().optional(),govId:_o().optional(),address:_o().optional(),generalContacts:gA(_o().email()),website:_o().url().optional().or(pye("")),phone:_o().optional(),taxCategory:_o().optional(),sortCode:_o().optional(),pcn874RecordType:_o().optional(),irsCode:aF().optional(),defaultDescription:_o().optional(),defaultTags:gA(_o()),transactionPhrases:gA(_o()),emailAddresses:gA(_o().email())}).refine(e=>e.locality==="Israel"?!!e.localName&&!!e.govId:!0,{message:"Local name and company number are required for Israeli businesses",path:["localName"]});function ect(e){const n=e.defaultDescription||e.defaultTags?.length||e.transactionPhrases?.length||e.emailAddresses?.length?{description:e.defaultDescription,tags:e.defaultTags?.map(i=>({id:i})),phrases:e.transactionPhrases,emails:e.emailAddresses}:void 0;return{name:e.businessName,country:e.locality,hebrewName:e.localName,governmentId:e.govId,address:e.address,phoneNumber:e.phone,website:e.website,email:e.generalContacts.filter(i=>!!i.trim())?.join(", "),sortCode:e.sortCode?parseInt(e.sortCode):void 0,taxCategory:e.taxCategory,pcn874RecordType:e.pcn874RecordType,irsCode:e.irsCode,suggestions:n}}function F$({description:e,onAdd:t}){const[n,i]=S.useState(!1),{insertBusiness:r,fetching:a}=Zlt(),o=Il({resolver:_$(Jlt),defaultValues:{businessName:e,generalContacts:[],defaultTags:[],transactionPhrases:e?[e]:[],emailAddresses:[]}}),s=async l=>{const c=await r({fields:ect(l)});i(!1),o.reset(),t?.(c?.id??"")};return A.jsxs(fc,{open:n,onOpenChange:i,children:[A.jsx(w1,{asChild:!0,children:A.jsxs(bt,{children:[A.jsx(SA,{className:"size-4 mr-2"}),"New Business"]})}),A.jsxs(Ac,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[A.jsxs(td,{children:[A.jsx(nd,{children:"Create New Business"}),A.jsx(nj,{children:"Add a new business to Accounter."})]}),A.jsx(yf,{...o,children:A.jsxs("form",{onSubmit:o.handleSubmit(s),className:"space-y-6",children:[A.jsx(tct,{form:o}),A.jsx(nct,{form:o}),A.jsx(ict,{form:o}),A.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[A.jsx(bt,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),A.jsx(bt,{type:"submit",disabled:a,children:"Create Business"})]})]})})]})]})}function tct({form:e}){const[t,n]=S.useState(""),{userContext:i}=S.useContext(_M),{countries:r,fetching:a}=A0e(),{watch:o,setValue:s,control:l}=e,c=o("locality"),d=h=>{t.trim()&&(s("generalContacts",[...h,t.trim()],{shouldDirty:!0}),n(""))},u=(h,v)=>{s("generalContacts",h.filter((g,k)=>k!==v),{shouldDirty:!0})},m=c===i?.context.locality;return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Contact Information"}),A.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[A.jsx(Rn,{control:l,name:"businessName",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Business Name *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,required:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"locality",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Locality / Country *"}),A.jsx(jp,{onChange:h.onChange,data:r.map(v=>({value:v.code,label:v.name})),value:h.value,disabled:a,placeholder:"Scroll to see all options",formPart:!0}),A.jsx(Xn,{})]})}),m&&A.jsxs(A.Fragment,{children:[A.jsx(Rn,{control:l,name:"localName",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Local Name *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,placeholder:"Business name in local language"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"govId",render:({field:h})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Government ID *"}),A.jsx(Yn,{children:A.jsx(Qn,{...h,placeholder:"Enter Government ID"})}),A.jsx(Xn,{})]})})]}),A.jsx(Rn,{control:l,name:"address",render:({field:h})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsxs(ii,{children:[A.jsx(Z2e,{className:"size-4"}),"Address"]}),A.jsx(Yn,{children:A.jsx(vB,{...h,rows:2,placeholder:"Enter business address"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"generalContacts",render:({field:h})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsxs(ii,{className:"flex items-center gap-2",children:[A.jsx(iie,{className:"size-4"}),"General Contacts"]}),A.jsx(Yn,{children:A.jsxs("div",{className:"space-y-2",children:[h.value?.map((v,g)=>A.jsxs(_p,{variant:"secondary",className:"gap-1 pr-1",children:[v,A.jsx("button",{type:"button",onClick:()=>u(h.value??[],g),className:"ml-1 hover:bg-muted rounded-sm p-0.5",children:A.jsx(bp,{className:"size-3"})})]},g)),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{value:t,onChange:v=>n(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),d(h.value??[]))},placeholder:"Add contact email",type:"email"}),A.jsx(bt,{type:"button",variant:"outline",size:"icon",disabled:!t.trim(),onClick:()=>d(h.value??[]),children:A.jsx(SA,{className:"size-4"})})]})]})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"website",render:({field:h})=>A.jsxs(jn,{children:[A.jsxs(ii,{children:[A.jsx(tie,{className:"size-4"}),"Website"]}),A.jsx(Yn,{children:A.jsx(Qn,{...h,type:"url",placeholder:"https://example.com"})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:l,name:"phone",render:({field:h})=>A.jsxs(jn,{children:[A.jsxs(ii,{children:[A.jsx(sFe,{className:"size-4"}),"Phone"]}),A.jsx(Yn,{children:A.jsx(Qn,{...h,type:"tel"})}),A.jsx(Xn,{})]})})]})]})}function nct({form:e}){const{selectableSortCodes:t,fetching:n,sortCodes:i}=qlt(),{selectableTaxCategories:r,fetching:a}=m0e(),{selectableTags:o,fetching:s}=C$(),{setValue:l,control:c}=e,d=S.useCallback(u=>{if(u){const m=i.find(h=>Number(h.key)===Number(u));m&&(m.defaultIrsCode?l("irsCode",m.defaultIrsCode,{shouldDirty:!0}):l("irsCode",void 0,{shouldDirty:!0}))}},[l,i]);return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Defaults"}),A.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[A.jsx(Rn,{control:c,name:"sortCode",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Sort Code"}),A.jsx(Yn,{children:A.jsx(jp,{onChange:m=>{d(m),u.onChange(m)},data:t,value:u.value,disabled:n,placeholder:"Scroll to see all options",formPart:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"taxCategory",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Tax Category"}),A.jsx(Yn,{children:A.jsx(jp,{data:r,disabled:a,value:u.value,onChange:u.onChange,placeholder:"Scroll to see all options",formPart:!0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"pcn874RecordType",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"PCN874 Record Type"}),A.jsxs(os,{value:u.value,onValueChange:u.onChange,children:[A.jsx(Yn,{children:A.jsx(ls,{children:A.jsx(ss,{placeholder:"Select record type"})})}),A.jsx(cs,{children:Object.entries(j4e).map(([m,h])=>A.jsx(zo,{value:m,children:`${h} (${m})`},m))})]}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"irsCode",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"IRS Code"}),A.jsx(Yn,{children:A.jsx(twe,{value:u.value??void 0,onValueChange:m=>u.onChange(m??null),hideControls:!0,decimalScale:0})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"defaultDescription",render:({field:u})=>A.jsxs(jn,{className:"md:col-span-2",children:[A.jsx(ii,{children:"Default Description"}),A.jsx(Yn,{children:A.jsx(Qn,{placeholder:"Enter default charge description",...u})}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:c,name:"defaultTags",render:({field:u})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Tags"}),A.jsx(Yn,{children:A.jsx(q1e,{options:Object.values(o).map(({value:m,label:h})=>({label:h,value:m})),onValueChange:u.onChange,defaultValue:u.value,value:u.value,placeholder:"Select Default Tags",variant:"default",disabled:s})}),A.jsx(Xn,{})]})})]})]})}function ict({form:e}){const[t,n]=S.useState(""),[i,r]=S.useState(""),{getValues:a,setValue:o,control:s}=e,l=()=>{if(t.trim()){const m=a("transactionPhrases");e.setValue("transactionPhrases",[...m,t.trim()],{shouldDirty:!0}),n("")}},c=()=>{if(i.trim()){const m=a("emailAddresses");o("emailAddresses",[...m,i.trim()],{shouldDirty:!0}),r("")}},d=m=>{const h=a("transactionPhrases");o("transactionPhrases",h.filter((v,g)=>g!==m),{shouldDirty:!0})},u=m=>{const h=a("emailAddresses");o("emailAddresses",h.filter((v,g)=>g!==m),{shouldDirty:!0})};return A.jsxs("div",{className:"space-y-4",children:[A.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Auto Matching"})," ",A.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure patterns for automatic matching of bank transactions and documents"}),A.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[A.jsx(Rn,{control:s,name:"transactionPhrases",render:({field:m})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Transaction Phrases"}),!!m.value?.length&&A.jsx("div",{className:"flex flex-wrap gap-2",children:m.value.map((h,v)=>A.jsxs(_p,{variant:"secondary",className:"gap-1",children:[h,A.jsx(bt,{variant:"ghost",size:"icon",className:"p-0 size-3",onClick:()=>d(v),children:A.jsx(bp,{className:"size-3 cursor-pointer",onClick:()=>d(v)})})]},v))}),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{placeholder:"Add phrase...",value:t,onChange:h=>n(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),l())}}),A.jsx(bt,{type:"button",size:"sm",onClick:l,children:A.jsx(SA,{className:"size-4"})})]}),A.jsx(Xn,{})]})}),A.jsx(Rn,{control:s,name:"emailAddresses",render:({field:m})=>A.jsxs(jn,{children:[A.jsx(ii,{children:"Email Addresses"}),!!m.value?.length&&A.jsx("div",{className:"flex flex-wrap gap-2",children:m.value.map((h,v)=>A.jsxs(_p,{variant:"secondary",className:"gap-1",children:[h,A.jsx(bt,{variant:"ghost",size:"icon",className:"p-0 size-3",onClick:()=>u(v),children:A.jsx(bp,{className:"size-3 cursor-pointer"})})]},v))}),A.jsxs("div",{className:"flex gap-2",children:[A.jsx(Qn,{type:"email",placeholder:"Add email...",value:i,onChange:h=>r(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),c())}}),A.jsx(bt,{type:"button",size:"sm",onClick:c,children:A.jsx(SA,{className:"size-4"})})]}),A.jsx(Xn,{})]})})]})]})}const rct=S.createContext(null),AO={didCatch:!1,error:null};class E$ extends S.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=AO}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,i,r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];(n=(i=this.props).onReset)===null||n===void 0||n.call(i,{args:a,reason:"imperative-api"}),this.setState(AO)}}componentDidCatch(t,n){var i,r;(i=(r=this.props).onError)===null||i===void 0||i.call(r,t,n)}componentDidUpdate(t,n){const{didCatch:i}=this.state,{resetKeys:r}=this.props;if(i&&n.error!==null&&act(t.resetKeys,r)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(AO)}}render(){const{children:t,fallbackRender:n,FallbackComponent:i,fallback:r}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(i)s=S.createElement(i,l);else if(r!==void 0)s=r;else throw o}return S.createElement(rct.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function act(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,i)=>!Object.is(n,t[i]))}const oct="updateTransactions",sct=()=>{const[{fetching:e},t]=or(w4e),n=S.useCallback(async i=>{const r=Array.isArray(i.transactionIds)?i.transactionIds.join(", "):i.transactionIds,a=`Error updating transactions ID [${r}]`,o=`${oct}-${r}`;Bt.loading("Updating Transactions",{id:o});try{const s=await t(i),l=sr(s,a,o,"updateTransactions");if(l)return Bt.success("Success",{id:o,description:"Transactions updated"}),l.updateTransactions.transactions.map(c=>c.id)}catch(s){console.error(`${a}: ${s}`),Bt.error("Error",{id:o,description:a,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTransactions:n}};var yB="Checkbox",[lct]=Bs(yB),[cct,B$]=lct(yB);function dct(e){const{__scopeCheckbox:t,checked:n,children:i,defaultChecked:r,disabled:a,form:o,name:s,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[m,h]=Kd({prop:n,defaultProp:r??!1,onChange:l,caller:yB}),[v,g]=S.useState(null),[k,b]=S.useState(null),w=S.useRef(!1),C=v?!!o||!!v.closest("form"):!0,N={checked:m,disabled:a,setChecked:h,control:v,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:Um(r)?!1:r,isFormControl:C,bubbleInput:k,setBubbleInput:b};return A.jsx(cct,{scope:t,...N,children:uct(u)?u(N):i})}var h0e="CheckboxTrigger",p0e=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...i},r)=>{const{control:a,value:o,disabled:s,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:v}=B$(h0e,e),g=ui(r,d),k=S.useRef(l);return S.useEffect(()=>{const b=a?.form;if(b){const w=()=>u(k.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,u]),A.jsx(sn.button,{type:"button",role:"checkbox","aria-checked":Um(l)?"mixed":l,"aria-required":c,"data-state":w0e(l),"data-disabled":s?"":void 0,disabled:s,value:o,...i,ref:g,onKeyDown:Kt(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Kt(n,b=>{u(w=>Um(w)?!0:!w),v&&h&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});p0e.displayName=h0e;var g0e=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:i,checked:r,defaultChecked:a,required:o,disabled:s,value:l,onCheckedChange:c,form:d,...u}=e;return A.jsx(dct,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:s,required:o,onCheckedChange:c,name:i,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>A.jsxs(A.Fragment,{children:[A.jsx(p0e,{...u,ref:t,__scopeCheckbox:n}),m&&A.jsx(k0e,{__scopeCheckbox:n})]})})});g0e.displayName=yB;var v0e="CheckboxIndicator",y0e=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:i,...r}=e,a=B$(v0e,n);return A.jsx(To,{present:i||Um(a.checked)||a.checked===!0,children:A.jsx(sn.span,{"data-state":w0e(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});y0e.displayName=v0e;var b0e="CheckboxBubbleInput",k0e=S.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:i,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:o,required:s,disabled:l,name:c,value:d,form:u,bubbleInput:m,setBubbleInput:h}=B$(b0e,e),v=ui(n,h),g=x$(a),k=vj(i);S.useEffect(()=>{const w=m;if(!w)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,F=!r.current;if(g!==a&&_){const B=new Event("click",{bubbles:F});w.indeterminate=Um(a),_.call(w,Um(a)?!1:a),w.dispatchEvent(B)}},[m,g,a,r]);const b=S.useRef(Um(a)?!1:a);return A.jsx(sn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:s,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:v,style:{...t.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});k0e.displayName=b0e;function uct(e){return typeof e=="function"}function Um(e){return e==="indeterminate"}function w0e(e){return Um(e)?"indeterminate":e?"checked":"unchecked"}function Ip({className:e,...t}){return A.jsx(g0e,{"data-slot":"checkbox",className:Ft("peer border-gray-200 dark:bg-gray-200/30 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 dark:data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:dark:bg-gray-800/30 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900 dark:dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:border-gray-50 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...t,children:A.jsx(y0e,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:A.jsx(kA,{className:"size-3.5"})})})}const fct=[{id:"select",header:({table:e})=>A.jsx(Ip,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":"Select all"}),cell:({row:e})=>A.jsx(Ip,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1},{accessorKey:"accountType",header:"Type",cell:({row:e})=>A.jsx("div",{children:e.getValue("accountType")})},{accessorKey:"accountName",header:"Account",cell:({row:e})=>A.jsx("div",{children:e.getValue("accountName")})},{accessorKey:"amountRaw",header:"Amount",cell:({row:e})=>A.jsx("div",{children:e.original.amountFormatted})},{accessorKey:"sourceDescription",header:"Description",cell:({row:e})=>A.jsx("div",{children:e.getValue("sourceDescription")})},{accessorKey:"eventDate",header:"Event Date",cell:({row:e})=>A.jsx("div",{children:Qi(e.getValue("eventDate"),"yyyy-MM-dd")})},{accessorKey:"valueDate",header:"Value Date",cell:({row:e})=>A.jsx("div",{children:e.getValue("valueDate")?Qi(e.getValue("valueDate"),"yyyy-MM-dd"):""})}];function Act({transactionId:e,counterpartyId:t,open:n,onOpenChange:i,onClose:r}){const[{data:a,fetching:o},s]=lr({pause:!0,query:LTe,variables:{transactionId:e,withMissingInfo:!0}});S.useEffect(()=>{n&&t&&s()},[n,t,s,e]);const l=S.useCallback(d=>{i(d),n&&!d&&r?.()},[i,r,n]),c=S.useMemo(()=>{const d=a?.similarTransactions.map(u=>({id:u.id,amountRaw:u.amount.raw,amountFormatted:u.amount.formatted,sourceDescription:u.sourceDescription,eventDate:new Date(u.eventDate),valueDate:u.effectiveDate?new Date(u.effectiveDate):void 0,accountType:u.account.type,accountName:u.account.name}))??[];return a&&d.length===0&&l(!1),d},[a,l]);return A.jsx(fc,{open:n&&!!t&&c.length>0,onOpenChange:l,children:A.jsx(Ac,{className:"overflow-scroll max-h-screen w-full sm:max-w-[640px] md:max-w-[768px] lg:max-w-[900px]",children:A.jsx(E$,{fallback:A.jsx("div",{children:"Error fetching similar transactions"}),children:o?A.jsx(N0,{}):t?A.jsx(mct,{data:c,counterpartyId:t,onOpenChange:l}):null})})})}function mct({data:e,counterpartyId:t,onOpenChange:n}){const[i,r]=V.useState([]),[a,o]=V.useState({}),s=g0({data:e,columns:fct,onSortingChange:r,getCoreRowModel:p0(),getSortedRowModel:q1(),onRowSelectionChange:o,state:{sorting:i,rowSelection:a}}),{updateTransactions:l}=sct(),c=S.useCallback(async()=>{const d=s.getSelectedRowModel().rows.map(u=>u.original.id);await l({transactionIds:d,fields:{counterpartyId:t}}),n(!1)},[l,n,s,t]);return S.useEffect(()=>{e.length===0&&n(!1)},[e.length,n]),e.length?A.jsxs(A.Fragment,{children:[A.jsxs(td,{className:"flex flex-row items-center justify-between",children:[A.jsx(nd,{children:"Transactions"}),A.jsx(bt,{onClick:c,children:"Approve selected"})]}),A.jsx(El,{children:A.jsxs(Jp,{children:[A.jsx(eg,{children:s.getHeaderGroups().map(d=>A.jsx(Go,{children:d.headers.map(u=>A.jsx(wl,{children:u.isPlaceholder?null:Yc(u.column.columnDef.header,u.getContext())},u.id))},d.id))}),A.jsx(tg,{children:s.getRowModel().rows.map(d=>A.jsx(Go,{"data-state":d.getIsSelected()&&"selected",children:d.getVisibleCells().map(u=>A.jsx(Qo,{children:Yc(u.column.columnDef.cell,u.getContext())},u.id))},d.id))})]})})]}):null}function S0e({transaction:e,onChange:t}){const{get:n}=Xp(),{id:i,counterparty:r,missingInfoSuggestions:a,id:o,sourceDescription:s,enableEdit:l}=e,c=!!a?.business&&l,d=c?a?.business?.name:"Missing",u=c?a?.business?.id:null,m=r?.name??d,[h,v]=S.useState(!1),{updateTransaction:g,fetching:k}=LM(),b=S.useCallback(async j=>{await g({transactionId:o,fields:{counterpartyId:j}}),v(!0)},[o,g]),w=S.useCallback(async j=>{await b(j),t?.()},[b,t]),C=n("chargesFilters"),N=S.useCallback(j=>{const P=C?JSON.parse(decodeURIComponent(C)):{};return Np({fromDate:P.fromDate,toDate:P.toDate,ownerIds:P.byOwners,businessIDs:[j]})},[C]),{selectableBusinesses:_,fetching:F}=h0(),[B,T]=S.useState(u??null),[I,$]=S.useState(s);return A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"flex flex-wrap flex-col justify-center",children:r?.id?A.jsx(qr,{to:N(r.id),target:"_blank",rel:"noreferrer",onClick:j=>j.stopPropagation(),className:"inline-flex items-center font-semibold",children:m}):A.jsxs(A.Fragment,{children:[A.jsx(o8,{options:_,value:B,onChange:T,search:I,onSearchChange:$,placeholder:"Choose or create a business",empty:I?A.jsx(F$,{description:I,onAdd:w}):null}),A.jsx(dCt,{content:"Approve",children:A.jsx(bt,{variant:"outline",size:"icon",onClick:()=>B&&b(B),disabled:k||F||!B,children:A.jsx(kA,{className:"size-4"})})})]})}),A.jsx(Act,{transactionId:i,counterpartyId:r?.id??B,open:h,onOpenChange:v,onClose:t})]})}const mO=[{accessorKey:"counterparty.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Counterparty",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(S0e,{transaction:e.original})},{accessorKey:"eventDate",sortingFn:e=>"eventDate"in e.original&&e.original.eventDate?new Date(e.original.eventDate).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Event Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Jme,{transaction:e.original})},{accessorKey:"effectiveDate",sortingFn:e=>"effectiveDate"in e.original&&e.original.effectiveDate?new Date(e.original.effectiveDate).getTime():0,header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Debit Date",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(Zme,{transaction:e.original})},{accessorKey:"amount.raw",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Amount",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(ehe,{transaction:e.original})},{accessorKey:"account.name",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Account",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(the,{transaction:e.original})},{accessorKey:"sourceDescription",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Description",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(nhe,{transaction:e.original})},{accessorKey:"referenceKey",header:({column:e})=>A.jsxs(bt,{variant:"ghost",children:["Reference#",e.getIsSorted()&&(e.getIsSorted()==="asc"?A.jsx(fr,{className:"ml-2 h-4 w-4"}):A.jsx(Ti,{className:"ml-2 h-4 w-4"}))]}),cell:({row:e})=>A.jsx(ihe,{transaction:e.original})}],hct={accessorKey:"id",header:"Actions",cell:({row:e})=>e.original.enableEdit?A.jsxs(A.Fragment,{children:[A.jsx(D$,{onClick:e.original.editTransaction}),A.jsx(kSt,{chargeId:e.original.chargeId,transactionId:e.original.id,onDone:e.original.onUpdate})]}):e.original.enableChargeLink?A.jsx(N0e,{chargeId:e.original.chargeId}):null},x0e=({transactionsProps:e,onChange:t=()=>{},enableEdit:n,enableChargeLink:i})=>{const[r,a]=S.useState(void 0),[o,s]=S.useState([]),l=S.useMemo(()=>e.map(m=>si(ure,m)),[e]),c=S.useMemo(()=>l?.map(m=>({...m,editTransaction:()=>a(m.id),onUpdate:t,enableEdit:n,enableChargeLink:i})),[l,t,n,i]),d=S.useMemo(()=>n||i?[...mO,hct]:mO,[n,i]),u=g0({data:c,columns:d,getCoreRowModel:p0(),onSortingChange:s,getSortedRowModel:q1(),state:{sorting:o}});return A.jsxs(A.Fragment,{children:[A.jsxs(Jp,{children:[A.jsx(eg,{children:u.getHeaderGroups().map(m=>A.jsx(Go,{children:m.headers.map(h=>A.jsx(wl,{colSpan:h.colSpan,children:h.isPlaceholder?null:Yc(h.column.columnDef.header,h.getContext())},h.id))},m.id))}),A.jsx(tg,{children:u.getRowModel().rows?.length?u.getRowModel().rows.map(m=>A.jsx(Go,{children:m.getVisibleCells().map(h=>A.jsx(Qo,{children:Yc(h.column.columnDef.cell,h.getContext())},h.id))},m.id)):A.jsx(Go,{children:A.jsx(Qo,{colSpan:mO.length,className:"h-24 text-center",children:"No results."})})})]}),A.jsx(vSt,{transactionID:r,close:()=>a(void 0),onChange:t})]})},pct=({transactionsProps:e,onChange:t})=>{const{transactions:n}=si(fre,e);return A.jsx(x0e,{transactionsProps:n,onChange:t,enableEdit:!0})},gct=({chargeId:e})=>{const[{data:t,fetching:n}]=lr({query:NTe,variables:{chargeId:e}}),i=S.useMemo(()=>t?.depositByCharge?.transactions?.filter(r=>r.chargeId!==e)??[],[t?.depositByCharge?.transactions,e]);return n?A.jsx(wA,{className:"h-10 w-10 animate-spin"}):t?.depositByCharge?A.jsxs("div",{children:[A.jsxs("div",{className:"text-lg font-semibold mb-4",children:['Bank Deposit "',t?.depositByCharge?.id,'" Balance:'," ",t?.depositByCharge?.balance.formatted]}),A.jsx("div",{className:"mb-4",children:A.jsx("span",{className:"text-sm text-gray-500",children:t?.depositByCharge?.isOpen?"Deposit is open":"Deposit is closed"})}),i.length===0?A.jsx("div",{className:"text-sm text-gray-500",children:"No transactions found for this deposit."}):A.jsx(x0e,{transactionsProps:i,enableChargeLink:!0})]}):A.jsx("div",{className:"text-sm text-gray-500",children:"No bank deposit found for this charge."})},vct=({chargeProps:e})=>{const t=si(Are,e);if(t.__typename!=="ConversionCharge")return A.jsx(A.Fragment,{});const{eventRate:n,officialRate:i}=t;return A.jsxs(Vs,{justify:"center",children:[i&&A.jsx(Vs.Col,{span:"content",children:A.jsx(vq,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:A.jsxs(Iy,{position:"apart",children:[A.jsx(Xi,{weight:500,children:"Official Conversion Rate"}),A.jsx(_R,{color:"green",variant:"light",children:`${Number(i.rate)} ${Jl(i.from)} => ${Jl(i.to)}`})]})})}),n&&A.jsx(Vs.Col,{span:"content",children:A.jsx(vq,{shadow:"sm",padding:"xs",radius:"md",withBorder:!0,children:A.jsxs(Iy,{position:"apart",children:[A.jsx(Xi,{weight:500,children:"Bank Conversion Rate"}),A.jsx(_R,{color:"green",variant:"light",children:`${Number(n.rate)} ${Jl(n.from)} => ${Jl(n.to)}`})]})})})]})},yct=({chargeProps:e})=>{const t=si(mre,e),n=S.useMemo(()=>t.__typename==="CreditcardBankCharge"&&t.creditCardTransactions?t.creditCardTransactions.map(i=>si(ure,i)):[],[t]);return n.length?A.jsxs(Jp,{children:[A.jsx(eg,{children:A.jsxs(Go,{children:[A.jsx(wl,{children:"Event Date"}),A.jsx(wl,{children:"Debit Date"}),A.jsx(wl,{children:"Amount"}),A.jsx(wl,{children:"Account"}),A.jsx(wl,{children:"Description"}),A.jsx(wl,{children:"Reference#"}),A.jsx(wl,{children:"Counterparty"}),A.jsx(wl,{children:"Charge"})]})}),A.jsx(tg,{children:n.map(i=>{const r={...i,onUpdate:()=>{},editTransaction:()=>{},enableEdit:!1,enableChargeLink:!1};return A.jsxs(Go,{children:[A.jsx(Qo,{children:A.jsx(Jme,{transaction:r})}),A.jsx(Qo,{children:A.jsx(Zme,{transaction:r})}),A.jsx(Qo,{children:A.jsx(ehe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(the,{transaction:r})}),A.jsx(Qo,{children:A.jsx(nhe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(ihe,{transaction:r})}),A.jsx(Qo,{children:A.jsx(S0e,{transaction:r})}),A.jsx(Qo,{children:A.jsx(N0e,{chargeId:i.chargeId})})]},i.id)})})]}):null},bct=({chargeProps:e})=>{const t=si(hre,e),n=S.useMemo(()=>t.__typename!=="FinancialCharge"?[]:Object.entries(t.exchangeRates??{}).sort((i,r)=>i[0].localeCompare(r[0])),[t]);return t.__typename!=="FinancialCharge"?A.jsx(A.Fragment,{}):A.jsx("div",{className:"flex flex-row flex-wrap gap-2 px-2",children:n.map(([i,r])=>A.jsx(El,{className:"gap-0 py-2",children:A.jsxs(Kc,{className:"flex flex-col px-2",children:[A.jsx(qd,{className:"text-xl font-semibold",children:i.toLocaleUpperCase()}),A.jsxs("div",{className:"flex items-center space-x-2",children:[A.jsxs("span",{className:"whitespace-nowrap",children:[Jl(i.toLocaleUpperCase()),"1="]}),A.jsxs(_p,{variant:"default",className:"flex gap-1 rounded-lg text-md",children:[Jl(vn.Ils),r]})]})]})},i))})},kct="deleteMiscExpense",wct=()=>{const[{fetching:e},t]=or(JTe),n=S.useCallback(async i=>{const r="Error deleting misc expense",a=`${kct}-${i.id}`;Bt.loading("Deleting misc expense",{id:a});try{const o=await t(i),s=sr(o,r,a);if(s)return Bt.success("Success",{id:a,description:"Misc expense was deleted successfully"}),s.deleteMiscExpense}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteMiscExpense:n}};function Sct({miscExpenseId:e,onChange:t}){const{deleteMiscExpense:n}=wct();async function i(){try{await n({id:e}),t?.()}catch(r){const a="Failed to delete misc expense";console.error(`${a}: ${r}`),Bt.error("Error",{description:a})}}return A.jsx(vf,{onConfirm:i,title:"Are you sure you want to delete this expense?",children:A.jsx(bt,{className:"size-7.5 text-red-500",variant:"ghost",children:A.jsx(qF,{className:"size-5"})})})}const xct=({miscExpensesData:e,onChange:t})=>{const n=si(pre,e),{miscExpenses:i}=n;return A.jsxs("table",{className:"w-full h-full",children:[A.jsx("thead",{children:A.jsxs("tr",{children:[A.jsx("th",{children:"Creditor"}),A.jsx("th",{children:"Debtor"}),A.jsx("th",{children:"Amount"}),A.jsx("th",{children:"Invoice Date"}),A.jsx("th",{children:"Value Date"}),A.jsx("th",{children:"Description"}),A.jsx("th",{children:"Actions"})]})}),A.jsx("tbody",{children:i?.map(r=>A.jsxs("tr",{children:[A.jsx("td",{children:A.jsx("div",{children:r.creditor?.name})}),A.jsx("td",{children:A.jsx("div",{children:r.debtor?.name})}),A.jsx("td",{children:A.jsx("div",{children:r.amount?.formatted})}),A.jsx("td",{children:A.jsx("div",{children:r.invoiceDate})}),A.jsx("td",{children:A.jsx("div",{children:r.valueDate&&Qi(new Date(r.valueDate),"yyyy-MM-dd")})}),A.jsx("td",{children:A.jsx("div",{children:r.description})}),A.jsxs("td",{children:[A.jsx(gSt,{onDone:t,data:r}),A.jsx(Sct,{miscExpenseId:r.id,onChange:t})]})]},r?.id))})]})},Nct=({salaryRecordsProps:e})=>{const t=si(gre,e);if(t.__typename!=="SalaryCharge")return A.jsx(A.Fragment,{});const{salaryRecords:n}=t;return A.jsxs("table",{className:"w-full h-full",children:[A.jsx("thead",{children:A.jsxs("tr",{children:[A.jsx("th",{children:"Employee"}),A.jsx("th",{children:"Direct Salary"}),A.jsx("th",{children:"Base Salary"}),A.jsx("th",{children:"Pension"}),A.jsx("th",{children:"Training Fund"}),A.jsx("th",{children:"Social Security"}),A.jsx("th",{children:"Tax"})]})}),A.jsx("tbody",{children:n?.map(i=>A.jsxs("tr",{children:[A.jsx("td",{children:A.jsx("div",{children:i.employee?.name??"Missing"})}),A.jsx("td",{children:A.jsx("div",{children:i.directAmount.formatted})}),A.jsx("td",{children:A.jsx("div",{children:i.baseAmount?.formatted})}),A.jsxs("td",{children:[A.jsx("div",{children:i.pensionFund?.name}),A.jsxs("div",{children:["Employee: ",i.pensionEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.pensionEmployerAmount?.formatted]}),A.jsxs("div",{children:["Compensation: ",i.compensationsAmount?.formatted]})]}),A.jsxs("td",{children:[A.jsx("div",{children:i.trainingFund?.name}),A.jsxs("div",{children:["Employee: ",i.trainingFundEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.trainingFundEmployerAmount?.formatted]})]}),A.jsxs("td",{children:[A.jsxs("div",{children:["Employee: ",i.socialSecurityEmployeeAmount?.formatted]}),A.jsxs("div",{children:["Employer: ",i.socialSecurityEmployerAmount?.formatted]}),A.jsxs("div",{children:["Health: ",i.healthInsuranceAmount?.formatted]})]}),A.jsx("td",{children:A.jsx("div",{children:i.incomeTaxAmount?.formatted})})]},`${i.employee?.name}-${i.baseAmount}`))})]})};function Cct({chargeID:e,onChange:t=()=>{},fetching:n}){const[i,r]=S.useState([]),[a,o]=S.useState(e),[s,{toggle:l}]=CA(!1),[c,d]=S.useState(void 0),[{data:u,fetching:m},h]=lr({query:Id,variables:{chargeId:a}}),v=S.useCallback(()=>{h(),t()},[h,t]);S.useEffect(()=>{u?.charge&&d(u.charge)},[u]),S.useEffect(()=>{n&&h()},[n,h]),S.useEffect(()=>{e!==a&&(o(e),h())},[e,a,h]);const g=c?.__typename,k=!!c?.metadata?.ledgerCount,b=!!c?.metadata?.transactionsCount,w=!!c?.metadata?.documentsCount,C=!!c?.metadata?.receiptsCount,N=g==="SalaryCharge",_=!!c?.miscExpenses?.length,F=c?.metadata?.openDocuments,B=(c?.totalAmount?.raw??0)>0&&!C;S.useEffect(()=>{const W=[];b&&W.push("transactions"),w&&W.push("documents"),k&&W.push("ledger"),N&&W.push("salaries"),_&&W.push("miscExpenses"),g==="BankDepositCharge"&&W.push("bankDeposit"),r(W)},[b,w,k,N,_,g]);function T(W){i.includes(W)?r(le=>le.filter(be=>be!==W)):r(le=>[...le,W])}const I=vl(Id,yre,c),$=vl(Id,yz,c),j=vl(Id,bre,c),P=vl(Id,fre,c),K=vl(Id,pre,c),q=S.useMemo(()=>g==="ConversionCharge"&&vl(Id,Are,c),[c,g]),re=S.useMemo(()=>g==="FinancialCharge"&&vl(Id,hre,c),[c,g]),U=g==="SalaryCharge"&&vl(Id,gre,c),te=S.useMemo(()=>g==="CreditcardBankCharge"&&vl(Id,mre,c),[c,g]);return A.jsxs("div",{className:"flex flex-col gap-5",children:[m&&A.jsx(ad,{className:"flex self-center my-5",color:"dark",size:"xl",variant:"dots"}),vl(Id,cre,c)&&A.jsx(Mit,{data:c}),c&&A.jsxs("div",{className:"flex flex-row",children:[A.jsxs(Ri,{className:"w-full",multiple:!0,value:i,chevron:A.jsx(SA,{size:"1rem"}),styles:{chevron:{"&[data-rotate]":{transform:"rotate(45deg)"}}},children:[g==="ConversionCharge"&&A.jsxs(Ri.Item,{value:"conversion",children:[A.jsx(Ri.Control,{disabled:!b,onClick:()=>T("conversion"),children:"Conversion Info"}),A.jsx(Ri.Panel,{children:q&&A.jsx(vct,{chargeProps:c})})]}),g==="FinancialCharge"&&A.jsxs(Ri.Item,{value:"exchangeRates",children:[A.jsx(Ri.Control,{disabled:!re,onClick:()=>T("exchangeRates"),children:"Exchange Rates"}),A.jsx(Ri.Panel,{children:re&&A.jsx(bct,{chargeProps:c})})]}),b&&A.jsxs(Ri.Item,{value:"transactions",children:[A.jsx(Ri.Control,{disabled:!b,onClick:()=>T("transactions"),children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between w-full",children:["Transactions",B&&A.jsx(c1,{chargeId:c.id})]})}),A.jsx(Ri.Panel,{children:P&&A.jsx(pct,{transactionsProps:c,onChange:v})})]}),_&&A.jsxs(Ri.Item,{value:"miscExpenses",children:[A.jsx(Ri.Control,{disabled:!_,onClick:()=>T("miscExpenses"),children:"Misc Expenses"}),A.jsx(Ri.Panel,{children:K&&A.jsx(xct,{miscExpensesData:c,onChange:v})})]}),w&&A.jsxs(Ri.Item,{value:"documents",children:[A.jsx(Ri.Control,{disabled:!w,onClick:()=>T("documents"),children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between w-full",children:[A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-start",children:[w&&A.jsx(Mr,{label:"Documents Gallery",children:A.jsx(bt,{onClick:W=>{W.stopPropagation(),l()},variant:"outline",disabled:!I,size:"icon",className:"size-7.5 text-gray-500",children:A.jsx(nie,{className:"size-5"})})}),"Documents"]}),F&&A.jsx(c1,{chargeId:c.id})]})}),A.jsx(Ri.Panel,{children:$&&A.jsx(Xme,{documentsProps:si(yz,c)?.additionalDocuments,onChange:v})})]}),g==="SalaryCharge"&&A.jsxs(Ri.Item,{value:"salaries",children:[A.jsx(Ri.Control,{disabled:!N,onClick:()=>T("salaries"),children:"Salaries"}),A.jsx(Ri.Panel,{children:U&&A.jsx(Nct,{salaryRecordsProps:c})})]}),c.__typename==="BusinessTripCharge"&&A.jsxs(Ri.Item,{value:"businessTrip",children:[A.jsx(Ri.Control,{onClick:()=>T("businessTrip"),children:"Business Trip"}),A.jsx(Ri.Panel,{children:A.jsx(EYe,{data:c.businessTrip})})]}),g==="CreditcardBankCharge"&&A.jsxs(Ri.Item,{value:"creditcard",children:[A.jsx(Ri.Control,{onClick:()=>T("creditcard"),children:"CreditCard Transactions"}),A.jsx(Ri.Panel,{children:te&&A.jsx(yct,{chargeProps:c})})]}),g==="BankDepositCharge"&&A.jsxs(Ri.Item,{value:"bankDeposit",children:[A.jsx(Ri.Control,{onClick:()=>T("bankDeposit"),children:"Bank Deposit"}),A.jsx(Ri.Panel,{children:A.jsx(gct,{chargeId:c.id})})]}),k&&A.jsxs(Ri.Item,{value:"ledger",children:[A.jsx(Ri.Control,{disabled:!k,onClick:W=>{W.stopPropagation(),T("ledger")},children:A.jsxs("div",{className:"flex flex-row items-center gap-2 justify-start w-full",children:[!c.metadata?.isLedgerLocked&&A.jsx(Zvt,{chargeId:c.id,onChange:v,variant:"outline"}),"Ledger Records"]})}),A.jsx(Ri.Panel,{children:j&&A.jsx(jit,{ledgerFragment:c})})]})]}),I&&A.jsx(Sn,{maw:"1/6",children:A.jsx(Vj,{in:s,transitionDuration:500,transitionTimingFunction:"linear",children:A.jsx(Tnt,{chargeProps:c,onChange:v})})})]}),!m&&!c&&A.jsx("p",{children:"Error fetching extended information for this charge"})]})}const _ct=({setEditCharge:e,setInsertDocument:t,setMatchDocuments:n,toggleMergeCharge:i,isSelectedForMerge:r,data:a,isAllOpened:o})=>{const[s,l]=S.useState(!1),[c,d]=S.useState(si(Mh,a)),[{data:u,fetching:m},h]=lr({query:xTe,pause:!0,variables:{chargeId:a.id}}),v=h;S.useEffect(()=>{const b=u?.charge;b&&d(si(Mh,b))},[u]),S.useEffect(()=>{d(si(Mh,a))},[a]),S.useEffect(()=>{l(o)},[o]);const g=S.useMemo(()=>!!(c.metadata?.documentsCount||c.metadata?.transactionsCount||c.metadata?.ledgerCount||c.metadata?.miscExpensesCount),[c.metadata?.documentsCount,c.metadata?.transactionsCount,c.metadata?.ledgerCount,c.metadata?.miscExpensesCount]),k=(c?.totalAmount?.raw??0)>0;return A.jsxs(A.Fragment,{children:[A.jsxs("tr",{onClick:()=>{g&&(l(b=>!b),v())},children:[A.jsx(ptt,{data:c}),A.jsx(dtt,{data:c}),A.jsx(IYe,{data:c}),A.jsx(gtt,{data:c}),vl(Mh,wre,c)?A.jsx(ctt,{data:c}):A.jsx("td",{}),A.jsx(ftt,{data:c,onChange:v}),vl(Mh,Sre,c)?A.jsx(mtt,{data:c,onChange:v}):A.jsx("td",{}),vl(Mh,xre,c)?A.jsx(htt,{data:c}):A.jsx("td",{}),vl(Mh,kre,c)?A.jsx(OYe,{data:c}):A.jsx("td",{}),A.jsx(Att,{data:c}),A.jsx(TYe,{data:c,onChange:v}),A.jsx("td",{children:A.jsxs("div",{className:"flex flex-col gap-2",children:[e&&A.jsx(D$,{onClick:b=>{b.stopPropagation(),e(v)}}),i&&A.jsx(eyt,{toggleMergeSelected:()=>i(v),mergeSelected:r})]})}),A.jsx("td",{children:A.jsxs("div",{className:"flex flex-col gap-2",children:[A.jsx(Btt,{chargeId:c.id,chargeType:c.__typename,setInsertDocument:t?()=>t(v):void 0,setMatchDocuments:n,onChange:v,isIncome:k}),g&&A.jsx(Jvt,{toggleExpansion:l,isExpanded:s,onClickAction:()=>v()})]})})]}),g&&s&&A.jsx("tr",{children:A.jsx("td",{colSpan:13,children:A.jsx(A0,{style:{width:"100%"},withBorder:!0,shadow:"lg",children:A.jsx(Cct,{chargeID:c.id,onChange:v,fetching:m})})})})]})},Fct=({setEditChargeId:e,setInsertDocument:t,setMatchDocuments:n,toggleMergeCharge:i,mergeSelectedCharges:r,data:a,isAllOpened:o})=>{const s=a?.map(l=>si(kTe,l))??[];return A.jsxs(Yp,{striped:!0,highlightOnHover:!0,children:[A.jsx("thead",{className:"sticky top-0 z-20",children:A.jsxs("tr",{className:"px-10 py-10 title-font tracking-wider font-medium text-gray-900 text-sm bg-gray-100 rounded-tl rounded-bl",children:[A.jsx("th",{children:"Type"}),A.jsx("th",{children:"Date"}),A.jsx("th",{children:"Amount"}),A.jsx("th",{children:"Vat"}),A.jsx("th",{children:"Counterparty"}),A.jsx("th",{children:"Description"}),A.jsx("th",{children:"Tags"}),A.jsx("th",{children:"Tax Category"}),A.jsx("th",{children:"Business Trip"}),A.jsx("th",{children:"More Info"}),A.jsx("th",{children:"Accountant Approval"}),A.jsx("th",{children:"Edit"}),A.jsx("th",{children:"More Info"})]})}),A.jsx("tbody",{children:s?.map(l=>A.jsx(_ct,{data:l,setEditCharge:e?c=>e({id:l.id,onChange:c}):void 0,setInsertDocument:t?c=>t({id:l.id,onChange:c}):void 0,setMatchDocuments:n?()=>n({id:l.id,ownerId:l.owner.id}):void 0,toggleMergeCharge:i?c=>i(l.id,c):void 0,isSelectedForMerge:r?.has(l.id)??!1,isAllOpened:o},l.id))})]})};function rg(e){return`/charges/${e}`}const Ect=({chargeId:e})=>{const{chargeId:t}=wCe(),n=e||t;let i;try{i=ICe()}catch{}const[r,a]=S.useState(void 0),[o,s]=S.useState(void 0),[l,c]=S.useState(void 0),[{data:d,fetching:u},m]=lr({query:Cre,pause:!n||!!i,variables:{chargeId:n??""}});S.useEffect(()=>{n&&!i&&m()},[n,i,m]);const h=i||d,v=!i&&u;return n?A.jsxs(A.Fragment,{children:[v?A.jsx(N0,{}):A.jsx(Fct,{setEditChargeId:a,setInsertDocument:s,setMatchDocuments:c,data:h?.charge?[h.charge]:[],isAllOpened:!0}),r&&A.jsx(hSt,{chargeId:r?.id,close:()=>a(void 0),onChange:r.onChange}),o&&A.jsx(bSt,{chargeId:o.id,onChange:o.onChange,close:()=>s(void 0)}),l&&A.jsx(HNt,{chargeId:l.id,ownerId:l.ownerId,setMatchDocuments:()=>c(void 0)})]}):A.jsx("div",{children:"Charge not found"})},Bct=Object.freeze(Object.defineProperty({__proto__:null,Charge:Ect,getChargeHref:rg},Symbol.toStringTag,{value:"Module"}));function N0e(e){return A.jsx(Mr,{label:"To Charge",children:A.jsx(bt,{onClick:t=>{t.stopPropagation(),window.open(rg(e.chargeId),"_blank","noreferrer")},...e,className:Ft("size-7.5",e.className),variant:"ghost",children:A.jsx(S2e,{className:"size-5"})})})}const Dct="closeDocument",Tct=()=>{const[{fetching:e},t]=or(VTe),n=S.useCallback(async i=>{const r=`Error closing document ID [${i.documentId}]`,a=`${Dct}-${i.documentId}`;Bt.loading("Closing Document...",{id:a});try{const o=await t(i),s=sr(o,r,a,"closeDocument");if(s)return Bt.success("Success",{id:a,description:"Document closed"}),s.closeDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,closeDocument:n}};function Ict({documentId:e,couldIssueCreditInvoice:t,...n}){const{closeDocument:i}=Tct(),[r,a]=S.useState(!1),[o,s]=S.useState(!1),l=S.useCallback(()=>{i({documentId:e})},[i,e]);return t?A.jsxs(A.Fragment,{children:[A.jsx(Mr,{label:"Close Document",children:A.jsx(bt,{className:"size-7.5 text-red-600",variant:"ghost",...n,onClick:()=>a(!0),children:A.jsx(Q9,{className:"size-5"})})}),A.jsx(fc,{open:r,onOpenChange:a,children:A.jsxs(Ac,{className:"sm:max-w-[425px]",children:[A.jsx(td,{children:A.jsx(nd,{children:"Should Issue Credit Invoice?"})}),A.jsxs(e0,{children:[A.jsx(bt,{onClick:()=>{a(!1),l()},variant:"secondary",children:"Just Close"}),A.jsx(bt,{onClick:()=>{a(!1),s(!0)},variant:"default",children:"Issue Credit Invoice"})]})]})}),A.jsx(c1,{documentId:e,documentType:Zn.CreditInvoice,open:o,setOpen:s})]}):A.jsx(vf,{onConfirm:l,title:"Are you sure you want to close this document?",children:A.jsx(bt,{className:"size-7.5 text-red-600",variant:"ghost",...n,children:A.jsx(Q9,{className:"size-5"})})})}function aw(e){return A.jsx(bt,{...e,variant:"ghost",className:Ft("size-7.5 text-green-500",e.className),children:A.jsx(kA,{className:"size-5"})})}const k0=({content:e,isLink:t})=>A.jsx(bt,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>B4e(e),children:t?A.jsx(q2e,{className:"size-5"}):A.jsx(y2e,{className:"size-5"})}),Oct="deleteDocument",Pct=()=>{const[{fetching:e},t]=or(ZTe),n=S.useCallback(async i=>{const r=`Error deleting document ID [${i.documentId}]`,a=`${Oct}-${i.documentId}`;Bt.loading("Deleting Document",{id:a});try{const o=await t(i),s=sr(o,r,a);if(s)return Bt.success("Success",{id:a,description:"Document was deleted"}),s.deleteDocument}catch(o){console.error(`${r}: ${o}`),Bt.error("Error",{id:a,description:r,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,deleteDocument:n}};function Rct({documentId:e}){const{deleteDocument:t}=Pct();function n(){t({documentId:e})}return A.jsx(vf,{onConfirm:n,title:"Are you sure you want to delete this document?",children:A.jsx(bt,{variant:"ghost",size:"icon",className:"size-7.5 text-red-500",children:A.jsx(qF,{className:"size-5"})})})}function jct(e,t){const n=new Uint8Array([239,187,191]),i=new Blob([n,e],{type:"text/csv;charset=UTF-8"}),r=URL.createObjectURL(i),a=document.createElement("a");a.href=r,a.download=`${t}.csv`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}const Mct=({createFileVariables:e,buttonProps:t,buttonContent:n,label:i})=>{const r=S.useCallback(()=>{e().then(({fileContent:a,fileName:o})=>{jct(a,o)})},[e]);return A.jsxs(i0,{children:[A.jsx(r0,{children:A.jsx(bt,{variant:"outline",className:"p-2",...t,onClick:r,children:n||A.jsx(eie,{size:20})})}),A.jsx(a0,{children:A.jsx("p",{children:i||"Download CSV"})})]})};function D$(e){return A.jsx(Mr,{disabled:!e.tooltip,label:e.tooltip,children:A.jsx(bt,{className:"size-7.5",variant:"ghost",...e,children:A.jsx(N6,{className:"size-5"})})})}function Lct(){const e=m1(),{authService:t}=S.useContext(qE),n=async()=>{await t.logout(),e(ki.LOGIN)};return A.jsx(bt,{variant:"ghost",onClick:n,children:"Log out"})}/*!
|
|
637
637
|
* html2canvas-pro 1.5.12 <https://yorickshan.github.io/html2canvas-pro/>
|
|
638
638
|
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
639
639
|
* Released under MIT License
|
|
@@ -756,7 +756,7 @@ T* `):z.join(` Tj
|
|
|
756
756
|
endobj\r
|
|
757
757
|
`},n.outline.count_r=function(i,r){for(var a=0;a<r.children.length;a++)i.count++,this.count_r(i,r.children[a]);return i.count}}])})(Cn.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,i,r,a,o,s){var l,c=this.decode.DCT_DECODE,d=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=o||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=(function(u){for(var m,h=256*u.charCodeAt(4)+u.charCodeAt(5),v=u.length,g={width:0,height:0,numcomponents:1},k=4;k<v;k+=2){if(k+=h,t.indexOf(u.charCodeAt(k+1))!==-1){m=256*u.charCodeAt(k+5)+u.charCodeAt(k+6),g={width:256*u.charCodeAt(k+7)+u.charCodeAt(k+8),height:m,numcomponents:u.charCodeAt(k+9)};break}h=256*u.charCodeAt(k+2)+u.charCodeAt(k+3)}return g})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}d={data:n,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:c,index:i,alias:r}}return d}})(Cn.API),Cn.API.processPNG=function(e,t,n,i){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var r,a=Avt(e,{checkCrc:!0}),o=a.width,s=a.height,l=a.channels,c=a.palette,d=a.depth;r=c&&l===1?(function(T){for(var I=T.width,$=T.height,j=T.data,P=T.palette,K=T.depth,q=!1,re=[],U=[],te=void 0,W=!1,le=0,be=0;be<P.length;be++){var oe=eJ(P[be],4),M=oe[0],Q=oe[1],L=oe[2],J=oe[3];re.push(M,Q,L),J!=null&&(J===0?(le++,U.length<1&&U.push(be)):J<255&&(W=!0))}if(W||le>1){q=!0,U=void 0;var ee=I*$;te=new Uint8Array(ee);for(var Y=new DataView(j.buffer),ue=0;ue<ee;ue++){var me=tP(Y,ue,K),ye=eJ(P[me],4)[3];te[ue]=ye}}else le===0&&(U=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:q?8:void 0,colorBytes:j,alphaBytes:te,needSMask:q,palette:re,mask:U}})(a):l===2||l===4?(function(T){for(var I=T.data,$=T.width,j=T.height,P=T.channels,K=T.depth,q=P===2?"DeviceGray":"DeviceRGB",re=P-1,U=$*j,te=re,W=U*te,le=1*U,be=Math.ceil(W*K/8),oe=Math.ceil(le*K/8),M=new Uint8Array(be),Q=new Uint8Array(oe),L=new DataView(I.buffer),J=new DataView(M.buffer),ee=new DataView(Q.buffer),Y=!1,ue=0;ue<U;ue++){for(var me=ue*P,ye=0;ye<te;ye++)aee(J,tP(L,me+ye,K),ue*te+ye,K);var ae=tP(L,me+te,K);ae<(1<<K)-1&&(Y=!0),aee(ee,ae,1*ue,K)}return{colorSpace:q,colorsPerPixel:re,sMaskBitsPerComponent:Y?K:void 0,colorBytes:M,alphaBytes:Q,needSMask:Y}})(a):(function(T){var I=T.data,$=T.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:$,colorsPerPixel:$==="DeviceGray"?1:3,colorBytes:I instanceof Uint16Array?(function(j){for(var P=j.length,K=new Uint8Array(2*P),q=new DataView(K.buffer,K.byteOffset,K.byteLength),re=0;re<P;re++)q.setUint16(2*re,j[re],!1);return K})(I):I,needSMask:!1}})(a);var u,m,h,v=r,g=v.colorSpace,k=v.colorsPerPixel,b=v.sMaskBitsPerComponent,w=v.colorBytes,C=v.alphaBytes,N=v.needSMask,_=v.palette,F=v.mask,B=null;return i!==Cn.API.image_compression.NONE&&typeof B3=="function"?(B=(function(T){var I;switch(T){case Cn.API.image_compression.FAST:I=11;break;case Cn.API.image_compression.MEDIUM:I=13;break;case Cn.API.image_compression.SLOW:I=14;break;default:I=12}return I})(i),u=this.decode.FLATE_DECODE,m="/Predictor ".concat(B," /Colors ").concat(k," /BitsPerComponent ").concat(d," /Columns ").concat(o),e=eee(w,Math.ceil(o*k*d/8),k,d,i),N&&(h=eee(C,Math.ceil(o*b/8),1,b,i))):(u=void 0,m=void 0,e=w,N&&(h=C)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:n,data:e,index:t,filter:u,decodeParameters:m,transparency:F,palette:_,sMask:h,predictor:B,width:o,height:s,bitsPerComponent:d,sMaskBitsPerComponent:b,colorSpace:g}}},(function(e){e.processGIF89A=function(t,n,i,r){var a=new Ovt(t),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},d=new nP(100).encode(c,100);return e.processJPEG.call(this,d,n,i,r)},e.processGIF87A=e.processGIF89A})(Cn.API),Od.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:r,green:i,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Od.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(n){Pr.log("bit decode error:"+n)}},Od.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,r=0;r<t;r++)for(var a=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+8*r*4,s=0;s<8&&8*r+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},Od.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<e;r++){var a=this.datav.getUint8(this.pos++,!0),o=i*this.width*4+2*r*4,s=a>>4,l=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*r+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},Od.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var r=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*i;if(r<this.palette.length){var o=this.palette[r];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},Od.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,c=a>>15?255:0,d=i*this.width*4+4*r;this.data[d]=l,this.data[d+1]=s,this.data[d+2]=o,this.data[d+3]=c}this.pos+=e}},Od.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var r=this.bottom_up?i:this.height-1-i,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,l=(o>>5&n)/n*255|0,c=(o>>11)/t*255|0,d=r*this.width*4+4*a;this.data[d]=c,this.data[d+1]=l,this.data[d+2]=s,this.data[d+3]=255}this.pos+=e}},Od.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=r,this.data[o+2]=i,this.data[o+3]=255}this.pos+=this.width%4}},Od.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=r,this.data[s+2]=i,this.data[s+3]=o}},Od.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,n,i,r){var a=new Od(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new nP(100).encode(l,100);return e.processJPEG.call(this,c,n,i,r)}})(Cn.API),see.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,n,i,r){var a=new see(t),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new nP(100).encode(l,100);return e.processJPEG.call(this,c,n,i,r)}})(Cn.API),Cn.API.processRGBA=function(e,t,n){for(var i=e.data,r=i.length,a=new Uint8Array(r/4*3),o=new Uint8Array(r/4),s=0,l=0,c=0;c<r;c+=4){var d=i[c],u=i[c+1],m=i[c+2],h=i[c+3];a[s++]=d,a[s++]=u,a[s++]=m,o[l++]=h}var v=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:v,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Cn.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},xv=Cn.API,nN=xv.getCharWidthsArray=function(e,t){var n,i,r=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:r.metadata.Unicode.widths,l=s.fof?s.fof:1,c=t.kerning?t.kerning:r.metadata.Unicode.kerning,d=c.fof?c.fof:1,u=t.doKerning!==!1,m=0,h=e.length,v=0,g=s[0]||l,k=[];for(n=0;n<h;n++)i=e.charCodeAt(n),typeof r.metadata.widthOfString=="function"?k.push((r.metadata.widthOfGlyph(r.metadata.characterToGlyph(i))+o*(1e3/a)||0)/1e3):(m=u&&br(c[i])==="object"&&!isNaN(parseInt(c[i][v],10))?c[i][v]/d:0,k.push((s[i]||g)/l+m)),v=i;return k},XJ=xv.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),i=t.font||this.internal.getFont(),r=t.charSpace||this.internal.getCharSpace();return xv.processArabic&&(e=xv.processArabic(e)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(e,n,r)/n:nN.apply(this,arguments).reduce(function(a,o){return a+o},0)},ZJ=function(e,t,n,i){for(var r=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;r.push(e.slice(0,a));var l=a;for(s=0;a!==o;)s+t[a]>i&&(r.push(e.slice(l,a)),s=0,l=a),s+=t[a],a++;return l!==a&&r.push(e.slice(l,a)),r},JJ=function(e,t,n){n||(n={});var i,r,a,o,s,l,c,d=[],u=[d],m=n.textIndent||0,h=0,v=0,g=e.split(" "),k=nN.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?g[0].length+2:n.lineIndent||0){var b=Array(l).join(" "),w=[];g.map(function(N){(N=N.split(/\s*\n/)).length>1?w=w.concat(N.map(function(_,F){return(F&&_.length?`
|
|
758
758
|
`:"")+_})):w.push(N[0])}),g=w,l=XJ.apply(this,[b,n])}for(a=0,o=g.length;a<o;a++){var C=0;if(i=g[a],l&&i[0]==`
|
|
759
|
-
`&&(i=i.substr(1),C=1),m+h+(v=(r=nN.apply(this,[i,n])).reduce(function(N,_){return N+_},0))>t||C){if(v>t){for(s=ZJ.apply(this,[i,r,t-(m+h),t]),d.push(s.shift()),d=[s.pop()];s.length;)u.push([s.shift()]);v=r.slice(i.length-(d[0]?d[0].length:0)).reduce(function(N,_){return N+_},0)}else d=[i];u.push(d),m=v+l,h=k}else d.push(i),m+=h+v,h=k}return c=l?function(N,_){return(_?b:"")+N.join(" ")}:function(N){return N.join(" ")},u.map(c)},xv.splitTextToSize=function(e,t,n){var i,r=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var u=this.internal.getFont(d.fontName,d.fontStyle),m="Unicode";return u.metadata[m]?{widths:u.metadata[m].widths||{0:1},kerning:u.metadata[m].kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/r;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/r:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=i.length;s<l;s++)c=c.concat(JJ.apply(this,[i[s],o,a]));return c},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",i={},r={},a=0;a<16;a++)i[n[a]]=t[a],r[t[a]]=n[a];var o=function(m){return"0x"+parseInt(m,10).toString(16)},s=e.__fontmetrics__.compress=function(m){var h,v,g,k,b=["{"];for(var w in m){if(h=m[w],isNaN(parseInt(w,10))?v="'"+w+"'":(w=parseInt(w,10),v=(v=o(w).slice(2)).slice(0,-1)+r[v.slice(-1)]),typeof h=="number")h<0?(g=o(h).slice(3),k="-"):(g=o(h).slice(2),k=""),g=k+g.slice(0,-1)+r[g.slice(-1)];else{if(br(h)!=="object")throw new Error("Don't know what to do with value type "+br(h)+".");g=s(h)}b.push(v+g)}return b.push("}"),b.join("")},l=e.__fontmetrics__.uncompress=function(m){if(typeof m!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,v,g,k,b={},w=1,C=b,N=[],_="",F="",B=m.length-1,T=1;T<B;T+=1)(k=m[T])=="'"?h?(g=h.join(""),h=void 0):h=[]:h?h.push(k):k=="{"?(N.push([C,g]),C={},g=void 0):k=="}"?((v=N.pop())[0][v[1]]=C,g=void 0,C=v[0]):k=="-"?w=-1:g===void 0?i.hasOwnProperty(k)?(_+=i[k],g=parseInt(_,16)*w,w=1,_=""):_+=k:i.hasOwnProperty(k)?(F+=i[k],C[g]=parseInt(F,16)*w,w=1,g=void 0,F=""):F+=k;return b},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},u={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(m){var h=m.font,v=u.Unicode[h.postScriptName];v&&(h.metadata.Unicode={},h.metadata.Unicode.widths=v.widths,h.metadata.Unicode.kerning=v.kerning);var g=d.Unicode[h.postScriptName];g&&(h.metadata.Unicode.encoding=g,h.encoding=g.codePages[0])}])})(Cn.API),(function(e){var t=function(n){for(var i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);return r};e.API.events.push(["addFont",function(n){var i=void 0,r=n.font,a=n.instance;if(!r.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(i=a.existsFileInVFS(r.postScriptName)===!1?a.loadFile(r.postScriptName):a.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(WN(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(r,i)}}])})(Cn),Cn.API.addSvgAsImage=function(e,t,n,i,r,a,o,s){if(isNaN(t)||isNaN(n))throw Pr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(r))throw Pr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=r;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},u=this;return(Gn.canvg?Promise.resolve(Gn.canvg):Ii(()=>import("./index.es-DvJwAZOE.js"),[])).catch(function(m){return Promise.reject(new Error("Could not load canvg: "+m))}).then(function(m){return m.default?m.default:m}).then(function(m){return m.fromString(c,e,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(m){return m.render(d)}).then(function(){u.addImage(l.toDataURL("image/jpeg",1),t,n,i,r,o,s)})},Cn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var r=0;r<this.internal.pages[i].length;r++)this.internal.pages[i][r]=this.internal.pages[i][r].replace(t,n);return this},Cn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var i,r,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,d=0,u=0;function m(v,g){var k,b=!1;for(k=0;k<v.length;k+=1)v[k]===g&&(b=!0);return b}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=s.length;for(u=0;u<h;u+=1)n[s[u]].value=n[s[u]].defaultValue,n[s[u]].explicitSet=!1}if(br(e)==="object"){for(r in e)if(a=e[r],m(s,r)&&a!==void 0){if(n[r].type==="boolean"&&typeof a=="boolean")n[r].value=a;else if(n[r].type==="name"&&m(n[r].valueSet,a))n[r].value=a;else if(n[r].type==="integer"&&Number.isInteger(a))n[r].value=a;else if(n[r].type==="array"){for(c=0;c<a.length;c+=1)if(i=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(d=0;d<a[c].length;d+=1)typeof a[c][d]!="number"&&(i=!1);i===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[r].value="["+l.join(" ")+"]"}else n[r].value=n[r].defaultValue;n[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var v,g=[];for(v in n)n[v].explicitSet===!0&&(n[v].type==="name"?g.push("/"+v+" /"+n[v].value):g.push("/"+v+" "+n[v].value));g.length!==0&&this.internal.write(`/ViewerPreferences
|
|
759
|
+
`&&(i=i.substr(1),C=1),m+h+(v=(r=nN.apply(this,[i,n])).reduce(function(N,_){return N+_},0))>t||C){if(v>t){for(s=ZJ.apply(this,[i,r,t-(m+h),t]),d.push(s.shift()),d=[s.pop()];s.length;)u.push([s.shift()]);v=r.slice(i.length-(d[0]?d[0].length:0)).reduce(function(N,_){return N+_},0)}else d=[i];u.push(d),m=v+l,h=k}else d.push(i),m+=h+v,h=k}return c=l?function(N,_){return(_?b:"")+N.join(" ")}:function(N){return N.join(" ")},u.map(c)},xv.splitTextToSize=function(e,t,n){var i,r=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var u=this.internal.getFont(d.fontName,d.fontStyle),m="Unicode";return u.metadata[m]?{widths:u.metadata[m].widths||{0:1},kerning:u.metadata[m].kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/r;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/r:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=i.length;s<l;s++)c=c.concat(JJ.apply(this,[i[s],o,a]));return c},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",i={},r={},a=0;a<16;a++)i[n[a]]=t[a],r[t[a]]=n[a];var o=function(m){return"0x"+parseInt(m,10).toString(16)},s=e.__fontmetrics__.compress=function(m){var h,v,g,k,b=["{"];for(var w in m){if(h=m[w],isNaN(parseInt(w,10))?v="'"+w+"'":(w=parseInt(w,10),v=(v=o(w).slice(2)).slice(0,-1)+r[v.slice(-1)]),typeof h=="number")h<0?(g=o(h).slice(3),k="-"):(g=o(h).slice(2),k=""),g=k+g.slice(0,-1)+r[g.slice(-1)];else{if(br(h)!=="object")throw new Error("Don't know what to do with value type "+br(h)+".");g=s(h)}b.push(v+g)}return b.push("}"),b.join("")},l=e.__fontmetrics__.uncompress=function(m){if(typeof m!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,v,g,k,b={},w=1,C=b,N=[],_="",F="",B=m.length-1,T=1;T<B;T+=1)(k=m[T])=="'"?h?(g=h.join(""),h=void 0):h=[]:h?h.push(k):k=="{"?(N.push([C,g]),C={},g=void 0):k=="}"?((v=N.pop())[0][v[1]]=C,g=void 0,C=v[0]):k=="-"?w=-1:g===void 0?i.hasOwnProperty(k)?(_+=i[k],g=parseInt(_,16)*w,w=1,_=""):_+=k:i.hasOwnProperty(k)?(F+=i[k],C[g]=parseInt(F,16)*w,w=1,g=void 0,F=""):F+=k;return b},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},u={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(m){var h=m.font,v=u.Unicode[h.postScriptName];v&&(h.metadata.Unicode={},h.metadata.Unicode.widths=v.widths,h.metadata.Unicode.kerning=v.kerning);var g=d.Unicode[h.postScriptName];g&&(h.metadata.Unicode.encoding=g,h.encoding=g.codePages[0])}])})(Cn.API),(function(e){var t=function(n){for(var i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);return r};e.API.events.push(["addFont",function(n){var i=void 0,r=n.font,a=n.instance;if(!r.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(i=a.existsFileInVFS(r.postScriptName)===!1?a.loadFile(r.postScriptName):a.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(WN(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(r,i)}}])})(Cn),Cn.API.addSvgAsImage=function(e,t,n,i,r,a,o,s){if(isNaN(t)||isNaN(n))throw Pr.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(r))throw Pr.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=r;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},u=this;return(Gn.canvg?Promise.resolve(Gn.canvg):Ii(()=>import("./index.es-CKlpQqlO.js"),[])).catch(function(m){return Promise.reject(new Error("Could not load canvg: "+m))}).then(function(m){return m.default?m.default:m}).then(function(m){return m.fromString(c,e,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(m){return m.render(d)}).then(function(){u.addImage(l.toDataURL("image/jpeg",1),t,n,i,r,o,s)})},Cn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var r=0;r<this.internal.pages[i].length;r++)this.internal.pages[i][r]=this.internal.pages[i][r].replace(t,n);return this},Cn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var i,r,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,d=0,u=0;function m(v,g){var k,b=!1;for(k=0;k<v.length;k+=1)v[k]===g&&(b=!0);return b}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=s.length;for(u=0;u<h;u+=1)n[s[u]].value=n[s[u]].defaultValue,n[s[u]].explicitSet=!1}if(br(e)==="object"){for(r in e)if(a=e[r],m(s,r)&&a!==void 0){if(n[r].type==="boolean"&&typeof a=="boolean")n[r].value=a;else if(n[r].type==="name"&&m(n[r].valueSet,a))n[r].value=a;else if(n[r].type==="integer"&&Number.isInteger(a))n[r].value=a;else if(n[r].type==="array"){for(c=0;c<a.length;c+=1)if(i=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(d=0;d<a[c].length;d+=1)typeof a[c][d]!="number"&&(i=!1);i===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[r].value="["+l.join(" ")+"]"}else n[r].value=n[r].defaultValue;n[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var v,g=[];for(v in n)n[v].explicitSet===!0&&(n[v].type==="name"?g.push("/"+v+" /"+n[v].value):g.push("/"+v+" "+n[v].value));g.length!==0&&this.internal.write(`/ViewerPreferences
|
|
760
760
|
<<
|
|
761
761
|
`+g.join(`
|
|
762
762
|
`)+`
|
|
@@ -883,4 +883,4 @@ const theme = ${JSON.stringify(t,null,2)};
|
|
|
883
883
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
884
884
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
885
885
|
|
|
886
|
-
export default theme;`}function Jte(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const K2t=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let i=0;i<t.length;i+=1)n+=+t[i];return n};function W2t(e){Object.assign(e,{alpha(t,n){const i=this||e;return i.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bSe(t,K2t(n))},lighten(t,n){const i=this||e;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${t}, #fff ${Jte(n)})`:c5(t,n)},darken(t,n){const i=this||e;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${t}, #000 ${Jte(n)})`:l5(t,n)}})}function u6(e={},...t){const{breakpoints:n,mixins:i={},spacing:r,palette:a={},transitions:o={},typography:s={},shape:l,colorSpace:c,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error($p(20));const u=L8({...a,colorSpace:c}),m=pSe(e);let h=lc(m,{mixins:R2t(m.breakpoints,i),palette:u,shadows:U2t.slice(),typography:ESe(u,s),transitions:V2t(o),zIndex:{...G2t}});return h=lc(h,d),h=t.reduce((v,g)=>lc(v,g),h),h.unstable_sxConfig={...Cw,...d?.unstable_sxConfig},h.unstable_sx=function(g){return _w({sx:g,theme:this})},h.toRuntimeSource=BSe,W2t(h),h}function Y2t(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const X2t=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Y2t(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function DSe(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function TSe(e){return e==="dark"?X2t:[]}function Z2t(e){const{palette:t={mode:"light"},opacity:n,overlays:i,colorSpace:r,...a}=e,o=L8({...t,colorSpace:r});return{palette:o,opacity:{...DSe(o.mode),...n},overlays:i||TSe(o.mode),...a}}function J2t(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const eFt=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],tFt=e=>(t,n)=>{const i=e.rootSelector||":root",r=e.colorSchemeSelector;let a=r;if(r==="class"&&(a=".%s"),r==="data"&&(a="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(a=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return eFt(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:o}}:a?{[a.replace("%s",t)]:o,[`${i}, ${a.replace("%s",t)}`]:n}:{[i]:{...n,...o}}}if(a&&a!=="media")return`${i}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[i]:n}};if(a)return a.replace("%s",String(t))}return i};function nFt(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function St(e,t,n){!e[t]&&n&&(e[t]=n)}function fk(e){return typeof e!="string"||!e.startsWith("hsl")?e:ySe(e)}function oA(e,t){`${t}Channel`in e||(e[`${t}Channel`]=uk(fk(e[t])))}function iFt(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ju=e=>{try{return e()}catch{}},rFt=(e="mui")=>S2t(e);function jP(e,t,n,i,r){if(!n)return;n=n===!0?{}:n;const a=r==="dark"?"dark":"light";if(!i){t[r]=Z2t({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}const{palette:o,...s}=u6({...i,palette:{mode:a,...n?.palette},colorSpace:e});return t[r]={...n,palette:o,opacity:{...DSe(a),...n?.opacity},overlays:n?.overlays||TSe(a)},s}function aFt(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=J2t,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=e,u=Object.keys(n)[0],m=i||(n.light&&u!=="light"?"light":u),h=rFt(a),{[m]:v,light:g,dark:k,...b}=n,w={...b};let C=v;if((m==="dark"&&!("dark"in n)||m==="light"&&!("light"in n))&&(C=!0),!C)throw new Error($p(21,m));let N;o&&(N="oklch");const _=jP(N,w,C,d,m);g&&!w.light&&jP(N,w,g,void 0,"light"),k&&!w.dark&&jP(N,w,k,void 0,"dark");let F={defaultColorScheme:m,..._,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:w,font:{...P2t(_.typography),..._.font},spacing:iFt(d.spacing)};Object.keys(F.colorSchemes).forEach(j=>{const P=F.colorSchemes[j].palette,K=re=>{const U=re.split("-"),te=U[1],W=U[2];return h(re,P[te][W])};P.mode==="light"&&(St(P.common,"background","#fff"),St(P.common,"onBackground","#000")),P.mode==="dark"&&(St(P.common,"background","#000"),St(P.common,"onBackground","#fff"));function q(re,U,te){if(N){let W;return re===zh&&(W=`transparent ${((1-te)*100).toFixed(0)}%`),re===gr&&(W=`#000 ${(te*100).toFixed(0)}%`),re===vr&&(W=`#fff ${(te*100).toFixed(0)}%`),`color-mix(in ${N}, ${U}, ${W})`}return re(U,te)}if(nFt(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){St(P.Alert,"errorColor",q(gr,P.error.light,.6)),St(P.Alert,"infoColor",q(gr,P.info.light,.6)),St(P.Alert,"successColor",q(gr,P.success.light,.6)),St(P.Alert,"warningColor",q(gr,P.warning.light,.6)),St(P.Alert,"errorFilledBg",K("palette-error-main")),St(P.Alert,"infoFilledBg",K("palette-info-main")),St(P.Alert,"successFilledBg",K("palette-success-main")),St(P.Alert,"warningFilledBg",K("palette-warning-main")),St(P.Alert,"errorFilledColor",ju(()=>P.getContrastText(P.error.main))),St(P.Alert,"infoFilledColor",ju(()=>P.getContrastText(P.info.main))),St(P.Alert,"successFilledColor",ju(()=>P.getContrastText(P.success.main))),St(P.Alert,"warningFilledColor",ju(()=>P.getContrastText(P.warning.main))),St(P.Alert,"errorStandardBg",q(vr,P.error.light,.9)),St(P.Alert,"infoStandardBg",q(vr,P.info.light,.9)),St(P.Alert,"successStandardBg",q(vr,P.success.light,.9)),St(P.Alert,"warningStandardBg",q(vr,P.warning.light,.9)),St(P.Alert,"errorIconColor",K("palette-error-main")),St(P.Alert,"infoIconColor",K("palette-info-main")),St(P.Alert,"successIconColor",K("palette-success-main")),St(P.Alert,"warningIconColor",K("palette-warning-main")),St(P.AppBar,"defaultBg",K("palette-grey-100")),St(P.Avatar,"defaultBg",K("palette-grey-400")),St(P.Button,"inheritContainedBg",K("palette-grey-300")),St(P.Button,"inheritContainedHoverBg",K("palette-grey-A100")),St(P.Chip,"defaultBorder",K("palette-grey-400")),St(P.Chip,"defaultAvatarColor",K("palette-grey-700")),St(P.Chip,"defaultIconColor",K("palette-grey-700")),St(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),St(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),St(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),St(P.LinearProgress,"primaryBg",q(vr,P.primary.main,.62)),St(P.LinearProgress,"secondaryBg",q(vr,P.secondary.main,.62)),St(P.LinearProgress,"errorBg",q(vr,P.error.main,.62)),St(P.LinearProgress,"infoBg",q(vr,P.info.main,.62)),St(P.LinearProgress,"successBg",q(vr,P.success.main,.62)),St(P.LinearProgress,"warningBg",q(vr,P.warning.main,.62)),St(P.Skeleton,"bg",N?q(zh,P.text.primary,.11):`rgba(${K("palette-text-primaryChannel")} / 0.11)`),St(P.Slider,"primaryTrack",q(vr,P.primary.main,.62)),St(P.Slider,"secondaryTrack",q(vr,P.secondary.main,.62)),St(P.Slider,"errorTrack",q(vr,P.error.main,.62)),St(P.Slider,"infoTrack",q(vr,P.info.main,.62)),St(P.Slider,"successTrack",q(vr,P.success.main,.62)),St(P.Slider,"warningTrack",q(vr,P.warning.main,.62));const re=N?q(gr,P.background.default,.6825):vN(P.background.default,.8);St(P.SnackbarContent,"bg",re),St(P.SnackbarContent,"color",ju(()=>N?d6.text.primary:P.getContrastText(re))),St(P.SpeedDialAction,"fabHoverBg",vN(P.background.paper,.15)),St(P.StepConnector,"border",K("palette-grey-400")),St(P.StepContent,"border",K("palette-grey-400")),St(P.Switch,"defaultColor",K("palette-common-white")),St(P.Switch,"defaultDisabledColor",K("palette-grey-100")),St(P.Switch,"primaryDisabledColor",q(vr,P.primary.main,.62)),St(P.Switch,"secondaryDisabledColor",q(vr,P.secondary.main,.62)),St(P.Switch,"errorDisabledColor",q(vr,P.error.main,.62)),St(P.Switch,"infoDisabledColor",q(vr,P.info.main,.62)),St(P.Switch,"successDisabledColor",q(vr,P.success.main,.62)),St(P.Switch,"warningDisabledColor",q(vr,P.warning.main,.62)),St(P.TableCell,"border",q(vr,q(zh,P.divider,1),.88)),St(P.Tooltip,"bg",q(zh,P.grey[700],.92))}if(P.mode==="dark"){St(P.Alert,"errorColor",q(vr,P.error.light,.6)),St(P.Alert,"infoColor",q(vr,P.info.light,.6)),St(P.Alert,"successColor",q(vr,P.success.light,.6)),St(P.Alert,"warningColor",q(vr,P.warning.light,.6)),St(P.Alert,"errorFilledBg",K("palette-error-dark")),St(P.Alert,"infoFilledBg",K("palette-info-dark")),St(P.Alert,"successFilledBg",K("palette-success-dark")),St(P.Alert,"warningFilledBg",K("palette-warning-dark")),St(P.Alert,"errorFilledColor",ju(()=>P.getContrastText(P.error.dark))),St(P.Alert,"infoFilledColor",ju(()=>P.getContrastText(P.info.dark))),St(P.Alert,"successFilledColor",ju(()=>P.getContrastText(P.success.dark))),St(P.Alert,"warningFilledColor",ju(()=>P.getContrastText(P.warning.dark))),St(P.Alert,"errorStandardBg",q(gr,P.error.light,.9)),St(P.Alert,"infoStandardBg",q(gr,P.info.light,.9)),St(P.Alert,"successStandardBg",q(gr,P.success.light,.9)),St(P.Alert,"warningStandardBg",q(gr,P.warning.light,.9)),St(P.Alert,"errorIconColor",K("palette-error-main")),St(P.Alert,"infoIconColor",K("palette-info-main")),St(P.Alert,"successIconColor",K("palette-success-main")),St(P.Alert,"warningIconColor",K("palette-warning-main")),St(P.AppBar,"defaultBg",K("palette-grey-900")),St(P.AppBar,"darkBg",K("palette-background-paper")),St(P.AppBar,"darkColor",K("palette-text-primary")),St(P.Avatar,"defaultBg",K("palette-grey-600")),St(P.Button,"inheritContainedBg",K("palette-grey-800")),St(P.Button,"inheritContainedHoverBg",K("palette-grey-700")),St(P.Chip,"defaultBorder",K("palette-grey-700")),St(P.Chip,"defaultAvatarColor",K("palette-grey-300")),St(P.Chip,"defaultIconColor",K("palette-grey-300")),St(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),St(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),St(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),St(P.LinearProgress,"primaryBg",q(gr,P.primary.main,.5)),St(P.LinearProgress,"secondaryBg",q(gr,P.secondary.main,.5)),St(P.LinearProgress,"errorBg",q(gr,P.error.main,.5)),St(P.LinearProgress,"infoBg",q(gr,P.info.main,.5)),St(P.LinearProgress,"successBg",q(gr,P.success.main,.5)),St(P.LinearProgress,"warningBg",q(gr,P.warning.main,.5)),St(P.Skeleton,"bg",N?q(zh,P.text.primary,.13):`rgba(${K("palette-text-primaryChannel")} / 0.13)`),St(P.Slider,"primaryTrack",q(gr,P.primary.main,.5)),St(P.Slider,"secondaryTrack",q(gr,P.secondary.main,.5)),St(P.Slider,"errorTrack",q(gr,P.error.main,.5)),St(P.Slider,"infoTrack",q(gr,P.info.main,.5)),St(P.Slider,"successTrack",q(gr,P.success.main,.5)),St(P.Slider,"warningTrack",q(gr,P.warning.main,.5));const re=N?q(vr,P.background.default,.985):vN(P.background.default,.98);St(P.SnackbarContent,"bg",re),St(P.SnackbarContent,"color",ju(()=>N?_Se.text.primary:P.getContrastText(re))),St(P.SpeedDialAction,"fabHoverBg",vN(P.background.paper,.15)),St(P.StepConnector,"border",K("palette-grey-600")),St(P.StepContent,"border",K("palette-grey-600")),St(P.Switch,"defaultColor",K("palette-grey-300")),St(P.Switch,"defaultDisabledColor",K("palette-grey-600")),St(P.Switch,"primaryDisabledColor",q(gr,P.primary.main,.55)),St(P.Switch,"secondaryDisabledColor",q(gr,P.secondary.main,.55)),St(P.Switch,"errorDisabledColor",q(gr,P.error.main,.55)),St(P.Switch,"infoDisabledColor",q(gr,P.info.main,.55)),St(P.Switch,"successDisabledColor",q(gr,P.success.main,.55)),St(P.Switch,"warningDisabledColor",q(gr,P.warning.main,.55)),St(P.TableCell,"border",q(gr,q(zh,P.divider,1),.68)),St(P.Tooltip,"bg",q(zh,P.grey[700],.92))}oA(P.background,"default"),oA(P.background,"paper"),oA(P.common,"background"),oA(P.common,"onBackground"),oA(P,"divider"),Object.keys(P).forEach(re=>{const U=P[re];re!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&St(P[re],"mainChannel",uk(fk(U.main))),U.light&&St(P[re],"lightChannel",uk(fk(U.light))),U.dark&&St(P[re],"darkChannel",uk(fk(U.dark))),U.contrastText&&St(P[re],"contrastTextChannel",uk(fk(U.contrastText))),re==="text"&&(oA(P[re],"primary"),oA(P[re],"secondary")),re==="action"&&(U.active&&oA(P[re],"active"),U.selected&&oA(P[re],"selected")))})}),F=t.reduce((j,P)=>lc(j,P),F);const B={prefix:a,disableCssColorScheme:r,shouldSkipGeneratingVar:s,getSelector:tFt(F),enableContrastVars:o},{vars:T,generateThemeVars:I,generateStyleSheets:$}=C2t(F,B);return F.vars=T,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([j,P])=>{F[j]=P}),F.generateThemeVars=I,F.generateStyleSheets=$,F.generateSpacing=function(){return hSe(d.spacing,T8(this))},F.getColorSchemeSelector=_2t(l),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...Cw,...d?.unstable_sxConfig},F.unstable_sx=function(P){return _w({sx:P,theme:this})},F.toRuntimeSource=BSe,F}function ene(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:L8({...n===!0?{}:n.palette,mode:t})})}function $8(e={},...t){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||"light",l=r?.[s],c={...r,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in e))return u6(e,...t);let d=n;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const u=u6({...e,palette:d},...t);return u.defaultColorScheme=s,u.colorSchemes=c,u.palette.mode==="light"&&(u.colorSchemes.light={...c.light!==!0&&c.light,palette:u.palette},ene(u,"dark",c.dark)),u.palette.mode==="dark"&&(u.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:u.palette},ene(u,"light",c.light)),u}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),aFt({...o,colorSchemes:c,defaultColorScheme:s,...typeof i!="boolean"&&i},...t)}const oFt=$8();function sFt({theme:e,...t}){const n=vp in e?e[vp]:void 0;return A.jsx(xSe,{...t,themeId:n?vp:void 0,theme:n||e})}const yN={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lFt}=w2t({themeId:vp,theme:()=>$8({cssVariables:!0}),colorSchemeStorageKey:yN.colorSchemeStorageKey,modeStorageKey:yN.modeStorageKey,defaultColorScheme:{light:yN.defaultLightColorScheme,dark:yN.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:ESe(e.palette,e.typography)};return t.unstable_sx=function(i){return _w({sx:i,theme:this})},t}}),cFt=lFt;function dFt({theme:e,...t}){const n=S.useMemo(()=>{if(typeof e=="function")return e;const i=vp in e?e[vp]:e;return"colorSchemes"in i?null:"vars"in i?e:{...e,vars:null}},[e]);return n?A.jsx(sFt,{theme:n,...t}):A.jsx(cFt,{theme:e,...t})}function uFt(e){return A.jsx(gSe,{...e,defaultTheme:oFt,themeId:vp})}function ISe(e){return function(n){return A.jsx(uFt,{styles:typeof e=="function"?i=>e({theme:i,...n}):e})}}function oTt(){return X_t}function fFt(e){return d2t(e)}const f6=typeof ISe({})=="function",AFt=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),mFt=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),OSe=(e,t=!1)=>{const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([a,o])=>{const s=e.getColorSchemeSelector(a);s.startsWith("@")?n[s]={":root":{colorScheme:o.palette?.mode}}:n[s.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}});let i={html:AFt(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...mFt(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const r=e.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},iC="mui-ecs",hFt=e=>{const t=OSe(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${iC})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([i,r])=>{const a=e.getColorSchemeSelector(i);a.startsWith("@")?n[a]={[`:root:not(:has(.${iC}))`]:{colorScheme:r.palette?.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${iC}))`]:{colorScheme:r.palette?.mode}}}),t},pFt=ISe(f6?({theme:e,enableColorScheme:t})=>OSe(e,t):({theme:e})=>hFt(e));function gFt(e){const t=fFt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=t;return A.jsxs(S.Fragment,{children:[f6&&A.jsx(pFt,{enableColorScheme:i}),!f6&&!i&&A.jsx("span",{className:iC,style:{display:"none"}}),n]})}var d5=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vFt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yFt=class{#e=vFt;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},A6=new yFt;function bFt(e){setTimeout(e,0)}var u5=typeof window>"u"||"Deno"in globalThis;function Md(){}function kFt(e,t){return typeof e=="function"?e(t):e}function wFt(e){return typeof e=="number"&&e>=0&&e!==1/0}function SFt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m6(e,t){return typeof e=="function"?e(t):e}function xFt(e,t){return typeof e=="function"?e(t):e}function tne(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:a,queryKey:o,stale:s}=e;if(o){if(i){if(t.queryHash!==U8(o,t.options))return!1}else if(!f1(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||r&&r!==t.state.fetchStatus||a&&!a(t))}function nne(e,t){const{exact:n,status:i,predicate:r,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(u1(t.options.mutationKey)!==u1(a))return!1}else if(!f1(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||r&&!r(t))}function U8(e,t){return(t?.queryKeyHashFn||u1)(e)}function u1(e){return JSON.stringify(e,(t,n)=>h6(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function f1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>f1(e[n],t[n])):!1}var NFt=Object.prototype.hasOwnProperty;function PSe(e,t){if(e===t)return e;const n=ine(e)&&ine(t);if(!n&&!(h6(e)&&h6(t)))return t;const r=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:a[c],u=e[d],m=t[d];if(u===m){s[d]=u,(n?c<r:NFt.call(e,d))&&l++;continue}if(u===null||m===null||typeof u!="object"||typeof m!="object"){s[d]=m;continue}const h=PSe(u,m);s[d]=h,h===u&&l++}return r===o&&l===r?e:s}function ine(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h6(e){if(!rne(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!rne(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rne(e){return Object.prototype.toString.call(e)==="[object Object]"}function CFt(e){return new Promise(t=>{A6.setTimeout(t,e)})}function _Ft(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?PSe(e,t):t}function FFt(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function EFt(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Q8=Symbol();function RSe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Q8?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var BFt=class extends d5{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!u5&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},jSe=new BFt;function DFt(){let e,t;const n=new Promise((r,a)=>{e=r,t=a});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},n.reject=r=>{i({status:"rejected",reason:r}),t(r)},n}var TFt=bFt;function IFt(){let e=[],t=0,n=s=>{s()},i=s=>{s()},r=TFt;const a=s=>{t?e.push(s):r(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&r(()=>{i(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{i=s},setScheduler:s=>{r=s}}}var Gs=IFt(),OFt=class extends d5{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!u5&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jF=new OFt;function PFt(e){return Math.min(1e3*2**e,3e4)}function MSe(e){return(e??"online")==="online"?jF.isOnline():!0}var p6=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function LSe(e){let t=!1,n=0,i;const r=DFt(),a=()=>r.status!=="pending",o=g=>{if(!a()){const k=new p6(g);m(k),e.onCancel?.(k)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>jSe.isFocused()&&(e.networkMode==="always"||jF.isOnline())&&e.canRun(),d=()=>MSe(e.networkMode)&&e.canRun(),u=g=>{a()||(i?.(),r.resolve(g))},m=g=>{a()||(i?.(),r.reject(g))},h=()=>new Promise(g=>{i=k=>{(a()||c())&&g(k)},e.onPause?.()}).then(()=>{i=void 0,a()||e.onContinue?.()}),v=()=>{if(a())return;let g;const k=n===0?e.initialPromise:void 0;try{g=k??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(u).catch(b=>{if(a())return;const w=e.retry??(u5?0:3),C=e.retryDelay??PFt,N=typeof C=="function"?C(n,b):C,_=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!_){m(b);return}n++,e.onFail?.(n,b),CFt(N).then(()=>c()?void 0:h()).then(()=>{t?m(b):v()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?v():h().then(v),r)}}var $Se=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wFt(this.gcTime)&&(this.#e=A6.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u5?1/0:300*1e3))}clearGcTimeout(){this.#e&&(A6.clearTimeout(this.#e),this.#e=void 0)}},RFt=class extends $Se{#e;#t;#n;#i;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ane(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ane(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=_Ft(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Md).catch(Md):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>xFt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q8||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m6(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!SFt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,i=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},r=()=>{const s=RSe(this.options,t),c=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(d),d})();return this.#o=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return i(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=LSe({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof p6&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#r.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof p6){if(s.silent)return this.#r.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...jFt(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Gs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function jFt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MSe(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ane(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function one(e){return{onFetch:(t,n)=>{const i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const u=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},m=RSe(t.options,t.fetchOptions),h=async(v,g,k)=>{if(d)return Promise.reject();if(g==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:g,direction:k?"backward":"forward",meta:t.options.meta};return u(F),F})(),C=await m(w),{maxPages:N}=t.options,_=k?EFt:FFt;return{pages:_(v.pages,C,N),pageParams:_(v.pageParams,g,N)}};if(r&&a.length){const v=r==="backward",g=v?MFt:sne,k={pages:a,pageParams:o},b=g(i,k);s=await h(k,b,v)}else{const v=e??a.length;do{const g=l===0?o[0]??i.initialPageParam:sne(i,s);if(l>0&&g==null)break;s=await h(s,g),l++}while(l<v)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function sne(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function MFt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var LFt=class extends $Se{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||$Ft(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=LSe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#r({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",r=!this.#i.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:r})}const a=await this.#i.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#r({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,e,this.state.context,this,n),await this.options.onError?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,e,this.state.context,n),a}finally{this.#r({type:"error",error:a})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Gs.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function $Ft(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var UFt=class extends d5{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new LFt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=bN(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=bN(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=bN(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(r=>r.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=bN(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gs.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>nne(t,n))}findAll(e={}){return this.getAll().filter(t=>nne(e,t))}notify(e){Gs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Gs.batch(()=>Promise.all(e.map(t=>t.continue().catch(Md))))}};function bN(e){return e.options.scope?.id}var QFt=class extends d5{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,r=t.queryHash??U8(i,t);let a=this.get(r);return a||(a=new RFt({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Gs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tne(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tne(e,n)):t}notify(e){Gs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Gs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},HFt=class{#e;#t;#n;#i;#r;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new QFt,this.#t=e.mutationCache||new UFt,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=jSe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=jF.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(m6(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(i.queryHash)?.state.data,o=kFt(t,a);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Gs.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Gs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Gs.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Gs.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(i).then(Md).catch(Md)}invalidateQueries(e,t={}){return Gs.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Gs.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let a=r.fetch(void 0,n);return n.throwOnError||(a=a.catch(Md)),r.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(Md)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(m6(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Md).catch(Md)}fetchInfiniteQuery(e){return e.behavior=one(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Md).catch(Md)}ensureInfiniteQueryData(e){return e.behavior=one(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jF.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(u1(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{f1(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(u1(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{f1(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=U8(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Q8&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},zFt=S.createContext(void 0),VFt=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),A.jsx(zFt.Provider,{value:e,children:t}));function GFt(){const e=jne();return S.useEffect(()=>{const t=e[e.length-1],n=t?.handle;if(n?.title){const i=typeof n.title=="function"?n.title(t.data):n.title;document.title=`${i} - Accounter`}else document.title="Accounter"},[e]),A.jsx("div",{style:{display:"none"}})}var qFt=(e,t,n,i,r,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function d(h){(Array.isArray(e)?e:[e]).forEach(v=>{let g=v==="class",k=g&&a?r.map(b=>a[b]||b):r;g?(l.classList.remove(...k),l.classList.add(a&&a[h]?a[h]:h)):l.setAttribute(v,h)}),u(h)}function u(h){s&&c.includes(h)&&(l.style.colorScheme=h)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let h=localStorage.getItem(t)||n,v=o&&h==="system"?m():h;d(v)}catch{}},KFt=S.createContext(void 0),WFt={setTheme:e=>{},themes:[]},YFt=()=>{var e;return(e=S.useContext(KFt))!=null?e:WFt};S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,t,a,e,s,o,i,r]).slice(1,-1);return S.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${qFt.toString()})(${d})`}})});const XFt=({...e})=>{const{theme:t="system"}=YFt();return A.jsx(hYe,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...e})};var MP=(e,t)=>gC(e.kind,e,{...e.context,authAttempt:t});function USe(e){return({client:t,forward:n})=>{var i=new Set,r=eR(),a=eR(),o=new Map;function s(){c=void 0;var u=o;o=new Map,u.forEach(r.next)}function l(u){c=void 0;var m=o;o=new Map,m.forEach((h=>{a.next(rre(h,u))}))}var c,d=null;return u=>{function m(){c=Promise.resolve().then((()=>e({mutate(b,w,C){var N=t.createRequestOperation("mutation",ny(b,w),C);return W6(XF(1)(Cl((_=>_.operation.key===N.key&&N.context._instance===_.operation.context._instance))(JP((()=>{var _=v(N);i.add(_.context._instance),r.next(_)}))(k))))},appendHeaders(b,w){var C=typeof b.context.fetchOptions=="function"?b.context.fetchOptions():b.context.fetchOptions||{};return gC(b.kind,b,{...b.context,fetchOptions:{...C,headers:{...C.headers,...w}}})}}))).then((b=>{b&&(d=b),s()})).catch((b=>{l(b)}))}m();function h(b){o.set(b.key,MP(b,!0)),d&&!c&&(c=d.refreshAuth().then(s).catch(l))}function v(b){return d?d.addAuthToOperation(b):b}var g=Cl(Boolean)(Zie((b=>b.kind==="teardown"?(o.delete(b.key),b):b.context._instance&&i.has(b.context._instance)?b:b.context.authAttempt?v(b):c||!d?(c||m(),o.has(b.key)||o.set(b.key,MP(b,!1)),null):(function(C){return!C.context.authAttempt&&d&&d.willAuthError&&d.willAuthError(C)})(b)?(h(b),null):v(MP(b,!1))))(Dk([r.source,u]))),k=n(g);return Dk([a.source,Cl((b=>!i.has(b.operation.context._instance)&&b.error&&(function(C){return d&&d.didAuthError&&d.didAuthError(C.error,C.operation)})(b)&&!b.operation.context.authAttempt?(h(b.operation),!1):(i.has(b.operation.context._instance)&&i.delete(b.operation.context._instance),!0)))(k)])}}}function QSe(e){if(e.error?.networkError){console.error("Network Error:",e.error.networkError),Bt.error("Network Error",{description:"Failed to connect to the server. Please check your connection.",duration:5e3});return}if(e.error?.graphQLErrors?.length){const t=e.error.graphQLErrors[0],{message:n}=t;console.error("GraphQL Error:",t),Bt.error("Operation Error",{description:n||"An error occurred while processing your request.",duration:5e3})}}function ZFt({children:e}){const{authService:t}=S.useContext(qE),n=m1(),i=t.isLoggedIn(),r=S.useMemo(()=>t.authToken(),[t,i]),a=S.useMemo(()=>{let o;return o="https://accounter.onrender.com/graphql",sre({url:o,exchanges:[ore({onResult(s){if(s?.error?.graphQLErrors.some(c=>c.extensions?.code==="FORBIDDEN")||s?.error?.response?.status===401){n(ki.LOGIN,{state:{message:"You are not authorized to access this page"}});return}QSe(s)}}),USe(async s=>({addAuthToOperation(l){return r?s.appendHeaders(l,{Authorization:r}):l},didAuthError(l,c){return l?.response?.status===401||l?.graphQLErrors?.some(d=>d.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),are]})},[n,r,t]);return S.useEffect(()=>{a||n("/login")},[a,n]),a?A.jsx(XDe,{value:a,children:e}):A.jsx(UCe,{to:"/login",state:{prevPath:window.location.pathname}})}const JFt=new HFt({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),eEt=$8({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:qh.A400}}});function tEt(){return A.jsx(Fse,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:A.jsxs(dFt,{theme:eEt,children:[A.jsx(gFt,{}),A.jsxs(ttt,{children:[A.jsx(XFt,{}),A.jsx(ZFt,{children:A.jsx(VFt,{client:JFt,children:A.jsxs(ntt,{children:[A.jsx(GFt,{}),A.jsx(cSe,{}),A.jsx($ne,{})]})})})]})]})})}function nEt(){if(!new V1().isLoggedIn())throw Sne(ki.LOGIN);return null}function iEt(){if(new V1().isLoggedIn())throw Sne(ki.HOME);return null}let kN=null;function HSe(){if(kN)return kN;const e=new V1;let t;return t="https://accounter.onrender.com/graphql",kN=sre({url:t,exchanges:[ore({onResult(n){QSe(n)}}),USe(async n=>({addAuthToOperation(i){const r=e.authToken();return r?n.appendHeaders(i,{Authorization:r}):i},didAuthError(i,r){return i?.response?.status===401||i?.graphQLErrors?.some(a=>a.extensions?.code==="FORBIDDEN")},async refreshAuth(){e.logout()}})),are]}),kN}function rEt(e){if(!e.chargeId)throw new Response("Charge ID is required",{status:400});return{chargeId:e.chargeId}}function aEt(e){if(!e.businessId)throw new Response("Business ID is required",{status:400});return{businessId:e.businessId}}async function oEt({params:e}){const{chargeId:t}=rEt(e),i=await HSe().query(Cre,{chargeId:t}).toPromise();if(!i.data?.charge)throw new Response("Charge not found",{status:404});return i.data}async function sEt({params:e}){const{businessId:t}=aEt(e),i=await HSe().query(UTe,{businessId:t}).toPromise();if(!i.data?.business)throw new Response("Business not found",{status:404});return i.data}const lne=S.lazy(()=>Ii(()=>import("./all-charges-B88-JVp0.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.AllCharges}))),lEt=S.lazy(()=>Ii(()=>import("./missing-info-charges-DptgiNMX.js"),__vite__mapDeps([6,4,5])).then(e=>({default:e.MissingInfoCharges}))),cEt=S.lazy(()=>Ii(()=>Promise.resolve().then(()=>Bct),void 0).then(e=>({default:e.Charge}))),dEt=S.lazy(()=>Ii(()=>import("./charges-ledger-validation-D0UN5-yy.js"),__vite__mapDeps([7,1,2,3,4,5,8])).then(e=>({default:e.ChargesLedgerValidation}))),uEt=S.lazy(()=>Ii(()=>import("./index-CiZLBY-T.js"),__vite__mapDeps([9,10,11,5])).then(e=>({default:e.Businesses}))),fEt=S.lazy(()=>Ii(()=>import("./business-CxsRSA_r.js"),__vite__mapDeps([12,13,10,11,14,15,16,17])).then(e=>({default:e.BusinessScreen}))),AEt=S.lazy(()=>Ii(()=>Promise.resolve().then(()=>ltt),void 0).then(e=>({default:e.BusinessTransactionsSummery}))),mEt=S.lazy(()=>Ii(()=>import("./business-transactions-single-idJgJNHY.js"),[]).then(e=>({default:e.BusinessTransactionsSingle}))),hEt=S.lazy(()=>Ii(()=>import("./index-BSCXwbPK.js"),__vite__mapDeps([18,19])).then(e=>({default:e.BusinessTrips}))),pEt=S.lazy(()=>Ii(()=>import("./business-trip-C1SwPMTA.js"),__vite__mapDeps([20,19])).then(e=>({default:e.BusinessTrip}))),gEt=S.lazy(()=>Ii(()=>import("./index-O1k5sVaE.js"),[]).then(e=>({default:e.ChartPage}))),vEt=S.lazy(()=>Ii(()=>import("./index-Bco41uAi.js"),__vite__mapDeps([21,22,15,2,3])).then(e=>({default:e.MonthlyIncomeExpenseChart}))),yEt=S.lazy(()=>Ii(()=>import("./index-CBxS5gse.js"),__vite__mapDeps([23,24,2,3,25])).then(e=>({default:e.DocumentsReport}))),bEt=S.lazy(()=>Ii(()=>import("./issue-document-MHaHnees.js"),[]).then(e=>({default:e.IssueDocumentScreen}))),kEt=S.lazy(()=>Ii(()=>import("./index-C-05m3Xe.js"),__vite__mapDeps([26,3])).then(e=>({default:e.IssueDocuments}))),wEt=S.lazy(()=>Ii(()=>import("./index-aTVSOG7M.js"),[]).then(e=>({default:e.TrialBalanceReport}))),SEt=S.lazy(()=>Ii(()=>import("./index-ByEhIp5_.js"),__vite__mapDeps([27,25,22,16])).then(e=>({default:e.ContoReport}))),xEt=S.lazy(()=>Ii(()=>import("./index--FKfT8sG.js"),__vite__mapDeps([28,29,4,5,1,2,3])).then(e=>({default:e.VatMonthlyReport}))),cne=S.lazy(()=>Ii(()=>import("./index-BRNqBfLg.js"),__vite__mapDeps([30,29,31])).then(e=>({default:e.ProfitAndLossReport}))),dne=S.lazy(()=>Ii(()=>import("./index-DVPWQUlL.js"),__vite__mapDeps([32,29,31])).then(e=>({default:e.TaxReport}))),NEt=S.lazy(()=>Ii(()=>import("./index-Buz-IrXk.js"),[]).then(e=>({default:e.DepreciationReport}))),CEt=S.lazy(()=>Ii(()=>import("./index-BMRiK-sA.js"),__vite__mapDeps([33,11,13])).then(e=>({default:e.Shaam6111Report}))),_Et=S.lazy(()=>Ii(()=>import("./index-CAtbp5mY.js"),__vite__mapDeps([34,24])).then(e=>({default:e.YearlyLedgerReport}))),une=S.lazy(()=>Ii(()=>import("./index-DJM7_Iht.js"),__vite__mapDeps([35,29])).then(e=>({default:e.CorporateTaxRulingComplianceReport}))),FEt=S.lazy(()=>Ii(()=>import("./index-DE1XBKEu.js"),__vite__mapDeps([36,14,15,2,3])).then(e=>({default:e.BalanceReport}))),EEt=S.lazy(()=>Ii(()=>import("./index-CvEGrHKM.js"),__vite__mapDeps([37,17])).then(e=>({default:e.ValidateReportsScreen}))),BEt=S.lazy(()=>Ii(()=>import("./accountant-approvals-DpVkzbd9.js"),__vite__mapDeps([38,1,2,3,8])).then(e=>({default:e.AccountantApprovals}))),DEt=S.lazy(()=>Ii(()=>import("./index-CUFNiTlG.js"),[]).then(e=>({default:e.Salaries}))),TEt=S.lazy(()=>Ii(()=>import("./index-ByawU2Ir.js"),[]).then(e=>({default:e.TagsManager}))),IEt=S.lazy(()=>Ii(()=>import("./index-D1_IyaQG.js"),__vite__mapDeps([39,24,25])).then(e=>({default:e.TaxCategories}))),OEt=S.lazy(()=>Ii(()=>import("./index-BuRaZ4DH.js"),__vite__mapDeps([40,24,25])).then(e=>({default:e.SortCodes}))),PEt=S.lazy(()=>Ii(()=>import("./page-not-found-CP-tMcOZ.js"),[]).then(e=>({default:e.PageNotFound}))),REt=S.lazy(()=>Ii(()=>import("./login-page--AsTB5y2.js"),[]).then(e=>({default:e.LoginPage})));function Ci(e,t){return A.jsx(S.Suspense,{fallback:t||A.jsx(REe,{}),children:A.jsx(e,{})})}const jEt=[{path:"/",element:A.jsx(tEt,{}),errorElement:A.jsx(aQ,{}),children:[{path:ki.LOGIN,loader:iEt,element:Ci(REt),handle:{title:"Login"}},{path:"/",loader:nEt,element:A.jsx($Ct,{}),errorElement:A.jsx(aQ,{}),children:[{index:!0,element:Ci(lne,A.jsx(Td,{})),handle:{title:"All Charges",breadcrumb:"Charges"}},{path:"charges",handle:{breadcrumb:"Charges"},children:[{index:!0,element:Ci(lne,A.jsx(Td,{})),handle:{title:"All Charges"}},{path:"missing-info",element:Ci(lEt,A.jsx(Td,{})),handle:{title:"Missing Info Charges",breadcrumb:"Missing Info"}},{path:"ledger-validation",element:Ci(dEt,A.jsx(Td,{})),handle:{title:"Ledger Validation",breadcrumb:"Ledger Validation"}},{path:":chargeId",loader:oEt,element:Ci(cEt),handle:{title:"Charge Details",breadcrumb:"Details"}}]},{path:"businesses",handle:{breadcrumb:"Businesses"},children:[{index:!0,element:Ci(uEt,A.jsx(Td,{})),handle:{title:"All Businesses"}},{path:"transactions",element:Ci(AEt,A.jsx(Td,{})),handle:{title:"Business Transactions Summary",breadcrumb:"Transactions"}},{path:":businessId",loader:sEt,element:Ci(fEt),handle:{title:"Business Details",breadcrumb:"Details"}},{path:":businessId/transactions",element:Ci(mEt,A.jsx(Td,{})),handle:{title:"Business Transactions",breadcrumb:"Transactions"}}]},{path:"business-trips",handle:{breadcrumb:"Business Trips"},children:[{index:!0,element:Ci(hEt,A.jsx(Td,{})),handle:{title:"Business Trips"}},{path:":businessTripId",element:Ci(pEt),handle:{title:"Business Trip Details",breadcrumb:"Details"}}]},{path:"charts",handle:{breadcrumb:"Charts"},children:[{index:!0,element:Ci(gEt),handle:{title:"Charts"}},{path:"monthly-income-expense",element:Ci(vEt),handle:{title:"Monthly Income/Expense",breadcrumb:"Income/Expense"}}]},{path:"documents",handle:{breadcrumb:"Documents"},children:[{index:!0,element:Ci(yEt,A.jsx(Td,{})),handle:{title:"All Documents"}},{path:"issue-document",element:Ci(bEt),handle:{title:"Issue Document",breadcrumb:"Issue Document"}},{path:"issue-documents",element:Ci(kEt),handle:{title:"Issue Documents",breadcrumb:"Issue Documents"}}]},{path:"reports",handle:{breadcrumb:"Reports"},children:[{path:"trial-balance",element:Ci(wEt,A.jsx(Vl,{})),handle:{title:"Trial Balance Report",breadcrumb:"Trial Balance"}},{path:"conto",element:Ci(SEt,A.jsx(Vl,{})),handle:{title:"Conto Report",breadcrumb:"Conto"}},{path:"vat-monthly",element:Ci(xEt,A.jsx(Vl,{})),handle:{title:"VAT Monthly Report",breadcrumb:"VAT Monthly"}},{path:"profit-and-loss",handle:{breadcrumb:"Profit & Loss"},children:[{index:!0,element:Ci(cne,A.jsx(Vl,{})),handle:{title:"Profit & Loss Report"}},{path:":year",element:Ci(cne,A.jsx(Vl,{})),handle:{title:"Profit & Loss Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"tax",handle:{breadcrumb:"Tax"},children:[{index:!0,element:Ci(dne,A.jsx(Vl,{})),handle:{title:"Tax Report"}},{path:":year",element:Ci(dne,A.jsx(Vl,{})),handle:{title:"Tax Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"depreciation",element:Ci(NEt,A.jsx(Vl,{})),handle:{title:"Depreciation Report",breadcrumb:"Depreciation"}},{path:"shaam-6111",element:Ci(CEt,A.jsx(Vl,{})),handle:{title:"Shaam 6111 Report",breadcrumb:"Shaam 6111"}},{path:"yearly-ledger",element:Ci(_Et,A.jsx(Vl,{})),handle:{title:"Yearly Ledger Report",breadcrumb:"Yearly Ledger"}},{path:"corporate-tax-ruling-compliance",handle:{breadcrumb:"Tax Ruling"},children:[{index:!0,element:Ci(une,A.jsx(Vl,{})),handle:{title:"Corporate Tax Ruling Compliance Report"}},{path:":year",element:Ci(une,A.jsx(Vl,{})),handle:{title:"Corporate Tax Ruling Compliance Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"balance",element:Ci(FEt,A.jsx(Vl,{})),handle:{title:"Balance Report",breadcrumb:"Balance"}},{path:"validate-reports",element:Ci(EEt),handle:{title:"Validate Reports",breadcrumb:"Validate"}}]},{path:"accountant-approvals",element:Ci(BEt,A.jsx(Td,{})),handle:{title:"Accountant Approvals",breadcrumb:"Accountant Approvals"}},{path:"salaries",element:Ci(DEt,A.jsx(Td,{})),handle:{title:"Salaries",breadcrumb:"Salaries"}},{path:"tags",element:Ci(TEt),handle:{title:"Tags",breadcrumb:"Tags"}},{path:"tax-categories",element:Ci(IEt),handle:{title:"Tax Categories",breadcrumb:"Tax Categories"}},{path:"sort-codes",element:Ci(OEt),handle:{title:"Sort Codes",breadcrumb:"Sort Codes"}},{path:"*",element:Ci(PEt),handle:{title:"Page Not Found"}}]}]}],MEt=document.getElementById("root"),LEt=uNe.createRoot(MEt),$Et=f_e(jEt);LEt.render(A.jsx(S.StrictMode,{children:A.jsx(x_e,{router:$Et})}));export{YP as $,V5t as A,bt as B,Fct as C,zt as D,hSt as E,Ofe as F,qEt as G,Qi as H,bSt as I,D5t as J,fc as K,wA as L,HNt as M,Ac as N,E$ as O,rie as P,WNt as Q,ki as R,iBt as S,Mr as T,CDt as U,Il as V,_$ as W,si as X,El as Y,af as Z,qd as _,lr as a,PDt as a$,yf as a0,Kc as a1,Rn as a2,jn as a3,ii as a4,Yn as a5,QDt as a6,Xn as a7,HEt as a8,cBt as a9,e0 as aA,Jot as aB,fB as aC,gA as aD,Xot as aE,DR as aF,lBt as aG,eTt as aH,Xh as aI,m0e as aJ,qlt as aK,C$ as aL,jp as aM,j4e as aN,twe as aO,q1e as aP,ZEt as aQ,A0e as aR,Z2e as aS,vB as aT,sFe as aU,tie as aV,iie as aW,sBt as aX,ist as aY,pye as aZ,fDt as a_,h$ as aa,b1 as ab,_o as ac,Xve as ad,_M as ae,m5t as af,YEt as ag,V as ah,C6 as ai,IDt as aj,yDt as ak,ODt as al,Zn as am,w1 as an,SA as ao,td as ap,nd as aq,nj as ar,_p as as,bp as at,os as au,ls as av,ss as aw,cs as ax,zo as ay,Ik as az,aie as b,Xi as b$,tBt as b0,vn as b1,u$ as b2,Pve as b3,h5t as b4,sC as b5,vC as b6,q2e as b7,S2e as b8,ONt as b9,rBt as bA,ySt as bB,A5t as bC,d5t as bD,Xt as bE,Dt as bF,Lt as bG,Ge as bH,Sn as bI,rpt as bJ,Cn as bK,iDt as bL,bM,N5t as bN,_i as bO,fs as bP,lM as bQ,GF as bR,ey as bS,Wc as bT,lf as bU,gp as bV,aM as bW,_Dt as bX,uDt as bY,k5t as bZ,Vs as b_,p5t as ba,Wu as bb,Q9 as bc,DFe as bd,aBt as be,xn as bf,VYe as bg,QEt as bh,rCt as bi,aCt as bj,Cte as bk,j_e as bl,I2e as bm,_te as bn,dBt as bo,wCe as bp,ICe as bq,UTe as br,oBt as bs,att as bt,gYe as bu,Oy as bv,STe as bw,u5t as bx,Ri as by,co as bz,LYe as c,j2e as c$,mDt as c0,vf as c1,qF as c2,qr as c3,rg as c4,fBt as c5,Py as c6,N6 as c7,ABt as c8,mBt as c9,TDt as cA,NBt as cB,CBt as cC,FBt as cD,_Bt as cE,EBt as cF,BBt as cG,DBt as cH,TBt as cI,LM as cJ,Np as cK,o8 as cL,dCt as cM,Act as cN,dDt as cO,KEt as cP,OBt as cQ,IBt as cR,Bre as cS,Gc as cT,tv as cU,f5t as cV,xYe as cW,FYe as cX,BEe as cY,yC as cZ,Qwe as c_,Yp as ca,hBt as cb,vDt as cc,h0 as cd,FDt as ce,ADt as cf,aDt as cg,ER as ch,JEt as ci,BDt as cj,pBt as ck,gBt as cl,Jvt as cm,vq as cn,vBt as co,yBt as cp,rDt as cq,EDt as cr,bBt as cs,kBt as ct,wBt as cu,oDt as cv,DDt as cw,SBt as cx,xBt as cy,sDt as cz,G5t as d,Up as d$,Zfe as d0,Fre as d1,y5t as d2,l6 as d3,W_t as d4,oFt as d5,vp as d6,vSe as d7,ff as d8,aTt as d9,JDt as dA,p0 as dB,jNt as dC,gDt as dD,SDt as dE,K5t as dF,bz as dG,NSt as dH,MNt as dI,i0 as dJ,r0 as dK,a0 as dL,Kyt as dM,N2e as dN,INt as dO,PNt as dP,W5t as dQ,Mct as dR,LBt as dS,fr as dT,Ti as dU,L5t as dV,Eje as dW,ASe as dX,Fje as dY,En as dZ,p9 as d_,fFt as da,xme as db,Yr as dc,A2t as dd,uBt as de,Jl as df,b5t as dg,RB as dh,fM as di,g0 as dj,cCt as dk,M1 as dl,Jp as dm,eg as dn,Go as dp,wl as dq,Yc as dr,tg as ds,Qo as dt,Noe as du,Coe as dv,_oe as dw,WDt as dx,q5t as dy,q1 as dz,ad as e,s5t as e$,hDt as e0,I5t as e1,ZDt as e2,Foe as e3,Eoe as e4,Wb as e5,bDt as e6,z2e as e7,UDt as e8,KDt as e9,U5t as eA,NDt as eB,_5t as eC,rwe as eD,cc as eE,Fl as eF,IC as eG,XDt as eH,d0 as eI,I1 as eJ,Bme as eK,j5t as eL,M5t as eM,jBt as eN,MBt as eO,i5t as eP,Z5t as eQ,l5t as eR,a5t as eS,nBt as eT,r5t as eU,XEt as eV,zEt as eW,VEt as eX,eBt as eY,GEt as eZ,o5t as e_,YDt as ea,O5t as eb,P5t as ec,YCt as ed,pSe as ee,rTt as ef,iTt as eg,_w as eh,mA as ei,oTt as ej,$Bt as ek,UBt as el,DYe as em,iwe as en,eyt as eo,A0 as ep,Cct as eq,QBt as er,HBt as es,zBt as et,VBt as eu,GBt as ev,qBt as ew,wz as ex,Q5t as ey,WEt as ez,Tfe as f,jDt as f$,Jne as f0,c5t as f1,J5t as f2,KBt as f3,H5t as f4,RBt as f5,R5t as f6,Y5t as f7,x0e as f8,X5t as f9,$Dt as fA,RDt as fB,F5t as fC,pw as fD,kDt as fE,D6 as fF,WBt as fG,XBt as fH,ZBt as fI,YBt as fJ,JBt as fK,D$ as fL,e5t as fM,t5t as fN,n5t as fO,z5t as fP,MDt as fQ,tTt as fR,PBt as fS,cDt as fT,pDt as fU,M4e as fV,tDt as fW,wDt as fX,LDt as fY,B5t as fZ,nDt as f_,rf as fa,Or as fb,$5t as fc,l5e as fd,lj as fe,Bs as ff,zDt as fg,Bo as fh,yOe as fi,sn as fj,VDt as fk,GDt as fl,Kd as fm,ui as fn,S1 as fo,Kt as fp,T5t as fq,s8 as fr,fSt as fs,xie as ft,fo as fu,Nie as fv,S5t as fw,x5t as fx,w5t as fy,JB as fz,kA as g,E5t as g0,lDt as g1,eDt as g2,Kne as g3,Wne as g4,qE as g5,br as g6,v5t as h,or as i,A as j,xDt as k,sr as l,C5t as m,N0 as n,CA as o,Ft as p,Do as q,S as r,gf as s,Bt as t,Xp as u,Qn as v,m1 as w,Ip as x,F$ as y,g5t as z};
|
|
886
|
+
export default theme;`}function Jte(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const K2t=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let i=0;i<t.length;i+=1)n+=+t[i];return n};function W2t(e){Object.assign(e,{alpha(t,n){const i=this||e;return i.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:bSe(t,K2t(n))},lighten(t,n){const i=this||e;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${t}, #fff ${Jte(n)})`:c5(t,n)},darken(t,n){const i=this||e;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${t}, #000 ${Jte(n)})`:l5(t,n)}})}function u6(e={},...t){const{breakpoints:n,mixins:i={},spacing:r,palette:a={},transitions:o={},typography:s={},shape:l,colorSpace:c,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error($p(20));const u=L8({...a,colorSpace:c}),m=pSe(e);let h=lc(m,{mixins:R2t(m.breakpoints,i),palette:u,shadows:U2t.slice(),typography:ESe(u,s),transitions:V2t(o),zIndex:{...G2t}});return h=lc(h,d),h=t.reduce((v,g)=>lc(v,g),h),h.unstable_sxConfig={...Cw,...d?.unstable_sxConfig},h.unstable_sx=function(g){return _w({sx:g,theme:this})},h.toRuntimeSource=BSe,W2t(h),h}function Y2t(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const X2t=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Y2t(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function DSe(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function TSe(e){return e==="dark"?X2t:[]}function Z2t(e){const{palette:t={mode:"light"},opacity:n,overlays:i,colorSpace:r,...a}=e,o=L8({...t,colorSpace:r});return{palette:o,opacity:{...DSe(o.mode),...n},overlays:i||TSe(o.mode),...a}}function J2t(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const eFt=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],tFt=e=>(t,n)=>{const i=e.rootSelector||":root",r=e.colorSchemeSelector;let a=r;if(r==="class"&&(a=".%s"),r==="data"&&(a="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(a=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return eFt(e.cssVarPrefix).forEach(s=>{o[s]=n[s],delete n[s]}),a==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:o}}:a?{[a.replace("%s",t)]:o,[`${i}, ${a.replace("%s",t)}`]:n}:{[i]:{...n,...o}}}if(a&&a!=="media")return`${i}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[i]:n}};if(a)return a.replace("%s",String(t))}return i};function nFt(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function St(e,t,n){!e[t]&&n&&(e[t]=n)}function fk(e){return typeof e!="string"||!e.startsWith("hsl")?e:ySe(e)}function oA(e,t){`${t}Channel`in e||(e[`${t}Channel`]=uk(fk(e[t])))}function iFt(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ju=e=>{try{return e()}catch{}},rFt=(e="mui")=>S2t(e);function jP(e,t,n,i,r){if(!n)return;n=n===!0?{}:n;const a=r==="dark"?"dark":"light";if(!i){t[r]=Z2t({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}const{palette:o,...s}=u6({...i,palette:{mode:a,...n?.palette},colorSpace:e});return t[r]={...n,palette:o,opacity:{...DSe(a),...n?.opacity},overlays:n?.overlays||TSe(a)},s}function aFt(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:r=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=J2t,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=e,u=Object.keys(n)[0],m=i||(n.light&&u!=="light"?"light":u),h=rFt(a),{[m]:v,light:g,dark:k,...b}=n,w={...b};let C=v;if((m==="dark"&&!("dark"in n)||m==="light"&&!("light"in n))&&(C=!0),!C)throw new Error($p(21,m));let N;o&&(N="oklch");const _=jP(N,w,C,d,m);g&&!w.light&&jP(N,w,g,void 0,"light"),k&&!w.dark&&jP(N,w,k,void 0,"dark");let F={defaultColorScheme:m,..._,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:w,font:{...P2t(_.typography),..._.font},spacing:iFt(d.spacing)};Object.keys(F.colorSchemes).forEach(j=>{const P=F.colorSchemes[j].palette,K=re=>{const U=re.split("-"),te=U[1],W=U[2];return h(re,P[te][W])};P.mode==="light"&&(St(P.common,"background","#fff"),St(P.common,"onBackground","#000")),P.mode==="dark"&&(St(P.common,"background","#000"),St(P.common,"onBackground","#fff"));function q(re,U,te){if(N){let W;return re===zh&&(W=`transparent ${((1-te)*100).toFixed(0)}%`),re===gr&&(W=`#000 ${(te*100).toFixed(0)}%`),re===vr&&(W=`#fff ${(te*100).toFixed(0)}%`),`color-mix(in ${N}, ${U}, ${W})`}return re(U,te)}if(nFt(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){St(P.Alert,"errorColor",q(gr,P.error.light,.6)),St(P.Alert,"infoColor",q(gr,P.info.light,.6)),St(P.Alert,"successColor",q(gr,P.success.light,.6)),St(P.Alert,"warningColor",q(gr,P.warning.light,.6)),St(P.Alert,"errorFilledBg",K("palette-error-main")),St(P.Alert,"infoFilledBg",K("palette-info-main")),St(P.Alert,"successFilledBg",K("palette-success-main")),St(P.Alert,"warningFilledBg",K("palette-warning-main")),St(P.Alert,"errorFilledColor",ju(()=>P.getContrastText(P.error.main))),St(P.Alert,"infoFilledColor",ju(()=>P.getContrastText(P.info.main))),St(P.Alert,"successFilledColor",ju(()=>P.getContrastText(P.success.main))),St(P.Alert,"warningFilledColor",ju(()=>P.getContrastText(P.warning.main))),St(P.Alert,"errorStandardBg",q(vr,P.error.light,.9)),St(P.Alert,"infoStandardBg",q(vr,P.info.light,.9)),St(P.Alert,"successStandardBg",q(vr,P.success.light,.9)),St(P.Alert,"warningStandardBg",q(vr,P.warning.light,.9)),St(P.Alert,"errorIconColor",K("palette-error-main")),St(P.Alert,"infoIconColor",K("palette-info-main")),St(P.Alert,"successIconColor",K("palette-success-main")),St(P.Alert,"warningIconColor",K("palette-warning-main")),St(P.AppBar,"defaultBg",K("palette-grey-100")),St(P.Avatar,"defaultBg",K("palette-grey-400")),St(P.Button,"inheritContainedBg",K("palette-grey-300")),St(P.Button,"inheritContainedHoverBg",K("palette-grey-A100")),St(P.Chip,"defaultBorder",K("palette-grey-400")),St(P.Chip,"defaultAvatarColor",K("palette-grey-700")),St(P.Chip,"defaultIconColor",K("palette-grey-700")),St(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),St(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),St(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),St(P.LinearProgress,"primaryBg",q(vr,P.primary.main,.62)),St(P.LinearProgress,"secondaryBg",q(vr,P.secondary.main,.62)),St(P.LinearProgress,"errorBg",q(vr,P.error.main,.62)),St(P.LinearProgress,"infoBg",q(vr,P.info.main,.62)),St(P.LinearProgress,"successBg",q(vr,P.success.main,.62)),St(P.LinearProgress,"warningBg",q(vr,P.warning.main,.62)),St(P.Skeleton,"bg",N?q(zh,P.text.primary,.11):`rgba(${K("palette-text-primaryChannel")} / 0.11)`),St(P.Slider,"primaryTrack",q(vr,P.primary.main,.62)),St(P.Slider,"secondaryTrack",q(vr,P.secondary.main,.62)),St(P.Slider,"errorTrack",q(vr,P.error.main,.62)),St(P.Slider,"infoTrack",q(vr,P.info.main,.62)),St(P.Slider,"successTrack",q(vr,P.success.main,.62)),St(P.Slider,"warningTrack",q(vr,P.warning.main,.62));const re=N?q(gr,P.background.default,.6825):vN(P.background.default,.8);St(P.SnackbarContent,"bg",re),St(P.SnackbarContent,"color",ju(()=>N?d6.text.primary:P.getContrastText(re))),St(P.SpeedDialAction,"fabHoverBg",vN(P.background.paper,.15)),St(P.StepConnector,"border",K("palette-grey-400")),St(P.StepContent,"border",K("palette-grey-400")),St(P.Switch,"defaultColor",K("palette-common-white")),St(P.Switch,"defaultDisabledColor",K("palette-grey-100")),St(P.Switch,"primaryDisabledColor",q(vr,P.primary.main,.62)),St(P.Switch,"secondaryDisabledColor",q(vr,P.secondary.main,.62)),St(P.Switch,"errorDisabledColor",q(vr,P.error.main,.62)),St(P.Switch,"infoDisabledColor",q(vr,P.info.main,.62)),St(P.Switch,"successDisabledColor",q(vr,P.success.main,.62)),St(P.Switch,"warningDisabledColor",q(vr,P.warning.main,.62)),St(P.TableCell,"border",q(vr,q(zh,P.divider,1),.88)),St(P.Tooltip,"bg",q(zh,P.grey[700],.92))}if(P.mode==="dark"){St(P.Alert,"errorColor",q(vr,P.error.light,.6)),St(P.Alert,"infoColor",q(vr,P.info.light,.6)),St(P.Alert,"successColor",q(vr,P.success.light,.6)),St(P.Alert,"warningColor",q(vr,P.warning.light,.6)),St(P.Alert,"errorFilledBg",K("palette-error-dark")),St(P.Alert,"infoFilledBg",K("palette-info-dark")),St(P.Alert,"successFilledBg",K("palette-success-dark")),St(P.Alert,"warningFilledBg",K("palette-warning-dark")),St(P.Alert,"errorFilledColor",ju(()=>P.getContrastText(P.error.dark))),St(P.Alert,"infoFilledColor",ju(()=>P.getContrastText(P.info.dark))),St(P.Alert,"successFilledColor",ju(()=>P.getContrastText(P.success.dark))),St(P.Alert,"warningFilledColor",ju(()=>P.getContrastText(P.warning.dark))),St(P.Alert,"errorStandardBg",q(gr,P.error.light,.9)),St(P.Alert,"infoStandardBg",q(gr,P.info.light,.9)),St(P.Alert,"successStandardBg",q(gr,P.success.light,.9)),St(P.Alert,"warningStandardBg",q(gr,P.warning.light,.9)),St(P.Alert,"errorIconColor",K("palette-error-main")),St(P.Alert,"infoIconColor",K("palette-info-main")),St(P.Alert,"successIconColor",K("palette-success-main")),St(P.Alert,"warningIconColor",K("palette-warning-main")),St(P.AppBar,"defaultBg",K("palette-grey-900")),St(P.AppBar,"darkBg",K("palette-background-paper")),St(P.AppBar,"darkColor",K("palette-text-primary")),St(P.Avatar,"defaultBg",K("palette-grey-600")),St(P.Button,"inheritContainedBg",K("palette-grey-800")),St(P.Button,"inheritContainedHoverBg",K("palette-grey-700")),St(P.Chip,"defaultBorder",K("palette-grey-700")),St(P.Chip,"defaultAvatarColor",K("palette-grey-300")),St(P.Chip,"defaultIconColor",K("palette-grey-300")),St(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),St(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),St(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),St(P.LinearProgress,"primaryBg",q(gr,P.primary.main,.5)),St(P.LinearProgress,"secondaryBg",q(gr,P.secondary.main,.5)),St(P.LinearProgress,"errorBg",q(gr,P.error.main,.5)),St(P.LinearProgress,"infoBg",q(gr,P.info.main,.5)),St(P.LinearProgress,"successBg",q(gr,P.success.main,.5)),St(P.LinearProgress,"warningBg",q(gr,P.warning.main,.5)),St(P.Skeleton,"bg",N?q(zh,P.text.primary,.13):`rgba(${K("palette-text-primaryChannel")} / 0.13)`),St(P.Slider,"primaryTrack",q(gr,P.primary.main,.5)),St(P.Slider,"secondaryTrack",q(gr,P.secondary.main,.5)),St(P.Slider,"errorTrack",q(gr,P.error.main,.5)),St(P.Slider,"infoTrack",q(gr,P.info.main,.5)),St(P.Slider,"successTrack",q(gr,P.success.main,.5)),St(P.Slider,"warningTrack",q(gr,P.warning.main,.5));const re=N?q(vr,P.background.default,.985):vN(P.background.default,.98);St(P.SnackbarContent,"bg",re),St(P.SnackbarContent,"color",ju(()=>N?_Se.text.primary:P.getContrastText(re))),St(P.SpeedDialAction,"fabHoverBg",vN(P.background.paper,.15)),St(P.StepConnector,"border",K("palette-grey-600")),St(P.StepContent,"border",K("palette-grey-600")),St(P.Switch,"defaultColor",K("palette-grey-300")),St(P.Switch,"defaultDisabledColor",K("palette-grey-600")),St(P.Switch,"primaryDisabledColor",q(gr,P.primary.main,.55)),St(P.Switch,"secondaryDisabledColor",q(gr,P.secondary.main,.55)),St(P.Switch,"errorDisabledColor",q(gr,P.error.main,.55)),St(P.Switch,"infoDisabledColor",q(gr,P.info.main,.55)),St(P.Switch,"successDisabledColor",q(gr,P.success.main,.55)),St(P.Switch,"warningDisabledColor",q(gr,P.warning.main,.55)),St(P.TableCell,"border",q(gr,q(zh,P.divider,1),.68)),St(P.Tooltip,"bg",q(zh,P.grey[700],.92))}oA(P.background,"default"),oA(P.background,"paper"),oA(P.common,"background"),oA(P.common,"onBackground"),oA(P,"divider"),Object.keys(P).forEach(re=>{const U=P[re];re!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&St(P[re],"mainChannel",uk(fk(U.main))),U.light&&St(P[re],"lightChannel",uk(fk(U.light))),U.dark&&St(P[re],"darkChannel",uk(fk(U.dark))),U.contrastText&&St(P[re],"contrastTextChannel",uk(fk(U.contrastText))),re==="text"&&(oA(P[re],"primary"),oA(P[re],"secondary")),re==="action"&&(U.active&&oA(P[re],"active"),U.selected&&oA(P[re],"selected")))})}),F=t.reduce((j,P)=>lc(j,P),F);const B={prefix:a,disableCssColorScheme:r,shouldSkipGeneratingVar:s,getSelector:tFt(F),enableContrastVars:o},{vars:T,generateThemeVars:I,generateStyleSheets:$}=C2t(F,B);return F.vars=T,Object.entries(F.colorSchemes[F.defaultColorScheme]).forEach(([j,P])=>{F[j]=P}),F.generateThemeVars=I,F.generateStyleSheets=$,F.generateSpacing=function(){return hSe(d.spacing,T8(this))},F.getColorSchemeSelector=_2t(l),F.spacing=F.generateSpacing(),F.shouldSkipGeneratingVar=s,F.unstable_sxConfig={...Cw,...d?.unstable_sxConfig},F.unstable_sx=function(P){return _w({sx:P,theme:this})},F.toRuntimeSource=BSe,F}function ene(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:L8({...n===!0?{}:n.palette,mode:t})})}function $8(e={},...t){const{palette:n,cssVariables:i=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||"light",l=r?.[s],c={...r,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in e))return u6(e,...t);let d=n;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const u=u6({...e,palette:d},...t);return u.defaultColorScheme=s,u.colorSchemes=c,u.palette.mode==="light"&&(u.colorSchemes.light={...c.light!==!0&&c.light,palette:u.palette},ene(u,"dark",c.dark)),u.palette.mode==="dark"&&(u.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:u.palette},ene(u,"light",c.light)),u}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),aFt({...o,colorSchemes:c,defaultColorScheme:s,...typeof i!="boolean"&&i},...t)}const oFt=$8();function sFt({theme:e,...t}){const n=vp in e?e[vp]:void 0;return A.jsx(xSe,{...t,themeId:n?vp:void 0,theme:n||e})}const yN={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lFt}=w2t({themeId:vp,theme:()=>$8({cssVariables:!0}),colorSchemeStorageKey:yN.colorSchemeStorageKey,modeStorageKey:yN.modeStorageKey,defaultColorScheme:{light:yN.defaultLightColorScheme,dark:yN.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:ESe(e.palette,e.typography)};return t.unstable_sx=function(i){return _w({sx:i,theme:this})},t}}),cFt=lFt;function dFt({theme:e,...t}){const n=S.useMemo(()=>{if(typeof e=="function")return e;const i=vp in e?e[vp]:e;return"colorSchemes"in i?null:"vars"in i?e:{...e,vars:null}},[e]);return n?A.jsx(sFt,{theme:n,...t}):A.jsx(cFt,{theme:e,...t})}function uFt(e){return A.jsx(gSe,{...e,defaultTheme:oFt,themeId:vp})}function ISe(e){return function(n){return A.jsx(uFt,{styles:typeof e=="function"?i=>e({theme:i,...n}):e})}}function oTt(){return X_t}function fFt(e){return d2t(e)}const f6=typeof ISe({})=="function",AFt=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),mFt=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),OSe=(e,t=!1)=>{const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([a,o])=>{const s=e.getColorSchemeSelector(a);s.startsWith("@")?n[s]={":root":{colorScheme:o.palette?.mode}}:n[s.replace(/\s*&/,"")]={colorScheme:o.palette?.mode}});let i={html:AFt(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...mFt(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const r=e.components?.MuiCssBaseline?.styleOverrides;return r&&(i=[i,r]),i},iC="mui-ecs",hFt=e=>{const t=OSe(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${iC})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([i,r])=>{const a=e.getColorSchemeSelector(i);a.startsWith("@")?n[a]={[`:root:not(:has(.${iC}))`]:{colorScheme:r.palette?.mode}}:n[a.replace(/\s*&/,"")]={[`&:not(:has(.${iC}))`]:{colorScheme:r.palette?.mode}}}),t},pFt=ISe(f6?({theme:e,enableColorScheme:t})=>OSe(e,t):({theme:e})=>hFt(e));function gFt(e){const t=fFt({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:i=!1}=t;return A.jsxs(S.Fragment,{children:[f6&&A.jsx(pFt,{enableColorScheme:i}),!f6&&!i&&A.jsx("span",{className:iC,style:{display:"none"}}),n]})}var d5=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vFt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yFt=class{#e=vFt;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},A6=new yFt;function bFt(e){setTimeout(e,0)}var u5=typeof window>"u"||"Deno"in globalThis;function Md(){}function kFt(e,t){return typeof e=="function"?e(t):e}function wFt(e){return typeof e=="number"&&e>=0&&e!==1/0}function SFt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m6(e,t){return typeof e=="function"?e(t):e}function xFt(e,t){return typeof e=="function"?e(t):e}function tne(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:a,queryKey:o,stale:s}=e;if(o){if(i){if(t.queryHash!==U8(o,t.options))return!1}else if(!f1(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||r&&r!==t.state.fetchStatus||a&&!a(t))}function nne(e,t){const{exact:n,status:i,predicate:r,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(u1(t.options.mutationKey)!==u1(a))return!1}else if(!f1(t.options.mutationKey,a))return!1}return!(i&&t.state.status!==i||r&&!r(t))}function U8(e,t){return(t?.queryKeyHashFn||u1)(e)}function u1(e){return JSON.stringify(e,(t,n)=>h6(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function f1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>f1(e[n],t[n])):!1}var NFt=Object.prototype.hasOwnProperty;function PSe(e,t){if(e===t)return e;const n=ine(e)&&ine(t);if(!n&&!(h6(e)&&h6(t)))return t;const r=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:a[c],u=e[d],m=t[d];if(u===m){s[d]=u,(n?c<r:NFt.call(e,d))&&l++;continue}if(u===null||m===null||typeof u!="object"||typeof m!="object"){s[d]=m;continue}const h=PSe(u,m);s[d]=h,h===u&&l++}return r===o&&l===r?e:s}function ine(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function h6(e){if(!rne(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!rne(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rne(e){return Object.prototype.toString.call(e)==="[object Object]"}function CFt(e){return new Promise(t=>{A6.setTimeout(t,e)})}function _Ft(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?PSe(e,t):t}function FFt(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function EFt(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Q8=Symbol();function RSe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Q8?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var BFt=class extends d5{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!u5&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},jSe=new BFt;function DFt(){let e,t;const n=new Promise((r,a)=>{e=r,t=a});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},n.reject=r=>{i({status:"rejected",reason:r}),t(r)},n}var TFt=bFt;function IFt(){let e=[],t=0,n=s=>{s()},i=s=>{s()},r=TFt;const a=s=>{t?e.push(s):r(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&r(()=>{i(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{i=s},setScheduler:s=>{r=s}}}var Gs=IFt(),OFt=class extends d5{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!u5&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jF=new OFt;function PFt(e){return Math.min(1e3*2**e,3e4)}function MSe(e){return(e??"online")==="online"?jF.isOnline():!0}var p6=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function LSe(e){let t=!1,n=0,i;const r=DFt(),a=()=>r.status!=="pending",o=g=>{if(!a()){const k=new p6(g);m(k),e.onCancel?.(k)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>jSe.isFocused()&&(e.networkMode==="always"||jF.isOnline())&&e.canRun(),d=()=>MSe(e.networkMode)&&e.canRun(),u=g=>{a()||(i?.(),r.resolve(g))},m=g=>{a()||(i?.(),r.reject(g))},h=()=>new Promise(g=>{i=k=>{(a()||c())&&g(k)},e.onPause?.()}).then(()=>{i=void 0,a()||e.onContinue?.()}),v=()=>{if(a())return;let g;const k=n===0?e.initialPromise:void 0;try{g=k??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(u).catch(b=>{if(a())return;const w=e.retry??(u5?0:3),C=e.retryDelay??PFt,N=typeof C=="function"?C(n,b):C,_=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!_){m(b);return}n++,e.onFail?.(n,b),CFt(N).then(()=>c()?void 0:h()).then(()=>{t?m(b):v()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?v():h().then(v),r)}}var $Se=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wFt(this.gcTime)&&(this.#e=A6.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u5?1/0:300*1e3))}clearGcTimeout(){this.#e&&(A6.clearTimeout(this.#e),this.#e=void 0)}},RFt=class extends $Se{#e;#t;#n;#i;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ane(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ane(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=_Ft(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Md).catch(Md):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>xFt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q8||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m6(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!SFt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,i=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},r=()=>{const s=RSe(this.options,t),c=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(d),d})();return this.#o=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return i(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=LSe({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof p6&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#r.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof p6){if(s.silent)return this.#r.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...jFt(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Gs.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function jFt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MSe(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ane(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function one(e){return{onFetch:(t,n)=>{const i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let d=!1;const u=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},m=RSe(t.options,t.fetchOptions),h=async(v,g,k)=>{if(d)return Promise.reject();if(g==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:g,direction:k?"backward":"forward",meta:t.options.meta};return u(F),F})(),C=await m(w),{maxPages:N}=t.options,_=k?EFt:FFt;return{pages:_(v.pages,C,N),pageParams:_(v.pageParams,g,N)}};if(r&&a.length){const v=r==="backward",g=v?MFt:sne,k={pages:a,pageParams:o},b=g(i,k);s=await h(k,b,v)}else{const v=e??a.length;do{const g=l===0?o[0]??i.initialPageParam:sne(i,s);if(l>0&&g==null)break;s=await h(s,g),l++}while(l<v)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function sne(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function MFt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var LFt=class extends $Se{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||$Ft(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=LSe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#r({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",r=!this.#i.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:r})}const a=await this.#i.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#r({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,e,this.state.context,this,n),await this.options.onError?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,e,this.state.context,n),a}finally{this.#r({type:"error",error:a})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Gs.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function $Ft(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var UFt=class extends d5{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new LFt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=bN(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=bN(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=bN(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(r=>r.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=bN(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gs.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>nne(t,n))}findAll(e={}){return this.getAll().filter(t=>nne(e,t))}notify(e){Gs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Gs.batch(()=>Promise.all(e.map(t=>t.continue().catch(Md))))}};function bN(e){return e.options.scope?.id}var QFt=class extends d5{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,r=t.queryHash??U8(i,t);let a=this.get(r);return a||(a=new RFt({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Gs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tne(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tne(e,n)):t}notify(e){Gs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Gs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},HFt=class{#e;#t;#n;#i;#r;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new QFt,this.#t=e.mutationCache||new UFt,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=jSe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=jF.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(m6(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(i.queryHash)?.state.data,o=kFt(t,a);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Gs.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Gs.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Gs.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Gs.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(i).then(Md).catch(Md)}invalidateQueries(e,t={}){return Gs.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Gs.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let a=r.fetch(void 0,n);return n.throwOnError||(a=a.catch(Md)),r.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(Md)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(m6(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Md).catch(Md)}fetchInfiniteQuery(e){return e.behavior=one(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Md).catch(Md)}ensureInfiniteQueryData(e){return e.behavior=one(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jF.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(u1(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{f1(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(u1(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{f1(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=U8(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Q8&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},zFt=S.createContext(void 0),VFt=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),A.jsx(zFt.Provider,{value:e,children:t}));function GFt(){const e=jne();return S.useEffect(()=>{const t=e[e.length-1],n=t?.handle;if(n?.title){const i=typeof n.title=="function"?n.title(t.data):n.title;document.title=`${i} - Accounter`}else document.title="Accounter"},[e]),A.jsx("div",{style:{display:"none"}})}var qFt=(e,t,n,i,r,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function d(h){(Array.isArray(e)?e:[e]).forEach(v=>{let g=v==="class",k=g&&a?r.map(b=>a[b]||b):r;g?(l.classList.remove(...k),l.classList.add(a&&a[h]?a[h]:h)):l.setAttribute(v,h)}),u(h)}function u(h){s&&c.includes(h)&&(l.style.colorScheme=h)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let h=localStorage.getItem(t)||n,v=o&&h==="system"?m():h;d(v)}catch{}},KFt=S.createContext(void 0),WFt={setTheme:e=>{},themes:[]},YFt=()=>{var e;return(e=S.useContext(KFt))!=null?e:WFt};S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,t,a,e,s,o,i,r]).slice(1,-1);return S.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${qFt.toString()})(${d})`}})});const XFt=({...e})=>{const{theme:t="system"}=YFt();return A.jsx(hYe,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...e})};var MP=(e,t)=>gC(e.kind,e,{...e.context,authAttempt:t});function USe(e){return({client:t,forward:n})=>{var i=new Set,r=eR(),a=eR(),o=new Map;function s(){c=void 0;var u=o;o=new Map,u.forEach(r.next)}function l(u){c=void 0;var m=o;o=new Map,m.forEach((h=>{a.next(rre(h,u))}))}var c,d=null;return u=>{function m(){c=Promise.resolve().then((()=>e({mutate(b,w,C){var N=t.createRequestOperation("mutation",ny(b,w),C);return W6(XF(1)(Cl((_=>_.operation.key===N.key&&N.context._instance===_.operation.context._instance))(JP((()=>{var _=v(N);i.add(_.context._instance),r.next(_)}))(k))))},appendHeaders(b,w){var C=typeof b.context.fetchOptions=="function"?b.context.fetchOptions():b.context.fetchOptions||{};return gC(b.kind,b,{...b.context,fetchOptions:{...C,headers:{...C.headers,...w}}})}}))).then((b=>{b&&(d=b),s()})).catch((b=>{l(b)}))}m();function h(b){o.set(b.key,MP(b,!0)),d&&!c&&(c=d.refreshAuth().then(s).catch(l))}function v(b){return d?d.addAuthToOperation(b):b}var g=Cl(Boolean)(Zie((b=>b.kind==="teardown"?(o.delete(b.key),b):b.context._instance&&i.has(b.context._instance)?b:b.context.authAttempt?v(b):c||!d?(c||m(),o.has(b.key)||o.set(b.key,MP(b,!1)),null):(function(C){return!C.context.authAttempt&&d&&d.willAuthError&&d.willAuthError(C)})(b)?(h(b),null):v(MP(b,!1))))(Dk([r.source,u]))),k=n(g);return Dk([a.source,Cl((b=>!i.has(b.operation.context._instance)&&b.error&&(function(C){return d&&d.didAuthError&&d.didAuthError(C.error,C.operation)})(b)&&!b.operation.context.authAttempt?(h(b.operation),!1):(i.has(b.operation.context._instance)&&i.delete(b.operation.context._instance),!0)))(k)])}}}function QSe(e){if(e.error?.networkError){console.error("Network Error:",e.error.networkError),Bt.error("Network Error",{description:"Failed to connect to the server. Please check your connection.",duration:5e3});return}if(e.error?.graphQLErrors?.length){const t=e.error.graphQLErrors[0],{message:n}=t;console.error("GraphQL Error:",t),Bt.error("Operation Error",{description:n||"An error occurred while processing your request.",duration:5e3})}}function ZFt({children:e}){const{authService:t}=S.useContext(qE),n=m1(),i=t.isLoggedIn(),r=S.useMemo(()=>t.authToken(),[t,i]),a=S.useMemo(()=>{let o;return o="https://accounter.onrender.com/graphql",sre({url:o,exchanges:[ore({onResult(s){if(s?.error?.graphQLErrors.some(c=>c.extensions?.code==="FORBIDDEN")||s?.error?.response?.status===401){n(ki.LOGIN,{state:{message:"You are not authorized to access this page"}});return}QSe(s)}}),USe(async s=>({addAuthToOperation(l){return r?s.appendHeaders(l,{Authorization:r}):l},didAuthError(l,c){return l?.response?.status===401||l?.graphQLErrors?.some(d=>d.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),are]})},[n,r,t]);return S.useEffect(()=>{a||n("/login")},[a,n]),a?A.jsx(XDe,{value:a,children:e}):A.jsx(UCe,{to:"/login",state:{prevPath:window.location.pathname}})}const JFt=new HFt({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),eEt=$8({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:qh.A400}}});function tEt(){return A.jsx(Fse,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:A.jsxs(dFt,{theme:eEt,children:[A.jsx(gFt,{}),A.jsxs(ttt,{children:[A.jsx(XFt,{}),A.jsx(ZFt,{children:A.jsx(VFt,{client:JFt,children:A.jsxs(ntt,{children:[A.jsx(GFt,{}),A.jsx(cSe,{}),A.jsx($ne,{})]})})})]})]})})}function nEt(){if(!new V1().isLoggedIn())throw Sne(ki.LOGIN);return null}function iEt(){if(new V1().isLoggedIn())throw Sne(ki.HOME);return null}let kN=null;function HSe(){if(kN)return kN;const e=new V1;let t;return t="https://accounter.onrender.com/graphql",kN=sre({url:t,exchanges:[ore({onResult(n){QSe(n)}}),USe(async n=>({addAuthToOperation(i){const r=e.authToken();return r?n.appendHeaders(i,{Authorization:r}):i},didAuthError(i,r){return i?.response?.status===401||i?.graphQLErrors?.some(a=>a.extensions?.code==="FORBIDDEN")},async refreshAuth(){e.logout()}})),are]}),kN}function rEt(e){if(!e.chargeId)throw new Response("Charge ID is required",{status:400});return{chargeId:e.chargeId}}function aEt(e){if(!e.businessId)throw new Response("Business ID is required",{status:400});return{businessId:e.businessId}}async function oEt({params:e}){const{chargeId:t}=rEt(e),i=await HSe().query(Cre,{chargeId:t}).toPromise();if(!i.data?.charge)throw new Response("Charge not found",{status:404});return i.data}async function sEt({params:e}){const{businessId:t}=aEt(e),i=await HSe().query(UTe,{businessId:t}).toPromise();if(!i.data?.business)throw new Response("Business not found",{status:404});return i.data}const lne=S.lazy(()=>Ii(()=>import("./all-charges-BQcsaMon.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.AllCharges}))),lEt=S.lazy(()=>Ii(()=>import("./missing-info-charges-DrF2b0mO.js"),__vite__mapDeps([6,4,5])).then(e=>({default:e.MissingInfoCharges}))),cEt=S.lazy(()=>Ii(()=>Promise.resolve().then(()=>Bct),void 0).then(e=>({default:e.Charge}))),dEt=S.lazy(()=>Ii(()=>import("./charges-ledger-validation-D_cg1bn-.js"),__vite__mapDeps([7,1,2,3,4,5,8])).then(e=>({default:e.ChargesLedgerValidation}))),uEt=S.lazy(()=>Ii(()=>import("./index-BNtiIPMq.js"),__vite__mapDeps([9,10,11,5])).then(e=>({default:e.Businesses}))),fEt=S.lazy(()=>Ii(()=>import("./business-CfqFJUkR.js"),__vite__mapDeps([12,13,10,11,14,15,16,17])).then(e=>({default:e.BusinessScreen}))),AEt=S.lazy(()=>Ii(()=>Promise.resolve().then(()=>ltt),void 0).then(e=>({default:e.BusinessTransactionsSummery}))),mEt=S.lazy(()=>Ii(()=>import("./business-transactions-single-BD4bLNv2.js"),[]).then(e=>({default:e.BusinessTransactionsSingle}))),hEt=S.lazy(()=>Ii(()=>import("./index-C66UYUUf.js"),__vite__mapDeps([18,19])).then(e=>({default:e.BusinessTrips}))),pEt=S.lazy(()=>Ii(()=>import("./business-trip-DYkKK6Gk.js"),__vite__mapDeps([20,19])).then(e=>({default:e.BusinessTrip}))),gEt=S.lazy(()=>Ii(()=>import("./index-hr9hQe_a.js"),[]).then(e=>({default:e.ChartPage}))),vEt=S.lazy(()=>Ii(()=>import("./index-Cw9zbBbJ.js"),__vite__mapDeps([21,22,15,2,3])).then(e=>({default:e.MonthlyIncomeExpenseChart}))),yEt=S.lazy(()=>Ii(()=>import("./index-fwXllLnH.js"),__vite__mapDeps([23,24,2,3,25])).then(e=>({default:e.DocumentsReport}))),bEt=S.lazy(()=>Ii(()=>import("./issue-document-B4kkfOo0.js"),[]).then(e=>({default:e.IssueDocumentScreen}))),kEt=S.lazy(()=>Ii(()=>import("./index-DzNfXERJ.js"),__vite__mapDeps([26,3])).then(e=>({default:e.IssueDocuments}))),wEt=S.lazy(()=>Ii(()=>import("./index-DNTlYcfH.js"),[]).then(e=>({default:e.TrialBalanceReport}))),SEt=S.lazy(()=>Ii(()=>import("./index-CC_fLCrA.js"),__vite__mapDeps([27,25,22,16])).then(e=>({default:e.ContoReport}))),xEt=S.lazy(()=>Ii(()=>import("./index-C3pV-XkD.js"),__vite__mapDeps([28,29,4,5,1,2,3])).then(e=>({default:e.VatMonthlyReport}))),cne=S.lazy(()=>Ii(()=>import("./index-Au8Djmrz.js"),__vite__mapDeps([30,29,31])).then(e=>({default:e.ProfitAndLossReport}))),dne=S.lazy(()=>Ii(()=>import("./index-DS_RReq_.js"),__vite__mapDeps([32,29,31])).then(e=>({default:e.TaxReport}))),NEt=S.lazy(()=>Ii(()=>import("./index-DepseT6D.js"),[]).then(e=>({default:e.DepreciationReport}))),CEt=S.lazy(()=>Ii(()=>import("./index-BSmbKLQe.js"),__vite__mapDeps([33,11,13])).then(e=>({default:e.Shaam6111Report}))),_Et=S.lazy(()=>Ii(()=>import("./index-n3bzj3IE.js"),__vite__mapDeps([34,24])).then(e=>({default:e.YearlyLedgerReport}))),une=S.lazy(()=>Ii(()=>import("./index-Cc4HfGhd.js"),__vite__mapDeps([35,29])).then(e=>({default:e.CorporateTaxRulingComplianceReport}))),FEt=S.lazy(()=>Ii(()=>import("./index-DVbMTBK4.js"),__vite__mapDeps([36,14,15,2,3])).then(e=>({default:e.BalanceReport}))),EEt=S.lazy(()=>Ii(()=>import("./index-C7al3ztL.js"),__vite__mapDeps([37,17])).then(e=>({default:e.ValidateReportsScreen}))),BEt=S.lazy(()=>Ii(()=>import("./accountant-approvals-Bqrsn1y5.js"),__vite__mapDeps([38,1,2,3,8])).then(e=>({default:e.AccountantApprovals}))),DEt=S.lazy(()=>Ii(()=>import("./index-CS40C1qp.js"),[]).then(e=>({default:e.Salaries}))),TEt=S.lazy(()=>Ii(()=>import("./index--XWh2RKR.js"),[]).then(e=>({default:e.TagsManager}))),IEt=S.lazy(()=>Ii(()=>import("./index-BGHdyfCs.js"),__vite__mapDeps([39,24,25])).then(e=>({default:e.TaxCategories}))),OEt=S.lazy(()=>Ii(()=>import("./index-BWpLPx22.js"),__vite__mapDeps([40,24,25])).then(e=>({default:e.SortCodes}))),PEt=S.lazy(()=>Ii(()=>import("./page-not-found-7AAOkZhu.js"),[]).then(e=>({default:e.PageNotFound}))),REt=S.lazy(()=>Ii(()=>import("./login-page-NvQKYh34.js"),[]).then(e=>({default:e.LoginPage})));function Ci(e,t){return A.jsx(S.Suspense,{fallback:t||A.jsx(REe,{}),children:A.jsx(e,{})})}const jEt=[{path:"/",element:A.jsx(tEt,{}),errorElement:A.jsx(aQ,{}),children:[{path:ki.LOGIN,loader:iEt,element:Ci(REt),handle:{title:"Login"}},{path:"/",loader:nEt,element:A.jsx($Ct,{}),errorElement:A.jsx(aQ,{}),children:[{index:!0,element:Ci(lne,A.jsx(Td,{})),handle:{title:"All Charges",breadcrumb:"Charges"}},{path:"charges",handle:{breadcrumb:"Charges"},children:[{index:!0,element:Ci(lne,A.jsx(Td,{})),handle:{title:"All Charges"}},{path:"missing-info",element:Ci(lEt,A.jsx(Td,{})),handle:{title:"Missing Info Charges",breadcrumb:"Missing Info"}},{path:"ledger-validation",element:Ci(dEt,A.jsx(Td,{})),handle:{title:"Ledger Validation",breadcrumb:"Ledger Validation"}},{path:":chargeId",loader:oEt,element:Ci(cEt),handle:{title:"Charge Details",breadcrumb:"Details"}}]},{path:"businesses",handle:{breadcrumb:"Businesses"},children:[{index:!0,element:Ci(uEt,A.jsx(Td,{})),handle:{title:"All Businesses"}},{path:"transactions",element:Ci(AEt,A.jsx(Td,{})),handle:{title:"Business Transactions Summary",breadcrumb:"Transactions"}},{path:":businessId",loader:sEt,element:Ci(fEt),handle:{title:"Business Details",breadcrumb:"Details"}},{path:":businessId/transactions",element:Ci(mEt,A.jsx(Td,{})),handle:{title:"Business Transactions",breadcrumb:"Transactions"}}]},{path:"business-trips",handle:{breadcrumb:"Business Trips"},children:[{index:!0,element:Ci(hEt,A.jsx(Td,{})),handle:{title:"Business Trips"}},{path:":businessTripId",element:Ci(pEt),handle:{title:"Business Trip Details",breadcrumb:"Details"}}]},{path:"charts",handle:{breadcrumb:"Charts"},children:[{index:!0,element:Ci(gEt),handle:{title:"Charts"}},{path:"monthly-income-expense",element:Ci(vEt),handle:{title:"Monthly Income/Expense",breadcrumb:"Income/Expense"}}]},{path:"documents",handle:{breadcrumb:"Documents"},children:[{index:!0,element:Ci(yEt,A.jsx(Td,{})),handle:{title:"All Documents"}},{path:"issue-document",element:Ci(bEt),handle:{title:"Issue Document",breadcrumb:"Issue Document"}},{path:"issue-documents",element:Ci(kEt),handle:{title:"Issue Documents",breadcrumb:"Issue Documents"}}]},{path:"reports",handle:{breadcrumb:"Reports"},children:[{path:"trial-balance",element:Ci(wEt,A.jsx(Vl,{})),handle:{title:"Trial Balance Report",breadcrumb:"Trial Balance"}},{path:"conto",element:Ci(SEt,A.jsx(Vl,{})),handle:{title:"Conto Report",breadcrumb:"Conto"}},{path:"vat-monthly",element:Ci(xEt,A.jsx(Vl,{})),handle:{title:"VAT Monthly Report",breadcrumb:"VAT Monthly"}},{path:"profit-and-loss",handle:{breadcrumb:"Profit & Loss"},children:[{index:!0,element:Ci(cne,A.jsx(Vl,{})),handle:{title:"Profit & Loss Report"}},{path:":year",element:Ci(cne,A.jsx(Vl,{})),handle:{title:"Profit & Loss Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"tax",handle:{breadcrumb:"Tax"},children:[{index:!0,element:Ci(dne,A.jsx(Vl,{})),handle:{title:"Tax Report"}},{path:":year",element:Ci(dne,A.jsx(Vl,{})),handle:{title:"Tax Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"depreciation",element:Ci(NEt,A.jsx(Vl,{})),handle:{title:"Depreciation Report",breadcrumb:"Depreciation"}},{path:"shaam-6111",element:Ci(CEt,A.jsx(Vl,{})),handle:{title:"Shaam 6111 Report",breadcrumb:"Shaam 6111"}},{path:"yearly-ledger",element:Ci(_Et,A.jsx(Vl,{})),handle:{title:"Yearly Ledger Report",breadcrumb:"Yearly Ledger"}},{path:"corporate-tax-ruling-compliance",handle:{breadcrumb:"Tax Ruling"},children:[{index:!0,element:Ci(une,A.jsx(Vl,{})),handle:{title:"Corporate Tax Ruling Compliance Report"}},{path:":year",element:Ci(une,A.jsx(Vl,{})),handle:{title:"Corporate Tax Ruling Compliance Report",breadcrumb:e=>e?.year||"Year"}}]},{path:"balance",element:Ci(FEt,A.jsx(Vl,{})),handle:{title:"Balance Report",breadcrumb:"Balance"}},{path:"validate-reports",element:Ci(EEt),handle:{title:"Validate Reports",breadcrumb:"Validate"}}]},{path:"accountant-approvals",element:Ci(BEt,A.jsx(Td,{})),handle:{title:"Accountant Approvals",breadcrumb:"Accountant Approvals"}},{path:"salaries",element:Ci(DEt,A.jsx(Td,{})),handle:{title:"Salaries",breadcrumb:"Salaries"}},{path:"tags",element:Ci(TEt),handle:{title:"Tags",breadcrumb:"Tags"}},{path:"tax-categories",element:Ci(IEt),handle:{title:"Tax Categories",breadcrumb:"Tax Categories"}},{path:"sort-codes",element:Ci(OEt),handle:{title:"Sort Codes",breadcrumb:"Sort Codes"}},{path:"*",element:Ci(PEt),handle:{title:"Page Not Found"}}]}]}],MEt=document.getElementById("root"),LEt=uNe.createRoot(MEt),$Et=f_e(jEt);LEt.render(A.jsx(S.StrictMode,{children:A.jsx(x_e,{router:$Et})}));export{YP as $,V5t as A,bt as B,Fct as C,zt as D,hSt as E,Ofe as F,qEt as G,Qi as H,bSt as I,D5t as J,fc as K,wA as L,HNt as M,Ac as N,E$ as O,rie as P,WNt as Q,ki as R,iBt as S,Mr as T,CDt as U,Il as V,_$ as W,si as X,El as Y,af as Z,qd as _,lr as a,PDt as a$,yf as a0,Kc as a1,Rn as a2,jn as a3,ii as a4,Yn as a5,QDt as a6,Xn as a7,HEt as a8,cBt as a9,e0 as aA,Jot as aB,fB as aC,gA as aD,Xot as aE,DR as aF,lBt as aG,eTt as aH,Xh as aI,m0e as aJ,qlt as aK,C$ as aL,jp as aM,j4e as aN,twe as aO,q1e as aP,ZEt as aQ,A0e as aR,Z2e as aS,vB as aT,sFe as aU,tie as aV,iie as aW,sBt as aX,ist as aY,pye as aZ,fDt as a_,h$ as aa,b1 as ab,_o as ac,Xve as ad,_M as ae,m5t as af,YEt as ag,V as ah,C6 as ai,IDt as aj,yDt as ak,ODt as al,Zn as am,w1 as an,SA as ao,td as ap,nd as aq,nj as ar,_p as as,bp as at,os as au,ls as av,ss as aw,cs as ax,zo as ay,Ik as az,aie as b,Xi as b$,tBt as b0,vn as b1,u$ as b2,Pve as b3,h5t as b4,sC as b5,vC as b6,q2e as b7,S2e as b8,ONt as b9,rBt as bA,ySt as bB,A5t as bC,d5t as bD,Xt as bE,Dt as bF,Lt as bG,Ge as bH,Sn as bI,rpt as bJ,Cn as bK,iDt as bL,bM,N5t as bN,_i as bO,fs as bP,lM as bQ,GF as bR,ey as bS,Wc as bT,lf as bU,gp as bV,aM as bW,_Dt as bX,uDt as bY,k5t as bZ,Vs as b_,p5t as ba,Wu as bb,Q9 as bc,DFe as bd,aBt as be,xn as bf,VYe as bg,QEt as bh,rCt as bi,aCt as bj,Cte as bk,j_e as bl,I2e as bm,_te as bn,dBt as bo,wCe as bp,ICe as bq,UTe as br,oBt as bs,att as bt,gYe as bu,Oy as bv,STe as bw,u5t as bx,Ri as by,co as bz,LYe as c,j2e as c$,mDt as c0,vf as c1,qF as c2,qr as c3,rg as c4,fBt as c5,Py as c6,N6 as c7,ABt as c8,mBt as c9,TDt as cA,NBt as cB,CBt as cC,FBt as cD,_Bt as cE,EBt as cF,BBt as cG,DBt as cH,TBt as cI,LM as cJ,Np as cK,o8 as cL,dCt as cM,Act as cN,dDt as cO,KEt as cP,OBt as cQ,IBt as cR,Bre as cS,Gc as cT,tv as cU,f5t as cV,xYe as cW,FYe as cX,BEe as cY,yC as cZ,Qwe as c_,Yp as ca,hBt as cb,vDt as cc,h0 as cd,FDt as ce,ADt as cf,aDt as cg,ER as ch,JEt as ci,BDt as cj,pBt as ck,gBt as cl,Jvt as cm,vq as cn,vBt as co,yBt as cp,rDt as cq,EDt as cr,bBt as cs,kBt as ct,wBt as cu,oDt as cv,DDt as cw,SBt as cx,xBt as cy,sDt as cz,G5t as d,Up as d$,Zfe as d0,Fre as d1,y5t as d2,l6 as d3,W_t as d4,oFt as d5,vp as d6,vSe as d7,ff as d8,aTt as d9,JDt as dA,p0 as dB,jNt as dC,gDt as dD,SDt as dE,K5t as dF,bz as dG,NSt as dH,MNt as dI,i0 as dJ,r0 as dK,a0 as dL,Kyt as dM,N2e as dN,INt as dO,PNt as dP,W5t as dQ,Mct as dR,LBt as dS,fr as dT,Ti as dU,L5t as dV,Eje as dW,ASe as dX,Fje as dY,En as dZ,p9 as d_,fFt as da,xme as db,Yr as dc,A2t as dd,uBt as de,Jl as df,b5t as dg,RB as dh,fM as di,g0 as dj,cCt as dk,M1 as dl,Jp as dm,eg as dn,Go as dp,wl as dq,Yc as dr,tg as ds,Qo as dt,Noe as du,Coe as dv,_oe as dw,WDt as dx,q5t as dy,q1 as dz,ad as e,s5t as e$,hDt as e0,I5t as e1,ZDt as e2,Foe as e3,Eoe as e4,Wb as e5,bDt as e6,z2e as e7,UDt as e8,KDt as e9,U5t as eA,NDt as eB,_5t as eC,rwe as eD,cc as eE,Fl as eF,IC as eG,XDt as eH,d0 as eI,I1 as eJ,Bme as eK,j5t as eL,M5t as eM,jBt as eN,MBt as eO,i5t as eP,Z5t as eQ,l5t as eR,a5t as eS,nBt as eT,r5t as eU,XEt as eV,zEt as eW,VEt as eX,eBt as eY,GEt as eZ,o5t as e_,YDt as ea,O5t as eb,P5t as ec,YCt as ed,pSe as ee,rTt as ef,iTt as eg,_w as eh,mA as ei,oTt as ej,$Bt as ek,UBt as el,DYe as em,iwe as en,eyt as eo,A0 as ep,Cct as eq,QBt as er,HBt as es,zBt as et,VBt as eu,GBt as ev,qBt as ew,wz as ex,Q5t as ey,WEt as ez,Tfe as f,jDt as f$,Jne as f0,c5t as f1,J5t as f2,KBt as f3,H5t as f4,RBt as f5,R5t as f6,Y5t as f7,x0e as f8,X5t as f9,$Dt as fA,RDt as fB,F5t as fC,pw as fD,kDt as fE,D6 as fF,WBt as fG,XBt as fH,ZBt as fI,YBt as fJ,JBt as fK,D$ as fL,e5t as fM,t5t as fN,n5t as fO,z5t as fP,MDt as fQ,tTt as fR,PBt as fS,cDt as fT,pDt as fU,M4e as fV,tDt as fW,wDt as fX,LDt as fY,B5t as fZ,nDt as f_,rf as fa,Or as fb,$5t as fc,l5e as fd,lj as fe,Bs as ff,zDt as fg,Bo as fh,yOe as fi,sn as fj,VDt as fk,GDt as fl,Kd as fm,ui as fn,S1 as fo,Kt as fp,T5t as fq,s8 as fr,fSt as fs,xie as ft,fo as fu,Nie as fv,S5t as fw,x5t as fx,w5t as fy,JB as fz,kA as g,E5t as g0,lDt as g1,eDt as g2,Kne as g3,Wne as g4,qE as g5,br as g6,v5t as h,or as i,A as j,xDt as k,sr as l,C5t as m,N0 as n,CA as o,Ft as p,Do as q,S as r,gf as s,Bt as t,Xp as u,Qn as v,m1 as w,Ip as x,F$ as y,g5t as z};
|