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

292 lines
290 KiB
JavaScript
Raw Normal View History

2026-10-13 16:20:06 +00:00
var Pv=Object.defineProperty;var qv=(n,o,r)=>o in n?Pv(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r;var je=(n,o,r)=>qv(n,typeof o!="symbol"?o+"":o,r);import{u as Fc,a as rn,b as Bt,c as qn,d as Re,j as i,P as kv,e as $v,f as pe,g as Bv,N as as,R as Pe,J as Et,h as qe,i as dr,D as fr,l as Ua,M as Ot,V as Uv,r as T,k as Dc,m as Mc,n as hr,o as Tc,B as H,C as Vv,p as pr,q as xr,s as _r,S as go,t as vr,v as es,w as b,x as mo,y as os,z as ls,A as us,E as Kr,F as ho,G as kn,H as $n,I as Bn,K as Un,L as zv,O as Vt,Q as Hv,T as Gv,U as Kv,W as Te,X as ct,Y as ze,Z as We,_ as Oe,$ as bn,a0 as po,a1 as Wv,a2 as xo,a3 as wn,a4 as _o,a5 as vo,a6 as Zr,a7 as Rt,a8 as Oc,a9 as Qv,aa as ts,ab as Hn,ac as bo,ad as wo,ae as Ln,af as So,ag as Lc,ah as jo,ai as Co,aj as yo,ak as cs,al as Yv,am as On,an as Pt,ao as pc,ap as Zv,aq as Xv,ar as Jv,as as No,at as Ht,au as Cn,av as ds,aw as Pc,ax as _n,ay as e0,az as qc,aA as t0,aB as oe,aC as fs,aD as xc,aE as kc,aF as $c,aG as Bc,aH as Vn,aI as Uc,aJ as gs,aK as ei,aL as ti,aM as ni,aN as Xr,aO as n0,aP as Vc,aQ as Qe,aR as Ye,aS as to,aT as Ze,aU as gr,aV as br,aW as mr,aX as r0,aY as i0,aZ as s0,a_ as no,a$ as a0,b0 as o0,b1 as ur,b2 as zc,b3 as ns,b4 as Hc,b5 as zn,b6 as Jr,b7 as Ut,b8 as l0,b9 as hn,ba as ms,bb as Gc,bc as u0,bd as hs,be as c0,bf as Kc,bg as Wc,bh as Qc,bi as Yc,bj as Zc,bk as Xc,bl as Jc,bm as ed,bn as td,bo as d0,bp as Qi,bq as f0,br as g0,bs as m0,bt as h0,bu as p0,bv as x0,bw as _0,bx as v0,by as b0,bz as w0,bA as S0,bB as _c,bC as nd,bD as rd,bE as id,bF as sd,bG as ad,bH as od,bI as ld,bJ as j0,bK as Va,bL as Wr,bM as C0,bN as ud,bO as y0,bP as N0,bQ as cd,bR as dd,bS as ro,bT as io,bU as R0,bV as E0,bW as A0}from"./index-DCwYKvrD.js";const I0=n=>{const{onSuccess:o,...r}=n||{},a=qn(),{login:l}=Fc(),c=rn();return Bt({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})};/**
2026-10-13 15:36:48 +00:00
* @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=Re("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 F0=Re("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 vc=Re("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=Re("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 D0=Re("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 M0=Re("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 gd=Re("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 T0=Re("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 O0=Re("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 L0=Re("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 Ro=Re("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 md=Re("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 P0=Re("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 hd=Re("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 q0=Re("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 k0=Re("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 pd=Re("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 $0=Re("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 Eo=Re("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 Ao=Re("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 B0=Re("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 U0=Re("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 V0=Re("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 xd=Re("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 _d=Re("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($v,{className:pe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...o}),wc=kv,H0=({withHandle:n,className:o,...r})=>i.jsx(Bv,{className:pe("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(pd,{className:"h-2.5 w-2.5"})})});function ut({className:n,...o}){return i.jsx("div",{className:pe("animate-pulse rounded-md bg-muted",n),...o})}const G0=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let Yi;const K0=new Uint8Array(16);function W0(){if(!Yi&&(Yi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yi(K0)}const Ke=[];for(let n=0;n<256;++n)Ke.push((n+256).toString(16).slice(1));function Q0(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 Y0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sc={randomUUID:Y0};function Z0(n,o,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const a=n.random||(n.rng||W0)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,Q0(a)}class pn extends as{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(dr(fr.INVALID_INPUT_DATA,"ID is null or empty"));if(o){const l=pn.validate(o,a);return l.isFailure?qe.fail(dr(fr.INVALID_INPUT_DATA,l.error.message,a)):qe.ok(new pn(pn.sanitize(l.object)))}return a.generateOnEmpty?pn.generateNewID():qe.ok(new pn(null))}static generateNewID(){return qe.ok(new pn(Z0()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const za={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 rb(){return{accessor:(n,o)=>typeof n=="function"?{...o,accessorFn:n}:{...o,accessorKey:n},display:n=>n,group:n=>n}}function vn(n,o){return typeof n=="function"?n(o):n}function xt(n,o){return r=>{o.setState(a=>({...a,[n]:vn(r,a[n])}))}}function ps(n){return n instanceof Function}function ib(n){return Array.isArray(n)&&n.every(o=>typeof o=="number")}function sb(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 Z(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((_,j)=>a[j]!==_)))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 _=Math.round((Date.now()-d)*100)/100,j=Math.round((Date.now()-x)*100)/100,y=j/16,v=(E,N)=>{for(E=String(E);E.length<N;)E=" "+E;return E};console.info(`%c⏱ ${v(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 ab(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:Z(()=>[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 ob(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,_;if(m.accessorFn?_=m.accessorFn:p&&(p.includes(".")?_=y=>{let v=y;for(const N of p.split(".")){var E;v=(E=v)==null?void 0:E[N]}return v}:_=y=>y[m.accessorKey]),!x)throw new Error;let j={id:`${String(x)}`,accessorFn:_,parent:a,depth:r,columnDef:m,columns:[],getFlatColumns:Z(()=>[!0],()=>{var y;return[j,...(y=j.columns)==null?void 0:y.flatMap(v=>v.getFlatColumns())]},X(n.options,"debugColumns")),getLeafColumns:Z(()=>[n._getOrderColumnsFn()],y=>{var v;if((v=j.columns)!=null&&v.length){let E=j.columns.flatMap(N=>N.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 lb={createTable:n=>{n.getHeaderGroups=Z(()=>[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 Zi(o,[...m,...x,...p],n)},X(n.options,et)),n.getCenterHeaderGroups=Z(()=>[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))),Zi(o,r,n,"center")),X(n.options,et)),n.getLeftHeaderGroups=Z(()=>[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 Zi(o,c,n,"left")},X(n.options,et)),n.getRightHeaderGroups=Z(()=>[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 Zi(o,c,n,"right")},X(n.options,et)),n.getFooterGroups=Z(()=>[n.getHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getLeftFooterGroups=Z(()=>[n.getLeftHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getCenterFooterGroups=Z(()=>[n.getCenterHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getRightFooterGroups=Z(()=>[n.getRightHeaderGroups()],o=>[...o].reverse(),X(n.options,et)),n.getFlatHeaders=Z(()=>[n.getHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getLeftFlatHeaders=Z(()=>[n.getLeftHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getCenterFlatHeaders=Z(()=>[n.getCenterHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getRightFlatHeaders=Z(()=>[n.getRightHeaderGroups()],o=>o.map(r=>r.headers).flat(),X(n.options,et)),n.getCenterLeafHeaders=Z(()=>[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 rs(n,o){return n?Wb(n)?T.createElement(n,o):n:null}function Wb(n){return Qb(n)||typeof n=="function"||Yb(n)}function Qb(n){return typeof n=="function"&&(()=>{const o=Object.getPrototypeOf(n);return o.prototype&&o.prototype.isReactComponent})()}function Yb(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Td(n){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=T.useState(()=>({current:Bb(o)})),[a,l]=T.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 Zb=({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(hr,{children:[i.jsx(Tc,{asChild:!0,children:i.jsxs(H,{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(Vv,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(pr,{className:"sm:max-w-[425px]",children:[i.jsx(xr,{children:i.jsx(_r,{children:o})}),i.jsxs(go,{className:"grid gap-4 py-2",children:[r,i.jsx(vr,{children:i.jsx(es,{asChild:!0,children:i.jsx(H,{type:"button",children:b("common.close")})})})]})]})]})});function Xb(n){let a=0;for(let _=0;_<n.length;_++)a=n.charCodeAt(_)+((a<<5)-a);let l="#";for(let _=0;_<3;_++){const j=a>>_*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 Od=({label:n,className:o})=>{const[r,a]=Xb(n);return i.jsx(mo,{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:pe("flex items-center space-x-2",r),children:i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{"aria-label":o.column.getIsSorted()==="desc"?b("common.sort_desc_description"):o.column.getIsSorted()==="asc"?b("common.sort_asc_description"):b("common.sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[rs(o.column.columnDef.header,o.getContext()),o.column.getIsSorted()==="desc"?i.jsx(vc,{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(F0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),i.jsxs(us,{align:"start",children:[o.column.getCanSort()&&i.jsxs(i.Fragment,{children:[i.jsxs(Kr,{onClick:()=>o.column.toggleSorting(!1),"aria-label":b("common.sort_asc"),children:[i.jsx(bc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),b("common.sort_asc")]}),i.jsxs(Kr,{onClick:()=>o.column.toggleSorting(!0),"aria-label":b("common.sort_desc"),children:[i.jsx(vc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),b("common.sort_desc")]})]}),o.column.getCanSort()&&o.column.getCanHide()&&i.jsx(ho,{}),o.column.getCanHide()&&i.jsxs(Kr,{onClick:()=>o.column.toggleVisibility(!1),"aria-label":b("common.hide"),children:[i.jsx(hd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),b("common.hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:pe("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:o.isPlaceholder?null:rs(o.column.columnDef.header,o.getContext())}),!1]})}function Jb({table:n,className:o,enablePageSizeSelector:r=!0,visible:a="auto"}){const l=T.useMemo(()=>a===!0,[a]),c=T.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
*/ss.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,_="__lodash_placeholder__",j=1,y=2,v=4,E=1,N=2,L=1,F=2,$=4,q=8,V=16,O=32,k=64,G=128,ne=256,U=512,re=30,Q="...",W=800,we=16,ke=1,J=2,tt=3,Le=1/0,ge=9007199254740991,$e=17976931348623157e292,ie=NaN,ye=4294967295,_t=ye-1,Sr=ye>>>1,yn=[["ary",G],["bind",L],["bindKey",F],["curry",q],["curryRight",V],["flip",U],["partial",O],["partialRight",k],["rearg",ne]],Kn="[object Arguments]",ri="[object Array]",Zd="[object AsyncFunction]",jr="[object Boolean]",Cr="[object Date]",Xd="[object DOMException]",ii="[object Error]",si="[object Function]",ko="[object GeneratorFunction]",At="[object Map]",yr="[object Number]",Jd="[object Null]",Gt="[object Object]",$o="[object Promise]",ef="[object Proxy]",Nr="[object RegExp]",It="[object Set]",Rr="[object String]",ai="[object Symbol]",tf="[object Undefined]",Er="[object WeakMap]",nf="[object WeakSet]",Ar="[object ArrayBuffer]",Wn="[object DataView]",ws="[object Float32Array]",Ss="[object Float64Array]",js="[object Int8Array]",Cs="[object Int16Array]",ys="[object Int32Array]",Ns="[object Uint8Array]",Rs="[object Uint8ClampedArray]",Es="[object Uint16Array]",As="[object Uint32Array]",rf=/\b__p \+= '';/g,sf=/\b(__p \+=) '' \+/g,af=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bo=/&(?:amp|lt|gt|quot|#39);/g,Uo=/[&<>"']/g,of=RegExp(Bo.source),lf=RegExp(Uo.source),uf=/<%-([\s\S]+?)%>/g,cf=/<%([\s\S]+?)%>/g,Vo=/<%=([\s\S]+?)%>/g,df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ff=/^\w*$/,gf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Is=/[\\^$.*+?()[\]{}|]/g,mf=RegExp(Is.source),Fs=/^\s+/,hf=/\s/,pf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xf=/\{\n\/\* \[wrapped with (.+)\] \*/,_f=/,? & /,vf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bf=/[()=,{}\[\]\/\s]/,wf=/\\(\\)?/g,Sf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zo=/\w*$/,jf=/^[-+]0x[0-9a-f]+$/i,Cf=/^0b[01]+$/i,yf=/^\[object .+?Constructor\]$/,Nf=/^0o[0-7]+$/i,Rf=/^(?:0|[1-9]\d*)$/,Ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Af=/['\n\r\u2028\u2029\\]/g,li="\\ud800-\\udfff",If="\\u0300-\\u036f",Ff="\\ufe20-\\ufe2f",Df="\\u20d0-\\u20ff",Ho=If+Ff+Df,Go="\\u2700-\\u27bf",Ko="a-z\\xdf-\\xf6\\xf8-\\xff",Mf="\\xac\\xb1\\xd7\\xf7",Tf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Of="\\u2000-\\u206f",Lf=" \\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",Wo="A-Z\\xc0-\\xd6\\xd8-\\xde",Qo="\\ufe0e\\ufe0f",Yo=Mf+Tf+Of+Lf,Ds="['’]",Pf="["+li+"]",Zo="["+Yo+"]",ui="["+Ho+"]",Xo="\\d+",qf="["+Go+"]",Jo="["+Ko+"]",el="[^"+li+Yo+Xo+Go+Ko+Wo+"]",Ms="\\ud83c[\\udffb-\\udfff]",kf="(?:"+ui+"|"+Ms+")",tl="[^"+li+"]",Ts="(?:\\ud83c[\\udde6-\\uddff]){2}",Os="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+Wo+"]",nl="\\u200d",rl="(?:"+Jo+"|"+el+")",$f="(?:"+Qn+"|"+el+")",il="(?:"+Ds+"(?:d|ll|m|re|s|t|ve))?",sl="(?:"+Ds+"(?:D|LL|M|RE|S|T|VE))?",al=kf+"?",ol="["+Qo+"]?",Bf="(?:"+nl+"(?:"+[tl,Ts,Os].join("|")+")"+ol+al+")*",Uf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ll=ol+al+Bf,zf="(?:"+[qf,Ts,Os].join("|")+")"+ll,Hf="(?:"+[tl+ui+"?",ui,Ts,Os,Pf].join("|")+")",Gf=RegExp(Ds,"g"),Kf=RegExp(ui,"g"),Ls=RegExp(Ms+"(?="+Ms+")|"+Hf+ll,"g"),Wf=RegExp([Qn+"?"+Jo+"+"+il+"(?="+[Zo,Qn,"$"].join("|")+")",$f+"+"+sl+"(?="+[Zo,Qn+rl,"$"].join("|")+")",Qn+"?"+rl+"+"+il,Qn+"+"+sl,Vf,Uf,Xo,zf].join("|"),"g"),Qf=RegExp("["+nl+li+Ho+Qo+"]"),Yf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zf=["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 hh(e){return ae(e)||Tn(e)||!!(Fl&&e&&e[Fl])}function Xt(e,t){var s=typeof e;return t=t??ge,!!t&&(s=="number"||s!="symbol"&&Rf.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)&&Xt(t,s.length):u=="string"&&t in s)?Mt(s[t],e):!1}function ja(e,t){if(ae(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||mt(e)?!0:ff.test(e)||!df.test(e)||t!=null&&e in Se(t)}function ph(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ca(e){var t=qi(e),s=g[t];if(typeof s!="function"||!(t in fe.prototype))return!1;if(e===s)return!0;var u=ba(s);return!!u&&e===u[0]}function xh(e){return!!Rl&&Rl in e}var _h=mi?Jt:Ba;function Ur(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||er;return e===s}function Ru(e){return e===e&&!Ae(e)}function Eu(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in Se(s))}}function vh(e){var t=zi(e,function(u){return s.size===x&&s.clear(),u}),s=t.cache;return t}function bh(e,t){var s=e[1],u=t[1],f=s|u,h=f<(L|F|G),w=u==G&&s==q||u==G&&s==ne&&e[7].length<=t[8]||u==(G|ne)&&t[7].length<=t[8]&&s==q;if(!(h||w))return e;u&L&&(e[2]=t[2],f|=s&L?0:$);var S=t[3];if(S){var R=e[3];e[3]=R?cu(R,S,t[4]):S,e[4]=R?ln(e[3],_):t[4]}return S=t[5],S&&(R=e[5],e[5]=R?du(R,S,t[6]):S,e[6]=R?ln(e[5],_):t[6]),S=t[7],S&&(e[7]=S),u&G&&(e[8]=e[8]==null?t[8]:Xe(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function wh(e){var t=[];if(e!=null)for(var s in Se(e))t.push(s);return t}function Sh(e){return pi.call(e)}function Au(e,t,s){return t=Ue(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,h=Ue(u.length-t,0),w=A(h);++f<h;)w[f]=u[t+f];f=-1;for(var S=A(t+1);++f<t;)S[f]=u[f];return S[t]=s(w),dt(e,this,S)}}function Iu(e,t){return t.length<2?e:Fn(e,Ct(t,0,-1))}function jh(e,t){for(var s=e.length,u=Xe(t.length,s),f=st(e);u--;){var h=t[u];e[u]=Xt(h,s)?f[h]:r}return e}function ya(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Fu=Mu(eu),Vr=qg||function(e,t){return He.setTimeout(e,t)},Na=Mu(Gm);function Du(e,t,s){var u=t+"";return Na(e,mh(u,Ch(dh(u),s)))}function Mu(e){var t=0,s=0;return function(){var u=Ug(),f=we-(u-s);if(s=u,f>0){if(++t>=W)return arguments[0]}else t=0;return e.apply(r,arguments)}}function $i(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s<t;){var h=la(s,f),w=e[h];e[h]=e[s],e[s]=w}return e.length=t,e}var Tu=vh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gf,function(s,u,f,h){t.push(f?h.replace(wf,"$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 Mn(e){if(e!=null){try{return hi.call(e)}catch{}try{return e+""}catch{}}return""}function Ch(e,t){return bt(yn,function(s){var u="_."+s[0];t&s[1]&&!ci(e,u)&&e.push(u)}),e.sort()}function Ou(e){if(e instanceof fe)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 yh(e,t,s){(s?rt(e,t,s):t===r)?t=1:t=Ue(le(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,h=0,w=A(Si(u/t));f<u;)w[h++]=Ct(e,f,f+=t);return w}function Nh(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 Rh(){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 on(ae(s)?st(s):[s],Ge(t,1))}var Eh=ce(function(e,t){return De(e)?Pr(e,Ge(t,1,De,!0)):[]}),Ah=ce(function(e,t){var s=yt(t);return De(s)&&(s=r),De(e)?Pr(e,Ge(t,1,De,!0),Y(s,2)):[]}),Ih=ce(function(e,t){var s=yt(t);return De(s)&&(s=r),De(e)?Pr(e,Ge(t,1,De,!0),r,s):[]});function Fh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:le(t),Ct(e,t<0?0:t,u)):[]}function Dh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:le(t),t=u-t,Ct(e,0,t<0?0:t)):[]}function Mh(e,t){return e&&e.length?Di(e,Y(t,3),!0,!0):[]}function Th(e,t){return e&&e.length?Di(e,Y(t,3),!0):[]}function Oh(e,t,s,u){var f=e==null?0:e.length;return f?(s&&typeof s!="n
`;e.replace(B,function(te,de,me,ht,it,pt){return me||(me=ht),P+=e.slice(D,pt).replace(Af,_g),de&&(S=!0,P+=`' +
__e(`+de+`) +
'`),it&&(R=!0,P+=`';
`+it+`;
__p += '`),me&&(P+=`' +
((__t = (`+me+`)) == null ? '' : __t) +
'`),D=pt+te.length,te}),P+=`';
`;var ee=_e.call(t,"variable")&&t.variable;if(!ee)P=`with (obj) {
`+P+`
}
`;else if(bf.test(ee))throw new se(m);P=(R?P.replace(rf,""):P).replace(sf,"$1").replace(af,"$1;"),P="function("+(ee||"obj")+`) {
`+(ee?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+P+`return __p
}`;var ue=gc(function(){return he(h,K+"return "+P).apply(r,w)});if(ue.source=P,Fa(ue))throw ue;return ue}function z_(e){return xe(e).toLowerCase()}function H_(e){return xe(e).toUpperCase()}function G_(e,t,s){if(e=xe(e),e&&(s||t===r))return Sl(e);if(!e||!(t=gt(t)))return e;var u=Ft(e),f=Ft(t),h=jl(u,f),w=Cl(u,f)+1;return gn(u,h,w).join("")}function K_(e,t,s){if(e=xe(e),e&&(s||t===r))return e.slice(0,Nl(e)+1);if(!e||!(t=gt(t)))return e;var u=Ft(e),f=Cl(u,Ft(t))+1;return gn(u,0,f).join("")}function W_(e,t,s){if(e=xe(e),e&&(s||t===r))return e.replace(Fs,"");if(!e||!(t=gt(t)))return e;var u=Ft(e),f=jl(u,Ft(t));return gn(u,f).join("")}function Q_(e,t){var s=re,u=Q;if(Ae(t)){var f="separator"in t?t.separator:f;s="length"in t?le(t.length):s,u="omission"in t?gt(t.omission):u}e=xe(e);var h=e.length;if(Zn(e)){var w=Ft(e);h=w.length}if(s>=h)return e;var S=s-Xn(u);if(S<1)return u;var R=w?gn(w,0,S).join(""):e.slice(0,S);if(f===r)return R+u;if(w&&(S+=R.length-S),Da(f)){if(e.slice(S).search(f)){var D,M=R;for(f.global||(f=Ws(f.source,xe(zo.exec(f))+"g")),f.lastIndex=0;D=f.exec(M);)var P=D.index;R=R.slice(0,P===r?S:P)}}else if(e.indexOf(gt(f),S)!=S){var B=R.lastIndexOf(f);B>-1&&(R=R.slice(0,B))}return R+u}function Y_(e){return e=xe(e),e&&of.test(e)?e.replace(Bo,yg):e}var Z_=sr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Oa=mu("toUpperCase");function fc(e,t,s){return e=xe(e),t=s?r:t,t===r?bg(e)?Eg(e):dg(e):e.match(t)||[]}var gc=ce(function(e,t){try{return dt(e,r,t)}catch(s){return Fa(s)?s:new se(s)}}),X_=Zt(function(e,t){return bt(t,function(s){s=$t(s),Qt(e,s,Aa(e[s],e))}),e});function J_(e){var t=e==null?0:e.length,s=Y();return e=t?Ee(e,function(u){if(typeof u[1]!="function")throw new wt(d);return[s(u[0]),u[1]]}):[],ce(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 ev(e){return ym(jt(e,j))}function La(e){return function(){return e}}function tv(e,t){return e==null||e!==e?t:e}var nv=pu(),rv=pu(!0);function lt(e){return e}function Pa(e){return Gl(typeof e=="function"?e:jt(e,j))}function iv(e){return Wl(jt(e,j))}function sv(e,t){return Ql(e,jt(t,j))}var av=ce(function(e,t){return function(s){return qr(s,e,t)}}),ov=ce(function(e,t){return function(s){return qr(e,s,t)}});function qa(e,t,s){var u=Ve(t),f=Ai(t,u);s==null&&!(Ae(t)&&(f.length||!u.length))&&(s=t,t=e,e=this,f=Ai(t,Ve(t)));var h=!(Ae(s)&&"chain"in s)||!!s.chain,w=Jt(e);return bt(f,function(S){var R=t[S];e[S]=R,w&&(e.prototype[S]=function(){var D=this.__chain__;if(h||D){var M=e(this.__wrapped__),P=M.__actions__=st(this.__actions__);return P.push({func:R,args:arguments,thisArg:e}),M.__chain__=D,M}return R.apply(e,on([this.value()],arguments))})}),e}function lv(){return He._===this&&(He._=Tg),this}function ka(){}function uv(e){return e=le(e),ce(function(t){return Yl(t,e)})}var cv=pa(Ee),dv=pa(xl),fv=pa(Bs);function mc(e){return ja(e)?Us($t(e)):Um(e)}function gv(e){return function(t){return e==null?r:Fn(e,t)}}var mv=_u(),hv=_u(!0);function $a(){return[]}function Ba(){return!1}function pv(){return{}}function xv(){return""}function _v(){return!0}function vv(e,t){if(e=le(e),e<1||e>ge)return[];var s=ye,u=Xe(e,ye);t=Y(t),e-=ye;for(var f=Hs(u,t);++s<e;)t(s);return f}function bv(e){return ae(e)?Ee(e,$t):mt(e)?[e]:st(Tu(xe(e)))}function wv(e){var t=++Dg;return xe(e)+t}var Sv=Oi(function(e,t){return e+t},0),jv=xa("ceil"),Cv=Oi(function(e,t){return e/t},1),yv=xa("floor");function Nv(e){return e&&e.length?Ei(e,lt,na):r}function Rv(e,t){return e&&e.length?Ei(e,Y(t,2),na):r}function Ev(e){return bl(e,lt)}function Av(e,t){return bl(e,Y(t,2))}function Iv(e){return e&&e.length?Ei(e,lt,aa):r}function Fv(e,t){return e&&e.length?Ei(e,Y(t,2),aa):r}var Dv=Oi(function(e,t){return e*t},1),Mv=xa("round"),Tv=Oi(function(e,t){return e-t},0);function Ov(e){return e&&e.length?zs(e,lt):0}function Lv(e,t){return e&&e.length?zs(e,Y(t,2)):0}return g.after=ix,g.ary=Hu,g.assign=Hx,g.assignIn=sc,g.assignInWith=Wi,g.assignWith=Gx,g.at=Kx,g.before=Gu,g.bind=Aa,g.bindAll=X_,g.bindKey=Ku,g.castArray=px,g.chain=Uu,g.chunk=yh,g.compact=Nh,g.concat=Rh,g.cond=J_,g.confo
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`},{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: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: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:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado: MELAMINA / color: A DETERMINAR",body:`Medida de Hueco: 2450x3000 mm.\r
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: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:`}],en:[{id:2000000098,code:"CAP_CLA_SEMI_SUSPENDIDO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Size of opening: 2450x3000 mm.\r
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
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`}],fr:[{id:2000000121,code:"CAP_CLA_SEMI_SUSPENDIDO_FR",title:"Finition : MÉLAMINE / Couleur : À DÉTERMINER",body:`Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Porte de chaussures : OUI / NON\r
Finition du profil : LAQUÉ NOIR / ARGENT MAT\r
Finition du verre de la porte de chaussures : FLOAT BRONZE C-424\r
Composé de :`},{id:2000000123,code:"CAP_FRE_ARM_ABATIBLE_FR",title:"Dimension de l’ouverture : 2275x1390 mm",body:`Modèle : ARGO / Finition : LAQUÉE / Couleur : À DÉTERMINER\r
Épaisseur des vantaux : 22 ou 19 mm\r
Finition des vantaux : LISSES\r
Poignée : PRISE DE MAIN À DÉTERMINER\r
Finition des ferrures : CHROMÉ OU ANTHRACITE\r
Jambages périmétraux : APPARENTS, ENCASTRÉS OU COMBINÉS À DÉTERMINER\r
Nombre de vantaux : 2\r
Composé de :`},{id:2000000125,code:"CAP_FRE_ARM_CORREDERA_FR",title:"Dimension de l’ouverture : 2440x5180mm",body:`Modèle : PANORAMIC P.O. / Finition : LAQUÉE / Couleur : BLANC\r
Nombre de listels : SANS LISTELS\r
Finition des panneaux : PANNEAU LAQUÉ\r
Poignée :\r
Encadrement périmétral :\r
Nombre de vantaux :\r
FREIN HYDRAULIQUE INTÉGRÉ (non disponible pour les portes inférieures à 650 mm) OU FREIN MAGNÉTIQUE INTÉGRÉ\r
Composé de :`},{id:2000000129,code:"CAP_INT_ARM_FORRADO_FR",title:"Finition : MÉLAMINE / Couleur : À DÉTERMINER",body:`Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Composé de :`},{id:2000000131,code:"CAP_INT_EST_CRISTAL_FR",title:"Finition des cadres : ANODISÉ NOIR",body:`Finition des panneaux des cadres latéraux : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition du dos : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition des accessoires : MÉLAMINE / Couleur : CHÊNE DENBER M-242\r
Épaisseur des accessoires : 25 mm\r
Barres de penderie : NOIRES\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Composé de :`}]},Ic=({onSelect:n})=>{const{i18n:o}=Pt(),r=o.resolvedLanguage||"es",a=Ac[r.toLowerCase()]??Ac.es;return i.jsx(go,{className:"h-96",children:i.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:a&&a.filter(({title:l,body:c})=>l||c).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})=>kd("(min-width: 768px)")?i.jsx(hr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(pr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(xr,{children:[i.jsx(_r,{children:b("quotes.blocks_picker_dialog.title")}),i.jsx(ms,{children:b("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{onSelect:r}),i.jsx(vr,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:b("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:b("quotes.blocks_picker_dialog.title")}),i.jsx(ad,{children:b("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{onSelect:r}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:b("common.close")})})})]})}),Tw=({isOpen:n,onOpenChange:o,onSelect:r})=>kd("(min-width: 768px)")?i.jsx(hr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(pr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(xr,{children:[i.jsx(_r,{children:b("quotes.catalog_picker_dialog.title")}),i.jsx(ms,{children:b("quotes.catalog_picker_dialog.description")})]}),i.jsx(mr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(fo,{onSelect:r})}),i.jsx(vr,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:b("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:b("quotes.catalog_picker_dialog.title")}),i.jsx(ad,{children:b("quotes.catalog_picker_dialog.description")})]}),i.jsx(mr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(fo,{onSelect:r})}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:b("common.close")})})})]})}),Ow=({currency:n,language:o,defaultValues:r})=>{var ne;const{toast:a}=Cn(),{control:l,getValues:c,setValue:d,watch:m}=Hn(),p=m("show_line_discount_column")??!0,x=!!((ne=c("items"))!=null&&ne.some(U=>{var re;return Number((re=U.discount)==null?void 0:re.amount)>0})),[_]=T.useState("dialog"),[j,y]=T.useState(!1),[v,E]=T.useState(!1),{fields:N,...L}=j0({control:l,name:"items"}),F=vw([{id:"description",accessorKey:"description",header:b("quotes.form_fields.items.description.label"),cell:({row:{index:U,original:re}})=>re!=null&&re.id_article?i.jsx("div",{className:"min-h-10 whitespace-pre-wrap px-3 py-2 text-sm",children:re.localized_description??re.description}):i.jsx(Ut,{autoSize:!0,name:`items.${U}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:b("quotes.form_fields.items.quantity.label")}),cell:({row:{index:U}})=>i.jsx(iw,{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:b("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:U}})=>i.jsx(Va,{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:b("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:U}})=>i.jsx(Va,{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:b("quotes.form_fields.items.discount.label")}),cell:({row:{index:U}})=>i.jsx(is,{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:b("quotes.form_fields.items.total_price.label")}),cell:({row:{index:U}})=>i.jsx(Va,{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}),$=T.useCallback((U,re=1)=>{L.append({...U,quant
${U.body}`,quantity:{amount:null,scale:Sn.DEFAULT_SCALE},unit_price:{amount:null,scale:X0.DEFAULT_SCALE},discount:{amount:null,scale:2}}),a({title:b("quotes.blocks_picker_dialog.toast_article_added"),description:U.title})},[L]),[V,O]=T.useState(!1),k=[265,440,655],G=4;return _==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Ec,{actions:{...L,getItem:U=>c(`items.${U}`),pickCatalogArticle:()=>y(!0),pickBlock:()=>E(!0)},columns:F,data:N,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:U=>d("show_line_discount_column",U,{shouldDirty:!0})}),i.jsx(Tw,{onSelect:$,isOpen:j,onOpenChange:y}),i.jsx(Mw,{onSelect:q,isOpen:v,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:G,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{O(!0)},onExpand:()=>{O(!1)},className:pe(V&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Ec,{actions:{...L,getItem:U=>c(`items.${U}`)},columns:F,data:N,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:U=>d("show_line_discount_column",U,{shouldDirty:!0})})}),i.jsx(H0,{withHandle:!0,className:"mx-3"}),i.jsx(wc,{defaultSize:k[1],minSize:10,children:i.jsx(mr,{syncWithLocation:!1,children:i.jsx(fo,{onSelect:$})})})]})},Lw=()=>{const{formState:n,control:o}=Hn();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(ns,{className:"md:col-span-6",title:b("quotes.create.form_groups.general.title"),description:b("quotes.create.form_groups.general.desc"),actions:i.jsxs("div",{className:"grid min-w-48 gap-1",children:[i.jsx(zn,{htmlFor:"lang_code",className:"text-xs text-muted-foreground",children:b("quotes.form_fields.lang_code.label")}),i.jsx(Jr,{control:o,name:"lang_code",render:({field:r})=>i.jsxs(kn,{value:r.value||"es",onValueChange:r.onChange,children:[i.jsx($n,{id:"lang_code","aria-label":b("quotes.form_fields.lang_code.label"),children:i.jsx(Bn,{placeholder:b("quotes.form_fields.lang_code.placeholder")})}),i.jsx(Un,{children:sn.map(a=>i.jsxs(Vt,{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(Pn,{required:!0,className:"col-span-2",label:b("quotes.form_fields.customer_reference.label"),description:b("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Hc,{required:!0,label:b("quotes.form_fields.date.label"),description:b("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(Pn,{label:b("quotes.form_fields.validity.label"),description:b("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(Ut,{className:"col-span-2",label:b("quotes.form_fields.payment_method.label"),description:b("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Ut,{className:"col-span-3",required:!0,label:b("quotes.form_fields.customer_information.label"),description:b("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(Ut,{className:"col-span-3",label:b("quotes.form_fields.notes.label"),description:b("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:b("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(ns,{className:"hidden md:col-span-2",title:b("quotes.create.form_groups.status.title"),description:b("quotes.create.form_groups.status.desc"),children:i.jsxs("div",{className:"grid gap-6",children:[i.jsxs("div",{className:"grid gap-3",childr
`).map((ye,_t)=>i.jsxs("span",{className:_t===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[ye,i.jsx("br",{})]},_t))}),size:500}],$e=[{id:"row-actions",header:()=>null,cell:({row:{original:ie}})=>{const ye=(ie==null?void 0:ie.status)==="accepted"&&!(ie!=null&&ie.date_sent),_t=(ie==null?void 0:ie.status)==="accepted"&&!!(ie!=null&&ie.date_sent),Sr=(ie==null?void 0:ie.status)==="archived";return i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(gr,{className:"gap-0",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:_t,onClick:yn=>{yn.preventDefault(),W(ie)},children:[i.jsx(xd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.edit")})]})}),i.jsx(Ze,{children:i.jsx("p",{children:l("common.edit")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:yn=>{yn.preventDefault(),we(ie.id)},children:[i.jsx(Ro,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.duplicate")})]})}),i.jsx(Ze,{children:i.jsx("p",{children:l("common.duplicate")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:()=>{ne(ie.id,F(ie))},children:[i.jsx(md,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.download")})]})}),i.jsx(Ze,{children:i.jsx("p",{children:l("common.download")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:Sr||_t,onClick:yn=>{yn.preventDefault(),ke(ie.id)},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.archive")})]})}),i.jsx(Ze,{children:i.jsx("p",{children:l("common.archive")})})]})]}),i.jsx(gr,{children:i.jsx(Qd,{id:ie.id,onSentTo:()=>null,disabled:_t||!ye})})]})}}];return o?ge:[...ge,...$e]},[o,l,c.resolvedLanguage]),{table:Le}=bs({data:(V==null?void 0:V.items)??[],columns:tt,pageCount:(V==null?void 0:V.total_pages)??-1});return T.useEffect(()=>{Le&&V&&(V==null?void 0:V.total_pages)>0&&y(Le.getRowModel().rows[0])},[V,Le]),k?i.jsx(br,{subtitle:G.message}):O?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(Te,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx(Oe,{children:i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(V==null?void 0:V.total_items)===0&&!_?i.jsx(Te,{children:i.jsx(Oe,{children:i.jsx(vs,{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(xs,{table:Le,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:re,activeRowIndex:j==null?void 0:j.index,children:i.jsx(zd,{table:Le})})}),o&&i.jsx("div",{id:m,className:"flex items-stretch ",children:i.jsx(Bw,{quoteId:j==null?void 0:j.original.id})})]}),i.jsx(Kd,{...U,onFinishDownload:Q})]})},aS=()=>{const n=Ht(),o=jw(),{toast:r}=Cn(),[a,l]=T.useState(Wr.createDefaultCode().object),[c,d]=T.useState(Qr.createDefaultCode().object),m=T.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,additional_currency_code:null,additional_currency_rate:null,additional_currency_date:null,additional_currency_total:null,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:{amou