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

316 lines
335 KiB
JavaScript
Raw Normal View History

2025-04-16 12:16:08 +00:00
var Xy=Object.defineProperty;var Zy=(e,i,r)=>i in e?Xy(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r;var hn=(e,i,r)=>Zy(e,typeof i!="symbol"?i+"":i,r);import{u as kf,a as Mn,b as yr,c as ze,i as Df,d as Pf,_ as Jy,e as eb,g as Fl,j as a,P as tb,f as nb,h as Ve,k as rb,N as Mf,R as Kr,J as Wr,l as an,m as sa,D as aa,M as un,V as ib,r as C,n as Lf,o as $f,p as Li,q as qf,B as ae,C as sb,s as $i,t as qi,v as Vi,S as Il,w as zi,x as oa,y as E,z as Ol,A as _a,E as ya,F as ba,G as Ni,H as Tl,I as kl,K as Dl,L as Pl,O as Ml,Q as ab,T as Ei,U as ob,W as lb,X as ub,Y as st,Z as en,$ as wt,a0 as Et,a1 as at,a2 as Jn,a3 as Ll,a4 as cb,a5 as $l,a6 as _r,a7 as ql,a8 as Vl,a9 as la,aa as pn,ab as Vf,ac as db,ad as zf,ae as ua,af as fb,ag as gb,ah as mb,ai as Gd,aj as hb,ak as pb,al as Kd,am as Wd,an as Qo,ao as xb,ap as vb,aq as ke,ar as Yd,as as _b,at as yb,au as bb,av as zl,aw as Sn,ax as tr,ay as wa,az as Bf,aA as pr,aB as wb,aC as Uf,aD as Sb,aE as be,aF as Sa,aG as xr,aH as Qd,aI as Hf,aJ as Gf,aK as Kf,aL as Qn,aM as br,aN as Wf,aO as Ca,aP as Bi,aQ as Ui,aR as Hi,aS as Ti,aT as Cb,aU as Yf,aV as mt,aW as ht,aX as fl,aY as pt,aZ as Yr,a_ as ri,a$ as Qr,b0 as jb,b1 as Rb,b2 as Bl,b3 as Ur,b4 as Qf,b5 as gl,b6 as Xf,b7 as yn,b8 as Xr,b9 as ca,ba as Nb,bb as Xd,bc as Eb,bd as Ab,be as Ul,bf as Fb,bg as da,bh as Hl,bi as Gi,bj as Zf,bk as Ib,bl as ml,bm as Ob,bn as Tb,bo as Gs,bp as kb,bq as Db,br as Pb,bs as Mb,bt as Lb,bu as $b,bv as qb,bw as Vb,bx as zb,by as Bb,bz as Ub,bA as Zd,bB as Jf,bC as eg,bD as tg,bE as ng,bF as rg,bG as ig,bH as sg,bI as Hb,bJ as Gb,bK as Xo,bL as Kb,bM as Wb,bN as Yb,bO as Qb,bP as Xb,bQ as Zb,bR as Jb,bS as e1,bT as t1,bU as n1,bV as r1,bW as i1,bX as s1,bY as a1,bZ as ag,b_ as og,b$ as hl,c0 as pl,c1 as o1,c2 as Zo,c3 as l1,c4 as u1}from"./index-BF64vagP.js";const c1=e=>{const i=yr(),{login:r}=kf();return Mn({mutationKey:i().auth().action("login").get(),mutationFn:r,...e})};/**
2025-04-16 11:34:34 +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 lg=ze("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 d1=ze("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 Jd=ze("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 ef=ze("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 f1=ze("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 g1=ze("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 ug=ze("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 m1=ze("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 h1=ze("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 p1=ze("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 Gl=ze("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 cg=ze("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 x1=ze("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 dg=ze("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 v1=ze("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 _1=ze("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 fg=ze("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 y1=ze("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 Kl=ze("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 Wl=ze("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 b1=ze("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 w1=ze("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 S1=ze("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 gg=ze("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 mg=ze("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"}]]);var C1=Df,j1=Pf,R1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N1=/^\w*$/;function E1(e,i){if(C1(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||j1(e)?!0:N1.test(e)||!R1.test(e)||i!=null&&e in Object(i)}var A1=E1,F1=Jy;function I1(e){return e==null?"":F1(e)}var O1=I1,T1=Df,k1=A1,D1=eb,P1=O1;function M1(e,i){return T1(e)?e:k1(e,i)?[e]:D1(P1(e))}var L1=M1,$1=Pf;function q1(e){if(typeof e=="string"||$1(e))return e;var i=e+"";return i=="0"&&1/e==-1/0?"-0":i}var V1=q1,z1=L1,B1=V1;function U1(e,i){i=z1(i,e);for(var r=0,s=i.length;e!=null&&r<s;)e=e[B1(i[r++])];return r&&r==s?e:void 0}var H1=U1,G1=H1;function K1(e,i,r){var s=e==null?void 0:G1(e,i);return s===void 0?r:s}var W1=K1;const xl=Fl(W1);function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},vl.apply(null,arguments)}const Y1=({className:e,...i})=>a.jsx(nb,{className:Ve("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...i}),tf=tb,Q1=({withHandle:e,className:i,...r})=>a.jsx(rb,{className:Ve("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",i),...r,children:e&&a.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:a.jsx(fg,{className:"h-2.5 w-2.5"})})});function Dt({className:e,...i}){return a.jsx("div",{className:Ve("animate-pulse rounded-md bg-muted",e),...i})}const X1=e=>typeof e=="object"&&e!==null&&e.hasOwnProperty("total_items");let Ks;const Z1=new Uint8Array(16);function J1(){if(!Ks&&(Ks=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ks))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ks(Z1)}const dt=[];for(let e=0;e<256;++e)dt.push((e+256).toString(16).slice(1));function ew(e,i=0){return dt[e[i+0]]+dt[e[i+1]]+dt[e[i+2]]+dt[e[i+3]]+"-"+dt[e[i+4]]+dt[e[i+5]]+"-"+dt[e[i+6]]+dt[e[i+7]]+"-"+dt[e[i+8]]+dt[e[i+9]]+"-"+dt[e[i+10]]+dt[e[i+11]]+dt[e[i+12]]+dt[e[i+13]]+dt[e[i+14]]+dt[e[i+15]]}const tw=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nf={randomUUID:tw};function nw(e,i,r){if(nf.randomUUID&&!e)return nf.randomUUID();e=e||{};const s=e.random||(e.rng||J1)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ew(s)}class Wn extends Mf{static validate(i,r){const s=Kr.RULE_ALLOW_EMPTY.default(""),l=Wr.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),u=Wr.alternatives(s,l);return Kr.validate(u,i)}static sanitize(i){return i.trim()}static create(i,r={}){const s={label:"id",generateOnEmpty:!1,...r};if(!i&&!s.generateOnEmpty)return an.fail(sa(aa.INVALID_INPUT_DATA,"ID is null or empty"));if(i){const l=Wn.validate(i,s);return l.isFailure?an.fail(sa(aa.INVALID_INPUT_DATA,l.error.message,s)):an.ok(new Wn(Wn.sanitize(l.object)))}return s.generateOnEmpty?Wn.generateNewID():an.ok(new Wn(null))}static generateNewID(){return an.ok(new Wn(nw()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const Jo={aa:{name:"Afar",nativeName:"Afaraf"},ab:{
* 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 lw(){return{accessor:(e,i)=>typeof e=="function"?{...i,accessorFn:e}:{...i,accessorKey:e},display:e=>e,group:e=>e}}function Zn(e,i){return typeof e=="function"?e(i):e}function Ut(e,i){return r=>{i.setState(s=>({...s,[e]:Zn(r,s[e])}))}}function ja(e){return e instanceof Function}function uw(e){return Array.isArray(e)&&e.every(i=>typeof i=="number")}function cw(e,i){const r=[],s=l=>{l.forEach(u=>{r.push(u);const d=i(u);d!=null&&d.length&&s(d)})};return s(e),r}function le(e,i,r){let s=[],l;return u=>{let d;r.key&&r.debug&&(d=Date.now());const f=e(u);if(!(f.length!==s.length||f.some((p,b)=>s[b]!==p)))return l;s=f;let v;if(r.key&&r.debug&&(v=Date.now()),l=i(...f),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const p=Math.round((Date.now()-d)*100)/100,b=Math.round((Date.now()-v)*100)/100,y=b/16,_=(R,S)=>{for(R=String(R);R.length<S;)R=" "+R;return R};console.info(`%c ${_(b,5)} /${_(p,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 ue(e,i,r,s){return{debug:()=>{var l;return(l=e==null?void 0:e.debugAll)!=null?l:e[i]},key:!1,onChange:s}}function dw(e,i,r,s){const l=()=>{var d;return(d=u.getValue())!=null?d:e.options.renderFallbackValue},u={id:`${i.id}_${r.id}`,row:i,column:r,getValue:()=>i.getValue(s),renderValue:l,getContext:le(()=>[e,r,i,u],(d,f,m,v)=>({table:d,column:f,row:m,cell:v,getValue:v.getValue,renderValue:v.renderValue}),ue(e.options,"debugCells"))};return e._features.forEach(d=>{d.createCell==null||d.createCell(u,r,i,e)},{}),u}function fw(e,i,r,s){var l,u;const f={...e._getDefaultColumnDef(),...i},m=f.accessorKey;let v=(l=(u=f.id)!=null?u:m?typeof String.prototype.replaceAll=="function"?m.replaceAll(".","_"):m.replace(/\./g,"_"):void 0)!=null?l:typeof f.header=="string"?f.header:void 0,p;if(f.accessorFn?p=f.accessorFn:m&&(m.includes(".")?p=y=>{let _=y;for(const S of m.split(".")){var R;_=(R=_)==null?void 0:R[S]}return _}:p=y=>y[f.accessorKey]),!v)throw new Error;let b={id:`${String(v)}`,accessorFn:p,parent:s,depth:r,columnDef:f,columns:[],getFlatColumns:le(()=>[!0],()=>{var y;return[b,...(y=b.columns)==null?void 0:y.flatMap(_=>_.getFlatColumns())]},ue(e.options,"debugColumns")),getLeafColumns:le(()=>[e._getOrderColumnsFn()],y=>{var _;if((_=b.columns)!=null&&_.length){let R=b.columns.flatMap(S=>S.getLeafColumns());return y(R)}return[b]},ue(e.options,"debugColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(b,e);return b}const _t="debugHeaders";function sf(e,i,r){var s;let u={id:(s=r.id)!=null?s:i.id,column:i,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],f=m=>{m.subHeaders&&m.subHeaders.length&&m.subHeaders.map(f),d.push(m)};return f(u),d},getContext:()=>({table:e,header:u,column:i})};return e._features.forEach(d=>{d.createHeader==null||d.createHeader(u,e)}),u}const gw={createTable:e=>{e.getHeaderGroups=le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(i,r,s,l)=>{var u,d;const f=(u=s==null?void 0:s.map(b=>r.find(y=>y.id===b)).filter(Boolean))!=null?u:[],m=(d=l==null?void 0:l.map(b=>r.find(y=>y.id===b)).filter(Boolean))!=null?d:[],v=r.filter(b=>!(s!=null&&s.includes(b.id))&&!(l!=null&&l.includes(b.id)));return Ws(i,[...f,...v,...m],e)},ue(e.options,_t)),e.getCenterHeaderGroups=le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(i,r,s,l)=>(r=r.filter(u=>!(s!=null&&s.includes(u.id))&&!(l!=null&&l.includes(u.id))),Ws(i,r,e,"center")),ue(e.options,_t)),e.getLeftHeaderGroups=le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(i,r,s)=>{var l;const u=(l=s==null?void 0:s.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?l:[];return Ws(i,u,e,"left")},ue(e.options,_t)),e.getRightHeaderGroups=le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(i,r,s)=>{var l;const u=(l=s==null?void 0:s.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?l:[];return Ws(i,u,e,"right")},ue(e.options,_t)),e.getFooterGroups=le(()=>[e.getHeaderGroups()],i=>[...i].reverse(),ue(e.options,_t)),e.getLeftFooterGroups=le(()=>[e.getLeftHeaderGroups()],i=>[...i].reverse(),ue(e.options,_t)),e.getCenterFooterGroups=le(()=>[e.getCenterHeaderGroups()],i=>[...i].reverse(),ue(e.options,_t)),e.getRightFooterGroups=le(()=>[e.getRightHeaderGroups()],i=>[...i].reverse(),ue(e.options,_t)),e.getFlatHeaders=le(()=>[e.getHeaderGroups()],i=>i.map(r=>r.headers).flat(),ue(e.options,_t)),e.getLeftFlatHeaders=le(()=>[e.getLeftHeaderGroups()],i=>i.map(r=>r.headers).flat(),ue(e.options,_t)),e.getCenterFlatHeaders=le(()=>[e.getCenterHeaderGroups()],i=>i.map(r=>r.headers).flat(),ue(e.options,_t)),e.getRightFlatHeaders=le(()=>[e.getRightHeaderGroups()],i=>i.map(r=>r.headers).flat(),ue(e.options,_t)),e.getCenterLeafHeaders=le(()=>[e.getCenter
* 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
2025-04-16 12:16:08 +00:00
*/function fa(e,i){return e?Jw(e)?C.createElement(e,i):e:null}function Jw(e){return eS(e)||typeof e=="function"||tS(e)}function eS(e){return typeof e=="function"&&(()=>{const i=Object.getPrototypeOf(e);return i.prototype&&i.prototype.isReactComponent})()}function tS(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ng(e){const i={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=C.useState(()=>({current:Gw(i)})),[s,l]=C.useState(()=>r.current.initialState);return r.current.setOptions(u=>({...u,...e,state:{...s,...e.state},onStateChange:d=>{l(d),e.onStateChange==null||e.onStateChange(d)}})),r.current}const nS=({buttonText:e,title:i="",content:r,className:s=""})=>a.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${s}`,children:a.jsxs(Li,{children:[a.jsx(qf,{asChild:!0,children:a.jsxs(ae,{variant:"link",className:"inline-flex items-center font-medium group",children:[a.jsx("span",{className:"underline-offset-4 group-hover:underline",children:e}),a.jsx(sb,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),a.jsxs($i,{className:"sm:max-w-[425px]",children:[a.jsx(qi,{children:a.jsx(Vi,{children:i})}),a.jsxs(Il,{className:"grid gap-4 py-2",children:[r,a.jsx(zi,{children:a.jsx(oa,{asChild:!0,children:a.jsx(ae,{type:"button",children:E("common.close")})})})]})]})]})});function rS(e){let s=0;for(let p=0;p<e.length;p++)s=e.charCodeAt(p)+((s<<5)-s);let l="#";for(let p=0;p<3;p++){const b=s>>p*8&255;l+=("00"+b.toString(16)).substr(-2)}const u=parseInt(l.substr(1,2),16),d=parseInt(l.substr(3,2),16),f=parseInt(l.substr(5,2),16),m=`#${(u*.7|0).toString(16).padStart(2,"0")}${(d*.7|0).toString(16).padStart(2,"0")}${(f*.7|0).toString(16).padStart(2,"0")}`,v=`#${Math.min(255,Math.floor(u+(255-u)*.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(f+(255-f)*.7)).toString(16).padStart(2,"0")}`;return[m,v]}const Eg=({label:e,className:i})=>{const[r,s]=rS(e);return a.jsx(Ol,{className:i,style:i?{}:{backgroundColor:s,color:r},children:e})};function Ag({table:e,header:i,className:r}){return i.column.getCanSort()?a.jsx("div",{className:Ve("flex items-center space-x-2",r),children:a.jsxs(_a,{children:[a.jsx(ya,{asChild:!0,children:a.jsxs(ae,{"aria-label":i.column.getIsSorted()==="desc"?E("common.sort_desc_description"):i.column.getIsSorted()==="asc"?E("common.sort_asc_description"):E("sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[fa(i.column.columnDef.header,i.getContext()),i.column.getIsSorted()==="desc"?a.jsx(Jd,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.column.getIsSorted()==="asc"?a.jsx(ef,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):a.jsx(d1,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),a.jsxs(ba,{align:"start",children:[i.column.getCanSort()&&a.jsxs(a.Fragment,{children:[a.jsxs(Ni,{onClick:()=>i.column.toggleSorting(!1),"aria-label":E("common.sort_asc"),children:[a.jsx(ef,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),E("common.sort_asc")]}),a.jsxs(Ni,{onClick:()=>i.column.toggleSorting(!0),"aria-label":E("common.sort_desc"),children:[a.jsx(Jd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),E("common.sort_desc")]})]}),i.column.getCanSort()&&i.column.getCanHide()&&a.jsx(Tl,{}),i.column.getCanHide()&&a.jsxs(Ni,{onClick:()=>i.column.toggleVisibility(!1),"aria-label":E("Hide"),children:[a.jsx(dg,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),E("Hide")]})]})]})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ve("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:i.isPlaceholder?null:fa(i.column.columnDef.header,i.getContext())}),!1]})}function iS({table:e,className:i,enablePageSizeSelector:r=!0,visible:s="auto"}){const l=C.useMemo(()=>s===!0,[s]),u=C.useMemo(()=>s==="auto",[s]);return!l||
2025-04-16 11:34:34 +00:00
appearance: none;
margin: 0;
border: 0;
color: white;
padding: 5px !important;
border-radius: 0 !important;
background: ${e=>e.hideBackground?"":`${Ee.blue} !important`};
transition: 0.2s all;
&:hover {
background: ${Ee.lightBlue};
}
`,gj=ni(wr)`
font-size: 14px;
font-weight: bold;
margin: 0 4px 0 auto;
background: none !important;
display: flex;
width: 25px;
height: 25px;
justify-content: center;
line-height: 14px !important;
border-radius: 50% !important;
padding: 0 !important;
transition: 0.2s all;
&:hover {
background: ${Ee.lightBlue};
}
&:active {
background: black;
}
`,mj=ni.input`
&::placeholder {
color: #b3b3b3;
}
&:focus::placeholder {
color: white;
}
`,hj=ni.table`
transition: 0.3s all;
&:hover {
background: ${Ee.primary};
}
`,pj=({setVisible:e,control:i})=>{const{isValid:r}=du({control:i});return C.createElement("header",{style:{display:"flex",alignItems:"center",paddingLeft:10,backgroundColor:"transparent"}},C.createElement("p",{style:Object.assign(Object.assign({},Le),{margin:0,padding:0,fontWeight:400,fontSize:12})},C.createElement("span",{style:{transition:"0.5s all",color:r?Ee.green:Ee.lightPink}},"■")," ","React Hook Form"),C.createElement(gj,{title:"Close dev panel",onClick:()=>e(!1)},"✕"))},xj=({refObject:e,hasError:i,isDirty:r,fieldsValues:s,isNative:l,errorMessage:u,errorType:d,type:f,isTouched:m,name:v,collapseAll:p})=>{const[b,y]=C.useState(!1);C.useEffect(()=>{y(!p)},[p]);let _=s?J(s,v):"",R=!1;if(!xf(_))if(Ab(_))try{_=C.createElement("pre",{style:{margin:0}},C.createElement("code",{style:{fontSize:12}},JSON.stringify(_,null,2))),R=!0}catch{_=C.createElement("span",null,"[Nested Object]")}else typeof _!="string"&&(_=String(_));return C.createElement(hj,{style:{padding:"5px 8px",width:"100%",transition:".3s all",borderLeft:`2px solid ${i?Ee.secondary:Ee.buttonBlue}`,background:"none"}},C.createElement("thead",null,C.createElement("tr",null,C.createElement("td",{valign:"top",style:{width:85,lineHeight:"22px"}},C.createElement(wr,{onClick:()=>y(!b),title:"Toggle field table",style:{border:`1px solid ${Ee.lightBlue}`,borderRadius:2,padding:"3px 5px",display:"inline-block",fontSize:9,lineHeight:"13px",width:20,textAlign:"center",marginRight:8},type:"button"},b?"+":"-"),C.createElement(wr,{onClick:()=>{e.scrollIntoView&&e.scrollIntoView({behavior:"smooth"})},title:"Scroll into view",style:Object.assign({border:`1px solid ${Ee.lightBlue}`,borderRadius:2,padding:"3px 5px",display:"inline-block",fontSize:9,lineHeight:"13px",textAlign:"center",width:"calc(100% - 30px)"},l?{}:{cursor:"not-allowed",background:Ee.lightBlue}),type:"button"},l?"Native":"Custom")),C.createElement("td",{style:{display:"block",maxWidth:140}},C.createElement("p",{style:Object.assign(Object.assign({margin:0,padding:0,top:0,position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Le),{lineHeight:"24px"}),title:v},v)))),!b&&C.createElement("tbody",null,f&&C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"Type:"),C.createElement("td",{style:Object.assign({display:"block",maxWidth:100},Le)},f)),d&&C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"ERROR Type:"),C.createElement("td",{style:Object.assign({display:"block",maxWidth:100},Le)},d)),u&&C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"MESSAGE:"),C.createElement("td",{style:Object.assign({display:"block",maxWidth:100},Le)},typeof u=="string"?u.trim():JSON.stringify(u))),!xf(_)&&C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"Value:"),C.createElement("td",{"data-testid":`${v}-field-value`,style:Object.assign({display:"block",maxWidth:100},Le)},!R&&C.createElement("p",{title:_,style:Object.assign(Object.assign({},Le),{margin:0,padding:0})},_),R&&C.createElement("div",{style:Object.assign(Object.assign({},Le),{margin:0,padding:0})},_))),C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"Touched:"),C.createElement("td",null,C.createElement("code",{style:Object.assign(Object.assign({color:m?Ee.green:Ee.lightPink},Le),{fontSize:12})},m?"true":"false"))),C.createElement("tr",null,C.createElement("td",{align:"right",style:Object.assign({paddingRight:5,fontWeight:500,verticalAlign:"top"},Le)},"Dirty:"),C.createElement("td",null,C.createElement("code",{style:Object.assign(Object.assign({color:r?Ee.green:Ee.lightPink},Le),{fontSize:12})},r?"true":"false")))))},vj=({formState:e,showFormState:i,setShowFormState:r})=>C.createElement("div",{style:{align
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Cj(e,i){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(e);l<s.length;l++)i.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(r[s[l]]=e[s[l]]);return r}function If(e){return Reflect.ownKeys(e).reduce((i,r)=>(i[r]=e[r],i),{})}function ea(e,i,r){return e.reduce((s,l)=>(s[l]=xl(i,l)||r,s),{})}function jj({id:e,control:i}){const r=om({control:i}),s=du({control:i}),[l,u]=C.useState(!1),d=f=>{f.data.source!=="react-hook-form-bridge"||f.data.type!=="INIT"||(window.postMessage({source:"react-hook-form-bridge",type:"WELCOME"}),u(!0))};return C.useEffect(()=>(window.addEventListener("message",d),()=>window.removeEventListener("message",d)),[]),GC(()=>{if(!l)return;const f=If(s),{errors:m,dirtyFields:v,touchedFields:p}=f,b=Cj(f,["errors","dirtyFields","touchedFields"]),y=[...i._names.mount],_=ea(y,r,""),R=ea(y,v,!1),S=ea(y,p,!1),O=ea(y,m),T=Object.entries(O).reduce((z,[V,B])=>(z[V]={type:B==null?void 0:B.type,message:B==null?void 0:B.message},z),{}),A=y.reduce((z,V)=>{var B,H;const ie=(B=xl(i._fields,V))===null||B===void 0?void 0:B._f;return z[V]=(H=xl(ie,"ref"))===null||H===void 0?void 0:H.type,z},{}),D={id:e,data:{formValues:_,formState:Object.assign({errors:T,dirtyFields:R,touchedFields:S,nativeFields:A},b)}};window.postMessage({source:"react-hook-form-bridge",type:"UPDATE",payload:D})},[l,r,If(s)]),{isExtensionEnabled:l}}typeof window<"u"&&NS({visible:!1,isCollapse:!1,filterName:""},{name:"__REACT_HOOK_FORM_DEVTOOLS__",middleWares:[],storageType:window.localStorage});const Rj=e=>{var i,r,s;const l=cu(),u=C.useRef("");C.useEffect(()=>{u.current=TS()},[]);const{isExtensionEnabled:d}=jj({id:(i=e==null?void 0:e.id)!==null&&i!==void 0?i:u.current,control:(r=e==null?void 0:e.control)!==null&&r!==void 0?r:l.control});return d?null:C.createElement(RS,null,C.createElement(Sj,{control:(s=e==null?void 0:e.control)!==null&&s!==void 0?s:l.control,placement:e==null?void 0:e.placement,styles:e==null?void 0:e.styles}))};var va={exports:{}};/**
* @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
*/va.exports;(function(e,i){(function(){var r,s="4.17.21",l=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",f="Invalid `variable` option passed into `_.template`",m="__lodash_hash_undefined__",v=500,p="__lodash_placeholder__",b=1,y=2,_=4,R=1,S=2,O=1,T=2,A=4,D=8,z=16,V=32,B=64,H=128,ie=256,ce=512,ge=30,se="...",K=800,re=16,we=1,te=2,ve=3,Ae=1/0,X=9007199254740991,Ne=17976931348623157e292,Xe=NaN,ot=4294967295,dn=ot-1,Xi=ot>>>1,Da=[["ary",H],["bind",O],["bindKey",T],["curry",D],["curryRight",z],["flip",ce],["partial",V],["partialRight",B],["rearg",ie]],Cn="[object Arguments]",Rr="[object Array]",Zi="[object AsyncFunction]",nr="[object Boolean]",jn="[object Date]",Ji="[object DOMException]",Ln="[object Error]",rr="[object Function]",es="[object GeneratorFunction]",At="[object Map]",ir="[object Number]",ts="[object Null]",Ht="[object Object]",ns="[object Promise]",Pa="[object Proxy]",Nr="[object RegExp]",Ft="[object Set]",j="[object String]",k="[object Symbol]",L="[object Undefined]",Q="[object WeakMap]",W="[object WeakSet]",G="[object ArrayBuffer]",Z="[object DataView]",Se="[object Float32Array]",Be="[object Float64Array]",Ze="[object Int8Array]",si="[object Int16Array]",sr="[object Int32Array]",ar="[object Uint8Array]",ai="[object Uint8ClampedArray]",Er="[object Uint16Array]",oi="[object Uint32Array]",rs=/\b__p \+= '';/g,_m=/\b(__p \+=) '' \+/g,ym=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xu=/&(?:amp|lt|gt|quot|#39);/g,vu=/[&<>"']/g,bm=RegExp(xu.source),wm=RegExp(vu.source),Sm=/<%-([\s\S]+?)%>/g,Cm=/<%([\s\S]+?)%>/g,_u=/<%=([\s\S]+?)%>/g,jm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rm=/^\w*$/,Nm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ma=/[\\^$.*+?()[\]{}|]/g,Em=RegExp(Ma.source),La=/^\s+/,Am=/\s/,Fm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Im=/\{\n\/\* \[wrapped with (.+)\] \*/,Om=/,? & /,Tm=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,km=/[()=,{}\[\]\/\s]/,Dm=/\\(\\)?/g,Pm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yu=/\w*$/,Mm=/^[-+]0x[0-9a-f]+$/i,Lm=/^0b[01]+$/i,$m=/^\[object .+?Constructor\]$/,qm=/^0o[0-7]+$/i,Vm=/^(?:0|[1-9]\d*)$/,zm=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,is=/($^)/,Bm=/['\n\r\u2028\u2029\\]/g,ss="\\ud800-\\udfff",Um="\\u0300-\\u036f",Hm="\\ufe20-\\ufe2f",Gm="\\u20d0-\\u20ff",bu=Um+Hm+Gm,wu="\\u2700-\\u27bf",Su="a-z\\xdf-\\xf6\\xf8-\\xff",Km="\\xac\\xb1\\xd7\\xf7",Wm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ym="\\u2000-\\u206f",Qm=" \\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",Cu="A-Z\\xc0-\\xd6\\xd8-\\xde",ju="\\ufe0e\\ufe0f",Ru=Km+Wm+Ym+Qm,$a="[']",Xm="["+ss+"]",Nu="["+Ru+"]",as="["+bu+"]",Eu="\\d+",Zm="["+wu+"]",Au="["+Su+"]",Fu="[^"+ss+Ru+Eu+wu+Su+Cu+"]",qa="\\ud83c[\\udffb-\\udfff]",Jm="(?:"+as+"|"+qa+")",Iu="[^"+ss+"]",Va="(?:\\ud83c[\\udde6-\\uddff]){2}",za="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+Cu+"]",Ou="\\u200d",Tu="(?:"+Au+"|"+Fu+")",eh="(?:"+Ar+"|"+Fu+")",ku="(?:"+$a+"(?:d|ll|m|re|s|t|ve))?",Du="(?:"+$a+"(?:D|LL|M|RE|S|T|VE))?",Pu=Jm+"?",Mu="["+ju+"]?",th="(?:"+Ou+"(?:"+[Iu,Va,za].join("|")+")"+Mu+Pu+")*",nh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lu=Mu+Pu+th,ih="(?:"+[Zm,Va,za].join("|")+")"+Lu,sh="(?:"+[Iu+as+"?",as,Va,za,Xm].join("|")+")",ah=RegExp($a,"g"),oh=RegExp(as,"g"),Ba=RegExp(qa+"(?="+qa+")|"+sh+Lu,"g"),lh=RegExp([Ar+"?"+Au+"+"+ku+"(?="+[Nu,Ar,"$"].join("|")+")",eh+"+"+Du+"(?="+[Nu,Ar+Tu,"$"].join("|")+")",Ar+"?"+Tu+"+"+ku,Ar+"+"+Du,rh,nh,Eu,ih].join("|"),"g"),uh=RegExp("["+Ou+ss+bu+ju+"]"),ch=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dh=["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"],fh
/* [wrapped with `+n+`] */
`)}function Ax(t){return he(t)||hr(t)||!!(oc&&t&&t[oc])}function In(t,n){var o=typeof t;return n=n??X,!!n&&(o=="number"||o!="symbol"&&Vm.test(t))&&t>-1&&t%1==0&&t<n}function Ct(t,n,o){if(!He(o))return!1;var c=typeof n;return(c=="number"?Ot(o)&&In(n,o.length):c=="string"&&n in o)?rn(o[n],t):!1}function Io(t,n){if(he(t))return!1;var o=typeof t;return o=="number"||o=="symbol"||o=="boolean"||t==null||qt(t)?!0:Rm.test(t)||!jm.test(t)||n!=null&&t in Pe(n)}function Fx(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Oo(t){var n=Ds(t),o=h[n];if(typeof o!="function"||!(n in Ce.prototype))return!1;if(t===o)return!0;var c=Eo(o);return!!c&&t===c[0]}function Ix(t){return!!rc&&rc in t}var Ox=ds?On:Yo;function yi(t){var n=t&&t.constructor,o=typeof n=="function"&&n.prototype||kr;return t===o}function rd(t){return t===t&&!He(t)}function id(t,n){return function(o){return o==null?!1:o[t]===n&&(n!==r||t in Pe(o))}}function Tx(t){var n=Vs(t,function(c){return o.size===v&&o.clear(),c}),o=n.cache;return n}function kx(t,n){var o=t[1],c=n[1],g=o|c,x=g<(O|T|H),w=c==H&&o==D||c==H&&o==ie&&t[7].length<=n[8]||c==(H|ie)&&n[7].length<=n[8]&&o==D;if(!(x||w))return t;c&O&&(t[2]=n[2],g|=o&O?0:A);var N=n[3];if(N){var I=t[3];t[3]=I?qc(I,N,n[4]):N,t[4]=I?Vn(t[3],p):n[4]}return N=n[5],N&&(I=t[5],t[5]=I?Vc(I,N,n[6]):N,t[6]=I?Vn(t[5],p):n[6]),N=n[7],N&&(t[7]=N),c&H&&(t[8]=t[8]==null?n[8]:xt(t[8],n[8])),t[9]==null&&(t[9]=n[9]),t[0]=n[0],t[1]=g,t}function Dx(t){var n=[];if(t!=null)for(var o in Pe(t))n.push(o);return n}function Px(t){return gs.call(t)}function sd(t,n,o){return n=nt(n===r?t.length-1:n,0),function(){for(var c=arguments,g=-1,x=nt(c.length-n,0),w=P(x);++g<x;)w[g]=c[n+g];g=-1;for(var N=P(n+1);++g<n;)N[g]=c[g];return N[n]=o(w),Mt(t,this,N)}}function ad(t,n){return n.length<2?t:fr(t,Xt(n,0,-1))}function Mx(t,n){for(var o=t.length,c=xt(n.length,o),g=It(t);c--;){var x=n[c];t[c]=In(x,o)?g[x]:r}return t}function To(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}var od=ud(Fc),bi=Zh||function(t,n){return ut.setTimeout(t,n)},ko=ud(ax);function ld(t,n,o){var c=n+"";return ko(t,Ex(c,Lx(jx(c),o)))}function ud(t){var n=0,o=0;return function(){var c=np(),g=re-(c-o);if(o=c,g>0){if(++n>=K)return arguments[0]}else n=0;return t.apply(r,arguments)}}function Ms(t,n){var o=-1,c=t.length,g=c-1;for(n=n===r?c:n;++o<n;){var x=po(o,g),w=t[x];t[x]=t[o],t[o]=w}return t.length=n,t}var cd=Tx(function(t){var n=[];return t.charCodeAt(0)===46&&n.push(""),t.replace(Nm,function(o,c,g,x){n.push(g?x.replace(Dm,"$1"):c||o)}),n});function mn(t){if(typeof t=="string"||qt(t))return t;var n=t+"";return n=="0"&&1/t==-1/0?"-0":n}function mr(t){if(t!=null){try{return fs.call(t)}catch{}try{return t+""}catch{}}return""}function Lx(t,n){return Kt(Da,function(o){var c="_."+o[0];n&o[1]&&!os(t,c)&&t.push(c)}),t.sort()}function dd(t){if(t instanceof Ce)return t.clone();var n=new Yt(t.__wrapped__,t.__chain__);return n.__actions__=It(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function $x(t,n,o){(o?Ct(t,n,o):n===r)?n=1:n=nt(pe(n),0);var c=t==null?0:t.length;if(!c||n<1)return[];for(var g=0,x=0,w=P(_s(c/n));g<c;)w[x++]=Xt(t,g,g+=n);return w}function qx(t){for(var n=-1,o=t==null?0:t.length,c=0,g=[];++n<o;){var x=t[n];x&&(g[c++]=x)}return g}function Vx(){var t=arguments.length;if(!t)return[];for(var n=P(t-1),o=arguments[0],c=t;c--;)n[c-1]=arguments[c];return qn(he(o)?It(o):[o],ct(n,1))}var zx=_e(function(t,n){return We(t)?hi(t,ct(n,1,We,!0)):[]}),Bx=_e(function(t,n){var o=Zt(n);return We(o)&&(o=r),We(t)?hi(t,ct(n,1,We,!0),oe(o,2)):[]}),Ux=_e(function(t,n){var o=Zt(n);return We(o)&&(o=r),We(t)?hi(t,ct(n,1,We,!0),r,o):[]});function Hx(t,n,o){var c=t==null?0:t.length;return c?(n=o||n===r?1:pe(n),Xt(t,n<0?0:n,c)):[]}function Gx(t,n,o){var c=t==null?0:t.length;return c?(n=o||n===r?1:pe(n),n=c-n,Xt(t,0,n<0?0:n)):[]}function Kx(t,n){return t&&t.length?As(t,oe(n,3),!0,!0):[]}function Wx(t,n){return t&&t.length?As(t,oe(n,3),!0):[]}function Yx(t,n,o,c){var g=t==null?0:t.length;return g?(o&&typeof o!=
`;t.replace(Y,function(fe,ye,Re,Vt,jt,zt){return Re||(Re=Vt),U+=t.slice($,zt).replace(Bm,Oh),ye&&(N=!0,U+=`' +
__e(`+ye+`) +
'`),jt&&(I=!0,U+=`';
`+jt+`;
__p += '`),Re&&(U+=`' +
((__t = (`+Re+`)) == null ? '' : __t) +
'`),$=zt+fe.length,fe}),U+=`';
`;var de=De.call(n,"variable")&&n.variable;if(!de)U=`with (obj) {
`+U+`
}
`;else if(km.test(de))throw new me(f);U=(I?U.replace(rs,""):U).replace(_m,"$1").replace(ym,"$1;"),U="function("+(de||"obj")+`) {
`+(de?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(N?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+U+`return __p
}`;var xe=Bd(function(){return Fe(x,ne+"return "+U).apply(r,w)});if(xe.source=U,$o(xe))throw xe;return xe}function iy(t){return Te(t).toLowerCase()}function sy(t){return Te(t).toUpperCase()}function ay(t,n,o){if(t=Te(t),t&&(o||n===r))return Zu(t);if(!t||!(n=$t(n)))return t;var c=tn(t),g=tn(n),x=Ju(c,g),w=ec(c,g)+1;return Gn(c,x,w).join("")}function oy(t,n,o){if(t=Te(t),t&&(o||n===r))return t.slice(0,nc(t)+1);if(!t||!(n=$t(n)))return t;var c=tn(t),g=ec(c,tn(n))+1;return Gn(c,0,g).join("")}function ly(t,n,o){if(t=Te(t),t&&(o||n===r))return t.replace(La,"");if(!t||!(n=$t(n)))return t;var c=tn(t),g=Ju(c,tn(n));return Gn(c,g).join("")}function uy(t,n){var o=ge,c=se;if(He(n)){var g="separator"in n?n.separator:g;o="length"in n?pe(n.length):o,c="omission"in n?$t(n.omission):c}t=Te(t);var x=t.length;if(Ir(t)){var w=tn(t);x=w.length}if(o>=x)return t;var N=o-Or(c);if(N<1)return c;var I=w?Gn(w,0,N).join(""):t.slice(0,N);if(g===r)return I+c;if(w&&(N+=I.length-N),qo(g)){if(t.slice(N).search(g)){var $,q=I;for(g.global||(g=to(g.source,Te(yu.exec(g))+"g")),g.lastIndex=0;$=g.exec(q);)var U=$.index;I=I.slice(0,U===r?N:U)}}else if(t.indexOf($t(g),N)!=N){var Y=I.lastIndexOf(g);Y>-1&&(I=I.slice(0,Y))}return I+c}function cy(t){return t=Te(t),t&&bm.test(t)?t.replace(xu,$h):t}var dy=$r(function(t,n,o){return t+(o?" ":"")+n.toUpperCase()}),Bo=Uc("toUpperCase");function zd(t,n,o){return t=Te(t),n=o?r:n,n===r?kh(t)?zh(t):jh(t):t.match(n)||[]}var Bd=_e(function(t,n){try{return Mt(t,r,n)}catch(o){return $o(o)?o:new me(o)}}),fy=Fn(function(t,n){return Kt(n,function(o){o=mn(o),En(t,o,Mo(t[o],t))}),t});function gy(t){var n=t==null?0:t.length,o=oe();return t=n?Ue(t,function(c){if(typeof c[1]!="function")throw new Wt(d);return[o(c[0]),c[1]]}):[],_e(function(c){for(var g=-1;++g<n;){var x=t[g];if(Mt(x[0],this,c))return Mt(x[1],this,c)}})}function my(t){return $p(Qt(t,b))}function Uo(t){return function(){return t}}function hy(t,n){return t==null||t!==t?n:t}var py=Gc(),xy=Gc(!0);function kt(t){return t}function Ho(t){return wc(typeof t=="function"?t:Qt(t,b))}function vy(t){return Cc(Qt(t,b))}function _y(t,n){return jc(t,Qt(n,b))}var yy=_e(function(t,n){return function(o){return pi(o,t,n)}}),by=_e(function(t,n){return function(o){return pi(t,o,n)}});function Go(t,n,o){var c=lt(n),g=Rs(n,c);o==null&&!(He(n)&&(g.length||!c.length))&&(o=n,n=t,t=this,g=Rs(n,lt(n)));var x=!(He(o)&&"chain"in o)||!!o.chain,w=On(t);return Kt(g,function(N){var I=n[N];t[N]=I,w&&(t.prototype[N]=function(){var $=this.__chain__;if(x||$){var q=t(this.__wrapped__),U=q.__actions__=It(this.__actions__);return U.push({func:I,args:arguments,thisArg:t}),q.__chain__=$,q}return I.apply(t,qn([this.value()],arguments))})}),t}function wy(){return ut._===this&&(ut._=Wh),this}function Ko(){}function Sy(t){return t=pe(t),_e(function(n){return Rc(n,t)})}var Cy=Co(Ue),jy=Co(Ku),Ry=Co(Wa);function Ud(t){return Io(t)?Ya(mn(t)):nx(t)}function Ny(t){return function(n){return t==null?r:fr(t,n)}}var Ey=Wc(),Ay=Wc(!0);function Wo(){return[]}function Yo(){return!1}function Fy(){return{}}function Iy(){return""}function Oy(){return!0}function Ty(t,n){if(t=pe(t),t<1||t>X)return[];var o=ot,c=xt(t,ot);n=oe(n),t-=ot;for(var g=Za(c,n);++o<t;)n(o);return g}function ky(t){return he(t)?Ue(t,mn):qt(t)?[t]:It(cd(Te(t)))}function Dy(t){var n=++Gh;return Te(t)+n}var Py=Os(function(t,n){return t+n},0),My=jo("ceil"),Ly=Os(function(t,n){return t/n},1),$y=jo("floor");function qy(t){return t&&t.length?js(t,kt,uo):r}function Vy(t,n){return t&&t.length?js(t,oe(n,2),uo):r}function zy(t){return Qu(t,kt)}function By(t,n){return Qu(t,oe(n,2))}function Uy(t){return t&&t.length?js(t,kt,mo):r}function Hy(t,n){return t&&t.length?js(t,oe(n,2),mo):r}var Gy=Os(function(t,n){return t*n},1),Ky=jo("round"),Wy=Os(function(t,n){return t-n},0);function Yy(t){return t&&t.length?Xa(t,kt):0}function Qy(t,n){return t&&t.length?Xa(t,oe(n,2)):0}return h.after=v0,h.ary=bd,h.assign=s_,h.assignIn=Dd,h.assignInWith=Hs,h.assignWith=a_,h.at=o_,h.before=wd,h.bind=Mo,h.bindAll=fy,h.bindKey=Sd,h.castArray=F0,h.chain=vd,h.chunk=$x,h.compact=qx,h.concat=Vx,h.cond=gy,
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
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: 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
de hojas: 2\r
Compuesto por:`},{id:51,code:"CAP_FRE_ARM_CORREDERA_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO",body:`Medida de Hueco:2440x5180mm.\r
Modelo: PANORAMIC P.O. / Acabado: LACADO / Color: BLANCO\r
de lístelos: SIN LISTELOS / Acabado paneles: PANEL LACADO\r
Tirador:\r
Cerco perimetral: \r
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
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
de hojas: 2 CORREDERAS + 2 FIJOS`}]},Tf=({onSelect:e})=>{const{i18n:i}=eu(),[r]=C.useState(i.resolvedLanguage||"es"),[s]=C.useState(Pj[r.toLowerCase()]);return console.log(r),a.jsx(Il,{className:"h-96",children:a.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:s&&s.sort((l,u)=>l.title.localeCompare(u.title)).map((l,u)=>a.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:()=>e&&e(l,1),children:a.jsxs("div",{className:"flex flex-col w-full gap-1",children:[a.jsx("div",{className:"flex items-center",children:a.jsx("div",{className:"flex items-center gap-2",children:a.jsx("div",{className:"font-semibold",children:l.title})})}),a.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:a.jsx("p",{dangerouslySetInnerHTML:{__html:l.body.substring(0,300).replace(`\r
`,"<br>")}})})]})},l.id))})})},Mj=({isOpen:e,onOpenChange:i,onSelect:r})=>Og("(min-width: 768px)")?a.jsx(Li,{modal:!0,open:e,onOpenChange:i,children:a.jsxs($i,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[a.jsxs(qi,{children:[a.jsx(Vi,{children:E("quotes.blocks_picker_dialog.title")}),a.jsx(Hl,{children:E("quotes.blocks_picker_dialog.description")})]}),a.jsx(Tf,{onSelect:r}),a.jsx(zi,{children:a.jsx(ae,{type:"submit",onClick:()=>i(!1),children:E("common.close")})})]})}):a.jsx(Jf,{open:e,onOpenChange:i,children:a.jsxs(eg,{children:[a.jsxs(tg,{className:"text-left",children:[a.jsx(ng,{children:E("quotes.blocks_picker_dialog.title")}),a.jsx(rg,{children:E("quotes.blocks_picker_dialog.description")})]}),a.jsx(Tf,{onSelect:r}),a.jsx(ig,{className:"pt-2",children:a.jsx(sg,{asChild:!0,children:a.jsx(ae,{variant:"outline",children:E("common.close")})})})]})}),Lj=({isOpen:e,onOpenChange:i,onSelect:r})=>Og("(min-width: 768px)")?a.jsx(Li,{modal:!0,open:e,onOpenChange:i,children:a.jsxs($i,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[a.jsxs(qi,{children:[a.jsx(Vi,{children:E("quotes.catalog_picker_dialog.title")}),a.jsx(Hl,{children:E("quotes.catalog_picker_dialog.description")})]}),a.jsx(Qr,{syncWithLocation:!1,initialPageSize:5,children:a.jsx(Al,{onSelect:r})}),a.jsx(zi,{children:a.jsx(ae,{type:"submit",onClick:()=>i(!1),children:E("common.close")})})]})}):a.jsx(Jf,{open:e,onOpenChange:i,children:a.jsxs(eg,{children:[a.jsxs(tg,{className:"text-left",children:[a.jsx(ng,{children:E("quotes.catalog_picker_dialog.title")}),a.jsx(rg,{children:E("quotes.catalog_picker_dialog.description")})]}),a.jsx(Qr,{syncWithLocation:!1,initialPageSize:5,children:a.jsx(Al,{onSelect:r})}),a.jsx(ig,{className:"pt-2",children:a.jsx(sg,{asChild:!0,children:a.jsx(ae,{variant:"outline",children:E("common.close")})})})]})}),$j=({currency:e,language:i,defaultValues:r})=>{const{toast:s}=tr(),{control:l,register:u}=Ul(),[d]=C.useState("dialog"),[f,m]=C.useState(!1),[v,p]=C.useState(!1),{fields:b,...y}=Hb({control:l,name:"items"}),_=bS([{id:"description",accessorKey:"description",header:E("quotes.form_fields.items.description.label"),cell:({row:{index:z,original:V}})=>a.jsx(yn,{readOnly:V==null?void 0:V.id_article,autoSize:!0,...u(`items.${z}.description`)}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>a.jsx("div",{className:"text-right",children:E("quotes.form_fields.items.quantity.label")}),cell:({row:{index:z}})=>a.jsx(Gb,{scale:0,className:"text-right",...u(`items.${z}.quantity`)}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>a.jsx("div",{className:"text-right",children:E("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:z}})=>a.jsx(Xo,{currency:e,language:i,scale:2,className:"text-right",...u(`items.${z}.unit_price`)}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>a.jsx("div",{className:"text-right",children:E("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:z}})=>a.jsx(Xo,{variant:"ghost",currency:e,language:i,scale:2,readOnly:!0,className:"text-right",...u(`items.${z}.subtotal_price`)}),size:150},{id:"discount",accessorKey:"discount",header:()=>a.jsx("div",{className:"text-right",children:E("quotes.form_fields.items.discount.label")}),cell:({row:{index:z}})=>a.jsx(da,{scale:2,className:"text-right",...u(`items.${z}.discount`)}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>a.jsx("div",{className:"text-right",children:E("quotes.form_fields.items.total_price.label")}),cell:({row:{index:z}})=>a.jsx(Xo,{variant:"ghost",currency:e,language:i,scale:2,readOnly:!0,className:"font-semibold text-right",...u(`items.${z}.total_price`)}),size:150}],{enableDragHandleColumn:!0,enableSelectionColumn:!0,enableActionsColumn:!0,rowActionFn:z=>{const{table:V,row:B}=z;return[{label:E("common.duplicate_row"),icon:a.jsx(Gl,{className:"w-4 h-4 mr-2"}),onClick:()=>{var H;return(H=V.options.meta)==null?void 0:H.duplicateItems(B.index)}},{label:E("common.insert_row_above"),icon:a.jsx(Kb,{className:"w-4 h-4 mr-2"}),onClick:()=>{v
${z.body}`,quantity:{amount:null,scale:ca.DEFAULT_SCALE},unit_price:{amount:null,scale:rw.DEFAULT_SCALE},discount:{amount:null,scale:2}}),s({title:E("quotes.blocks_picker_dialog.toast_article_added"),description:z.title})},[y]),[O,T]=C.useState(!1),A=[265,440,655],D=4;return d==="dialog"?a.jsxs("div",{className:"relative",children:[a.jsx(Of,{actions:{...y,pickCatalogArticle:()=>m(!0),pickBlock:()=>p(!0)},columns:_,data:b,defaultValues:r}),a.jsx(Lj,{onSelect:R,isOpen:f,onOpenChange:m}),a.jsx(Mj,{onSelect:S,isOpen:v,onOpenChange:p})]}):a.jsxs(Y1,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[a.jsx(tf,{defaultSize:A[0],collapsedSize:D,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{T(!0)},onExpand:()=>{T(!1)},className:Ve(O&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:a.jsx(Of,{actions:y,columns:_,data:b,defaultValues:r})}),a.jsx(Q1,{withHandle:!0,className:"mx-3"}),a.jsx(tf,{defaultSize:A[1],minSize:10,children:a.jsx(Qr,{syncWithLocation:!1,children:a.jsx(Al,{onSelect:R})})})]})},qj=()=>{const{register:e,formState:i}=Ul();return a.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[a.jsxs(gl,{className:"md:col-span-6",title:E("quotes.create.form_groups.general.title"),description:E("quotes.create.form_groups.general.desc"),children:[a.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[a.jsx(xr,{required:!0,className:"col-span-2",label:E("quotes.form_fields.customer_reference.label"),description:E("quotes.form_fields.customer_reference.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.customer_reference.placeholder"),...e("customer_reference")}),a.jsx(Xf,{required:!0,label:E("quotes.form_fields.date.label"),description:E("quotes.form_fields.date.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.date.placeholder"),...e("date",{required:!0})}),a.jsx(xr,{label:E("quotes.form_fields.validity.label"),description:E("quotes.form_fields.validity.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.validity.placeholder"),...e("validity",{required:!1})}),a.jsx(yn,{className:"col-span-2",label:E("quotes.form_fields.payment_method.label"),description:E("quotes.form_fields.payment_method.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.payment_method.placeholder"),...e("payment_method",{required:!1})})]}),a.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[a.jsx(yn,{className:"col-span-3",required:!0,label:E("quotes.form_fields.customer_information.label"),description:E("quotes.form_fields.customer_information.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.customer_information.placeholder"),...e("customer_information",{required:!0}),errors:i.errors}),a.jsx(yn,{className:"col-span-3",label:E("quotes.form_fields.notes.label"),description:E("quotes.form_fields.notes.desc"),disabled:i.disabled,placeholder:E("quotes.form_fields.notes.placeholder"),...e("notes",{required:!1})})]})]}),a.jsx(gl,{className:"hidden md:col-span-2",title:E("quotes.create.form_groups.status.title"),description:E("quotes.create.form_groups.status.desc"),children:a.jsxs("div",{className:"grid gap-6",children:[a.jsxs("div",{className:"grid gap-3",children:[a.jsx(Gi,{htmlFor:"status",children:"Status"}),a.jsxs(kl,{children:[a.jsx(Dl,{id:"status","aria-label":"Select status",children:a.jsx(Pl,{placeholder:"Select status"})}),a.jsxs(Ml,{children:[a.jsx(Ei,{value:"draft",children:"Draft"}),a.jsx(Ei,{value:"published",children:"Active"}),a.jsx(Ei,{value:"archived",children:"Archived"})]})]})]}),a.jsx(xr,{required:!0,label:E("quotes.form_fields.lang_code.label"),description:E("quotes.form_fields.lang_code.desc"),placeholder:E("quotes.form_fields.lang_code.placeholder"),...e("lang_code",{required:!0})}),a.jsx(xr,{required:!0,label:E("quotes.form_fields.currency_code.label"),description:E("quotes.form_fields.currency_code.desc"),placeholder:E("quotes.form_fields.currency_code.placeholder"),...e("currency_code",{required:!0})})]})})]})},xm=({id:e,onSentTo:i,disabled:r})=>{const s=()=>{i(e)};return a.jsxs(Wb,{childre
`).map((Ne,Xe)=>a.jsxs("span",{className:Xe===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[Ne,a.jsx("br",{})]},Xe))}),size:500}],Ae=[{id:"row-actions",header:()=>null,cell:({row:{original:X}})=>{const Ne=(X==null?void 0:X.status)==="accepted"&&!(X!=null&&X.date_sent),Xe=(X==null?void 0:X.status)==="accepted"&&!!(X!=null&&X.date_sent),ot=(X==null?void 0:X.status)==="archived";return a.jsxs("div",{className:"flex gap-1",children:[a.jsxs(Yr,{className:"gap-0",children:[a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsxs(ae,{variant:"ghost",size:"icon",disabled:Xe,onClick:dn=>{dn.preventDefault(),ge(X)},children:[a.jsx(gg,{className:"w-4 h-4"}),a.jsx("span",{className:"sr-only",children:"Editar"})]})}),a.jsx(pt,{children:a.jsx("p",{children:"Editar"})})]}),a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsxs(ae,{variant:"ghost",size:"icon",onClick:dn=>{dn.preventDefault(),se(X.id)},children:[a.jsx(Gl,{className:"w-4 h-4"}),a.jsx("span",{className:"sr-only",children:"Duplicar"})]})}),a.jsx(pt,{children:a.jsx("p",{children:"Duplicar"})})]}),a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsxs(ae,{variant:"ghost",size:"icon",onClick:()=>{B(X.id,S(X))},children:[a.jsx(cg,{className:"w-4 h-4"}),a.jsx("span",{className:"sr-only",children:"Descargar"})]})}),a.jsx(pt,{children:a.jsx("p",{children:"Descargar"})})]}),a.jsxs(mt,{children:[a.jsx(ht,{asChild:!0,children:a.jsxs(ae,{variant:"ghost",size:"icon",disabled:ot||Xe,onClick:dn=>{dn.preventDefault(),K(X.id)},children:[a.jsx(lg,{className:"w-4 h-4"}),a.jsx("span",{className:"sr-only",children:"Archivar"})]})}),a.jsx(pt,{children:a.jsx("p",{children:"Archivar"})})]})]}),a.jsx(Yr,{children:a.jsx(xm,{id:X.id,onSentTo:()=>null,disabled:Xe||!Ne})})]})}}];return i?ve:[...ve,...Ae]},[i]),{table:te}=Aa({data:(A==null?void 0:A.items)??[],columns:we,pageCount:(A==null?void 0:A.total_pages)??-1});return C.useEffect(()=>{te&&A&&(A==null?void 0:A.total_pages)>0&&p(te.getRowModel().rows[0])},[A,te]),z?a.jsx(ri,{subtitle:V.message}):D?a.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:[a.jsx(st,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:a.jsx(at,{children:a.jsx(Na,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),a.jsx("div",{})]}):(A==null?void 0:A.total_items)===0&&!m?a.jsx(st,{children:a.jsx(at,{children:a.jsx(Ea,{subtitle:"Empieza creando alguna cotización",buttonText:E("quotes.create.title"),onButtonClick:()=>r("add",{relative:"path"})})})}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[a.jsx("div",{id:l,className:"flex items-stretch flex-1",children:a.jsx(Ra,{table:te,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:ie,activeRowIndex:v==null?void 0:v.index,children:a.jsx(Mg,{table:te})})}),i&&a.jsx("div",{id:u,className:"flex items-stretch ",children:a.jsx(Bj,{quoteId:v==null?void 0:v.original.id})})]}),a.jsx(hm,{...H,onFinishDownload:ce})]})},lR=()=>{const e=Sn(),i=jS(),{toast:r}=tr(),[s,l]=C.useState(Zo.createDefaultCode().object),[u,d]=C.useState(Ai.createDefaultCode().object),f=C.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",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_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:s.code},subtotal_price:{amount:null,scale:2,currency_code:s.code},discount:{amount:null,scale:2},total_price:{amount:null,scale:2,currency_code:s.code}}]}),[s.code]),{useOne:m,useUpdate:v}=Ki(),{data:p,status:b,err