@aleric.dev/ui 0.1.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,206 +1,211 @@
1
- "use strict";var jr=Object.defineProperty;var Nr=(e,t,r)=>t in e?jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var M=(e,t,r)=>Nr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),C=require("react"),wt=require("react-dom");function vt(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=vt(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Sr(){for(var e,t,r=0,s="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=vt(e))&&(s&&(s+=" "),s+=t);return s}const Cr=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},zr=(e,t)=>({classGroupId:e,validator:t}),yt=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Se="-",at=[],Rr="arbitrary..",$r=e=>{const t=Lr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Ar(c);const l=c.split(Se),h=l[0]===""&&l.length>1?1:0;return jt(l,h,t)},getConflictingClassGroupIds:(c,l)=>{if(l){const h=s[c],i=r[c];return h?i?Cr(i,h):h:i||at}return r[c]||at}}},jt=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const i=jt(e,t+1,o);if(i)return i}const c=r.validators;if(c===null)return;const l=t===0?e.join(Se):e.slice(t).join(Se),h=c.length;for(let i=0;i<h;i++){const d=c[i];if(d.validator(l))return d.classGroupId}},Ar=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?Rr+s:void 0})(),Lr=e=>{const{theme:t,classGroups:r}=e;return _r(r,t)},_r=(e,t)=>{const r=yt();for(const s in e){const n=e[s];qe(n,r,s,t)}return r},qe=(e,t,r,s)=>{const n=e.length;for(let o=0;o<n;o++){const c=e[o];Tr(c,t,r,s)}},Tr=(e,t,r,s)=>{if(typeof e=="string"){Ir(e,t,r);return}if(typeof e=="function"){Mr(e,t,r,s);return}Er(e,t,r,s)},Ir=(e,t,r)=>{const s=e===""?t:Nt(t,e);s.classGroupId=r},Mr=(e,t,r,s)=>{if(Pr(e)){qe(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(zr(r,e))},Er=(e,t,r,s)=>{const n=Object.entries(e),o=n.length;for(let c=0;c<o;c++){const[l,h]=n[c];qe(h,Nt(t,l),r,s)}},Nt=(e,t)=>{let r=e;const s=t.split(Se),n=s.length;for(let o=0;o<n;o++){const c=s[o];let l=r.nextPart.get(c);l||(l=yt(),r.nextPart.set(c,l)),r=l}return r},Pr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Dr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const n=(o,c)=>{r[o]=c,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let c=r[o];if(c!==void 0)return c;if((c=s[o])!==void 0)return n(o,c),c},set(o,c){o in r?r[o]=c:n(o,c)}}},Pe="!",lt=":",Br=[],it=(e,t,r,s,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:n}),Gr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=n=>{const o=[];let c=0,l=0,h=0,i;const d=n.length;for(let k=0;k<d;k++){const z=n[k];if(c===0&&l===0){if(z===lt){o.push(n.slice(h,k)),h=k+1;continue}if(z==="/"){i=k;continue}}z==="["?c++:z==="]"?c--:z==="("?l++:z===")"&&l--}const g=o.length===0?n:n.slice(h);let u=g,v=!1;g.endsWith(Pe)?(u=g.slice(0,-1),v=!0):g.startsWith(Pe)&&(u=g.slice(1),v=!0);const p=i&&i>h?i-h:void 0;return it(o,v,u,p)};if(t){const n=t+lt,o=s;s=c=>c.startsWith(n)?o(c.slice(n.length)):it(Br,!1,c,void 0,!0)}if(r){const n=s;s=o=>r({className:o,parseClassName:n})}return s},Or=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let n=[];for(let o=0;o<r.length;o++){const c=r[o],l=c[0]==="[",h=t.has(c);l||h?(n.length>0&&(n.sort(),s.push(...n),n=[]),s.push(c)):n.push(c)}return n.length>0&&(n.sort(),s.push(...n)),s}},qr=e=>({cache:Dr(e.cacheSize),parseClassName:Gr(e),sortModifiers:Or(e),postfixLookupClassGroupIds:Fr(e),...$r(e)}),Fr=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},Wr=/\s+/,Zr=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:o,postfixLookupClassGroupIds:c}=t,l=[],h=e.trim().split(Wr);let i="";for(let d=h.length-1;d>=0;d-=1){const g=h[d],{isExternal:u,modifiers:v,hasImportantModifier:p,baseClassName:k,maybePostfixModifierPosition:z}=r(g);if(u){i=g+(i.length>0?" "+i:i);continue}let A=!!z,R;if(A){const P=k.substring(0,z);R=s(P);const f=R&&c[R]?s(k):void 0;f&&f!==R&&(R=f,A=!1)}else R=s(k);if(!R){if(!A){i=g+(i.length>0?" "+i:i);continue}if(R=s(k),!R){i=g+(i.length>0?" "+i:i);continue}A=!1}const E=v.length===0?"":v.length===1?v[0]:o(v).join(":"),I=p?E+Pe:E,L=I+R;if(l.indexOf(L)>-1)continue;l.push(L);const N=n(R,A);for(let P=0;P<N.length;++P){const f=N[P];l.push(I+f)}i=g+(i.length>0?" "+i:i)}return i},Vr=(...e)=>{let t=0,r,s,n="";for(;t<e.length;)(r=e[t++])&&(s=St(r))&&(n&&(n+=" "),n+=s);return n},St=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=St(e[s]))&&(r&&(r+=" "),r+=t);return r},Hr=(e,...t)=>{let r,s,n,o;const c=h=>{const i=t.reduce((d,g)=>g(d),e());return r=qr(i),s=r.cache.get,n=r.cache.set,o=l,l(h)},l=h=>{const i=s(h);if(i)return i;const d=Zr(h,r);return n(h,d),d};return o=c,(...h)=>o(Vr(...h))},Ur=[],q=e=>{const t=r=>r[e]||Ur;return t.isThemeGetter=!0,t.themeKey=e,t},Ct=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Kr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Jr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,es=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>Qr.test(e),j=e=>!!e&&!Number.isNaN(Number(e)),Q=e=>!!e&&Number.isInteger(Number(e)),Ie=e=>e.endsWith("%")&&j(e.slice(0,-1)),Y=e=>Kr.test(e),Rt=()=>!0,ts=e=>Xr.test(e)&&!Yr.test(e),Fe=()=>!1,rs=e=>Jr.test(e),ss=e=>es.test(e),ns=e=>!m(e)&&!x(e),os=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),as=e=>se(e,Lt,Fe),m=e=>Ct.test(e),ne=e=>se(e,_t,ts),ct=e=>se(e,ms,j),ls=e=>se(e,It,Rt),is=e=>se(e,Tt,Fe),dt=e=>se(e,$t,Fe),cs=e=>se(e,At,ss),ve=e=>se(e,Mt,rs),x=e=>zt.test(e),he=e=>le(e,_t),ds=e=>le(e,Tt),ht=e=>le(e,$t),hs=e=>le(e,Lt),us=e=>le(e,At),ye=e=>le(e,Mt,!0),ps=e=>le(e,It,!0),se=(e,t,r)=>{const s=Ct.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},le=(e,t,r=!1)=>{const s=zt.exec(e);return s?s[1]?t(s[1]):r:!1},$t=e=>e==="position"||e==="percentage",At=e=>e==="image"||e==="url",Lt=e=>e==="length"||e==="size"||e==="bg-size",_t=e=>e==="length",ms=e=>e==="number",Tt=e=>e==="family-name",It=e=>e==="number"||e==="weight",Mt=e=>e==="shadow",xs=()=>{const e=q("color"),t=q("font"),r=q("text"),s=q("font-weight"),n=q("tracking"),o=q("leading"),c=q("breakpoint"),l=q("container"),h=q("spacing"),i=q("radius"),d=q("shadow"),g=q("inset-shadow"),u=q("text-shadow"),v=q("drop-shadow"),p=q("blur"),k=q("perspective"),z=q("aspect"),A=q("ease"),R=q("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...I(),x,m],N=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],f=()=>[x,m,h],D=()=>[re,"full","auto",...f()],te=()=>[Q,"none","subgrid",x,m],ce=()=>["auto",{span:["full",Q,x,m]},Q,x,m],S=()=>[Q,"auto",x,m],y=()=>["auto","min","max","fr",x,m],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...f()],X=()=>[re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],de=()=>[l,re,"screen","full","dvw","lvw","svw","min","max","fit",...f()],Z=()=>[re,"screen","full","lh","dvh","lvh","svh","min","max","fit",...f()],b=()=>[e,x,m],G=()=>[...I(),ht,dt,{position:[x,m]}],rt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],st=()=>["auto","cover","contain",hs,as,{size:[x,m]}],_e=()=>[Ie,he,ne],V=()=>["","none","full",i,x,m],H=()=>["",j,he,ne],fe=()=>["solid","dashed","dotted","double"],nt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[j,Ie,ht,dt],ot=()=>["","none",p,x,m],be=()=>["none",j,x,m],ke=()=>["none",j,x,m],Te=()=>[j,x,m],we=()=>[re,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Y],breakpoint:[Y],color:[Rt],container:[Y],"drop-shadow":[Y],ease:["in","out","in-out"],font:[ns],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Y],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Y],shadow:[Y],spacing:["px",j],text:[Y],"text-shadow":[Y],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",re,m,x,z]}],container:["container"],"container-type":[{"@container":["","normal","size",x,m]}],"container-named":[os],columns:[{columns:[j,"auto",m,x,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Q,"auto",x,m]}],basis:[{basis:[re,"full","auto",l,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[j,re,"auto","initial","none",m]}],grow:[{grow:["",j,x,m]}],shrink:[{shrink:["",j,x,m]}],order:[{order:[Q,"first","last","none",x,m]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":y()}],"auto-rows":[{"auto-rows":y()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pbs:[{pbs:f()}],pbe:[{pbe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...de()]}],"min-inline-size":[{"min-inline":["auto",...de()]}],"max-inline-size":[{"max-inline":["none",...de()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[l,"screen",...X()]}],"min-w":[{"min-w":[l,"screen","none",...X()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[c]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh","none",...X()]}],"font-size":[{text:["base",r,he,ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ps,ls]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ie,m]}],"font-family":[{font:[ds,is,t]}],"font-features":[{"font-features":[m]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,x,m]}],"line-clamp":[{"line-clamp":[j,"none",x,ct]}],leading:[{leading:["none",o,...f()]}],"list-image":[{"list-image":["none",x,m]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",x,m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:b()}],"text-color":[{text:b()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[j,"from-font","auto",x,ne]}],"text-decoration-color":[{decoration:b()}],"underline-offset":[{"underline-offset":[j,"auto",x,m]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"tab-size":[{tab:[Q,x,m]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x,m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",x,m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:rt()}],"bg-size":[{bg:st()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Q,x,m],radial:["",x,m],conic:["",Q,x,m]},us,cs]}],"bg-color":[{bg:b()}],"gradient-from-pos":[{from:_e()}],"gradient-via-pos":[{via:_e()}],"gradient-to-pos":[{to:_e()}],"gradient-from":[{from:b()}],"gradient-via":[{via:b()}],"gradient-to":[{to:b()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:b()}],"border-color-x":[{"border-x":b()}],"border-color-y":[{"border-y":b()}],"border-color-s":[{"border-s":b()}],"border-color-e":[{"border-e":b()}],"border-color-bs":[{"border-bs":b()}],"border-color-be":[{"border-be":b()}],"border-color-t":[{"border-t":b()}],"border-color-r":[{"border-r":b()}],"border-color-b":[{"border-b":b()}],"border-color-l":[{"border-l":b()}],"divide-color":[{divide:b()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[j,x,m]}],"outline-w":[{outline:["",j,he,ne]}],"outline-color":[{outline:b()}],shadow:[{shadow:["","inner","none",d,ye,ve]}],"shadow-color":[{shadow:b()}],"inset-shadow":[{"inset-shadow":["none",g,ye,ve]}],"inset-shadow-color":[{"inset-shadow":b()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:b()}],"ring-offset-w":[{"ring-offset":[j,ne]}],"ring-offset-color":[{"ring-offset":b()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":b()}],"text-shadow":[{"text-shadow":["none",u,ye,ve]}],"text-shadow-color":[{"text-shadow":b()}],opacity:[{opacity:[j,x,m]}],"mix-blend":[{"mix-blend":[...nt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":nt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[j]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":b()}],"mask-image-linear-to-color":[{"mask-linear-to":b()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":b()}],"mask-image-t-to-color":[{"mask-t-to":b()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":b()}],"mask-image-r-to-color":[{"mask-r-to":b()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":b()}],"mask-image-b-to-color":[{"mask-b-to":b()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":b()}],"mask-image-l-to-color":[{"mask-l-to":b()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":b()}],"mask-image-x-to-color":[{"mask-x-to":b()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":b()}],"mask-image-y-to-color":[{"mask-y-to":b()}],"mask-image-radial":[{"mask-radial":[x,m]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":b()}],"mask-image-radial-to-color":[{"mask-radial-to":b()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[j]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":b()}],"mask-image-conic-to-color":[{"mask-conic-to":b()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:rt()}],"mask-size":[{mask:st()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",x,m]}],filter:[{filter:["","none",x,m]}],blur:[{blur:ot()}],brightness:[{brightness:[j,x,m]}],contrast:[{contrast:[j,x,m]}],"drop-shadow":[{"drop-shadow":["","none",v,ye,ve]}],"drop-shadow-color":[{"drop-shadow":b()}],grayscale:[{grayscale:["",j,x,m]}],"hue-rotate":[{"hue-rotate":[j,x,m]}],invert:[{invert:["",j,x,m]}],saturate:[{saturate:[j,x,m]}],sepia:[{sepia:["",j,x,m]}],"backdrop-filter":[{"backdrop-filter":["","none",x,m]}],"backdrop-blur":[{"backdrop-blur":ot()}],"backdrop-brightness":[{"backdrop-brightness":[j,x,m]}],"backdrop-contrast":[{"backdrop-contrast":[j,x,m]}],"backdrop-grayscale":[{"backdrop-grayscale":["",j,x,m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j,x,m]}],"backdrop-invert":[{"backdrop-invert":["",j,x,m]}],"backdrop-opacity":[{"backdrop-opacity":[j,x,m]}],"backdrop-saturate":[{"backdrop-saturate":[j,x,m]}],"backdrop-sepia":[{"backdrop-sepia":["",j,x,m]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",x,m]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[j,"initial",x,m]}],ease:[{ease:["linear","initial",A,x,m]}],delay:[{delay:[j,x,m]}],animate:[{animate:["none",R,x,m]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,x,m]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[x,m,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],zoom:[{zoom:[Q,x,m]}],accent:[{accent:b()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:b()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",x,m]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":b()}],"scrollbar-track-color":[{"scrollbar-track":b()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mbs":[{"scroll-mbs":f()}],"scroll-mbe":[{"scroll-mbe":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pbs":[{"scroll-pbs":f()}],"scroll-pbe":[{"scroll-pbe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",x,m]}],fill:[{fill:["none",...b()]}],"stroke-w":[{stroke:[j,he,ne,ct]}],stroke:[{stroke:["none",...b()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gs=Hr(xs);function w(...e){return gs(Sr(e))}const fs={primary:"bg-indigo-600 hover:bg-indigo-500 text-white border-transparent shadow-sm shadow-indigo-600/30 font-medium active:scale-[0.98]",secondary:"bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-800 dark:text-slate-200 border-slate-200 dark:border-slate-700 active:scale-[0.98]",emerald:"bg-emerald-600 hover:bg-emerald-500 text-white border-transparent shadow-sm shadow-emerald-600/30 font-medium active:scale-[0.98]",danger:"bg-rose-600 hover:bg-rose-500 text-white border-transparent shadow-sm shadow-rose-600/30 font-medium active:scale-[0.98]",ghost:"bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white border-transparent",outline:"bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-300 border-slate-200 dark:border-slate-700"},bs={sm:"px-2.5 py-1.5 text-xs rounded-lg gap-1.5",md:"px-4 py-2 text-xs rounded-xl gap-2",lg:"px-5 py-2.5 text-sm rounded-xl gap-2.5 font-semibold"},Ce=({variant:e="primary",size:t="md",icon:r,iconPosition:s="left",loading:n=!1,children:o,className:c="",disabled:l,...h})=>a.jsx("button",{disabled:l||n,className:w("inline-flex items-center justify-center border transition-all duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100 select-none",fs[e],bs[t],c),...h,children:n?a.jsx("span",{className:"w-3.5 h-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):a.jsxs(a.Fragment,{children:[r&&s==="left"&&a.jsx("span",{className:"shrink-0",children:r}),o&&a.jsx("span",{children:o}),r&&s==="right"&&a.jsx("span",{className:"shrink-0",children:r})]})}),ks={default:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",primary:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",emerald:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400 border-emerald-200/50 dark:border-emerald-500/20",indigo:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",amber:"bg-amber-50 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400 border-amber-200/50 dark:border-amber-500/20",rose:"bg-rose-50 text-rose-700 dark:bg-rose-500/10 dark:text-rose-400 border-rose-200/50 dark:border-rose-500/20",slate:"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-300 border-slate-200 dark:border-slate-700/60",outline:"bg-transparent text-slate-600 dark:text-slate-400 border-slate-200 dark:border-slate-700"},ws={default:"bg-indigo-500",primary:"bg-indigo-500",emerald:"bg-emerald-500",indigo:"bg-indigo-500",amber:"bg-amber-500",rose:"bg-rose-500",slate:"bg-slate-400",outline:"bg-slate-400"},vs={xs:"px-1.5 py-0.5 text-[10px] rounded-md font-mono tracking-wider",sm:"px-2 py-0.5 text-xs rounded-lg font-mono",md:"px-2.5 py-1 text-xs rounded-lg font-medium"},Et=({variant:e="default",size:t="sm",dot:r=!1,children:s,className:n="",...o})=>a.jsxs("span",{className:w("inline-flex items-center gap-1.5 border font-medium select-none",ks[e],vs[t],n),...o,children:[r&&a.jsx("span",{className:w("w-1.5 h-1.5 rounded-full shrink-0",ws[e])}),s]}),Pt=({hover:e=!1,children:t,className:r="",...s})=>a.jsx("div",{className:w("bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl p-5",e&&"transition-all duration-150 hover:border-slate-300 dark:hover:border-slate-700/80",r),...s,children:t}),Dt=C.forwardRef(({error:e=!1,mono:t=!1,leftIcon:r,rightIcon:s,className:n="",disabled:o,...c},l)=>a.jsxs("div",{className:"relative flex items-center w-full",children:[r&&a.jsx("span",{className:"absolute left-3 text-slate-500 dark:text-slate-400 pointer-events-none shrink-0 flex items-center",children:r}),a.jsx("input",{ref:l,disabled:o,className:w("w-full px-3.5 py-2 text-xs rounded-xl border transition-all duration-150 outline-none","bg-slate-50/70 dark:bg-slate-900 focus:bg-white dark:focus:bg-slate-950 text-slate-900 dark:text-white","placeholder:text-slate-500 dark:placeholder:text-slate-400",t&&"font-mono tracking-tight",r&&"pl-9",s&&"pr-9",e?"border-rose-500 focus:border-rose-500 focus:ring-1 focus:ring-rose-500/30":"border-slate-300 dark:border-slate-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/20",o&&"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900/50",n),...c}),s&&a.jsx("span",{className:"absolute right-3 text-slate-500 dark:text-slate-400 pointer-events-none shrink-0 flex items-center",children:s})]}));Dt.displayName="Input";const Bt=C.forwardRef(({error:e=!1,mono:t=!1,className:r="",disabled:s,...n},o)=>a.jsx("textarea",{ref:o,disabled:s,className:w("w-full px-3.5 py-2.5 text-xs rounded-xl border transition-all duration-150 outline-none resize-y","bg-slate-50/70 dark:bg-slate-900 focus:bg-white dark:focus:bg-slate-950 text-slate-900 dark:text-white","placeholder:text-slate-400 dark:placeholder:text-slate-500",t&&"font-mono text-[11px] leading-relaxed",e?"border-rose-500 focus:border-rose-500 focus:ring-1 focus:ring-rose-500/30":"border-slate-200 dark:border-slate-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/20",s&&"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900/50",r),...n}));Bt.displayName="Textarea";/**
1
+ "use strict";var Ir=Object.defineProperty;var Pr=(e,t,r)=>t in e?Ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var P=(e,t,r)=>Pr(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),Ze=require("react-dom");function jt(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=jt(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Dr(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=jt(e))&&(s&&(s+=" "),s+=t);return s}const Br=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},Gr=(e,t)=>({classGroupId:e,validator:t}),Nt=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Re="-",it=[],Or="arbitrary..",qr=e=>{const t=Wr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Fr(d);const l=d.split(Re),c=l[0]===""&&l.length>1?1:0;return St(l,c,t)},getConflictingClassGroupIds:(d,l)=>{if(l){const c=s[d],i=r[d];return c?i?Br(i,c):c:i||it}return r[d]||it}}},St=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],a=r.nextPart.get(o);if(a){const i=St(e,t+1,a);if(i)return i}const d=r.validators;if(d===null)return;const l=t===0?e.join(Re):e.slice(t).join(Re),c=d.length;for(let i=0;i<c;i++){const h=d[i];if(h.validator(l))return h.classGroupId}},Fr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?Or+s:void 0})(),Wr=e=>{const{theme:t,classGroups:r}=e;return Zr(r,t)},Zr=(e,t)=>{const r=Nt();for(const s in e){const o=e[s];He(o,r,s,t)}return r},He=(e,t,r,s)=>{const o=e.length;for(let a=0;a<o;a++){const d=e[a];Hr(d,t,r,s)}},Hr=(e,t,r,s)=>{if(typeof e=="string"){Vr(e,t,r);return}if(typeof e=="function"){Ur(e,t,r,s);return}Qr(e,t,r,s)},Vr=(e,t,r)=>{const s=e===""?t:Ct(t,e);s.classGroupId=r},Ur=(e,t,r,s)=>{if(Kr(e)){He(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Gr(r,e))},Qr=(e,t,r,s)=>{const o=Object.entries(e),a=o.length;for(let d=0;d<a;d++){const[l,c]=o[d];He(c,Ct(t,l),r,s)}},Ct=(e,t)=>{let r=e;const s=t.split(Re),o=s.length;for(let a=0;a<o;a++){const d=s[a];let l=r.nextPart.get(d);l||(l=Nt(),r.nextPart.set(d,l)),r=l}return r},Kr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const o=(a,d)=>{r[a]=d,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(a){let d=r[a];if(d!==void 0)return d;if((d=s[a])!==void 0)return o(a,d),d},set(a,d){a in r?r[a]=d:o(a,d)}}},Ge="!",ct=":",Yr=[],dt=(e,t,r,s,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:o}),Jr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=o=>{const a=[];let d=0,l=0,c=0,i;const h=o.length;for(let v=0;v<h;v++){const S=o[v];if(d===0&&l===0){if(S===ct){a.push(o.slice(c,v)),c=v+1;continue}if(S==="/"){i=v;continue}}S==="["?d++:S==="]"?d--:S==="("?l++:S===")"&&l--}const g=a.length===0?o:o.slice(c);let u=g,j=!1;g.endsWith(Ge)?(u=g.slice(0,-1),j=!0):g.startsWith(Ge)&&(u=g.slice(1),j=!0);const p=i&&i>c?i-c:void 0;return dt(a,j,u,p)};if(t){const o=t+ct,a=s;s=d=>d.startsWith(o)?a(d.slice(o.length)):dt(Yr,!1,d,void 0,!0)}if(r){const o=s;s=a=>r({className:a,parseClassName:o})}return s},es=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let o=[];for(let a=0;a<r.length;a++){const d=r[a],l=d[0]==="[",c=t.has(d);l||c?(o.length>0&&(o.sort(),s.push(...o),o=[]),s.push(d)):o.push(d)}return o.length>0&&(o.sort(),s.push(...o)),s}},ts=e=>({cache:Xr(e.cacheSize),parseClassName:Jr(e),sortModifiers:es(e),postfixLookupClassGroupIds:rs(e),...qr(e)}),rs=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},ss=/\s+/,ns=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:a,postfixLookupClassGroupIds:d}=t,l=[],c=e.trim().split(ss);let i="";for(let h=c.length-1;h>=0;h-=1){const g=c[h],{isExternal:u,modifiers:j,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:S}=r(g);if(u){i=g+(i.length>0?" "+i:i);continue}let $=!!S,C;if($){const m=v.substring(0,S);C=s(m);const f=C&&d[C]?s(v):void 0;f&&f!==C&&(C=f,$=!1)}else C=s(v);if(!C){if(!$){i=g+(i.length>0?" "+i:i);continue}if(C=s(v),!C){i=g+(i.length>0?" "+i:i);continue}$=!1}const I=j.length===0?"":j.length===1?j[0]:a(j).join(":"),q=p?I+Ge:I,A=q+C;if(l.indexOf(A)>-1)continue;l.push(A);const L=o(C,$);for(let m=0;m<L.length;++m){const f=L[m];l.push(q+f)}i=g+(i.length>0?" "+i:i)}return i},os=(...e)=>{let t=0,r,s,o="";for(;t<e.length;)(r=e[t++])&&(s=zt(r))&&(o&&(o+=" "),o+=s);return o},zt=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=zt(e[s]))&&(r&&(r+=" "),r+=t);return r},as=(e,...t)=>{let r,s,o,a;const d=c=>{const i=t.reduce((h,g)=>g(h),e());return r=ts(i),s=r.cache.get,o=r.cache.set,a=l,l(c)},l=c=>{const i=s(c);if(i)return i;const h=ns(c,r);return o(c,h),h};return a=d,(...c)=>a(os(...c))},ls=[],W=e=>{const t=r=>r[e]||ls;return t.isThemeGetter=!0,t.themeKey=e,t},Rt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,At=/^\((?:(\w[\w-]*):)?(.+)\)$/i,is=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ds=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,us=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ps=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>is.test(e),R=e=>!!e&&!Number.isNaN(Number(e)),X=e=>!!e&&Number.isInteger(Number(e)),Ie=e=>e.endsWith("%")&&R(e.slice(0,-1)),te=e=>cs.test(e),$t=()=>!0,xs=e=>ds.test(e)&&!hs.test(e),Ve=()=>!1,ms=e=>us.test(e),bs=e=>ps.test(e),fs=e=>!k(e)&&!w(e),gs=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),ks=e=>ae(e,_t,Ve),k=e=>Rt.test(e),ie=e=>ae(e,Mt,xs),ht=e=>ae(e,zs,R),ws=e=>ae(e,It,$t),vs=e=>ae(e,Et,Ve),ut=e=>ae(e,Lt,Ve),ys=e=>ae(e,Tt,bs),Ne=e=>ae(e,Pt,ms),w=e=>At.test(e),xe=e=>he(e,Mt),js=e=>he(e,Et),pt=e=>he(e,Lt),Ns=e=>he(e,_t),Ss=e=>he(e,Tt),Se=e=>he(e,Pt,!0),Cs=e=>he(e,It,!0),ae=(e,t,r)=>{const s=Rt.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},he=(e,t,r=!1)=>{const s=At.exec(e);return s?s[1]?t(s[1]):r:!1},Lt=e=>e==="position"||e==="percentage",Tt=e=>e==="image"||e==="url",_t=e=>e==="length"||e==="size"||e==="bg-size",Mt=e=>e==="length",zs=e=>e==="number",Et=e=>e==="family-name",It=e=>e==="number"||e==="weight",Pt=e=>e==="shadow",Rs=()=>{const e=W("color"),t=W("font"),r=W("text"),s=W("font-weight"),o=W("tracking"),a=W("leading"),d=W("breakpoint"),l=W("container"),c=W("spacing"),i=W("radius"),h=W("shadow"),g=W("inset-shadow"),u=W("text-shadow"),j=W("drop-shadow"),p=W("blur"),v=W("perspective"),S=W("aspect"),$=W("ease"),C=W("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...q(),w,k],L=()=>["auto","hidden","clip","visible","scroll"],m=()=>["auto","contain","none"],f=()=>[w,k,c],B=()=>[oe,"full","auto",...f()],pe=()=>[X,"none","subgrid",w,k],ne=()=>["auto",{span:["full",X,w,k]},X,w,k],J=()=>[X,"auto",w,k],N=()=>["auto","min","max","fr",w,k],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...f()],H=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],K=()=>[l,oe,"screen","full","dvw","lvw","svw","min","max","fit",...f()],z=()=>[oe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...f()],b=()=>[e,w,k],V=()=>[...q(),pt,ut,{position:[w,k]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",Ns,ks,{size:[w,k]}],le=()=>[Ie,xe,ie],F=()=>["","none","full",i,w,k],U=()=>["",R,xe,ie],we=()=>["solid","dashed","dotted","double"],at=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[R,Ie,pt,ut],lt=()=>["","none",p,w,k],ve=()=>["none",R,w,k],ye=()=>["none",R,w,k],Ee=()=>[R,w,k],je=()=>[oe,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[te],breakpoint:[te],color:[$t],container:[te],"drop-shadow":[te],ease:["in","out","in-out"],font:[fs],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[te],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[te],shadow:[te],spacing:["px",R],text:[te],"text-shadow":[te],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,k,w,S]}],container:["container"],"container-type":[{"@container":["","normal","size",w,k]}],"container-named":[gs],columns:[{columns:[R,"auto",k,w,l]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:m()}],"overscroll-x":[{"overscroll-x":m()}],"overscroll-y":[{"overscroll-y":m()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[X,"auto",w,k]}],basis:[{basis:[oe,"full","auto",l,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[R,oe,"auto","initial","none",k]}],grow:[{grow:["",R,w,k]}],shrink:[{shrink:["",R,w,k]}],order:[{order:[X,"first","last","none",w,k]}],"grid-cols":[{"grid-cols":pe()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":pe()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pbs:[{pbs:f()}],pbe:[{pbe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...z()]}],"min-block-size":[{"min-block":["auto",...z()]}],"max-block-size":[{"max-block":["none",...z()]}],w:[{w:[l,"screen",...H()]}],"min-w":[{"min-w":[l,"screen","none",...H()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[d]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh","none",...H()]}],"font-size":[{text:["base",r,xe,ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Cs,ws]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ie,k]}],"font-family":[{font:[js,vs,t]}],"font-features":[{"font-features":[k]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,w,k]}],"line-clamp":[{"line-clamp":[R,"none",w,ht]}],leading:[{leading:["none",a,...f()]}],"list-image":[{"list-image":["none",w,k]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",w,k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:b()}],"text-color":[{text:b()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[R,"from-font","auto",w,ie]}],"text-decoration-color":[{decoration:b()}],"underline-offset":[{"underline-offset":[R,"auto",w,k]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"tab-size":[{tab:[X,w,k]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w,k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w,k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},X,w,k],radial:["",w,k],conic:["",X,w,k]},Ss,ys]}],"bg-color":[{bg:b()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:b()}],"gradient-via":[{via:b()}],"gradient-to":[{to:b()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-bs":[{"border-bs":U()}],"border-w-be":[{"border-be":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:b()}],"border-color-x":[{"border-x":b()}],"border-color-y":[{"border-y":b()}],"border-color-s":[{"border-s":b()}],"border-color-e":[{"border-e":b()}],"border-color-bs":[{"border-bs":b()}],"border-color-be":[{"border-be":b()}],"border-color-t":[{"border-t":b()}],"border-color-r":[{"border-r":b()}],"border-color-b":[{"border-b":b()}],"border-color-l":[{"border-l":b()}],"divide-color":[{divide:b()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[R,w,k]}],"outline-w":[{outline:["",R,xe,ie]}],"outline-color":[{outline:b()}],shadow:[{shadow:["","inner","none",h,Se,Ne]}],"shadow-color":[{shadow:b()}],"inset-shadow":[{"inset-shadow":["none",g,Se,Ne]}],"inset-shadow-color":[{"inset-shadow":b()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:b()}],"ring-offset-w":[{"ring-offset":[R,ie]}],"ring-offset-color":[{"ring-offset":b()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":b()}],"text-shadow":[{"text-shadow":["none",u,Se,Ne]}],"text-shadow-color":[{"text-shadow":b()}],opacity:[{opacity:[R,w,k]}],"mix-blend":[{"mix-blend":[...at(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":at()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[R]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":b()}],"mask-image-linear-to-color":[{"mask-linear-to":b()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":b()}],"mask-image-t-to-color":[{"mask-t-to":b()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":b()}],"mask-image-r-to-color":[{"mask-r-to":b()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":b()}],"mask-image-b-to-color":[{"mask-b-to":b()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":b()}],"mask-image-l-to-color":[{"mask-l-to":b()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":b()}],"mask-image-x-to-color":[{"mask-x-to":b()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":b()}],"mask-image-y-to-color":[{"mask-y-to":b()}],"mask-image-radial":[{"mask-radial":[w,k]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":b()}],"mask-image-radial-to-color":[{"mask-radial-to":b()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":q()}],"mask-image-conic-pos":[{"mask-conic":[R]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":b()}],"mask-image-conic-to-color":[{"mask-conic-to":b()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",w,k]}],filter:[{filter:["","none",w,k]}],blur:[{blur:lt()}],brightness:[{brightness:[R,w,k]}],contrast:[{contrast:[R,w,k]}],"drop-shadow":[{"drop-shadow":["","none",j,Se,Ne]}],"drop-shadow-color":[{"drop-shadow":b()}],grayscale:[{grayscale:["",R,w,k]}],"hue-rotate":[{"hue-rotate":[R,w,k]}],invert:[{invert:["",R,w,k]}],saturate:[{saturate:[R,w,k]}],sepia:[{sepia:["",R,w,k]}],"backdrop-filter":[{"backdrop-filter":["","none",w,k]}],"backdrop-blur":[{"backdrop-blur":lt()}],"backdrop-brightness":[{"backdrop-brightness":[R,w,k]}],"backdrop-contrast":[{"backdrop-contrast":[R,w,k]}],"backdrop-grayscale":[{"backdrop-grayscale":["",R,w,k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R,w,k]}],"backdrop-invert":[{"backdrop-invert":["",R,w,k]}],"backdrop-opacity":[{"backdrop-opacity":[R,w,k]}],"backdrop-saturate":[{"backdrop-saturate":[R,w,k]}],"backdrop-sepia":[{"backdrop-sepia":["",R,w,k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",w,k]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[R,"initial",w,k]}],ease:[{ease:["linear","initial",$,w,k]}],delay:[{delay:[R,w,k]}],animate:[{animate:["none",C,w,k]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,w,k]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[w,k,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],zoom:[{zoom:[X,w,k]}],accent:[{accent:b()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:b()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w,k]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":b()}],"scrollbar-track-color":[{"scrollbar-track":b()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mbs":[{"scroll-mbs":f()}],"scroll-mbe":[{"scroll-mbe":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pbs":[{"scroll-pbs":f()}],"scroll-pbe":[{"scroll-pbe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w,k]}],fill:[{fill:["none",...b()]}],"stroke-w":[{stroke:[R,xe,ie,ht]}],stroke:[{stroke:["none",...b()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},As=as(Rs);function x(...e){return As(Dr(e))}const $s={primary:"bg-indigo-600 hover:bg-indigo-500 text-white border-transparent shadow-sm shadow-indigo-600/30 font-medium active:scale-[0.98]",secondary:"bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-800 dark:text-slate-200 border-slate-200 dark:border-slate-700 active:scale-[0.98]",emerald:"bg-emerald-600 hover:bg-emerald-500 text-white border-transparent shadow-sm shadow-emerald-600/30 font-medium active:scale-[0.98]",amber:"bg-amber-500 hover:bg-amber-400 text-slate-950 border-transparent shadow-sm shadow-amber-500/25 font-semibold active:scale-[0.98]",danger:"bg-rose-600 hover:bg-rose-500 text-white border-transparent shadow-sm shadow-rose-600/30 font-medium active:scale-[0.98]",ghost:"bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white border-transparent",outline:"bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-300 border-slate-200 dark:border-slate-700"},Ls={sm:"px-2.5 py-1.5 text-xs rounded-lg gap-1.5",md:"px-4 py-2 text-xs rounded-xl gap-2",lg:"px-5 py-2.5 text-sm rounded-xl gap-2.5 font-semibold"},Ae=({variant:e="primary",size:t="md",icon:r,iconPosition:s="left",loading:o=!1,children:a,className:d="",disabled:l,...c})=>n.jsx("button",{disabled:l||o,className:x("inline-flex items-center justify-center whitespace-nowrap border transition-all duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100 select-none",$s[e],Ls[t],d),...c,children:o?n.jsx("span",{className:"w-3.5 h-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):n.jsxs(n.Fragment,{children:[r&&s==="left"&&n.jsx("span",{className:"inline-flex items-center justify-center shrink-0",children:r}),a&&n.jsx("span",{className:"inline-flex items-center justify-center gap-1.5",children:a}),r&&s==="right"&&n.jsx("span",{className:"inline-flex items-center justify-center shrink-0",children:r})]})}),Ts={default:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",primary:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",emerald:"bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400 border-emerald-200/50 dark:border-emerald-500/20",indigo:"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-400 border-indigo-200/50 dark:border-indigo-500/20",amber:"bg-amber-50 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400 border-amber-200/50 dark:border-amber-500/20",rose:"bg-rose-50 text-rose-700 dark:bg-rose-500/10 dark:text-rose-400 border-rose-200/50 dark:border-rose-500/20",slate:"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-300 border-slate-200 dark:border-slate-700/60",outline:"bg-transparent text-slate-600 dark:text-slate-400 border-slate-200 dark:border-slate-700"},_s={default:"bg-indigo-500",primary:"bg-indigo-500",emerald:"bg-emerald-500",indigo:"bg-indigo-500",amber:"bg-amber-500",rose:"bg-rose-500",slate:"bg-slate-400",outline:"bg-slate-400"},Ms={xs:"px-1.5 py-0.5 text-[10px] rounded-md font-mono tracking-wider",sm:"px-2 py-0.5 text-xs rounded-lg font-mono",md:"px-2.5 py-1 text-xs rounded-lg font-medium"},Dt=({variant:e="default",size:t="sm",dot:r=!1,children:s,className:o="",...a})=>n.jsxs("span",{className:x("inline-flex items-center gap-1.5 border font-medium select-none",Ts[e],Ms[t],o),...a,children:[r&&n.jsx("span",{className:x("w-1.5 h-1.5 rounded-full shrink-0",_s[e])}),s]}),Bt=({hover:e=!1,children:t,className:r="",...s})=>n.jsx("div",{className:x("bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl p-5",e&&"transition-all duration-150 hover:border-slate-300 dark:hover:border-slate-700/80",r),...s,children:t}),Gt=y.forwardRef(({error:e=!1,mono:t=!1,leftIcon:r,rightIcon:s,className:o="",disabled:a,...d},l)=>n.jsxs("div",{className:"relative flex items-center w-full",children:[r&&n.jsx("span",{className:"absolute left-3 text-slate-500 dark:text-slate-400 pointer-events-none shrink-0 flex items-center",children:r}),n.jsx("input",{ref:l,disabled:a,className:x("w-full px-3.5 py-2 text-xs rounded-xl border transition-all duration-150 outline-none","bg-slate-50/70 dark:bg-slate-900 focus:bg-white dark:focus:bg-slate-950 text-slate-900 dark:text-white","placeholder:text-slate-500 dark:placeholder:text-slate-400",t&&"font-mono tracking-tight",r&&"pl-9",s&&"pr-9",e?"border-rose-500 focus:border-rose-500 focus:ring-1 focus:ring-rose-500/30":"border-slate-300 dark:border-slate-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/20",a&&"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900/50",o),...d}),s&&n.jsx("span",{className:"absolute right-3 text-slate-500 dark:text-slate-400 pointer-events-none shrink-0 flex items-center",children:s})]}));Gt.displayName="Input";const Ot=y.forwardRef(({error:e=!1,mono:t=!1,className:r="",disabled:s,...o},a)=>n.jsx("textarea",{ref:a,disabled:s,className:x("w-full px-3.5 py-2.5 text-xs rounded-xl border transition-all duration-150 outline-none resize-y","bg-slate-50/70 dark:bg-slate-900 focus:bg-white dark:focus:bg-slate-950 text-slate-900 dark:text-white","placeholder:text-slate-400 dark:placeholder:text-slate-500",t&&"font-mono text-[11px] leading-relaxed",e?"border-rose-500 focus:border-rose-500 focus:ring-1 focus:ring-rose-500/30":"border-slate-200 dark:border-slate-800 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/20",s&&"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900/50",r),...o}));Ot.displayName="Textarea";/**
2
2
  * @license lucide-react v1.58.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const ys=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
6
+ */const Es=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
7
7
  * @license lucide-react v1.58.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */function js(e,t,r=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:ys(e),size:24,node:t,...r.length>0?{aliases:r}:{}}}/**
11
+ */function Is(e,t,r=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Es(e),size:24,node:t,...r.length>0?{aliases:r}:{}}}/**
12
12
  * @license lucide-react v1.58.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Ns=e=>{let t="",r=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){r=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t};/**
16
+ */const Ps=e=>{let t="",r=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){r=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=r?s.toUpperCase():s,r=!1}return t};/**
17
17
  * @license lucide-react v1.58.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Ss=e=>{const t=Ns(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
21
+ */const Ds=e=>{const t=Ps(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
22
  * @license lucide-react v1.58.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const De=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();/**
26
+ */const Oe=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();/**
27
27
  * @license lucide-react v1.58.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const oe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
31
+ */const ce={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
32
32
  * @license lucide-react v1.58.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */function Me(e){return e!=null}function Cs(e,t={}){var u,v;const r=t.attributeNames??{},s=p=>r[p]??p,n=e.size??e.width??oe.width,o=e.size??e.height??oe.height,c=((u=e.aliases)==null?void 0:u.filter(p=>typeof p=="string"&&p.trim()!=="").map(p=>`lucide-${p}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...c],h=((v=t.className)==null?void 0:v.split(" ").filter(Boolean))??[],i=t.includeDefaultClasses===!1?De(...h):De("lucide",...l,...h),d=t.absoluteStrokeWidth?Number(t.strokeWidth??oe["stroke-width"])*Number(e.size??e.width??oe.width)/Number(t.size??t.width??oe.width):t.strokeWidth??oe["stroke-width"];return["svg",{...Object.entries(oe).reduce((p,[k,z])=>(p[s(k)]=z,p),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&Me(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&Me(t.width)&&{[s("width")]:t.width},..."height"in t&&Me(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:d,...i&&{[s("class")]:i},[s("viewBox")]:`0 0 ${n} ${o}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(p=>{const[k,z,A]=p,R=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...z}:z;return A?[k,R,A]:[k,R]})]}/**
36
+ */function Pe(e){return e!=null}function Bs(e,t={}){var u,j;const r=t.attributeNames??{},s=p=>r[p]??p,o=e.size??e.width??ce.width,a=e.size??e.height??ce.height,d=((u=e.aliases)==null?void 0:u.filter(p=>typeof p=="string"&&p.trim()!=="").map(p=>`lucide-${p}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...d],c=((j=t.className)==null?void 0:j.split(" ").filter(Boolean))??[],i=t.includeDefaultClasses===!1?Oe(...c):Oe("lucide",...l,...c),h=t.absoluteStrokeWidth?Number(t.strokeWidth??ce["stroke-width"])*Number(e.size??e.width??ce.width)/Number(t.size??t.width??ce.width):t.strokeWidth??ce["stroke-width"];return["svg",{...Object.entries(ce).reduce((p,[v,S])=>(p[s(v)]=S,p),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&Pe(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&Pe(t.width)&&{[s("width")]:t.width},..."height"in t&&Pe(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:h,...i&&{[s("class")]:i},[s("viewBox")]:`0 0 ${o} ${a}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(p=>{const[v,S,$]=p,C=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...S}:S;return $?[v,C,$]:[v,C]})]}/**
37
37
  * @license lucide-react v1.58.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */function zs(e,t={}){return Cs(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
41
+ */function Gs(e,t={}){return Bs(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
42
42
  * @license lucide-react v1.58.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Rs=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},$s=C.createContext({}),As=()=>C.useContext($s),Ls=C.forwardRef(({color:e,size:t,width:r,height:s,strokeWidth:n,absoluteStrokeWidth:o,nonScalingStroke:c,className:l="",children:h,iconNode:i=[],icon:d={node:i,aliases:[],size:24},...g},u)=>{const{size:v=24,strokeWidth:p=2,absoluteStrokeWidth:k=!1,nonScalingStroke:z=!1,color:A="currentColor",className:R=""}=As()??{},E=!!h||Rs(g),[I,L,N=[]]=zs(d,{color:e??A,width:r??t??v,height:s??t??v,strokeWidth:n??p,absoluteStrokeWidth:o??k,nonScalingStroke:c??z,className:De(R,l),hasA11yProp:E,attributes:g});return C.createElement(I,{ref:u,...L},[...N.map(([P,f])=>C.createElement(P,f)),...Array.isArray(h)?h:[h]])});/**
46
+ */const Os=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},qs=y.createContext({}),Fs=()=>y.useContext(qs),Ws=y.forwardRef(({color:e,size:t,width:r,height:s,strokeWidth:o,absoluteStrokeWidth:a,nonScalingStroke:d,className:l="",children:c,iconNode:i=[],icon:h={node:i,aliases:[],size:24},...g},u)=>{const{size:j=24,strokeWidth:p=2,absoluteStrokeWidth:v=!1,nonScalingStroke:S=!1,color:$="currentColor",className:C=""}=Fs()??{},I=!!c||Os(g),[q,A,L=[]]=Gs(h,{color:e??$,width:r??t??j,height:s??t??j,strokeWidth:o??p,absoluteStrokeWidth:a??v,nonScalingStroke:d??S,className:Oe(C,l),hasA11yProp:I,attributes:g});return y.createElement(q,{ref:u,...A},[...L.map(([m,f])=>y.createElement(m,f)),...Array.isArray(c)?c:[c]])});/**
47
47
  * @license lucide-react v1.58.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */function O(e,t=[],r=[]){const s=typeof e=="string"?js(e,t,r):e,n=C.forwardRef(({className:o,...c},l)=>C.createElement(Ls,{ref:l,icon:s,className:o,...c}));return s.name&&(n.displayName=Ss(s.name)),n}/**
51
+ */function O(e,t=[],r=[]){const s=typeof e=="string"?Is(e,t,r):e,o=y.forwardRef(({className:a,...d},l)=>y.createElement(Ws,{ref:l,icon:s,className:a,...d}));return s.name&&(o.displayName=Ds(s.name)),o}/**
52
52
  * @license lucide-react v1.58.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const Gt={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};Gt.node;const ut=O(Gt);/**
56
+ */const qt={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};qt.node;const xt=O(qt);/**
57
57
  * @license lucide-react v1.58.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Ot={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};Ot.node;const _s=O(Ot);/**
61
+ */const Ft={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};Ft.node;const Zs=O(Ft);/**
62
62
  * @license lucide-react v1.58.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const qt={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};qt.node;const Ts=O(qt);/**
66
+ */const Wt={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Wt.node;const Zt=O(Wt);/**
67
67
  * @license lucide-react v1.58.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Ft={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};Ft.node;const Wt=O(Ft);/**
71
+ */const Ht={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};Ht.node;const Vt=O(Ht);/**
72
72
  * @license lucide-react v1.58.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Zt={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Zt.node;const We=O(Zt);/**
76
+ */const Ut={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Ut.node;const Ue=O(Ut);/**
77
77
  * @license lucide-react v1.58.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Vt={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};Vt.node;const Is=O(Vt);/**
81
+ */const Qt={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};Qt.node;const Hs=O(Qt);/**
82
82
  * @license lucide-react v1.58.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const Ht={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Ht.node;const Ut=O(Ht);/**
86
+ */const Kt={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Kt.node;const Xt=O(Kt);/**
87
87
  * @license lucide-react v1.58.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const Qt={name:"circle-alert",size:24,node:[["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"}]],aliases:["alert-circle"]};Qt.node;const Ms=O(Qt);/**
91
+ */const Yt={name:"circle-alert",size:24,node:[["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"}]],aliases:["alert-circle"]};Yt.node;const Vs=O(Yt);/**
92
92
  * @license lucide-react v1.58.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const Kt={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};Kt.node;const Es=O(Kt);/**
96
+ */const Jt={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};Jt.node;const Us=O(Jt);/**
97
97
  * @license lucide-react v1.58.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const Xt={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Xt.node;const pt=O(Xt);/**
101
+ */const er={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};er.node;const mt=O(er);/**
102
102
  * @license lucide-react v1.58.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Yt={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};Yt.node;const Ps=O(Yt);/**
106
+ */const tr={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};tr.node;const bt=O(tr);/**
107
107
  * @license lucide-react v1.58.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const Jt={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Jt.node;const Ds=O(Jt);/**
111
+ */const rr={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};rr.node;const Qs=O(rr);/**
112
112
  * @license lucide-react v1.58.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const er={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};er.node;const Bs=O(er);/**
116
+ */const sr={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};sr.node;const Ks=O(sr);/**
117
117
  * @license lucide-react v1.58.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const tr={name:"panel-left-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],aliases:["sidebar-close"]};tr.node;const Gs=O(tr);/**
121
+ */const nr={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};nr.node;const Xs=O(nr);/**
122
122
  * @license lucide-react v1.58.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const rr={name:"panel-left-open",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],aliases:["sidebar-open"]};rr.node;const Os=O(rr);/**
126
+ */const or={name:"panel-left-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],aliases:["sidebar-close"]};or.node;const Ys=O(or);/**
127
127
  * @license lucide-react v1.58.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const sr={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};sr.node;const qs=O(sr);/**
131
+ */const ar={name:"panel-left-open",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],aliases:["sidebar-open"]};ar.node;const Js=O(ar);/**
132
132
  * @license lucide-react v1.58.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const nr={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};nr.node;const Fs=O(nr);/**
136
+ */const lr={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};lr.node;const en=O(lr);/**
137
137
  * @license lucide-react v1.58.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const or={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};or.node;const Ws=O(or);/**
141
+ */const ir={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};ir.node;const tn=O(ir);/**
142
142
  * @license lucide-react v1.58.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const ar={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};ar.node;const lr=O(ar);/**
146
+ */const cr={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};cr.node;const rn=O(cr);/**
147
147
  * @license lucide-react v1.58.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const ir={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};ir.node;const Ze=O(ir),Zs=({value:e,defaultValue:t,onChange:r,onValueChange:s,options:n,children:o,placeholder:c="Seleccionar...",label:l,error:h,helperText:i,icon:d,className:g="",buttonClassName:u="",dropdownClassName:v="",disabled:p=!1,name:k,id:z,size:A="md"})=>{var S;const[R,E]=C.useState(!1),I=C.useRef(null),L=C.useMemo(()=>{if(n&&n.length>0)return n;const y=[];return C.Children.forEach(o,T=>{C.isValidElement(T)&&y.push({value:String(T.props.value??""),label:T.props.children||T.props.value||"",disabled:!!T.props.disabled})}),y},[n,o]),[N,P]=C.useState(e!==void 0?e:t!==void 0?t:((S=L[0])==null?void 0:S.value)||""),f=e!==void 0?e:N,D=L.find(y=>String(y.value)===String(f));C.useEffect(()=>{if(!R)return;const y=B=>{I.current&&!I.current.contains(B.target)&&E(!1)},T=B=>{B.key==="Escape"&&E(!1)};return document.addEventListener("mousedown",y),document.addEventListener("touchstart",y),document.addEventListener("keydown",T),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("touchstart",y),document.removeEventListener("keydown",T)}},[R]);const te=y=>{y.disabled||p||(P(y.value),E(!1),r&&r({target:{value:y.value,name:k}}),s&&s(y.value))},ce=A==="sm";return a.jsxs("div",{ref:I,className:w("relative text-left",g),id:z,children:[l&&a.jsx("label",{className:"block text-xs font-mono font-medium text-slate-700 dark:text-slate-300 mb-1",children:l}),a.jsxs("button",{type:"button",disabled:p,onClick:()=>!p&&E(y=>!y),className:w("w-full flex items-center justify-between gap-2 transition-all cursor-pointer font-mono",ce?"px-2.5 py-1.5 text-xs rounded-lg":"px-3 py-2 text-xs rounded-xl","bg-slate-100 dark:bg-slate-900 border",h?"border-rose-500 focus:border-rose-500 focus:ring-rose-500/20":R?"border-indigo-500 ring-2 ring-indigo-500/20 dark:border-indigo-500":"border-slate-200 dark:border-slate-800 hover:border-slate-300 dark:hover:border-slate-700",p&&"opacity-50 cursor-not-allowed","text-slate-800 dark:text-slate-200 focus:outline-none",u),children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0 truncate",children:[d&&a.jsx("span",{className:"text-slate-400 shrink-0",children:d}),(D==null?void 0:D.icon)&&a.jsx("span",{className:"shrink-0",children:D.icon}),a.jsx("span",{className:"truncate",children:D?D.label:c})]}),a.jsx(We,{className:w("w-3.5 h-3.5 text-slate-400 transition-transform duration-200 shrink-0",R&&"rotate-180 text-indigo-500")})]}),R&&a.jsx("div",{className:w("absolute left-0 mt-1 w-full min-w-[180px] max-h-64 overflow-y-auto z-50 rounded-xl bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 shadow-xl shadow-black/30 dark:shadow-black/60 p-1 font-mono text-xs animate-in fade-in zoom-in-95 duration-100",v),children:L.length===0?a.jsx("div",{className:"px-3 py-2 text-slate-400 text-center text-[11px]",children:"No hay opciones"}):L.map(y=>{const T=String(y.value)===String(f);return a.jsxs("button",{type:"button",disabled:y.disabled,onClick:()=>te(y),className:w("w-full flex items-center justify-between gap-2 px-3 py-2 rounded-lg text-left transition-colors cursor-pointer",y.disabled?"opacity-40 cursor-not-allowed":T?"bg-indigo-50 dark:bg-indigo-950/50 text-indigo-600 dark:text-indigo-400 font-bold":"text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800/80 hover:text-slate-900 dark:hover:text-white"),children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0 truncate",children:[y.icon&&a.jsx("span",{className:"shrink-0",children:y.icon}),a.jsx("span",{className:"truncate",children:y.label})]}),T&&a.jsx(Ts,{className:"w-3.5 h-3.5 text-indigo-500 shrink-0 ml-2"})]},y.value)})}),h?a.jsx("p",{className:"text-[11px] font-mono text-rose-500 mt-1",children:h}):i?a.jsx("p",{className:"text-[11px] font-mono text-slate-500 mt-1",children:i}):null]})},Vs=({checked:e,onChange:t,disabled:r=!1,size:s="md",className:n=""})=>a.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:r,onClick:()=>t(!e),className:w("relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500/20 disabled:cursor-not-allowed disabled:opacity-40",s==="sm"?"h-5 w-9":"h-6 w-11",e?"bg-indigo-600":"bg-slate-200 dark:bg-slate-700",n),children:a.jsx("span",{"aria-hidden":"true",className:w("pointer-events-none inline-block transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out",s==="sm"?"h-4 w-4 mt-0.5":"h-5 w-5 mt-0.5",e?s==="sm"?"translate-x-4 ml-0.5":"translate-x-5 ml-0.5":"translate-x-0 ml-0.5")})}),Hs=({status:e="pending",onChange:t,compact:r=!1,fullWidth:s=!1})=>{const n={pending:"ready",ready:"published",published:"pending"},o=h=>{h.stopPropagation();const i=n[e]||"pending";t(i)},c={pending:{label:"Pendiente",nextLabel:"Generado",icon:pt,classes:"bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/30",iconColor:"text-amber-500"},ready:{label:"Generado",nextLabel:"Publicado",icon:Fs,classes:"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-600 dark:text-indigo-400 border-indigo-500/30",iconColor:"text-indigo-400"},published:{label:"Publicado",nextLabel:"Pendiente",icon:Wt,classes:"bg-emerald-500/10 hover:bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 border-emerald-500/30",iconColor:"text-emerald-400"}}[e]||{label:"Pendiente",nextLabel:"Generado",icon:pt,classes:"bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/30",iconColor:"text-amber-500"},l=c.icon;return a.jsxs("button",{type:"button",onClick:o,title:`Estado actual: ${c.label} (clic para alternar a ${c.nextLabel})`,className:`${s?"w-full justify-between":"inline-flex"} items-center gap-2 px-3 py-1.5 rounded-xl border text-xs font-mono font-bold transition-all shadow-xs cursor-pointer active:scale-95 ${c.classes}`,children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(l,{className:`w-3.5 h-3.5 ${c.iconColor} shrink-0`}),!r&&a.jsx("span",{children:c.label})]}),a.jsx("span",{className:"text-[10px] opacity-60 font-mono tracking-tighter",children:"⇄"})]})},Us={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},cr=({isOpen:e,onClose:t,children:r,size:s="2xl",className:n="",closeOnBackdropClick:o=!0,asForm:c=!1,onSubmit:l})=>{if(C.useEffect(()=>{if(!e)return;const d=g=>{g.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,t]),C.useEffect(()=>{if(e){const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}}},[e]),!e)return null;const h=w("bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-3xl w-full max-h-[90vh] md:max-h-[85vh] flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-200",Us[s],n),i=c||!!l;return wt.createPortal(a.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/75 dark:bg-black/85 backdrop-blur-sm flex items-center justify-center p-3 sm:p-4 select-none animate-in fade-in duration-200",onClick:d=>{o&&d.target===d.currentTarget&&t()},children:i?a.jsx("form",{onSubmit:l,className:h,children:r}):a.jsx("div",{className:h,children:r})}),document.body)},dr=({title:e,subtitle:t,icon:r,onClose:s,action:n,className:o=""})=>a.jsxs("div",{className:w("px-6 py-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50/90 dark:bg-slate-900/60 shrink-0 select-none",o),children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r&&a.jsx("div",{className:"p-2.5 rounded-xl bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 shrink-0",children:r}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h3",{className:"text-base font-bold text-slate-900 dark:text-white leading-tight truncate",children:e}),t&&a.jsx("div",{className:"text-xs font-mono text-slate-600 dark:text-slate-400 mt-0.5 truncate font-medium",children:t})]})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n,s&&a.jsx("button",{type:"button",onClick:s,className:"p-1.5 rounded-xl text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer",title:"Cerrar (Esc)",children:a.jsx(Ze,{className:"w-5 h-5"})})]})]}),Ve=({children:e,className:t="",noPadding:r=!1})=>a.jsx("div",{className:w("flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",r?"":"p-6",t),children:e}),Qs=Ve,hr=({children:e,className:t=""})=>a.jsx("div",{className:w("px-6 py-4 border-t border-slate-200 dark:border-slate-800 bg-slate-50/90 dark:bg-slate-900/60 flex items-center justify-end gap-3 shrink-0 select-none",t),children:e}),Ks={sm:"w-3.5 h-3.5 border-2",md:"w-5 h-5 border-2",lg:"w-8 h-8 border-3"},Xs=({size:e="md",className:t=""})=>a.jsx("div",{role:"status",className:w("rounded-full border-current border-t-transparent animate-spin text-indigo-500 shrink-0 inline-block",Ks[e],t),children:a.jsx("span",{className:"sr-only",children:"Cargando..."})}),Ys=({name:e,size:t=18,className:r="",...s})=>{switch(e){case"github":return a.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:w("shrink-0",r),...s,children:[a.jsx("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),a.jsx("path",{d:"M9 18c-4.51 2-5-2-7-2"})]});case"linkedin":return a.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:w("shrink-0",r),...s,children:[a.jsx("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),a.jsx("rect",{width:"4",height:"12",x:"2",y:"9"}),a.jsx("circle",{cx:"4",cy:"4",r:"2"})]});case"whatsapp":return a.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:w("shrink-0",r),...s,children:a.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"})});default:return null}},Js=({label:e,error:t,helperText:r,required:s=!1,className:n="",children:o})=>a.jsxs("div",{className:w("space-y-1.5 text-left w-full",n),children:[e&&a.jsxs("label",{className:"block text-xs font-mono font-semibold text-slate-800 dark:text-slate-200",children:[e," ",s&&a.jsx("span",{className:"text-rose-500 font-bold",children:"*"})]}),o,t?a.jsx("p",{className:"text-[11px] font-mono text-rose-600 dark:text-rose-400 font-medium",children:t}):r?a.jsx("p",{className:"text-[11px] font-mono text-slate-600 dark:text-slate-400 font-medium",children:r}):null]}),en=({value:e,onChange:t,placeholder:r="Buscar...",className:s="",onClear:n,autoFocus:o=!1})=>a.jsxs("div",{className:w("relative flex items-center w-full",s),children:[a.jsx(qs,{className:"w-4 h-4 text-slate-500 dark:text-slate-400 absolute left-3.5 pointer-events-none shrink-0"}),a.jsx("input",{type:"text",value:e,onChange:c=>t(c.target.value),placeholder:r,autoFocus:o,className:w("w-full pl-10 pr-9 py-2 text-xs rounded-xl border transition-all duration-150 outline-none","bg-slate-100/80 dark:bg-slate-900 border-slate-300 dark:border-slate-800","text-slate-900 dark:text-white placeholder:text-slate-500 dark:placeholder:text-slate-400","focus:border-indigo-500 focus:bg-white dark:focus:bg-slate-950 focus:ring-1 focus:ring-indigo-500/20")}),e&&a.jsx("button",{type:"button",onClick:()=>{t(""),n&&n()},className:"absolute right-2.5 p-1 rounded-lg text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-200/60 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:a.jsx(Ze,{className:"w-3.5 h-3.5"})})]}),tn=({isOpen:e,onClose:t,onConfirm:r,title:s,message:n,confirmText:o="Confirmar",cancelText:c="Cancelar",variant:l="danger",loading:h=!1})=>a.jsxs(cr,{isOpen:e,onClose:t,size:"sm",children:[a.jsx(dr,{title:s,icon:a.jsx(lr,{className:`w-5 h-5 ${l==="danger"?"text-rose-500":l==="warning"?"text-amber-500":"text-indigo-500"}`}),onClose:t}),a.jsx(Ve,{children:a.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400 leading-relaxed",children:n})}),a.jsxs(hr,{children:[a.jsx(Ce,{variant:"ghost",size:"sm",onClick:t,disabled:h,children:c}),a.jsx(Ce,{variant:l==="danger"?"danger":"primary",size:"sm",onClick:r,loading:h,children:o})]})]}),rn=({icon:e,title:t,description:r,actionText:s,onAction:n,className:o=""})=>a.jsxs("div",{className:w("flex flex-col items-center justify-center text-center p-10 border border-dashed border-slate-200 dark:border-slate-800 rounded-3xl",o),children:[e&&a.jsx("div",{className:"w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800/80 text-slate-400 dark:text-slate-500 flex items-center justify-center mb-4",children:e}),a.jsx("h4",{className:"text-sm font-bold text-slate-800 dark:text-slate-200 mb-1",children:t}),a.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 max-w-sm mb-4 leading-relaxed",children:r}),s&&n&&a.jsx(Ce,{variant:"primary",size:"sm",onClick:n,children:s})]}),sn=({label:e,value:t,subtitle:r,icon:s,iconColor:n="text-indigo-500 bg-indigo-500/10",className:o=""})=>a.jsxs(Pt,{hover:!0,className:w("flex items-center justify-between p-4",o),children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-[11px] font-mono font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider",children:e}),a.jsx("p",{className:"text-2xl font-bold font-mono text-slate-900 dark:text-white tracking-tight",children:t}),r&&a.jsx("p",{className:"text-[11px] font-mono text-slate-600 dark:text-slate-400 font-medium",children:r})]}),s&&a.jsx("div",{className:w("p-3 rounded-2xl shrink-0 flex items-center justify-center",n),children:s})]}),nn=({items:e,className:t})=>a.jsx("div",{className:w("w-full bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800/90 rounded-2xl overflow-hidden shadow-xs",t),children:a.jsx("div",{className:w("grid grid-cols-1 divide-y divide-slate-100 dark:divide-slate-800/70",e.length===2&&"sm:grid-cols-2 sm:divide-y-0 sm:divide-x",e.length===3&&"sm:grid-cols-3 sm:divide-y-0 sm:divide-x",e.length>=4&&"sm:grid-cols-2 lg:grid-cols-4 sm:divide-y-0 sm:divide-x"),children:e.map((r,s)=>{const n=r.icon;return a.jsxs("div",{className:"p-4 sm:p-5 flex flex-col justify-between space-y-2 hover:bg-slate-50/50 dark:hover:bg-slate-900/30 transition-colors",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-[11px] font-mono uppercase tracking-wider text-slate-700 dark:text-slate-300 font-bold truncate",children:r.label}),n&&a.jsx("div",{className:w("p-1.5 rounded-lg shrink-0",r.color==="emerald"&&"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",r.color==="indigo"&&"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",r.color==="amber"&&"bg-amber-500/10 text-amber-600 dark:text-amber-400",r.color==="rose"&&"bg-rose-500/10 text-rose-600 dark:text-rose-400",(!r.color||r.color==="slate")&&"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300"),children:a.jsx(n,{className:"w-4 h-4"})}),r.badge&&a.jsx("span",{className:"text-[10px] font-mono px-2 py-0.5 rounded-md font-semibold bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300 border border-slate-200 dark:border-slate-700",children:r.badge})]}),a.jsx("div",{className:"flex items-baseline gap-2",children:a.jsx("span",{className:"text-2xl sm:text-3xl font-black font-mono tracking-tight text-slate-900 dark:text-white",children:r.value})}),r.subtext&&a.jsx("div",{className:"text-xs text-slate-600 dark:text-slate-400 font-mono flex items-center justify-between pt-1 border-t border-slate-200 dark:border-slate-800/60",children:r.subtext})]},r.id||s)})})}),on={pending:{label:"Pendiente",variant:"slate"},ready:{label:"Listo",variant:"amber"},published:{label:"Publicado",variant:"emerald"},active:{label:"Activo",variant:"emerald"},approved:{label:"Aprobado",variant:"emerald"},inactive:{label:"Inactivo",variant:"slate"},rejected:{label:"Rechazado",variant:"rose"},open:{label:"Abierto",variant:"amber"},in_progress:{label:"En Progreso",variant:"indigo"},resolved:{label:"Resuelto",variant:"emerald"},closed:{label:"Cerrado",variant:"slate"}},an=({status:e,size:t="sm",customConfig:r,className:s=""})=>{const o={...on,...r}[e]||{label:e,variant:"slate"};return a.jsx(Et,{variant:o.variant,size:t,dot:!0,className:s,children:o.label})},ln=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],cn=["LU","MA","MI","JU","VI","SA","DO"];function mt(e){if(!e)return new Date;const[t,r,s]=e.split("-").map(Number);return!t||!r||!s?new Date:new Date(t,r-1,s)}function ue(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${s}`}const dn=({value:e,onChange:t,placeholder:r="Seleccionar fecha",minDate:s,maxDate:n,disabled:o=!1,className:c="",showShortcuts:l=!0,align:h="left",size:i="sm"})=>{const[d,g]=C.useState(!1),u=C.useRef(null),v=C.useRef(null),[p,k]=C.useState({top:0,left:0,openUp:!1}),z=C.useMemo(()=>e?mt(e):null,[e]),[A,R]=C.useState(()=>z||new Date);C.useEffect(()=>{e&&R(mt(e))},[e]);const E=C.useCallback(()=>{if(!u.current)return;const S=u.current.getBoundingClientRect(),y=360,B=window.innerHeight-S.bottom<y&&S.top>y;k({top:B?S.top-y-6:S.bottom+6,left:h==="right"?S.right-280:S.left,openUp:B})},[h]);C.useEffect(()=>{if(d){E();const S=()=>E(),y=()=>E();return window.addEventListener("scroll",S,!0),window.addEventListener("resize",y),()=>{window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",y)}}},[d,E]),C.useEffect(()=>{if(!d)return;const S=T=>{const B=T.target;v.current&&!v.current.contains(B)&&u.current&&!u.current.contains(B)&&g(!1)},y=T=>{T.key==="Escape"&&g(!1)};return document.addEventListener("mousedown",S),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",S),document.removeEventListener("keydown",y)}},[d]);const I=A.getFullYear(),L=A.getMonth(),N=()=>R(new Date(I,L-1,1)),P=()=>R(new Date(I,L+1,1)),f=C.useMemo(()=>{const S=new Date(I,L,1),y=new Date(I,L+1,0);let T=S.getDay()-1;T===-1&&(T=6);const B=[],W=ue(new Date),X=new Date(I,L,0).getDate();for(let Z=T-1;Z>=0;Z--){const b=new Date(I,L-1,X-Z),G=ue(b);B.push({date:b,dateStr:G,isCurrentMonth:!1,isSelected:G===e,isToday:G===W,isDisabled:!!(s&&G<s||n&&G>n)})}for(let Z=1;Z<=y.getDate();Z++){const b=new Date(I,L,Z),G=ue(b);B.push({date:b,dateStr:G,isCurrentMonth:!0,isSelected:G===e,isToday:G===W,isDisabled:!!(s&&G<s||n&&G>n)})}const de=42-B.length;for(let Z=1;Z<=de;Z++){const b=new Date(I,L+1,Z),G=ue(b);B.push({date:b,dateStr:G,isCurrentMonth:!1,isSelected:G===e,isToday:G===W,isDisabled:!!(s&&G<s||n&&G>n)})}return B},[I,L,e,s,n]),D=S=>{t(S),g(!1)},te=S=>{const y=new Date;y.setDate(y.getDate()+S);const T=ue(y);t(T),R(y),g(!1)},ce={sm:"text-xs py-1.5 px-3 rounded-lg gap-2",md:"text-xs py-2 px-3.5 rounded-xl gap-2.5",lg:"text-sm py-2.5 px-4 rounded-xl gap-3"}[i];return a.jsxs("div",{className:`relative inline-block ${c}`,children:[a.jsxs("button",{ref:u,type:"button",disabled:o,onClick:()=>!o&&g(!d),className:`flex items-center justify-between border transition-all duration-150 cursor-pointer select-none ${ce} ${o?"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900 border-slate-200 dark:border-slate-800":d?"border-indigo-500 ring-2 ring-indigo-500/20 bg-white dark:bg-[#0D121F] shadow-sm":"border-slate-200 dark:border-slate-800 bg-white dark:bg-[#0D121F] hover:border-slate-300 dark:hover:border-slate-700"}`,children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(_s,{className:"w-3.5 h-3.5 text-slate-500 shrink-0"}),a.jsx("span",{className:`font-mono truncate ${e?"text-slate-900 dark:text-white font-medium":"text-slate-400"}`,children:e||r})]}),a.jsx(We,{className:`w-3 h-3 text-slate-400 transition-transform duration-200 ${d?"rotate-180":""}`})]}),d&&wt.createPortal(a.jsxs("div",{ref:v,style:{position:"fixed",top:`${p.top}px`,left:`${p.left}px`,zIndex:9999},className:"w-72 bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-2xl shadow-xl p-3 select-none text-slate-900 dark:text-slate-100 animate-in fade-in zoom-in-95 duration-100",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3 px-1",children:[a.jsxs("span",{className:"text-xs font-bold font-mono text-slate-800 dark:text-slate-200",children:[ln[L]," ",I]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{type:"button",onClick:N,className:"p-1 rounded-lg text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:a.jsx(Is,{className:"w-4 h-4"})}),a.jsx("button",{type:"button",onClick:P,className:"p-1 rounded-lg text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:a.jsx(Ut,{className:"w-4 h-4"})})]})]}),a.jsx("div",{className:"grid grid-cols-7 gap-1 text-center mb-1",children:cn.map(S=>a.jsx("span",{className:"text-[10px] font-mono text-slate-400 dark:text-slate-500 font-semibold",children:S},S))}),a.jsx("div",{className:"grid grid-cols-7 gap-1",children:f.map((S,y)=>{const T=S.date.getDate();return a.jsx("button",{type:"button",disabled:S.isDisabled,onClick:()=>!S.isDisabled&&D(S.dateStr),className:`h-8 w-full rounded-lg text-xs font-mono flex items-center justify-center transition-all ${S.isDisabled?"opacity-25 cursor-not-allowed":S.isSelected?"bg-indigo-600 text-white font-bold shadow-xs":S.isToday?"bg-indigo-50 dark:bg-indigo-950/40 text-indigo-600 dark:text-indigo-400 font-semibold border border-indigo-200 dark:border-indigo-800/60":S.isCurrentMonth?"text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800":"text-slate-400 dark:text-slate-600 hover:bg-slate-50 dark:hover:bg-slate-900/50"}`,children:T},y)})}),l&&a.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-100 dark:border-slate-800/80 flex items-center justify-between text-[11px] font-mono",children:[a.jsx("button",{type:"button",onClick:()=>te(0),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"Hoy"}),a.jsx("button",{type:"button",onClick:()=>te(1),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"Mañana"}),a.jsx("button",{type:"button",onClick:()=>te(7),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"+1 Sem"})]})]}),document.body)]})};function He(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ie=He();function ur(e){ie=e}var xe={exec:()=>null};function $(e,t=""){let r=typeof e=="string"?e:e.source;const s={replace:(n,o)=>{let c=typeof o=="string"?o:o.source;return c=c.replace(U.caret,"$1"),r=r.replace(n,c),s},getRegex:()=>new RegExp(r,t)};return s}var U={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},hn=/^(?:[ \t]*(?:\n|$))+/,un=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,pn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ge=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ue=/(?:[*+-]|\d{1,9}[.)])/,pr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mr=$(pr).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),xn=$(pr).replace(/bull/g,Ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gn=/^[^\n]+/,Ke=/(?!\s*\])(?:\\.|[^\[\]\\])+/,fn=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ke).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bn=$(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ue).getRegex(),Ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kn=$("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xe).replace("tag",Ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xr=$(Qe).replace("hr",ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae).getRegex(),wn=$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xr).getRegex(),Ye={blockquote:wn,code:un,def:fn,fences:pn,heading:mn,hr:ge,html:kn,lheading:mr,list:bn,newline:hn,paragraph:xr,table:xe,text:gn},xt=$("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae).getRegex(),vn={...Ye,lheading:xn,table:xt,paragraph:$(Qe).replace("hr",ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ae).getRegex()},yn={...Ye,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(Qe).replace("hr",ge).replace("heading",` *#{1,6} *[^
152
- ]`).replace("lheading",mr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gr=/^( {2,}|\\)\n(?!\s*$)/,Sn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Le=/[\p{P}\p{S}]/u,Je=/[\s\p{P}\p{S}]/u,fr=/[^\s\p{P}\p{S}]/u,Cn=$(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Je).getRegex(),br=/(?!~)[\p{P}\p{S}]/u,zn=/(?!~)[\s\p{P}\p{S}]/u,Rn=/(?:[^\s\p{P}\p{S}]|~)/u,$n=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,kr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,An=$(kr,"u").replace(/punct/g,Le).getRegex(),Ln=$(kr,"u").replace(/punct/g,br).getRegex(),wr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_n=$(wr,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,Je).replace(/punct/g,Le).getRegex(),Tn=$(wr,"gu").replace(/notPunctSpace/g,Rn).replace(/punctSpace/g,zn).replace(/punct/g,br).getRegex(),In=$("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,Je).replace(/punct/g,Le).getRegex(),Mn=$(/\\(punct)/,"gu").replace(/punct/g,Le).getRegex(),En=$(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pn=$(Xe).replace("(?:-->|$)","-->").getRegex(),Dn=$("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ze=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Bn=$(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ze).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vr=$(/^!?\[(label)\]\[(ref)\]/).replace("label",ze).replace("ref",Ke).getRegex(),yr=$(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ke).getRegex(),Gn=$("reflink|nolink(?!\\()","g").replace("reflink",vr).replace("nolink",yr).getRegex(),et={_backpedal:xe,anyPunctuation:Mn,autolink:En,blockSkip:$n,br:gr,code:Nn,del:xe,emStrongLDelim:An,emStrongRDelimAst:_n,emStrongRDelimUnd:In,escape:jn,link:Bn,nolink:yr,punctuation:Cn,reflink:vr,reflinkSearch:Gn,tag:Dn,text:Sn,url:xe},On={...et,link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",ze).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ze).getRegex()},Be={...et,emStrongRDelimAst:Tn,emStrongLDelim:Ln,url:$(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qn={...Be,br:$(gr).replace("{2,}","*").getRegex(),text:$(Be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},je={normal:Ye,gfm:vn,pedantic:yn},pe={normal:et,gfm:Be,breaks:qn,pedantic:On},Fn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gt=e=>Fn[e];function K(e,t){if(t){if(U.escapeTest.test(e))return e.replace(U.escapeReplace,gt)}else if(U.escapeTestNoEncode.test(e))return e.replace(U.escapeReplaceNoEncode,gt);return e}function ft(e){try{e=encodeURI(e).replace(U.percentDecode,"%")}catch{return null}return e}function bt(e,t){var o;const r=e.replace(U.findPipe,(c,l,h)=>{let i=!1,d=l;for(;--d>=0&&h[d]==="\\";)i=!i;return i?"|":" |"}),s=r.split(U.splitPipe);let n=0;if(s[0].trim()||s.shift(),s.length>0&&!((o=s.at(-1))!=null&&o.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(U.slashPipe,"|");return s}function me(e,t,r){const s=e.length;if(s===0)return"";let n=0;for(;n<s&&e.charAt(s-n-1)===t;)n++;return e.slice(0,s-n)}function Wn(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])r++;else if(e[s]===t[1]&&(r--,r<0))return s;return r>0?-2:-1}function kt(e,t,r,s,n){const o=t.href,c=t.title||null,l=e[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;const h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:c,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,h}function Zn(e,t,r){const s=e.match(r.other.indentCodeCompensation);if(s===null)return t;const n=s[1];return t.split(`
153
- `).map(o=>{const c=o.match(r.other.beginningSpace);if(c===null)return o;const[l]=c;return l.length>=n.length?o.slice(n.length):o}).join(`
154
- `)}var Re=class{constructor(e){M(this,"options");M(this,"rules");M(this,"lexer");this.options=e||ie}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:me(r,`
155
- `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],s=Zn(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const s=me(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:me(t[0],`
156
- `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=me(t[0],`
151
+ */const dr={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};dr.node;const hr=O(dr);/**
152
+ * @license lucide-react v1.58.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const ur={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};ur.node;const Qe=O(ur),sn=({value:e,defaultValue:t,onChange:r,onValueChange:s,options:o,children:a,placeholder:d="Seleccionar...",label:l,error:c,helperText:i,icon:h,className:g="",buttonClassName:u="",dropdownClassName:j="",disabled:p=!1,name:v,id:S,size:$="md"})=>{var K;const[C,I]=y.useState(!1),q=y.useRef(null),A=y.useRef(null),L=y.useRef(null),[m,f]=y.useState(null),B=y.useMemo(()=>{if(o&&o.length>0)return o;const z=[];return y.Children.forEach(a,b=>{y.isValidElement(b)&&z.push({value:String(b.props.value??""),label:b.props.children||b.props.value||"",disabled:!!b.props.disabled})}),z},[o,a]),[pe,ne]=y.useState(e!==void 0?e:t!==void 0?t:((K=B[0])==null?void 0:K.value)||""),J=e!==void 0?e:pe,N=B.find(z=>String(z.value)===String(J)),D=y.useCallback(()=>{if(!A.current)return null;const z=A.current.getBoundingClientRect(),b=window.innerHeight-z.bottom,V=z.top,ee=b<240&&V>b,le=Math.max(z.width,180);let F=z.left;return F+le>window.innerWidth-8&&(F=Math.max(8,window.innerWidth-le-8)),{top:ee?void 0:Math.round(z.bottom+4),bottom:ee?Math.round(window.innerHeight-z.top+4):void 0,left:Math.round(F),width:Math.round(le),openUpwards:ee}},[]),T=()=>{if(!p)if(C)I(!1),f(null);else{const z=D();z&&(f(z),I(!0))}};y.useEffect(()=>{if(!C)return;const z=()=>{const E=D();E&&f(E)},b=E=>{const ee=E.target;q.current&&!q.current.contains(ee)&&L.current&&!L.current.contains(ee)&&(I(!1),f(null))},V=E=>{E.key==="Escape"&&(I(!1),f(null))};return window.addEventListener("resize",z),window.addEventListener("scroll",z,!0),document.addEventListener("mousedown",b),document.addEventListener("touchstart",b),document.addEventListener("keydown",V),()=>{window.removeEventListener("resize",z),window.removeEventListener("scroll",z,!0),document.removeEventListener("mousedown",b),document.removeEventListener("touchstart",b),document.removeEventListener("keydown",V)}},[C,D]);const G=z=>{z.disabled||p||(ne(z.value),I(!1),f(null),r&&r({target:{value:z.value,name:v}}),s&&s(z.value))},H=$==="sm";return n.jsxs("div",{ref:q,className:x("relative text-left",g),id:S,children:[l&&n.jsx("label",{className:"block text-xs font-mono font-medium text-slate-700 dark:text-slate-300 mb-1",children:l}),n.jsxs("button",{ref:A,type:"button",disabled:p,onClick:T,className:x("w-full flex items-center justify-between gap-2 transition-all cursor-pointer font-mono",H?"px-2.5 py-1.5 text-xs rounded-lg":"px-3 py-2 text-xs rounded-xl","bg-slate-100 dark:bg-slate-900 border",c?"border-rose-500 focus:border-rose-500 focus:ring-rose-500/20":C?"border-indigo-500 ring-2 ring-indigo-500/20 dark:border-indigo-500":"border-slate-200 dark:border-slate-800 hover:border-slate-300 dark:hover:border-slate-700",p&&"opacity-50 cursor-not-allowed","text-slate-800 dark:text-slate-200 focus:outline-none",u),children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0 truncate",children:[h&&n.jsx("span",{className:"text-slate-400 shrink-0",children:h}),(N==null?void 0:N.icon)&&n.jsx("span",{className:"shrink-0",children:N.icon}),n.jsx("span",{className:"truncate",children:N?N.label:d})]}),n.jsx(Ue,{className:x("w-3.5 h-3.5 text-slate-400 transition-transform duration-200 shrink-0",C&&"rotate-180 text-indigo-500")})]}),C&&m&&typeof document<"u"&&Ze.createPortal(n.jsx("div",{ref:L,style:{position:"fixed",top:m.top!==void 0?`${m.top}px`:void 0,bottom:m.bottom!==void 0?`${m.bottom}px`:void 0,left:`${m.left}px`,width:`${m.width}px`,zIndex:10005},className:x("max-h-64 overflow-y-auto rounded-xl bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 shadow-2xl shadow-black/30 dark:shadow-black/70 p-1 font-mono text-xs animate-in fade-in zoom-in-95 duration-100 backdrop-blur-md",j),children:B.length===0?n.jsx("div",{className:"px-3 py-2 text-slate-400 text-center text-[11px]",children:"No hay opciones"}):B.map(z=>{const b=String(z.value)===String(J);return n.jsxs("button",{type:"button",disabled:z.disabled,onClick:()=>G(z),className:x("w-full flex items-center justify-between gap-2 px-3 py-2 rounded-lg text-left transition-colors cursor-pointer",z.disabled?"opacity-40 cursor-not-allowed":b?"bg-indigo-50 dark:bg-indigo-950/50 text-indigo-600 dark:text-indigo-400 font-bold":"text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800/80 hover:text-slate-900 dark:hover:text-white"),children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0 truncate",children:[z.icon&&n.jsx("span",{className:"shrink-0",children:z.icon}),n.jsx("span",{className:"truncate",children:z.label})]}),b&&n.jsx(Zt,{className:"w-3.5 h-3.5 text-indigo-500 shrink-0 ml-2"})]},z.value)})}),document.body),c?n.jsx("p",{className:"text-[11px] font-mono text-rose-500 mt-1",children:c}):i?n.jsx("p",{className:"text-[11px] font-mono text-slate-500 mt-1",children:i}):null]})},nn=({checked:e,onChange:t,disabled:r=!1,size:s="md",className:o=""})=>n.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:r,onClick:()=>t(!e),className:x("relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500/20 disabled:cursor-not-allowed disabled:opacity-40",s==="sm"?"h-5 w-9":"h-6 w-11",e?"bg-indigo-600":"bg-slate-200 dark:bg-slate-700",o),children:n.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out",s==="sm"?"h-4 w-4 mt-0.5":"h-5 w-5 mt-0.5",e?s==="sm"?"translate-x-4 ml-0.5":"translate-x-5 ml-0.5":"translate-x-0 ml-0.5")})}),on=({status:e="pending",onChange:t,compact:r=!1,fullWidth:s=!1})=>{const o={pending:"ready",ready:"published",published:"pending"},a=c=>{c.stopPropagation();const i=o[e]||"pending";t(i)},d={pending:{label:"Pendiente",nextLabel:"Generado",icon:mt,classes:"bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/30",iconColor:"text-amber-500"},ready:{label:"Generado",nextLabel:"Publicado",icon:tn,classes:"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-600 dark:text-indigo-400 border-indigo-500/30",iconColor:"text-indigo-400"},published:{label:"Publicado",nextLabel:"Pendiente",icon:Vt,classes:"bg-emerald-500/10 hover:bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 border-emerald-500/30",iconColor:"text-emerald-400"}}[e]||{label:"Pendiente",nextLabel:"Generado",icon:mt,classes:"bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/30",iconColor:"text-amber-500"},l=d.icon;return n.jsxs("button",{type:"button",onClick:a,title:`Estado actual: ${d.label} (clic para alternar a ${d.nextLabel})`,className:`${s?"w-full justify-between":"inline-flex"} items-center gap-2 px-3 py-1.5 rounded-xl border text-xs font-mono font-bold transition-all shadow-xs cursor-pointer active:scale-95 ${d.classes}`,children:[n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(l,{className:`w-3.5 h-3.5 ${d.iconColor} shrink-0`}),!r&&n.jsx("span",{children:d.label})]}),n.jsx("span",{className:"text-[10px] opacity-60 font-mono tracking-tighter",children:"⇄"})]})},an={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},pr=({isOpen:e,onClose:t,children:r,size:s="2xl",className:o="",closeOnBackdropClick:a=!0,asForm:d=!1,onSubmit:l})=>{if(y.useEffect(()=>{if(!e)return;const h=g=>{g.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[e,t]),y.useEffect(()=>{if(e){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e]),!e)return null;const c=x("bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-3xl w-full max-h-[90vh] md:max-h-[85vh] flex flex-col shadow-2xl overflow-hidden animate-in fade-in zoom-in-95 duration-200",an[s],o),i=d||!!l;return Ze.createPortal(n.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/75 dark:bg-black/85 backdrop-blur-sm flex items-center justify-center p-3 sm:p-4 select-none animate-in fade-in duration-200",onClick:h=>{a&&h.target===h.currentTarget&&t()},children:i?n.jsx("form",{onSubmit:l,className:c,children:r}):n.jsx("div",{className:c,children:r})}),document.body)},xr=({title:e,subtitle:t,icon:r,onClose:s,action:o,className:a=""})=>n.jsxs("div",{className:x("px-6 py-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50/90 dark:bg-slate-900/60 shrink-0 select-none",a),children:[n.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r&&n.jsx("div",{className:"p-2.5 rounded-xl bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 shrink-0",children:r}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("h3",{className:"text-base font-bold text-slate-900 dark:text-white leading-tight truncate",children:e}),t&&n.jsx("div",{className:"text-xs font-mono text-slate-600 dark:text-slate-400 mt-0.5 truncate font-medium",children:t})]})]}),n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o,s&&n.jsx("button",{type:"button",onClick:s,className:"p-1.5 rounded-xl text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer",title:"Cerrar (Esc)",children:n.jsx(Qe,{className:"w-5 h-5"})})]})]}),Ke=({children:e,className:t="",noPadding:r=!1})=>n.jsx("div",{className:x("flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",r?"":"p-6",t),children:e}),ln=Ke,mr=({children:e,className:t=""})=>n.jsx("div",{className:x("px-6 py-4 border-t border-slate-200 dark:border-slate-800 bg-slate-50/90 dark:bg-slate-900/60 flex items-center justify-end gap-3 shrink-0 select-none",t),children:e}),cn={sm:"w-3.5 h-3.5 border-2",md:"w-5 h-5 border-2",lg:"w-8 h-8 border-3"},dn=({size:e="md",className:t=""})=>n.jsx("div",{role:"status",className:x("rounded-full border-current border-t-transparent animate-spin text-indigo-500 shrink-0 inline-block",cn[e],t),children:n.jsx("span",{className:"sr-only",children:"Cargando..."})}),hn=({name:e,size:t=18,className:r="",...s})=>{switch(e){case"github":return n.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:x("shrink-0",r),...s,children:[n.jsx("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),n.jsx("path",{d:"M9 18c-4.51 2-5-2-7-2"})]});case"linkedin":return n.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:x("shrink-0",r),...s,children:[n.jsx("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),n.jsx("rect",{width:"4",height:"12",x:"2",y:"9"}),n.jsx("circle",{cx:"4",cy:"4",r:"2"})]});case"whatsapp":return n.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:x("shrink-0",r),...s,children:n.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"})});default:return null}},br=({steps:e,currentStep:t,completedSteps:r=[],onStepClick:s,allowStepBack:o=!0,className:a=""})=>{const d=e.length===2?"grid-cols-2":e.length===3?"grid-cols-3":"grid-cols-4";return n.jsx("div",{className:x("w-full grid select-none gap-2 py-1",d,a),children:e.map(l=>{const c=r.includes(l.number)||l.number<t,i=l.number===t,h=!c&&!i,g=o&&(c||i)&&!!s;return n.jsxs("div",{onClick:()=>{g&&s&&s(l.number)},className:x("flex items-center gap-2 p-1.5 sm:p-2 rounded-xl transition-all min-w-0 border",i&&"bg-indigo-50/80 dark:bg-indigo-950/50 border-indigo-500/30 shadow-xs",c&&"bg-emerald-50/60 dark:bg-emerald-950/30 border-emerald-500/25",h&&"bg-slate-100/60 dark:bg-slate-800/40 border-slate-200/60 dark:border-slate-800/60 opacity-60",g?"cursor-pointer group hover:opacity-100":"cursor-default"),children:[n.jsx("div",{className:x("w-6 h-6 rounded-full flex items-center justify-center font-mono text-[11px] font-bold border transition-all shrink-0",c&&"bg-emerald-600 border-emerald-600 text-white shadow-xs",i&&"bg-indigo-600 border-indigo-600 text-white ring-2 ring-indigo-500/30 shadow-xs scale-105",h&&"bg-slate-200/70 dark:bg-slate-700/60 border-slate-300 dark:border-slate-600 text-slate-500 dark:text-slate-400"),children:c?n.jsx(Zt,{className:"w-3.5 h-3.5 stroke-[2.5]"}):l.number}),n.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[n.jsx("span",{className:x("text-[11px] sm:text-xs font-mono font-bold transition-colors leading-tight break-words",i&&"text-indigo-600 dark:text-indigo-400",c&&"text-slate-800 dark:text-slate-200 group-hover:text-indigo-600 dark:group-hover:text-indigo-400",h&&"text-slate-500 dark:text-slate-400"),children:l.title}),l.subtitle&&n.jsx("span",{className:"text-[10px] font-mono text-slate-500 dark:text-slate-400 truncate mt-0.5 hidden xs:inline",children:l.subtitle})]}),l.badge!==void 0&&n.jsx("span",{className:"shrink-0 hidden sm:inline",children:l.badge})]},l.id)})})},fr=y.forwardRef(({className:e="",containerClassName:t="",wrapper:r=!0,children:s,...o},a)=>{const d=n.jsx("table",{ref:a,className:x("w-full caption-bottom text-xs text-left border-collapse",e),...o,children:s});return r?n.jsx("div",{className:x("relative w-full overflow-x-auto rounded-2xl border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 shadow-xs",t),children:d}):d});fr.displayName="Table";const gr=y.forwardRef(({className:e="",...t},r)=>n.jsx("thead",{ref:r,className:x("bg-slate-50/80 dark:bg-slate-950/60 border-b border-slate-200 dark:border-slate-800",e),...t}));gr.displayName="TableHeader";const kr=y.forwardRef(({className:e="",...t},r)=>n.jsx("tbody",{ref:r,className:x("divide-y divide-slate-100 dark:divide-slate-800/60 [&_tr:last-child]:border-0",e),...t}));kr.displayName="TableBody";const wr=y.forwardRef(({className:e="",...t},r)=>n.jsx("tfoot",{ref:r,className:x("bg-slate-50/50 dark:bg-slate-900/50 border-t border-slate-200 dark:border-slate-800 font-medium",e),...t}));wr.displayName="TableFooter";const vr=y.forwardRef(({className:e="",...t},r)=>n.jsx("tr",{ref:r,className:x("border-b border-slate-100 dark:border-slate-800/60 transition-colors hover:bg-slate-50/60 dark:hover:bg-slate-800/40 data-[state=selected]:bg-slate-100 dark:data-[state=selected]:bg-slate-800",e),...t}));vr.displayName="TableRow";const yr=y.forwardRef(({className:e="",...t},r)=>n.jsx("th",{ref:r,className:x("h-10 px-4 text-left align-middle font-mono text-[10px] sm:text-[11px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 [&:has([role=checkbox])]:pr-0",e),...t}));yr.displayName="TableHead";const jr=y.forwardRef(({className:e="",...t},r)=>n.jsx("td",{ref:r,className:x("p-3.5 sm:p-4 align-middle text-xs font-mono text-slate-800 dark:text-slate-200 [&:has([role=checkbox])]:pr-0",e),...t}));jr.displayName="TableCell";const Nr=y.forwardRef(({className:e="",...t},r)=>n.jsx("caption",{ref:r,className:x("mt-4 text-xs font-sans text-slate-500 dark:text-slate-400",e),...t}));Nr.displayName="TableCaption";const De={sm:{tab:"py-1.5 px-3 text-xs gap-1.5",icon:"w-3.5 h-3.5"},md:{tab:"py-2 px-4 text-xs gap-2",icon:"w-4 h-4"},lg:{tab:"py-2.5 px-5 text-sm gap-2.5",icon:"w-4 h-4"}};function un({tabs:e,activeTab:t,onChange:r,variant:s="segmented",size:o="md",fullWidth:a=!1,className:d="",tabClassName:l=""}){return s==="segmented"?n.jsx("div",{role:"tablist",className:x("p-1 bg-slate-100 dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl flex items-center select-none",d),children:e.map(c=>{const i=c.id===t;return n.jsxs("button",{role:"tab",type:"button",disabled:c.disabled,"aria-selected":i,onClick:()=>r(c.id),className:x("relative flex items-center justify-center font-mono font-bold transition-all duration-150 cursor-pointer rounded-xl select-none",De[o].tab,a&&"flex-1",i?"bg-white dark:bg-slate-800 text-indigo-600 dark:text-indigo-400 shadow-xs":"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-200/50 dark:hover:bg-slate-800/50",c.disabled&&"opacity-40 cursor-not-allowed pointer-events-none",l),children:[c.icon&&n.jsx("span",{className:"shrink-0",children:c.icon}),n.jsx("span",{children:c.label}),c.badge&&n.jsx("span",{className:"ml-1 shrink-0",children:c.badge})]},c.id)})}):s==="underline"?n.jsx("div",{role:"tablist",className:x("flex items-center gap-4 border-b border-slate-200 dark:border-slate-800 select-none",d),children:e.map(c=>{const i=c.id===t;return n.jsxs("button",{role:"tab",type:"button",disabled:c.disabled,"aria-selected":i,onClick:()=>r(c.id),className:x("relative flex items-center justify-center font-mono font-bold transition-all duration-150 cursor-pointer border-b-2 select-none -mb-px",De[o].tab,a&&"flex-1",i?"border-indigo-600 text-indigo-600 dark:border-indigo-400 dark:text-indigo-400":"border-transparent text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white",c.disabled&&"opacity-40 cursor-not-allowed pointer-events-none",l),children:[c.icon&&n.jsx("span",{className:"shrink-0",children:c.icon}),n.jsx("span",{children:c.label}),c.badge&&n.jsx("span",{className:"ml-1 shrink-0",children:c.badge})]},c.id)})}):n.jsx("div",{role:"tablist",className:x("flex items-center gap-1.5 select-none",d),children:e.map(c=>{const i=c.id===t;return n.jsxs("button",{role:"tab",type:"button",disabled:c.disabled,"aria-selected":i,onClick:()=>r(c.id),className:x("relative flex items-center justify-center font-mono font-bold transition-all duration-150 cursor-pointer rounded-xl border select-none",De[o].tab,a&&"flex-1",i?"bg-indigo-600 text-white border-indigo-600 shadow-sm shadow-indigo-600/20":"bg-slate-100 hover:bg-slate-200/80 dark:bg-slate-900 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-400 border-slate-200 dark:border-slate-800",c.disabled&&"opacity-40 cursor-not-allowed pointer-events-none",l),children:[c.icon&&n.jsx("span",{className:"shrink-0",children:c.icon}),n.jsx("span",{children:c.label}),c.badge&&n.jsx("span",{className:"ml-1 shrink-0",children:c.badge})]},c.id)})})}const pn=({label:e,error:t,helperText:r,required:s=!1,className:o="",children:a})=>n.jsxs("div",{className:x("space-y-1.5 text-left w-full",o),children:[e&&n.jsxs("label",{className:"block text-xs font-mono font-semibold text-slate-800 dark:text-slate-200",children:[e," ",s&&n.jsx("span",{className:"text-rose-500 font-bold",children:"*"})]}),a,t?n.jsx("p",{className:"text-[11px] font-mono text-rose-600 dark:text-rose-400 font-medium",children:t}):r?n.jsx("p",{className:"text-[11px] font-mono text-slate-600 dark:text-slate-400 font-medium",children:r}):null]}),xn=({value:e,onChange:t,placeholder:r="Buscar...",className:s="",onClear:o,autoFocus:a=!1})=>n.jsxs("div",{className:x("relative flex items-center w-full",s),children:[n.jsx(en,{className:"w-4 h-4 text-slate-500 dark:text-slate-400 absolute left-3.5 pointer-events-none shrink-0"}),n.jsx("input",{type:"text",value:e,onChange:d=>t(d.target.value),placeholder:r,autoFocus:a,className:x("w-full pl-10 pr-9 py-2 text-xs rounded-xl border transition-all duration-150 outline-none","bg-slate-100/80 dark:bg-slate-900 border-slate-300 dark:border-slate-800","text-slate-900 dark:text-white placeholder:text-slate-500 dark:placeholder:text-slate-400","focus:border-indigo-500 focus:bg-white dark:focus:bg-slate-950 focus:ring-1 focus:ring-indigo-500/20")}),e&&n.jsx("button",{type:"button",onClick:()=>{t(""),o&&o()},className:"absolute right-2.5 p-1 rounded-lg text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-200/60 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:n.jsx(Qe,{className:"w-3.5 h-3.5"})})]}),mn=({isOpen:e,onClose:t,onConfirm:r,title:s,message:o,confirmText:a="Confirmar",cancelText:d="Cancelar",variant:l="danger",loading:c=!1})=>n.jsxs(pr,{isOpen:e,onClose:t,size:"sm",children:[n.jsx(xr,{title:s,icon:n.jsx(hr,{className:`w-5 h-5 ${l==="danger"?"text-rose-500":l==="warning"?"text-amber-500":"text-indigo-500"}`}),onClose:t}),n.jsx(Ke,{children:n.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-400 leading-relaxed",children:o})}),n.jsxs(mr,{children:[n.jsx(Ae,{variant:"ghost",size:"sm",onClick:t,disabled:c,children:d}),n.jsx(Ae,{variant:l==="danger"?"danger":"primary",size:"sm",onClick:r,loading:c,children:a})]})]}),bn=({icon:e,title:t,description:r,actionText:s,onAction:o,className:a=""})=>n.jsxs("div",{className:x("flex flex-col items-center justify-center text-center p-10 border border-dashed border-slate-200 dark:border-slate-800 rounded-3xl",a),children:[e&&n.jsx("div",{className:"w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800/80 text-slate-400 dark:text-slate-500 flex items-center justify-center mb-4",children:e}),n.jsx("h4",{className:"text-sm font-bold text-slate-800 dark:text-slate-200 mb-1",children:t}),n.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 max-w-sm mb-4 leading-relaxed",children:r}),s&&o&&n.jsx(Ae,{variant:"primary",size:"sm",onClick:o,children:s})]}),fn=({label:e,value:t,subtitle:r,icon:s,iconColor:o="text-indigo-500 bg-indigo-500/10",className:a=""})=>n.jsxs(Bt,{hover:!0,className:x("flex items-center justify-between p-4",a),children:[n.jsxs("div",{className:"space-y-1",children:[n.jsx("p",{className:"text-[11px] font-mono font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wider",children:e}),n.jsx("p",{className:"text-2xl font-bold font-mono text-slate-900 dark:text-white tracking-tight",children:t}),r&&n.jsx("p",{className:"text-[11px] font-mono text-slate-600 dark:text-slate-400 font-medium",children:r})]}),s&&n.jsx("div",{className:x("p-3 rounded-2xl shrink-0 flex items-center justify-center",o),children:s})]}),gn=({items:e,className:t})=>n.jsx("div",{className:x("w-full bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800/90 rounded-2xl overflow-hidden shadow-xs",t),children:n.jsx("div",{className:x("grid grid-cols-1 divide-y divide-slate-100 dark:divide-slate-800/70",e.length===2&&"sm:grid-cols-2 sm:divide-y-0 sm:divide-x",e.length===3&&"sm:grid-cols-3 sm:divide-y-0 sm:divide-x",e.length>=4&&"sm:grid-cols-2 lg:grid-cols-4 sm:divide-y-0 sm:divide-x"),children:e.map((r,s)=>{const o=r.icon;return n.jsxs("div",{className:"p-4 sm:p-5 flex flex-col justify-between space-y-2 hover:bg-slate-50/50 dark:hover:bg-slate-900/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"text-[11px] font-mono uppercase tracking-wider text-slate-700 dark:text-slate-300 font-bold truncate",children:r.label}),o&&n.jsx("div",{className:x("p-1.5 rounded-lg shrink-0",r.color==="emerald"&&"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",r.color==="indigo"&&"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",r.color==="amber"&&"bg-amber-500/10 text-amber-600 dark:text-amber-400",r.color==="rose"&&"bg-rose-500/10 text-rose-600 dark:text-rose-400",(!r.color||r.color==="slate")&&"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300"),children:n.jsx(o,{className:"w-4 h-4"})}),r.badge&&n.jsx("span",{className:"text-[10px] font-mono px-2 py-0.5 rounded-md font-semibold bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300 border border-slate-200 dark:border-slate-700",children:r.badge})]}),n.jsx("div",{className:"flex items-baseline gap-2",children:n.jsx("span",{className:"text-2xl sm:text-3xl font-black font-mono tracking-tight text-slate-900 dark:text-white",children:r.value})}),r.subtext&&n.jsx("div",{className:"text-xs text-slate-600 dark:text-slate-400 font-mono flex items-center justify-between pt-1 border-t border-slate-200 dark:border-slate-800/60",children:r.subtext})]},r.id||s)})})}),kn={pending:{label:"Pendiente",variant:"slate"},ready:{label:"Listo",variant:"amber"},published:{label:"Publicado",variant:"emerald"},active:{label:"Activo",variant:"emerald"},approved:{label:"Aprobado",variant:"emerald"},inactive:{label:"Inactivo",variant:"slate"},rejected:{label:"Rechazado",variant:"rose"},open:{label:"Abierto",variant:"amber"},in_progress:{label:"En Progreso",variant:"indigo"},resolved:{label:"Resuelto",variant:"emerald"},closed:{label:"Cerrado",variant:"slate"}},wn=({status:e,size:t="sm",customConfig:r,className:s=""})=>{const a={...kn,...r}[e]||{label:e,variant:"slate"};return n.jsx(Dt,{variant:a.variant,size:t,dot:!0,className:s,children:a.label})},vn=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],yn=["LU","MA","MI","JU","VI","SA","DO"];function ft(e){if(!e)return new Date;const[t,r,s]=e.split("-").map(Number);return!t||!r||!s?new Date:new Date(t,r-1,s)}function me(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${s}`}const jn=({value:e,onChange:t,placeholder:r="Seleccionar fecha",minDate:s,maxDate:o,disabled:a=!1,className:d="",showShortcuts:l=!0,align:c="left",size:i="sm"})=>{const[h,g]=y.useState(!1),u=y.useRef(null),j=y.useRef(null),[p,v]=y.useState(null),S=y.useMemo(()=>e?ft(e):null,[e]),[$,C]=y.useState(()=>S||new Date);y.useEffect(()=>{e&&C(ft(e))},[e]);const I=y.useCallback(()=>{if(!u.current)return null;const N=u.current.getBoundingClientRect(),D=360,T=288,H=window.innerHeight-N.bottom<D&&N.top>D;let K=c==="right"?N.right-T:N.left;return K+T>window.innerWidth-12&&(K=window.innerWidth-T-12),K<12&&(K=12),{top:Math.round(H?N.top-D-6:N.bottom+6),left:Math.round(K),openUp:H}},[c]),q=()=>{if(!a)if(h)g(!1),v(null);else{const N=I();N&&(v(N),g(!0))}};y.useEffect(()=>{if(h){const N=()=>{const T=I();T&&v(T)},D=()=>{const T=I();T&&v(T)};return window.addEventListener("scroll",N,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",D)}}},[h,I]),y.useEffect(()=>{if(!h)return;const N=T=>{const G=T.target;j.current&&!j.current.contains(G)&&u.current&&!u.current.contains(G)&&(g(!1),v(null))},D=T=>{T.key==="Escape"&&(g(!1),v(null))};return document.addEventListener("mousedown",N),document.addEventListener("keydown",D),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",D)}},[h]);const A=$.getFullYear(),L=$.getMonth(),m=()=>C(new Date(A,L-1,1)),f=()=>C(new Date(A,L+1,1)),B=y.useMemo(()=>{const N=new Date(A,L,1),D=new Date(A,L+1,0);let T=N.getDay()-1;T===-1&&(T=6);const G=[],H=me(new Date),K=new Date(A,L,0).getDate();for(let b=T-1;b>=0;b--){const V=new Date(A,L-1,K-b),E=me(V);G.push({date:V,dateStr:E,isCurrentMonth:!1,isSelected:E===e,isToday:E===H,isDisabled:!!(s&&E<s||o&&E>o)})}for(let b=1;b<=D.getDate();b++){const V=new Date(A,L,b),E=me(V);G.push({date:V,dateStr:E,isCurrentMonth:!0,isSelected:E===e,isToday:E===H,isDisabled:!!(s&&E<s||o&&E>o)})}const z=42-G.length;for(let b=1;b<=z;b++){const V=new Date(A,L+1,b),E=me(V);G.push({date:V,dateStr:E,isCurrentMonth:!1,isSelected:E===e,isToday:E===H,isDisabled:!!(s&&E<s||o&&E>o)})}return G},[A,L,e,s,o]),pe=N=>{t(N),g(!1),v(null)},ne=N=>{const D=new Date;D.setDate(D.getDate()+N);const T=me(D);t(T),C(D),g(!1),v(null)},J={sm:"text-xs py-1.5 px-3 rounded-lg gap-2",md:"text-xs py-2 px-3.5 rounded-xl gap-2.5",lg:"text-sm py-2.5 px-4 rounded-xl gap-3"}[i];return n.jsxs("div",{className:`relative inline-block ${d}`,children:[n.jsxs("button",{ref:u,type:"button",disabled:a,onClick:q,className:`flex items-center justify-between border transition-all duration-150 cursor-pointer select-none ${J} ${a?"opacity-50 cursor-not-allowed bg-slate-100 dark:bg-slate-900 border-slate-200 dark:border-slate-800":h?"border-indigo-500 ring-2 ring-indigo-500/20 bg-white dark:bg-[#0D121F] shadow-sm":"border-slate-200 dark:border-slate-800 bg-white dark:bg-[#0D121F] hover:border-slate-300 dark:hover:border-slate-700"}`,children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx(Zs,{className:"w-3.5 h-3.5 text-slate-500 shrink-0"}),n.jsx("span",{className:`font-mono truncate ${e?"text-slate-900 dark:text-white font-medium":"text-slate-400"}`,children:e||r})]}),n.jsx(Ue,{className:`w-3 h-3 text-slate-400 transition-transform duration-200 ${h?"rotate-180":""}`})]}),h&&p&&Ze.createPortal(n.jsxs("div",{ref:j,style:{position:"fixed",top:`${p.top}px`,left:`${p.left}px`,zIndex:10005},className:"w-72 bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-2xl shadow-xl p-3 select-none text-slate-900 dark:text-slate-100 animate-in fade-in zoom-in-95 duration-100",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 px-1",children:[n.jsxs("span",{className:"text-xs font-bold font-mono text-slate-800 dark:text-slate-200",children:[vn[L]," ",A]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{type:"button",onClick:m,className:"p-1 rounded-lg text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:n.jsx(Hs,{className:"w-4 h-4"})}),n.jsx("button",{type:"button",onClick:f,className:"p-1 rounded-lg text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:n.jsx(Xt,{className:"w-4 h-4"})})]})]}),n.jsx("div",{className:"grid grid-cols-7 gap-1 text-center mb-1",children:yn.map(N=>n.jsx("span",{className:"text-[10px] font-mono text-slate-400 dark:text-slate-500 font-semibold",children:N},N))}),n.jsx("div",{className:"grid grid-cols-7 gap-1",children:B.map((N,D)=>{const T=N.date.getDate();return n.jsx("button",{type:"button",disabled:N.isDisabled,onClick:()=>!N.isDisabled&&pe(N.dateStr),className:`h-8 w-full rounded-lg text-xs font-mono flex items-center justify-center transition-all ${N.isDisabled?"opacity-25 cursor-not-allowed":N.isSelected?"bg-indigo-600 text-white font-bold shadow-xs":N.isToday?"bg-indigo-50 dark:bg-indigo-950/40 text-indigo-600 dark:text-indigo-400 font-semibold border border-indigo-200 dark:border-indigo-800/60":N.isCurrentMonth?"text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800":"text-slate-400 dark:text-slate-600 hover:bg-slate-50 dark:hover:bg-slate-900/50"}`,children:T},D)})}),l&&n.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-100 dark:border-slate-800/80 flex items-center justify-between text-[11px] font-mono",children:[n.jsx("button",{type:"button",onClick:()=>ne(0),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"Hoy"}),n.jsx("button",{type:"button",onClick:()=>ne(1),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"Mañana"}),n.jsx("button",{type:"button",onClick:()=>ne(7),className:"px-2 py-1 rounded text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 transition-colors",children:"+1 Sem"})]})]}),document.body)]})};function Xe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ue=Xe();function Sr(e){ue=e}var ge={exec:()=>null};function _(e,t=""){let r=typeof e=="string"?e:e.source;const s={replace:(o,a)=>{let d=typeof a=="string"?a:a.source;return d=d.replace(Q.caret,"$1"),r=r.replace(o,d),s},getRegex:()=>new RegExp(r,t)};return s}var Q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Nn=/^(?:[ \t]*(?:\n|$))+/,Sn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ke=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,zn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ye=/(?:[*+-]|\d{1,9}[.)])/,Cr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zr=_(Cr).replace(/bull/g,Ye).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rn=_(Cr).replace(/bull/g,Ye).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Je=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,et=/(?!\s*\])(?:\\.|[^\[\]\\])+/,$n=_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",et).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ln=_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ye).getRegex(),_e="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tn=_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",tt).replace("tag",_e).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rr=_(Je).replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_e).getRegex(),_n=_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rr).getRegex(),rt={blockquote:_n,code:Sn,def:$n,fences:Cn,heading:zn,hr:ke,html:Tn,lheading:zr,list:Ln,newline:Nn,paragraph:Rr,table:ge,text:An},gt=_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_e).getRegex(),Mn={...rt,lheading:Rn,table:gt,paragraph:_(Je).replace("hr",ke).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_e).getRegex()},En={...rt,html:_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ge,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_(Je).replace("hr",ke).replace("heading",` *#{1,6} *[^
157
+ ]`).replace("lheading",zr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},In=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ar=/^( {2,}|\\)\n(?!\s*$)/,Dn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Me=/[\p{P}\p{S}]/u,st=/[\s\p{P}\p{S}]/u,$r=/[^\s\p{P}\p{S}]/u,Bn=_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,st).getRegex(),Lr=/(?!~)[\p{P}\p{S}]/u,Gn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,qn=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Tr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Fn=_(Tr,"u").replace(/punct/g,Me).getRegex(),Wn=_(Tr,"u").replace(/punct/g,Lr).getRegex(),_r="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zn=_(_r,"gu").replace(/notPunctSpace/g,$r).replace(/punctSpace/g,st).replace(/punct/g,Me).getRegex(),Hn=_(_r,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Gn).replace(/punct/g,Lr).getRegex(),Vn=_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$r).replace(/punctSpace/g,st).replace(/punct/g,Me).getRegex(),Un=_(/\\(punct)/,"gu").replace(/punct/g,Me).getRegex(),Qn=_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Kn=_(tt).replace("(?:-->|$)","-->").getRegex(),Xn=_("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Kn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$e=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yn=_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$e).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mr=_(/^!?\[(label)\]\[(ref)\]/).replace("label",$e).replace("ref",et).getRegex(),Er=_(/^!?\[(ref)\](?:\[\])?/).replace("ref",et).getRegex(),Jn=_("reflink|nolink(?!\\()","g").replace("reflink",Mr).replace("nolink",Er).getRegex(),nt={_backpedal:ge,anyPunctuation:Un,autolink:Qn,blockSkip:qn,br:Ar,code:Pn,del:ge,emStrongLDelim:Fn,emStrongRDelimAst:Zn,emStrongRDelimUnd:Vn,escape:In,link:Yn,nolink:Er,punctuation:Bn,reflink:Mr,reflinkSearch:Jn,tag:Xn,text:Dn,url:ge},eo={...nt,link:_(/^!?\[(label)\]\((.*?)\)/).replace("label",$e).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$e).getRegex()},qe={...nt,emStrongRDelimAst:Hn,emStrongLDelim:Wn,url:_(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},to={...qe,br:_(Ar).replace("{2,}","*").getRegex(),text:_(qe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ce={normal:rt,gfm:Mn,pedantic:En},be={normal:nt,gfm:qe,breaks:to,pedantic:eo},ro={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kt=e=>ro[e];function Y(e,t){if(t){if(Q.escapeTest.test(e))return e.replace(Q.escapeReplace,kt)}else if(Q.escapeTestNoEncode.test(e))return e.replace(Q.escapeReplaceNoEncode,kt);return e}function wt(e){try{e=encodeURI(e).replace(Q.percentDecode,"%")}catch{return null}return e}function vt(e,t){var a;const r=e.replace(Q.findPipe,(d,l,c)=>{let i=!1,h=l;for(;--h>=0&&c[h]==="\\";)i=!i;return i?"|":" |"}),s=r.split(Q.splitPipe);let o=0;if(s[0].trim()||s.shift(),s.length>0&&!((a=s.at(-1))!=null&&a.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Q.slashPipe,"|");return s}function fe(e,t,r){const s=e.length;if(s===0)return"";let o=0;for(;o<s&&e.charAt(s-o-1)===t;)o++;return e.slice(0,s-o)}function so(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])r++;else if(e[s]===t[1]&&(r--,r<0))return s;return r>0?-2:-1}function yt(e,t,r,s,o){const a=t.href,d=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;const c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:d,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,c}function no(e,t,r){const s=e.match(r.other.indentCodeCompensation);if(s===null)return t;const o=s[1];return t.split(`
158
+ `).map(a=>{const d=a.match(r.other.beginningSpace);if(d===null)return a;const[l]=d;return l.length>=o.length?a.slice(o.length):a}).join(`
159
+ `)}var Le=class{constructor(e){P(this,"options");P(this,"rules");P(this,"lexer");this.options=e||ue}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:fe(r,`
160
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],s=no(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const s=fe(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:fe(t[0],`
161
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=fe(t[0],`
157
162
  `).split(`
158
- `),s="",n="";const o=[];for(;r.length>0;){let c=!1;const l=[];let h;for(h=0;h<r.length;h++)if(this.rules.other.blockquoteStart.test(r[h]))l.push(r[h]),c=!0;else if(!c)l.push(r[h]);else break;r=r.slice(h);const i=l.join(`
159
- `),d=i.replace(this.rules.other.blockquoteSetextReplace,`
163
+ `),s="",o="";const a=[];for(;r.length>0;){let d=!1;const l=[];let c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))l.push(r[c]),d=!0;else if(!d)l.push(r[c]);else break;r=r.slice(c);const i=l.join(`
164
+ `),h=i.replace(this.rules.other.blockquoteSetextReplace,`
160
165
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
161
- ${i}`:i,n=n?`${n}
162
- ${d}`:d;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=g,r.length===0)break;const u=o.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){const v=u,p=v.raw+`
166
+ ${i}`:i,o=o?`${o}
167
+ ${h}`:h;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=g,r.length===0)break;const u=a.at(-1);if((u==null?void 0:u.type)==="code")break;if((u==null?void 0:u.type)==="blockquote"){const j=u,p=j.raw+`
163
168
  `+r.join(`
164
- `),k=this.blockquote(p);o[o.length-1]=k,s=s.substring(0,s.length-v.raw.length)+k.raw,n=n.substring(0,n.length-v.text.length)+k.text;break}else if((u==null?void 0:u.type)==="list"){const v=u,p=v.raw+`
169
+ `),v=this.blockquote(p);a[a.length-1]=v,s=s.substring(0,s.length-j.raw.length)+v.raw,o=o.substring(0,o.length-j.text.length)+v.text;break}else if((u==null?void 0:u.type)==="list"){const j=u,p=j.raw+`
165
170
  `+r.join(`
166
- `),k=this.list(p);o[o.length-1]=k,s=s.substring(0,s.length-u.raw.length)+k.raw,n=n.substring(0,n.length-v.raw.length)+k.raw,r=p.substring(o.at(-1).raw.length).split(`
167
- `);continue}}return{type:"blockquote",raw:s,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const s=r.length>1,n={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");const o=this.rules.other.listItemRegex(r);let c=!1;for(;e;){let h=!1,i="",d="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let g=t[2].split(`
168
- `,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),u=e.split(`
169
- `,1)[0],v=!g.trim(),p=0;if(this.options.pedantic?(p=2,d=g.trimStart()):v?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,d=g.slice(p),p+=t[1].length),v&&this.rules.other.blankLine.test(u)&&(i+=u+`
170
- `,e=e.substring(u.length+1),h=!0),!h){const A=this.rules.other.nextBulletRegex(p),R=this.rules.other.hrRegex(p),E=this.rules.other.fencesBeginRegex(p),I=this.rules.other.headingBeginRegex(p),L=this.rules.other.htmlBeginRegex(p);for(;e;){const N=e.split(`
171
- `,1)[0];let P;if(u=N,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),P=u):P=u.replace(this.rules.other.tabCharGlobal," "),E.test(u)||I.test(u)||L.test(u)||A.test(u)||R.test(u))break;if(P.search(this.rules.other.nonSpaceChar)>=p||!u.trim())d+=`
172
- `+P.slice(p);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||I.test(g)||R.test(g))break;d+=`
173
- `+u}!v&&!u.trim()&&(v=!0),i+=N+`
174
- `,e=e.substring(N.length+1),g=P.slice(p)}}n.loose||(c?n.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(c=!0));let k=null,z;this.options.gfm&&(k=this.rules.other.listIsTask.exec(d),k&&(z=k[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:i,task:!!k,checked:z,loose:!1,text:d,tokens:[]}),n.raw+=i}const l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let h=0;h<n.items.length;h++)if(this.lexer.state.top=!1,n.items[h].tokens=this.lexer.blockTokens(n.items[h].text,[]),!n.loose){const i=n.items[h].tokens.filter(g=>g.type==="space"),d=i.length>0&&i.some(g=>this.rules.other.anyLine.test(g.raw));n.loose=d}if(n.loose)for(let h=0;h<n.items.length;h++)n.items[h].loose=!0;return n}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:s,title:n}}}table(e){var c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=bt(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
175
- `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<r.length;l++)o.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:o.align[l]});for(const l of n)o.rows.push(bt(l,o.header.length).map((h,i)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[i]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
176
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const o=me(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=Wn(t[2],"()");if(o===-2)return;if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],n="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],n=o[3])}else n=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),kt(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[s.toLowerCase()];if(!n){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return kt(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const o=[...s[0]].length-1;let c,l,h=o,i=0;const d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(s=d.exec(t))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(l=[...c].length,s[3]||s[4]){h+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){i+=l;continue}if(h-=l,h>0)continue;l=Math.min(l,l+h+i);const g=[...s[0]][0].length,u=e.slice(0,o+s.index+g+l);if(Math.min(o,l)%2){const p=u.slice(1,-1);return{type:"em",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}const v=u.slice(2,-2);return{type:"strong",raw:u,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,s;return t[2]==="@"?(r=t[1],s="mailto:"+r):(r=t[1],s=r),{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let s,n;if(t[2]==="@")s=t[0],n="mailto:"+s;else{let o;do o=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(o!==t[0]);s=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},J=class Ge{constructor(t){M(this,"tokens");M(this,"options");M(this,"state");M(this,"tokenizer");M(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ie,this.options.tokenizer=this.options.tokenizer||new Re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:U,block:je.normal,inline:pe.normal};this.options.pedantic?(r.block=je.pedantic,r.inline=pe.pedantic):this.options.gfm&&(r.block=je.gfm,this.options.breaks?r.inline=pe.breaks:r.inline=pe.gfm),this.tokenizer.rules=r}static get rules(){return{block:je,inline:pe}}static lex(t,r){return new Ge(r).lex(t)}static lexInline(t,r){return new Ge(r).inlineTokens(t)}lex(t){t=t.replace(U.carriageReturn,`
177
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],s=!1){var n,o,c;for(this.options.pedantic&&(t=t.replace(U.tabCharGlobal," ").replace(U.spaceLine,""));t;){let l;if((o=(n=this.options.extensions)==null?void 0:n.block)!=null&&o.some(i=>(l=i.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const i=r.at(-1);l.raw.length===1&&i!==void 0?i.raw+=`
171
+ `),v=this.list(p);a[a.length-1]=v,s=s.substring(0,s.length-u.raw.length)+v.raw,o=o.substring(0,o.length-j.raw.length)+v.raw,r=p.substring(a.at(-1).raw.length).split(`
172
+ `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const s=r.length>1,o={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let d=!1;for(;e;){let c=!1,i="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let g=t[2].split(`
173
+ `,1)[0].replace(this.rules.other.listReplaceTabs,$=>" ".repeat(3*$.length)),u=e.split(`
174
+ `,1)[0],j=!g.trim(),p=0;if(this.options.pedantic?(p=2,h=g.trimStart()):j?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,h=g.slice(p),p+=t[1].length),j&&this.rules.other.blankLine.test(u)&&(i+=u+`
175
+ `,e=e.substring(u.length+1),c=!0),!c){const $=this.rules.other.nextBulletRegex(p),C=this.rules.other.hrRegex(p),I=this.rules.other.fencesBeginRegex(p),q=this.rules.other.headingBeginRegex(p),A=this.rules.other.htmlBeginRegex(p);for(;e;){const L=e.split(`
176
+ `,1)[0];let m;if(u=L,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),m=u):m=u.replace(this.rules.other.tabCharGlobal," "),I.test(u)||q.test(u)||A.test(u)||$.test(u)||C.test(u))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!u.trim())h+=`
177
+ `+m.slice(p);else{if(j||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(g)||q.test(g)||C.test(g))break;h+=`
178
+ `+u}!j&&!u.trim()&&(j=!0),i+=L+`
179
+ `,e=e.substring(L.length+1),g=m.slice(p)}}o.loose||(d?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(d=!0));let v=null,S;this.options.gfm&&(v=this.rules.other.listIsTask.exec(h),v&&(S=v[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!v,checked:S,loose:!1,text:h,tokens:[]}),o.raw+=i}const l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){const i=o.items[c].tokens.filter(g=>g.type==="space"),h=i.length>0&&i.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=h}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:s,title:o}}}table(e){var d;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=vt(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(d=t[3])!=null&&d.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
180
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of o)a.rows.push(vt(l,a.header.length).map((c,i)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[i]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
181
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=fe(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=so(t[2],"()");if(a===-2)return;if(a>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),yt(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[s.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return yt(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...s[0]].length-1;let d,l,c=a,i=0;const h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(s=h.exec(t))!=null;){if(d=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!d)continue;if(l=[...d].length,s[3]||s[4]){c+=l;continue}else if((s[5]||s[6])&&a%3&&!((a+l)%3)){i+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+i);const g=[...s[0]][0].length,u=e.slice(0,a+s.index+g+l);if(Math.min(a,l)%2){const p=u.slice(1,-1);return{type:"em",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}const j=u.slice(2,-2);return{type:"strong",raw:u,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,s;return t[2]==="@"?(r=t[1],s="mailto:"+r):(r=t[1],s=r),{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let s,o;if(t[2]==="@")s=t[0],o="mailto:"+s;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);s=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},re=class Fe{constructor(t){P(this,"tokens");P(this,"options");P(this,"state");P(this,"tokenizer");P(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ue,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Q,block:Ce.normal,inline:be.normal};this.options.pedantic?(r.block=Ce.pedantic,r.inline=be.pedantic):this.options.gfm&&(r.block=Ce.gfm,this.options.breaks?r.inline=be.breaks:r.inline=be.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ce,inline:be}}static lex(t,r){return new Fe(r).lex(t)}static lexInline(t,r){return new Fe(r).inlineTokens(t)}lex(t){t=t.replace(Q.carriageReturn,`
182
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],s=!1){var o,a,d;for(this.options.pedantic&&(t=t.replace(Q.tabCharGlobal," ").replace(Q.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(i=>(l=i.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const i=r.at(-1);l.raw.length===1&&i!==void 0?i.raw+=`
178
183
  `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const i=r.at(-1);(i==null?void 0:i.type)==="paragraph"||(i==null?void 0:i.type)==="text"?(i.raw+=`
179
184
  `+l.raw,i.text+=`
180
185
  `+l.text,this.inlineQueue.at(-1).src=i.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const i=r.at(-1);(i==null?void 0:i.type)==="paragraph"||(i==null?void 0:i.type)==="text"?(i.raw+=`
181
186
  `+l.raw,i.text+=`
182
- `+l.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let h=t;if((c=this.options.extensions)!=null&&c.startBlock){let i=1/0;const d=t.slice(1);let g;this.options.extensions.startBlock.forEach(u=>{g=u.call({lexer:this},d),typeof g=="number"&&g>=0&&(i=Math.min(i,g))}),i<1/0&&i>=0&&(h=t.substring(0,i+1))}if(this.state.top&&(l=this.tokenizer.paragraph(h))){const i=r.at(-1);s&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
187
+ `+l.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if((d=this.options.extensions)!=null&&d.startBlock){let i=1/0;const h=t.slice(1);let g;this.options.extensions.startBlock.forEach(u=>{g=u.call({lexer:this},h),typeof g=="number"&&g>=0&&(i=Math.min(i,g))}),i<1/0&&i>=0&&(c=t.substring(0,i+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){const i=r.at(-1);s&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=`
183
188
  `+l.raw,i.text+=`
184
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(l),s=h.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const i=r.at(-1);(i==null?void 0:i.type)==="text"?(i.raw+=`
189
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(l),s=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const i=r.at(-1);(i==null?void 0:i.type)==="text"?(i.raw+=`
185
190
  `+l.raw,i.text+=`
186
- `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(l);continue}if(t){const i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,i;let s=t,n=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,c="";for(;t;){o||(c=""),o=!1;let d;if((h=(l=this.options.extensions)==null?void 0:l.inline)!=null&&h.some(u=>(d=u.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);const u=r.at(-1);d.type==="text"&&(u==null?void 0:u.type)==="text"?(u.raw+=d.raw,u.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,s,c)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((i=this.options.extensions)!=null&&i.startInline){let u=1/0;const v=t.slice(1);let p;this.options.extensions.startInline.forEach(k=>{p=k.call({lexer:this},v),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(g=t.substring(0,u+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(c=d.raw.slice(-1)),o=!0;const u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=d.raw,u.text+=d.text):r.push(d);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},$e=class{constructor(e){M(this,"options");M(this,"parser");this.options=e||ie}space(e){return""}code({text:e,lang:t,escaped:r}){var o;const s=(o=(t||"").match(U.notSpaceStart))==null?void 0:o[0],n=e.replace(U.endingNewline,"")+`
187
- `;return s?'<pre><code class="language-'+K(s)+'">'+(r?n:K(n,!0))+`</code></pre>
188
- `:"<pre><code>"+(r?n:K(n,!0))+`</code></pre>
191
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(l);continue}if(t){const i="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,i;let s=t,o=null;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,d="";for(;t;){a||(d=""),a=!1;let h;if((c=(l=this.options.extensions)==null?void 0:l.inline)!=null&&c.some(u=>(h=u.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);const u=r.at(-1);h.type==="text"&&(u==null?void 0:u.type)==="text"?(u.raw+=h.raw,u.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,s,d)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let g=t;if((i=this.options.extensions)!=null&&i.startInline){let u=1/0;const j=t.slice(1);let p;this.options.extensions.startInline.forEach(v=>{p=v.call({lexer:this},j),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(g=t.substring(0,u+1))}if(h=this.tokenizer.inlineText(g)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(d=h.raw.slice(-1)),a=!0;const u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=h.raw,u.text+=h.text):r.push(h);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},Te=class{constructor(e){P(this,"options");P(this,"parser");this.options=e||ue}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const s=(a=(t||"").match(Q.notSpaceStart))==null?void 0:a[0],o=e.replace(Q.endingNewline,"")+`
192
+ `;return s?'<pre><code class="language-'+Y(s)+'">'+(r?o:Y(o,!0))+`</code></pre>
193
+ `:"<pre><code>"+(r?o:Y(o,!0))+`</code></pre>
189
194
  `}blockquote({tokens:e}){return`<blockquote>
190
195
  ${this.parser.parse(e)}</blockquote>
191
196
  `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
192
197
  `}hr(e){return`<hr>
193
- `}list(e){const t=e.ordered,r=e.start;let s="";for(let c=0;c<e.items.length;c++){const l=e.items[c];s+=this.listitem(l)}const n=t?"ol":"ul",o=t&&r!==1?' start="'+r+'"':"";return"<"+n+o+`>
194
- `+s+"</"+n+`>
195
- `}listitem(e){var r;let t="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=s+" "+K(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):t+=s+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
198
+ `}list(e){const t=e.ordered,r=e.start;let s="";for(let d=0;d<e.items.length;d++){const l=e.items[d];s+=this.listitem(l)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
199
+ `+s+"</"+o+`>
200
+ `}listitem(e){var r;let t="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=s+" "+Y(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):t+=s+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
196
201
  `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
197
- `}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let s="";for(let n=0;n<e.rows.length;n++){const o=e.rows[n];r="";for(let c=0;c<o.length;c++)r+=this.tablecell(o[c]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
202
+ `}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let s="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let d=0;d<a.length;d++)r+=this.tablecell(a[d]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
198
203
  <thead>
199
204
  `+t+`</thead>
200
205
  `+s+`</table>
201
206
  `}tablerow({text:e}){return`<tr>
202
207
  ${e}</tr>
203
208
  `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
204
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${K(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const s=this.parser.parseInline(r),n=ft(e);if(n===null)return s;e=n;let o='<a href="'+e+'"';return t&&(o+=' title="'+K(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));const n=ft(e);if(n===null)return K(r);e=n;let o=`<img src="${e}" alt="${r}"`;return t&&(o+=` title="${K(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:K(e.text)}},tt=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ee=class Oe{constructor(t){M(this,"options");M(this,"renderer");M(this,"textRenderer");this.options=t||ie,this.options.renderer=this.options.renderer||new $e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tt}static parse(t,r){return new Oe(r).parse(t)}static parseInline(t,r){return new Oe(r).parseInline(t)}parse(t,r=!0){var n,o;let s="";for(let c=0;c<t.length;c++){const l=t[c];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[l.type]){const i=l,d=this.options.extensions.renderers[i.type].call({parser:this},i);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){s+=d||"";continue}}const h=l;switch(h.type){case"space":{s+=this.renderer.space(h);continue}case"hr":{s+=this.renderer.hr(h);continue}case"heading":{s+=this.renderer.heading(h);continue}case"code":{s+=this.renderer.code(h);continue}case"table":{s+=this.renderer.table(h);continue}case"blockquote":{s+=this.renderer.blockquote(h);continue}case"list":{s+=this.renderer.list(h);continue}case"html":{s+=this.renderer.html(h);continue}case"paragraph":{s+=this.renderer.paragraph(h);continue}case"text":{let i=h,d=this.renderer.text(i);for(;c+1<t.length&&t[c+1].type==="text";)i=t[++c],d+=`
205
- `+this.renderer.text(i);r?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}parseInline(t,r=this.renderer){var n,o;let s="";for(let c=0;c<t.length;c++){const l=t[c];if((o=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&o[l.type]){const i=this.options.extensions.renderers[l.type].call({parser:this},l);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=i||"";continue}}const h=l;switch(h.type){case"escape":{s+=r.text(h);break}case"html":{s+=r.html(h);break}case"link":{s+=r.link(h);break}case"image":{s+=r.image(h);break}case"strong":{s+=r.strong(h);break}case"em":{s+=r.em(h);break}case"codespan":{s+=r.codespan(h);break}case"br":{s+=r.br(h);break}case"del":{s+=r.del(h);break}case"text":{s+=r.text(h);break}default:{const i='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}},Ee,Ne=(Ee=class{constructor(e){M(this,"options");M(this,"block");this.options=e||ie}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?J.lex:J.lexInline}provideParser(){return this.block?ee.parse:ee.parseInline}},M(Ee,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ee),Vn=class{constructor(...e){M(this,"defaults",He());M(this,"options",this.setOptions);M(this,"parse",this.parseMarkdown(!0));M(this,"parseInline",this.parseMarkdown(!1));M(this,"Parser",ee);M(this,"Renderer",$e);M(this,"TextRenderer",tt);M(this,"Lexer",J);M(this,"Tokenizer",Re);M(this,"Hooks",Ne);this.use(...e)}walkTokens(e,t){var s,n;let r=[];for(const o of e)switch(r=r.concat(t.call(this,o)),o.type){case"table":{const c=o;for(const l of c.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of c.rows)for(const h of l)r=r.concat(this.walkTokens(h.tokens,t));break}case"list":{const c=o;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=o;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[c.type]?this.defaults.extensions.childTokens[c.type].forEach(l=>{const h=c[l].flat(1/0);r=r.concat(this.walkTokens(h,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const o=t.renderers[n.name];o?t.renderers[n.name]=function(...c){let l=n.renderer.apply(this,c);return l===!1&&(l=o.apply(this,c)),l}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[n.level];o?o.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),s.extensions=t),r.renderer){const n=this.defaults.renderer||new $e(this.defaults);for(const o in r.renderer){if(!(o in n))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const c=o,l=r.renderer[c],h=n[c];n[c]=(...i)=>{let d=l.apply(n,i);return d===!1&&(d=h.apply(n,i)),d||""}}s.renderer=n}if(r.tokenizer){const n=this.defaults.tokenizer||new Re(this.defaults);for(const o in r.tokenizer){if(!(o in n))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const c=o,l=r.tokenizer[c],h=n[c];n[c]=(...i)=>{let d=l.apply(n,i);return d===!1&&(d=h.apply(n,i)),d}}s.tokenizer=n}if(r.hooks){const n=this.defaults.hooks||new Ne;for(const o in r.hooks){if(!(o in n))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const c=o,l=r.hooks[c],h=n[c];Ne.passThroughHooks.has(o)?n[c]=i=>{if(this.defaults.async)return Promise.resolve(l.call(n,i)).then(g=>h.call(n,g));const d=l.call(n,i);return h.call(n,d)}:n[c]=(...i)=>{let d=l.apply(n,i);return d===!1&&(d=h.apply(n,i)),d}}s.hooks=n}if(r.walkTokens){const n=this.defaults.walkTokens,o=r.walkTokens;s.walkTokens=function(c){let l=[];return l.push(o.call(this,c)),n&&(l=l.concat(n.call(this,c))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return J.lex(e,t??this.defaults)}parser(e,t){return ee.parse(e,t??this.defaults)}parseMarkdown(e){return(r,s)=>{const n={...s},o={...this.defaults,...n},c=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?J.lex:J.lexInline,h=o.hooks?o.hooks.provideParser():e?ee.parse:ee.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(i=>l(i,o)).then(i=>o.hooks?o.hooks.processAllTokens(i):i).then(i=>o.walkTokens?Promise.all(this.walkTokens(i,o.walkTokens)).then(()=>i):i).then(i=>h(i,o)).then(i=>o.hooks?o.hooks.postprocess(i):i).catch(c);try{o.hooks&&(r=o.hooks.preprocess(r));let i=l(r,o);o.hooks&&(i=o.hooks.processAllTokens(i)),o.walkTokens&&this.walkTokens(i,o.walkTokens);let d=h(i,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(i){return c(i)}}}onError(e,t){return r=>{if(r.message+=`
206
- Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+K(r.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(r);throw r}}},ae=new Vn;function _(e,t){return ae.parse(e,t)}_.options=_.setOptions=function(e){return ae.setOptions(e),_.defaults=ae.defaults,ur(_.defaults),_};_.getDefaults=He;_.defaults=ie;_.use=function(...e){return ae.use(...e),_.defaults=ae.defaults,ur(_.defaults),_};_.walkTokens=function(e,t){return ae.walkTokens(e,t)};_.parseInline=ae.parseInline;_.Parser=ee;_.parser=ee.parse;_.Renderer=$e;_.TextRenderer=tt;_.Lexer=J;_.lexer=J.lex;_.Tokenizer=Re;_.Hooks=Ne;_.parse=_;_.options;_.setOptions;_.use;_.walkTokens;_.parseInline;ee.parse;J.lex;const Hn=({content:e,articleTitle:t,className:r=""})=>{const s=C.useMemo(()=>{if(!e)return"";let o=e.trim();if(t){const c=t.toLowerCase().trim(),l=o.match(/^#\s+(.+)$/m);if(l){const h=l[1].toLowerCase().trim();(c.includes(h)||h.includes(c))&&(o=o.replace(/^#\s+.+\n?/,"").trim())}}return o},[e,t]),n=C.useMemo(()=>{if(!s)return"";try{return _.parse(s,{gfm:!0,breaks:!0})}catch(o){return console.error("Error al parsear markdown:",o),s}},[s]);return a.jsx("div",{className:`relative ${r}`,children:a.jsx("div",{className:"markdown-body text-xs sm:text-sm text-slate-700 dark:text-slate-300 leading-relaxed",dangerouslySetInnerHTML:{__html:n}})})},Un=({brand:e,groups:t,footer:r,collapsed:s=!1,onToggleCollapse:n,mobileOpen:o=!1,onMobileClose:c,className:l=""})=>{const[h,i]=C.useState(()=>{const p=t.find(z=>z.items.some(A=>A.active));if(p)return p.id||null;const k=t.find(z=>z.collapsible!==!1&&!z.defaultCollapsed);return(k==null?void 0:k.id)||null}),d=C.useRef(null);C.useEffect(()=>{const p=t.find(z=>z.items.some(A=>A.active)),k=(p==null?void 0:p.id)||null;k&&k!==d.current&&(d.current=k,i(k))},[t]);const g=p=>{i(k=>k===p?null:p)},u={default:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border-slate-200 dark:border-slate-700",success:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20"},v=a.jsxs("aside",{className:w("h-screen bg-white/95 dark:bg-[#0D121F]/95 border-r border-slate-200 dark:border-slate-800 flex flex-col transition-[width] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] select-none shrink-0",s?"w-16 overflow-visible":"w-64 overflow-hidden",l),children:[a.jsxs("div",{className:"h-16 flex items-center px-3 border-b border-slate-200 dark:border-slate-800 shrink-0 relative justify-between",children:[e&&a.jsx("div",{onClick:e.onClick,className:w("flex items-center min-w-0 transition-opacity",e.onClick?"cursor-pointer hover:opacity-80":"",s?"justify-center w-full":"gap-2.5 pl-1"),title:e.name,children:s?e.collapsedLogo||e.logo||a.jsx("div",{className:"w-8 h-8 rounded-xl bg-indigo-600 text-white font-mono font-bold flex items-center justify-center text-sm shadow-xs",children:e.name?e.name.charAt(0).toUpperCase():"A"}):a.jsxs(a.Fragment,{children:[e.logo,(e.name||e.subtitle)&&a.jsxs("div",{className:"flex flex-col min-w-0",children:[e.name&&a.jsx("span",{className:"text-xs font-mono font-bold text-slate-900 dark:text-white truncate tracking-tight",children:e.name}),e.subtitle&&a.jsx("span",{className:"text-[10px] font-mono text-slate-500 dark:text-slate-400 truncate",children:e.subtitle})]})]})}),!s&&n&&a.jsx("button",{type:"button",onClick:n,title:"Colapsar menú",className:"p-1.5 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer shrink-0",children:a.jsx(Gs,{className:"w-4 h-4"})}),c&&a.jsx("button",{type:"button",onClick:c,className:"p-1.5 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors md:hidden",children:a.jsx(Ze,{className:"w-4 h-4"})})]}),a.jsx("div",{className:w("flex-1 custom-scrollbar",s?"overflow-visible p-2 space-y-2 flex flex-col items-center":"overflow-y-auto overflow-x-hidden p-2.5 space-y-4"),children:t.filter(p=>p.items&&p.items.length>0).map((p,k)=>{const z=p.id||`group-${k}`,A=p.collapsible!==!1&&!!p.label,R=!A||h===z,E=p.items.some(N=>N.active),L=p.items.find(N=>N.active)||p.items[0];return s?a.jsxs("div",{className:"relative group/flyout",children:[a.jsx("button",{type:"button",onClick:L.onClick,className:w("w-10 h-10 rounded-xl flex items-center justify-center transition-all cursor-pointer select-none",E?"bg-indigo-600 text-white shadow-md shadow-indigo-500/25":"text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800/80"),children:L.icon}),a.jsxs("div",{className:"absolute left-full top-0 ml-3 w-60 p-2 bg-white/95 dark:bg-[#0D121F]/95 backdrop-blur-md rounded-2xl border border-slate-200 dark:border-slate-800 shadow-2xl opacity-0 pointer-events-none group-hover/flyout:opacity-100 group-hover/flyout:pointer-events-auto transition-all duration-150 ease-out translate-x-1 group-hover/flyout:translate-x-0 z-50 before:absolute before:-left-3 before:top-0 before:w-3 before:h-full",children:[p.label&&a.jsx("div",{className:"px-2.5 py-1 border-b border-slate-100 dark:border-slate-800/70 mb-1.5 flex items-center justify-between",children:a.jsx("span",{className:"text-[10px] font-mono uppercase tracking-widest font-bold text-indigo-600 dark:text-indigo-400",children:p.label})}),a.jsx("div",{className:"space-y-0.5",children:p.items.map(N=>a.jsxs("button",{type:"button",onClick:N.onClick,className:w("w-full h-9 px-2.5 rounded-xl font-mono text-xs font-semibold flex items-center transition-colors cursor-pointer",N.active?"bg-indigo-600 text-white shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800/60"),children:[a.jsx("span",{className:"mr-2.5 shrink-0",children:N.icon}),a.jsx("span",{className:"truncate flex-1 text-left",children:N.label}),N.badge!==void 0&&a.jsx("span",{className:w("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold ml-1.5",u[N.badgeVariant||"default"]),children:N.badge})]},N.id))})]})]},z):a.jsxs("div",{className:"space-y-1",children:[p.label&&(A?a.jsxs("button",{type:"button",onClick:()=>g(z),className:w("w-full flex items-center justify-between px-2.5 py-1 text-[10px] font-mono uppercase tracking-widest transition-colors cursor-pointer select-none group/gh",E?"text-indigo-600 dark:text-indigo-400 font-bold":"text-slate-400 dark:text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 font-semibold"),children:[a.jsx("span",{className:"truncate",children:p.label}),a.jsx(We,{className:w("w-3.5 h-3.5 transition-transform duration-200 shrink-0",E?"text-indigo-500 dark:text-indigo-400":"text-slate-400 group-hover/gh:text-slate-600 dark:group-hover/gh:text-slate-300",!R&&"-rotate-90")})]}):a.jsx("div",{className:"px-2 pb-1.5 text-[10px] font-mono font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider",children:p.label})),a.jsx("div",{className:w("space-y-0.5 transition-all duration-200 ease-in-out overflow-hidden",A&&!R?"max-h-0 opacity-0":"max-h-[800px] opacity-100"),children:p.items.map(N=>{const P=u[N.badgeVariant||"default"];return a.jsx("div",{className:"relative group/navitem",children:a.jsxs("button",{type:"button",onClick:N.onClick,className:w("w-full flex items-center gap-3 px-2.5 py-2 rounded-xl text-xs font-medium transition-all duration-150 cursor-pointer select-none",N.active?"bg-indigo-50 dark:bg-indigo-950/40 text-indigo-600 dark:text-indigo-400 font-semibold border border-indigo-200/70 dark:border-indigo-800/60 shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white hover:bg-slate-100/80 dark:hover:bg-slate-800/60 border border-transparent"),children:[a.jsx("span",{className:"shrink-0 flex items-center justify-center",children:N.icon}),a.jsx("span",{className:"truncate flex-1 text-left",children:N.label}),N.badge!==void 0&&a.jsx("span",{className:w("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold",P),children:N.badge})]})},N.id)})})]},z)})}),a.jsxs("div",{className:"border-t border-slate-200 dark:border-slate-800 p-2.5 shrink-0 bg-slate-50/50 dark:bg-slate-900/30",children:[s&&n&&a.jsx("div",{className:"flex justify-center mb-2",children:a.jsx("button",{type:"button",onClick:n,title:"Expandir menú",className:"p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-200/60 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:a.jsx(Os,{className:"w-4 h-4"})})}),r]})]});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"hidden md:block shrink-0",children:v}),o&&a.jsxs("div",{className:"fixed inset-0 z-50 md:hidden flex",children:[a.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-xs transition-opacity",onClick:c}),a.jsx("div",{className:"relative z-10",children:v})]})]})},Qn=({breadcrumbs:e,title:t,subtitle:r,actions:s,userMenu:n,notificationSlot:o,themeToggle:c,onMobileMenuToggle:l,className:h=""})=>a.jsxs("header",{className:w("h-16 border-b border-slate-200 dark:border-slate-800 bg-white/95 dark:bg-[#0D121F]/95 backdrop-blur-md px-4 sm:px-6 flex items-center justify-between shrink-0 select-none z-30 transition-colors",h),children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l&&a.jsx("button",{type:"button",onClick:l,className:"p-2 -ml-2 rounded-xl text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors md:hidden","aria-label":"Abrir menú",children:a.jsx(Ds,{className:"w-5 h-5"})}),e&&e.length>0?a.jsx("nav",{className:"flex items-center gap-1.5 text-xs font-mono overflow-x-auto no-scrollbar py-1",children:e.map((i,d)=>{const g=d===e.length-1;return a.jsxs(C.Fragment,{children:[a.jsxs("div",{onClick:i.onClick,className:w("flex items-center gap-1.5 transition-colors whitespace-nowrap",i.onClick?"cursor-pointer hover:text-indigo-600 dark:hover:text-indigo-400":"",g?"font-bold text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400 font-medium"),children:[i.icon&&a.jsx("span",{className:"shrink-0",children:i.icon}),a.jsx("span",{className:i.color||"",children:i.label})]}),!g&&a.jsx(Ut,{className:"w-3.5 h-3.5 text-slate-400 dark:text-slate-600 shrink-0"})]},d)})}):(t||r)&&a.jsxs("div",{className:"flex flex-col min-w-0",children:[t&&a.jsx("h1",{className:"text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate tracking-tight",children:t}),r&&a.jsx("p",{className:"text-[11px] font-mono text-slate-500 dark:text-slate-400 truncate",children:r})]})]}),a.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[s&&a.jsx("div",{className:"flex items-center gap-2",children:s}),o,c&&a.jsx("button",{type:"button",onClick:c.onToggle,title:c.theme==="dark"?"Cambiar a modo claro":"Cambiar a modo oscuro",className:"p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:c.theme==="dark"?a.jsx(Ws,{className:"w-4 h-4 text-amber-400"}):a.jsx(Bs,{className:"w-4 h-4 text-slate-600"})}),n]})]}),Kn=({notifications:e,unreadCount:t,onMarkAllAsRead:r,onNotificationClick:s,emptyTitle:n="Sin notificaciones",emptyDescription:o="Todo está al día en tu panel.",className:c=""})=>{const[l,h]=C.useState(!1),i=C.useRef(null),d=t!==void 0?t:e.filter(u=>!u.read).length;C.useEffect(()=>{const u=v=>{i.current&&!i.current.contains(v.target)&&h(!1)};return l&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[l]);const g={info:a.jsx(Ps,{className:"w-4 h-4 text-indigo-500"}),success:a.jsx(Es,{className:"w-4 h-4 text-emerald-500"}),warning:a.jsx(lr,{className:"w-4 h-4 text-amber-500"}),error:a.jsx(Ms,{className:"w-4 h-4 text-rose-500"})};return a.jsxs("div",{ref:i,className:w("relative inline-block",c),children:[a.jsxs("button",{type:"button",onClick:()=>h(!l),className:w("p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors relative cursor-pointer",l&&"bg-slate-100 dark:bg-slate-800 text-slate-800 dark:text-white"),"aria-label":"Notificaciones",children:[a.jsx(ut,{className:"w-4 h-4"}),d>0&&a.jsx("span",{className:"absolute top-1 right-1 min-w-[16px] h-4 px-1 rounded-full bg-indigo-600 text-white text-[10px] font-mono font-bold flex items-center justify-center animate-pulse",children:d>99?"99+":d})]}),l&&a.jsxs("div",{className:"absolute right-0 mt-2 w-80 sm:w-96 bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-2xl shadow-xl z-50 overflow-hidden flex flex-col max-h-[480px] animate-in fade-in zoom-in-95 duration-100",children:[a.jsxs("div",{className:"p-3.5 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50/50 dark:bg-slate-900/40",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-mono font-bold text-slate-900 dark:text-white uppercase tracking-wider",children:"Notificaciones"}),d>0&&a.jsxs("span",{className:"text-[10px] font-mono font-bold px-1.5 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-950 text-indigo-600 dark:text-indigo-400 border border-indigo-200 dark:border-indigo-800",children:[d," nuevas"]})]}),r&&d>0&&a.jsxs("button",{type:"button",onClick:r,className:"text-[11px] font-mono text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 flex items-center gap-1 transition-colors cursor-pointer",children:[a.jsx(Wt,{className:"w-3.5 h-3.5"}),"Marcar leídas"]})]}),a.jsx("div",{className:"overflow-y-auto flex-1 divide-y divide-slate-100 dark:divide-slate-800/60 custom-scrollbar",children:e.length===0?a.jsxs("div",{className:"p-8 text-center flex flex-col items-center",children:[a.jsx(ut,{className:"w-8 h-8 text-slate-300 dark:text-slate-700 mb-2"}),a.jsx("p",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300",children:n}),a.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400 mt-0.5",children:o})]}):e.map(u=>a.jsxs("div",{onClick:()=>s&&s(u),className:w("p-3.5 transition-colors flex gap-3 text-left",s?"cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-900/60":"",u.read?"":"bg-indigo-50/30 dark:bg-indigo-950/15"),children:[a.jsx("div",{className:"shrink-0 mt-0.5",children:g[u.type||"info"]}),a.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-xs font-semibold text-slate-800 dark:text-slate-200 leading-snug",children:u.title}),!u.read&&a.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-600 shrink-0 mt-1"})]}),u.description&&a.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed",children:u.description}),a.jsxs("div",{className:"flex items-center justify-between pt-1",children:[u.timestamp&&a.jsx("span",{className:"text-[10px] font-mono text-slate-400 dark:text-slate-500",children:typeof u.timestamp=="string"?u.timestamp:u.timestamp.toLocaleDateString()}),u.onAction&&u.actionLabel&&a.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),u.onAction()},className:"text-[11px] font-mono text-indigo-600 dark:text-indigo-400 font-semibold hover:underline cursor-pointer",children:u.actionLabel})]})]})]},u.id))})]})]})},Xn=({sidebar:e,topNav:t,children:r,className:s=""})=>a.jsxs("div",{className:w("flex h-screen w-screen overflow-hidden bg-slate-50 dark:bg-[#0B0F19] text-slate-900 dark:text-slate-100 font-sans transition-colors duration-200 select-none",s),children:[e,a.jsxs("div",{className:"flex-1 flex flex-col h-full min-w-0 overflow-hidden",children:[t,a.jsx("main",{className:"flex-1 overflow-y-auto overflow-x-hidden relative flex flex-col min-w-0 custom-scrollbar select-text",children:r})]})]}),Yn=({topBar:e,canvas:t,controlPanel:r,className:s=""})=>a.jsxs("div",{className:w("flex flex-col h-screen w-screen overflow-hidden bg-[#07090E] text-slate-100 font-sans select-none",s),children:[e,a.jsxs("div",{className:"flex-1 flex overflow-hidden relative",children:[a.jsx("main",{className:"flex-1 overflow-auto flex items-center justify-center p-6 bg-[radial-gradient(#1e293b_1px,transparent_1px)] [background-size:24px_24px] select-text",children:t}),r]})]});exports.AppLayout=Xn;exports.Badge=Et;exports.Button=Ce;exports.Card=Pt;exports.ConfirmDialog=tn;exports.DatePicker=dn;exports.EmptyState=rn;exports.FormField=Js;exports.Input=Dt;exports.MarkdownRenderer=Hn;exports.MetricStatCard=sn;exports.MetricStrip=nn;exports.Modal=cr;exports.ModalBody=Ve;exports.ModalContent=Qs;exports.ModalFooter=hr;exports.ModalHeader=dr;exports.NotificationCenter=Kn;exports.SearchInput=en;exports.Select=Zs;exports.Sidebar=Un;exports.SocialIcon=Ys;exports.Spinner=Xs;exports.StatusBadge=an;exports.StatusToggle=Hs;exports.StudioLayout=Yn;exports.Textarea=Bt;exports.Toggle=Vs;exports.TopNav=Qn;exports.cn=w;
209
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Y(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const s=this.parser.parseInline(r),o=wt(e);if(o===null)return s;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Y(t)+'"'),a+=">"+s+"</a>",a}image({href:e,title:t,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));const o=wt(e);if(o===null)return Y(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Y(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Y(e.text)}},ot=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},se=class We{constructor(t){P(this,"options");P(this,"renderer");P(this,"textRenderer");this.options=t||ue,this.options.renderer=this.options.renderer||new Te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ot}static parse(t,r){return new We(r).parse(t)}static parseInline(t,r){return new We(r).parseInline(t)}parse(t,r=!0){var o,a;let s="";for(let d=0;d<t.length;d++){const l=t[d];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const i=l,h=this.options.extensions.renderers[i.type].call({parser:this},i);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(i.type)){s+=h||"";continue}}const c=l;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let i=c,h=this.renderer.text(i);for(;d+1<t.length&&t[d+1].type==="text";)i=t[++d],h+=`
210
+ `+this.renderer.text(i);r?s+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):s+=h;continue}default:{const i='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}parseInline(t,r=this.renderer){var o,a;let s="";for(let d=0;d<t.length;d++){const l=t[d];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const i=this.options.extensions.renderers[l.type].call({parser:this},l);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=i||"";continue}}const c=l;switch(c.type){case"escape":{s+=r.text(c);break}case"html":{s+=r.html(c);break}case"link":{s+=r.link(c);break}case"image":{s+=r.image(c);break}case"strong":{s+=r.strong(c);break}case"em":{s+=r.em(c);break}case"codespan":{s+=r.codespan(c);break}case"br":{s+=r.br(c);break}case"del":{s+=r.del(c);break}case"text":{s+=r.text(c);break}default:{const i='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}},Be,ze=(Be=class{constructor(e){P(this,"options");P(this,"block");this.options=e||ue}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?re.lex:re.lexInline}provideParser(){return this.block?se.parse:se.parseInline}},P(Be,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Be),oo=class{constructor(...e){P(this,"defaults",Xe());P(this,"options",this.setOptions);P(this,"parse",this.parseMarkdown(!0));P(this,"parseInline",this.parseMarkdown(!1));P(this,"Parser",se);P(this,"Renderer",Te);P(this,"TextRenderer",ot);P(this,"Lexer",re);P(this,"Tokenizer",Le);P(this,"Hooks",ze);this.use(...e)}walkTokens(e,t){var s,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const d=a;for(const l of d.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of d.rows)for(const c of l)r=r.concat(this.walkTokens(c.tokens,t));break}case"list":{const d=a;r=r.concat(this.walkTokens(d.items,t));break}default:{const d=a;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[d.type]?this.defaults.extensions.childTokens[d.type].forEach(l=>{const c=d[l].flat(1/0);r=r.concat(this.walkTokens(c,t))}):d.tokens&&(r=r.concat(this.walkTokens(d.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...d){let l=o.renderer.apply(this,d);return l===!1&&(l=a.apply(this,d)),l}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),s.extensions=t),r.renderer){const o=this.defaults.renderer||new Te(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const d=a,l=r.renderer[d],c=o[d];o[d]=(...i)=>{let h=l.apply(o,i);return h===!1&&(h=c.apply(o,i)),h||""}}s.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Le(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const d=a,l=r.tokenizer[d],c=o[d];o[d]=(...i)=>{let h=l.apply(o,i);return h===!1&&(h=c.apply(o,i)),h}}s.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new ze;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const d=a,l=r.hooks[d],c=o[d];ze.passThroughHooks.has(a)?o[d]=i=>{if(this.defaults.async)return Promise.resolve(l.call(o,i)).then(g=>c.call(o,g));const h=l.call(o,i);return c.call(o,h)}:o[d]=(...i)=>{let h=l.apply(o,i);return h===!1&&(h=c.apply(o,i)),h}}s.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;s.walkTokens=function(d){let l=[];return l.push(a.call(this,d)),o&&(l=l.concat(o.call(this,d))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return re.lex(e,t??this.defaults)}parser(e,t){return se.parse(e,t??this.defaults)}parseMarkdown(e){return(r,s)=>{const o={...s},a={...this.defaults,...o},d=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&o.async===!1)return d(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return d(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return d(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const l=a.hooks?a.hooks.provideLexer():e?re.lex:re.lexInline,c=a.hooks?a.hooks.provideParser():e?se.parse:se.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(i=>l(i,a)).then(i=>a.hooks?a.hooks.processAllTokens(i):i).then(i=>a.walkTokens?Promise.all(this.walkTokens(i,a.walkTokens)).then(()=>i):i).then(i=>c(i,a)).then(i=>a.hooks?a.hooks.postprocess(i):i).catch(d);try{a.hooks&&(r=a.hooks.preprocess(r));let i=l(r,a);a.hooks&&(i=a.hooks.processAllTokens(i)),a.walkTokens&&this.walkTokens(i,a.walkTokens);let h=c(i,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(i){return d(i)}}}onError(e,t){return r=>{if(r.message+=`
211
+ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+Y(r.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(r);throw r}}},de=new oo;function M(e,t){return de.parse(e,t)}M.options=M.setOptions=function(e){return de.setOptions(e),M.defaults=de.defaults,Sr(M.defaults),M};M.getDefaults=Xe;M.defaults=ue;M.use=function(...e){return de.use(...e),M.defaults=de.defaults,Sr(M.defaults),M};M.walkTokens=function(e,t){return de.walkTokens(e,t)};M.parseInline=de.parseInline;M.Parser=se;M.parser=se.parse;M.Renderer=Te;M.TextRenderer=ot;M.Lexer=re;M.lexer=re.lex;M.Tokenizer=Le;M.Hooks=ze;M.parse=M;M.options;M.setOptions;M.use;M.walkTokens;M.parseInline;se.parse;re.lex;const ao=({content:e,articleTitle:t,className:r=""})=>{const s=y.useMemo(()=>{if(!e)return"";let a=e.trim();if(t){const d=t.toLowerCase().trim(),l=a.match(/^#\s+(.+)$/m);if(l){const c=l[1].toLowerCase().trim();(d.includes(c)||c.includes(d))&&(a=a.replace(/^#\s+.+\n?/,"").trim())}}return a},[e,t]),o=y.useMemo(()=>{if(!s)return"";try{return M.parse(s,{gfm:!0,breaks:!0})}catch(a){return console.error("Error al parsear markdown:",a),s}},[s]);return n.jsx("div",{className:`relative ${r}`,children:n.jsx("div",{className:"markdown-body text-xs sm:text-sm text-slate-700 dark:text-slate-300 leading-relaxed",dangerouslySetInnerHTML:{__html:o}})})},lo={"5/7":{left:"lg:col-span-5",right:"lg:col-span-7"},"6/6":{left:"lg:col-span-6",right:"lg:col-span-6"},"4/8":{left:"lg:col-span-4",right:"lg:col-span-8"},"7/5":{left:"lg:col-span-7",right:"lg:col-span-5"}},io=({leftTitle:e,leftIcon:t,leftBadge:r,rightTitle:s,rightIcon:o,rightBadge:a,ratio:d="5/7",mobileMode:l="tabs",activeTab:c,defaultActiveTab:i="left",onTabChange:h,leftContent:g,leftFooter:u,leftClassName:j="",rightHeader:p,rightContent:v,rightFooter:S,rightClassName:$="",className:C=""})=>{const[I,q]=y.useState(i),A=c!==void 0?c:I,L=f=>{c===void 0&&q(f),h==null||h(f)},m=lo[d];return l==="tabs"?n.jsxs("div",{className:x("flex-1 min-h-0 flex flex-col h-full overflow-hidden select-none",C),children:[n.jsx("div",{className:"lg:hidden p-2.5 bg-slate-100 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 shrink-0",children:n.jsxs("div",{className:"flex rounded-xl bg-slate-200/70 dark:bg-slate-800/80 p-1 gap-1",children:[n.jsxs("button",{type:"button",onClick:()=>L("left"),className:x("flex-1 flex items-center justify-center gap-2 py-2 px-3 rounded-lg font-mono text-xs font-bold transition-all cursor-pointer truncate",A==="left"?"bg-white dark:bg-[#0D121F] text-indigo-600 dark:text-indigo-400 shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white"),children:[t&&n.jsx("span",{className:"shrink-0",children:t}),n.jsx("span",{className:"truncate",children:e}),r!==void 0&&n.jsx("span",{className:"ml-1 px-1.5 py-0.2 rounded-md bg-indigo-50 dark:bg-indigo-950 text-indigo-600 dark:text-indigo-400 text-[10px] font-bold",children:r})]}),n.jsxs("button",{type:"button",onClick:()=>L("right"),className:x("flex-1 flex items-center justify-center gap-2 py-2 px-3 rounded-lg font-mono text-xs font-bold transition-all cursor-pointer truncate",A==="right"?"bg-white dark:bg-[#0D121F] text-indigo-600 dark:text-indigo-400 shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white"),children:[o&&n.jsx("span",{className:"shrink-0",children:o}),n.jsx("span",{className:"truncate",children:s}),a!==void 0&&n.jsx("span",{className:"ml-1 px-1.5 py-0.2 rounded-md bg-indigo-50 dark:bg-indigo-950 text-indigo-600 dark:text-indigo-400 text-[10px] font-bold",children:a})]})]})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 flex-1 min-h-0 h-full overflow-hidden",children:[n.jsxs("div",{className:x("h-full flex flex-col min-h-0 border-slate-200 dark:border-slate-800 overflow-hidden",m.left,"lg:border-r",A==="left"?"flex":"hidden lg:flex",j),children:[n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",children:g}),u&&n.jsx("div",{className:"shrink-0",children:u})]}),n.jsxs("div",{className:x("h-full flex flex-col min-h-0 overflow-hidden",m.right,A==="right"?"flex":"hidden lg:flex",$),children:[p&&n.jsx("div",{className:"shrink-0",children:p}),n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",children:v}),S&&n.jsx("div",{className:"shrink-0",children:S})]})]})]}):n.jsx("div",{className:x("flex-1 min-h-0 flex flex-col h-full overflow-hidden",C),children:n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 flex-1 min-h-0 h-full overflow-y-auto lg:overflow-hidden modal-scrollbar",children:[n.jsxs("div",{className:x("flex flex-col min-h-0 border-b lg:border-b-0 lg:border-r border-slate-200 dark:border-slate-800 lg:h-full lg:overflow-hidden",m.left,j),children:[n.jsx("div",{className:"lg:flex-1 lg:min-h-0 lg:overflow-y-auto modal-scrollbar",children:g}),u&&n.jsx("div",{className:"shrink-0",children:u})]}),n.jsxs("div",{className:x("flex flex-col min-h-0 lg:h-full lg:overflow-hidden",m.right,$),children:[p&&n.jsx("div",{className:"shrink-0",children:p}),n.jsx("div",{className:"lg:flex-1 lg:min-h-0 lg:overflow-y-auto modal-scrollbar",children:v}),S&&n.jsx("div",{className:"shrink-0",children:S})]})]})})},co={"5/7":{left:"lg:col-span-5",right:"lg:col-span-7"},"6/6":{left:"lg:col-span-6",right:"lg:col-span-6"},"4/8":{left:"lg:col-span-4",right:"lg:col-span-8"},"7/5":{left:"lg:col-span-7",right:"lg:col-span-5"}},ho=({step1:e,step2:t,currentStep:r=1,completedSteps:s=[],onStepChange:o,ratio:a="5/7",className:d=""})=>{const l=co[a],c=[{id:"step-1",number:1,title:e.title,subtitle:e.subtitle,badge:e.badge},{id:"step-2",number:2,title:t.title,subtitle:t.subtitle,badge:t.badge}];return n.jsxs("div",{className:x("flex flex-col overflow-hidden select-none",d),children:[n.jsx("div",{className:"lg:hidden px-4 py-2.5 bg-slate-100/80 dark:bg-slate-900/90 border-b border-slate-200 dark:border-slate-800 shrink-0",children:n.jsx(br,{steps:c,currentStep:r,completedSteps:s,onStepClick:i=>o==null?void 0:o(i),allowStepBack:!0})}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 overflow-hidden",children:[n.jsxs("div",{className:x("flex flex-col border-slate-200 dark:border-slate-800 overflow-hidden",l.left,"lg:border-r",r===1?"flex":"hidden lg:flex",e.className),children:[e.header&&n.jsx("div",{className:"shrink-0",children:e.header}),n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",children:e.content}),e.footer&&n.jsx("div",{className:"shrink-0",children:e.footer})]}),n.jsxs("div",{className:x("flex flex-col overflow-hidden",l.right,r===2?"flex":"hidden lg:flex",t.className),children:[t.header&&n.jsx("div",{className:"shrink-0",children:t.header}),n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto overscroll-contain modal-scrollbar",children:t.content}),t.footer&&n.jsx("div",{className:"shrink-0",children:t.footer})]})]})]})},uo=({brand:e,groups:t,footer:r,collapsed:s=!1,onToggleCollapse:o,mobileOpen:a=!1,onMobileClose:d,className:l=""})=>{const[c,i]=y.useState(()=>{const p=t.find(S=>S.items.some($=>$.active));if(p)return p.id||null;const v=t.find(S=>S.collapsible!==!1&&!S.defaultCollapsed);return(v==null?void 0:v.id)||null}),h=y.useRef(null);y.useEffect(()=>{const p=t.find(S=>S.items.some($=>$.active)),v=(p==null?void 0:p.id)||null;v&&v!==h.current&&(h.current=v,i(v))},[t]);const g=p=>{i(v=>v===p?null:p)},u={default:"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border-slate-200 dark:border-slate-700",success:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20"},j=n.jsxs("aside",{className:x("h-screen bg-white/95 dark:bg-[#0D121F]/95 border-r border-slate-200 dark:border-slate-800 flex flex-col transition-[width] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] select-none shrink-0",s?"w-16 overflow-visible":"w-64 overflow-hidden",l),children:[n.jsxs("div",{className:"h-16 flex items-center px-3 border-b border-slate-200 dark:border-slate-800 shrink-0 relative justify-between",children:[e&&n.jsx("div",{onClick:e.onClick,className:x("flex items-center min-w-0 transition-opacity",e.onClick?"cursor-pointer hover:opacity-80":"",s?"justify-center w-full":"gap-2.5 pl-1"),title:e.name,children:s?e.collapsedLogo||e.logo||n.jsx("div",{className:"w-8 h-8 rounded-xl bg-indigo-600 text-white font-mono font-bold flex items-center justify-center text-sm shadow-xs",children:e.name?e.name.charAt(0).toUpperCase():"A"}):n.jsxs(n.Fragment,{children:[e.logo,(e.name||e.subtitle)&&n.jsxs("div",{className:"flex flex-col min-w-0",children:[e.name&&n.jsx("span",{className:"text-xs font-mono font-bold text-slate-900 dark:text-white truncate tracking-tight",children:e.name}),e.subtitle&&n.jsx("span",{className:"text-[10px] font-mono text-slate-500 dark:text-slate-400 truncate",children:e.subtitle})]})]})}),!s&&o&&n.jsx("button",{type:"button",onClick:o,title:"Colapsar menú",className:"p-1.5 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer shrink-0",children:n.jsx(Ys,{className:"w-4 h-4"})}),d&&n.jsx("button",{type:"button",onClick:d,className:"p-1.5 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors md:hidden",children:n.jsx(Qe,{className:"w-4 h-4"})})]}),n.jsx("div",{className:x("flex-1 custom-scrollbar",s?"overflow-visible p-2 space-y-2 flex flex-col items-center":"overflow-y-auto overflow-x-hidden p-2.5 space-y-4"),children:t.filter(p=>p.items&&p.items.length>0).map((p,v)=>{const S=p.id||`group-${v}`,$=p.collapsible!==!1&&!!p.label,C=!$||c===S,I=p.items.some(m=>m.active),A=p.items.find(m=>m.active)||p.items[0];if(!s)return n.jsxs("div",{className:"space-y-1",children:[p.label&&($?n.jsxs("button",{type:"button",onClick:()=>g(S),className:x("w-full flex items-center justify-between px-2.5 py-1 text-[10px] font-mono uppercase tracking-widest transition-colors cursor-pointer select-none group/gh",I?"text-indigo-600 dark:text-indigo-400 font-bold":"text-slate-400 dark:text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 font-semibold"),children:[n.jsx("span",{className:"truncate",children:p.label}),n.jsx(Ue,{className:x("w-3.5 h-3.5 transition-transform duration-200 shrink-0",I?"text-indigo-500 dark:text-indigo-400":"text-slate-400 group-hover/gh:text-slate-600 dark:group-hover/gh:text-slate-300",!C&&"-rotate-90")})]}):n.jsx("div",{className:"px-2 pb-1.5 text-[10px] font-mono font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider",children:p.label})),n.jsx("div",{className:x("space-y-0.5 transition-all duration-200 ease-in-out overflow-hidden",$&&!C?"max-h-0 opacity-0":"max-h-[800px] opacity-100"),children:p.items.map(m=>{const f=u[m.badgeVariant||"default"],B=m.external||m.target==="_blank";return m.href?n.jsx("div",{className:"relative group/navitem",children:n.jsxs("a",{href:m.href,target:m.target||(m.external?"_blank":void 0),rel:B?"noopener noreferrer":void 0,onClick:m.onClick,"data-tour":m.dataTour,className:x("w-full flex items-center gap-3 px-2.5 py-2 rounded-xl text-xs font-medium transition-all duration-150 cursor-pointer select-none",m.active?"bg-indigo-50 dark:bg-indigo-950/40 text-indigo-600 dark:text-indigo-400 font-semibold border border-indigo-200/70 dark:border-indigo-800/60 shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white hover:bg-slate-100/80 dark:hover:bg-slate-800/60 border border-transparent"),children:[n.jsx("span",{className:"shrink-0 flex items-center justify-center",children:m.icon}),n.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!==void 0&&n.jsx("span",{className:x("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold",f),children:m.badge}),B&&n.jsx(bt,{className:"w-3.5 h-3.5 opacity-50 group-hover/navitem:opacity-100 transition-opacity shrink-0 ml-1"})]})},m.id):n.jsx("div",{className:"relative group/navitem",children:n.jsxs("button",{type:"button",onClick:m.onClick,"data-tour":m.dataTour,className:x("w-full flex items-center gap-3 px-2.5 py-2 rounded-xl text-xs font-medium transition-all duration-150 cursor-pointer select-none",m.active?"bg-indigo-50 dark:bg-indigo-950/40 text-indigo-600 dark:text-indigo-400 font-semibold border border-indigo-200/70 dark:border-indigo-800/60 shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white hover:bg-slate-100/80 dark:hover:bg-slate-800/60 border border-transparent"),children:[n.jsx("span",{className:"shrink-0 flex items-center justify-center",children:m.icon}),n.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!==void 0&&n.jsx("span",{className:x("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold",f),children:m.badge})]})},m.id)})})]},S);const L=p.icon||(A==null?void 0:A.icon);return n.jsxs("div",{className:"relative group/flyout",children:[n.jsx("button",{type:"button",onClick:A==null?void 0:A.onClick,className:x("w-10 h-10 rounded-xl flex items-center justify-center transition-all cursor-pointer select-none",I?"bg-indigo-600 text-white shadow-md shadow-indigo-500/25":"text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800/80"),children:L}),n.jsxs("div",{className:"absolute left-full top-0 ml-3 w-60 p-2 bg-white/95 dark:bg-[#0D121F]/95 backdrop-blur-md rounded-2xl border border-slate-200 dark:border-slate-800 shadow-2xl opacity-0 pointer-events-none group-hover/flyout:opacity-100 group-hover/flyout:pointer-events-auto transition-all duration-150 ease-out translate-x-1 group-hover/flyout:translate-x-0 z-50 before:absolute before:-left-3 before:top-0 before:w-3 before:h-full",children:[p.label&&n.jsx("div",{className:"px-2.5 py-1 border-b border-slate-100 dark:border-slate-800/70 mb-1.5 flex items-center justify-between",children:n.jsx("span",{className:"text-[10px] font-mono uppercase tracking-widest font-bold text-indigo-600 dark:text-indigo-400",children:p.label})}),n.jsx("div",{className:"space-y-0.5",children:p.items.map(m=>{const f=m.external||m.target==="_blank";return m.href?n.jsxs("a",{href:m.href,target:m.target||(m.external?"_blank":void 0),rel:f?"noopener noreferrer":void 0,onClick:m.onClick,className:x("w-full h-9 px-2.5 rounded-xl font-mono text-xs font-semibold flex items-center transition-colors cursor-pointer",m.active?"bg-indigo-600 text-white shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800/60"),children:[n.jsx("span",{className:"mr-2.5 shrink-0",children:m.icon}),n.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!==void 0&&n.jsx("span",{className:x("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold ml-1.5",u[m.badgeVariant||"default"]),children:m.badge}),f&&n.jsx(bt,{className:"w-3.5 h-3.5 opacity-50 group-hover:opacity-100 transition-opacity shrink-0 ml-1"})]},m.id):n.jsxs("button",{type:"button",onClick:m.onClick,className:x("w-full h-9 px-2.5 rounded-xl font-mono text-xs font-semibold flex items-center transition-colors cursor-pointer",m.active?"bg-indigo-600 text-white shadow-xs":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-100 hover:bg-slate-100 dark:hover:bg-slate-800/60"),children:[n.jsx("span",{className:"mr-2.5 shrink-0",children:m.icon}),n.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!==void 0&&n.jsx("span",{className:x("text-[10px] font-mono px-1.5 py-0.5 rounded-md border font-semibold ml-1.5",u[m.badgeVariant||"default"]),children:m.badge})]},m.id)})})]})]},S)})}),n.jsxs("div",{className:"border-t border-slate-200 dark:border-slate-800 p-2.5 shrink-0 bg-slate-50/50 dark:bg-slate-900/30",children:[s&&o&&n.jsx("div",{className:"flex justify-center mb-2",children:n.jsx("button",{type:"button",onClick:o,title:"Expandir menú",className:"p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-200/60 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:n.jsx(Js,{className:"w-4 h-4"})})}),r]})]});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"hidden md:block shrink-0",children:j}),n.jsxs("div",{className:x("fixed inset-0 z-50 md:hidden pointer-events-none",a&&"pointer-events-auto"),"aria-hidden":!a,children:[n.jsx("div",{className:x("fixed inset-0 bg-black/60 backdrop-blur-xs transition-opacity duration-300 ease-out",a?"opacity-100":"opacity-0"),onClick:d}),n.jsx("div",{className:x("fixed inset-y-0 left-0 z-50 w-64 max-w-[85vw] h-full bg-white dark:bg-[#0D121F] shadow-2xl overflow-hidden transition-transform duration-300 ease-out will-change-transform flex flex-col",a?"translate-x-0":"-translate-x-full"),children:j})]})]})},po=({breadcrumbs:e,title:t,subtitle:r,actions:s,userMenu:o,notificationSlot:a,themeToggle:d,onMobileMenuToggle:l,className:c=""})=>n.jsxs("header",{className:x("h-16 border-b border-slate-200 dark:border-slate-800 bg-white/95 dark:bg-[#0D121F]/95 backdrop-blur-md px-4 sm:px-6 flex items-center justify-between shrink-0 select-none z-30 transition-colors",c),children:[n.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l&&n.jsx("button",{type:"button",onClick:l,className:"p-2 -ml-2 rounded-xl text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors md:hidden","aria-label":"Abrir menú",children:n.jsx(Ks,{className:"w-5 h-5"})}),e&&e.length>0?n.jsx("nav",{className:"flex items-center gap-1.5 text-xs font-mono overflow-x-auto no-scrollbar py-1",children:e.map((i,h)=>{const g=h===e.length-1;return n.jsxs(y.Fragment,{children:[n.jsxs("div",{onClick:i.onClick,className:x("flex items-center gap-1.5 transition-colors whitespace-nowrap",i.onClick?"cursor-pointer hover:text-indigo-600 dark:hover:text-indigo-400":"",g?"font-bold text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400 font-medium"),children:[i.icon&&n.jsx("span",{className:"shrink-0",children:i.icon}),n.jsx("span",{className:i.color||"",children:i.label})]}),!g&&n.jsx(Xt,{className:"w-3.5 h-3.5 text-slate-400 dark:text-slate-600 shrink-0"})]},h)})}):(t||r)&&n.jsxs("div",{className:"flex flex-col min-w-0",children:[t&&n.jsx("h1",{className:"text-sm sm:text-base font-bold text-slate-900 dark:text-white truncate tracking-tight",children:t}),r&&n.jsx("p",{className:"text-[11px] font-mono text-slate-500 dark:text-slate-400 truncate",children:r})]})]}),n.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),a,d&&n.jsx("button",{type:"button",onClick:d.onToggle,title:d.theme==="dark"?"Cambiar a modo claro":"Cambiar a modo oscuro",className:"p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors cursor-pointer",children:d.theme==="dark"?n.jsx(rn,{className:"w-4 h-4 text-amber-400"}):n.jsx(Xs,{className:"w-4 h-4 text-slate-600"})}),o]})]}),xo=({notifications:e,unreadCount:t,onMarkAllAsRead:r,onNotificationClick:s,emptyTitle:o="Sin notificaciones",emptyDescription:a="Todo está al día en tu panel.",className:d=""})=>{const[l,c]=y.useState(!1),i=y.useRef(null),h=t!==void 0?t:e.filter(u=>!u.read).length;y.useEffect(()=>{const u=j=>{i.current&&!i.current.contains(j.target)&&c(!1)};return l&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[l]);const g={info:n.jsx(Qs,{className:"w-4 h-4 text-indigo-500"}),success:n.jsx(Us,{className:"w-4 h-4 text-emerald-500"}),warning:n.jsx(hr,{className:"w-4 h-4 text-amber-500"}),error:n.jsx(Vs,{className:"w-4 h-4 text-rose-500"})};return n.jsxs("div",{ref:i,className:x("relative inline-block",d),children:[n.jsxs("button",{type:"button",onClick:()=>c(!l),className:x("p-2 rounded-xl text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors relative cursor-pointer",l&&"bg-slate-100 dark:bg-slate-800 text-slate-800 dark:text-white"),"aria-label":"Notificaciones",children:[n.jsx(xt,{className:"w-4 h-4"}),h>0&&n.jsx("span",{className:"absolute top-1 right-1 min-w-[16px] h-4 px-1 rounded-full bg-indigo-600 text-white text-[10px] font-mono font-bold flex items-center justify-center animate-pulse",children:h>99?"99+":h})]}),l&&n.jsxs("div",{className:"absolute right-0 mt-2 w-80 sm:w-96 bg-white dark:bg-[#0D121F] border border-slate-200 dark:border-slate-800 rounded-2xl shadow-xl z-50 overflow-hidden flex flex-col max-h-[480px] animate-in fade-in zoom-in-95 duration-100",children:[n.jsxs("div",{className:"p-3.5 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50/50 dark:bg-slate-900/40",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs font-mono font-bold text-slate-900 dark:text-white uppercase tracking-wider",children:"Notificaciones"}),h>0&&n.jsxs("span",{className:"text-[10px] font-mono font-bold px-1.5 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-950 text-indigo-600 dark:text-indigo-400 border border-indigo-200 dark:border-indigo-800",children:[h," nuevas"]})]}),r&&h>0&&n.jsxs("button",{type:"button",onClick:r,className:"text-[11px] font-mono text-slate-500 hover:text-indigo-600 dark:hover:text-indigo-400 flex items-center gap-1 transition-colors cursor-pointer",children:[n.jsx(Vt,{className:"w-3.5 h-3.5"}),"Marcar leídas"]})]}),n.jsx("div",{className:"overflow-y-auto flex-1 divide-y divide-slate-100 dark:divide-slate-800/60 custom-scrollbar",children:e.length===0?n.jsxs("div",{className:"p-8 text-center flex flex-col items-center",children:[n.jsx(xt,{className:"w-8 h-8 text-slate-300 dark:text-slate-700 mb-2"}),n.jsx("p",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300",children:o}),n.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400 mt-0.5",children:a})]}):e.map(u=>n.jsxs("div",{onClick:()=>s&&s(u),className:x("p-3.5 transition-colors flex gap-3 text-left",s?"cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-900/60":"",u.read?"":"bg-indigo-50/30 dark:bg-indigo-950/15"),children:[n.jsx("div",{className:"shrink-0 mt-0.5",children:g[u.type||"info"]}),n.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsx("p",{className:"text-xs font-semibold text-slate-800 dark:text-slate-200 leading-snug",children:u.title}),!u.read&&n.jsx("span",{className:"w-2 h-2 rounded-full bg-indigo-600 shrink-0 mt-1"})]}),u.description&&n.jsx("p",{className:"text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed",children:u.description}),n.jsxs("div",{className:"flex items-center justify-between pt-1",children:[u.timestamp&&n.jsx("span",{className:"text-[10px] font-mono text-slate-400 dark:text-slate-500",children:typeof u.timestamp=="string"?u.timestamp:u.timestamp.toLocaleDateString()}),u.onAction&&u.actionLabel&&n.jsx("button",{type:"button",onClick:j=>{j.stopPropagation(),u.onAction()},className:"text-[11px] font-mono text-indigo-600 dark:text-indigo-400 font-semibold hover:underline cursor-pointer",children:u.actionLabel})]})]})]},u.id))})]})]})},mo=({sidebar:e,topNav:t,children:r,className:s=""})=>n.jsxs("div",{className:x("flex h-screen w-screen overflow-hidden bg-slate-50 dark:bg-[#0B0F19] text-slate-900 dark:text-slate-100 font-sans transition-colors duration-200 select-none",s),children:[e,n.jsxs("div",{className:"flex-1 flex flex-col h-full min-w-0 overflow-hidden",children:[t,n.jsx("main",{className:"flex-1 overflow-y-auto overflow-x-hidden relative flex flex-col min-w-0 custom-scrollbar select-text",children:r})]})]}),bo=({topBar:e,canvas:t,controlPanel:r,className:s=""})=>n.jsxs("div",{className:x("flex flex-col h-screen w-screen overflow-hidden bg-[#07090E] text-slate-100 font-sans select-none",s),children:[e,n.jsxs("div",{className:"flex-1 flex overflow-hidden relative",children:[n.jsx("main",{className:"flex-1 overflow-auto flex items-center justify-center p-6 bg-[radial-gradient(#1e293b_1px,transparent_1px)] [background-size:24px_24px] select-text",children:t}),r]})]});exports.AppLayout=mo;exports.Badge=Dt;exports.Button=Ae;exports.Card=Bt;exports.ConfirmDialog=mn;exports.DatePicker=jn;exports.EmptyState=bn;exports.FormField=pn;exports.Input=Gt;exports.MarkdownRenderer=ao;exports.MetricStatCard=fn;exports.MetricStrip=gn;exports.Modal=pr;exports.ModalBody=Ke;exports.ModalContent=ln;exports.ModalFooter=mr;exports.ModalHeader=xr;exports.ModalSplitLayout=io;exports.ModalStepLayout=ho;exports.NotificationCenter=xo;exports.SearchInput=xn;exports.Select=sn;exports.Sidebar=uo;exports.SocialIcon=hn;exports.Spinner=dn;exports.StatusBadge=wn;exports.StatusToggle=on;exports.StepTimeline=br;exports.StudioLayout=bo;exports.Table=fr;exports.TableBody=kr;exports.TableCaption=Nr;exports.TableCell=jr;exports.TableFooter=wr;exports.TableHead=yr;exports.TableHeader=gr;exports.TableRow=vr;exports.Tabs=un;exports.Textarea=Ot;exports.Toggle=nn;exports.TopNav=po;exports.cn=x;