Presupuestador_web/dist/client/assets/index-Da4WHGoB.js

255 lines
283 KiB
JavaScript
Raw Normal View History

2026-10-08 10:42:55 +00:00
var L_=Object.defineProperty;var T_=(n,o,r)=>o in n?L_(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r;var Se=(n,o,r)=>T_(n,typeof o!="symbol"?o+"":o,r);import{u as Ic,a as tn,b as nn,c as Pn,d as Ne,j as i,P as O_,e as P_,f as he,g as q_,N as ns,R as Pe,J as Et,h as qe,i as ir,D as sr,l as Pa,M as Tt,V as k_,r as L,k as Fc,m as Mc,n as fr,o as Dc,B as G,C as $_,p as gr,q as mr,s as hr,S as uo,t as pr,v as Qi,w,x as co,y as rs,z as is,A as ss,E as Ur,F as fo,G as ar,H as or,I as lr,K as ur,L as z_,O as rn,Q as V_,T as B_,U as U_,W as Le,X as ct,Y as Ue,Z as We,_ as Te,$ as _n,a0 as go,a1 as G_,a2 as mo,a3 as bn,a4 as ho,a5 as po,a6 as Kr,a7 as Rt,a8 as Lc,a9 as H_,aa as Xi,ab as xr,ac as xo,ad as vo,ae as _o,af as bo,ag as Tc,ah as wo,ai as So,aj as jo,ak as as,al as K_,am as Tn,an as Pt,ao as hc,ap as W_,aq as Y_,ar as Q_,as as Co,at as Bt,au as Cn,av as os,aw as Oc,ax as pn,ay as X_,az as Pc,aA as Z_,aB as se,aC as ls,aD as pc,aE as qc,aF as kc,aG as $c,aH as qn,aI as zc,aJ as us,aK as Yr,aL as Qr,aM as Xr,aN as Wr,aO as J_,aP as Vc,aQ as Ye,aR as Qe,aS as Xa,aT as Xe,aU as cr,aV as vr,aW as dr,aX as e0,aY as t0,aZ as n0,a_ as Za,a$ as r0,b0 as i0,b1 as nr,b2 as Bc,b3 as Ja,b4 as Uc,b5 as wn,b6 as Zi,b7 as zt,b8 as s0,b9 as xc,ba as cs,bb as Gc,bc as a0,bd as yo,be as o0,bf as Hc,bg as Kc,bh as Wc,bi as Yc,bj as Qc,bk as Xc,bl as Zc,bm as Jc,bn as ed,bo as l0,bp as Gi,bq as u0,br as c0,bs as d0,bt as f0,bu as g0,bv as m0,bw as h0,bx as p0,by as x0,bz as v0,bA as _0,bB as vc,bC as td,bD as nd,bE as rd,bF as id,bG as sd,bH as ad,bI as od,bJ as b0,bK as qa,bL as w0,bM as S0,bN as j0,bO as ld,bP as ud,bQ as eo,bR as to,bS as C0,bT as ka,bU as y0,bV as N0}from"./index-BDtSHYX0.js";const R0=n=>{const{onSuccess:o,...r}=n||{},a=Pn(),{login:l}=Ic(),c=tn();return nn({mutationKey:a().auth().action("login").get(),mutationFn:l,onSuccess:async(d,m,p)=>{d.success&&c.removeQueries({queryKey:a().auth().get()}),await(o==null?void 0:o(d,m,p))},...r})};/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cd=Ne("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E0=Ne("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _c=Ne("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bc=Ne("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A0=Ne("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I0=Ne("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dd=Ne("CircleAlert",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const F0=Ne("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M0=Ne("CircleX",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D0=Ne("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const No=Ne("Copy",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fd=Ne("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L0=Ne("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gd=Ne("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T0=Ne("Eye",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O0=Ne("FileText",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const md=Ne("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P0=Ne("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ro=Ne("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eo=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q0=Ne("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k0=Ne("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $0=Ne("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hd=Ne("SquarePen",[["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pd=Ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),z0=({className:n,...o})=>i.jsx(P_,{className:he("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...o}),wc=O_,V0=({withHandle:n,className:o,...r})=>i.jsx(q_,{className:he("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",o),...r,children:n&&i.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:i.jsx(md,{className:"h-2.5 w-2.5"})})});function ut({className:n,...o}){return i.jsx("div",{className:he("animate-pulse rounded-md bg-muted",n),...o})}const B0=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let Hi;const U0=new Uint8Array(16);function G0(){if(!Hi&&(Hi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Hi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hi(U0)}const Ke=[];for(let n=0;n<256;++n)Ke.push((n+256).toString(16).slice(1));function H0(n,o=0){return Ke[n[o+0]]+Ke[n[o+1]]+Ke[n[o+2]]+Ke[n[o+3]]+"-"+Ke[n[o+4]]+Ke[n[o+5]]+"-"+Ke[n[o+6]]+Ke[n[o+7]]+"-"+Ke[n[o+8]]+Ke[n[o+9]]+"-"+Ke[n[o+10]]+Ke[n[o+11]]+Ke[n[o+12]]+Ke[n[o+13]]+Ke[n[o+14]]+Ke[n[o+15]]}const K0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sc={randomUUID:K0};function W0(n,o,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const a=n.random||(n.rng||G0)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,H0(a)}class mn extends ns{static validate(o,r){const a=Pe.RULE_ALLOW_EMPTY.default(""),l=Et.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),c=Et.alternatives(a,l);return Pe.validate(c,o)}static sanitize(o){return o.trim()}static create(o,r={}){const a={label:"id",generateOnEmpty:!1,...r};if(!o&&!a.generateOnEmpty)return qe.fail(ir(sr.INVALID_INPUT_DATA,"ID is null or empty"));if(o){const l=mn.validate(o,a);return l.isFailure?qe.fail(ir(sr.INVALID_INPUT_DATA,l.error.message,a)):qe.ok(new mn(mn.sanitize(l.object)))}return a.generateOnEmpty?mn.generateNewID():qe.ok(new mn(null))}static generateNewID(){return qe.ok(new mn(W0()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const $a={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian"
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function eb(){return{accessor:(n,o)=>typeof n=="function"?{...o,accessorFn:n}:{...o,accessorKey:n},display:n=>n,group:n=>n}}function xn(n,o){return typeof n=="function"?n(o):n}function xt(n,o){return r=>{o.setState(a=>({...a,[n]:xn(r,a[n])}))}}function ds(n){return n instanceof Function}function tb(n){return Array.isArray(n)&&n.every(o=>typeof o=="number")}function nb(n,o){const r=[],a=l=>{l.forEach(c=>{r.push(c);const d=o(c);d!=null&&d.length&&a(d)})};return a(n),r}function Q(n,o,r){let a=[],l;return c=>{let d;r.key&&r.debug&&(d=Date.now());const m=n(c);if(!(m.length!==a.length||m.some((v,j)=>a[j]!==v)))return l;a=m;let x;if(r.key&&r.debug&&(x=Date.now()),l=o(...m),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const v=Math.round((Date.now()-d)*100)/100,j=Math.round((Date.now()-x)*100)/100,y=j/16,_=(E,R)=>{for(E=String(E);E.length<R;)E=" "+E;return E};console.info(`%c⏱ ${_(j,5)} /${_(v,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r==null?void 0:r.key)}return l}}function X(n,o,r,a){return{debug:()=>{var l;return(l=n==null?void 0:n.debugAll)!=null?l:n[o]},key:!1,onChange:a}}function rb(n,o,r,a){const l=()=>{var d;return(d=c.getValue())!=null?d:n.options.renderFallbackValue},c={id:`${o.id}_${r.id}`,row:o,column:r,getValue:()=>o.getValue(a),renderValue:l,getContext:Q(()=>[n,r,o,c],(d,m,p,x)=>({table:d,column:m,row:p,cell:x,getValue:x.getValue,renderValue:x.renderValue}),X(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(c,r,o,n)},{}),c}function ib(n,o,r,a){var l,c;const m={...n._getDefaultColumnDef(),...o},p=m.accessorKey;let x=(l=(c=m.id)!=null?c:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?l:typeof m.header=="string"?m.header:void 0,v;if(m.accessorFn?v=m.accessorFn:p&&(p.includes(".")?v=y=>{let _=y;for(const R of p.split(".")){var E;_=(E=_)==null?void 0:E[R]}return _}:v=y=>y[m.accessorKey]),!x)throw new Error;let j={id:`${String(x)}`,accessorFn:v,parent:a,depth:r,columnDef:m,columns:[],getFlatColumns:Q(()=>[!0],()=>{var y;return[j,...(y=j.columns)==null?void 0:y.flatMap(_=>_.getFlatColumns())]},X(n.options,"debugColumns")),getLeafColumns:Q(()=>[n._getOrderColumnsFn()],y=>{var _;if((_=j.columns)!=null&&_.length){let E=j.columns.flatMap(R=>R.getLeafColumns());return y(E)}return[j]},X(n.options,"debugColumns"))};for(const y of n._features)y.createColumn==null||y.createColumn(j,n);return j}const et="debugHeaders";function Cc(n,o,r){var a;let c={id:(a=r.id)!=null?a:o.id,column:o,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),d.push(p)};return m(c),d},getContext:()=>({table:n,header:c,column:o})};return n._features.forEach(d=>{d.createHeader==null||d.createHeader(c,n)}),c}const sb={createTable:n=>{n.getHeaderGroups=Q(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>{var c,d;const m=(c=a==null?void 0:a.map(j=>r.find(y=>y.id===j)).filter(Boolean))!=null?c:[],p=(d=l==null?void 0:l.map(j=>r.find(y=>y.id===j)).filter(Boolean))!=null?d:[],x=r.filter(j=>!(a!=null&&a.includes(j.id))&&!(l!=null&&l.includes(j.id)));return Ki(o,[...m,...x,...p],n)},X(n.options,et)),n.getCenterHeaderGroups=Q(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>(r=r.filter(c=>!(a!=null&&a.includes(c.id))&&!(l!=null&&l.includes(c.id))),Ki(o,r,n,"center")),X(n.options,et)),n.getLeftHeaderGroups=Q(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Ki(o,c,n,"left")},X(n.options,et)),n.getRightHeaderGroups=Q(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Ki(o,c,n,"right")},X(n.options,et)),n.getFooterGroups=Q(()=>[n.getHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getLeftFooterGroups=Q(()=>[n.getLeftHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getCenterFooterGroups=Q(()=>[n.getCenterHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getRightFooterGroups=Q(()=>[n.getRightHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getFlatHeaders=Q(()=>[n.getHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getLeftFlatHeaders=Q(()=>[n.getLeftHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getCenterFlatHeaders=Q(()=>[n.getCenterHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getRightFlatHeaders=Q(()=>[n.getRightHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getCenterLeafHeaders=Q(()=>[n.getCenterFlatHeaders()],o=>o.filter(r=>{v
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ji(n,o){return n?Gb(n)?L.createElement(n,o):n:null}function Gb(n){return Hb(n)||typeof n=="function"||Kb(n)}function Hb(n){return typeof n=="function"&&(()=>{const o=Object.getPrototypeOf(n);return o.prototype&&o.prototype.isReactComponent})()}function Kb(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Md(n){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=L.useState(()=>({current:qb(o)})),[a,l]=L.useState(()=>r.current.initialState);return r.current.setOptions(c=>({...c,...n,state:{...a,...n.state},onStateChange:d=>{l(d),n.onStateChange==null||n.onStateChange(d)}})),r.current}const Wb=({buttonText:n,title:o="",content:r,className:a=""})=>i.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${a}`,children:i.jsxs(fr,{children:[i.jsx(Dc,{asChild:!0,children:i.jsxs(G,{variant:"link",className:"inline-flex items-center font-medium group",children:[i.jsx("span",{className:"underline-offset-4 group-hover:underline",children:n}),i.jsx($_,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(gr,{className:"sm:max-w-[425px]",children:[i.jsx(mr,{children:i.jsx(hr,{children:o})}),i.jsxs(uo,{className:"grid gap-4 py-2",children:[r,i.jsx(pr,{children:i.jsx(Qi,{asChild:!0,children:i.jsx(G,{type:"button",children:w("common.close")})})})]})]})]})});function Yb(n){let a=0;for(let v=0;v<n.length;v++)a=n.charCodeAt(v)+((a<<5)-a);let l="#";for(let v=0;v<3;v++){const j=a>>v*8&255;l+=("00"+j.toString(16)).substr(-2)}const c=parseInt(l.substr(1,2),16),d=parseInt(l.substr(3,2),16),m=parseInt(l.substr(5,2),16),p=`#${(c*.7|0).toString(16).padStart(2,"0")}${(d*.7|0).toString(16).padStart(2,"0")}${(m*.7|0).toString(16).padStart(2,"0")}`,x=`#${Math.min(255,Math.floor(c+(255-c)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(d+(255-d)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(m+(255-m)*.7)).toString(16).padStart(2,"0")}`;return[p,x]}const Dd=({label:n,className:o})=>{const[r,a]=Yb(n);return i.jsx(co,{className:o,style:o?{}:{backgroundColor:a,color:r},children:n})};function Ld({table:n,header:o,className:r}){return o.column.getCanSort()?i.jsx("div",{className:he("flex items-center space-x-2",r),children:i.jsxs(rs,{children:[i.jsx(is,{asChild:!0,children:i.jsxs(G,{"aria-label":o.column.getIsSorted()==="desc"?w("common.sort_desc_description"):o.column.getIsSorted()==="asc"?w("common.sort_asc_description"):w("common.sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[Ji(o.column.columnDef.header,o.getContext()),o.column.getIsSorted()==="desc"?i.jsx(_c,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):o.column.getIsSorted()==="asc"?i.jsx(bc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.jsx(E0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),i.jsxs(ss,{align:"start",children:[o.column.getCanSort()&&i.jsxs(i.Fragment,{children:[i.jsxs(Ur,{onClick:()=>o.column.toggleSorting(!1),"aria-label":w("common.sort_asc"),children:[i.jsx(bc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_asc")]}),i.jsxs(Ur,{onClick:()=>o.column.toggleSorting(!0),"aria-label":w("common.sort_desc"),children:[i.jsx(_c,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_desc")]})]}),o.column.getCanSort()&&o.column.getCanHide()&&i.jsx(fo,{}),o.column.getCanHide()&&i.jsxs(Ur,{onClick:()=>o.column.toggleVisibility(!1),"aria-label":w("common.hide"),children:[i.jsx(gd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:he("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:o.isPlaceholder?null:Ji(o.column.columnDef.header,o.getContext())}),!1]})}function Qb({table:n,className:o,enablePageSizeSelector:r=!0,visible:a="auto"}){const l=L.useMemo(()=>a===!0,[a]),c=L.useMemo(()=>a==="aut
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/ts.exports;(function(n,o){(function(){var r,a="4.17.21",l=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",m="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",x=500,v="__lodash_placeholder__",j=1,y=2,_=4,E=1,R=2,O=1,M=2,$=4,q=8,B=16,T=32,k=64,W=128,te=256,U=512,ge=30,_e="...",K=800,Ee=16,ke=1,Z=2,tt=3,Oe=1/0,de=9007199254740991,$e=17976931348623157e292,ne=NaN,Ce=4294967295,vt=Ce-1,_r=Ce>>>1,yn=[["ary",W],["bind",O],["bindKey",M],["curry",q],["curryRight",B],["flip",U],["partial",T],["partialRight",k],["rearg",te]],$n="[object Arguments]",Jr="[object Array]",Wd="[object AsyncFunction]",br="[object Boolean]",wr="[object Date]",Yd="[object DOMException]",ei="[object Error]",ti="[object Function]",qo="[object GeneratorFunction]",At="[object Map]",Sr="[object Number]",Qd="[object Null]",Ut="[object Object]",ko="[object Promise]",Xd="[object Proxy]",jr="[object RegExp]",It="[object Set]",Cr="[object String]",ni="[object Symbol]",Zd="[object Undefined]",yr="[object WeakMap]",Jd="[object WeakSet]",Nr="[object ArrayBuffer]",zn="[object DataView]",ps="[object Float32Array]",xs="[object Float64Array]",vs="[object Int8Array]",_s="[object Int16Array]",bs="[object Int32Array]",ws="[object Uint8Array]",Ss="[object Uint8ClampedArray]",js="[object Uint16Array]",Cs="[object Uint32Array]",ef=/\b__p \+= '';/g,tf=/\b(__p \+=) '' \+/g,nf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$o=/&(?:amp|lt|gt|quot|#39);/g,zo=/[&<>"']/g,rf=RegExp($o.source),sf=RegExp(zo.source),af=/<%-([\s\S]+?)%>/g,of=/<%([\s\S]+?)%>/g,Vo=/<%=([\s\S]+?)%>/g,lf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uf=/^\w*$/,cf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ys=/[\\^$.*+?()[\]{}|]/g,df=RegExp(ys.source),Ns=/^\s+/,ff=/\s/,gf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,mf=/\{\n\/\* \[wrapped with (.+)\] \*/,hf=/,? & /,pf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xf=/[()=,{}\[\]\/\s]/,vf=/\\(\\)?/g,_f=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bo=/\w*$/,bf=/^[-+]0x[0-9a-f]+$/i,wf=/^0b[01]+$/i,Sf=/^\[object .+?Constructor\]$/,jf=/^0o[0-7]+$/i,Cf=/^(?:0|[1-9]\d*)$/,yf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ri=/($^)/,Nf=/['\n\r\u2028\u2029\\]/g,ii="\\ud800-\\udfff",Rf="\\u0300-\\u036f",Ef="\\ufe20-\\ufe2f",Af="\\u20d0-\\u20ff",Uo=Rf+Ef+Af,Go="\\u2700-\\u27bf",Ho="a-z\\xdf-\\xf6\\xf8-\\xff",If="\\xac\\xb1\\xd7\\xf7",Ff="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mf="\\u2000-\\u206f",Df=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ko="A-Z\\xc0-\\xd6\\xd8-\\xde",Wo="\\ufe0e\\ufe0f",Yo=If+Ff+Mf+Df,Rs="['’]",Lf="["+ii+"]",Qo="["+Yo+"]",si="["+Uo+"]",Xo="\\d+",Tf="["+Go+"]",Zo="["+Ho+"]",Jo="[^"+ii+Yo+Xo+Go+Ho+Ko+"]",Es="\\ud83c[\\udffb-\\udfff]",Of="(?:"+si+"|"+Es+")",el="[^"+ii+"]",As="(?:\\ud83c[\\udde6-\\uddff]){2}",Is="[\\ud800-\\udbff][\\udc00-\\udfff]",Vn="["+Ko+"]",tl="\\u200d",nl="(?:"+Zo+"|"+Jo+")",Pf="(?:"+Vn+"|"+Jo+")",rl="(?:"+Rs+"(?:d|ll|m|re|s|t|ve))?",il="(?:"+Rs+"(?:D|LL|M|RE|S|T|VE))?",sl=Of+"?",al="["+Wo+"]?",qf="(?:"+tl+"(?:"+[el,As,Is].join("|")+")"+al+sl+")*",kf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$f="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ol=al+sl+qf,zf="(?:"+[Tf,As,Is].join("|")+")"+ol,Vf="(?:"+[el+si+"?",si,As,Is,Lf].join("|")+")",Bf=RegExp(Rs,"g"),Uf=RegExp(si,"g"),Fs=RegExp(Es+"(?="+Es+")|"+Vf+ol,"g"),Gf=RegExp([Vn+"?"+Zo+"+"+rl+"(?="+[Qo,Vn,"$"].join("|")+")",Pf+"+"+il+"(?="+[Qo,Vn+nl,"$"].join("|")+")",Vn+"?"+nl+"+"+rl,Vn+"+"+il,$f,kf,Xo,zf].join("|"),"g"),Hf=RegExp("["+tl+ii+Uo+Wo+"]"),Kf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout
/* [wrapped with `+t+`] */
`)}function fh(e){return ie(e)||Ln(e)||!!(Il&&e&&e[Il])}function Qt(e,t){var s=typeof e;return t=t??de,!!t&&(s=="number"||s!="symbol"&&Cf.test(e))&&e>-1&&e%1==0&&e<t}function rt(e,t,s){if(!Ae(s))return!1;var u=typeof t;return(u=="number"?at(s)&&Qt(t,s.length):u=="string"&&t in s)?Dt(s[t],e):!1}function va(e,t){if(ie(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||mt(e)?!0:uf.test(e)||!lf.test(e)||t!=null&&e in we(t)}function gh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _a(e){var t=Li(e),s=g[t];if(typeof s!="function"||!(t in ce.prototype))return!1;if(e===s)return!0;var u=ha(s);return!!u&&e===u[0]}function mh(e){return!!Nl&&Nl in e}var hh=ci?Xt:Oa;function kr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Kn;return e===s}function Nu(e){return e===e&&!Ae(e)}function Ru(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in we(s))}}function ph(e){var t=$i(e,function(u){return s.size===x&&s.clear(),u}),s=t.cache;return t}function xh(e,t){var s=e[1],u=t[1],f=s|u,h=f<(O|M|W),b=u==W&&s==q||u==W&&s==te&&e[7].length<=t[8]||u==(W|te)&&t[7].length<=t[8]&&s==q;if(!(h||b))return e;u&O&&(e[2]=t[2],f|=s&O?0:$);var S=t[3];if(S){var N=e[3];e[3]=N?uu(N,S,t[4]):S,e[4]=N?on(e[3],v):t[4]}return S=t[5],S&&(N=e[5],e[5]=N?cu(N,S,t[6]):S,e[6]=N?on(e[5],v):t[6]),S=t[7],S&&(e[7]=S),u&W&&(e[8]=e[8]==null?t[8]:Ze(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function vh(e){var t=[];if(e!=null)for(var s in we(e))t.push(s);return t}function _h(e){return fi.call(e)}function Eu(e,t,s){return t=Ve(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,h=Ve(u.length-t,0),b=A(h);++f<h;)b[f]=u[t+f];f=-1;for(var S=A(t+1);++f<t;)S[f]=u[f];return S[t]=s(b),dt(e,this,S)}}function Au(e,t){return t.length<2?e:Fn(e,Ct(t,0,-1))}function bh(e,t){for(var s=e.length,u=Ze(t.length,s),f=st(e);u--;){var h=t[u];e[u]=Qt(h,s)?f[h]:r}return e}function ba(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Iu=Mu(Jl),$r=Tg||function(e,t){return Ge.setTimeout(e,t)},wa=Mu(Bm);function Fu(e,t,s){var u=t+"";return wa(e,dh(u,wh(lh(u),s)))}function Mu(e){var t=0,s=0;return function(){var u=kg(),f=Ee-(u-s);if(s=u,f>0){if(++t>=K)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Oi(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s<t;){var h=ra(s,f),b=e[h];e[h]=e[s],e[s]=b}return e.length=t,e}var Du=ph(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cf,function(s,u,f,h){t.push(f?h.replace(vf,"$1"):u||s)}),t});function $t(e){if(typeof e=="string"||mt(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Dn(e){if(e!=null){try{return di.call(e)}catch{}try{return e+""}catch{}}return""}function wh(e,t){return bt(yn,function(s){var u="_."+s[0];t&s[1]&&!ai(e,u)&&e.push(u)}),e.sort()}function Lu(e){if(e instanceof ce)return e.clone();var t=new St(e.__wrapped__,e.__chain__);return t.__actions__=st(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Sh(e,t,s){(s?rt(e,t,s):t===r)?t=1:t=Ve(ae(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,h=0,b=A(vi(u/t));f<u;)b[h++]=Ct(e,f,f+=t);return b}function jh(e){for(var t=-1,s=e==null?0:e.length,u=0,f=[];++t<s;){var h=e[t];h&&(f[u++]=h)}return f}function Ch(){var e=arguments.length;if(!e)return[];for(var t=A(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return an(ie(s)?st(s):[s],He(t,1))}var yh=le(function(e,t){return Me(e)?Lr(e,He(t,1,Me,!0)):[]}),Nh=le(function(e,t){var s=yt(t);return Me(s)&&(s=r),Me(e)?Lr(e,He(t,1,Me,!0),Y(s,2)):[]}),Rh=le(function(e,t){var s=yt(t);return Me(s)&&(s=r),Me(e)?Lr(e,He(t,1,Me,!0),r,s):[]});function Eh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ae(t),Ct(e,t<0?0:t,u)):[]}function Ah(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ae(t),t=u-t,Ct(e,0,t<0?0:t)):[]}function Ih(e,t){return e&&e.length?Ei(e,Y(t,3),!0,!0):[]}function Fh(e,t){return e&&e.length?Ei(e,Y(t,3),!0):[]}function Mh(e,t,s,u){var f=e==null?0:e.length;return f?(s&&typeof s!="n
`;e.replace(z,function(ee,ue,fe,ht,it,pt){return fe||(fe=ht),P+=e.slice(F,pt).replace(Nf,hg),ue&&(S=!0,P+=`' +
__e(`+ue+`) +
'`),it&&(N=!0,P+=`';
`+it+`;
__p += '`),fe&&(P+=`' +
((__t = (`+fe+`)) == null ? '' : __t) +
'`),F=pt+ee.length,ee}),P+=`';
`;var J=xe.call(t,"variable")&&t.variable;if(!J)P=`with (obj) {
`+P+`
}
`;else if(xf.test(J))throw new re(m);P=(N?P.replace(ef,""):P).replace(tf,"$1").replace(nf,"$1;"),P="function("+(J||"obj")+`) {
`+(J?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+P+`return __p
}`;var oe=fc(function(){return me(h,H+"return "+P).apply(r,b)});if(oe.source=P,Na(oe))throw oe;return oe}function zv(e){return pe(e).toLowerCase()}function Vv(e){return pe(e).toUpperCase()}function Bv(e,t,s){if(e=pe(e),e&&(s||t===r))return wl(e);if(!e||!(t=gt(t)))return e;var u=Ft(e),f=Ft(t),h=Sl(u,f),b=jl(u,f)+1;return fn(u,h,b).join("")}function Uv(e,t,s){if(e=pe(e),e&&(s||t===r))return e.slice(0,yl(e)+1);if(!e||!(t=gt(t)))return e;var u=Ft(e),f=jl(u,Ft(t))+1;return fn(u,0,f).join("")}function Gv(e,t,s){if(e=pe(e),e&&(s||t===r))return e.replace(Ns,"");if(!e||!(t=gt(t)))return e;var u=Ft(e),f=Sl(u,Ft(t));return fn(u,f).join("")}function Hv(e,t){var s=ge,u=_e;if(Ae(t)){var f="separator"in t?t.separator:f;s="length"in t?ae(t.length):s,u="omission"in t?gt(t.omission):u}e=pe(e);var h=e.length;if(Un(e)){var b=Ft(e);h=b.length}if(s>=h)return e;var S=s-Gn(u);if(S<1)return u;var N=b?fn(b,0,S).join(""):e.slice(0,S);if(f===r)return N+u;if(b&&(S+=N.length-S),Ra(f)){if(e.slice(S).search(f)){var F,D=N;for(f.global||(f=Bs(f.source,pe(Bo.exec(f))+"g")),f.lastIndex=0;F=f.exec(D);)var P=F.index;N=N.slice(0,P===r?S:P)}}else if(e.indexOf(gt(f),S)!=S){var z=N.lastIndexOf(f);z>-1&&(N=N.slice(0,z))}return N+u}function Kv(e){return e=pe(e),e&&rf.test(e)?e.replace($o,Sg):e}var Wv=Zn(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ia=gu("toUpperCase");function dc(e,t,s){return e=pe(e),t=s?r:t,t===r?xg(e)?yg(e):lg(e):e.match(t)||[]}var fc=le(function(e,t){try{return dt(e,r,t)}catch(s){return Na(s)?s:new re(s)}}),Yv=Yt(function(e,t){return bt(t,function(s){s=$t(s),Kt(e,s,Ca(e[s],e))}),e});function Qv(e){var t=e==null?0:e.length,s=Y();return e=t?Re(e,function(u){if(typeof u[1]!="function")throw new wt(d);return[s(u[0]),u[1]]}):[],le(function(u){for(var f=-1;++f<t;){var h=e[f];if(dt(h[0],this,u))return dt(h[1],this,u)}})}function Xv(e){return Sm(jt(e,j))}function Fa(e){return function(){return e}}function Zv(e,t){return e==null||e!==e?t:e}var Jv=hu(),e_=hu(!0);function lt(e){return e}function Ma(e){return Gl(typeof e=="function"?e:jt(e,j))}function t_(e){return Kl(jt(e,j))}function n_(e,t){return Wl(e,jt(t,j))}var r_=le(function(e,t){return function(s){return Tr(s,e,t)}}),i_=le(function(e,t){return function(s){return Tr(e,s,t)}});function Da(e,t,s){var u=Be(t),f=yi(t,u);s==null&&!(Ae(t)&&(f.length||!u.length))&&(s=t,t=e,e=this,f=yi(t,Be(t)));var h=!(Ae(s)&&"chain"in s)||!!s.chain,b=Xt(e);return bt(f,function(S){var N=t[S];e[S]=N,b&&(e.prototype[S]=function(){var F=this.__chain__;if(h||F){var D=e(this.__wrapped__),P=D.__actions__=st(this.__actions__);return P.push({func:N,args:arguments,thisArg:e}),D.__chain__=F,D}return N.apply(e,an([this.value()],arguments))})}),e}function s_(){return Ge._===this&&(Ge._=Fg),this}function La(){}function a_(e){return e=ae(e),le(function(t){return Yl(t,e)})}var o_=da(Re),l_=da(pl),u_=da(Os);function gc(e){return va(e)?Ps($t(e)):km(e)}function c_(e){return function(t){return e==null?r:Fn(e,t)}}var d_=xu(),f_=xu(!0);function Ta(){return[]}function Oa(){return!1}function g_(){return{}}function m_(){return""}function h_(){return!0}function p_(e,t){if(e=ae(e),e<1||e>de)return[];var s=Ce,u=Ze(e,Ce);t=Y(t),e-=Ce;for(var f=$s(u,t);++s<e;)t(s);return f}function x_(e){return ie(e)?Re(e,$t):mt(e)?[e]:st(Du(pe(e)))}function v_(e){var t=++Ag;return pe(e)+t}var __=Fi(function(e,t){return e+t},0),b_=fa("ceil"),w_=Fi(function(e,t){return e/t},1),S_=fa("floor");function j_(e){return e&&e.length?Ci(e,lt,Xs):r}function C_(e,t){return e&&e.length?Ci(e,Y(t,2),Xs):r}function y_(e){return _l(e,lt)}function N_(e,t){return _l(e,Y(t,2))}function R_(e){return e&&e.length?Ci(e,lt,ta):r}function E_(e,t){return e&&e.length?Ci(e,Y(t,2),ta):r}var A_=Fi(function(e,t){return e*t},1),I_=fa("round"),F_=Fi(function(e,t){return e-t},0);function M_(e){return e&&e.length?ks(e,lt):0}function D_(e,t){return e&&e.length?ks(e,Y(t,2)):0}return g.after=tx,g.ary=Uu,g.assign=Vx,g.assignIn=ic,g.assignInWith=Ui,g.assignWith=Bx,g.at=Ux,g.before=Gu,g.bind=Ca,g.bindAll=Yv,g.bindKey=Hu,g.castArray=gx,g.chain=zu,g.chunk=Sh,g.compact=jh,g.concat=Ch,g.cond=Qv,g.conf
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Shoe rack door: YES/NO / Profile finish: BLACK LACQUER / SILVER MATTE\r
Shoe cabinet door glass finish: FLOAT BRONZE C-424\r
Composed of:`},{id:2000000084,code:"CAP_FRE_ARM_ABATIBLE_EN",title:"CHARACTERISTICS OF THE FRONT OF THE HINGED WARDROBE",body:`Size of opening: 2275x1390 mm.\r
Model: ARGO / Finish: LACQUER / Colour: TO BE DETERMINED\r
Door thickness: 22 or 19 mm\r
Door finish: SMOOTH \r
Handle: KNOB TO BE DETERMINED\r
Hardware finish: CHROME OR ANTHRACITE\r
Perimetral doorposts: VISIBLE, REMETED OR COMBI TO BE DETERMINED.\r
Number of doors: 2 \r
Composed of:`},{id:2000000089,code:"CAP_FRE_ARM_CORREDERA_EN",title:"Size of opening: 2440x5180mm. ",body:`Model: PANORAMIC P.O. / Finish: LACQUER / Colour: WHITE\r
No. of listers: NO LISTELS / Panels finish: LACQUERED PANEL \r
Handle: \r
Perimeter frame: \r
Nº of doors: \r
INCORPORATED HYDRAULIC BRAKE (not available in lower doors of 650 mm.) OR INCORPORATED MAGNETIC BRAKE. \r
Composed of:`},{id:2000000092,code:"CAP_INT_ARM_FORRADO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Thickness block: 19 mm / Thickness complements: 19 mm.\r
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000109,code:"CAP_INT_EST_CRISTAL_EN",title:"Frames finish: BLACK ANODIZED",body:`Side frame panel finish: BRONZE FLOAT BRONZE GLASS C-424\r
Rear panel finish: BRONZE FLOAT GLASS C-424\r
Complements finish: MELAMIN / Colour: DENBER OAK M-242\r
Thickness of accessories: 25 mm.\r
Hanging bars: BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000095,code:"CAP_SEP_AMBIENTES_EN",title:"CHARACTERISTICS SEPARATION OF ROOMS",body:`Size of opening: 2450x3000 mm.\r
Model: LYN / Finish: ANODISED / Colour: BLACK\r
No. of crosspieces: 2 HORIZONTAL CROSSBARS\r
Panel finish: TRANSPARENT TEMPLARED \r
Handle: DOUBLE PER DOOR\r
Brake: DOUBLE PER DOOR (OPENING AND CLOSING)\r
Guide: VISTA (DOUBLE EMBELLECEDOR)\r
Number of panels: 2 SLIDING + 2 FIXED`}],es:[{id:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado vestidor: MELAMINA / color: A DETERMINAR",body:`Espesor bloque: 25 mm. / Espesor complementos: 25 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:52,code:"CAP_FRE_ARM_ABATIBLE_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO",body:`Medida de hueco: 2275x1390 mm.\r
Modelo: ARGO / Acabado: LACADO / Color: A DETERMINAR\r
Grosor hoja: 22 o 19 mm\r
Acabado de hojas: LISAS\r
Tirador: UÑERO A DETERMINAR\r
Acabado herrajes: CROMADO O ANTRACITA\r
Jambas perimetrales: VISTAS, REMETIDAS O COMBI A DETERMINAR.\r
Nº de hojas: 2\r
Compuesto por:`},{id:51,code:"CAP_FRE_ARM_CORREDERA_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO CORREDERA",body:`Medida de Hueco:2440x5180mm.\r
Modelo: PANORAMIC P.O. / Acabado: LACADO / Color: BLANCO\r
Nº de lístelos: SIN LISTELOS / Acabado paneles: PANEL LACADO\r
Tirador:\r
Cerco perimetral: \r
Nº de hojas:\r
FRENO HIDRAULICO INCORPORADO O FRENO MAGNETICO INCORPORADO\r
Compuesto por:`},{id:53,code:"CAP_INT_ARM_FORRADO_ES",title:"CARACTERISTICAS INTERIOR DE ARMARIO",body:`Acabado: MELAMINA / color: A DETERMINAR\r
Espesor bloque: 19 mm. / Espesor complementos: 19 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:2000000108,code:"CAP_INT_EST_CRISTAL_ES",title:"Acabado bastidores: ANODIZADO NEGRO",body:`Acabado panel bastidores laterales: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado trasera: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado complementos: MELAMINA / Color: ROBLE DENBER M-242\r
Espesor complementos: 25 mm.\r
Barras de colgar: NEGRA\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424 \r
Tirador cajones: xxxxx / Cajones: 4 DE 180 MM.\r
Compuesto por:`},{id:50,code:"CAP_SEP_AMBIENTES_ES",title:"CARACTERISTICAS SEPARACIÓN DE AMBIENTES",body:`Medida de Hueco: 2450x3000 mm.\r
Modelo: LYN / Acabado: ANODIZADO / Color: NEGRO\r
Nº de travesaños: 2 TRAVESAÑOS HORIZONTALES\r
Acabado paneles: TRANSPARENTE TEMPLADO \r
Tirador: DOBLE POR PUERTA\r
Freno: DOBLE POR PUERTA (APERTURA Y CIERRE)\r
Guía: VISTA (DOBLE EMBELLECEDOR)\r
Nº de hojas: 2 CORREDERAS + 2 FIJOS`}]},Ac=({onSelect:n})=>{const{i18n:o}=Pt(),[r]=L.useState(o.resolvedLanguage||"es"),[a]=L.useState(Fw[r.toLowerCase()]);return console.log(r),i.jsx(uo,{className:"h-96",children:i.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:a&&a.sort((l,c)=>l.title.localeCompare(c.title)).map((l,c)=>i.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>n&&n(l,1),children:i.jsxs("div",{className:"flex flex-col w-full gap-1",children:[i.jsx("div",{className:"flex items-center",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("div",{className:"font-semibold",children:l.title})})}),i.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:i.jsx("p",{dangerouslySetInnerHTML:{__html:l.body.substring(0,300).replace(`\r
`,"<br>")}})})]})},l.id))})})},Mw=({isOpen:n,onOpenChange:o,onSelect:r})=>Od("(min-width: 768px)")?i.jsx(fr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(gr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(mr,{children:[i.jsx(hr,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(cs,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ac,{onSelect:r}),i.jsx(pr,{children:i.jsx(G,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(td,{open:n,onOpenChange:o,children:i.jsxs(nd,{children:[i.jsxs(rd,{className:"text-left",children:[i.jsx(id,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(sd,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ac,{onSelect:r}),i.jsx(ad,{className:"pt-2",children:i.jsx(od,{asChild:!0,children:i.jsx(G,{variant:"outline",children:w("common.close")})})})]})}),Dw=({isOpen:n,onOpenChange:o,onSelect:r})=>Od("(min-width: 768px)")?i.jsx(fr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(gr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(mr,{children:[i.jsx(hr,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(cs,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(dr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(lo,{onSelect:r})}),i.jsx(pr,{children:i.jsx(G,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(td,{open:n,onOpenChange:o,children:i.jsxs(nd,{children:[i.jsxs(rd,{className:"text-left",children:[i.jsx(id,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(sd,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(dr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(lo,{onSelect:r})}),i.jsx(ad,{className:"pt-2",children:i.jsx(od,{asChild:!0,children:i.jsx(G,{variant:"outline",children:w("common.close")})})})]})}),Lw=({currency:n,language:o,defaultValues:r})=>{var te;const{toast:a}=Cn(),{control:l,getValues:c,setValue:d,watch:m}=xr(),p=m("show_line_discount_column")??!0,x=!!((te=c("items"))!=null&&te.some(U=>{var ge;return Number((ge=U.discount)==null?void 0:ge.amount)>0})),[v]=L.useState("dialog"),[j,y]=L.useState(!1),[_,E]=L.useState(!1),{fields:R,...O}=b0({control:l,name:"items"}),M=xw([{id:"description",accessorKey:"description",header:w("quotes.form_fields.items.description.label"),cell:({row:{index:U,original:ge}})=>ge!=null&&ge.id_article?i.jsx("div",{className:"min-h-10 whitespace-pre-wrap px-3 py-2 text-sm",children:ge.localized_description??ge.description}):i.jsx(zt,{autoSize:!0,name:`items.${U}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.quantity.label")}),cell:({row:{index:U}})=>i.jsx(tw,{scale:0,className:"text-right",name:`items.${U}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:U}})=>i.jsx(qa,{currency:n,language:o,scale:2,className:"text-right",name:`items.${U}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:U}})=>i.jsx(qa,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"text-right",name:`items.${U}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.discount.label")}),cell:({row:{index:U}})=>i.jsx(es,{scale:2,className:"text-right",name:`items.${U}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.total_price.label")}),cell:({row:{index:U}})=>i.jsx(qa,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"font-semibold text-right",name:`items.${U}.total_price`}),size:150}],{enableDragHandleColumn:!0,enableSelectionColumn:!0}),$=L.useCallback((U,ge=1)=>{O.append({...U,quant
${U.body}`,quantity:{amount:null,scale:Sn.DEFAULT_SCALE},unit_price:{amount:null,scale:Y0.DEFAULT_SCALE},discount:{amount:null,scale:2}}),a({title:w("quotes.blocks_picker_dialog.toast_article_added"),description:U.title})},[O]),[B,T]=L.useState(!1),k=[265,440,655],W=4;return v==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Ec,{actions:{...O,getItem:U=>c(`items.${U}`),pickCatalogArticle:()=>y(!0),pickBlock:()=>E(!0)},columns:M,data:R,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:U=>d("show_line_discount_column",U,{shouldDirty:!0})}),i.jsx(Dw,{onSelect:$,isOpen:j,onOpenChange:y}),i.jsx(Mw,{onSelect:q,isOpen:_,onOpenChange:E})]}):i.jsxs(z0,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[i.jsx(wc,{defaultSize:k[0],collapsedSize:W,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{T(!0)},onExpand:()=>{T(!1)},className:he(B&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Ec,{actions:{...O,getItem:U=>c(`items.${U}`)},columns:M,data:R,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:U=>d("show_line_discount_column",U,{shouldDirty:!0})})}),i.jsx(V0,{withHandle:!0,className:"mx-3"}),i.jsx(wc,{defaultSize:k[1],minSize:10,children:i.jsx(dr,{syncWithLocation:!1,children:i.jsx(lo,{onSelect:$})})})]})},Tw=()=>{const{formState:n,control:o}=xr();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(Ja,{className:"md:col-span-6",title:w("quotes.create.form_groups.general.title"),description:w("quotes.create.form_groups.general.desc"),actions:i.jsxs("div",{className:"grid min-w-48 gap-1",children:[i.jsx(wn,{htmlFor:"lang_code",className:"text-xs text-muted-foreground",children:w("quotes.form_fields.lang_code.label")}),i.jsx(Zi,{control:o,name:"lang_code",render:({field:r})=>i.jsxs(ar,{value:r.value||"es",onValueChange:r.onChange,children:[i.jsx(or,{id:"lang_code","aria-label":w("quotes.form_fields.lang_code.label"),children:i.jsx(lr,{placeholder:w("quotes.form_fields.lang_code.placeholder")})}),i.jsx(ur,{children:vn.map(a=>i.jsxs(rn,{value:a.code,children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${a.flagClassName}`}),a.name]},a.code))})]})})]}),children:[i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(On,{required:!0,className:"col-span-2",label:w("quotes.form_fields.customer_reference.label"),description:w("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Uc,{required:!0,label:w("quotes.form_fields.date.label"),description:w("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(On,{label:w("quotes.form_fields.validity.label"),description:w("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(zt,{className:"col-span-2",label:w("quotes.form_fields.payment_method.label"),description:w("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(zt,{className:"col-span-3",required:!0,label:w("quotes.form_fields.customer_information.label"),description:w("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(zt,{className:"col-span-3",label:w("quotes.form_fields.notes.label"),description:w("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(Ja,{className:"hidden md:col-span-2",title:w("quotes.create.form_groups.status.title"),description:w("quotes.create.form_groups.status.desc"),children:i.jsxs("div",{className:"grid gap-6",children:[i.jsxs("div",{className:"grid gap-3",childr
`).map((Ce,vt)=>i.jsxs("span",{className:vt===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[Ce,i.jsx("br",{})]},vt))}),size:500}],$e=[{id:"row-actions",header:()=>null,cell:({row:{original:ne}})=>{const Ce=(ne==null?void 0:ne.status)==="accepted"&&!(ne!=null&&ne.date_sent),vt=(ne==null?void 0:ne.status)==="accepted"&&!!(ne!=null&&ne.date_sent),_r=(ne==null?void 0:ne.status)==="archived";return i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(cr,{className:"gap-0",children:[i.jsxs(Ye,{children:[i.jsx(Qe,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",disabled:vt,onClick:yn=>{yn.preventDefault(),K(ne)},children:[i.jsx(hd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.edit")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.edit")})})]}),i.jsxs(Ye,{children:[i.jsx(Qe,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",onClick:yn=>{yn.preventDefault(),Ee(ne.id)},children:[i.jsx(No,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.duplicate")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.duplicate")})})]}),i.jsxs(Ye,{children:[i.jsx(Qe,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",onClick:()=>{te(ne.id,M(ne))},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.download")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.download")})})]}),i.jsxs(Ye,{children:[i.jsx(Qe,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",disabled:_r||vt,onClick:yn=>{yn.preventDefault(),ke(ne.id)},children:[i.jsx(cd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.archive")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.archive")})})]})]}),i.jsx(cr,{children:i.jsx(Hd,{id:ne.id,onSentTo:()=>null,disabled:vt||!Ce})})]})}}];return o?de:[...de,...$e]},[o,l,c.resolvedLanguage]),{table:Oe}=hs({data:(B==null?void 0:B.items)??[],columns:tt,pageCount:(B==null?void 0:B.total_pages)??-1});return L.useEffect(()=>{Oe&&B&&(B==null?void 0:B.total_pages)>0&&y(Oe.getRowModel().rows[0])},[B,Oe]),k?i.jsx(vr,{subtitle:W.message}):T?i.jsxs("div",{className:"grid items-start flex-1 gap-4 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3",children:[i.jsx(Le,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx(Te,{children:i.jsx(gs,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(B==null?void 0:B.total_items)===0&&!v?i.jsx(Le,{children:i.jsx(Te,{children:i.jsx(ms,{subtitle:l("quotes.list.empty_state.subtitle"),buttonText:l("quotes.create.title"),onButtonClick:()=>r("add",{relative:"path"})})})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[i.jsx("div",{id:d,className:"flex items-stretch flex-1",children:i.jsx(fs,{table:Oe,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:ge,activeRowIndex:j==null?void 0:j.index,children:i.jsx(zd,{table:Oe})})}),o&&i.jsx("div",{id:m,className:"flex items-stretch ",children:i.jsx(qw,{quoteId:j==null?void 0:j.original.id})})]}),i.jsx(Ud,{...U,onFinishDownload:_e})]})},rS=()=>{const n=Bt(),o=ww(),{toast:r}=Cn(),[a,l]=L.useState(ka.createDefaultCode().object),[c,d]=L.useState(Gr.createDefaultCode().object),m=L.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,subtotal_price:{amount:void 0,scale:2,currency_code:""},discount:{amount:0,scale:0},discount_price:{amount:0,scale:0,currency_code:""},before_tax_price:{amount:void 0,scale:2,currency_code:""},tax:{amount:void 0,scale:0},tax_label:"% IVA",tax_price:{amount:void 0,scale:2,currency_code:""},total_price:{amount:void 0,scale:2,currency_code:""},items:[{id_article:"",description:"",quantity:{amount:null,scale:2},unit_price:{amount:null,scale:2,currency_code:a.code},subtotal_price:{amount:null,scale:2,currency_code