@sudobility/components 4.0.15 → 4.0.16

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.umd.js CHANGED
@@ -1,9 +1,4 @@
1
- (function(d,We){typeof exports=="object"&&typeof module<"u"?We(exports,require("clsx"),require("tailwind-merge"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-label","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],We):(d=typeof globalThis<"u"?globalThis:d||self,We(d.MailBoxComponents={},d.clsx,d.tailwindMerge,d.React,d.cva,d.ReactDOM,d.HeroiconsOutline,d.HeroiconsSolid,d.RadixSwitch,d.RadixSelect,d.LucideReact,d.RadixLabel,d.RadixSlot,d.ReactRouterDOM,d.RadixTabs,d.ReactI18next,d.ReactHelmetAsync,d.WebVitals))})(this,(function(d,We,_a,y,J,Nn,A,xe,jr,ka,ar,yn,wa,_r,pe,vn,Ea,Fe){"use strict";function jn(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const Z=jn(y),$=jn(ka);function f(...e){return _a.twMerge(We.clsx(e))}var ir={exports:{}},or={};var _n;function Ua(){if(_n)return or;_n=1;var e=Symbol.for("react.fragment");return or.Fragment=e,or.jsxDEV=void 0,or}var sr={};var kn;function Da(){return kn||(kn=1,process.env.NODE_ENV!=="production"&&(function(){function e(V){if(V==null)return null;if(typeof V=="function")return V.$$typeof===P?null:V.displayName||V.name||null;if(typeof V=="string")return V;switch(V){case N:return"Fragment";case _:return"Profiler";case U:return"StrictMode";case C:return"Suspense";case w:return"SuspenseList";case T:return"Activity"}if(typeof V=="object")switch(typeof V.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),V.$$typeof){case x:return"Portal";case j:return V.displayName||"Context";case E:return(V._context.displayName||"Context")+".Consumer";case k:var W=V.render;return V=V.displayName,V||(V=W.displayName||W.name||"",V=V!==""?"ForwardRef("+V+")":"ForwardRef"),V;case S:return W=V.displayName||null,W!==null?W:e(V.type)||"Memo";case v:W=V._payload,V=V._init;try{return e(V(W))}catch{}}return null}function r(V){return""+V}function t(V){try{r(V);var W=!1}catch{W=!0}if(W){W=console;var G=W.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&V[Symbol.toStringTag]||V.constructor.name||"Object";return G.call(W,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),r(V)}}function a(V){if(V===N)return"<>";if(typeof V=="object"&&V!==null&&V.$$typeof===v)return"<...>";try{var W=e(V);return W?"<"+W+">":"<...>"}catch{return"<...>"}}function i(){var V=I.A;return V===null?null:V.getOwner()}function o(){return Error("react-stack-top-frame")}function s(V){if(z.call(V,"key")){var W=Object.getOwnPropertyDescriptor(V,"key").get;if(W&&W.isReactWarning)return!1}return V.key!==void 0}function l(V,W){function G(){ne||(ne=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",W))}G.isReactWarning=!0,Object.defineProperty(V,"key",{get:G,configurable:!0})}function c(){var V=e(this.type);return Re[V]||(Re[V]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),V=this.props.ref,V!==void 0?V:null}function u(V,W,G,re,Te,xn){var K=G.ref;return V={$$typeof:g,type:V,key:W,props:G,_owner:re},(K!==void 0?K:null)!==null?Object.defineProperty(V,"ref",{enumerable:!1,get:c}):Object.defineProperty(V,"ref",{enumerable:!1,value:null}),V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(V,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(V,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Te}),Object.defineProperty(V,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:xn}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V}function m(V,W,G,re,Te,xn){var K=W.children;if(K!==void 0)if(re)if(R(K)){for(re=0;re<K.length;re++)b(K[re]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(K);if(z.call(W,"key")){K=e(V);var Be=Object.keys(W).filter(function(Z0){return Z0!=="key"});re=0<Be.length?"{key: someKey, "+Be.join(": ..., ")+": ...}":"{key: someKey}",ze[K+re]||(Be=0<Be.length?"{"+Be.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
- let props = %s;
3
- <%s {...props} />
4
- React keys must be passed directly to JSX without using spread:
5
- let props = %s;
6
- <%s key={someKey} {...props} />`,re,K,Be,K),ze[K+re]=!0)}if(K=null,G!==void 0&&(t(G),K=""+G),s(W)&&(t(W.key),K=""+W.key),"key"in W){G={};for(var pn in W)pn!=="key"&&(G[pn]=W[pn])}else G=W;return K&&l(G,typeof V=="function"?V.displayName||V.name||"Unknown":V),u(V,K,G,i(),Te,xn)}function b(V){p(V)?V._store&&(V._store.validated=1):typeof V=="object"&&V!==null&&V.$$typeof===v&&(V._payload.status==="fulfilled"?p(V._payload.value)&&V._payload.value._store&&(V._payload.value._store.validated=1):V._store&&(V._store.validated=1))}function p(V){return typeof V=="object"&&V!==null&&V.$$typeof===g}var h=y,g=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),I=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,R=Array.isArray,F=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(V){return V()}};var ne,Re={},hn=h.react_stack_bottom_frame.bind(h,o)(),se=F(a(o)),ze={};sr.Fragment=N,sr.jsxDEV=function(V,W,G,re){var Te=1e4>I.recentlyCreatedOwnerStacks++;return m(V,W,G,re,Te?Error("react-stack-top-frame"):hn,Te?F(a(V)):se)}})()),sr}var wn;function Ca(){return wn||(wn=1,process.env.NODE_ENV==="production"?ir.exports=Ua():ir.exports=Da()),ir.exports}var n=Ca();const En=({children:e,as:r="div",p:t,px:a,py:i,m:o,mx:s,my:l,bg:c,border:u=!1,rounded:m,shadow:b,w:p,h,className:g})=>{const x={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},N=c?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[c]:"",U=m?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[m]:"",_=b?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[b]:"",E=p?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[p]:"",j=h?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[h]:"",k=[];t&&k.push("p-"+x[t]),a&&k.push("px-"+x[a]),i&&k.push("py-"+x[i]);const C=[];return o&&C.push("m-"+x[o]),s&&C.push("mx-"+x[s]),l&&C.push("my-"+x[l]),n.jsxDEV(r,{className:f(...k,...C,N,u&&"border border-gray-200 dark:border-gray-700",U,_,E,j,g),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/box.tsx",lineNumber:172,columnNumber:5},void 0)},Sa=({direction:e="row",align:r,justify:t,wrap:a="nowrap",gap:i,inline:o=!1,className:s,...l})=>{const c={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},u=r?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[r]:"",m=t?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[t]:"",b={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},p=i?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[i]:"";return n.jsxDEV(En,{...l,className:f(o?"inline-flex":"flex",c[e],u,m,b[a],p,s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/flex.tsx",lineNumber:106,columnNumber:5},void 0)},Va={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},Aa={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Ta={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},La={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Ia={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},Pa=({children:e,direction:r="row",align:t="start",justify:a="start",wrap:i="nowrap",gap:o="0",className:s})=>n.jsxDEV("div",{className:f("flex",Va[r],Aa[t],Ta[a],La[i],Ia[o],s),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/flex-container.tsx",lineNumber:85,columnNumber:5},void 0),Ma=({children:e,size:r="xl",center:t=!0,padding:a="md",className:i})=>{const o={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},s={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return n.jsxDEV("div",{className:f("w-full",o[r],t&&"mx-auto",s[a],i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/container.tsx",lineNumber:63,columnNumber:5},void 0)},Oa=({children:e,cols:r=1,gap:t="md",autoFit:a,autoFill:i,alignItems:o="stretch",justifyItems:s="stretch",className:l})=>{const c={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},u={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},b=()=>{if(a||i)return"";if(typeof r=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[r]||"grid-cols-1";const h=[];return r.sm&&h.push("grid-cols-"+r.sm),r.md&&h.push("md:grid-cols-"+r.md),r.lg&&h.push("lg:grid-cols-"+r.lg),r.xl&&h.push("xl:grid-cols-"+r.xl),h.join(" ")};let p;return a?p="repeat(auto-fit, minmax("+a+", 1fr))":i&&(p="repeat(auto-fill, minmax("+i+", 1fr))"),n.jsxDEV("div",{className:f("grid",b(),c[t],u[o],m[s],l),style:p?{gridTemplateColumns:p}:void 0,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/grid.tsx",lineNumber:132,columnNumber:5},void 0)},kr=({children:e,direction:r="vertical",spacing:t="md",align:a="stretch",justify:i="start",wrap:o=!1,full:s=!1,divider:l=!1,className:c})=>{const u=r==="vertical",m={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},b={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},h={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsxDEV("div",{className:f("flex",u?"flex-col":"flex-row",l?b[r][t]:m[r][t],p[a],h[i],o&&"flex-wrap",s&&(u?"h-full":"w-full"),c),children:l?y.Children.map(e,(g,x)=>n.jsxDEV(y.Fragment,{children:[g,x<y.Children.count(e)-1&&n.jsxDEV("div",{className:f("bg-gray-200 dark:bg-gray-700",u?"h-px w-full":"w-px h-full")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:149,columnNumber:17},void 0)]},x,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:146,columnNumber:13},void 0)):e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:130,columnNumber:5},void 0)},Ra=e=>n.jsxDEV(kr,{direction:"vertical",...e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:167,columnNumber:3},void 0),za=e=>n.jsxDEV(kr,{direction:"horizontal",...e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:174,columnNumber:3},void 0),Ba=({children:e,axis:r="both",inline:t=!1,className:a})=>{const i=()=>{switch(r){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return n.jsxDEV("div",{className:f(t?"inline-flex":"flex",i(),a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/center.tsx",lineNumber:54,columnNumber:5},void 0)},Wa=({size:e="md",axis:r="vertical",flex:t=!1,className:a})=>{const i={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},o=typeof e=="number"?r==="vertical"?{height:`${e}px`}:{width:`${e}px`}:void 0,s=typeof e=="string"?i[r][e]:"";return n.jsxDEV("div",{className:f(t&&"flex-1",!t&&s,a),style:o,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spacer.tsx",lineNumber:76,columnNumber:5},void 0)},Fa=J.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-800 to-purple-800 dark:from-blue-900 dark:to-purple-900"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),qa=({children:e,variant:r="default",spacing:t="3xl",background:a="none",className:i,as:o="section",id:s})=>y.createElement(o,{id:s,className:f(Fa({variant:r,spacing:t,background:a}),i)},e),$a=J.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),Ha=({children:e,background:r="default",overflow:t="visible",className:a})=>n.jsxDEV("div",{className:f($a({background:r,overflow:t}),a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-container.tsx",lineNumber:40,columnNumber:5},void 0),Ga=({children:e,ratio:r="16/9",className:t})=>{const o=`${1/(typeof r=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[r]:r)*100}%`;return n.jsxDEV("div",{className:f("relative w-full",t),style:{paddingBottom:o},children:n.jsxDEV("div",{className:"absolute inset-0",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/aspect-ratio.tsx",lineNumber:52,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/aspect-ratio.tsx",lineNumber:51,columnNumber:5},void 0)},D={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},L={heading:{display:{hero:()=>`${D.typography.family.display} ${D.typography.semantic.hero} ${D.typography.weight.display} ${D.typography.leading.display} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${D.typography.family.display} text-7xl ${D.typography.weight.display} ${D.typography.leading.display} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${D.typography.family.display} text-6xl ${D.typography.weight.bold} ${D.typography.leading.display} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${D.typography.family.display} text-5xl ${D.typography.weight.bold} ${D.typography.leading.tight} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${D.typography.family.display} text-4xl ${D.typography.weight.bold} ${D.typography.leading.tight} ${D.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${D.typography.family.sans} ${D.typography.semantic.h1} ${D.typography.weight.heading} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${D.typography.family.sans} ${D.typography.semantic.h2} ${D.typography.weight.heading} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${D.typography.family.sans} ${D.typography.semantic.h3} ${D.typography.weight.heading} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${D.typography.family.sans} ${D.typography.semantic.h4} ${D.typography.weight.semibold} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${D.typography.family.sans} ${D.typography.semantic.h5} ${D.typography.weight.semibold} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${D.typography.family.sans} ${D.typography.semantic.h6} ${D.typography.weight.semibold} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${D.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${D.typography.weight.heading} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${D.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${D.typography.weight.heading} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${D.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${D.typography.weight.semibold} ${D.typography.leading.heading} ${D.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${D.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${D.typography.weight.display} ${D.typography.leading.display} ${D.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${D.typography.family.body} ${D.typography.semantic.bodyLarge} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${D.typography.family.body} ${D.typography.semantic.small} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${D.typography.family.body} ${D.typography.semantic.caption} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${D.typography.family.body} ${D.typography.semantic.bodyLarge} ${D.typography.weight.strong} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.strong} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.strong} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${D.typography.family.body} ${D.typography.semantic.small} ${D.typography.weight.strong} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${D.typography.family.body} ${D.typography.semantic.bodyLarge} ${D.typography.weight.emphasis} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.emphasis} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.emphasis} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${D.typography.family.body} ${D.typography.semantic.small} ${D.typography.weight.emphasis} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${D.typography.family.body} ${D.typography.semantic.bodyLarge} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${D.typography.family.body} ${D.typography.semantic.body} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${D.typography.family.body} ${D.typography.semantic.small} ${D.typography.weight.body} ${D.typography.leading.body} ${D.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${D.typography.family.body} ${D.typography.semantic.caption} ${D.typography.weight.body} ${D.typography.leading.caption} ${D.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${D.typography.family.body} ${D.typography.semantic.caption} ${D.typography.weight.emphasis} ${D.typography.leading.caption} ${D.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${D.typography.family.body} ${D.typography.semantic.caption} ${D.typography.weight.emphasis} ${D.typography.leading.caption} ${D.typography.tracking.uppercase} ${D.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${D.typography.decoration.underline} ${D.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${D.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${D.typography.decoration.underline} hover:${D.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${D.typography.decoration.underline} ${D.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${D.typography.decoration.underline} ${D.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${D.typography.family.body} text-sm ${D.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${D.typography.family.body} text-sm ${D.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${D.typography.family.body} text-sm ${D.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${D.typography.family.body} text-sm ${D.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${D.typography.family.body} text-sm ${D.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${D.typography.family.body} text-sm ${D.typography.weight.body} text-green-600 dark:text-green-400`}},O={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},Ya={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function Le(e){return Ya[e]}const Ka={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function Za(e){return Ka[e]}const Qa={default:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},premium:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},primary:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},light:{container:"bg-white/20 border border-white/30 text-white backdrop-blur-sm",icon:"text-white"}};function Xa(e){return Qa[e]}const Ja=({label:e,labelPosition:r="center",orientation:t="horizontal",spacing:a="md",thickness:i="thin",variant:o="light",className:s,lineClassName:l})=>{const c={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},u={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},m={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(t==="vertical")return n.jsxDEV("div",{className:f("self-stretch",u.vertical[i],m[o],c.vertical[a],s),role:"separator","aria-orientation":"vertical"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:99,columnNumber:7},void 0);if(!e)return n.jsxDEV("hr",{className:f(u.horizontal[i],m[o],c.horizontal[a],l,s),role:"separator","aria-orientation":"horizontal"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:116,columnNumber:7},void 0);const b={left:"justify-start",center:"justify-center",right:"justify-end"};return n.jsxDEV("div",{className:f("flex items-center",c.horizontal[a],b[r],s),role:"separator","aria-orientation":"horizontal",children:[r!=="left"&&n.jsxDEV("div",{className:f("flex-1",u.horizontal[i],m[o],l)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:149,columnNumber:9},void 0),n.jsxDEV("span",{className:f(L.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:158,columnNumber:7},void 0),r!=="right"&&n.jsxDEV("div",{className:f("flex-1",u.horizontal[i],m[o],l)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:167,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:138,columnNumber:5},void 0)},ei=({orientation:e="horizontal",spacing:r="md",thickness:t="thin",className:a})=>{const i={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},o={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},s=e==="horizontal";return n.jsxDEV("div",{role:"separator","aria-orientation":e,className:f("bg-gray-200 dark:bg-gray-700",s?"w-full":"h-full",o[e][t],i[e][r],a)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/separator.tsx",lineNumber:78,columnNumber:5},void 0)},ri=({children:e,variant:r="blue",position:t="left",width:a="thick",padding:i="md",className:o})=>{const s={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},l={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},c={thin:"2",medium:"3",thick:"4"},u={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},m=`${l[t]}-${c[a]}`;return n.jsxDEV("div",{className:f(m,s[r],u[t][i],o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/border-accent.tsx",lineNumber:113,columnNumber:5},void 0)},ni=({children:e,title:r,position:t="bottom-right",collapsible:a=!0,defaultCollapsed:i=!1,closeable:o=!1,onClose:s,className:l})=>{const[c,u]=y.useState(i),m={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return n.jsxDEV("div",{className:f("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",m[t],l),children:[(r||a||o)&&n.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[r&&n.jsxDEV("h3",{className:"font-semibold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:74,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[a&&n.jsxDEV("button",{onClick:()=>u(!c),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":c?"Expand":"Collapse",children:n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:95,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:86,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:81,columnNumber:15},void 0),o&&n.jsxDEV("button",{onClick:s,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:117,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:111,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:106,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:79,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:72,columnNumber:9},void 0),!c&&n.jsxDEV("div",{className:"p-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:131,columnNumber:24},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:60,columnNumber:5},void 0)},ti=({left:e,right:r,direction:t="horizontal",initialSplit:a=.5,split:i,onSplitChange:o,minLeftSize:s=100,minRightSize:l=100,dividerSize:c=8,resizable:u=!0,className:m})=>{const[b,p]=y.useState(a),[h,g]=y.useState(!1),x=y.useRef(null),N=i!==void 0?i:b,U=E=>{u&&(E.preventDefault(),g(!0))};y.useEffect(()=>{if(!h)return;const E=k=>{const C=x.current;if(!C)return;const w=C.getBoundingClientRect();let S;t==="horizontal"?S=(k.clientX-w.left)/w.width:S=(k.clientY-w.top)/w.height,S=Math.max(0,Math.min(1,S));const v=t==="horizontal"?w.width:w.height,T=typeof s=="string"?parseFloat(s)/100*v:s,P=typeof l=="string"?parseFloat(l)/100*v:l,I=T/v,z=1-P/v;S=Math.max(I,Math.min(z,S)),i!==void 0&&o?o(S):p(S)},j=()=>{g(!1)};return document.addEventListener("mousemove",E),document.addEventListener("mouseup",j),()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",j)}},[h,t,s,l,i,o]),y.useEffect(()=>(h?(document.body.style.userSelect="none",document.body.style.cursor=t==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[h,t]);const _=t==="horizontal";return n.jsxDEV("div",{ref:x,className:f("w-full h-full flex",_?"flex-row":"flex-col",m),children:[n.jsxDEV("div",{className:"overflow-auto",style:{[_?"width":"height"]:`${N*100}%`},children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:181,columnNumber:7},void 0),n.jsxDEV("div",{onMouseDown:U,className:f("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",u&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",h&&"bg-blue-500 dark:bg-blue-400",_?"cursor-col-resize":"cursor-row-resize",!u&&"cursor-default"),style:{[_?"width":"height"]:`${c}px`},children:u&&n.jsxDEV("div",{className:f("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",h&&"text-white"),children:_?n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{cx:"10",cy:"6",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:218,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"10",cy:"12",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:219,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"10",cy:"18",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:220,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"6",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:221,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"12",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:222,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"18",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:223,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:217,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{cx:"6",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:227,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"12",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:228,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"18",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:229,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"6",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:230,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"12",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:231,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"18",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:232,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:226,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:208,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:191,columnNumber:7},void 0),n.jsxDEV("div",{className:"overflow-auto flex-1",style:{[_?"width":"height"]:`${(1-N)*100}%`},children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:240,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:172,columnNumber:5},void 0)},ai=({children:e,defaultWidth:r=300,defaultHeight:t=200,minWidth:a=100,minHeight:i=100,maxWidth:o,maxHeight:s,directions:l=["right","bottom","bottom-right"],onResize:c,onResizeEnd:u,showHandles:m=!0,className:b})=>{const[p,h]=y.useState(r),[g,x]=y.useState(t),[N,U]=y.useState(!1),[_,E]=y.useState(null),j=y.useRef(null),k=y.useRef({x:0,y:0,width:0,height:0}),C=v=>T=>{T.preventDefault(),T.stopPropagation(),U(!0),E(v),k.current={x:T.clientX,y:T.clientY,width:p,height:g}};y.useEffect(()=>{if(!N||!_)return;const v=P=>{const I=P.clientX-k.current.x,z=P.clientY-k.current.y;let R=k.current.width,F=k.current.height;_.includes("right")?R=k.current.width+I:_.includes("left")&&(R=k.current.width-I),_.includes("bottom")?F=k.current.height+z:_.includes("top")&&(F=k.current.height-z),R=Math.max(a,R),F=Math.max(i,F),o&&(R=Math.min(o,R)),s&&(F=Math.min(s,F)),h(R),x(F),c&&c(R,F)},T=()=>{U(!1),E(null),u&&u(p,g)};return document.addEventListener("mousemove",v),document.addEventListener("mouseup",T),()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",T)}},[N,_,p,g,a,i,o,s,c,u]);const w=y.useCallback(v=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[v],[]);y.useEffect(()=>(N?(document.body.style.userSelect="none",document.body.style.cursor=w(_)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[N,_,w]);const S=v=>{if(!l.includes(v))return null;const T={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return n.jsxDEV("div",{className:f("absolute z-10",m&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",T[v]),onMouseDown:C(v)},v,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable.tsx",lineNumber:226,columnNumber:7},void 0)};return n.jsxDEV("div",{ref:j,className:f("relative",b),style:{width:`${p}px`,height:`${g}px`},children:[e,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(S)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable.tsx",lineNumber:240,columnNumber:5},void 0)},ii=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UresizableUpanels",children:r||"UresizableUpanels Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable-panels.tsx",lineNumber:43,columnNumber:5},void 0),oi=({children:e,maxHeight:r,hideScrollbar:t=!1,direction:a="vertical",className:i})=>{const o={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},s=t?"scrollbar-hide":f("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),l=typeof r=="number"?`${r}px`:r;return n.jsxDEV("div",{className:f("relative",o[a],s,i),style:l?{maxHeight:l}:void 0,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-area.tsx",lineNumber:66,columnNumber:5},void 0)},si=({children:e,columns:r=3,gap:t=16,breakpoints:a,className:i})=>{const[o,s]=y.useState(r),l=y.useRef(null);y.useEffect(()=>{if(!a)return;const m=()=>{const b=window.innerWidth,p=Object.keys(a).map(Number).sort((h,g)=>g-h);for(const h of p)if(b>=h){s(a[h]);return}s(r)};return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[a,r]);const c=y.Children.toArray(e),u=Array.from({length:o},()=>[]);return c.forEach((m,b)=>{u[b%o].push(m)}),n.jsxDEV("div",{ref:l,className:f("flex",i),style:{gap:`${t}px`},children:u.map((m,b)=>n.jsxDEV("div",{className:"flex-1 flex flex-col",style:{gap:`${t}px`},children:m},b,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/masonry.tsx",lineNumber:93,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/masonry.tsx",lineNumber:87,columnNumber:5},void 0)},Ne=({children:e,container:r})=>{const[t,a]=y.useState(!1);if(y.useEffect(()=>(a(!0),()=>a(!1)),[]),!t)return null;const i=r||document.body;return Nn.createPortal(e,i)},lr=({isOpen:e,onClose:r,children:t,blur:a=!1,opacity:i="medium",zIndex:o=40,lockScroll:s=!0,className:l})=>{if(y.useEffect(()=>{if(s){if(e){const u=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${u}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[e,s]),!e)return null;const c={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return n.jsxDEV(Ne,{children:n.jsxDEV("div",{className:f("fixed inset-0","transition-opacity duration-300",a&&"backdrop-blur-sm",c[i],l),style:{zIndex:o},onClick:r,"aria-hidden":"true",children:t&&n.jsxDEV("div",{className:"relative h-full w-full",onClick:u=>u.stopPropagation(),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:96,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:83,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:82,columnNumber:5},void 0)},li=({children:e,as:r="p",size:t="base",weight:a="normal",color:i="default",align:o,transform:s="none",truncate:l=!1,lineClamp:c,className:u})=>{const m={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},b={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},p={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},h=o?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[o]:"",g={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},x=c?{display:"-webkit-box",WebkitLineClamp:c,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return n.jsxDEV(r,{className:f(m[t],b[a],p[i],h,g[s],l&&"truncate",c&&"overflow-hidden",u),style:x,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text.tsx",lineNumber:119,columnNumber:5},void 0)},ui=({children:e,level:r=2,size:t,weight:a="bold",color:i="default",align:o,className:s})=>{const c=t||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[r],u={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},m={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},b={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},p=o?{left:"text-left",center:"text-center",right:"text-right"}[o]:"",h=`h${r}`;return y.createElement(h,{className:f(u[c],m[a],b[i],p,s)},e)},ci=J.cva("",{variants:{variant:{hero:L.heading.display.hero(),display:L.heading.display.lg(),h1:L.heading.h1(),h2:L.heading.h2(),h3:L.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),mi=({children:e,variant:r="h1",responsive:t=!0,align:a="left",color:i="default",className:o,as:s})=>{const l=s||(r==="hero"||r==="display"||r==="h1"?"h1":r==="h2"?"h2":"h3");return n.jsxDEV(l,{className:f(ci({variant:r,responsive:t,align:a,color:i}),o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:70,columnNumber:5},void 0)},di=J.cva("",{variants:{variant:{h2:L.heading.h2(),h3:L.heading.h3(),h4:L.heading.h4(),h5:L.heading.h5(),h6:L.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),bi=({children:e,variant:r="h2",spacing:t="md",align:a="left",className:i,as:o})=>{const s=o||r;return y.createElement(s,{className:f(di({variant:r,spacing:t,align:a}),i)},e)},fi=J.cva("",{variants:{variant:{body:L.body.md(),lead:L.body.lg(),large:L.body.lg(),small:L.body.sm(),caption:L.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),gi=({children:e,variant:r="body",color:t="default",align:a="left",className:i,as:o="p"})=>y.createElement(o,{className:f(fi({variant:r,color:t,align:a}),i)},e),hi=J.cva(L.link.default(),{variants:{variant:{default:L.link.default(),subtle:L.link.subtle(),muted:L.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),xi=({children:e,href:r,variant:t="default",external:a=!1,className:i,target:o,rel:s})=>n.jsxDEV("a",{href:r,target:o||(a?"_blank":void 0),rel:s||(a?"noopener noreferrer":void 0),className:f(hi({variant:t,external:a}),i),children:[e,a&&n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:242,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:236,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:228,columnNumber:5},void 0),pi=({children:e,size:r="md",variant:t="default",className:a})=>{const i={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},o={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return n.jsxDEV("code",{className:f("inline-block font-mono font-medium rounded",i[r],o[t],a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/code.tsx",lineNumber:58,columnNumber:5},void 0)},Ni=({children:e,variant:r="primary",size:t="md",inline:a=!1,align:i="left",className:o,wrap:s=!1})=>{const l={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},c={xs:{text:"text-xs",padding:a?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:a?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:a?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:a?"px-3 py-1":"px-4 py-2"}},u={left:"text-left",center:"text-center",right:"text-right"},m=c[t],b=a?"code":"div";return n.jsxDEV(b,{className:f("font-mono rounded-lg",l[r],m.text,m.padding,!a&&u[i],a?"inline-block":"block",!s&&"overflow-x-auto whitespace-nowrap",s&&"break-all",o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/code-display.tsx",lineNumber:94,columnNumber:5},void 0)},yi=({children:e,size:r="md",className:t})=>{const a={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return n.jsxDEV("kbd",{className:f("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",a[r],t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/kbd.tsx",lineNumber:42,columnNumber:5},void 0)},vi=({children:e,cite:r,variant:t="default",size:a="md",className:i})=>{const o={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},s={sm:"text-xs",md:"text-sm",lg:"text-base"},l={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return n.jsxDEV("blockquote",{className:f("rounded-r-lg",o[a],l[t],i),children:[n.jsxDEV("p",{className:"text-gray-800 dark:text-gray-200 italic",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:76,columnNumber:7},void 0),r&&n.jsxDEV("footer",{className:f("mt-2 text-gray-600 dark:text-gray-400",s[a]),children:["— ",n.jsxDEV("cite",{className:"not-italic font-medium",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:84,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:78,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:68,columnNumber:5},void 0)},ji=({children:e,variant:r="default",showIcon:t=!1,size:a="sm",className:i})=>{const o={sm:"text-sm",base:"text-base"},s={sm:"h-4 w-4",base:"h-5 w-5"},c={default:{text:"text-gray-600 dark:text-gray-400",icon:A.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:A.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:A.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:A.ExclamationCircleIcon}}[r],u=c.icon;return n.jsxDEV("div",{className:f("flex items-start gap-1.5",i),children:[t&&n.jsxDEV(u,{className:f(s[a],c.text,"flex-shrink-0 mt-0.5")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:86,columnNumber:9},void 0),n.jsxDEV("p",{className:f(o[a],c.text),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:90,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:84,columnNumber:5},void 0)},_i=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UscreenUreaderUtext",children:r||"UscreenUreaderUtext Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/screen-reader-text.tsx",lineNumber:43,columnNumber:5},void 0),ki=({children:e,maxLength:r=50,position:t="end",ellipsis:a="...",showTooltip:i=!0,className:o})=>{const s=e||"";if(s.length<=r)return n.jsxDEV("span",{className:o,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/truncated-text.tsx",lineNumber:55,columnNumber:12},void 0);const c=(()=>{const u=a.length,m=r-u;switch(t){case"start":return a+s.slice(s.length-m);case"middle":{const b=Math.floor(m/2),p=s.slice(0,b),h=s.slice(s.length-(m-b));return p+a+h}case"end":default:return s.slice(0,m)+a}})();return n.jsxDEV("span",{className:f("inline-block",o),title:i?s:void 0,children:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/truncated-text.tsx",lineNumber:83,columnNumber:5},void 0)},wi=({value:e,style:r="decimal",currency:t="USD",unit:a,minimumFractionDigits:i,maximumFractionDigits:o,locale:s="en-US",notation:l="standard",className:c})=>{const u=()=>{try{const m={style:r,notation:l,minimumFractionDigits:i,maximumFractionDigits:o};return r==="currency"&&(m.currency=t),r==="unit"&&a&&(m.unit=a),new Intl.NumberFormat(s,m).format(e)}catch(m){return console.error("Number formatting error:",m),e.toLocaleString(s)}};return n.jsxDEV("span",{className:f(c),children:u()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/formatted-number.tsx",lineNumber:91,columnNumber:10},void 0)},Ei=({date:e,showTooltip:r=!0,updateInterval:t=0,className:a})=>{const[,i]=y.useState(0),o=y.useMemo(()=>e instanceof Date?e:new Date(e),[e]);y.useEffect(()=>{if(t===0)return;const u=setInterval(()=>{i(m=>m+1)},t*1e3);return()=>clearInterval(u)},[t]);const l=(()=>{const m=new Date().getTime()-o.getTime(),b=Math.floor(m/1e3),p=Math.floor(b/60),h=Math.floor(p/60),g=Math.floor(h/24),x=Math.floor(g/7),N=Math.floor(g/30),U=Math.floor(g/365);return b<60?"just now":p<60?`${p} ${p===1?"minute":"minutes"} ago`:h<24?`${h} ${h===1?"hour":"hours"} ago`:g<7?`${g} ${g===1?"day":"days"} ago`:x<4?`${x} ${x===1?"week":"weeks"} ago`:N<12?`${N} ${N===1?"month":"months"} ago`:`${U} ${U===1?"year":"years"} ago`})(),c=o.toLocaleString();return n.jsxDEV("time",{dateTime:o.toISOString(),title:r?c:void 0,className:f(a),children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/relative-time.tsx",lineNumber:94,columnNumber:5},void 0)},qe=({size:e="default",variant:r="default",className:t,ariaLabel:a="Loading",loadingText:i="Loading..."})=>{const o=()=>{const s={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},l={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${s[e]} ${l[r]}`};return n.jsxDEV("div",{className:f(o(),t),role:"status","aria-label":a,children:n.jsxDEV("span",{className:"sr-only",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spinner.tsx",lineNumber:44,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spinner.tsx",lineNumber:39,columnNumber:5},void 0)},Ui=({isLoading:e,message:r,mode:t="fullscreen",blur:a=!1,spinnerSize:i="large",className:o})=>e?n.jsxDEV("div",{className:f(t==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",a&&"backdrop-blur-sm",o),role:"alert","aria-live":"polite","aria-busy":"true",children:[n.jsxDEV(qe,{size:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:71,columnNumber:7},void 0),r&&n.jsxDEV("p",{className:f(L.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:73,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:58,columnNumber:5},void 0):null,Di=({size:e="md",variant:r="primary",color:t,className:a})=>{const i={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},o={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},s=f("rounded-full",i[e],t?"":o[r]);return n.jsxDEV("div",{className:f("flex items-center gap-1",a),children:[n.jsxDEV("div",{className:s,style:{backgroundColor:t,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:57,columnNumber:7},void 0),n.jsxDEV("div",{className:s,style:{backgroundColor:t,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:65,columnNumber:7},void 0),n.jsxDEV("div",{className:s,style:{backgroundColor:t,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:73,columnNumber:7},void 0),n.jsxDEV("style",{children:`
1
+ (function(m,Le){typeof exports=="object"&&typeof module<"u"?Le(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-dev-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-dev-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-label","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],Le):(m=typeof globalThis<"u"?globalThis:m||self,Le(m.MailBoxComponents={},m.clsx,m.tailwindMerge,m.ReactJSXDevRuntime,m.React,m.cva,m.ReactDOM,m.HeroiconsOutline,m.HeroiconsSolid,m.RadixSwitch,m.RadixSelect,m.LucideReact,m.RadixLabel,m.RadixSlot,m.ReactRouterDOM,m.RadixTabs,m.ReactI18next,m.ReactHelmetAsync,m.WebVitals))})(this,(function(m,Le,st,n,y,Z,on,A,me,dr,lt,Ze,sn,ct,ur,be,ln,dt,Ie){"use strict";function cn(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,t.get?t:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const G=cn(y),q=cn(lt);function f(...e){return st.twMerge(Le.clsx(e))}const dn=({children:e,as:r="div",p:a,px:t,py:o,m:i,mx:s,my:l,bg:d,border:c=!1,rounded:u,shadow:b,w:x,h,className:g})=>{const p={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},N=d?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[d]:"",j=u?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[u]:"",k=b?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[b]:"",U=x?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[x]:"",_=h?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[h]:"",w=[];a&&w.push("p-"+p[a]),t&&w.push("px-"+p[t]),o&&w.push("py-"+p[o]);const S=[];return i&&S.push("m-"+p[i]),s&&S.push("mx-"+p[s]),l&&S.push("my-"+p[l]),n.jsxDEV(r,{className:f(...w,...S,N,c&&"border border-gray-200 dark:border-gray-700",j,k,U,_,g),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/box.tsx",lineNumber:172,columnNumber:5},void 0)},ut=({direction:e="row",align:r,justify:a,wrap:t="nowrap",gap:o,inline:i=!1,className:s,...l})=>{const d={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},c=r?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[r]:"",u=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",b={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},x=o?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[o]:"";return n.jsxDEV(dn,{...l,className:f(i?"inline-flex":"flex",d[e],c,u,b[t],x,s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/flex.tsx",lineNumber:106,columnNumber:5},void 0)},mt={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},bt={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},ft={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},gt={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},ht={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},pt=({children:e,direction:r="row",align:a="start",justify:t="start",wrap:o="nowrap",gap:i="0",className:s})=>n.jsxDEV("div",{className:f("flex",mt[r],bt[a],ft[t],gt[o],ht[i],s),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/flex-container.tsx",lineNumber:85,columnNumber:5},void 0),xt=({children:e,size:r="xl",center:a=!0,padding:t="md",className:o})=>{const i={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},s={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return n.jsxDEV("div",{className:f("w-full",i[r],a&&"mx-auto",s[t],o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/container.tsx",lineNumber:63,columnNumber:5},void 0)},Nt=({children:e,cols:r=1,gap:a="md",autoFit:t,autoFill:o,alignItems:i="stretch",justifyItems:s="stretch",className:l})=>{const d={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},c={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},u={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},b=()=>{if(t||o)return"";if(typeof r=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[r]||"grid-cols-1";const h=[];return r.sm&&h.push("grid-cols-"+r.sm),r.md&&h.push("md:grid-cols-"+r.md),r.lg&&h.push("lg:grid-cols-"+r.lg),r.xl&&h.push("xl:grid-cols-"+r.xl),h.join(" ")};let x;return t?x="repeat(auto-fit, minmax("+t+", 1fr))":o&&(x="repeat(auto-fill, minmax("+o+", 1fr))"),n.jsxDEV("div",{className:f("grid",b(),d[a],c[i],u[s],l),style:x?{gridTemplateColumns:x}:void 0,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/grid.tsx",lineNumber:132,columnNumber:5},void 0)},mr=({children:e,direction:r="vertical",spacing:a="md",align:t="stretch",justify:o="start",wrap:i=!1,full:s=!1,divider:l=!1,className:d})=>{const c=r==="vertical",u={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},b={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},x={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},h={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsxDEV("div",{className:f("flex",c?"flex-col":"flex-row",l?b[r][a]:u[r][a],x[t],h[o],i&&"flex-wrap",s&&(c?"h-full":"w-full"),d),children:l?y.Children.map(e,(g,p)=>n.jsxDEV(y.Fragment,{children:[g,p<y.Children.count(e)-1&&n.jsxDEV("div",{className:f("bg-gray-200 dark:bg-gray-700",c?"h-px w-full":"w-px h-full")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:149,columnNumber:17},void 0)]},p,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:146,columnNumber:13},void 0)):e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:130,columnNumber:5},void 0)},yt=e=>n.jsxDEV(mr,{direction:"vertical",...e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:167,columnNumber:3},void 0),vt=e=>n.jsxDEV(mr,{direction:"horizontal",...e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/stack.tsx",lineNumber:174,columnNumber:3},void 0),_t=({children:e,axis:r="both",inline:a=!1,className:t})=>{const o=()=>{switch(r){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return n.jsxDEV("div",{className:f(a?"inline-flex":"flex",o(),t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/center.tsx",lineNumber:54,columnNumber:5},void 0)},kt=({size:e="md",axis:r="vertical",flex:a=!1,className:t})=>{const o={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},i=typeof e=="number"?r==="vertical"?{height:`${e}px`}:{width:`${e}px`}:void 0,s=typeof e=="string"?o[r][e]:"";return n.jsxDEV("div",{className:f(a&&"flex-1",!a&&s,t),style:i,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spacer.tsx",lineNumber:76,columnNumber:5},void 0)},wt=Z.cva("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-800 to-purple-800 dark:from-blue-900 dark:to-purple-900"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),Et=({children:e,variant:r="default",spacing:a="3xl",background:t="none",className:o,as:i="section",id:s})=>y.createElement(i,{id:s,className:f(wt({variant:r,spacing:a,background:t}),o)},e),Ut=Z.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),jt=({children:e,background:r="default",overflow:a="visible",className:t})=>n.jsxDEV("div",{className:f(Ut({background:r,overflow:a}),t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-container.tsx",lineNumber:40,columnNumber:5},void 0),Ct=({children:e,ratio:r="16/9",className:a})=>{const i=`${1/(typeof r=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[r]:r)*100}%`;return n.jsxDEV("div",{className:f("relative w-full",a),style:{paddingBottom:i},children:n.jsxDEV("div",{className:"absolute inset-0",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/aspect-ratio.tsx",lineNumber:52,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/aspect-ratio.tsx",lineNumber:51,columnNumber:5},void 0)},C={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},L={heading:{display:{hero:()=>`${C.typography.family.display} ${C.typography.semantic.hero} ${C.typography.weight.display} ${C.typography.leading.display} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${C.typography.family.display} text-7xl ${C.typography.weight.display} ${C.typography.leading.display} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${C.typography.family.display} text-6xl ${C.typography.weight.bold} ${C.typography.leading.display} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${C.typography.family.display} text-5xl ${C.typography.weight.bold} ${C.typography.leading.tight} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${C.typography.family.display} text-4xl ${C.typography.weight.bold} ${C.typography.leading.tight} ${C.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${C.typography.family.sans} ${C.typography.semantic.h1} ${C.typography.weight.heading} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${C.typography.family.sans} ${C.typography.semantic.h2} ${C.typography.weight.heading} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${C.typography.family.sans} ${C.typography.semantic.h3} ${C.typography.weight.heading} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${C.typography.family.sans} ${C.typography.semantic.h4} ${C.typography.weight.semibold} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${C.typography.family.sans} ${C.typography.semantic.h5} ${C.typography.weight.semibold} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${C.typography.family.sans} ${C.typography.semantic.h6} ${C.typography.weight.semibold} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${C.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${C.typography.weight.heading} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${C.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${C.typography.weight.heading} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${C.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${C.typography.weight.semibold} ${C.typography.leading.heading} ${C.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${C.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${C.typography.weight.display} ${C.typography.leading.display} ${C.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${C.typography.family.body} ${C.typography.semantic.bodyLarge} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${C.typography.family.body} ${C.typography.semantic.small} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${C.typography.family.body} ${C.typography.semantic.caption} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${C.typography.family.body} ${C.typography.semantic.bodyLarge} ${C.typography.weight.strong} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.strong} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.strong} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${C.typography.family.body} ${C.typography.semantic.small} ${C.typography.weight.strong} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${C.typography.family.body} ${C.typography.semantic.bodyLarge} ${C.typography.weight.emphasis} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.emphasis} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.emphasis} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${C.typography.family.body} ${C.typography.semantic.small} ${C.typography.weight.emphasis} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${C.typography.family.body} ${C.typography.semantic.bodyLarge} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${C.typography.family.body} ${C.typography.semantic.body} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${C.typography.family.body} ${C.typography.semantic.small} ${C.typography.weight.body} ${C.typography.leading.body} ${C.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${C.typography.family.body} ${C.typography.semantic.caption} ${C.typography.weight.body} ${C.typography.leading.caption} ${C.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${C.typography.family.body} ${C.typography.semantic.caption} ${C.typography.weight.emphasis} ${C.typography.leading.caption} ${C.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${C.typography.family.body} ${C.typography.semantic.caption} ${C.typography.weight.emphasis} ${C.typography.leading.caption} ${C.typography.tracking.uppercase} ${C.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${C.typography.decoration.underline} ${C.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${C.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${C.typography.decoration.underline} hover:${C.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${C.typography.decoration.underline} ${C.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${C.typography.decoration.underline} ${C.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${C.typography.family.body} text-sm ${C.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${C.typography.family.body} text-sm ${C.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${C.typography.family.body} text-sm ${C.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${C.typography.family.body} text-sm ${C.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${C.typography.family.body} text-sm ${C.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${C.typography.family.body} text-sm ${C.typography.weight.body} text-green-600 dark:text-green-400`}},O={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}},St={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function Ce(e){return St[e]}const Vt={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function At(e){return Vt[e]}const Tt={default:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},premium:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},primary:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},light:{container:"bg-white/20 border border-white/30 text-white backdrop-blur-sm",icon:"text-white"}};function Lt(e){return Tt[e]}const It=({label:e,labelPosition:r="center",orientation:a="horizontal",spacing:t="md",thickness:o="thin",variant:i="light",className:s,lineClassName:l})=>{const d={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},c={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},u={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return n.jsxDEV("div",{className:f("self-stretch",c.vertical[o],u[i],d.vertical[t],s),role:"separator","aria-orientation":"vertical"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:99,columnNumber:7},void 0);if(!e)return n.jsxDEV("hr",{className:f(c.horizontal[o],u[i],d.horizontal[t],l,s),role:"separator","aria-orientation":"horizontal"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:116,columnNumber:7},void 0);const b={left:"justify-start",center:"justify-center",right:"justify-end"};return n.jsxDEV("div",{className:f("flex items-center",d.horizontal[t],b[r],s),role:"separator","aria-orientation":"horizontal",children:[r!=="left"&&n.jsxDEV("div",{className:f("flex-1",c.horizontal[o],u[i],l)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:149,columnNumber:9},void 0),n.jsxDEV("span",{className:f(L.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:158,columnNumber:7},void 0),r!=="right"&&n.jsxDEV("div",{className:f("flex-1",c.horizontal[o],u[i],l)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:167,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/divider.tsx",lineNumber:138,columnNumber:5},void 0)},Mt=({orientation:e="horizontal",spacing:r="md",thickness:a="thin",className:t})=>{const o={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},i={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},s=e==="horizontal";return n.jsxDEV("div",{role:"separator","aria-orientation":e,className:f("bg-gray-200 dark:bg-gray-700",s?"w-full":"h-full",i[e][a],o[e][r],t)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/separator.tsx",lineNumber:78,columnNumber:5},void 0)},Pt=({children:e,variant:r="blue",position:a="left",width:t="thick",padding:o="md",className:i})=>{const s={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},l={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},d={thin:"2",medium:"3",thick:"4"},c={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},u=`${l[a]}-${d[t]}`;return n.jsxDEV("div",{className:f(u,s[r],c[a][o],i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/border-accent.tsx",lineNumber:113,columnNumber:5},void 0)},Ot=({children:e,title:r,position:a="bottom-right",collapsible:t=!0,defaultCollapsed:o=!1,closeable:i=!1,onClose:s,className:l})=>{const[d,c]=y.useState(o),u={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return n.jsxDEV("div",{className:f("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",u[a],l),children:[(r||t||i)&&n.jsxDEV("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[r&&n.jsxDEV("h3",{className:"font-semibold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:74,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[t&&n.jsxDEV("button",{onClick:()=>c(!d),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":d?"Expand":"Collapse",children:n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:95,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:86,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:81,columnNumber:15},void 0),i&&n.jsxDEV("button",{onClick:s,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:117,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:111,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:106,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:79,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:72,columnNumber:9},void 0),!d&&n.jsxDEV("div",{className:"p-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:131,columnNumber:24},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/floating-panel.tsx",lineNumber:60,columnNumber:5},void 0)},Dt=({left:e,right:r,direction:a="horizontal",initialSplit:t=.5,split:o,onSplitChange:i,minLeftSize:s=100,minRightSize:l=100,dividerSize:d=8,resizable:c=!0,className:u})=>{const[b,x]=y.useState(t),[h,g]=y.useState(!1),p=y.useRef(null),N=o!==void 0?o:b,j=U=>{c&&(U.preventDefault(),g(!0))};y.useEffect(()=>{if(!h)return;const U=w=>{const S=p.current;if(!S)return;const E=S.getBoundingClientRect();let V;a==="horizontal"?V=(w.clientX-E.left)/E.width:V=(w.clientY-E.top)/E.height,V=Math.max(0,Math.min(1,V));const v=a==="horizontal"?E.width:E.height,T=typeof s=="string"?parseFloat(s)/100*v:s,M=typeof l=="string"?parseFloat(l)/100*v:l,I=T/v,z=1-M/v;V=Math.max(I,Math.min(z,V)),o!==void 0&&i?i(V):x(V)},_=()=>{g(!1)};return document.addEventListener("mousemove",U),document.addEventListener("mouseup",_),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",_)}},[h,a,s,l,o,i]),y.useEffect(()=>(h?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[h,a]);const k=a==="horizontal";return n.jsxDEV("div",{ref:p,className:f("w-full h-full flex",k?"flex-row":"flex-col",u),children:[n.jsxDEV("div",{className:"overflow-auto",style:{[k?"width":"height"]:`${N*100}%`},children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:181,columnNumber:7},void 0),n.jsxDEV("div",{onMouseDown:j,className:f("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",c&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",h&&"bg-blue-500 dark:bg-blue-400",k?"cursor-col-resize":"cursor-row-resize",!c&&"cursor-default"),style:{[k?"width":"height"]:`${d}px`},children:c&&n.jsxDEV("div",{className:f("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",h&&"text-white"),children:k?n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{cx:"10",cy:"6",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:218,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"10",cy:"12",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:219,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"10",cy:"18",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:220,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"6",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:221,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"12",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:222,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"14",cy:"18",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:223,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:217,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{cx:"6",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:227,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"12",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:228,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"18",cy:"10",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:229,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"6",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:230,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"12",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:231,columnNumber:17},void 0),n.jsxDEV("circle",{cx:"18",cy:"14",r:"1.5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:232,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:226,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:208,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:191,columnNumber:7},void 0),n.jsxDEV("div",{className:"overflow-auto flex-1",style:{[k?"width":"height"]:`${(1-N)*100}%`},children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:240,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/split-pane.tsx",lineNumber:172,columnNumber:5},void 0)},zt=({children:e,defaultWidth:r=300,defaultHeight:a=200,minWidth:t=100,minHeight:o=100,maxWidth:i,maxHeight:s,directions:l=["right","bottom","bottom-right"],onResize:d,onResizeEnd:c,showHandles:u=!0,className:b})=>{const[x,h]=y.useState(r),[g,p]=y.useState(a),[N,j]=y.useState(!1),[k,U]=y.useState(null),_=y.useRef(null),w=y.useRef({x:0,y:0,width:0,height:0}),S=v=>T=>{T.preventDefault(),T.stopPropagation(),j(!0),U(v),w.current={x:T.clientX,y:T.clientY,width:x,height:g}};y.useEffect(()=>{if(!N||!k)return;const v=M=>{const I=M.clientX-w.current.x,z=M.clientY-w.current.y;let D=w.current.width,W=w.current.height;k.includes("right")?D=w.current.width+I:k.includes("left")&&(D=w.current.width-I),k.includes("bottom")?W=w.current.height+z:k.includes("top")&&(W=w.current.height-z),D=Math.max(t,D),W=Math.max(o,W),i&&(D=Math.min(i,D)),s&&(W=Math.min(s,W)),h(D),p(W),d&&d(D,W)},T=()=>{j(!1),U(null),c&&c(x,g)};return document.addEventListener("mousemove",v),document.addEventListener("mouseup",T),()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",T)}},[N,k,x,g,t,o,i,s,d,c]);const E=y.useCallback(v=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[v],[]);y.useEffect(()=>(N?(document.body.style.userSelect="none",document.body.style.cursor=E(k)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[N,k,E]);const V=v=>{if(!l.includes(v))return null;const T={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return n.jsxDEV("div",{className:f("absolute z-10",u&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",T[v]),onMouseDown:S(v)},v,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable.tsx",lineNumber:226,columnNumber:7},void 0)};return n.jsxDEV("div",{ref:_,className:f("relative",b),style:{width:`${x}px`,height:`${g}px`},children:[e,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(V)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable.tsx",lineNumber:240,columnNumber:5},void 0)},Bt=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UresizableUpanels",children:r||"UresizableUpanels Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/layout/resizable-panels.tsx",lineNumber:43,columnNumber:5},void 0),Wt=({children:e,maxHeight:r,hideScrollbar:a=!1,direction:t="vertical",className:o})=>{const i={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},s=a?"scrollbar-hide":f("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),l=typeof r=="number"?`${r}px`:r;return n.jsxDEV("div",{className:f("relative",i[t],s,o),style:l?{maxHeight:l}:void 0,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-area.tsx",lineNumber:66,columnNumber:5},void 0)},Ft=({children:e,columns:r=3,gap:a=16,breakpoints:t,className:o})=>{const[i,s]=y.useState(r),l=y.useRef(null);y.useEffect(()=>{if(!t)return;const u=()=>{const b=window.innerWidth,x=Object.keys(t).map(Number).sort((h,g)=>g-h);for(const h of x)if(b>=h){s(t[h]);return}s(r)};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[t,r]);const d=y.Children.toArray(e),c=Array.from({length:i},()=>[]);return d.forEach((u,b)=>{c[b%i].push(u)}),n.jsxDEV("div",{ref:l,className:f("flex",o),style:{gap:`${a}px`},children:c.map((u,b)=>n.jsxDEV("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:u},b,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/masonry.tsx",lineNumber:93,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/masonry.tsx",lineNumber:87,columnNumber:5},void 0)},fe=({children:e,container:r})=>{const[a,t]=y.useState(!1);if(y.useEffect(()=>(t(!0),()=>t(!1)),[]),!a)return null;const o=r||document.body;return on.createPortal(e,o)},Qe=({isOpen:e,onClose:r,children:a,blur:t=!1,opacity:o="medium",zIndex:i=40,lockScroll:s=!0,className:l})=>{if(y.useEffect(()=>{if(s){if(e){const c=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${c}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[e,s]),!e)return null;const d={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return n.jsxDEV(fe,{children:n.jsxDEV("div",{className:f("fixed inset-0","transition-opacity duration-300",t&&"backdrop-blur-sm",d[o],l),style:{zIndex:i},onClick:r,"aria-hidden":"true",children:a&&n.jsxDEV("div",{className:"relative h-full w-full",onClick:c=>c.stopPropagation(),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:96,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:83,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/overlay.tsx",lineNumber:82,columnNumber:5},void 0)},qt=({children:e,as:r="p",size:a="base",weight:t="normal",color:o="default",align:i,transform:s="none",truncate:l=!1,lineClamp:d,className:c})=>{const u={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},b={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},x={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},h=i?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[i]:"",g={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},p=d?{display:"-webkit-box",WebkitLineClamp:d,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return n.jsxDEV(r,{className:f(u[a],b[t],x[o],h,g[s],l&&"truncate",d&&"overflow-hidden",c),style:p,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text.tsx",lineNumber:119,columnNumber:5},void 0)},$t=({children:e,level:r=2,size:a,weight:t="bold",color:o="default",align:i,className:s})=>{const d=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[r],c={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},u={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},b={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},x=i?{left:"text-left",center:"text-center",right:"text-right"}[i]:"",h=`h${r}`;return y.createElement(h,{className:f(c[d],u[t],b[o],x,s)},e)},Ht=Z.cva("",{variants:{variant:{hero:L.heading.display.hero(),display:L.heading.display.lg(),h1:L.heading.h1(),h2:L.heading.h2(),h3:L.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),Gt=({children:e,variant:r="h1",responsive:a=!0,align:t="left",color:o="default",className:i,as:s})=>{const l=s||(r==="hero"||r==="display"||r==="h1"?"h1":r==="h2"?"h2":"h3");return n.jsxDEV(l,{className:f(Ht({variant:r,responsive:a,align:t,color:o}),i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:70,columnNumber:5},void 0)},Yt=Z.cva("",{variants:{variant:{h2:L.heading.h2(),h3:L.heading.h3(),h4:L.heading.h4(),h5:L.heading.h5(),h6:L.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),Kt=({children:e,variant:r="h2",spacing:a="md",align:t="left",className:o,as:i})=>{const s=i||r;return y.createElement(s,{className:f(Yt({variant:r,spacing:a,align:t}),o)},e)},Zt=Z.cva("",{variants:{variant:{body:L.body.md(),lead:L.body.lg(),large:L.body.lg(),small:L.body.sm(),caption:L.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),Qt=({children:e,variant:r="body",color:a="default",align:t="left",className:o,as:i="p"})=>y.createElement(i,{className:f(Zt({variant:r,color:a,align:t}),o)},e),Xt=Z.cva(L.link.default(),{variants:{variant:{default:L.link.default(),subtle:L.link.subtle(),muted:L.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),Jt=({children:e,href:r,variant:a="default",external:t=!1,className:o,target:i,rel:s})=>n.jsxDEV("a",{href:r,target:i||(t?"_blank":void 0),rel:s||(t?"noopener noreferrer":void 0),className:f(Xt({variant:a,external:t}),o),children:[e,t&&n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:242,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:236,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/typography.tsx",lineNumber:228,columnNumber:5},void 0),Rt=({children:e,size:r="md",variant:a="default",className:t})=>{const o={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},i={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return n.jsxDEV("code",{className:f("inline-block font-mono font-medium rounded",o[r],i[a],t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/code.tsx",lineNumber:58,columnNumber:5},void 0)},eo=({children:e,variant:r="primary",size:a="md",inline:t=!1,align:o="left",className:i,wrap:s=!1})=>{const l={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},d={xs:{text:"text-xs",padding:t?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:t?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:t?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:t?"px-3 py-1":"px-4 py-2"}},c={left:"text-left",center:"text-center",right:"text-right"},u=d[a],b=t?"code":"div";return n.jsxDEV(b,{className:f("font-mono rounded-lg",l[r],u.text,u.padding,!t&&c[o],t?"inline-block":"block",!s&&"overflow-x-auto whitespace-nowrap",s&&"break-all",i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/code-display.tsx",lineNumber:94,columnNumber:5},void 0)},ro=({children:e,size:r="md",className:a})=>{const t={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return n.jsxDEV("kbd",{className:f("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",t[r],a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/kbd.tsx",lineNumber:42,columnNumber:5},void 0)},no=({children:e,cite:r,variant:a="default",size:t="md",className:o})=>{const i={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},s={sm:"text-xs",md:"text-sm",lg:"text-base"},l={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return n.jsxDEV("blockquote",{className:f("rounded-r-lg",i[t],l[a],o),children:[n.jsxDEV("p",{className:"text-gray-800 dark:text-gray-200 italic",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:76,columnNumber:7},void 0),r&&n.jsxDEV("footer",{className:f("mt-2 text-gray-600 dark:text-gray-400",s[t]),children:["— ",n.jsxDEV("cite",{className:"not-italic font-medium",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:84,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:78,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/blockquote.tsx",lineNumber:68,columnNumber:5},void 0)},ao=({children:e,variant:r="default",showIcon:a=!1,size:t="sm",className:o})=>{const i={sm:"text-sm",base:"text-base"},s={sm:"h-4 w-4",base:"h-5 w-5"},d={default:{text:"text-gray-600 dark:text-gray-400",icon:A.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:A.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:A.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:A.ExclamationCircleIcon}}[r],c=d.icon;return n.jsxDEV("div",{className:f("flex items-start gap-1.5",o),children:[a&&n.jsxDEV(c,{className:f(s[t],d.text,"flex-shrink-0 mt-0.5")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:86,columnNumber:9},void 0),n.jsxDEV("p",{className:f(i[t],d.text),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:90,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/helper-text.tsx",lineNumber:84,columnNumber:5},void 0)},to=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UscreenUreaderUtext",children:r||"UscreenUreaderUtext Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/screen-reader-text.tsx",lineNumber:43,columnNumber:5},void 0),oo=({children:e,maxLength:r=50,position:a="end",ellipsis:t="...",showTooltip:o=!0,className:i})=>{const s=e||"";if(s.length<=r)return n.jsxDEV("span",{className:i,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/truncated-text.tsx",lineNumber:55,columnNumber:12},void 0);const d=(()=>{const c=t.length,u=r-c;switch(a){case"start":return t+s.slice(s.length-u);case"middle":{const b=Math.floor(u/2),x=s.slice(0,b),h=s.slice(s.length-(u-b));return x+t+h}case"end":default:return s.slice(0,u)+t}})();return n.jsxDEV("span",{className:f("inline-block",i),title:o?s:void 0,children:d},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/truncated-text.tsx",lineNumber:83,columnNumber:5},void 0)},io=({value:e,style:r="decimal",currency:a="USD",unit:t,minimumFractionDigits:o,maximumFractionDigits:i,locale:s="en-US",notation:l="standard",className:d})=>{const c=()=>{try{const u={style:r,notation:l,minimumFractionDigits:o,maximumFractionDigits:i};return r==="currency"&&(u.currency=a),r==="unit"&&t&&(u.unit=t),new Intl.NumberFormat(s,u).format(e)}catch(u){return console.error("Number formatting error:",u),e.toLocaleString(s)}};return n.jsxDEV("span",{className:f(d),children:c()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/formatted-number.tsx",lineNumber:91,columnNumber:10},void 0)},so=({date:e,showTooltip:r=!0,updateInterval:a=0,className:t})=>{const[,o]=y.useState(0),i=y.useMemo(()=>e instanceof Date?e:new Date(e),[e]);y.useEffect(()=>{if(a===0)return;const c=setInterval(()=>{o(u=>u+1)},a*1e3);return()=>clearInterval(c)},[a]);const l=(()=>{const u=new Date().getTime()-i.getTime(),b=Math.floor(u/1e3),x=Math.floor(b/60),h=Math.floor(x/60),g=Math.floor(h/24),p=Math.floor(g/7),N=Math.floor(g/30),j=Math.floor(g/365);return b<60?"just now":x<60?`${x} ${x===1?"minute":"minutes"} ago`:h<24?`${h} ${h===1?"hour":"hours"} ago`:g<7?`${g} ${g===1?"day":"days"} ago`:p<4?`${p} ${p===1?"week":"weeks"} ago`:N<12?`${N} ${N===1?"month":"months"} ago`:`${j} ${j===1?"year":"years"} ago`})(),d=i.toLocaleString();return n.jsxDEV("time",{dateTime:i.toISOString(),title:r?d:void 0,className:f(t),children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/typography/relative-time.tsx",lineNumber:94,columnNumber:5},void 0)},Me=({size:e="default",variant:r="default",className:a,ariaLabel:t="Loading",loadingText:o="Loading..."})=>{const i=()=>{const s={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},l={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${s[e]} ${l[r]}`};return n.jsxDEV("div",{className:f(i(),a),role:"status","aria-label":t,children:n.jsxDEV("span",{className:"sr-only",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spinner.tsx",lineNumber:44,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/spinner.tsx",lineNumber:39,columnNumber:5},void 0)},lo=({isLoading:e,message:r,mode:a="fullscreen",blur:t=!1,spinnerSize:o="large",className:i})=>e?n.jsxDEV("div",{className:f(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",t&&"backdrop-blur-sm",i),role:"alert","aria-live":"polite","aria-busy":"true",children:[n.jsxDEV(Me,{size:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:71,columnNumber:7},void 0),r&&n.jsxDEV("p",{className:f(L.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:73,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-overlay.tsx",lineNumber:58,columnNumber:5},void 0):null,co=({size:e="md",variant:r="primary",color:a,className:t})=>{const o={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},i={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},s=f("rounded-full",o[e],a?"":i[r]);return n.jsxDEV("div",{className:f("flex items-center gap-1",t),children:[n.jsxDEV("div",{className:s,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:57,columnNumber:7},void 0),n.jsxDEV("div",{className:s,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:65,columnNumber:7},void 0),n.jsxDEV("div",{className:s,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:73,columnNumber:7},void 0),n.jsxDEV("style",{children:`
7
2
  @keyframes loading-dot-bounce {
8
3
  0%, 80%, 100% {
9
4
  transform: scale(0);
@@ -14,26 +9,26 @@ React keys must be passed directly to JSX without using spread:
14
9
  opacity: 1;
15
10
  }
16
11
  }
17
- `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:81,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:56,columnNumber:5},void 0)},Ci=({message:e="Loading...",size:r="default",fullScreen:t=!1,variant:a="default",className:i})=>{const s={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[r],l=t?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",c=n.jsxDEV("div",{className:f(l,i),children:[n.jsxDEV(qe,{size:s.spinner,variant:a,className:"mb-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:33,columnNumber:7},void 0),e&&n.jsxDEV("p",{className:f(s.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:35,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:32,columnNumber:5},void 0);return t?n.jsxDEV("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:n.jsxDEV("div",{className:"flex items-center justify-center min-h-full p-4",children:[n.jsxDEV(qe,{size:s.spinner,variant:a,className:"mb-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:51,columnNumber:11},void 0),e&&n.jsxDEV("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:53,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:50,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:49,columnNumber:7},void 0):c},Si=({variant:e="text",width:r,height:t,className:a,count:i,lines:o=1,animate:s=!0,borderRadius:l,theme:c,spacing:u,gap:m="md"})=>{const b={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},p={light:"bg-gray-200",dark:"bg-gray-700"},h={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},g=i??o,x=N=>{const U={};return r&&(U.width=typeof r=="number"?`${r}px`:r),t&&(U.height=typeof t=="number"?`${t}px`:t),l&&(U.borderRadius=l),n.jsxDEV("div",{className:f(s&&"animate-pulse",c?p[c]:"bg-gray-200 dark:bg-gray-700",b[e],a),style:U},N,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skeleton-loader.tsx",lineNumber:104,columnNumber:7},void 0)};if(g>1){const N=u!==void 0?`space-y-${u}`:h[m];return n.jsxDEV("div",{className:f(N),children:Array.from({length:g}).map((U,_)=>x(_))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skeleton-loader.tsx",lineNumber:124,columnNumber:7},void 0)}return x()},Vi={info:A.InformationCircleIcon,success:A.CheckCircleIcon,warning:A.ExclamationTriangleIcon,attention:A.BellAlertIcon,error:A.XCircleIcon},Ai=({children:e,className:r})=>n.jsxDEV("div",{className:f("font-medium mb-1",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:33,columnNumber:3},void 0),Ti=({children:e,className:r})=>n.jsxDEV("div",{className:f("text-sm break-words",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:40,columnNumber:3},void 0),wr=({variant:e="info",title:r,description:t,icon:a,children:i,className:o})=>{const s=Vi[e],l=a||n.jsxDEV(s,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:52,columnNumber:33},void 0),c=typeof O.alert[e]=="function"?O.alert[e]():"";return n.jsxDEV("div",{role:"alert",className:f(c,o),children:[l&&n.jsxDEV("div",{className:"flex-shrink-0",children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:60,columnNumber:25},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[r&&n.jsxDEV("div",{className:"font-medium mb-1 break-words",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:62,columnNumber:19},void 0),t&&n.jsxDEV("div",{className:"text-sm break-words",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:64,columnNumber:11},void 0),i]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:61,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:59,columnNumber:5},void 0)},Li=({message:e,variant:r="info",dismissible:t=!1,onDismiss:a,className:i})=>{const o={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return n.jsxDEV("div",{className:f("p-4 border rounded-lg flex items-center justify-between",o[r],i),children:[n.jsxDEV("span",{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:37,columnNumber:7},void 0),t&&n.jsxDEV("button",{onClick:a,className:"ml-4 font-bold",children:"×"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:30,columnNumber:5},void 0)},Un=y.createContext(void 0),Ii=()=>{const e=y.useContext(Un);if(!e)throw new Error("useToast must be used within ToastProvider");return e},Dn=({toast:e,onRemove:r})=>{const{id:t,title:a,description:i,variant:o="default",action:s}=e,l={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},c={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},u={default:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:75,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:74,columnNumber:7},void 0),success:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:84,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:83,columnNumber:7},void 0),error:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:93,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:92,columnNumber:7},void 0),warning:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:102,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:101,columnNumber:7},void 0),info:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:111,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:110,columnNumber:7},void 0)};return n.jsxDEV("div",{className:f("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",l[o]),children:[n.jsxDEV("div",{className:f("flex-shrink-0",c[o]),children:u[o]},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:129,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[a&&n.jsxDEV("p",{className:"font-semibold text-gray-900 dark:text-white",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:135,columnNumber:11},void 0),i&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:138,columnNumber:11},void 0),s&&n.jsxDEV("button",{onClick:s.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:s.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:143,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:133,columnNumber:7},void 0),n.jsxDEV("button",{onClick:()=>r(t),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:157,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:152,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:121,columnNumber:5},void 0)},Pi=({toast:e,onRemove:r})=>(y.useEffect(()=>{const t=e.duration??5e3;if(t>0){const a=setTimeout(()=>{r(e.id)},t);return()=>clearTimeout(a)}},[e.id,e.duration,r]),n.jsxDEV(Dn,{toast:e,onRemove:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:194,columnNumber:10},void 0)),Mi=({children:e})=>{const[r,t]=y.useState([]),a=y.useCallback(o=>{t(s=>s.filter(l=>l.id!==o))},[]),i=y.useCallback(o=>{const s=Math.random().toString(36).substr(2,9);t(l=>[...l,{...o,id:s}])},[]);return n.jsxDEV(Un.Provider,{value:{toasts:r,addToast:i,removeToast:a},children:[e,n.jsxDEV("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:n.jsxDEV("div",{className:"pointer-events-auto",children:r.map(o=>n.jsxDEV("div",{className:"mb-2",children:n.jsxDEV(Pi,{toast:o,onRemove:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:231,columnNumber:15},void 0)},o.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:230,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:228,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:227,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:225,columnNumber:5},void 0)},Oi=({message:e,variant:r="info",onClose:t,className:a})=>{const i={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return n.jsxDEV("div",{className:f("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",i[r],a),children:[n.jsxDEV("span",{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:32,columnNumber:7},void 0),t&&n.jsxDEV("button",{onClick:t,className:"ml-4",children:"×"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:34,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:25,columnNumber:5},void 0)},Ri=({count:e,maxCount:r=99,variant:t="danger",className:a})=>{const i=e>r?`${r}+`:e,o={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return n.jsxDEV("span",{className:f("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",o[t],a),children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-badge.tsx",lineNumber:25,columnNumber:5},void 0)},zi=({notifications:e,onMarkAsRead:r,className:t})=>n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",t),children:e.map(a=>n.jsxDEV("div",{className:f("p-3 rounded mb-2",a.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>r?.(a.id),children:[n.jsxDEV("h4",{className:"font-semibold text-gray-900 dark:text-white",children:a.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:39,columnNumber:11},void 0),n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:a.message},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:42,columnNumber:11},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:a.timestamp},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:45,columnNumber:11},void 0)]},a.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:31,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:24,columnNumber:5},void 0),Bi=({children:e,variant:r="default",size:t="sm",icon:a,dot:i=!1,pill:o=!1,outline:s=!1,onClick:l,dismissible:c=!1,onDismiss:u,count:m,maxCount:b,className:p})=>{const h={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},g={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},N={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},U={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},_=m!==void 0?b!==void 0&&m>b?`${b}+`:m.toString():null,E=n.jsxDEV(n.Fragment,{children:[i&&n.jsxDEV("span",{className:f("h-2 w-2 rounded-full mr-1.5",U[r])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:142,columnNumber:9},void 0),a&&n.jsxDEV("span",{className:f(N[t],"mr-1"),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:150,columnNumber:9},void 0),e,_&&n.jsxDEV("span",{className:"ml-1",children:_},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:153,columnNumber:24},void 0),c&&u&&n.jsxDEV("button",{onClick:k=>{k.stopPropagation(),u()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:n.jsxDEV(xe.XMarkIcon,{className:f(N[t])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:155,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:140,columnNumber:5},void 0),j=l?"button":"span";return n.jsxDEV(j,{onClick:l,className:f("inline-flex items-center font-medium",s?g[r]:h[r],x[t],o?"rounded-full":"rounded",l&&"cursor-pointer hover:opacity-80",p),children:E},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:172,columnNumber:5},void 0)},Wi=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UbadgeUdesigner",children:r||"UbadgeUdesigner Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/badge-designer.tsx",lineNumber:43,columnNumber:5},void 0);var ye={},ve={},Er={},Cn;function Fi(){return Cn||(Cn=1,Object.defineProperty(Er,"__esModule",{value:!0})),Er}var Ur={},q={},Sn;function qi(){if(Sn)return q;Sn=1,Object.defineProperty(q,"__esModule",{value:!0}),q.isIndexerErrorResponse=e,q.isIndexerSuccessResponse=r,q.isAddressValidationResponse=t,q.isEmailAccountsResponse=a,q.isRewardsResponse=i,q.isDelegatedToResponse=o,q.isDelegatedFromResponse=s,q.isNonceResponse=l,q.isEntitlementResponse=c,q.isSignInMessageResponse=u,q.isPointsResponse=m,q.isLeaderboardResponse=b,q.isSiteStatsResponse=p,q.isTemplateResponse=h,q.isTemplateListResponse=g,q.isTemplateDeleteResponse=x,q.isWebhookResponse=N,q.isWebhookListResponse=U,q.isWebhookDeleteResponse=_,q.isReferralCodeResponse=E,q.isReferralStatsResponse=j,q.isAuthenticationStatusResponse=k,q.isBlockStatusResponse=C,q.isNameServiceResponse=w,q.isNameResolutionResponse=S;function e(v){return!!(v&&typeof v=="object"&&"error"in v&&"success"in v&&!v.success)}function r(v){return!!(v&&typeof v=="object"&&"success"in v&&v.success===!0&&"data"in v)}function t(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&("name"in v.data||"wallet"in v.data))}function a(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"accounts"in v.data&&Array.isArray(v.data.accounts))}function i(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"rewards"in v.data&&"records"in v.data&&"points"in v.data)}function o(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"chainType"in v.data)}function s(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"from"in v.data&&Array.isArray(v.data.from))}function l(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"nonce"in v.data)}function c(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"entitlement"in v.data&&"verified"in v.data)}function u(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"walletAddress"in v.data)}function m(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"pointsEarned"in v.data&&"walletAddress"in v.data)}function b(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"leaderboard"in v.data)}function p(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"totalPoints"in v.data)}function h(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"template"in v.data&&"verified"in v.data&&v.data.template&&typeof v.data.template=="object"&&"id"in v.data.template&&"name"in v.data.template&&"subject"in v.data.template&&"body"in v.data.template)}function g(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"templates"in v.data&&"total"in v.data&&"hasMore"in v.data&&"verified"in v.data&&Array.isArray(v.data.templates))}function x(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"verified"in v.data)}function N(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"webhook"in v.data&&"verified"in v.data&&v.data.webhook&&typeof v.data.webhook=="object"&&"id"in v.data.webhook&&"webhookUrl"in v.data.webhook)}function U(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"webhooks"in v.data&&"total"in v.data&&"hasMore"in v.data&&"verified"in v.data&&Array.isArray(v.data.webhooks))}function _(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"verified"in v.data)}function E(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"referralCode"in v.data&&"createdAt"in v.data)}function j(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"total"in v.data&&"consumptions"in v.data&&Array.isArray(v.data.consumptions))}function k(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"authenticated"in v.data&&typeof v.data.authenticated=="boolean")}function C(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"chains"in v.data&&"totalChains"in v.data&&"activeChains"in v.data&&"timestamp"in v.data&&Array.isArray(v.data.chains))}function w(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"names"in v.data&&Array.isArray(v.data.names))}function S(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"chainType"in v.data)}return q}var Vn;function $i(){return Vn||(Vn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIndexerSuccessResponse=e.isIndexerErrorResponse=e.isWebhookDeleteResponse=e.isWebhookListResponse=e.isWebhookResponse=e.isTemplateDeleteResponse=e.isTemplateListResponse=e.isTemplateResponse=e.isNameResolutionResponse=e.isNameServiceResponse=e.isBlockStatusResponse=e.isAuthenticationStatusResponse=e.isReferralStatsResponse=e.isReferralCodeResponse=e.isSiteStatsResponse=e.isLeaderboardResponse=e.isPointsResponse=e.isSignInMessageResponse=e.isEntitlementResponse=e.isNonceResponse=e.isDelegatedFromResponse=e.isDelegatedToResponse=e.isRewardsResponse=e.isEmailAccountsResponse=e.isAddressValidationResponse=void 0;var r=qi();Object.defineProperty(e,"isAddressValidationResponse",{enumerable:!0,get:function(){return r.isAddressValidationResponse}}),Object.defineProperty(e,"isEmailAccountsResponse",{enumerable:!0,get:function(){return r.isEmailAccountsResponse}}),Object.defineProperty(e,"isRewardsResponse",{enumerable:!0,get:function(){return r.isRewardsResponse}}),Object.defineProperty(e,"isDelegatedToResponse",{enumerable:!0,get:function(){return r.isDelegatedToResponse}}),Object.defineProperty(e,"isDelegatedFromResponse",{enumerable:!0,get:function(){return r.isDelegatedFromResponse}}),Object.defineProperty(e,"isNonceResponse",{enumerable:!0,get:function(){return r.isNonceResponse}}),Object.defineProperty(e,"isEntitlementResponse",{enumerable:!0,get:function(){return r.isEntitlementResponse}}),Object.defineProperty(e,"isSignInMessageResponse",{enumerable:!0,get:function(){return r.isSignInMessageResponse}}),Object.defineProperty(e,"isPointsResponse",{enumerable:!0,get:function(){return r.isPointsResponse}}),Object.defineProperty(e,"isLeaderboardResponse",{enumerable:!0,get:function(){return r.isLeaderboardResponse}}),Object.defineProperty(e,"isSiteStatsResponse",{enumerable:!0,get:function(){return r.isSiteStatsResponse}}),Object.defineProperty(e,"isReferralCodeResponse",{enumerable:!0,get:function(){return r.isReferralCodeResponse}}),Object.defineProperty(e,"isReferralStatsResponse",{enumerable:!0,get:function(){return r.isReferralStatsResponse}}),Object.defineProperty(e,"isAuthenticationStatusResponse",{enumerable:!0,get:function(){return r.isAuthenticationStatusResponse}}),Object.defineProperty(e,"isBlockStatusResponse",{enumerable:!0,get:function(){return r.isBlockStatusResponse}}),Object.defineProperty(e,"isNameServiceResponse",{enumerable:!0,get:function(){return r.isNameServiceResponse}}),Object.defineProperty(e,"isNameResolutionResponse",{enumerable:!0,get:function(){return r.isNameResolutionResponse}}),Object.defineProperty(e,"isTemplateResponse",{enumerable:!0,get:function(){return r.isTemplateResponse}}),Object.defineProperty(e,"isTemplateListResponse",{enumerable:!0,get:function(){return r.isTemplateListResponse}}),Object.defineProperty(e,"isTemplateDeleteResponse",{enumerable:!0,get:function(){return r.isTemplateDeleteResponse}}),Object.defineProperty(e,"isWebhookResponse",{enumerable:!0,get:function(){return r.isWebhookResponse}}),Object.defineProperty(e,"isWebhookListResponse",{enumerable:!0,get:function(){return r.isWebhookListResponse}}),Object.defineProperty(e,"isWebhookDeleteResponse",{enumerable:!0,get:function(){return r.isWebhookDeleteResponse}}),Object.defineProperty(e,"isIndexerErrorResponse",{enumerable:!0,get:function(){return r.isIndexerErrorResponse}}),Object.defineProperty(e,"isIndexerSuccessResponse",{enumerable:!0,get:function(){return r.isIndexerSuccessResponse}})})(Ur)),Ur}var Dr={},M={},le={},An;function Tn(){if(An)return le;An=1,Object.defineProperty(le,"__esModule",{value:!0}),le.isWildduckMessage=le.isWildduckAuthResponse=le.MailboxSpecialUse=void 0,le.createPreAuthRequest=e,le.createAuthenticateRequest=r;function e(o,s){return{username:o,scope:"master",...s}}function r(o,s,l,c){return{username:o,...s&&{signature:s},...l&&{message:l},protocol:"API",scope:"master",token:!1,...c}}var t;(function(o){o.Inbox="\\Inbox",o.Sent="\\Sent",o.Trash="\\Trash",o.Drafts="\\Drafts",o.Junk="\\Junk",o.Settings="\\App.Settings",o.Developer="\\App.Developer"})(t||(le.MailboxSpecialUse=t={}));const a=o=>typeof o=="object"&&o!==null&&"success"in o&&typeof o.success=="boolean";le.isWildduckAuthResponse=a;const i=o=>typeof o=="object"&&o!==null&&"id"in o&&"subject"in o&&typeof o.id=="number"&&typeof o.subject=="string";return le.isWildduckMessage=i,le}var Ln;function je(){if(Ln)return M;Ln=1,Object.defineProperty(M,"__esModule",{value:!0}),M.Currency=M.ErrorType=M.FeatureFlag=M.EmailValidationState=M.PlatformType=M.ConnectionState=M.ConnectionType=M.EmailSortCriteria=M.SortOrder=M.EmailAddressType=M.NotificationType=M.RequestStatus=M.SubscriptionAction=M.EmailAction=M.MediumView=M.MobileView=M.EmailComposeType=M.EmailFolderUtils=M.FontSize=M.Theme=M.Chain=M.ChainType=M.AuthStatus=void 0;const e=Tn();var r;(function(w){w.CONNECTED="connected",w.DISCONNECTED="disconnected",w.VERIFIED="verified"})(r||(M.AuthStatus=r={}));var t;(function(w){w.EVM="evm",w.SOLANA="solana"})(t||(M.ChainType=t={}));var a;(function(w){w.ETH_MAINNET="eth-mainnet",w.ETH_SEPOLIA="eth-sepolia",w.ETH_GOERLI="eth-goerli",w.POLYGON_MAINNET="polygon-mainnet",w.POLYGON_MUMBAI="polygon-mumbai",w.POLYGON_AMOY="polygon-amoy",w.OPTIMISM_MAINNET="optimism-mainnet",w.OPTIMISM_SEPOLIA="optimism-sepolia",w.OPTIMISM_GOERLI="optimism-goerli",w.ARBITRUM_MAINNET="arbitrum-mainnet",w.ARBITRUM_SEPOLIA="arbitrum-sepolia",w.ARBITRUM_GOERLI="arbitrum-goerli",w.BASE_MAINNET="base-mainnet",w.BASE_SEPOLIA="base-sepolia",w.BASE_GOERLI="base-goerli",w.AVALANCHE_MAINNET="avalanche-mainnet",w.AVALANCHE_FUJI="avalanche-fuji",w.BNB_MAINNET="bnb-mainnet",w.BNB_TESTNET="bnb-testnet",w.GNOSIS_MAINNET="gnosis-mainnet",w.GNOSIS_CHIADO="gnosis-chiado",w.CELO_MAINNET="celo-mainnet",w.CELO_ALFAJORES="celo-alfajores",w.ZKSYNC_MAINNET="zksync-mainnet",w.ZKSYNC_SEPOLIA="zksync-sepolia",w.LINEA_MAINNET="linea-mainnet",w.LINEA_SEPOLIA="linea-sepolia",w.SCROLL_MAINNET="scroll-mainnet",w.SCROLL_SEPOLIA="scroll-sepolia",w.MONAD_MAINNET="monad-mainnet",w.MONAD_TESTNET="monad-testnet",w.STORY_MAINNET="story-mainnet",w.STORY_TESTNET="story-testnet",w.PLUME_MAINNET="plume-mainnet",w.PLUME_TESTNET="plume-testnet",w.NEXUS_MAINNET="nexus-mainnet",w.NEXUS_TESTNET="nexus-testnet",w.HYPEREVM_MAINNET="hyperevm-mainnet",w.HYPEREVM_TESTNET="hyperevm-testnet",w.SONIC_MAINNET="sonic-mainnet",w.SONIC_TESTNET="sonic-testnet",w.SONIC_BLAZE="sonic-blaze",w.UNICHAIN_MAINNET="unichain-mainnet",w.UNICHAIN_SEPOLIA="unichain-sepolia",w.WORLD_MAINNET="world-mainnet",w.XDC_MAINNET="xdc-mainnet",w.INK_TESTNET="ink-testnet",w.FETCH_MAINNET="fetch-mainnet",w.FETCH_TESTNET="fetch-testnet",w.GENSYN_MAINNET="gensyn-mainnet",w.GENSYN_TESTNET="gensyn-testnet",w.RITUAL_MAINNET="ritual-mainnet",w.RITUAL_TESTNET="ritual-testnet",w.SOLANA_MAINNET="solana-mainnet",w.SOLANA_DEVNET="solana-devnet",w.SOLANA_TESTNET="solana-testnet",w.EVM_LOCAL="evm-local",w.SOLANA_LOCAL="solana-local"})(a||(M.Chain=a={}));var i;(function(w){w.LIGHT="light",w.DARK="dark",w.SYSTEM="system"})(i||(M.Theme=i={}));var o;(function(w){w.SMALL="small",w.MEDIUM="medium",w.LARGE="large"})(o||(M.FontSize=o={})),M.EmailFolderUtils={isStandardFolder(w){return Object.values(e.MailboxSpecialUse).includes(w)},getStandardFolders(){return Object.values(e.MailboxSpecialUse)},isCustomFolder(w){return!this.isStandardFolder(w)},displayName(w){return w.charAt(0).toUpperCase()+w.slice(1)}};var s;(function(w){w.NEW="new",w.REPLY="reply",w.REPLY_ALL="replyAll",w.FORWARD="forward"})(s||(M.EmailComposeType=s={}));var l;(function(w){w.EMAIL_ADDRESSES="emailAddresses",w.FOLDERS="folders",w.EMAILS="emails",w.EMAIL_BODY="emailBody"})(l||(M.MobileView=l={}));var c;(function(w){w.LEFT="left",w.RIGHT="right"})(c||(M.MediumView=c={}));var u;(function(w){w.OPEN="open",w.REPLY="reply",w.FORWARD="forward",w.DELETE="delete",w.STAR="star",w.UNSTAR="unstar",w.MARK_READ="mark_read",w.MARK_UNREAD="mark_unread"})(u||(M.EmailAction=u={}));var m;(function(w){w.VIEW="view",w.PURCHASE="purchase",w.CANCEL="cancel",w.RESTORE="restore"})(m||(M.SubscriptionAction=m={}));var b;(function(w){w.IDLE="idle",w.LOADING="loading",w.SUCCESS="success",w.ERROR="error"})(b||(M.RequestStatus=b={}));var p;(function(w){w.INFO="info",w.SUCCESS="success",w.WARNING="warning",w.ERROR="error"})(p||(M.NotificationType=p={}));var h;(function(w){w.DIRECT="direct",w.ENS="ens",w.SNS="sns",w.CUSTOM="custom"})(h||(M.EmailAddressType=h={}));var g;(function(w){w.ASC="asc",w.DESC="desc"})(g||(M.SortOrder=g={}));var x;(function(w){w.DATE="date",w.SUBJECT="subject",w.FROM="from",w.SIZE="size"})(x||(M.EmailSortCriteria=x={}));var N;(function(w){w.UNKNOWN="unknown",w.NONE="none",w.WIFI="wifi",w.CELLULAR_2G="2g",w.CELLULAR_3G="3g",w.CELLULAR_4G="4g",w.CELLULAR_5G="5g",w.ETHERNET="ethernet"})(N||(M.ConnectionType=N={}));var U;(function(w){w.UNKNOWN="unknown",w.DISCONNECTED="disconnected",w.CONNECTING="connecting",w.CONNECTED="connected",w.RECONNECTING="reconnecting",w.VERIFIED="verified",w.LIMITED="limited",w.ERROR="error"})(U||(M.ConnectionState=U={}));var _;(function(w){w.WEB="web",w.REACT_NATIVE="react_native",w.DESKTOP="desktop"})(_||(M.PlatformType=_={}));var E;(function(w){w.VALID="valid",w.INVALID="invalid",w.PENDING="pending",w.UNKNOWN="unknown"})(E||(M.EmailValidationState=E={}));var j;(function(w){w.AI_SEARCH="ai_search",w.SMART_COMPOSE="smart_compose",w.ADVANCED_FILTERS="advanced_filters",w.DARK_MODE="dark_mode",w.NOTIFICATIONS="notifications",w.ANALYTICS="analytics"})(j||(M.FeatureFlag=j={}));var k;(function(w){w.NETWORK="network",w.AUTH="auth",w.VALIDATION="validation",w.PERMISSION="permission",w.UNKNOWN="unknown"})(k||(M.ErrorType=k={}));var C;return(function(w){w.USD="USD",w.EUR="EUR",w.GBP="GBP",w.CAD="CAD",w.AUD="AUD"})(C||(M.Currency=C={})),M}var Cr={},In;function Hi(){return In||(In=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletConnectionState=e.isWalletVerified=e.isWalletConnected=void 0;const r=je(),t=o=>o!=null&&!!o.walletAddress;e.isWalletConnected=t;const a=o=>(0,e.isWalletConnected)(o)&&!!o.message&&!!o.signature;e.isWalletVerified=a;const i=o=>(0,e.isWalletConnected)(o)?(0,e.isWalletVerified)(o)?r.ConnectionState.VERIFIED:r.ConnectionState.CONNECTED:r.ConnectionState.DISCONNECTED;e.getWalletConnectionState=i})(Cr)),Cr}var Pn;function Gi(){return Pn||(Pn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isWalletVerified=e.isWalletConnected=e.getWalletConnectionState=e.Theme=e.SubscriptionAction=e.SortOrder=e.RequestStatus=e.PlatformType=e.NotificationType=e.MobileView=e.MediumView=e.FontSize=e.FeatureFlag=e.ErrorType=e.EmailValidationState=e.EmailSortCriteria=e.EmailFolderUtils=e.EmailComposeType=e.EmailAddressType=e.EmailAction=e.Currency=e.ConnectionType=e.ConnectionState=e.ChainType=e.Chain=e.AuthStatus=void 0;var r=je();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return r.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return r.Chain}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}}),Object.defineProperty(e,"ConnectionState",{enumerable:!0,get:function(){return r.ConnectionState}}),Object.defineProperty(e,"ConnectionType",{enumerable:!0,get:function(){return r.ConnectionType}}),Object.defineProperty(e,"Currency",{enumerable:!0,get:function(){return r.Currency}}),Object.defineProperty(e,"EmailAction",{enumerable:!0,get:function(){return r.EmailAction}}),Object.defineProperty(e,"EmailAddressType",{enumerable:!0,get:function(){return r.EmailAddressType}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return r.EmailComposeType}}),Object.defineProperty(e,"EmailFolderUtils",{enumerable:!0,get:function(){return r.EmailFolderUtils}}),Object.defineProperty(e,"EmailSortCriteria",{enumerable:!0,get:function(){return r.EmailSortCriteria}}),Object.defineProperty(e,"EmailValidationState",{enumerable:!0,get:function(){return r.EmailValidationState}}),Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"FeatureFlag",{enumerable:!0,get:function(){return r.FeatureFlag}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return r.FontSize}}),Object.defineProperty(e,"MediumView",{enumerable:!0,get:function(){return r.MediumView}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return r.MobileView}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return r.PlatformType}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return r.RequestStatus}}),Object.defineProperty(e,"SortOrder",{enumerable:!0,get:function(){return r.SortOrder}}),Object.defineProperty(e,"SubscriptionAction",{enumerable:!0,get:function(){return r.SubscriptionAction}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return r.Theme}});var t=Hi();Object.defineProperty(e,"getWalletConnectionState",{enumerable:!0,get:function(){return t.getWalletConnectionState}}),Object.defineProperty(e,"isWalletConnected",{enumerable:!0,get:function(){return t.isWalletConnected}}),Object.defineProperty(e,"isWalletVerified",{enumerable:!0,get:function(){return t.isWalletVerified}})})(Dr)),Dr}var Sr={},te={},Mn;function Vr(){if(Mn)return te;Mn=1,Object.defineProperty(te,"__esModule",{value:!0}),te.PROTOCOL_CONSTANTS=te.TransactionStatus=te.MessageType=void 0,te.isSolanaAddress=t,te.isEvmAddress=a,te.isSolanaRecipient=i,te.isEvmRecipient=o;var e;(function(s){s.STANDARD="standard",s.PRIORITY="priority",s.PREPARED_STANDARD="prepared_standard",s.PREPARED_PRIORITY="prepared_priority"})(e||(te.MessageType=e={}));var r;(function(s){s.SUCCESS="success",s.FAILED="failed",s.PENDING="pending"})(r||(te.TransactionStatus=r={}));function t(s){try{if(s.length<32||s.length>44||!/^[1-9A-HJ-NP-Za-km-z]+$/.test(s))return!1;try{return require("bs58").decode(s).length===32}catch{return!0}}catch{return!1}}function a(s){return/^0x[a-fA-F0-9]{40}$/.test(s)}function i(s){return t(s)}function o(s){return a(s)}return te.PROTOCOL_CONSTANTS={SEND_FEE:100000n,CLAIM_PERIOD:1440*60*60,REVENUE_SHARES:{SENDER:90,OWNER:10},USDC_DECIMALS:6,MAX_LENGTHS:{SUBJECT:200,BODY:2e3,MAIL_ID:100}},te}var _e={},ae={},On;function Rn(){if(On)return ae;On=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.AddressType=void 0,ae.isENSName=a,ae.isSNSName=i,ae.getAddressType=o,ae.isValidWalletAddress=s,ae.isValidSignature=l,ae.parseEmailAddress=c,ae.formatWalletAddress=u,ae.getChainDisplayName=m;const e=je(),r=Vr();var t;(function(b){b.EVMAddress="EVMAddress",b.SolanaAddress="SolanaAddress",b.ENSName="ENSName",b.SNSName="SNSName"})(t||(ae.AddressType=t={}));function a(b){const p=b.toLowerCase();if(!p.endsWith(".eth")&&!p.endsWith(".box"))return!1;const h=(p.endsWith(".eth"),p.slice(0,-4));if(h.length===0)return!1;const g=h.split("."),x=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const N of g)if(N.length===0||!x.test(N)||N.includes("--"))return!1;return!0}function i(b){const p=b.toLowerCase(),g=[".sol",".abc",".bonk",".poor",".gm",".dao",".defi",".web3"].find(_=>p.endsWith(_));if(!g)return!1;const x=p.slice(0,-g.length);if(x.length===0)return!1;const N=x.split("."),U=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const _ of N)if(_.length===0||!U.test(_)||_.includes("--"))return!1;return!0}function o(b,p=void 0){if((0,r.isEvmAddress)(b))return t.EVMAddress;if((0,r.isSolanaAddress)(b))return t.SolanaAddress;if(p&&b.includes(".")){if(p===t.EVMAddress)return t.ENSName;if(p===t.SolanaAddress)return t.SNSName}}function s(b,p){if(!b||typeof b!="string")return!1;const h=o(b);switch(p){case e.ChainType.EVM:return h===t.EVMAddress||h===t.ENSName;case e.ChainType.SOLANA:return h===t.SolanaAddress||h===t.SNSName;default:return!!h}}function l(b,p){if(!b||typeof b!="string")return!1;switch(p){case e.ChainType.EVM:return/^0x[a-fA-F0-9]{130}$/.test(b);case e.ChainType.SOLANA:return/^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(b);default:return b.length>50}}function c(b){if(!b||typeof b!="string")return;const p=b.split("@");if(p.length!==2)return;const[h,g]=p;if(!h||!g)return;const x=o(h);return{address:h,domain:g,type:x}}function u(b){if(!b||b.length<10)return b;const p=o(b);return(p===t.ENSName||p===t.SNSName)&&b.length<=20?b:`${b.slice(0,6)}...${b.slice(-4)}`}function m(b){if(!b)return"Unknown Chain";switch(b){case e.ChainType.EVM:return"EVM Chain";case e.ChainType.SOLANA:return"Solana";default:return"Blockchain"}}return ae}var zn;function Yi(){if(zn)return _e;zn=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.validateDomain=r,_e.validateMessage=t,_e.validateAddress=a,_e.validateAmount=i;const e=Rn();function r(o){if(!o||o.length===0)throw new Error("Domain cannot be empty");if(o.length>100)throw new Error("Domain cannot exceed 100 characters");if(!/^[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])?)*$/.test(o))throw new Error("Invalid domain format");return!0}function t(o,s){if(!o||o.length===0)throw new Error("Message subject cannot be empty");if(o.length>200)throw new Error("Message subject cannot exceed 200 characters");if(!s||s.length===0)throw new Error("Message body cannot be empty");if(s.length>1e4)throw new Error("Message body cannot exceed 10000 characters");return!0}function a(o,s){if(!o||o.length===0)throw new Error("Address cannot be empty");if(!(0,e.isValidWalletAddress)(o,s))throw new Error(`Invalid ${s} address format`);return!0}function i(o){if(o==null||o===""||typeof o=="string"&&o.trim()==="")throw new Error("Invalid amount format");let s;try{if(typeof o=="string"){if(!/^-?\d+$/.test(o.trim()))throw new Error("Invalid amount format");s=BigInt(o)}else if(typeof o=="number"){if(!Number.isFinite(o))throw new Error("Invalid amount format");s=BigInt(Math.floor(o))}else if(typeof o=="bigint")s=o;else throw new Error("Invalid amount format")}catch{throw new Error("Invalid amount format")}if(s<0n)throw new Error("Amount cannot be negative");return s}return _e}var Bn;function Ki(){return Bn||(Bn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateMessage=e.validateDomain=e.validateAmount=e.validateAddress=e.isSolanaRecipient=e.isSolanaAddress=e.isEvmRecipient=e.isEvmAddress=e.TransactionStatus=e.PROTOCOL_CONSTANTS=e.MessageType=void 0;var r=Vr();Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return r.MessageType}}),Object.defineProperty(e,"PROTOCOL_CONSTANTS",{enumerable:!0,get:function(){return r.PROTOCOL_CONSTANTS}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return r.isEvmAddress}}),Object.defineProperty(e,"isEvmRecipient",{enumerable:!0,get:function(){return r.isEvmRecipient}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return r.isSolanaAddress}}),Object.defineProperty(e,"isSolanaRecipient",{enumerable:!0,get:function(){return r.isSolanaRecipient}});var t=Yi();Object.defineProperty(e,"validateAddress",{enumerable:!0,get:function(){return t.validateAddress}}),Object.defineProperty(e,"validateAmount",{enumerable:!0,get:function(){return t.validateAmount}}),Object.defineProperty(e,"validateDomain",{enumerable:!0,get:function(){return t.validateDomain}}),Object.defineProperty(e,"validateMessage",{enumerable:!0,get:function(){return t.validateMessage}})})(Sr)),Sr}var Ar={},$e={},Wn;function Zi(){if(Wn)return $e;Wn=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.StorageType=void 0;var e;return(function(r){r.LOCAL_STORAGE="localStorage",r.SESSION_STORAGE="sessionStorage",r.ASYNC_STORAGE="asyncStorage",r.MEMORY="memory"})(e||($e.StorageType=e={})),$e}var Fn;function Qi(){return Fn||(Fn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0;var r=Zi();Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return r.StorageType}})})(Ar)),Ar}var Tr={},ke={},qn;function Xi(){if(qn)return ke;qn=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.AnalyticsEventBuilder=ke.AnalyticsEvent=void 0;var e;(function(t){t.USER_LOGIN="user_login",t.USER_LOGOUT="user_logout",t.USER_SIGNUP="user_signup",t.EMAIL_SENT="email_sent",t.EMAIL_RECEIVED="email_received",t.EMAIL_OPENED="email_opened",t.EMAIL_REPLY="email_reply",t.EMAIL_FORWARD="email_forward",t.EMAIL_DELETE="email_delete",t.EMAIL_STAR="email_star",t.EMAIL_COMPOSE="email_compose",t.EMAIL_CLICKED="email_clicked",t.PAGE_VIEW="page_view",t.SCREEN_VIEW="screen_view",t.FOLDER_SWITCH="folder_switch",t.SUBSCRIPTION_VIEW="subscription_view",t.SUBSCRIPTION_PURCHASE="subscription_purchase",t.SUBSCRIPTION_CANCEL="subscription_cancel",t.SEARCH_PERFORMED="search_performed",t.SETTINGS_CHANGED="settings_changed",t.ERROR_OCCURRED="error_occurred",t.AB_TEST_VIEWED="ab_test_viewed",t.AB_TEST_CONVERTED="ab_test_converted",t.CUSTOM_EVENT="custom_event"})(e||(ke.AnalyticsEvent=e={}));class r{static emailAction(a,i,o){return{action:a,email_id:i,folder:o,timestamp:Date.now()}}static pageView(a,i){return{page_name:a,page_path:i,timestamp:Date.now()}}static error(a,i,o){return{error_type:a,error_message:i,page_name:o,timestamp:Date.now()}}static subscription(a,i,o,s){return{action:a,plan_type:i,amount:o,currency:s,timestamp:Date.now()}}static engagement(a,i,o){return{feature:a,interaction:i,duration:o,timestamp:Date.now()}}static performance(a,i,o){return{metric:a,value:i,context:o,timestamp:Date.now()}}}return ke.AnalyticsEventBuilder=r,ke}var Lr={},$n;function Ji(){return $n||($n=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.ChainType=void 0;var r=je();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}});var t;(function(i){i.Mailer="Mailer",i.MailService="MailService"})(t||(e.ContractType=t={}));var a;(function(i){i.MailSent="MailSent",i.PreparedMailSent="PreparedMailSent",i.DelegationSet="DelegationSet",i.DelegationCleared="DelegationCleared",i.DomainRegistered="DomainRegistered",i.DomainExtended="DomainExtended",i.DomainReleased="DomainReleased",i.FeeUpdated="FeeUpdated",i.SharesRecorded="SharesRecorded",i.RecipientClaimed="RecipientClaimed",i.OwnerClaimed="OwnerClaimed",i.ExpiredSharesClaimed="ExpiredSharesClaimed"})(a||(e.ProcessedEventName=a={}))})(Lr)),Lr}var He={},Hn;function eo(){if(Hn)return He;Hn=1,Object.defineProperty(He,"__esModule",{value:!0}),He.NetworkError=void 0;class e extends Error{constructor(t,a,i,o){super(t),this.name="NetworkError",this.status=a,this.statusText=i,this.response=o}}return He.NetworkError=e,He}var Ge={},Gn;function ro(){if(Gn)return Ge;Gn=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.WalletType=void 0;var e;return(function(r){r.METAMASK="metamask",r.PHANTOM="phantom",r.COINBASE="coinbase",r.WALLETCONNECT="walletconnect",r.INJECTED="injected"})(e||(Ge.WalletType=e={})),Ge}var Yn;function no(){return Yn||(Yn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletType=e.NetworkError=e.ProcessedEventName=e.ContractType=e.ChainType=e.AnalyticsEventBuilder=e.AnalyticsEvent=void 0;var r=Xi();Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return r.AnalyticsEvent}}),Object.defineProperty(e,"AnalyticsEventBuilder",{enumerable:!0,get:function(){return r.AnalyticsEventBuilder}});var t=Ji();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return t.ChainType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return t.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return t.ProcessedEventName}});var a=eo();Object.defineProperty(e,"NetworkError",{enumerable:!0,get:function(){return a.NetworkError}});var i=ro();Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return i.WalletType}})})(Tr)),Tr}var we={},ie={},Kn;function to(){if(Kn)return ie;Kn=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.FeeType=ie.ClaimType=ie.ConfirmationStatus=void 0,ie.isEVMResponse=i,ie.isSolanaResponse=o,ie.isMailboxErrorResponse=s;const e=je();var r;(function(l){l.Processed="processed",l.Confirmed="confirmed",l.Finalized="finalized"})(r||(ie.ConfirmationStatus=r={}));var t;(function(l){l.Recipient="recipient",l.Owner="owner",l.Expired="expired"})(t||(ie.ClaimType=t={}));var a;(function(l){l.Send="send",l.Delegation="delegation",l.Registration="registration"})(a||(ie.FeeType=a={}));function i(l){return l.chainType===e.ChainType.EVM}function o(l){return l.chainType===e.ChainType.SOLANA}function s(l){return!l.success&&l.error!==void 0}return ie}var Zn;function ao(){return Zn||(Zn=1,(function(e){var r=we&&we.__createBinding||(Object.create?(function(a,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(a,s,l)}):(function(a,i,o,s){s===void 0&&(s=o),a[s]=i[o]})),t=we&&we.__exportStar||function(a,i){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&r(i,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(to(),e)})(we)),we}var Ee={},ee={},Qn;function io(){if(Qn)return ee;Qn=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.ReviewRejectType=ee.ApplicantType=ee.SumsubReviewAnswer=ee.SumsubReviewStatus=ee.KYCApplicationStatus=ee.KYCVerificationLevel=void 0;var e;(function(s){s.Basic="basic",s.Enhanced="enhanced",s.Accredited="accredited"})(e||(ee.KYCVerificationLevel=e={}));var r;(function(s){s.Pending="PENDING",s.Initiated="INITIATED",s.InProgress="IN_PROGRESS",s.Submitted="SUBMITTED",s.Completed="COMPLETED",s.Rejected="REJECTED"})(r||(ee.KYCApplicationStatus=r={}));var t;(function(s){s.Init="init",s.Pending="pending",s.Prechecked="prechecked",s.Completed="completed"})(t||(ee.SumsubReviewStatus=t={}));var a;(function(s){s.Green="GREEN",s.Red="RED",s.Yellow="YELLOW"})(a||(ee.SumsubReviewAnswer=a={}));var i;(function(s){s.Individual="individual",s.Company="company"})(i||(ee.ApplicantType=i={}));var o;return(function(s){s.Final="FINAL",s.Retry="RETRY",s.External="EXTERNAL"})(o||(ee.ReviewRejectType=o={})),ee}var Xn;function oo(){return Xn||(Xn=1,(function(e){var r=Ee&&Ee.__createBinding||(Object.create?(function(a,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(a,s,l)}):(function(a,i,o,s){s===void 0&&(s=o),a[s]=i[o]})),t=Ee&&Ee.__exportStar||function(a,i){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&r(i,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(io(),e)})(Ee)),Ee}var Ue={},H={},Jn;function so(){if(Jn)return H;Jn=1,Object.defineProperty(H,"__esModule",{value:!0}),H.isWildduckWebSocketErrorResponse=H.isWildduckDisconnectMessage=H.isWildduckUpdateMessage=H.isWildduckDataMessage=H.isWildduckFetchRequest=H.isWildduckUnsubscribeRequest=H.isWildduckSubscribeRequest=void 0,H.createWildduckSubscribeRequest=l,H.createWildduckUnsubscribeRequest=c,H.createWildduckFetchMessagesRequest=u;const e=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="subscribe"&&"channel"in m&&"data"in m;H.isWildduckSubscribeRequest=e;const r=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="unsubscribe"&&"channel"in m;H.isWildduckUnsubscribeRequest=r;const t=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="fetch"&&"channel"in m&&m.channel==="messages";H.isWildduckFetchRequest=t;const a=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="data"&&"channel"in m&&"data"in m;H.isWildduckDataMessage=a;const i=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="update"&&"channel"in m&&"data"in m;H.isWildduckUpdateMessage=i;const o=m=>typeof m=="object"&&m!==null&&"type"in m&&m.type==="disconnect"&&"channel"in m&&m.channel==="system";H.isWildduckDisconnectMessage=o;const s=m=>typeof m=="object"&&m!==null&&"success"in m&&m.success===!1&&"error"in m&&"message"in m;H.isWildduckWebSocketErrorResponse=s;function l(m,b){return{type:"subscribe",channel:m,data:b}}function c(m){return{type:"unsubscribe",channel:m,data:{}}}function u(m,b){return{type:"fetch",channel:"messages",data:{mailboxId:m,...b&&{cursor:b}}}}return H}var et;function lo(){return et||(et=1,(function(e){var r=Ue&&Ue.__createBinding||(Object.create?(function(a,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(a,s,l)}):(function(a,i,o,s){s===void 0&&(s=o),a[s]=i[o]})),t=Ue&&Ue.__exportStar||function(a,i){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&r(i,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(Tn(),e),t(so(),e)})(Ue)),Ue}var rt;function nt(){return rt||(rt=1,(function(e){var r=ve&&ve.__createBinding||(Object.create?(function(a,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(a,s,l)}):(function(a,i,o,s){s===void 0&&(s=o),a[s]=i[o]})),t=ve&&ve.__exportStar||function(a,i){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&r(i,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(Fi(),e),t($i(),e),t(Gi(),e),t(Ki(),e),t(Qi(),e),t(no(),e),t(ao(),e),t(oo(),e),t(lo(),e)})(ve)),ve}var De={},Ir={},Ye={},tt;function uo(){if(tt)return Ye;tt=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.Web3UsernameValidator=void 0;const e=je();class r{static validate(a){if(a){if(this.EVM_REGEX.test(a))return{name:null,address:a.toLowerCase(),chainType:e.ChainType.EVM};if(!a.startsWith("0x")&&a.length>=32&&a.length<=44&&this.BASE58_REGEX.test(a))return{name:null,address:a,chainType:e.ChainType.SOLANA};if((a.toLowerCase().endsWith(".eth")||a.toLowerCase().endsWith(".box"))&&a.length>=5&&this.ENS_REGEX.test(a))return{name:a.toLowerCase(),address:null,chainType:e.ChainType.EVM};if(a.toLowerCase().includes(".")){const i=a.toLowerCase().split(".");if(i.length===2){const[o,s]=i;if(this.VALID_SNS_TLDS.includes(s)&&this.SNS_NAME_REGEX.test(o)&&o.length>=1)return{name:a.toLowerCase(),address:null,chainType:e.ChainType.SOLANA}}}}}static isValidEVMAddress(a){return this.EVM_REGEX.test(a)}static isValidSolanaAddress(a){return!a.startsWith("0x")&&a.length>=32&&a.length<=44&&this.BASE58_REGEX.test(a)}static isValidENSName(a){return(a.toLowerCase().endsWith(".eth")||a.toLowerCase().endsWith(".box"))&&a.length>=5&&this.ENS_REGEX.test(a)}static isValidSNSName(a){if(!a.toLowerCase().includes("."))return!1;const i=a.toLowerCase().split(".");if(i.length!==2)return!1;const[o,s]=i;return this.VALID_SNS_TLDS.includes(s)&&this.SNS_NAME_REGEX.test(o)&&o.length>=1}}return Ye.Web3UsernameValidator=r,r.EVM_REGEX=/^0x[a-fA-F0-9]{40}$/,r.BASE58_REGEX=/^[1-9A-HJ-NP-Za-km-z]+$/,r.ENS_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\.(eth|box)$/i,r.SNS_NAME_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/,r.VALID_SNS_TLDS=["sol","abc","backpack","bonk","coin","dao","defi","gm","poor","pump","shdw","stepn","web3"],Ye}var Pr={},at;function co(){return at||(at=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseJson=e.createAssertion=e.isUrl=e.isEmail=e.isValidDate=e.isErrorResponse=e.isSuccessResponse=e.isApiResponse=e.optional=e.validateArray=e.hasRequiredProperties=e.isNullish=e.isArray=e.isObject=e.isBoolean=e.isNumber=e.isString=e.createValidator=void 0;const r=(E,j)=>k=>{try{return E(k)?{isValid:!0,data:k}:{isValid:!1,error:`Invalid ${j}`,data:null}}catch(C){return{isValid:!1,error:`Validation error for ${j}: ${C instanceof Error?C.message:"Unknown error"}`,data:null}}};e.createValidator=r;const t=E=>typeof E=="string";e.isString=t;const a=E=>typeof E=="number"&&!isNaN(E);e.isNumber=a;const i=E=>typeof E=="boolean";e.isBoolean=i;const o=E=>typeof E=="object"&&E!==null&&!Array.isArray(E);e.isObject=o;const s=E=>Array.isArray(E);e.isArray=s;const l=E=>E==null;e.isNullish=l;const c=(E,j)=>(0,e.isObject)(E)?j.every(k=>k in E):!1;e.hasRequiredProperties=c;const u=(E,j)=>(0,e.isArray)(E)?E.every(j):!1;e.validateArray=u;const m=E=>j=>j===void 0||E(j);e.optional=m;const b=E=>(0,e.isObject)(E)&&(0,e.isBoolean)(E.success);e.isApiResponse=b;const p=(E,j)=>!(0,e.isApiResponse)(E)||!E.success?!1:j&&"data"in E?j(E.data):!0;e.isSuccessResponse=p;const h=E=>(0,e.isApiResponse)(E)&&!E.success&&"error"in E&&(0,e.isString)(E.error);e.isErrorResponse=h;const g=E=>{if(!(0,e.isString)(E))return!1;const j=new Date(E);return!isNaN(j.getTime())};e.isValidDate=g;const x=E=>(0,e.isString)(E)?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(E):!1;e.isEmail=x;const N=E=>{if(!(0,e.isString)(E))return!1;try{return new URL(E),!0}catch{return!1}};e.isUrl=N;const U=(E,j)=>(k,C=j)=>{if(!E(k))throw new TypeError(`Invalid ${C}: expected ${j}`)};e.createAssertion=U;const _=(E,j)=>{try{const k=JSON.parse(E);return j?j(k)?{isValid:!0,data:k}:{isValid:!1,error:"Parsed JSON does not match expected type",data:null}:{isValid:!0,data:k}}catch(k){return{isValid:!1,error:`JSON parse error: ${k instanceof Error?k.message:"Unknown error"}`,data:null}}};e.parseJson=_})(Pr)),Pr}var it;function mo(){return it||(it=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateArray=e.parseJson=e.optional=e.isValidDate=e.isUrl=e.isSuccessResponse=e.isString=e.isObject=e.isNumber=e.isNullish=e.isErrorResponse=e.isEmail=e.isBoolean=e.isArray=e.isApiResponse=e.hasRequiredProperties=e.createValidator=e.createAssertion=e.Web3UsernameValidator=void 0;var r=uo();Object.defineProperty(e,"Web3UsernameValidator",{enumerable:!0,get:function(){return r.Web3UsernameValidator}});var t=co();Object.defineProperty(e,"createAssertion",{enumerable:!0,get:function(){return t.createAssertion}}),Object.defineProperty(e,"createValidator",{enumerable:!0,get:function(){return t.createValidator}}),Object.defineProperty(e,"hasRequiredProperties",{enumerable:!0,get:function(){return t.hasRequiredProperties}}),Object.defineProperty(e,"isApiResponse",{enumerable:!0,get:function(){return t.isApiResponse}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return t.isArray}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return t.isBoolean}}),Object.defineProperty(e,"isEmail",{enumerable:!0,get:function(){return t.isEmail}}),Object.defineProperty(e,"isErrorResponse",{enumerable:!0,get:function(){return t.isErrorResponse}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return t.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return t.isNumber}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return t.isObject}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return t.isString}}),Object.defineProperty(e,"isSuccessResponse",{enumerable:!0,get:function(){return t.isSuccessResponse}}),Object.defineProperty(e,"isUrl",{enumerable:!0,get:function(){return t.isUrl}}),Object.defineProperty(e,"isValidDate",{enumerable:!0,get:function(){return t.isValidDate}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return t.optional}}),Object.defineProperty(e,"parseJson",{enumerable:!0,get:function(){return t.parseJson}}),Object.defineProperty(e,"validateArray",{enumerable:!0,get:function(){return t.validateArray}})})(Ir)),Ir}var Mr={},oe={},ot;function bo(){if(ot)return oe;ot=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.createMultiChainId=e,oe.createUserMultiChainId=r,oe.createChainStatsId=t,oe.createDelegationId=a,oe.normalizeAddress=i,oe.formatBigInt=o,oe.isZeroAddress=s,oe.isTestNet=l,oe.validateEventArgs=c;function e(u,m,b){return`${u}-${m}-${b}`}function r(u,m){return`${u}-${m.toLowerCase()}`}function t(u){return`${u}-global`}function a(u,m){return`${u.toLowerCase()}-${m}`}function i(u){return u.toLowerCase()}function o(u,m=18){const b=BigInt(10**m),p=u/b,h=u%b;return h===0n?p.toString():`${p}.${h.toString().padStart(m,"0").replace(/0+$/,"")}`}function s(u){return u.toLowerCase()==="0x0000000000000000000000000000000000000000"}function l(u){const m=new Set([31337,11155111,80001,80002,421614,11155420,84532,43113]),b=new Set([-102,-103,-104]);return m.has(u)||b.has(u)}function c(u,m){for(const b of m)if(u[b]===void 0||u[b]===null)return console.error(`❌ Missing required field: ${String(b)}`),!1;return!0}return oe}var st;function fo(){return st||(st=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateEventArgs=e.normalizeAddress=e.isZeroAddress=e.isTestNet=e.formatBigInt=e.createUserMultiChainId=e.createMultiChainId=e.createDelegationId=e.createChainStatsId=e.isSolanaAddress=e.isEvmAddress=e.parseEmailAddress=e.isValidWalletAddress=e.isValidSignature=e.isSNSName=e.isENSName=e.getChainDisplayName=e.getAddressType=e.formatWalletAddress=e.AddressType=void 0;var r=Rn();Object.defineProperty(e,"AddressType",{enumerable:!0,get:function(){return r.AddressType}}),Object.defineProperty(e,"formatWalletAddress",{enumerable:!0,get:function(){return r.formatWalletAddress}}),Object.defineProperty(e,"getAddressType",{enumerable:!0,get:function(){return r.getAddressType}}),Object.defineProperty(e,"getChainDisplayName",{enumerable:!0,get:function(){return r.getChainDisplayName}}),Object.defineProperty(e,"isENSName",{enumerable:!0,get:function(){return r.isENSName}}),Object.defineProperty(e,"isSNSName",{enumerable:!0,get:function(){return r.isSNSName}}),Object.defineProperty(e,"isValidSignature",{enumerable:!0,get:function(){return r.isValidSignature}}),Object.defineProperty(e,"isValidWalletAddress",{enumerable:!0,get:function(){return r.isValidWalletAddress}}),Object.defineProperty(e,"parseEmailAddress",{enumerable:!0,get:function(){return r.parseEmailAddress}});var t=Vr();Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return t.isEvmAddress}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return t.isSolanaAddress}});var a=bo();Object.defineProperty(e,"createChainStatsId",{enumerable:!0,get:function(){return a.createChainStatsId}}),Object.defineProperty(e,"createDelegationId",{enumerable:!0,get:function(){return a.createDelegationId}}),Object.defineProperty(e,"createMultiChainId",{enumerable:!0,get:function(){return a.createMultiChainId}}),Object.defineProperty(e,"createUserMultiChainId",{enumerable:!0,get:function(){return a.createUserMultiChainId}}),Object.defineProperty(e,"formatBigInt",{enumerable:!0,get:function(){return a.formatBigInt}}),Object.defineProperty(e,"isTestNet",{enumerable:!0,get:function(){return a.isTestNet}}),Object.defineProperty(e,"isZeroAddress",{enumerable:!0,get:function(){return a.isZeroAddress}}),Object.defineProperty(e,"normalizeAddress",{enumerable:!0,get:function(){return a.normalizeAddress}}),Object.defineProperty(e,"validateEventArgs",{enumerable:!0,get:function(){return a.validateEventArgs}})})(Mr)),Mr}var Or={},ue={},lt;function go(){if(lt)return ue;lt=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.generateAuthMessage=r,ue.isAuthExpired=t,ue.getAuthStatusText=a,ue.canAccessProtectedFeatures=i,ue.isAuthStatusConnected=o,ue.generateNonce=s,ue.extractNonceFromMessage=l,ue.isValidNonce=c;const e=je();function r(u,m){const b=m||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;return`Authenticate with ${u}
18
- Nonce: ${b}`}function t(u,m=24){const b=new Date(u.getTime()+m*60*60*1e3);return new Date>b}function a(u){switch(u){case e.AuthStatus.DISCONNECTED:return"Not connected";case e.AuthStatus.CONNECTED:return"Connected - Please verify";case e.AuthStatus.VERIFIED:return"Authenticated";default:return"Unknown status"}}function i(u){return u===e.AuthStatus.VERIFIED}function o(u){return u===e.AuthStatus.CONNECTED||u===e.AuthStatus.VERIFIED}function s(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function l(u){const m=u.match(/Nonce:\s*(.+)$/m);return m?m[1].trim():void 0}function c(u){if(!u||typeof u!="string"||u.length<10)return!1;const m=u.split("-");if(m.length>=2){const b=parseInt(m[0],10);if(!isNaN(b)){const p=Date.now()-864e5;if(b<p)return!1}}return!0}return ue}var ut;function ho(){return ut||(ut=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidNonce=e.isAuthStatusConnected=e.isAuthExpired=e.getAuthStatusText=e.generateNonce=e.generateAuthMessage=e.extractNonceFromMessage=e.canAccessProtectedFeatures=void 0;var r=go();Object.defineProperty(e,"canAccessProtectedFeatures",{enumerable:!0,get:function(){return r.canAccessProtectedFeatures}}),Object.defineProperty(e,"extractNonceFromMessage",{enumerable:!0,get:function(){return r.extractNonceFromMessage}}),Object.defineProperty(e,"generateAuthMessage",{enumerable:!0,get:function(){return r.generateAuthMessage}}),Object.defineProperty(e,"generateNonce",{enumerable:!0,get:function(){return r.generateNonce}}),Object.defineProperty(e,"getAuthStatusText",{enumerable:!0,get:function(){return r.getAuthStatusText}}),Object.defineProperty(e,"isAuthExpired",{enumerable:!0,get:function(){return r.isAuthExpired}}),Object.defineProperty(e,"isAuthStatusConnected",{enumerable:!0,get:function(){return r.isAuthStatusConnected}}),Object.defineProperty(e,"isValidNonce",{enumerable:!0,get:function(){return r.isValidNonce}})})(Or)),Or}var Rr={},zr={},ct;function xo(){return ct||(ct=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CLAIM_PERIOD_DAYS=e.USDC_DECIMALS=void 0,e.formatUSDC=r,e.parseUSDC=t,e.USDC_DECIMALS=6,e.CLAIM_PERIOD_DAYS=60;function r(a){return(a/Math.pow(10,e.USDC_DECIMALS)).toFixed(2)}function t(a){return Math.floor(parseFloat(a)*Math.pow(10,e.USDC_DECIMALS))}})(zr)),zr}var ce={},mt;function po(){if(mt)return ce;mt=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.formatEmailDate=e,ce.formatTimestamp=r,ce.formatRelativeTime=t,ce.parseDate=a,ce.isDateInRange=i,ce.addDays=o,ce.addHours=s;function e(l){const c=typeof l=="string"?new Date(l):l;if(isNaN(c.getTime()))return"Invalid date";const u=new Date,m=u.getTime()-c.getTime(),b=Math.floor(m/(1e3*60*60*24));return b===0?c.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):b===1?"Yesterday":b<7?c.toLocaleDateString("en-US",{weekday:"long"}):c.getFullYear()===u.getFullYear()?c.toLocaleDateString("en-US",{month:"short",day:"numeric"}):c.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function r(l){return new Date(l).toISOString()}function t(l){const c=typeof l=="string"||typeof l=="number"?new Date(l):l;if(isNaN(c.getTime()))return"Invalid date";const m=new Date().getTime()-c.getTime(),b=Math.floor(m/1e3),p=Math.floor(b/60),h=Math.floor(p/60),g=Math.floor(h/24),x=Math.floor(g/7),N=Math.floor(g/30),U=Math.floor(g/365);return b<60?"just now":p<60?p===1?"1 minute ago":`${p} minutes ago`:h<24?h===1?"1 hour ago":`${h} hours ago`:g<7?g===1?"1 day ago":`${g} days ago`:x<4?x===1?"1 week ago":`${x} weeks ago`:N<12?N===1?"1 month ago":`${N} months ago`:U===1?"1 year ago":`${U} years ago`}function a(l){try{const c=new Date(l);return isNaN(c.getTime())?null:c}catch{return null}}function i(l,c,u){return l>=c&&l<=u}function o(l,c){const u=new Date(l);return u.setDate(u.getDate()+c),u}function s(l,c){const u=new Date(l);return u.setHours(u.getHours()+c),u}return ce}var Y={},dt;function No(){if(dt)return Y;dt=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.truncate=e,Y.capitalize=r,Y.toTitleCase=t,Y.toKebabCase=a,Y.toCamelCase=i,Y.toSnakeCase=o,Y.normalizeWhitespace=s,Y.isBlank=l,Y.isNotBlank=c,Y.escapeHtml=u,Y.stripHtml=m,Y.getInitials=b,Y.formatBytes=p,Y.randomString=h,Y.pluralize=g,Y.formatNumber=x;function e(N,U,_="..."){return!N||N.length<=U?N:N.slice(0,U-_.length)+_}function r(N){return N&&N.charAt(0).toUpperCase()+N.slice(1)}function t(N){return N&&N.toLowerCase().split(" ").map(U=>r(U)).join(" ")}function a(N){return N&&N.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function i(N){return N&&N.replace(/[-_\s]+(.)?/g,(U,_)=>_?_.toUpperCase():"").replace(/^./,U=>U.toLowerCase())}function o(N){return N&&N.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function s(N){return N&&N.replace(/\s+/g," ").trim()}function l(N){return!N||N.trim().length===0}function c(N){return!l(N)}function u(N){if(!N)return N;const U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return N.replace(/[&<>"']/g,_=>U[_])}function m(N){return N&&N.replace(/<[^>]*>/g,"")}function b(N,U=2){return N?N.trim().split(/\s+/).slice(0,U).map(j=>j.charAt(0).toUpperCase()).join(""):""}function p(N,U=2){if(N===0)return"0 Bytes";const _=1024,E=U<0?0:U,j=["Bytes","KB","MB","GB","TB","PB"],k=Math.floor(Math.log(N)/Math.log(_));return parseFloat((N/Math.pow(_,k)).toFixed(E))+" "+j[k]}function h(N,U="alphanumeric"){let _;switch(U){case"alpha":_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";break;case"numeric":_="0123456789";break;case"alphanumeric":_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";break;case"hex":_="0123456789abcdef";break;default:_=U}let E="";for(let j=0;j<N;j++)E+=_.charAt(Math.floor(Math.random()*_.length));return E}function g(N,U,_){return N===1?U:_||`${U}s`}function x(N){return N.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return Y}var bt;function yo(){return bt||(bt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.truncate=e.toTitleCase=e.toSnakeCase=e.toKebabCase=e.toCamelCase=e.stripHtml=e.randomString=e.pluralize=e.normalizeWhitespace=e.isNotBlank=e.isBlank=e.getInitials=e.formatNumber=e.formatBytes=e.escapeHtml=e.capitalize=e.parseDate=e.isDateInRange=e.formatTimestamp=e.formatRelativeTime=e.formatEmailDate=e.addHours=e.addDays=e.parseUSDC=e.formatUSDC=e.USDC_DECIMALS=e.CLAIM_PERIOD_DAYS=void 0;var r=xo();Object.defineProperty(e,"CLAIM_PERIOD_DAYS",{enumerable:!0,get:function(){return r.CLAIM_PERIOD_DAYS}}),Object.defineProperty(e,"USDC_DECIMALS",{enumerable:!0,get:function(){return r.USDC_DECIMALS}}),Object.defineProperty(e,"formatUSDC",{enumerable:!0,get:function(){return r.formatUSDC}}),Object.defineProperty(e,"parseUSDC",{enumerable:!0,get:function(){return r.parseUSDC}});var t=po();Object.defineProperty(e,"addDays",{enumerable:!0,get:function(){return t.addDays}}),Object.defineProperty(e,"addHours",{enumerable:!0,get:function(){return t.addHours}}),Object.defineProperty(e,"formatEmailDate",{enumerable:!0,get:function(){return t.formatEmailDate}}),Object.defineProperty(e,"formatRelativeTime",{enumerable:!0,get:function(){return t.formatRelativeTime}}),Object.defineProperty(e,"formatTimestamp",{enumerable:!0,get:function(){return t.formatTimestamp}}),Object.defineProperty(e,"isDateInRange",{enumerable:!0,get:function(){return t.isDateInRange}}),Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return t.parseDate}});var a=No();Object.defineProperty(e,"capitalize",{enumerable:!0,get:function(){return a.capitalize}}),Object.defineProperty(e,"escapeHtml",{enumerable:!0,get:function(){return a.escapeHtml}}),Object.defineProperty(e,"formatBytes",{enumerable:!0,get:function(){return a.formatBytes}}),Object.defineProperty(e,"formatNumber",{enumerable:!0,get:function(){return a.formatNumber}}),Object.defineProperty(e,"getInitials",{enumerable:!0,get:function(){return a.getInitials}}),Object.defineProperty(e,"isBlank",{enumerable:!0,get:function(){return a.isBlank}}),Object.defineProperty(e,"isNotBlank",{enumerable:!0,get:function(){return a.isNotBlank}}),Object.defineProperty(e,"normalizeWhitespace",{enumerable:!0,get:function(){return a.normalizeWhitespace}}),Object.defineProperty(e,"pluralize",{enumerable:!0,get:function(){return a.pluralize}}),Object.defineProperty(e,"randomString",{enumerable:!0,get:function(){return a.randomString}}),Object.defineProperty(e,"stripHtml",{enumerable:!0,get:function(){return a.stripHtml}}),Object.defineProperty(e,"toCamelCase",{enumerable:!0,get:function(){return a.toCamelCase}}),Object.defineProperty(e,"toKebabCase",{enumerable:!0,get:function(){return a.toKebabCase}}),Object.defineProperty(e,"toSnakeCase",{enumerable:!0,get:function(){return a.toSnakeCase}}),Object.defineProperty(e,"toTitleCase",{enumerable:!0,get:function(){return a.toTitleCase}}),Object.defineProperty(e,"truncate",{enumerable:!0,get:function(){return a.truncate}})})(Rr)),Rr}var Br={},B={},ft;function vo(){if(ft)return B;ft=1,Object.defineProperty(B,"__esModule",{value:!0}),B.Z_INDEX=B.ANIMATION=B.NETWORK_IDS=B.WALLET_NAMES=B.CONTACT_INFO=B.ROUTES=B.SUCCESS_MESSAGES=B.ERROR_MESSAGES=B.TIME_FORMAT=B.SUBSCRIPTION_TIERS=B.EMAIL_CONFIG=B.STORAGE_KEYS=B.CHAIN_TYPE=B.AUTH_STATUS=B.API_RETRY_DELAY=B.API_RETRY_ATTEMPTS=B.API_TIMEOUT=void 0;const e=3e4;B.API_TIMEOUT=e;const r=3;B.API_RETRY_ATTEMPTS=r;const t=1e3;B.API_RETRY_DELAY=t;const a={DISCONNECTED:"disconnected",CONNECTED:"connected",VERIFIED:"verified"};B.AUTH_STATUS=a;const i={EVM:"evm",SOLANA:"solana",UNKNOWN:"unknown"};B.CHAIN_TYPE=i;const o={AUTH_TOKEN:"authToken",USER_DATA:"userData",THEME:"theme",EMAIL_CACHE:"emailCache",WALLET_ADDRESS:"walletAddress",CHAIN_TYPE:"chainType"};B.STORAGE_KEYS=o;const s={MAX_ATTACHMENT_SIZE:25*1024*1024,MAX_RECIPIENTS:100,ITEMS_PER_PAGE:50,REFRESH_INTERVAL:6e4,NOTIFICATION_COOLDOWN:3e5};B.EMAIL_CONFIG=s;const l={FREE:"free",BASIC:"basic",PRO:"pro",ENTERPRISE:"enterprise"};B.SUBSCRIPTION_TIERS=l;const c={SHORT_DATE:"MMM d",FULL_DATE:"MMM d, yyyy",DATE_TIME:"MMM d, yyyy h:mm a",RELATIVE:"relative"};B.TIME_FORMAT=c;const u={WALLET_NOT_CONNECTED:"Please connect your wallet first",INVALID_ADDRESS:"Please enter a valid address",NETWORK_ERROR:"Network error. Please try again.",AUTHENTICATION_FAILED:"Authentication failed. Please sign in again.",TRANSACTION_FAILED:"Transaction failed. Please try again.",INSUFFICIENT_FUNDS:"Insufficient funds for this operation",RATE_LIMITED:"Too many requests. Please wait a moment.",SESSION_EXPIRED:"Your session has expired. Please sign in again.",PERMISSION_DENIED:"You do not have permission to perform this action"};B.ERROR_MESSAGES=u;const m={EMAIL_SENT:"Email sent successfully",EMAIL_DELETED:"Email deleted successfully",PREFERENCES_SAVED:"Preferences saved successfully",WALLET_CONNECTED:"Wallet connected successfully",AUTHENTICATION_SUCCESS:"Authentication successful",DELEGATION_SUCCESS:"Delegation successful",SUBSCRIPTION_ACTIVATED:"Subscription activated successfully"};B.SUCCESS_MESSAGES=m;const b={HOME:"/",ABOUT:"/about",CONNECT:"/connect",MAIL:"/mail",COMPOSE:"/mail/compose",PREFERENCES:"/preferences",TERMS:"/terms",PRIVACY:"/privacy",DOCUMENTATION:"/document",WEB3_USERS:"/web3-users",WEB3_PROJECTS:"/web3-projects"};B.ROUTES=b;const p={SUPPORT_EMAIL:"support@sudobility.com",CONTACT_EMAIL:"info@sudobility.com"};B.CONTACT_INFO=p;const h={METAMASK:"MetaMask",WALLETCONNECT:"WalletConnect",COINBASE:"Coinbase Wallet",PHANTOM:"Phantom",SAFE:"Safe",ARGENT:"Argent",RAINBOW:"Rainbow",TRUST:"Trust Wallet",LEDGER:"Ledger",TREZOR:"Trezor"};B.WALLET_NAMES=h;const g={ETHEREUM_MAINNET:1,POLYGON:137,ARBITRUM:42161,OPTIMISM:10,BASE:8453,SOLANA_MAINNET:"mainnet-beta",SOLANA_DEVNET:"devnet"};B.NETWORK_IDS=g;const x={FAST:150,NORMAL:300,SLOW:500,VERY_SLOW:1e3};B.ANIMATION=x;const N={DROPDOWN:10,OVERLAY:20,MODAL:30,POPOVER:40,TOOLTIP:50,TOAST:60};return B.Z_INDEX=N,B}var Ke={},gt;function jo(){return gt||(gt=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.STATUS_VALUES=void 0,Ke.STATUS_VALUES={SUCCESS:"success",PENDING:"pending",FAILED:"failed",ERROR:"error"}),Ke}var ht;function _o(){return ht||(ht=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.STATUS_VALUES=e.Z_INDEX=e.ANIMATION=e.NETWORK_IDS=e.WALLET_NAMES=e.CONTACT_INFO=e.ROUTES=e.SUCCESS_MESSAGES=e.ERROR_MESSAGES=e.TIME_FORMAT=e.SUBSCRIPTION_TIERS=e.EMAIL_CONFIG=e.STORAGE_KEYS=e.CHAIN_TYPE=e.AUTH_STATUS=e.API_RETRY_DELAY=e.API_RETRY_ATTEMPTS=e.API_TIMEOUT=void 0;var r=vo();Object.defineProperty(e,"API_TIMEOUT",{enumerable:!0,get:function(){return r.API_TIMEOUT}}),Object.defineProperty(e,"API_RETRY_ATTEMPTS",{enumerable:!0,get:function(){return r.API_RETRY_ATTEMPTS}}),Object.defineProperty(e,"API_RETRY_DELAY",{enumerable:!0,get:function(){return r.API_RETRY_DELAY}}),Object.defineProperty(e,"AUTH_STATUS",{enumerable:!0,get:function(){return r.AUTH_STATUS}}),Object.defineProperty(e,"CHAIN_TYPE",{enumerable:!0,get:function(){return r.CHAIN_TYPE}}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return r.STORAGE_KEYS}}),Object.defineProperty(e,"EMAIL_CONFIG",{enumerable:!0,get:function(){return r.EMAIL_CONFIG}}),Object.defineProperty(e,"SUBSCRIPTION_TIERS",{enumerable:!0,get:function(){return r.SUBSCRIPTION_TIERS}}),Object.defineProperty(e,"TIME_FORMAT",{enumerable:!0,get:function(){return r.TIME_FORMAT}}),Object.defineProperty(e,"ERROR_MESSAGES",{enumerable:!0,get:function(){return r.ERROR_MESSAGES}}),Object.defineProperty(e,"SUCCESS_MESSAGES",{enumerable:!0,get:function(){return r.SUCCESS_MESSAGES}}),Object.defineProperty(e,"ROUTES",{enumerable:!0,get:function(){return r.ROUTES}}),Object.defineProperty(e,"CONTACT_INFO",{enumerable:!0,get:function(){return r.CONTACT_INFO}}),Object.defineProperty(e,"WALLET_NAMES",{enumerable:!0,get:function(){return r.WALLET_NAMES}}),Object.defineProperty(e,"NETWORK_IDS",{enumerable:!0,get:function(){return r.NETWORK_IDS}}),Object.defineProperty(e,"ANIMATION",{enumerable:!0,get:function(){return r.ANIMATION}}),Object.defineProperty(e,"Z_INDEX",{enumerable:!0,get:function(){return r.Z_INDEX}});var t=jo();Object.defineProperty(e,"STATUS_VALUES",{enumerable:!0,get:function(){return t.STATUS_VALUES}})})(Br)),Br}var Wr={},Q={},xt;function ko(){if(xt)return Q;xt=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.storageLogger=Q.ensLogger=Q.contractLogger=Q.apiLogger=Q.authLogger=Q.logger=Q.LogLevel=void 0;var e;(function(c){c.ERROR="error",c.WARN="warn",c.INFO="info",c.DEBUG="debug"})(e||(Q.LogLevel=e={}));class r{constructor(){this.isDevelopment=process.env.NODE_ENV==="development"}formatTimestamp(){return new Date().toISOString()}formatMessage(u,m,b){const p=this.formatTimestamp(),h=b?` [${b}]`:"";return`[${p}]${h} ${m}`}shouldLog(u){return this.isDevelopment?!0:u===e.ERROR||u===e.WARN}error(u,m,b){this.shouldLog(e.ERROR)&&(console.error(this.formatMessage(e.ERROR,u,m)),b&&console.error(b))}warn(u,m,b){this.shouldLog(e.WARN)&&(console.warn(this.formatMessage(e.WARN,u,m)),b&&console.warn(b))}info(u,m,b){this.shouldLog(e.INFO)&&(console.log(this.formatMessage(e.INFO,u,m)),b&&console.log(b))}debug(u,m,b){this.shouldLog(e.DEBUG)&&(console.log(this.formatMessage(e.DEBUG,u,m)),b&&console.log(b))}withContext(u){return{error:(m,b)=>this.error(m,u,b),warn:(m,b)=>this.warn(m,u,b),info:(m,b)=>this.info(m,u,b),debug:(m,b)=>this.debug(m,u,b)}}}const t=new r;Q.logger=t;const a=t.withContext("AUTH");Q.authLogger=a;const i=t.withContext("API");Q.apiLogger=i;const o=t.withContext("CONTRACT");Q.contractLogger=o;const s=t.withContext("ENS");Q.ensLogger=s;const l=t.withContext("STORAGE");return Q.storageLogger=l,Q}var pt;function Nt(){return pt||(pt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.storageLogger=e.ensLogger=e.contractLogger=e.apiLogger=e.authLogger=e.logger=e.LogLevel=void 0;var r=ko();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return r.logger}}),Object.defineProperty(e,"authLogger",{enumerable:!0,get:function(){return r.authLogger}}),Object.defineProperty(e,"apiLogger",{enumerable:!0,get:function(){return r.apiLogger}}),Object.defineProperty(e,"contractLogger",{enumerable:!0,get:function(){return r.contractLogger}}),Object.defineProperty(e,"ensLogger",{enumerable:!0,get:function(){return r.ensLogger}}),Object.defineProperty(e,"storageLogger",{enumerable:!0,get:function(){return r.storageLogger}})})(Wr)),Wr}var Fr={},Ce={},yt;function wo(){if(yt)return Ce;yt=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createURLSearchParams=r,Ce.createSearchParams=t,Ce.searchParamsToString=a,Ce.parseSearchParams=i;class e{constructor(s){if(this.params=new Map,s)if(typeof s=="string")this.parseString(s);else if(Array.isArray(s))for(const[l,c]of s)this.append(l,c);else for(const[l,c]of Object.entries(s))c!==void 0&&this.append(l,c)}parseString(s){const l=s.startsWith("?")?s.slice(1):s;if(l)for(const c of l.split("&")){const[u,m=""]=c.split("=");u&&this.append(decodeURIComponent(u),decodeURIComponent(m))}}append(s,l){this.params.has(s)||this.params.set(s,[]);const c=this.params.get(s);c&&c.push(l)}delete(s){this.params.delete(s)}get(s){const l=this.params.get(s);return l&&l.length>0?l[0]:null}getAll(s){return this.params.get(s)||[]}has(s){return this.params.has(s)}set(s,l){this.params.set(s,[l])}toString(){const s=[];return this.params.forEach((l,c)=>{for(const u of l)s.push(`${encodeURIComponent(c)}=${encodeURIComponent(u)}`)}),s.join("&")}forEach(s){this.params.forEach((l,c)=>{for(const u of l)s(u,c)})}}function r(o){return typeof URLSearchParams<"u"?new URLSearchParams(o):new e(o)}function t(o){const s=r(void 0);for(const[l,c]of Object.entries(o))c!=null&&s.append(l,String(c));return s}function a(o){return o.toString()}function i(o){const s=r(o),l={};return s.forEach((c,u)=>{l[u]=c}),l}return Ce}var vt;function Eo(){return vt||(vt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseSearchParams=e.searchParamsToString=e.createSearchParams=e.createURLSearchParams=void 0;var r=wo();Object.defineProperty(e,"createURLSearchParams",{enumerable:!0,get:function(){return r.createURLSearchParams}}),Object.defineProperty(e,"createSearchParams",{enumerable:!0,get:function(){return r.createSearchParams}}),Object.defineProperty(e,"searchParamsToString",{enumerable:!0,get:function(){return r.searchParamsToString}}),Object.defineProperty(e,"parseSearchParams",{enumerable:!0,get:function(){return r.parseSearchParams}})})(Fr)),Fr}var X={},jt;function Uo(){if(jt)return X;jt=1,Object.defineProperty(X,"__esModule",{value:!0}),X.debounceAsync=X.clearExpiredCache=X.withCache=X.withTimeout=X.safeParallel=X.withLoadingState=X.safeAsync=void 0;const e=Nt(),r=async(m,b)=>{try{return{data:await m(),success:!0}}catch(p){const h=p instanceof Error?p:new Error(String(p));return e.logger.error(`Async operation failed: ${h.message}`,b,p),{error:h,success:!1}}};X.safeAsync=r;const t=async(m,b,p,h)=>{b(!0),p(null);try{return await m()}catch(g){const x=g instanceof Error?g.message:String(g);p(x),e.logger.error(`Operation failed: ${x}`,h,g);return}finally{b(!1)}};X.withLoadingState=t;const a=async(m,b)=>{try{return{data:await Promise.all(m.map(h=>h())),success:!0}}catch(p){const h=p instanceof Error?p:new Error(String(p));return e.logger.error(`Parallel operations failed: ${h.message}`,b,p),{error:h,success:!1}}};X.safeParallel=a;const i=async(m,b,p)=>{const h=new Promise((g,x)=>setTimeout(()=>x(new Error(`Operation timed out after ${b}ms`)),b));try{return await Promise.race([m(),h])}catch(g){throw e.logger.error("Timeout operation failed",p,g),g}};X.withTimeout=i;const o=new Map,s=async(m,b,p=300*1e3)=>{const h=o.get(m),g=Date.now();if(h&&g-h.timestamp<h.ttl)return h.data;const x=await b();return o.set(m,{data:x,timestamp:g,ttl:p}),x};X.withCache=s;const l=()=>{const m=Date.now();for(const[b,p]of o.entries())m-p.timestamp>=p.ttl&&o.delete(b)};X.clearExpiredCache=l;const c=new Map,u=(m,b,p)=>(...h)=>new Promise(g=>{const x=c.get(p);x&&clearTimeout(x);const N=setTimeout(async()=>{c.delete(p);try{const U=await m(...h);g(U)}catch(U){e.logger.error("Debounced operation failed",p,U),g(void 0)}},b);c.set(p,N)});return X.debounceAsync=u,X}var _t;function kt(){return _t||(_t=1,(function(e){var r=De&&De.__createBinding||(Object.create?(function(a,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(a,s,l)}):(function(a,i,o,s){s===void 0&&(s=o),a[s]=i[o]})),t=De&&De.__exportStar||function(a,i){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&r(i,a,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(mo(),e),t(fo(),e),t(ho(),e),t(yo(),e),t(_o(),e),t(Nt(),e),t(Eo(),e),t(Uo(),e)})(De)),De}var wt;function Do(){return wt||(wt=1,(function(e){var r=ye&&ye.__createBinding||(Object.create?(function(o,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(o,c,u)}):(function(o,s,l,c){c===void 0&&(c=l),o[c]=s[l]})),t=ye&&ye.__exportStar||function(o,s){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&r(s,o,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.MailboxSpecialUse=e.ReviewRejectType=e.ApplicantType=e.SumsubReviewAnswer=e.SumsubReviewStatus=e.KYCApplicationStatus=e.KYCVerificationLevel=e.FeeType=e.ClaimType=e.ConfirmationStatus=e.ProcessedEventName=e.ContractType=e.StorageType=e.WalletType=e.ChainType=e.AnalyticsEvent=e.TransactionStatus=e.MessageType=e.NotificationType=e.RequestStatus=e.MobileView=e.EmailComposeType=e.FontSize=e.Theme=e.Chain=e.AuthStatus=e.debounceAsync=e.clearExpiredCache=e.withCache=e.withTimeout=e.safeParallel=e.withLoadingState=e.safeAsync=void 0,t(nt(),e),t(kt(),e);var a=kt();Object.defineProperty(e,"safeAsync",{enumerable:!0,get:function(){return a.safeAsync}}),Object.defineProperty(e,"withLoadingState",{enumerable:!0,get:function(){return a.withLoadingState}}),Object.defineProperty(e,"safeParallel",{enumerable:!0,get:function(){return a.safeParallel}}),Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return a.withTimeout}}),Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return a.withCache}}),Object.defineProperty(e,"clearExpiredCache",{enumerable:!0,get:function(){return a.clearExpiredCache}}),Object.defineProperty(e,"debounceAsync",{enumerable:!0,get:function(){return a.debounceAsync}});var i=nt();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return i.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return i.Chain}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return i.Theme}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return i.FontSize}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return i.EmailComposeType}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return i.MobileView}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return i.RequestStatus}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return i.MessageType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return i.TransactionStatus}}),Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return i.AnalyticsEvent}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return i.ChainType}}),Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return i.WalletType}}),Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return i.StorageType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return i.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return i.ProcessedEventName}}),Object.defineProperty(e,"ConfirmationStatus",{enumerable:!0,get:function(){return i.ConfirmationStatus}}),Object.defineProperty(e,"ClaimType",{enumerable:!0,get:function(){return i.ClaimType}}),Object.defineProperty(e,"FeeType",{enumerable:!0,get:function(){return i.FeeType}}),Object.defineProperty(e,"KYCVerificationLevel",{enumerable:!0,get:function(){return i.KYCVerificationLevel}}),Object.defineProperty(e,"KYCApplicationStatus",{enumerable:!0,get:function(){return i.KYCApplicationStatus}}),Object.defineProperty(e,"SumsubReviewStatus",{enumerable:!0,get:function(){return i.SumsubReviewStatus}}),Object.defineProperty(e,"SumsubReviewAnswer",{enumerable:!0,get:function(){return i.SumsubReviewAnswer}}),Object.defineProperty(e,"ApplicantType",{enumerable:!0,get:function(){return i.ApplicantType}}),Object.defineProperty(e,"ReviewRejectType",{enumerable:!0,get:function(){return i.ReviewRejectType}}),Object.defineProperty(e,"MailboxSpecialUse",{enumerable:!0,get:function(){return i.MailboxSpecialUse}})})(ye)),ye}var Et=Do();const Co=e=>{switch(e){case"verified":case"success":return Le("success");case"connected":case"warning":return Le("warning");case"disconnected":case"error":return Le("error");case"pending":return Le("info");default:return Le("neutral")}},So=e=>{switch(e){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Vo=({status:e,label:r,showDot:t=!0,size:a="md"})=>{const o=r||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((m,b)=>{const p={sm:"small",md:"default",lg:"large"},g={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[m]||"default",x=p[b];return x==="default"?O.badge[g]():O.badge[x](g)})(e,a),c=Co(e),u=So(a);return n.jsxDEV("span",{className:l,children:[t&&n.jsxDEV("span",{className:`inline-block ${u} rounded-full ${c} mr-1`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:108,columnNumber:9},void 0),o]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:106,columnNumber:5},void 0)},Ao=({chainType:e,size:r="md"})=>{if(!e)return null;const t=e===Et.ChainType.SOLANA?"SOL":"ETH",i={sm:"small",md:"default",lg:"large"}[r],o=()=>{const s=e===Et.ChainType.SOLANA?"solana":"ethereum";return i==="default"?O.badge[s]():O.badge[i](s)};return n.jsxDEV("span",{className:o(),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:137,columnNumber:10},void 0)},To={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Lo=({status:e,size:r="sm",pulse:t=!1,className:a})=>n.jsxDEV("div",{className:f("rounded-full flex-shrink-0",Le(e),To[r],t&&"animate-pulse",a)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-indicator.tsx",lineNumber:26,columnNumber:5},void 0),Io=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UstatusUpipeline",children:r||"UstatusUpipeline Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-pipeline.tsx",lineNumber:43,columnNumber:5},void 0),ur=Z.forwardRef(({className:e,type:r,...t},a)=>n.jsxDEV("input",{type:r,className:f(O.input.default(),e),ref:a,...t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/input.tsx",lineNumber:11,columnNumber:7},void 0));ur.displayName="Input";const Po=({value:e,onChange:r,placeholder:t,rows:a=4,disabled:i=!1,readOnly:o=!1,showCount:s=!1,maxLength:l,resize:c="vertical",size:u="md",className:m,textareaProps:b})=>{const p={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},h={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},g=U=>{const _=U.target.value;l&&_.length>l||r(_)},x=e.length,N=s||l!==void 0;return n.jsxDEV("div",{className:f("w-full",m),children:[n.jsxDEV("textarea",{value:e,onChange:g,placeholder:t,rows:a,disabled:i,readOnly:o,maxLength:l,className:f("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",p[u],h[c],i&&"opacity-50 cursor-not-allowed",o&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:103,columnNumber:7},void 0),N&&n.jsxDEV("div",{className:"flex justify-end mt-1",children:n.jsxDEV("span",{className:f("text-xs",l&&x>l*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",l&&x>=l&&"text-red-600 dark:text-red-400"),children:[x,l&&` / ${l}`]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:130,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:102,columnNumber:5},void 0)},Mo=({value:e,onChange:r,min:t,max:a,step:i=1,disabled:o=!1,showSteppers:s=!1,stepperPosition:l="right",placeholder:c,size:u="md",className:m,inputProps:b})=>{const h={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[u],g=k=>{const C=parseFloat(k.target.value);if(isNaN(C))k.target.value===""&&r(t??0);else{const w=x(C);r(w)}},x=k=>{let C=k;return t!==void 0&&C<t&&(C=t),a!==void 0&&C>a&&(C=a),C},N=()=>{const k=x(e+i);r(k)},U=()=>{const k=x(e-i);r(k)},_=a===void 0||e<a,E=t===void 0||e>t,j=({onClick:k,icon:C,disabled:w,ariaLabel:S})=>n.jsxDEV("button",{type:"button",onClick:k,disabled:o||w,"aria-label":S,className:f("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",h.button,(o||w)&&"opacity-50 cursor-not-allowed"),children:C},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:137,columnNumber:5},void 0);return s&&l==="sides"?n.jsxDEV("div",{className:f("inline-flex items-stretch",m),children:[n.jsxDEV(j,{onClick:U,disabled:!E,icon:n.jsxDEV(A.MinusIcon,{className:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:165,columnNumber:17},void 0),ariaLabel:"Decrement"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:162,columnNumber:9},void 0),n.jsxDEV("input",{type:"number",value:e,onChange:g,min:t,max:a,step:i,disabled:o,placeholder:c,className:f("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",h.input,o&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:168,columnNumber:9},void 0),n.jsxDEV(j,{onClick:N,disabled:!_,icon:n.jsxDEV(A.PlusIcon,{className:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:196,columnNumber:17},void 0),ariaLabel:"Increment"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:193,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:161,columnNumber:7},void 0):s&&l==="right"?n.jsxDEV("div",{className:f("inline-flex items-stretch gap-2",m),children:[n.jsxDEV("input",{type:"number",value:e,onChange:g,min:t,max:a,step:i,disabled:o,placeholder:c,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",h.input,o&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:207,columnNumber:9},void 0),n.jsxDEV("div",{className:"inline-flex flex-col gap-0.5",children:[n.jsxDEV("button",{type:"button",onClick:N,disabled:o||!_,"aria-label":"Increment",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",h.button.replace(/h-\d+/,"h-auto"),(o||!_)&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV(A.PlusIcon,{className:f(h.icon,"w-3 h-3")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:252,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:234,columnNumber:11},void 0),n.jsxDEV("button",{type:"button",onClick:U,disabled:o||!E,"aria-label":"Decrement",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",h.button.replace(/h-\d+/,"h-auto"),(o||!E)&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV(A.MinusIcon,{className:f(h.icon,"w-3 h-3")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:272,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:254,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:233,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:206,columnNumber:7},void 0):n.jsxDEV("input",{type:"number",value:e,onChange:g,min:t,max:a,step:i,disabled:o,placeholder:c,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",h.input,o&&"opacity-50 cursor-not-allowed",m),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:281,columnNumber:5},void 0)},Oo=({value:e,onChange:r,placeholder:t="Search...",autoFocus:a=!1,disabled:i=!1,size:o="md",showIcon:s=!0,showClear:l=!0,loading:c=!1,className:u,inputProps:m})=>{const[b,p]=y.useState(""),h=e!==void 0?e:b,g=e!==void 0,N={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:s?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:s?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:s?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[o],U=y.useCallback(E=>{const j=E.target.value;g||p(j),r?.(j)},[r,g]),_=y.useCallback(()=>{g||p(""),r?.("")},[r,g]);return n.jsxDEV("div",{className:f("relative w-full",u),children:[s&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",N.iconLeft),children:n.jsxDEV(A.MagnifyingGlassIcon,{className:f(N.icon,"text-gray-400 dark:text-gray-500")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:130,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:124,columnNumber:9},void 0),n.jsxDEV("input",{type:"text",value:h,onChange:U,placeholder:t,autoFocus:a,disabled:i||c,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",N.input,N.padding,i&&"opacity-50 cursor-not-allowed",c&&"opacity-60"),...m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:137,columnNumber:7},void 0),l&&h&&!c&&n.jsxDEV("button",{type:"button",onClick:_,disabled:i,className:f("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",i?"cursor-not-allowed":"cursor-pointer",N.iconRight),"aria-label":"Clear search",children:n.jsxDEV(A.XMarkIcon,{className:N.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:175,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:162,columnNumber:9},void 0),c&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center",N.iconRight),children:n.jsxDEV("svg",{className:f(N.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:193,columnNumber:13},void 0),n.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:201,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:187,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:181,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:121,columnNumber:5},void 0)},Ro=({value:e,onChange:r,type:t="date",min:a,max:i,disabled:o=!1,showIcon:s=!1,placeholder:l,size:c="md",className:u,inputProps:m})=>{const p={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:s?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:s?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:s?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[c],h=e instanceof Date?zo(e,t):e,g=x=>{r(x.target.value)};return n.jsxDEV("div",{className:f("relative",u),children:[s&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",p.iconLeft),children:n.jsxDEV(A.CalendarIcon,{className:f(p.icon,"text-gray-400 dark:text-gray-500")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:111,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:105,columnNumber:9},void 0),n.jsxDEV("input",{type:t,value:h,onChange:g,min:a,max:i,disabled:o,placeholder:l,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",p.input,p.padding,o&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:118,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:102,columnNumber:5},void 0)};function zo(e,r){const t=c=>String(c).padStart(2,"0"),a=e.getFullYear(),i=t(e.getMonth()+1),o=t(e.getDate()),s=t(e.getHours()),l=t(e.getMinutes());switch(r){case"date":return`${a}-${i}-${o}`;case"time":return`${s}:${l}`;case"datetime-local":return`${a}-${i}-${o}T${s}:${l}`;case"month":return`${a}-${i}`;case"week":{const c=new Date(a,0,1),u=Math.floor((e.getTime()-c.getTime())/(1440*60*1e3)),m=Math.ceil((u+c.getDay()+1)/7);return`${a}-W${t(m)}`}default:return`${a}-${i}-${o}`}}const Ut=({value:e,onChange:r,use12Hour:t=!1,minuteStep:a=1,disabled:i=!1,className:o})=>{const[s,l]=y.useState(!1),[c,u]=y.useState("12"),[m,b]=y.useState("00"),[p,h]=y.useState("AM"),g=y.useRef(null);y.useEffect(()=>{if(e){const[E,j]=e.split(":"),k=parseInt(E,10);if(t){const C=k>=12,w=k===0?12:k>12?k-12:k;u(w.toString().padStart(2,"0")),h(C?"PM":"AM")}else u(E);b(j)}},[e,t]),y.useEffect(()=>{const E=j=>{g.current&&!g.current.contains(j.target)&&l(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);const x=()=>{if(!e)return"";const[E,j]=e.split(":"),k=parseInt(E,10);if(t){const C=k===0?12:k>12?k-12:k,w=k>=12?"PM":"AM";return`${C}:${j} ${w}`}return`${E}:${j}`},N=(E,j,k)=>{let C=parseInt(E,10);const w=parseInt(j,10);t&&k&&(k==="PM"&&C!==12?C+=12:k==="AM"&&C===12&&(C=0));const S=`${C.toString().padStart(2,"0")}:${w.toString().padStart(2,"0")}`;r(S)},U=t?Array.from({length:12},(E,j)=>(j+1).toString().padStart(2,"0")):Array.from({length:24},(E,j)=>j.toString().padStart(2,"0")),_=Array.from({length:Math.ceil(60/a)},(E,j)=>(j*a).toString().padStart(2,"0"));return n.jsxDEV("div",{ref:g,className:f("relative w-full",o),children:[n.jsxDEV("button",{type:"button",onClick:()=>!i&&l(!s),disabled:i,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",s&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:f(e?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:e?x():"Select time"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:157,columnNumber:9},void 0),n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:172,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:166,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:142,columnNumber:7},void 0),s&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:n.jsxDEV("div",{className:"flex gap-1 p-2",children:[n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:187,columnNumber:15},void 0),n.jsxDEV("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:U.map(E=>n.jsxDEV("button",{onClick:()=>{u(E),N(E,m,t?p:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",E===c&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:E},E,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:192,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:190,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:186,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:218,columnNumber:15},void 0),n.jsxDEV("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:_.map(E=>n.jsxDEV("button",{onClick:()=>{b(E),N(c,E,t?p:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",E===m&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:E},E,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:223,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:221,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:217,columnNumber:13},void 0),t&&n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:250,columnNumber:17},void 0),n.jsxDEV("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[n.jsxDEV("button",{onClick:()=>{h("AM"),N(c,m,"AM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",p==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:254,columnNumber:19},void 0),n.jsxDEV("button",{onClick:()=>{h("PM"),N(c,m,"PM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",p==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:269,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:253,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:249,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:184,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:183,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:140,columnNumber:5},void 0)},Bo=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Wo=({value:e,onChange:r,country:t,onCountryChange:a,countries:i=Bo,placeholder:o="Phone number",disabled:s=!1,className:l})=>{const[c,u]=y.useState(i[0]?.code||"US"),[m,b]=y.useState(!1),[p,h]=y.useState(""),g=t!==void 0?t:c,x=i.find(j=>j.code===g),N=j=>{t!==void 0&&a?a(j):u(j),b(!1),h("")},U=j=>{const k=j.replace(/\D/g,"");return x?.dialCode==="+1"?k.length<=3?k:k.length<=6?`(${k.slice(0,3)}) ${k.slice(3)}`:`(${k.slice(0,3)}) ${k.slice(3,6)}-${k.slice(6,10)}`:k},_=j=>{const k=U(j.target.value);r(k)},E=i.filter(j=>j.name.toLowerCase().includes(p.toLowerCase())||j.dialCode.includes(p)||j.code.toLowerCase().includes(p.toLowerCase()));return n.jsxDEV("div",{className:f("relative w-full",l),children:[n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&b(!m),disabled:s,className:f("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",m&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-xl",children:x?.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:162,columnNumber:13},void 0),n.jsxDEV("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:x?.dialCode},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:163,columnNumber:13},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",m&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:175,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:166,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:147,columnNumber:11},void 0),m&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:p,onChange:j=>h(j.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:j=>j.stopPropagation()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:189,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:188,columnNumber:15},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:E.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:202,columnNumber:19},void 0):E.map(j=>n.jsxDEV("button",{onClick:()=>N(j.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",j.code===g&&"bg-blue-50 dark:bg-blue-900/30"),children:[n.jsxDEV("span",{className:"text-xl",children:j.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:218,columnNumber:23},void 0),n.jsxDEV("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:j.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:219,columnNumber:23},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:j.dialCode},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:222,columnNumber:23},void 0)]},j.code,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:207,columnNumber:21},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:200,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:186,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:146,columnNumber:9},void 0),n.jsxDEV("input",{type:"tel",value:e,onChange:_,placeholder:o,disabled:s,className:f("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:234,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:144,columnNumber:7},void 0),e&&x&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",x.dialCode," ",e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:253,columnNumber:9},void 0),m&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:260,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:143,columnNumber:5},void 0)},Fo=({checked:e,defaultChecked:r=!1,onChange:t,label:a,description:i,disabled:o=!1,size:s="md",variant:l="primary",color:c,className:u,id:m,name:b,value:p,required:h=!1,indeterminate:g=!1,error:x=!1,errorMessage:N,icon:U})=>{const[_,E]=y.useState(r),j=e!==void 0,k=j?e:_,C={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},S=c?{blue:"primary",green:"success",yellow:"warning",red:"error"}[c]:l,v=()=>x?k?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:k?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:k?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:k?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:k?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[S],T=z=>{if(o)return;const R=z.target.checked;j||E(R),t?.(R)},P=z=>{if(!o&&(z.key===" "||z.key==="Spacebar")){z.preventDefault();const R=!k;j||E(R),t?.(R)}},I=C[s];return n.jsxDEV("div",{className:f("inline-flex flex-col",u),children:[n.jsxDEV("label",{className:f("inline-flex items-start gap-2 cursor-pointer",o&&"opacity-50 cursor-not-allowed"),children:[n.jsxDEV("div",{className:"relative flex items-center",children:[n.jsxDEV("input",{type:"checkbox",checked:k,defaultChecked:j?void 0:r,onChange:T,onKeyDown:P,disabled:o,id:m,name:b,value:p,required:h,className:"sr-only peer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:188,columnNumber:11},void 0),n.jsxDEV("div",{"data-indeterminate":g?"true":void 0,className:f("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",I.box,v(),!o&&"hover:border-opacity-75"),children:g?n.jsxDEV(xe.MinusIcon,{className:f("text-white",I.check)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:211,columnNumber:15},void 0):k?U||n.jsxDEV(xe.CheckIcon,{className:f("text-white",I.check)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:216,columnNumber:17},void 0):null},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:201,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:187,columnNumber:9},void 0),(a||i)&&n.jsxDEV("div",{className:"flex flex-col",children:[a&&n.jsxDEV("span",{className:f("text-gray-900 dark:text-white",I.text),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:224,columnNumber:15},void 0),i&&n.jsxDEV("span",{className:f("text-gray-600 dark:text-gray-400",I.desc),children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:231,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:222,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:181,columnNumber:7},void 0),N&&n.jsxDEV("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:241,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:180,columnNumber:5},void 0)},Dt=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV(jr.Root,{className:f("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",e),...r,ref:t,children:n.jsxDEV(jr.Thumb,{className:f("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/switch.tsx",lineNumber:17,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/switch.tsx",lineNumber:9,columnNumber:3},void 0));Dt.displayName=jr.Root.displayName;const qo=({name:e="radio-group",value:r,onChange:t,options:a,label:i,orientation:o="vertical",disabled:s=!1,error:l=!1,errorMessage:c,required:u=!1,size:m="md",renderOption:b,className:p})=>{const h=y.useRef(null),x={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[m],N=(_,E)=>{!s&&!E&&t(_)},U=(_,E)=>{const j=a.filter(C=>!C.disabled&&!s),k=j.findIndex(C=>C.value===a[E].value);if(_.key==="ArrowDown"||_.key==="ArrowRight"){_.preventDefault();const C=(k+1)%j.length;t(j[C].value)}else if(_.key==="ArrowUp"||_.key==="ArrowLeft"){_.preventDefault();const C=(k-1+j.length)%j.length;t(j[C].value)}};return n.jsxDEV("div",{className:f("w-full",p),children:[i&&n.jsxDEV("div",{className:"mb-2",children:n.jsxDEV("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[i,u&&n.jsxDEV("span",{className:"text-red-600 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:147,columnNumber:26},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:145,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:144,columnNumber:9},void 0),n.jsxDEV("div",{ref:h,className:f(o==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:a.map((_,E)=>{const j=s||_.disabled,k=r===_.value;return n.jsxDEV("label",{className:f("flex items-start cursor-pointer",j&&"opacity-50 cursor-not-allowed",l&&"border-red-600 dark:border-red-500"),children:[n.jsxDEV("input",{type:"radio",name:e,value:_.value,checked:k,onChange:()=>N(_.value,!!_.disabled),onKeyDown:C=>U(C,E),disabled:j,className:f("mt-0.5 mr-2",x.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",l&&"border-red-600 dark:border-red-500",j&&"cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:173,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:b?b(_):n.jsxDEV(n.Fragment,{children:[n.jsxDEV("span",{className:f("font-medium text-gray-700 dark:text-gray-300",x.label),children:_.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:197,columnNumber:21},void 0),_.description&&n.jsxDEV("p",{className:f("text-gray-500 dark:text-gray-400 mt-0.5",x.description),children:_.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:206,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:196,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:192,columnNumber:15},void 0)]},_.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:165,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:151,columnNumber:7},void 0),c&&n.jsxDEV("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:223,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:142,columnNumber:5},void 0)},qr=$.Root,$o=$.Group,Ct=$.Value,cr=Z.forwardRef(({className:e,children:r,...t},a)=>n.jsxDEV($.Trigger,{ref:a,className:f("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...t,children:[r,n.jsxDEV($.Icon,{asChild:!0,children:n.jsxDEV(ar.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:27,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:26,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:17,columnNumber:3},void 0));cr.displayName=$.Trigger.displayName;const $r=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV($.ScrollUpButton,{ref:t,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:n.jsxDEV(ar.ChevronUp,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:45,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:37,columnNumber:3},void 0));$r.displayName=$.ScrollUpButton.displayName;const Hr=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV($.ScrollDownButton,{ref:t,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:n.jsxDEV(ar.ChevronDown,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:62,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:54,columnNumber:3},void 0));Hr.displayName=$.ScrollDownButton.displayName;const mr=Z.forwardRef(({className:e,children:r,position:t="popper",...a},i)=>n.jsxDEV($.Portal,{children:n.jsxDEV($.Content,{ref:i,className:f(O.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[n.jsxDEV($r,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:85,columnNumber:7},void 0),n.jsxDEV($.Viewport,{className:f(O.overlays.dropdown.itemContainer(),t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:86,columnNumber:7},void 0),n.jsxDEV(Hr,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:95,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:73,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:72,columnNumber:3},void 0));mr.displayName=$.Content.displayName;const St=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV($.Label,{ref:t,className:f(O.overlays.dropdown.header(),"py-1.5",e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:105,columnNumber:3},void 0));St.displayName=$.Label.displayName;const dr=Z.forwardRef(({className:e,children:r,...t},a)=>n.jsxDEV($.Item,{ref:a,className:f(O.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[n.jsxDEV($.ItemText,{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:126,columnNumber:5},void 0),n.jsxDEV("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxDEV($.ItemIndicator,{children:n.jsxDEV(ar.Check,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:130,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:129,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:128,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:117,columnNumber:3},void 0));dr.displayName=$.Item.displayName;const Vt=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV($.Separator,{ref:t,className:f("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:141,columnNumber:3},void 0));Vt.displayName=$.Separator.displayName;const Ho=({options:e,value:r,onChange:t,placeholder:a="Select items...",searchPlaceholder:i="Search...",searchable:o=!0,maxDisplay:s=3,disabled:l=!1,className:c})=>{const[u,m]=y.useState(!1),[b,p]=y.useState(""),h=y.useRef(null),g=o?e.filter(j=>j.label.toLowerCase().includes(b.toLowerCase())):e,x=e.filter(j=>r.includes(j.value)),N=j=>{r.includes(j)?t(r.filter(k=>k!==j)):t([...r,j])},U=j=>{t(r.filter(k=>k!==j))};y.useEffect(()=>{const j=k=>{h.current&&!h.current.contains(k.target)&&(m(!1),p(""))};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const _=x.length,E=_>s?_-s:0;return n.jsxDEV("div",{ref:h,className:f("relative w-full",c),children:[n.jsxDEV("button",{type:"button",onClick:()=>!l&&m(!u),disabled:l,className:f("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",u&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:n.jsxDEV("div",{className:"flex flex-wrap gap-1.5",children:x.length===0?n.jsxDEV("span",{className:"text-gray-500 dark:text-gray-400",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:140,columnNumber:13},void 0):n.jsxDEV(n.Fragment,{children:[x.slice(0,s).map(j=>n.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[j.label,n.jsxDEV("button",{onClick:k=>{k.stopPropagation(),U(j.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:n.jsxDEV("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:164,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:158,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:151,columnNumber:19},void 0)]},j.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:146,columnNumber:17},void 0)),E>0&&n.jsxDEV("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",E," more"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:175,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:144,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:138,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:123,columnNumber:7},void 0),u&&n.jsxDEV("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[o&&n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:b,onChange:j=>p(j.target.value),placeholder:i,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:j=>j.stopPropagation()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:190,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:189,columnNumber:13},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:g.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:204,columnNumber:15},void 0):g.map(j=>{const k=r.includes(j.value);return n.jsxDEV("button",{onClick:()=>!j.disabled&&N(j.value),disabled:j.disabled,className:f("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[n.jsxDEV("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center",k?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:k&&n.jsxDEV("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:241,columnNumber:27},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:235,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:226,columnNumber:21},void 0),n.jsxDEV("span",{className:"flex-1 text-gray-900 dark:text-white",children:j.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:252,columnNumber:21},void 0)]},j.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:212,columnNumber:19},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:202,columnNumber:11},void 0),r.length>0&&n.jsxDEV("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[r.length," selected"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:264,columnNumber:15},void 0),n.jsxDEV("button",{onClick:j=>{j.stopPropagation(),t([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:267,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:263,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:186,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:121,columnNumber:5},void 0)},Go=({options:e,value:r,onChange:t,placeholder:a="Select option...",searchPlaceholder:i="Search...",emptyMessage:o="No results found.",disabled:s=!1,className:l})=>{const[c,u]=y.useState(!1),[m,b]=y.useState(""),[p,h]=y.useState(0),g=y.useRef(null),x=y.useRef(null),N=e.filter(j=>j.label.toLowerCase().includes(m.toLowerCase())),U=e.find(j=>j.value===r);y.useEffect(()=>{if(!c)return;const j=k=>{g.current&&!g.current.contains(k.target)&&(u(!1),b(""))};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[c]),y.useEffect(()=>{c&&x.current&&x.current.focus()},[c]),y.useEffect(()=>{h(0)},[m]);const _=j=>{if(!c){(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),u(!0));return}switch(j.key){case"ArrowDown":j.preventDefault(),h(k=>k<N.length-1?k+1:k);break;case"ArrowUp":j.preventDefault(),h(k=>k>0?k-1:k);break;case"Enter":j.preventDefault(),N[p]&&!N[p].disabled&&(t(N[p].value),u(!1),b(""));break;case"Escape":j.preventDefault(),u(!1),b("");break}},E=(j,k)=>{k||(t(j),u(!1),b(""))};return n.jsxDEV("div",{ref:g,className:f("relative w-full",l),children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&u(!c),onKeyDown:_,disabled:s,className:f("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:f("truncate",!U&&"text-gray-500 dark:text-gray-400"),children:U?U.label:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:182,columnNumber:9},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 ml-2 transition-transform",c&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:199,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:190,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:165,columnNumber:7},void 0),c&&n.jsxDEV("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{ref:x,type:"text",value:m,onChange:j=>b(j.target.value),onKeyDown:_,placeholder:i,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:213,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:212,columnNumber:11},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:N.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:227,columnNumber:15},void 0):N.map((j,k)=>n.jsxDEV("button",{onClick:()=>E(j.value,j.disabled),disabled:j.disabled,className:f("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",j.value===r?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":k===p?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:j.label},j.value,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:232,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:225,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:210,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:163,columnNumber:5},void 0)};function At(e,r){y.useEffect(()=>{const t=a=>{const i=e?.current;!i||i.contains(a?.target||null)||r(a)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])}const Yo=({trigger:e,items:r,align:t="right",className:a="",variant:i="default"})=>{const[o,s]=y.useState(!1),l=y.useRef(null);At(l,()=>s(!1));const c=b=>{b.disabled||(b.onClick(),s(!1))},u=t==="left"?O.overlays.dropdown.menuRight():O.overlays.dropdown.menuLeft(),m=i==="bordered"?O.overlays.dropdown.triggerBordered():O.overlays.dropdown.trigger();return n.jsxDEV("div",{className:`${O.overlays.dropdown.container()} ${a}`,ref:l,children:[n.jsxDEV("div",{className:m,onClick:()=>s(!o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:57,columnNumber:7},void 0),o&&n.jsxDEV("div",{className:`${O.overlays.dropdown.menu()} ${u} ${O.overlays.dropdown.menuBottom()}`,children:n.jsxDEV("div",{className:O.overlays.dropdown.itemContainer(),children:r.map(b=>b.separator?n.jsxDEV("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},b.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:68,columnNumber:17},void 0):n.jsxDEV("button",{onClick:()=>c(b),disabled:b.disabled,className:`${b.disabled?O.overlays.dropdown.itemDisabled():O.overlays.dropdown.item()} flex items-center gap-2`,children:[b.icon&&n.jsxDEV(b.icon,{className:O.overlays.dropdown.itemIcon()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:85,columnNumber:21},void 0),n.jsxDEV("span",{children:b.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:89,columnNumber:19},void 0)]},b.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:74,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:65,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:62,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:53,columnNumber:5},void 0)},Ko=({options:e,value:r,values:t=[],onChange:a,onValuesChange:i,multiple:o=!1,size:s="md",variant:l="default",className:c})=>{const u=(h,g)=>{if(!g)if(o){const x=t.includes(h)?t.filter(N=>N!==h):[...t,h];i?.(x)}else a?.(h)},m=h=>o?t.includes(h):r===h,b={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},p={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return n.jsxDEV("div",{className:f("inline-flex rounded-lg p-1 gap-1",p[l].base,c),role:"group",children:e.map(h=>{const g=m(h.value);return n.jsxDEV("button",{onClick:()=>u(h.value,h.disabled),disabled:h.disabled,className:f("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",b[s],g?p[l].selected:p[l].button,g?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":g,children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:148,columnNumber:15},void 0),h.label]},h.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:128,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:116,columnNumber:5},void 0)},Zo=({value:e,onChange:r,min:t=0,max:a=100,step:i=1,disabled:o=!1,showValue:s=!1,formatValue:l=g=>String(g),showMinMax:c=!1,minLabel:u,maxLabel:m,variant:b="primary",size:p="md",className:h})=>{const g={sm:"h-1",md:"h-2",lg:"h-3"},x={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},N=_=>{r(Number(_.target.value))},U=(e-t)/(a-t)*100;return n.jsxDEV("div",{className:f("w-full",h),children:[s&&n.jsxDEV("div",{className:"flex justify-between items-center mb-2",children:[n.jsxDEV("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:l(e)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:110,columnNumber:11},void 0),c&&n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[u||t," - ",m||a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:114,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:109,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("div",{className:f("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",g[p])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:124,columnNumber:9},void 0),n.jsxDEV("div",{className:f("absolute left-0 rounded-full transition-all","bg-current",x[b],g[p]),style:{width:`${U}%`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:133,columnNumber:9},void 0),n.jsxDEV("input",{type:"range",min:t,max:a,step:i,value:e,onChange:N,disabled:o,className:f("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",g[p],x[b],o&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:144,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:122,columnNumber:7},void 0),c&&!s&&n.jsxDEV("div",{className:"flex justify-between mt-1",children:[n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:u||t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:186,columnNumber:11},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:m||a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:189,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:185,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:106,columnNumber:5},void 0)},Qo=({value:e,onChange:r,min:t=0,max:a=100,step:i=1,showValue:o=!0,className:s})=>n.jsxDEV("div",{className:f("flex items-center gap-4",s),children:[n.jsxDEV("input",{type:"range",min:t,max:a,step:i,value:e,onChange:l=>r(Number(l.target.value)),className:"flex-1 accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:24,columnNumber:7},void 0),o&&n.jsxDEV("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:34,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:23,columnNumber:5},void 0),Xo=({onChange:e,accept:r,multiple:t=!1,maxSize:a,maxFiles:i,disabled:o=!1,showDropZone:s=!1,showFileList:l=!0,files:c=[],onRemove:u,className:m,buttonText:b="Choose Files",dropZoneText:p="Drop files here or click to browse"})=>{const h=y.useRef(null),[g,x]=y.useState(!1),[N,U]=y.useState(null),_=T=>(U(null),i&&c.length+T.length>i?(U(`Maximum ${i} files allowed`),[]):T.filter(I=>a&&I.size>a?(U(`File "${I.name}" exceeds maximum size of ${Gr(a)}`),!1):!0)),E=T=>{const P=Array.from(T.target.files||[]),I=_(P);I.length>0&&e(I),h.current&&(h.current.value="")},j=()=>{h.current?.click()},k=T=>{T.preventDefault(),T.stopPropagation(),o||x(!0)},C=T=>{T.preventDefault(),T.stopPropagation(),x(!1)},w=T=>{T.preventDefault(),T.stopPropagation()},S=T=>{if(T.preventDefault(),T.stopPropagation(),x(!1),o)return;const P=Array.from(T.dataTransfer.files),I=_(P);I.length>0&&e(I)},v=T=>{u&&u(T)};return s?n.jsxDEV("div",{className:f("w-full",m),children:[n.jsxDEV("input",{ref:h,type:"file",onChange:E,accept:r,multiple:t,disabled:o,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:170,columnNumber:9},void 0),n.jsxDEV("div",{onClick:j,onDragEnter:k,onDragLeave:C,onDragOver:w,onDrop:S,className:f("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",g?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",o&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV("div",{className:"flex flex-col items-center justify-center space-y-3",children:[n.jsxDEV(A.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:197,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:p},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:198,columnNumber:13},void 0),a&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Gr(a)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:202,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:196,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:180,columnNumber:9},void 0),N&&n.jsxDEV("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:210,columnNumber:11},void 0),l&&c.length>0&&n.jsxDEV(Tt,{files:c,onRemove:v},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:214,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:169,columnNumber:7},void 0):n.jsxDEV("div",{className:f("w-full",m),children:[n.jsxDEV("input",{ref:h,type:"file",onChange:E,accept:r,multiple:t,disabled:o,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:223,columnNumber:7},void 0),n.jsxDEV("button",{type:"button",onClick:j,disabled:o,className:f("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",o&&"opacity-50 cursor-not-allowed"),children:[n.jsxDEV(A.DocumentIcon,{className:"h-5 w-5 mr-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:248,columnNumber:9},void 0),b]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:233,columnNumber:7},void 0),N&&n.jsxDEV("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:253,columnNumber:9},void 0),l&&c.length>0&&n.jsxDEV(Tt,{files:c,onRemove:v},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:257,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:222,columnNumber:5},void 0)},Tt=({files:e,onRemove:r})=>n.jsxDEV("div",{className:"mt-3 space-y-2",children:e.map((t,a)=>n.jsxDEV("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[n.jsxDEV("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[n.jsxDEV(A.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:278,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:t.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:280,columnNumber:15},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Gr(t.size)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:283,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:279,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:277,columnNumber:11},void 0),n.jsxDEV("button",{type:"button",onClick:()=>r(a),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:n.jsxDEV(A.XMarkIcon,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:294,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:288,columnNumber:11},void 0)]},`${t.name}-${a}`,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:273,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:271,columnNumber:5},void 0);function Gr(e){if(e===0)return"0 Bytes";const r=1024,t=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(r));return Math.round(e/Math.pow(r,a)*100)/100+" "+t[a]}const Jo=({value:e,onChange:r,placeholder:t="Type and press Enter...",maxTags:a,validate:i,validator:o,separators:s=[],allowDuplicates:l=!1,disabled:c=!1,error:u=!1,errorMessage:m,variant:b="primary",renderTag:p,className:h})=>{const g=i||o,[x,N]=y.useState(""),U=y.useRef(null),_={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},E=S=>{const v=S.trim();v&&(a&&e.length>=a||!l&&e.includes(v)||g&&!g(v)||(r([...e,v]),N("")))},j=S=>{r(e.filter((v,T)=>T!==S))},k=S=>{N(S.target.value)},C=S=>{S.key==="Enter"&&(S.preventDefault(),x.trim()&&E(x)),S.key===","&&(S.preventDefault(),x.trim()&&E(x)),s.length>0&&s.includes(S.key)&&S.key!==","&&(S.preventDefault(),x.trim()&&E(x)),S.key==="Backspace"&&!x&&e.length>0&&j(e.length-1),S.key==="Escape"&&N("")},w=a!==void 0&&e.length>=a;return n.jsxDEV("div",{className:f("w-full",h),children:[n.jsxDEV("div",{className:f("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",c&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",u&&"border-red-500 dark:border-red-400"),onClick:()=>!c&&U.current?.focus(),children:[e.map((S,v)=>p?n.jsxDEV(y.Fragment,{children:p(S,v,()=>j(v))},v,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:182,columnNumber:13},void 0):n.jsxDEV("span",{className:f("inline-flex items-center gap-1.5 px-2.5 py-1",_[b],"text-sm font-medium","rounded-md","transition-colors"),children:[n.jsxDEV("span",{className:"truncate max-w-[200px]",children:S},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:196,columnNumber:15},void 0),n.jsxDEV("button",{type:"button",onClick:T=>{T.stopPropagation(),j(v)},disabled:c,className:f("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${S}`,children:n.jsxDEV("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:217,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:211,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:197,columnNumber:15},void 0)]},v,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:186,columnNumber:13},void 0)),n.jsxDEV("input",{ref:U,type:"text",value:x,onChange:k,onKeyDown:C,placeholder:e.length===0?t:w?`Max ${a} tags`:"",disabled:c,className:f("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:230,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:165,columnNumber:7},void 0),m&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:255,columnNumber:9},void 0),a&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[e.length," / ",a," tags"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:262,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:163,columnNumber:5},void 0)},es=({value:e,onChange:r,mentions:t,trigger:a="@",placeholder:i="Type a message...",disabled:o=!1,className:s})=>{const[l,c]=y.useState(!1),[u,m]=y.useState([]),[b,p]=y.useState(0),[h,g]=y.useState(0),x=y.useRef(null),N=y.useRef(null),U=j=>{const k=j.target.value,C=j.target.selectionStart||0;r(k),g(C);const S=k.substring(0,C).split(/\s/),v=S[S.length-1];if(v.startsWith(a)){const T=v.substring(a.length),P=t.filter(I=>I.label.toLowerCase().includes(T.toLowerCase()));m(P),c(P.length>0),p(0)}else c(!1)},_=j=>{const k=e.substring(0,h),C=e.substring(h),w=k.split(/\s/),S=w[w.length-1],v=k.length-S.length,T=e.substring(0,v)+a+j.label+" "+C;if(r(T),c(!1),x.current){const P=v+a.length+j.label.length+1;setTimeout(()=>{x.current?.focus(),x.current?.setSelectionRange(P,P)},0)}},E=j=>{if(l)switch(j.key){case"ArrowDown":j.preventDefault(),p(k=>k<u.length-1?k+1:k);break;case"ArrowUp":j.preventDefault(),p(k=>k>0?k-1:k);break;case"Enter":j.preventDefault(),u[b]&&_(u[b]);break;case"Escape":j.preventDefault(),c(!1);break}};return y.useEffect(()=>{const j=k=>{N.current&&!N.current.contains(k.target)&&x.current&&!x.current.contains(k.target)&&c(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]),n.jsxDEV("div",{className:f("relative w-full",s),children:[n.jsxDEV("textarea",{ref:x,value:e,onChange:U,onKeyDown:E,placeholder:i,disabled:o,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:181,columnNumber:7},void 0),l&&n.jsxDEV("div",{ref:N,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:u.map((j,k)=>n.jsxDEV("button",{onClick:()=>_(j),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",k===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[j.avatar&&n.jsxDEV("img",{src:j.avatar,alt:j.label,className:"w-8 h-8 rounded-full"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:218,columnNumber:17},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:j.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:225,columnNumber:17},void 0),j.metadata&&n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:j.metadata},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:229,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:224,columnNumber:15},void 0)]},j.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:207,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:202,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:180,columnNumber:5},void 0)},rs=J.cva(`${L.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Yr=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV(yn.Root,{ref:t,className:f(rs(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/label.tsx",lineNumber:16,columnNumber:3},void 0));Yr.displayName=yn.Root.displayName;const ns=({id:e,label:r,type:t="text",value:a,onChange:i,placeholder:o,helperText:s,error:l,required:c=!1,disabled:u=!1,maxLength:m,autoFocus:b=!1,className:p,inputClassName:h})=>{const g=!!l,x=s||l?`${e}-helper`:void 0;return n.jsxDEV("div",{className:f("space-y-2",p),children:[n.jsxDEV(Yr,{htmlFor:e,children:[r,c&&n.jsxDEV("span",{className:"text-red-500 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:80,columnNumber:22},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:78,columnNumber:7},void 0),n.jsxDEV(ur,{type:t,id:e,value:a,onChange:i,placeholder:o,disabled:u,maxLength:m,autoFocus:b,required:c,"aria-invalid":g,"aria-describedby":x,className:h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:82,columnNumber:7},void 0),(s||l)&&n.jsxDEV("p",{id:x,className:f(L.body.sm(),g?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:g?"alert":void 0,children:l||s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:97,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:77,columnNumber:5},void 0)},br=({label:e,required:r=!1,error:t,helpText:a,children:i,layout:o="vertical",className:s="",labelClassName:l="",contentClassName:c=""})=>{const u=o==="horizontal";return n.jsxDEV("div",{className:`${u?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${s}`,children:[n.jsxDEV("div",{className:u?"md:col-span-1":"",children:[n.jsxDEV("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,r&&n.jsxDEV("span",{className:"text-red-500 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:42,columnNumber:24},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:38,columnNumber:9},void 0),a&&!t&&n.jsxDEV("div",{className:"mt-1 flex items-start",children:[n.jsxDEV(A.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:46,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:47,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:37,columnNumber:7},void 0),n.jsxDEV("div",{className:`${u?"md:col-span-2":""} ${c}`,children:[n.jsxDEV("div",{className:t?"relative":"",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:58,columnNumber:9},void 0),t&&n.jsxDEV("div",{className:"mt-1 flex items-start",children:[n.jsxDEV(A.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:63,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-red-600 dark:text-red-400",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:64,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:62,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:55,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:33,columnNumber:5},void 0)},ts=({label:e,value:r,onChange:t,placeholder:a,required:i=!1,error:o,helpText:s,type:l="text",layout:c="vertical",className:u=""})=>n.jsxDEV(br,{label:e,required:i,error:o,helpText:s,layout:c,className:u,children:n.jsxDEV("input",{type:l,value:r,onChange:m=>t(m.target.value),placeholder:a,className:`
12
+ `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:81,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/loading-dots.tsx",lineNumber:56,columnNumber:5},void 0)},uo=({message:e="Loading...",size:r="default",fullScreen:a=!1,variant:t="default",className:o})=>{const s={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[r],l=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",d=n.jsxDEV("div",{className:f(l,o),children:[n.jsxDEV(Me,{size:s.spinner,variant:t,className:"mb-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:33,columnNumber:7},void 0),e&&n.jsxDEV("p",{className:f(s.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:35,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:32,columnNumber:5},void 0);return a?n.jsxDEV("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:n.jsxDEV("div",{className:"flex items-center justify-center min-h-full p-4",children:[n.jsxDEV(Me,{size:s.spinner,variant:t,className:"mb-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:51,columnNumber:11},void 0),e&&n.jsxDEV("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:53,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:50,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/loading-state.tsx",lineNumber:49,columnNumber:7},void 0):d},mo=({variant:e="text",width:r,height:a,className:t,count:o,lines:i=1,animate:s=!0,borderRadius:l,theme:d,spacing:c,gap:u="md"})=>{const b={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},x={light:"bg-gray-200",dark:"bg-gray-700"},h={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},g=o??i,p=N=>{const j={};return r&&(j.width=typeof r=="number"?`${r}px`:r),a&&(j.height=typeof a=="number"?`${a}px`:a),l&&(j.borderRadius=l),n.jsxDEV("div",{className:f(s&&"animate-pulse",d?x[d]:"bg-gray-200 dark:bg-gray-700",b[e],t),style:j},N,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skeleton-loader.tsx",lineNumber:104,columnNumber:7},void 0)};if(g>1){const N=c!==void 0?`space-y-${c}`:h[u];return n.jsxDEV("div",{className:f(N),children:Array.from({length:g}).map((j,k)=>p(k))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skeleton-loader.tsx",lineNumber:124,columnNumber:7},void 0)}return p()},bo={info:A.InformationCircleIcon,success:A.CheckCircleIcon,warning:A.ExclamationTriangleIcon,attention:A.BellAlertIcon,error:A.XCircleIcon},fo=({children:e,className:r})=>n.jsxDEV("div",{className:f("font-medium mb-1",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:33,columnNumber:3},void 0),go=({children:e,className:r})=>n.jsxDEV("div",{className:f("text-sm break-words",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:40,columnNumber:3},void 0),br=({variant:e="info",title:r,description:a,icon:t,children:o,className:i})=>{const s=bo[e],l=t||n.jsxDEV(s,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:52,columnNumber:33},void 0),d=typeof O.alert[e]=="function"?O.alert[e]():"";return n.jsxDEV("div",{role:"alert",className:f(d,i),children:[l&&n.jsxDEV("div",{className:"flex-shrink-0",children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:60,columnNumber:25},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[r&&n.jsxDEV("div",{className:"font-medium mb-1 break-words",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:62,columnNumber:19},void 0),a&&n.jsxDEV("div",{className:"text-sm break-words",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:64,columnNumber:11},void 0),o]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:61,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/alert.tsx",lineNumber:59,columnNumber:5},void 0)},ho=({message:e,variant:r="info",dismissible:a=!1,onDismiss:t,className:o})=>{const i={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return n.jsxDEV("div",{className:f("p-4 border rounded-lg flex items-center justify-between",i[r],o),children:[n.jsxDEV("span",{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:37,columnNumber:7},void 0),a&&n.jsxDEV("button",{onClick:t,className:"ml-4 font-bold",children:"×"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/alert-banner.tsx",lineNumber:30,columnNumber:5},void 0)},un=y.createContext(void 0),po=()=>{const e=y.useContext(un);if(!e)throw new Error("useToast must be used within ToastProvider");return e},mn=({toast:e,onRemove:r})=>{const{id:a,title:t,description:o,variant:i="default",action:s}=e,l={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},d={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},c={default:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:75,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:74,columnNumber:7},void 0),success:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:84,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:83,columnNumber:7},void 0),error:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:93,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:92,columnNumber:7},void 0),warning:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:102,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:101,columnNumber:7},void 0),info:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:111,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:110,columnNumber:7},void 0)};return n.jsxDEV("div",{className:f("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",l[i]),children:[n.jsxDEV("div",{className:f("flex-shrink-0",d[i]),children:c[i]},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:129,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[t&&n.jsxDEV("p",{className:"font-semibold text-gray-900 dark:text-white",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:135,columnNumber:11},void 0),o&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:138,columnNumber:11},void 0),s&&n.jsxDEV("button",{onClick:s.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:s.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:143,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:133,columnNumber:7},void 0),n.jsxDEV("button",{onClick:()=>r(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:157,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:152,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:121,columnNumber:5},void 0)},xo=({toast:e,onRemove:r})=>(y.useEffect(()=>{const a=e.duration??5e3;if(a>0){const t=setTimeout(()=>{r(e.id)},a);return()=>clearTimeout(t)}},[e.id,e.duration,r]),n.jsxDEV(mn,{toast:e,onRemove:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:194,columnNumber:10},void 0)),No=({children:e})=>{const[r,a]=y.useState([]),t=y.useCallback(i=>{a(s=>s.filter(l=>l.id!==i))},[]),o=y.useCallback(i=>{const s=Math.random().toString(36).substr(2,9);a(l=>[...l,{...i,id:s}])},[]);return n.jsxDEV(un.Provider,{value:{toasts:r,addToast:o,removeToast:t},children:[e,n.jsxDEV("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:n.jsxDEV("div",{className:"pointer-events-auto",children:r.map(i=>n.jsxDEV("div",{className:"mb-2",children:n.jsxDEV(xo,{toast:i,onRemove:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:231,columnNumber:15},void 0)},i.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:230,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:228,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:227,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/toast.tsx",lineNumber:225,columnNumber:5},void 0)},yo=({message:e,variant:r="info",onClose:a,className:t})=>{const o={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return n.jsxDEV("div",{className:f("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",o[r],t),children:[n.jsxDEV("span",{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:32,columnNumber:7},void 0),a&&n.jsxDEV("button",{onClick:a,className:"ml-4",children:"×"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:34,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/toast-notification.tsx",lineNumber:25,columnNumber:5},void 0)},vo=({count:e,maxCount:r=99,variant:a="danger",className:t})=>{const o=e>r?`${r}+`:e,i={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return n.jsxDEV("span",{className:f("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",i[a],t),children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-badge.tsx",lineNumber:25,columnNumber:5},void 0)},_o=({notifications:e,onMarkAsRead:r,className:a})=>n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:e.map(t=>n.jsxDEV("div",{className:f("p-3 rounded mb-2",t.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>r?.(t.id),children:[n.jsxDEV("h4",{className:"font-semibold text-gray-900 dark:text-white",children:t.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:39,columnNumber:11},void 0),n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t.message},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:42,columnNumber:11},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:t.timestamp},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:45,columnNumber:11},void 0)]},t.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:31,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/notification-panel.tsx",lineNumber:24,columnNumber:5},void 0),ko=({children:e,variant:r="default",size:a="sm",icon:t,dot:o=!1,pill:i=!1,outline:s=!1,onClick:l,dismissible:d=!1,onDismiss:c,count:u,maxCount:b,className:x})=>{const h={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},g={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},p={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},N={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},j={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},k=u!==void 0?b!==void 0&&u>b?`${b}+`:u.toString():null,U=n.jsxDEV(n.Fragment,{children:[o&&n.jsxDEV("span",{className:f("h-2 w-2 rounded-full mr-1.5",j[r])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:142,columnNumber:9},void 0),t&&n.jsxDEV("span",{className:f(N[a],"mr-1"),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:150,columnNumber:9},void 0),e,k&&n.jsxDEV("span",{className:"ml-1",children:k},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:153,columnNumber:24},void 0),d&&c&&n.jsxDEV("button",{onClick:w=>{w.stopPropagation(),c()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:n.jsxDEV(me.XMarkIcon,{className:f(N[a])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:155,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:140,columnNumber:5},void 0),_=l?"button":"span";return n.jsxDEV(_,{onClick:l,className:f("inline-flex items-center font-medium",s?g[r]:h[r],p[a],i?"rounded-full":"rounded",l&&"cursor-pointer hover:opacity-80",x),children:U},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/badge.tsx",lineNumber:172,columnNumber:5},void 0)},wo=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UbadgeUdesigner",children:r||"UbadgeUdesigner Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/badge-designer.tsx",lineNumber:43,columnNumber:5},void 0);var ge={},he={},fr={},bn;function Eo(){return bn||(bn=1,Object.defineProperty(fr,"__esModule",{value:!0})),fr}var gr={},F={},fn;function Uo(){if(fn)return F;fn=1,Object.defineProperty(F,"__esModule",{value:!0}),F.isIndexerErrorResponse=e,F.isIndexerSuccessResponse=r,F.isAddressValidationResponse=a,F.isEmailAccountsResponse=t,F.isRewardsResponse=o,F.isDelegatedToResponse=i,F.isDelegatedFromResponse=s,F.isNonceResponse=l,F.isEntitlementResponse=d,F.isSignInMessageResponse=c,F.isPointsResponse=u,F.isLeaderboardResponse=b,F.isSiteStatsResponse=x,F.isTemplateResponse=h,F.isTemplateListResponse=g,F.isTemplateDeleteResponse=p,F.isWebhookResponse=N,F.isWebhookListResponse=j,F.isWebhookDeleteResponse=k,F.isReferralCodeResponse=U,F.isReferralStatsResponse=_,F.isAuthenticationStatusResponse=w,F.isBlockStatusResponse=S,F.isNameServiceResponse=E,F.isNameResolutionResponse=V;function e(v){return!!(v&&typeof v=="object"&&"error"in v&&"success"in v&&!v.success)}function r(v){return!!(v&&typeof v=="object"&&"success"in v&&v.success===!0&&"data"in v)}function a(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&("name"in v.data||"wallet"in v.data))}function t(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"accounts"in v.data&&Array.isArray(v.data.accounts))}function o(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"rewards"in v.data&&"records"in v.data&&"points"in v.data)}function i(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"chainType"in v.data)}function s(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"from"in v.data&&Array.isArray(v.data.from))}function l(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"nonce"in v.data)}function d(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"entitlement"in v.data&&"verified"in v.data)}function c(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"walletAddress"in v.data)}function u(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"pointsEarned"in v.data&&"walletAddress"in v.data)}function b(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"leaderboard"in v.data)}function x(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"totalPoints"in v.data)}function h(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"template"in v.data&&"verified"in v.data&&v.data.template&&typeof v.data.template=="object"&&"id"in v.data.template&&"name"in v.data.template&&"subject"in v.data.template&&"body"in v.data.template)}function g(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"templates"in v.data&&"total"in v.data&&"hasMore"in v.data&&"verified"in v.data&&Array.isArray(v.data.templates))}function p(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"verified"in v.data)}function N(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"webhook"in v.data&&"verified"in v.data&&v.data.webhook&&typeof v.data.webhook=="object"&&"id"in v.data.webhook&&"webhookUrl"in v.data.webhook)}function j(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"webhooks"in v.data&&"total"in v.data&&"hasMore"in v.data&&"verified"in v.data&&Array.isArray(v.data.webhooks))}function k(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"message"in v.data&&"verified"in v.data)}function U(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"referralCode"in v.data&&"createdAt"in v.data)}function _(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"total"in v.data&&"consumptions"in v.data&&Array.isArray(v.data.consumptions))}function w(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"authenticated"in v.data&&typeof v.data.authenticated=="boolean")}function S(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"chains"in v.data&&"totalChains"in v.data&&"activeChains"in v.data&&"timestamp"in v.data&&Array.isArray(v.data.chains))}function E(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"names"in v.data&&Array.isArray(v.data.names))}function V(v){return!!(v&&typeof v=="object"&&"success"in v&&"data"in v&&v.data&&typeof v.data=="object"&&"walletAddress"in v.data&&"chainType"in v.data)}return F}var gn;function jo(){return gn||(gn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIndexerSuccessResponse=e.isIndexerErrorResponse=e.isWebhookDeleteResponse=e.isWebhookListResponse=e.isWebhookResponse=e.isTemplateDeleteResponse=e.isTemplateListResponse=e.isTemplateResponse=e.isNameResolutionResponse=e.isNameServiceResponse=e.isBlockStatusResponse=e.isAuthenticationStatusResponse=e.isReferralStatsResponse=e.isReferralCodeResponse=e.isSiteStatsResponse=e.isLeaderboardResponse=e.isPointsResponse=e.isSignInMessageResponse=e.isEntitlementResponse=e.isNonceResponse=e.isDelegatedFromResponse=e.isDelegatedToResponse=e.isRewardsResponse=e.isEmailAccountsResponse=e.isAddressValidationResponse=void 0;var r=Uo();Object.defineProperty(e,"isAddressValidationResponse",{enumerable:!0,get:function(){return r.isAddressValidationResponse}}),Object.defineProperty(e,"isEmailAccountsResponse",{enumerable:!0,get:function(){return r.isEmailAccountsResponse}}),Object.defineProperty(e,"isRewardsResponse",{enumerable:!0,get:function(){return r.isRewardsResponse}}),Object.defineProperty(e,"isDelegatedToResponse",{enumerable:!0,get:function(){return r.isDelegatedToResponse}}),Object.defineProperty(e,"isDelegatedFromResponse",{enumerable:!0,get:function(){return r.isDelegatedFromResponse}}),Object.defineProperty(e,"isNonceResponse",{enumerable:!0,get:function(){return r.isNonceResponse}}),Object.defineProperty(e,"isEntitlementResponse",{enumerable:!0,get:function(){return r.isEntitlementResponse}}),Object.defineProperty(e,"isSignInMessageResponse",{enumerable:!0,get:function(){return r.isSignInMessageResponse}}),Object.defineProperty(e,"isPointsResponse",{enumerable:!0,get:function(){return r.isPointsResponse}}),Object.defineProperty(e,"isLeaderboardResponse",{enumerable:!0,get:function(){return r.isLeaderboardResponse}}),Object.defineProperty(e,"isSiteStatsResponse",{enumerable:!0,get:function(){return r.isSiteStatsResponse}}),Object.defineProperty(e,"isReferralCodeResponse",{enumerable:!0,get:function(){return r.isReferralCodeResponse}}),Object.defineProperty(e,"isReferralStatsResponse",{enumerable:!0,get:function(){return r.isReferralStatsResponse}}),Object.defineProperty(e,"isAuthenticationStatusResponse",{enumerable:!0,get:function(){return r.isAuthenticationStatusResponse}}),Object.defineProperty(e,"isBlockStatusResponse",{enumerable:!0,get:function(){return r.isBlockStatusResponse}}),Object.defineProperty(e,"isNameServiceResponse",{enumerable:!0,get:function(){return r.isNameServiceResponse}}),Object.defineProperty(e,"isNameResolutionResponse",{enumerable:!0,get:function(){return r.isNameResolutionResponse}}),Object.defineProperty(e,"isTemplateResponse",{enumerable:!0,get:function(){return r.isTemplateResponse}}),Object.defineProperty(e,"isTemplateListResponse",{enumerable:!0,get:function(){return r.isTemplateListResponse}}),Object.defineProperty(e,"isTemplateDeleteResponse",{enumerable:!0,get:function(){return r.isTemplateDeleteResponse}}),Object.defineProperty(e,"isWebhookResponse",{enumerable:!0,get:function(){return r.isWebhookResponse}}),Object.defineProperty(e,"isWebhookListResponse",{enumerable:!0,get:function(){return r.isWebhookListResponse}}),Object.defineProperty(e,"isWebhookDeleteResponse",{enumerable:!0,get:function(){return r.isWebhookDeleteResponse}}),Object.defineProperty(e,"isIndexerErrorResponse",{enumerable:!0,get:function(){return r.isIndexerErrorResponse}}),Object.defineProperty(e,"isIndexerSuccessResponse",{enumerable:!0,get:function(){return r.isIndexerSuccessResponse}})})(gr)),gr}var hr={},P={},re={},hn;function pn(){if(hn)return re;hn=1,Object.defineProperty(re,"__esModule",{value:!0}),re.isWildduckMessage=re.isWildduckAuthResponse=re.MailboxSpecialUse=void 0,re.createPreAuthRequest=e,re.createAuthenticateRequest=r;function e(i,s){return{username:i,scope:"master",...s}}function r(i,s,l,d){return{username:i,...s&&{signature:s},...l&&{message:l},protocol:"API",scope:"master",token:!1,...d}}var a;(function(i){i.Inbox="\\Inbox",i.Sent="\\Sent",i.Trash="\\Trash",i.Drafts="\\Drafts",i.Junk="\\Junk",i.Settings="\\App.Settings",i.Developer="\\App.Developer"})(a||(re.MailboxSpecialUse=a={}));const t=i=>typeof i=="object"&&i!==null&&"success"in i&&typeof i.success=="boolean";re.isWildduckAuthResponse=t;const o=i=>typeof i=="object"&&i!==null&&"id"in i&&"subject"in i&&typeof i.id=="number"&&typeof i.subject=="string";return re.isWildduckMessage=o,re}var xn;function pe(){if(xn)return P;xn=1,Object.defineProperty(P,"__esModule",{value:!0}),P.Currency=P.ErrorType=P.FeatureFlag=P.EmailValidationState=P.PlatformType=P.ConnectionState=P.ConnectionType=P.EmailSortCriteria=P.SortOrder=P.EmailAddressType=P.NotificationType=P.RequestStatus=P.SubscriptionAction=P.EmailAction=P.MediumView=P.MobileView=P.EmailComposeType=P.EmailFolderUtils=P.FontSize=P.Theme=P.Chain=P.ChainType=P.AuthStatus=void 0;const e=pn();var r;(function(E){E.CONNECTED="connected",E.DISCONNECTED="disconnected",E.VERIFIED="verified"})(r||(P.AuthStatus=r={}));var a;(function(E){E.EVM="evm",E.SOLANA="solana"})(a||(P.ChainType=a={}));var t;(function(E){E.ETH_MAINNET="eth-mainnet",E.ETH_SEPOLIA="eth-sepolia",E.ETH_GOERLI="eth-goerli",E.POLYGON_MAINNET="polygon-mainnet",E.POLYGON_MUMBAI="polygon-mumbai",E.POLYGON_AMOY="polygon-amoy",E.OPTIMISM_MAINNET="optimism-mainnet",E.OPTIMISM_SEPOLIA="optimism-sepolia",E.OPTIMISM_GOERLI="optimism-goerli",E.ARBITRUM_MAINNET="arbitrum-mainnet",E.ARBITRUM_SEPOLIA="arbitrum-sepolia",E.ARBITRUM_GOERLI="arbitrum-goerli",E.BASE_MAINNET="base-mainnet",E.BASE_SEPOLIA="base-sepolia",E.BASE_GOERLI="base-goerli",E.AVALANCHE_MAINNET="avalanche-mainnet",E.AVALANCHE_FUJI="avalanche-fuji",E.BNB_MAINNET="bnb-mainnet",E.BNB_TESTNET="bnb-testnet",E.GNOSIS_MAINNET="gnosis-mainnet",E.GNOSIS_CHIADO="gnosis-chiado",E.CELO_MAINNET="celo-mainnet",E.CELO_ALFAJORES="celo-alfajores",E.ZKSYNC_MAINNET="zksync-mainnet",E.ZKSYNC_SEPOLIA="zksync-sepolia",E.LINEA_MAINNET="linea-mainnet",E.LINEA_SEPOLIA="linea-sepolia",E.SCROLL_MAINNET="scroll-mainnet",E.SCROLL_SEPOLIA="scroll-sepolia",E.MONAD_MAINNET="monad-mainnet",E.MONAD_TESTNET="monad-testnet",E.STORY_MAINNET="story-mainnet",E.STORY_TESTNET="story-testnet",E.PLUME_MAINNET="plume-mainnet",E.PLUME_TESTNET="plume-testnet",E.NEXUS_MAINNET="nexus-mainnet",E.NEXUS_TESTNET="nexus-testnet",E.HYPEREVM_MAINNET="hyperevm-mainnet",E.HYPEREVM_TESTNET="hyperevm-testnet",E.SONIC_MAINNET="sonic-mainnet",E.SONIC_TESTNET="sonic-testnet",E.SONIC_BLAZE="sonic-blaze",E.UNICHAIN_MAINNET="unichain-mainnet",E.UNICHAIN_SEPOLIA="unichain-sepolia",E.WORLD_MAINNET="world-mainnet",E.XDC_MAINNET="xdc-mainnet",E.INK_TESTNET="ink-testnet",E.FETCH_MAINNET="fetch-mainnet",E.FETCH_TESTNET="fetch-testnet",E.GENSYN_MAINNET="gensyn-mainnet",E.GENSYN_TESTNET="gensyn-testnet",E.RITUAL_MAINNET="ritual-mainnet",E.RITUAL_TESTNET="ritual-testnet",E.SOLANA_MAINNET="solana-mainnet",E.SOLANA_DEVNET="solana-devnet",E.SOLANA_TESTNET="solana-testnet",E.EVM_LOCAL="evm-local",E.SOLANA_LOCAL="solana-local"})(t||(P.Chain=t={}));var o;(function(E){E.LIGHT="light",E.DARK="dark",E.SYSTEM="system"})(o||(P.Theme=o={}));var i;(function(E){E.SMALL="small",E.MEDIUM="medium",E.LARGE="large"})(i||(P.FontSize=i={})),P.EmailFolderUtils={isStandardFolder(E){return Object.values(e.MailboxSpecialUse).includes(E)},getStandardFolders(){return Object.values(e.MailboxSpecialUse)},isCustomFolder(E){return!this.isStandardFolder(E)},displayName(E){return E.charAt(0).toUpperCase()+E.slice(1)}};var s;(function(E){E.NEW="new",E.REPLY="reply",E.REPLY_ALL="replyAll",E.FORWARD="forward"})(s||(P.EmailComposeType=s={}));var l;(function(E){E.EMAIL_ADDRESSES="emailAddresses",E.FOLDERS="folders",E.EMAILS="emails",E.EMAIL_BODY="emailBody"})(l||(P.MobileView=l={}));var d;(function(E){E.LEFT="left",E.RIGHT="right"})(d||(P.MediumView=d={}));var c;(function(E){E.OPEN="open",E.REPLY="reply",E.FORWARD="forward",E.DELETE="delete",E.STAR="star",E.UNSTAR="unstar",E.MARK_READ="mark_read",E.MARK_UNREAD="mark_unread"})(c||(P.EmailAction=c={}));var u;(function(E){E.VIEW="view",E.PURCHASE="purchase",E.CANCEL="cancel",E.RESTORE="restore"})(u||(P.SubscriptionAction=u={}));var b;(function(E){E.IDLE="idle",E.LOADING="loading",E.SUCCESS="success",E.ERROR="error"})(b||(P.RequestStatus=b={}));var x;(function(E){E.INFO="info",E.SUCCESS="success",E.WARNING="warning",E.ERROR="error"})(x||(P.NotificationType=x={}));var h;(function(E){E.DIRECT="direct",E.ENS="ens",E.SNS="sns",E.CUSTOM="custom"})(h||(P.EmailAddressType=h={}));var g;(function(E){E.ASC="asc",E.DESC="desc"})(g||(P.SortOrder=g={}));var p;(function(E){E.DATE="date",E.SUBJECT="subject",E.FROM="from",E.SIZE="size"})(p||(P.EmailSortCriteria=p={}));var N;(function(E){E.UNKNOWN="unknown",E.NONE="none",E.WIFI="wifi",E.CELLULAR_2G="2g",E.CELLULAR_3G="3g",E.CELLULAR_4G="4g",E.CELLULAR_5G="5g",E.ETHERNET="ethernet"})(N||(P.ConnectionType=N={}));var j;(function(E){E.UNKNOWN="unknown",E.DISCONNECTED="disconnected",E.CONNECTING="connecting",E.CONNECTED="connected",E.RECONNECTING="reconnecting",E.VERIFIED="verified",E.LIMITED="limited",E.ERROR="error"})(j||(P.ConnectionState=j={}));var k;(function(E){E.WEB="web",E.REACT_NATIVE="react_native",E.DESKTOP="desktop"})(k||(P.PlatformType=k={}));var U;(function(E){E.VALID="valid",E.INVALID="invalid",E.PENDING="pending",E.UNKNOWN="unknown"})(U||(P.EmailValidationState=U={}));var _;(function(E){E.AI_SEARCH="ai_search",E.SMART_COMPOSE="smart_compose",E.ADVANCED_FILTERS="advanced_filters",E.DARK_MODE="dark_mode",E.NOTIFICATIONS="notifications",E.ANALYTICS="analytics"})(_||(P.FeatureFlag=_={}));var w;(function(E){E.NETWORK="network",E.AUTH="auth",E.VALIDATION="validation",E.PERMISSION="permission",E.UNKNOWN="unknown"})(w||(P.ErrorType=w={}));var S;return(function(E){E.USD="USD",E.EUR="EUR",E.GBP="GBP",E.CAD="CAD",E.AUD="AUD"})(S||(P.Currency=S={})),P}var pr={},Nn;function Co(){return Nn||(Nn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletConnectionState=e.isWalletVerified=e.isWalletConnected=void 0;const r=pe(),a=i=>i!=null&&!!i.walletAddress;e.isWalletConnected=a;const t=i=>(0,e.isWalletConnected)(i)&&!!i.message&&!!i.signature;e.isWalletVerified=t;const o=i=>(0,e.isWalletConnected)(i)?(0,e.isWalletVerified)(i)?r.ConnectionState.VERIFIED:r.ConnectionState.CONNECTED:r.ConnectionState.DISCONNECTED;e.getWalletConnectionState=o})(pr)),pr}var yn;function So(){return yn||(yn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isWalletVerified=e.isWalletConnected=e.getWalletConnectionState=e.Theme=e.SubscriptionAction=e.SortOrder=e.RequestStatus=e.PlatformType=e.NotificationType=e.MobileView=e.MediumView=e.FontSize=e.FeatureFlag=e.ErrorType=e.EmailValidationState=e.EmailSortCriteria=e.EmailFolderUtils=e.EmailComposeType=e.EmailAddressType=e.EmailAction=e.Currency=e.ConnectionType=e.ConnectionState=e.ChainType=e.Chain=e.AuthStatus=void 0;var r=pe();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return r.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return r.Chain}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}}),Object.defineProperty(e,"ConnectionState",{enumerable:!0,get:function(){return r.ConnectionState}}),Object.defineProperty(e,"ConnectionType",{enumerable:!0,get:function(){return r.ConnectionType}}),Object.defineProperty(e,"Currency",{enumerable:!0,get:function(){return r.Currency}}),Object.defineProperty(e,"EmailAction",{enumerable:!0,get:function(){return r.EmailAction}}),Object.defineProperty(e,"EmailAddressType",{enumerable:!0,get:function(){return r.EmailAddressType}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return r.EmailComposeType}}),Object.defineProperty(e,"EmailFolderUtils",{enumerable:!0,get:function(){return r.EmailFolderUtils}}),Object.defineProperty(e,"EmailSortCriteria",{enumerable:!0,get:function(){return r.EmailSortCriteria}}),Object.defineProperty(e,"EmailValidationState",{enumerable:!0,get:function(){return r.EmailValidationState}}),Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"FeatureFlag",{enumerable:!0,get:function(){return r.FeatureFlag}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return r.FontSize}}),Object.defineProperty(e,"MediumView",{enumerable:!0,get:function(){return r.MediumView}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return r.MobileView}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return r.PlatformType}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return r.RequestStatus}}),Object.defineProperty(e,"SortOrder",{enumerable:!0,get:function(){return r.SortOrder}}),Object.defineProperty(e,"SubscriptionAction",{enumerable:!0,get:function(){return r.SubscriptionAction}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return r.Theme}});var a=Co();Object.defineProperty(e,"getWalletConnectionState",{enumerable:!0,get:function(){return a.getWalletConnectionState}}),Object.defineProperty(e,"isWalletConnected",{enumerable:!0,get:function(){return a.isWalletConnected}}),Object.defineProperty(e,"isWalletVerified",{enumerable:!0,get:function(){return a.isWalletVerified}})})(hr)),hr}var xr={},X={},vn;function Nr(){if(vn)return X;vn=1,Object.defineProperty(X,"__esModule",{value:!0}),X.PROTOCOL_CONSTANTS=X.TransactionStatus=X.MessageType=void 0,X.isSolanaAddress=a,X.isEvmAddress=t,X.isSolanaRecipient=o,X.isEvmRecipient=i;var e;(function(s){s.STANDARD="standard",s.PRIORITY="priority",s.PREPARED_STANDARD="prepared_standard",s.PREPARED_PRIORITY="prepared_priority"})(e||(X.MessageType=e={}));var r;(function(s){s.SUCCESS="success",s.FAILED="failed",s.PENDING="pending"})(r||(X.TransactionStatus=r={}));function a(s){try{if(s.length<32||s.length>44||!/^[1-9A-HJ-NP-Za-km-z]+$/.test(s))return!1;try{return require("bs58").decode(s).length===32}catch{return!0}}catch{return!1}}function t(s){return/^0x[a-fA-F0-9]{40}$/.test(s)}function o(s){return a(s)}function i(s){return t(s)}return X.PROTOCOL_CONSTANTS={SEND_FEE:100000n,CLAIM_PERIOD:1440*60*60,REVENUE_SHARES:{SENDER:90,OWNER:10},USDC_DECIMALS:6,MAX_LENGTHS:{SUBJECT:200,BODY:2e3,MAIL_ID:100}},X}var xe={},J={},_n;function kn(){if(_n)return J;_n=1,Object.defineProperty(J,"__esModule",{value:!0}),J.AddressType=void 0,J.isENSName=t,J.isSNSName=o,J.getAddressType=i,J.isValidWalletAddress=s,J.isValidSignature=l,J.parseEmailAddress=d,J.formatWalletAddress=c,J.getChainDisplayName=u;const e=pe(),r=Nr();var a;(function(b){b.EVMAddress="EVMAddress",b.SolanaAddress="SolanaAddress",b.ENSName="ENSName",b.SNSName="SNSName"})(a||(J.AddressType=a={}));function t(b){const x=b.toLowerCase();if(!x.endsWith(".eth")&&!x.endsWith(".box"))return!1;const h=(x.endsWith(".eth"),x.slice(0,-4));if(h.length===0)return!1;const g=h.split("."),p=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const N of g)if(N.length===0||!p.test(N)||N.includes("--"))return!1;return!0}function o(b){const x=b.toLowerCase(),g=[".sol",".abc",".bonk",".poor",".gm",".dao",".defi",".web3"].find(k=>x.endsWith(k));if(!g)return!1;const p=x.slice(0,-g.length);if(p.length===0)return!1;const N=p.split("."),j=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const k of N)if(k.length===0||!j.test(k)||k.includes("--"))return!1;return!0}function i(b,x=void 0){if((0,r.isEvmAddress)(b))return a.EVMAddress;if((0,r.isSolanaAddress)(b))return a.SolanaAddress;if(x&&b.includes(".")){if(x===a.EVMAddress)return a.ENSName;if(x===a.SolanaAddress)return a.SNSName}}function s(b,x){if(!b||typeof b!="string")return!1;const h=i(b);switch(x){case e.ChainType.EVM:return h===a.EVMAddress||h===a.ENSName;case e.ChainType.SOLANA:return h===a.SolanaAddress||h===a.SNSName;default:return!!h}}function l(b,x){if(!b||typeof b!="string")return!1;switch(x){case e.ChainType.EVM:return/^0x[a-fA-F0-9]{130}$/.test(b);case e.ChainType.SOLANA:return/^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(b);default:return b.length>50}}function d(b){if(!b||typeof b!="string")return;const x=b.split("@");if(x.length!==2)return;const[h,g]=x;if(!h||!g)return;const p=i(h);return{address:h,domain:g,type:p}}function c(b){if(!b||b.length<10)return b;const x=i(b);return(x===a.ENSName||x===a.SNSName)&&b.length<=20?b:`${b.slice(0,6)}...${b.slice(-4)}`}function u(b){if(!b)return"Unknown Chain";switch(b){case e.ChainType.EVM:return"EVM Chain";case e.ChainType.SOLANA:return"Solana";default:return"Blockchain"}}return J}var wn;function Vo(){if(wn)return xe;wn=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.validateDomain=r,xe.validateMessage=a,xe.validateAddress=t,xe.validateAmount=o;const e=kn();function r(i){if(!i||i.length===0)throw new Error("Domain cannot be empty");if(i.length>100)throw new Error("Domain cannot exceed 100 characters");if(!/^[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])?)*$/.test(i))throw new Error("Invalid domain format");return!0}function a(i,s){if(!i||i.length===0)throw new Error("Message subject cannot be empty");if(i.length>200)throw new Error("Message subject cannot exceed 200 characters");if(!s||s.length===0)throw new Error("Message body cannot be empty");if(s.length>1e4)throw new Error("Message body cannot exceed 10000 characters");return!0}function t(i,s){if(!i||i.length===0)throw new Error("Address cannot be empty");if(!(0,e.isValidWalletAddress)(i,s))throw new Error(`Invalid ${s} address format`);return!0}function o(i){if(i==null||i===""||typeof i=="string"&&i.trim()==="")throw new Error("Invalid amount format");let s;try{if(typeof i=="string"){if(!/^-?\d+$/.test(i.trim()))throw new Error("Invalid amount format");s=BigInt(i)}else if(typeof i=="number"){if(!Number.isFinite(i))throw new Error("Invalid amount format");s=BigInt(Math.floor(i))}else if(typeof i=="bigint")s=i;else throw new Error("Invalid amount format")}catch{throw new Error("Invalid amount format")}if(s<0n)throw new Error("Amount cannot be negative");return s}return xe}var En;function Ao(){return En||(En=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateMessage=e.validateDomain=e.validateAmount=e.validateAddress=e.isSolanaRecipient=e.isSolanaAddress=e.isEvmRecipient=e.isEvmAddress=e.TransactionStatus=e.PROTOCOL_CONSTANTS=e.MessageType=void 0;var r=Nr();Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return r.MessageType}}),Object.defineProperty(e,"PROTOCOL_CONSTANTS",{enumerable:!0,get:function(){return r.PROTOCOL_CONSTANTS}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return r.isEvmAddress}}),Object.defineProperty(e,"isEvmRecipient",{enumerable:!0,get:function(){return r.isEvmRecipient}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return r.isSolanaAddress}}),Object.defineProperty(e,"isSolanaRecipient",{enumerable:!0,get:function(){return r.isSolanaRecipient}});var a=Vo();Object.defineProperty(e,"validateAddress",{enumerable:!0,get:function(){return a.validateAddress}}),Object.defineProperty(e,"validateAmount",{enumerable:!0,get:function(){return a.validateAmount}}),Object.defineProperty(e,"validateDomain",{enumerable:!0,get:function(){return a.validateDomain}}),Object.defineProperty(e,"validateMessage",{enumerable:!0,get:function(){return a.validateMessage}})})(xr)),xr}var yr={},Pe={},Un;function To(){if(Un)return Pe;Un=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.StorageType=void 0;var e;return(function(r){r.LOCAL_STORAGE="localStorage",r.SESSION_STORAGE="sessionStorage",r.ASYNC_STORAGE="asyncStorage",r.MEMORY="memory"})(e||(Pe.StorageType=e={})),Pe}var jn;function Lo(){return jn||(jn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0;var r=To();Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return r.StorageType}})})(yr)),yr}var vr={},Ne={},Cn;function Io(){if(Cn)return Ne;Cn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.AnalyticsEventBuilder=Ne.AnalyticsEvent=void 0;var e;(function(a){a.USER_LOGIN="user_login",a.USER_LOGOUT="user_logout",a.USER_SIGNUP="user_signup",a.EMAIL_SENT="email_sent",a.EMAIL_RECEIVED="email_received",a.EMAIL_OPENED="email_opened",a.EMAIL_REPLY="email_reply",a.EMAIL_FORWARD="email_forward",a.EMAIL_DELETE="email_delete",a.EMAIL_STAR="email_star",a.EMAIL_COMPOSE="email_compose",a.EMAIL_CLICKED="email_clicked",a.PAGE_VIEW="page_view",a.SCREEN_VIEW="screen_view",a.FOLDER_SWITCH="folder_switch",a.SUBSCRIPTION_VIEW="subscription_view",a.SUBSCRIPTION_PURCHASE="subscription_purchase",a.SUBSCRIPTION_CANCEL="subscription_cancel",a.SEARCH_PERFORMED="search_performed",a.SETTINGS_CHANGED="settings_changed",a.ERROR_OCCURRED="error_occurred",a.AB_TEST_VIEWED="ab_test_viewed",a.AB_TEST_CONVERTED="ab_test_converted",a.CUSTOM_EVENT="custom_event"})(e||(Ne.AnalyticsEvent=e={}));class r{static emailAction(t,o,i){return{action:t,email_id:o,folder:i,timestamp:Date.now()}}static pageView(t,o){return{page_name:t,page_path:o,timestamp:Date.now()}}static error(t,o,i){return{error_type:t,error_message:o,page_name:i,timestamp:Date.now()}}static subscription(t,o,i,s){return{action:t,plan_type:o,amount:i,currency:s,timestamp:Date.now()}}static engagement(t,o,i){return{feature:t,interaction:o,duration:i,timestamp:Date.now()}}static performance(t,o,i){return{metric:t,value:o,context:i,timestamp:Date.now()}}}return Ne.AnalyticsEventBuilder=r,Ne}var _r={},Sn;function Mo(){return Sn||(Sn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.ChainType=void 0;var r=pe();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}});var a;(function(o){o.Mailer="Mailer",o.MailService="MailService"})(a||(e.ContractType=a={}));var t;(function(o){o.MailSent="MailSent",o.PreparedMailSent="PreparedMailSent",o.DelegationSet="DelegationSet",o.DelegationCleared="DelegationCleared",o.DomainRegistered="DomainRegistered",o.DomainExtended="DomainExtended",o.DomainReleased="DomainReleased",o.FeeUpdated="FeeUpdated",o.SharesRecorded="SharesRecorded",o.RecipientClaimed="RecipientClaimed",o.OwnerClaimed="OwnerClaimed",o.ExpiredSharesClaimed="ExpiredSharesClaimed"})(t||(e.ProcessedEventName=t={}))})(_r)),_r}var Oe={},Vn;function Po(){if(Vn)return Oe;Vn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.NetworkError=void 0;class e extends Error{constructor(a,t,o,i){super(a),this.name="NetworkError",this.status=t,this.statusText=o,this.response=i}}return Oe.NetworkError=e,Oe}var De={},An;function Oo(){if(An)return De;An=1,Object.defineProperty(De,"__esModule",{value:!0}),De.WalletType=void 0;var e;return(function(r){r.METAMASK="metamask",r.PHANTOM="phantom",r.COINBASE="coinbase",r.WALLETCONNECT="walletconnect",r.INJECTED="injected"})(e||(De.WalletType=e={})),De}var Tn;function Do(){return Tn||(Tn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletType=e.NetworkError=e.ProcessedEventName=e.ContractType=e.ChainType=e.AnalyticsEventBuilder=e.AnalyticsEvent=void 0;var r=Io();Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return r.AnalyticsEvent}}),Object.defineProperty(e,"AnalyticsEventBuilder",{enumerable:!0,get:function(){return r.AnalyticsEventBuilder}});var a=Mo();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return a.ChainType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return a.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return a.ProcessedEventName}});var t=Po();Object.defineProperty(e,"NetworkError",{enumerable:!0,get:function(){return t.NetworkError}});var o=Oo();Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}})})(vr)),vr}var ye={},R={},Ln;function zo(){if(Ln)return R;Ln=1,Object.defineProperty(R,"__esModule",{value:!0}),R.FeeType=R.ClaimType=R.ConfirmationStatus=void 0,R.isEVMResponse=o,R.isSolanaResponse=i,R.isMailboxErrorResponse=s;const e=pe();var r;(function(l){l.Processed="processed",l.Confirmed="confirmed",l.Finalized="finalized"})(r||(R.ConfirmationStatus=r={}));var a;(function(l){l.Recipient="recipient",l.Owner="owner",l.Expired="expired"})(a||(R.ClaimType=a={}));var t;(function(l){l.Send="send",l.Delegation="delegation",l.Registration="registration"})(t||(R.FeeType=t={}));function o(l){return l.chainType===e.ChainType.EVM}function i(l){return l.chainType===e.ChainType.SOLANA}function s(l){return!l.success&&l.error!==void 0}return R}var In;function Bo(){return In||(In=1,(function(e){var r=ye&&ye.__createBinding||(Object.create?(function(t,o,i,s){s===void 0&&(s=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(t,s,l)}):(function(t,o,i,s){s===void 0&&(s=i),t[s]=o[i]})),a=ye&&ye.__exportStar||function(t,o){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(zo(),e)})(ye)),ye}var ve={},Q={},Mn;function Wo(){if(Mn)return Q;Mn=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.ReviewRejectType=Q.ApplicantType=Q.SumsubReviewAnswer=Q.SumsubReviewStatus=Q.KYCApplicationStatus=Q.KYCVerificationLevel=void 0;var e;(function(s){s.Basic="basic",s.Enhanced="enhanced",s.Accredited="accredited"})(e||(Q.KYCVerificationLevel=e={}));var r;(function(s){s.Pending="PENDING",s.Initiated="INITIATED",s.InProgress="IN_PROGRESS",s.Submitted="SUBMITTED",s.Completed="COMPLETED",s.Rejected="REJECTED"})(r||(Q.KYCApplicationStatus=r={}));var a;(function(s){s.Init="init",s.Pending="pending",s.Prechecked="prechecked",s.Completed="completed"})(a||(Q.SumsubReviewStatus=a={}));var t;(function(s){s.Green="GREEN",s.Red="RED",s.Yellow="YELLOW"})(t||(Q.SumsubReviewAnswer=t={}));var o;(function(s){s.Individual="individual",s.Company="company"})(o||(Q.ApplicantType=o={}));var i;return(function(s){s.Final="FINAL",s.Retry="RETRY",s.External="EXTERNAL"})(i||(Q.ReviewRejectType=i={})),Q}var Pn;function Fo(){return Pn||(Pn=1,(function(e){var r=ve&&ve.__createBinding||(Object.create?(function(t,o,i,s){s===void 0&&(s=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(t,s,l)}):(function(t,o,i,s){s===void 0&&(s=i),t[s]=o[i]})),a=ve&&ve.__exportStar||function(t,o){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(Wo(),e)})(ve)),ve}var _e={},$={},On;function qo(){if(On)return $;On=1,Object.defineProperty($,"__esModule",{value:!0}),$.isWildduckWebSocketErrorResponse=$.isWildduckDisconnectMessage=$.isWildduckUpdateMessage=$.isWildduckDataMessage=$.isWildduckFetchRequest=$.isWildduckUnsubscribeRequest=$.isWildduckSubscribeRequest=void 0,$.createWildduckSubscribeRequest=l,$.createWildduckUnsubscribeRequest=d,$.createWildduckFetchMessagesRequest=c;const e=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="subscribe"&&"channel"in u&&"data"in u;$.isWildduckSubscribeRequest=e;const r=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="unsubscribe"&&"channel"in u;$.isWildduckUnsubscribeRequest=r;const a=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="fetch"&&"channel"in u&&u.channel==="messages";$.isWildduckFetchRequest=a;const t=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="data"&&"channel"in u&&"data"in u;$.isWildduckDataMessage=t;const o=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="update"&&"channel"in u&&"data"in u;$.isWildduckUpdateMessage=o;const i=u=>typeof u=="object"&&u!==null&&"type"in u&&u.type==="disconnect"&&"channel"in u&&u.channel==="system";$.isWildduckDisconnectMessage=i;const s=u=>typeof u=="object"&&u!==null&&"success"in u&&u.success===!1&&"error"in u&&"message"in u;$.isWildduckWebSocketErrorResponse=s;function l(u,b){return{type:"subscribe",channel:u,data:b}}function d(u){return{type:"unsubscribe",channel:u,data:{}}}function c(u,b){return{type:"fetch",channel:"messages",data:{mailboxId:u,...b&&{cursor:b}}}}return $}var Dn;function $o(){return Dn||(Dn=1,(function(e){var r=_e&&_e.__createBinding||(Object.create?(function(t,o,i,s){s===void 0&&(s=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(t,s,l)}):(function(t,o,i,s){s===void 0&&(s=i),t[s]=o[i]})),a=_e&&_e.__exportStar||function(t,o){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(pn(),e),a(qo(),e)})(_e)),_e}var zn;function Bn(){return zn||(zn=1,(function(e){var r=he&&he.__createBinding||(Object.create?(function(t,o,i,s){s===void 0&&(s=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(t,s,l)}):(function(t,o,i,s){s===void 0&&(s=i),t[s]=o[i]})),a=he&&he.__exportStar||function(t,o){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(Eo(),e),a(jo(),e),a(So(),e),a(Ao(),e),a(Lo(),e),a(Do(),e),a(Bo(),e),a(Fo(),e),a($o(),e)})(he)),he}var ke={},kr={},ze={},Wn;function Ho(){if(Wn)return ze;Wn=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.Web3UsernameValidator=void 0;const e=pe();class r{static validate(t){if(t){if(this.EVM_REGEX.test(t))return{name:null,address:t.toLowerCase(),chainType:e.ChainType.EVM};if(!t.startsWith("0x")&&t.length>=32&&t.length<=44&&this.BASE58_REGEX.test(t))return{name:null,address:t,chainType:e.ChainType.SOLANA};if((t.toLowerCase().endsWith(".eth")||t.toLowerCase().endsWith(".box"))&&t.length>=5&&this.ENS_REGEX.test(t))return{name:t.toLowerCase(),address:null,chainType:e.ChainType.EVM};if(t.toLowerCase().includes(".")){const o=t.toLowerCase().split(".");if(o.length===2){const[i,s]=o;if(this.VALID_SNS_TLDS.includes(s)&&this.SNS_NAME_REGEX.test(i)&&i.length>=1)return{name:t.toLowerCase(),address:null,chainType:e.ChainType.SOLANA}}}}}static isValidEVMAddress(t){return this.EVM_REGEX.test(t)}static isValidSolanaAddress(t){return!t.startsWith("0x")&&t.length>=32&&t.length<=44&&this.BASE58_REGEX.test(t)}static isValidENSName(t){return(t.toLowerCase().endsWith(".eth")||t.toLowerCase().endsWith(".box"))&&t.length>=5&&this.ENS_REGEX.test(t)}static isValidSNSName(t){if(!t.toLowerCase().includes("."))return!1;const o=t.toLowerCase().split(".");if(o.length!==2)return!1;const[i,s]=o;return this.VALID_SNS_TLDS.includes(s)&&this.SNS_NAME_REGEX.test(i)&&i.length>=1}}return ze.Web3UsernameValidator=r,r.EVM_REGEX=/^0x[a-fA-F0-9]{40}$/,r.BASE58_REGEX=/^[1-9A-HJ-NP-Za-km-z]+$/,r.ENS_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\.(eth|box)$/i,r.SNS_NAME_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/,r.VALID_SNS_TLDS=["sol","abc","backpack","bonk","coin","dao","defi","gm","poor","pump","shdw","stepn","web3"],ze}var wr={},Fn;function Go(){return Fn||(Fn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseJson=e.createAssertion=e.isUrl=e.isEmail=e.isValidDate=e.isErrorResponse=e.isSuccessResponse=e.isApiResponse=e.optional=e.validateArray=e.hasRequiredProperties=e.isNullish=e.isArray=e.isObject=e.isBoolean=e.isNumber=e.isString=e.createValidator=void 0;const r=(U,_)=>w=>{try{return U(w)?{isValid:!0,data:w}:{isValid:!1,error:`Invalid ${_}`,data:null}}catch(S){return{isValid:!1,error:`Validation error for ${_}: ${S instanceof Error?S.message:"Unknown error"}`,data:null}}};e.createValidator=r;const a=U=>typeof U=="string";e.isString=a;const t=U=>typeof U=="number"&&!isNaN(U);e.isNumber=t;const o=U=>typeof U=="boolean";e.isBoolean=o;const i=U=>typeof U=="object"&&U!==null&&!Array.isArray(U);e.isObject=i;const s=U=>Array.isArray(U);e.isArray=s;const l=U=>U==null;e.isNullish=l;const d=(U,_)=>(0,e.isObject)(U)?_.every(w=>w in U):!1;e.hasRequiredProperties=d;const c=(U,_)=>(0,e.isArray)(U)?U.every(_):!1;e.validateArray=c;const u=U=>_=>_===void 0||U(_);e.optional=u;const b=U=>(0,e.isObject)(U)&&(0,e.isBoolean)(U.success);e.isApiResponse=b;const x=(U,_)=>!(0,e.isApiResponse)(U)||!U.success?!1:_&&"data"in U?_(U.data):!0;e.isSuccessResponse=x;const h=U=>(0,e.isApiResponse)(U)&&!U.success&&"error"in U&&(0,e.isString)(U.error);e.isErrorResponse=h;const g=U=>{if(!(0,e.isString)(U))return!1;const _=new Date(U);return!isNaN(_.getTime())};e.isValidDate=g;const p=U=>(0,e.isString)(U)?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(U):!1;e.isEmail=p;const N=U=>{if(!(0,e.isString)(U))return!1;try{return new URL(U),!0}catch{return!1}};e.isUrl=N;const j=(U,_)=>(w,S=_)=>{if(!U(w))throw new TypeError(`Invalid ${S}: expected ${_}`)};e.createAssertion=j;const k=(U,_)=>{try{const w=JSON.parse(U);return _?_(w)?{isValid:!0,data:w}:{isValid:!1,error:"Parsed JSON does not match expected type",data:null}:{isValid:!0,data:w}}catch(w){return{isValid:!1,error:`JSON parse error: ${w instanceof Error?w.message:"Unknown error"}`,data:null}}};e.parseJson=k})(wr)),wr}var qn;function Yo(){return qn||(qn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateArray=e.parseJson=e.optional=e.isValidDate=e.isUrl=e.isSuccessResponse=e.isString=e.isObject=e.isNumber=e.isNullish=e.isErrorResponse=e.isEmail=e.isBoolean=e.isArray=e.isApiResponse=e.hasRequiredProperties=e.createValidator=e.createAssertion=e.Web3UsernameValidator=void 0;var r=Ho();Object.defineProperty(e,"Web3UsernameValidator",{enumerable:!0,get:function(){return r.Web3UsernameValidator}});var a=Go();Object.defineProperty(e,"createAssertion",{enumerable:!0,get:function(){return a.createAssertion}}),Object.defineProperty(e,"createValidator",{enumerable:!0,get:function(){return a.createValidator}}),Object.defineProperty(e,"hasRequiredProperties",{enumerable:!0,get:function(){return a.hasRequiredProperties}}),Object.defineProperty(e,"isApiResponse",{enumerable:!0,get:function(){return a.isApiResponse}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(e,"isEmail",{enumerable:!0,get:function(){return a.isEmail}}),Object.defineProperty(e,"isErrorResponse",{enumerable:!0,get:function(){return a.isErrorResponse}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return a.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(e,"isSuccessResponse",{enumerable:!0,get:function(){return a.isSuccessResponse}}),Object.defineProperty(e,"isUrl",{enumerable:!0,get:function(){return a.isUrl}}),Object.defineProperty(e,"isValidDate",{enumerable:!0,get:function(){return a.isValidDate}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return a.optional}}),Object.defineProperty(e,"parseJson",{enumerable:!0,get:function(){return a.parseJson}}),Object.defineProperty(e,"validateArray",{enumerable:!0,get:function(){return a.validateArray}})})(kr)),kr}var Er={},ee={},$n;function Ko(){if($n)return ee;$n=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.createMultiChainId=e,ee.createUserMultiChainId=r,ee.createChainStatsId=a,ee.createDelegationId=t,ee.normalizeAddress=o,ee.formatBigInt=i,ee.isZeroAddress=s,ee.isTestNet=l,ee.validateEventArgs=d;function e(c,u,b){return`${c}-${u}-${b}`}function r(c,u){return`${c}-${u.toLowerCase()}`}function a(c){return`${c}-global`}function t(c,u){return`${c.toLowerCase()}-${u}`}function o(c){return c.toLowerCase()}function i(c,u=18){const b=BigInt(10**u),x=c/b,h=c%b;return h===0n?x.toString():`${x}.${h.toString().padStart(u,"0").replace(/0+$/,"")}`}function s(c){return c.toLowerCase()==="0x0000000000000000000000000000000000000000"}function l(c){const u=new Set([31337,11155111,80001,80002,421614,11155420,84532,43113]),b=new Set([-102,-103,-104]);return u.has(c)||b.has(c)}function d(c,u){for(const b of u)if(c[b]===void 0||c[b]===null)return console.error(`❌ Missing required field: ${String(b)}`),!1;return!0}return ee}var Hn;function Zo(){return Hn||(Hn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateEventArgs=e.normalizeAddress=e.isZeroAddress=e.isTestNet=e.formatBigInt=e.createUserMultiChainId=e.createMultiChainId=e.createDelegationId=e.createChainStatsId=e.isSolanaAddress=e.isEvmAddress=e.parseEmailAddress=e.isValidWalletAddress=e.isValidSignature=e.isSNSName=e.isENSName=e.getChainDisplayName=e.getAddressType=e.formatWalletAddress=e.AddressType=void 0;var r=kn();Object.defineProperty(e,"AddressType",{enumerable:!0,get:function(){return r.AddressType}}),Object.defineProperty(e,"formatWalletAddress",{enumerable:!0,get:function(){return r.formatWalletAddress}}),Object.defineProperty(e,"getAddressType",{enumerable:!0,get:function(){return r.getAddressType}}),Object.defineProperty(e,"getChainDisplayName",{enumerable:!0,get:function(){return r.getChainDisplayName}}),Object.defineProperty(e,"isENSName",{enumerable:!0,get:function(){return r.isENSName}}),Object.defineProperty(e,"isSNSName",{enumerable:!0,get:function(){return r.isSNSName}}),Object.defineProperty(e,"isValidSignature",{enumerable:!0,get:function(){return r.isValidSignature}}),Object.defineProperty(e,"isValidWalletAddress",{enumerable:!0,get:function(){return r.isValidWalletAddress}}),Object.defineProperty(e,"parseEmailAddress",{enumerable:!0,get:function(){return r.parseEmailAddress}});var a=Nr();Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return a.isEvmAddress}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return a.isSolanaAddress}});var t=Ko();Object.defineProperty(e,"createChainStatsId",{enumerable:!0,get:function(){return t.createChainStatsId}}),Object.defineProperty(e,"createDelegationId",{enumerable:!0,get:function(){return t.createDelegationId}}),Object.defineProperty(e,"createMultiChainId",{enumerable:!0,get:function(){return t.createMultiChainId}}),Object.defineProperty(e,"createUserMultiChainId",{enumerable:!0,get:function(){return t.createUserMultiChainId}}),Object.defineProperty(e,"formatBigInt",{enumerable:!0,get:function(){return t.formatBigInt}}),Object.defineProperty(e,"isTestNet",{enumerable:!0,get:function(){return t.isTestNet}}),Object.defineProperty(e,"isZeroAddress",{enumerable:!0,get:function(){return t.isZeroAddress}}),Object.defineProperty(e,"normalizeAddress",{enumerable:!0,get:function(){return t.normalizeAddress}}),Object.defineProperty(e,"validateEventArgs",{enumerable:!0,get:function(){return t.validateEventArgs}})})(Er)),Er}var Ur={},ne={},Gn;function Qo(){if(Gn)return ne;Gn=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.generateAuthMessage=r,ne.isAuthExpired=a,ne.getAuthStatusText=t,ne.canAccessProtectedFeatures=o,ne.isAuthStatusConnected=i,ne.generateNonce=s,ne.extractNonceFromMessage=l,ne.isValidNonce=d;const e=pe();function r(c,u){const b=u||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;return`Authenticate with ${c}
13
+ Nonce: ${b}`}function a(c,u=24){const b=new Date(c.getTime()+u*60*60*1e3);return new Date>b}function t(c){switch(c){case e.AuthStatus.DISCONNECTED:return"Not connected";case e.AuthStatus.CONNECTED:return"Connected - Please verify";case e.AuthStatus.VERIFIED:return"Authenticated";default:return"Unknown status"}}function o(c){return c===e.AuthStatus.VERIFIED}function i(c){return c===e.AuthStatus.CONNECTED||c===e.AuthStatus.VERIFIED}function s(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function l(c){const u=c.match(/Nonce:\s*(.+)$/m);return u?u[1].trim():void 0}function d(c){if(!c||typeof c!="string"||c.length<10)return!1;const u=c.split("-");if(u.length>=2){const b=parseInt(u[0],10);if(!isNaN(b)){const x=Date.now()-864e5;if(b<x)return!1}}return!0}return ne}var Yn;function Xo(){return Yn||(Yn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidNonce=e.isAuthStatusConnected=e.isAuthExpired=e.getAuthStatusText=e.generateNonce=e.generateAuthMessage=e.extractNonceFromMessage=e.canAccessProtectedFeatures=void 0;var r=Qo();Object.defineProperty(e,"canAccessProtectedFeatures",{enumerable:!0,get:function(){return r.canAccessProtectedFeatures}}),Object.defineProperty(e,"extractNonceFromMessage",{enumerable:!0,get:function(){return r.extractNonceFromMessage}}),Object.defineProperty(e,"generateAuthMessage",{enumerable:!0,get:function(){return r.generateAuthMessage}}),Object.defineProperty(e,"generateNonce",{enumerable:!0,get:function(){return r.generateNonce}}),Object.defineProperty(e,"getAuthStatusText",{enumerable:!0,get:function(){return r.getAuthStatusText}}),Object.defineProperty(e,"isAuthExpired",{enumerable:!0,get:function(){return r.isAuthExpired}}),Object.defineProperty(e,"isAuthStatusConnected",{enumerable:!0,get:function(){return r.isAuthStatusConnected}}),Object.defineProperty(e,"isValidNonce",{enumerable:!0,get:function(){return r.isValidNonce}})})(Ur)),Ur}var jr={},Cr={},Kn;function Jo(){return Kn||(Kn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CLAIM_PERIOD_DAYS=e.USDC_DECIMALS=void 0,e.formatUSDC=r,e.parseUSDC=a,e.USDC_DECIMALS=6,e.CLAIM_PERIOD_DAYS=60;function r(t){return(t/Math.pow(10,e.USDC_DECIMALS)).toFixed(2)}function a(t){return Math.floor(parseFloat(t)*Math.pow(10,e.USDC_DECIMALS))}})(Cr)),Cr}var te={},Zn;function Ro(){if(Zn)return te;Zn=1,Object.defineProperty(te,"__esModule",{value:!0}),te.formatEmailDate=e,te.formatTimestamp=r,te.formatRelativeTime=a,te.parseDate=t,te.isDateInRange=o,te.addDays=i,te.addHours=s;function e(l){const d=typeof l=="string"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const c=new Date,u=c.getTime()-d.getTime(),b=Math.floor(u/(1e3*60*60*24));return b===0?d.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):b===1?"Yesterday":b<7?d.toLocaleDateString("en-US",{weekday:"long"}):d.getFullYear()===c.getFullYear()?d.toLocaleDateString("en-US",{month:"short",day:"numeric"}):d.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function r(l){return new Date(l).toISOString()}function a(l){const d=typeof l=="string"||typeof l=="number"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const u=new Date().getTime()-d.getTime(),b=Math.floor(u/1e3),x=Math.floor(b/60),h=Math.floor(x/60),g=Math.floor(h/24),p=Math.floor(g/7),N=Math.floor(g/30),j=Math.floor(g/365);return b<60?"just now":x<60?x===1?"1 minute ago":`${x} minutes ago`:h<24?h===1?"1 hour ago":`${h} hours ago`:g<7?g===1?"1 day ago":`${g} days ago`:p<4?p===1?"1 week ago":`${p} weeks ago`:N<12?N===1?"1 month ago":`${N} months ago`:j===1?"1 year ago":`${j} years ago`}function t(l){try{const d=new Date(l);return isNaN(d.getTime())?null:d}catch{return null}}function o(l,d,c){return l>=d&&l<=c}function i(l,d){const c=new Date(l);return c.setDate(c.getDate()+d),c}function s(l,d){const c=new Date(l);return c.setHours(c.getHours()+d),c}return te}var H={},Qn;function ei(){if(Qn)return H;Qn=1,Object.defineProperty(H,"__esModule",{value:!0}),H.truncate=e,H.capitalize=r,H.toTitleCase=a,H.toKebabCase=t,H.toCamelCase=o,H.toSnakeCase=i,H.normalizeWhitespace=s,H.isBlank=l,H.isNotBlank=d,H.escapeHtml=c,H.stripHtml=u,H.getInitials=b,H.formatBytes=x,H.randomString=h,H.pluralize=g,H.formatNumber=p;function e(N,j,k="..."){return!N||N.length<=j?N:N.slice(0,j-k.length)+k}function r(N){return N&&N.charAt(0).toUpperCase()+N.slice(1)}function a(N){return N&&N.toLowerCase().split(" ").map(j=>r(j)).join(" ")}function t(N){return N&&N.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function o(N){return N&&N.replace(/[-_\s]+(.)?/g,(j,k)=>k?k.toUpperCase():"").replace(/^./,j=>j.toLowerCase())}function i(N){return N&&N.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function s(N){return N&&N.replace(/\s+/g," ").trim()}function l(N){return!N||N.trim().length===0}function d(N){return!l(N)}function c(N){if(!N)return N;const j={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return N.replace(/[&<>"']/g,k=>j[k])}function u(N){return N&&N.replace(/<[^>]*>/g,"")}function b(N,j=2){return N?N.trim().split(/\s+/).slice(0,j).map(_=>_.charAt(0).toUpperCase()).join(""):""}function x(N,j=2){if(N===0)return"0 Bytes";const k=1024,U=j<0?0:j,_=["Bytes","KB","MB","GB","TB","PB"],w=Math.floor(Math.log(N)/Math.log(k));return parseFloat((N/Math.pow(k,w)).toFixed(U))+" "+_[w]}function h(N,j="alphanumeric"){let k;switch(j){case"alpha":k="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";break;case"numeric":k="0123456789";break;case"alphanumeric":k="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";break;case"hex":k="0123456789abcdef";break;default:k=j}let U="";for(let _=0;_<N;_++)U+=k.charAt(Math.floor(Math.random()*k.length));return U}function g(N,j,k){return N===1?j:k||`${j}s`}function p(N){return N.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return H}var Xn;function ri(){return Xn||(Xn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.truncate=e.toTitleCase=e.toSnakeCase=e.toKebabCase=e.toCamelCase=e.stripHtml=e.randomString=e.pluralize=e.normalizeWhitespace=e.isNotBlank=e.isBlank=e.getInitials=e.formatNumber=e.formatBytes=e.escapeHtml=e.capitalize=e.parseDate=e.isDateInRange=e.formatTimestamp=e.formatRelativeTime=e.formatEmailDate=e.addHours=e.addDays=e.parseUSDC=e.formatUSDC=e.USDC_DECIMALS=e.CLAIM_PERIOD_DAYS=void 0;var r=Jo();Object.defineProperty(e,"CLAIM_PERIOD_DAYS",{enumerable:!0,get:function(){return r.CLAIM_PERIOD_DAYS}}),Object.defineProperty(e,"USDC_DECIMALS",{enumerable:!0,get:function(){return r.USDC_DECIMALS}}),Object.defineProperty(e,"formatUSDC",{enumerable:!0,get:function(){return r.formatUSDC}}),Object.defineProperty(e,"parseUSDC",{enumerable:!0,get:function(){return r.parseUSDC}});var a=Ro();Object.defineProperty(e,"addDays",{enumerable:!0,get:function(){return a.addDays}}),Object.defineProperty(e,"addHours",{enumerable:!0,get:function(){return a.addHours}}),Object.defineProperty(e,"formatEmailDate",{enumerable:!0,get:function(){return a.formatEmailDate}}),Object.defineProperty(e,"formatRelativeTime",{enumerable:!0,get:function(){return a.formatRelativeTime}}),Object.defineProperty(e,"formatTimestamp",{enumerable:!0,get:function(){return a.formatTimestamp}}),Object.defineProperty(e,"isDateInRange",{enumerable:!0,get:function(){return a.isDateInRange}}),Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return a.parseDate}});var t=ei();Object.defineProperty(e,"capitalize",{enumerable:!0,get:function(){return t.capitalize}}),Object.defineProperty(e,"escapeHtml",{enumerable:!0,get:function(){return t.escapeHtml}}),Object.defineProperty(e,"formatBytes",{enumerable:!0,get:function(){return t.formatBytes}}),Object.defineProperty(e,"formatNumber",{enumerable:!0,get:function(){return t.formatNumber}}),Object.defineProperty(e,"getInitials",{enumerable:!0,get:function(){return t.getInitials}}),Object.defineProperty(e,"isBlank",{enumerable:!0,get:function(){return t.isBlank}}),Object.defineProperty(e,"isNotBlank",{enumerable:!0,get:function(){return t.isNotBlank}}),Object.defineProperty(e,"normalizeWhitespace",{enumerable:!0,get:function(){return t.normalizeWhitespace}}),Object.defineProperty(e,"pluralize",{enumerable:!0,get:function(){return t.pluralize}}),Object.defineProperty(e,"randomString",{enumerable:!0,get:function(){return t.randomString}}),Object.defineProperty(e,"stripHtml",{enumerable:!0,get:function(){return t.stripHtml}}),Object.defineProperty(e,"toCamelCase",{enumerable:!0,get:function(){return t.toCamelCase}}),Object.defineProperty(e,"toKebabCase",{enumerable:!0,get:function(){return t.toKebabCase}}),Object.defineProperty(e,"toSnakeCase",{enumerable:!0,get:function(){return t.toSnakeCase}}),Object.defineProperty(e,"toTitleCase",{enumerable:!0,get:function(){return t.toTitleCase}}),Object.defineProperty(e,"truncate",{enumerable:!0,get:function(){return t.truncate}})})(jr)),jr}var Sr={},B={},Jn;function ni(){if(Jn)return B;Jn=1,Object.defineProperty(B,"__esModule",{value:!0}),B.Z_INDEX=B.ANIMATION=B.NETWORK_IDS=B.WALLET_NAMES=B.CONTACT_INFO=B.ROUTES=B.SUCCESS_MESSAGES=B.ERROR_MESSAGES=B.TIME_FORMAT=B.SUBSCRIPTION_TIERS=B.EMAIL_CONFIG=B.STORAGE_KEYS=B.CHAIN_TYPE=B.AUTH_STATUS=B.API_RETRY_DELAY=B.API_RETRY_ATTEMPTS=B.API_TIMEOUT=void 0;const e=3e4;B.API_TIMEOUT=e;const r=3;B.API_RETRY_ATTEMPTS=r;const a=1e3;B.API_RETRY_DELAY=a;const t={DISCONNECTED:"disconnected",CONNECTED:"connected",VERIFIED:"verified"};B.AUTH_STATUS=t;const o={EVM:"evm",SOLANA:"solana",UNKNOWN:"unknown"};B.CHAIN_TYPE=o;const i={AUTH_TOKEN:"authToken",USER_DATA:"userData",THEME:"theme",EMAIL_CACHE:"emailCache",WALLET_ADDRESS:"walletAddress",CHAIN_TYPE:"chainType"};B.STORAGE_KEYS=i;const s={MAX_ATTACHMENT_SIZE:25*1024*1024,MAX_RECIPIENTS:100,ITEMS_PER_PAGE:50,REFRESH_INTERVAL:6e4,NOTIFICATION_COOLDOWN:3e5};B.EMAIL_CONFIG=s;const l={FREE:"free",BASIC:"basic",PRO:"pro",ENTERPRISE:"enterprise"};B.SUBSCRIPTION_TIERS=l;const d={SHORT_DATE:"MMM d",FULL_DATE:"MMM d, yyyy",DATE_TIME:"MMM d, yyyy h:mm a",RELATIVE:"relative"};B.TIME_FORMAT=d;const c={WALLET_NOT_CONNECTED:"Please connect your wallet first",INVALID_ADDRESS:"Please enter a valid address",NETWORK_ERROR:"Network error. Please try again.",AUTHENTICATION_FAILED:"Authentication failed. Please sign in again.",TRANSACTION_FAILED:"Transaction failed. Please try again.",INSUFFICIENT_FUNDS:"Insufficient funds for this operation",RATE_LIMITED:"Too many requests. Please wait a moment.",SESSION_EXPIRED:"Your session has expired. Please sign in again.",PERMISSION_DENIED:"You do not have permission to perform this action"};B.ERROR_MESSAGES=c;const u={EMAIL_SENT:"Email sent successfully",EMAIL_DELETED:"Email deleted successfully",PREFERENCES_SAVED:"Preferences saved successfully",WALLET_CONNECTED:"Wallet connected successfully",AUTHENTICATION_SUCCESS:"Authentication successful",DELEGATION_SUCCESS:"Delegation successful",SUBSCRIPTION_ACTIVATED:"Subscription activated successfully"};B.SUCCESS_MESSAGES=u;const b={HOME:"/",ABOUT:"/about",CONNECT:"/connect",MAIL:"/mail",COMPOSE:"/mail/compose",PREFERENCES:"/preferences",TERMS:"/terms",PRIVACY:"/privacy",DOCUMENTATION:"/document",WEB3_USERS:"/web3-users",WEB3_PROJECTS:"/web3-projects"};B.ROUTES=b;const x={SUPPORT_EMAIL:"support@sudobility.com",CONTACT_EMAIL:"info@sudobility.com"};B.CONTACT_INFO=x;const h={METAMASK:"MetaMask",WALLETCONNECT:"WalletConnect",COINBASE:"Coinbase Wallet",PHANTOM:"Phantom",SAFE:"Safe",ARGENT:"Argent",RAINBOW:"Rainbow",TRUST:"Trust Wallet",LEDGER:"Ledger",TREZOR:"Trezor"};B.WALLET_NAMES=h;const g={ETHEREUM_MAINNET:1,POLYGON:137,ARBITRUM:42161,OPTIMISM:10,BASE:8453,SOLANA_MAINNET:"mainnet-beta",SOLANA_DEVNET:"devnet"};B.NETWORK_IDS=g;const p={FAST:150,NORMAL:300,SLOW:500,VERY_SLOW:1e3};B.ANIMATION=p;const N={DROPDOWN:10,OVERLAY:20,MODAL:30,POPOVER:40,TOOLTIP:50,TOAST:60};return B.Z_INDEX=N,B}var Be={},Rn;function ai(){return Rn||(Rn=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.STATUS_VALUES=void 0,Be.STATUS_VALUES={SUCCESS:"success",PENDING:"pending",FAILED:"failed",ERROR:"error"}),Be}var ea;function ti(){return ea||(ea=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.STATUS_VALUES=e.Z_INDEX=e.ANIMATION=e.NETWORK_IDS=e.WALLET_NAMES=e.CONTACT_INFO=e.ROUTES=e.SUCCESS_MESSAGES=e.ERROR_MESSAGES=e.TIME_FORMAT=e.SUBSCRIPTION_TIERS=e.EMAIL_CONFIG=e.STORAGE_KEYS=e.CHAIN_TYPE=e.AUTH_STATUS=e.API_RETRY_DELAY=e.API_RETRY_ATTEMPTS=e.API_TIMEOUT=void 0;var r=ni();Object.defineProperty(e,"API_TIMEOUT",{enumerable:!0,get:function(){return r.API_TIMEOUT}}),Object.defineProperty(e,"API_RETRY_ATTEMPTS",{enumerable:!0,get:function(){return r.API_RETRY_ATTEMPTS}}),Object.defineProperty(e,"API_RETRY_DELAY",{enumerable:!0,get:function(){return r.API_RETRY_DELAY}}),Object.defineProperty(e,"AUTH_STATUS",{enumerable:!0,get:function(){return r.AUTH_STATUS}}),Object.defineProperty(e,"CHAIN_TYPE",{enumerable:!0,get:function(){return r.CHAIN_TYPE}}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return r.STORAGE_KEYS}}),Object.defineProperty(e,"EMAIL_CONFIG",{enumerable:!0,get:function(){return r.EMAIL_CONFIG}}),Object.defineProperty(e,"SUBSCRIPTION_TIERS",{enumerable:!0,get:function(){return r.SUBSCRIPTION_TIERS}}),Object.defineProperty(e,"TIME_FORMAT",{enumerable:!0,get:function(){return r.TIME_FORMAT}}),Object.defineProperty(e,"ERROR_MESSAGES",{enumerable:!0,get:function(){return r.ERROR_MESSAGES}}),Object.defineProperty(e,"SUCCESS_MESSAGES",{enumerable:!0,get:function(){return r.SUCCESS_MESSAGES}}),Object.defineProperty(e,"ROUTES",{enumerable:!0,get:function(){return r.ROUTES}}),Object.defineProperty(e,"CONTACT_INFO",{enumerable:!0,get:function(){return r.CONTACT_INFO}}),Object.defineProperty(e,"WALLET_NAMES",{enumerable:!0,get:function(){return r.WALLET_NAMES}}),Object.defineProperty(e,"NETWORK_IDS",{enumerable:!0,get:function(){return r.NETWORK_IDS}}),Object.defineProperty(e,"ANIMATION",{enumerable:!0,get:function(){return r.ANIMATION}}),Object.defineProperty(e,"Z_INDEX",{enumerable:!0,get:function(){return r.Z_INDEX}});var a=ai();Object.defineProperty(e,"STATUS_VALUES",{enumerable:!0,get:function(){return a.STATUS_VALUES}})})(Sr)),Sr}var Vr={},Y={},ra;function oi(){if(ra)return Y;ra=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.storageLogger=Y.ensLogger=Y.contractLogger=Y.apiLogger=Y.authLogger=Y.logger=Y.LogLevel=void 0;var e;(function(d){d.ERROR="error",d.WARN="warn",d.INFO="info",d.DEBUG="debug"})(e||(Y.LogLevel=e={}));class r{constructor(){this.isDevelopment=process.env.NODE_ENV==="development"}formatTimestamp(){return new Date().toISOString()}formatMessage(c,u,b){const x=this.formatTimestamp(),h=b?` [${b}]`:"";return`[${x}]${h} ${u}`}shouldLog(c){return this.isDevelopment?!0:c===e.ERROR||c===e.WARN}error(c,u,b){this.shouldLog(e.ERROR)&&(console.error(this.formatMessage(e.ERROR,c,u)),b&&console.error(b))}warn(c,u,b){this.shouldLog(e.WARN)&&(console.warn(this.formatMessage(e.WARN,c,u)),b&&console.warn(b))}info(c,u,b){this.shouldLog(e.INFO)&&(console.log(this.formatMessage(e.INFO,c,u)),b&&console.log(b))}debug(c,u,b){this.shouldLog(e.DEBUG)&&(console.log(this.formatMessage(e.DEBUG,c,u)),b&&console.log(b))}withContext(c){return{error:(u,b)=>this.error(u,c,b),warn:(u,b)=>this.warn(u,c,b),info:(u,b)=>this.info(u,c,b),debug:(u,b)=>this.debug(u,c,b)}}}const a=new r;Y.logger=a;const t=a.withContext("AUTH");Y.authLogger=t;const o=a.withContext("API");Y.apiLogger=o;const i=a.withContext("CONTRACT");Y.contractLogger=i;const s=a.withContext("ENS");Y.ensLogger=s;const l=a.withContext("STORAGE");return Y.storageLogger=l,Y}var na;function aa(){return na||(na=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.storageLogger=e.ensLogger=e.contractLogger=e.apiLogger=e.authLogger=e.logger=e.LogLevel=void 0;var r=oi();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return r.logger}}),Object.defineProperty(e,"authLogger",{enumerable:!0,get:function(){return r.authLogger}}),Object.defineProperty(e,"apiLogger",{enumerable:!0,get:function(){return r.apiLogger}}),Object.defineProperty(e,"contractLogger",{enumerable:!0,get:function(){return r.contractLogger}}),Object.defineProperty(e,"ensLogger",{enumerable:!0,get:function(){return r.ensLogger}}),Object.defineProperty(e,"storageLogger",{enumerable:!0,get:function(){return r.storageLogger}})})(Vr)),Vr}var Ar={},we={},ta;function ii(){if(ta)return we;ta=1,Object.defineProperty(we,"__esModule",{value:!0}),we.createURLSearchParams=r,we.createSearchParams=a,we.searchParamsToString=t,we.parseSearchParams=o;class e{constructor(s){if(this.params=new Map,s)if(typeof s=="string")this.parseString(s);else if(Array.isArray(s))for(const[l,d]of s)this.append(l,d);else for(const[l,d]of Object.entries(s))d!==void 0&&this.append(l,d)}parseString(s){const l=s.startsWith("?")?s.slice(1):s;if(l)for(const d of l.split("&")){const[c,u=""]=d.split("=");c&&this.append(decodeURIComponent(c),decodeURIComponent(u))}}append(s,l){this.params.has(s)||this.params.set(s,[]);const d=this.params.get(s);d&&d.push(l)}delete(s){this.params.delete(s)}get(s){const l=this.params.get(s);return l&&l.length>0?l[0]:null}getAll(s){return this.params.get(s)||[]}has(s){return this.params.has(s)}set(s,l){this.params.set(s,[l])}toString(){const s=[];return this.params.forEach((l,d)=>{for(const c of l)s.push(`${encodeURIComponent(d)}=${encodeURIComponent(c)}`)}),s.join("&")}forEach(s){this.params.forEach((l,d)=>{for(const c of l)s(c,d)})}}function r(i){return typeof URLSearchParams<"u"?new URLSearchParams(i):new e(i)}function a(i){const s=r(void 0);for(const[l,d]of Object.entries(i))d!=null&&s.append(l,String(d));return s}function t(i){return i.toString()}function o(i){const s=r(i),l={};return s.forEach((d,c)=>{l[c]=d}),l}return we}var oa;function si(){return oa||(oa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseSearchParams=e.searchParamsToString=e.createSearchParams=e.createURLSearchParams=void 0;var r=ii();Object.defineProperty(e,"createURLSearchParams",{enumerable:!0,get:function(){return r.createURLSearchParams}}),Object.defineProperty(e,"createSearchParams",{enumerable:!0,get:function(){return r.createSearchParams}}),Object.defineProperty(e,"searchParamsToString",{enumerable:!0,get:function(){return r.searchParamsToString}}),Object.defineProperty(e,"parseSearchParams",{enumerable:!0,get:function(){return r.parseSearchParams}})})(Ar)),Ar}var K={},ia;function li(){if(ia)return K;ia=1,Object.defineProperty(K,"__esModule",{value:!0}),K.debounceAsync=K.clearExpiredCache=K.withCache=K.withTimeout=K.safeParallel=K.withLoadingState=K.safeAsync=void 0;const e=aa(),r=async(u,b)=>{try{return{data:await u(),success:!0}}catch(x){const h=x instanceof Error?x:new Error(String(x));return e.logger.error(`Async operation failed: ${h.message}`,b,x),{error:h,success:!1}}};K.safeAsync=r;const a=async(u,b,x,h)=>{b(!0),x(null);try{return await u()}catch(g){const p=g instanceof Error?g.message:String(g);x(p),e.logger.error(`Operation failed: ${p}`,h,g);return}finally{b(!1)}};K.withLoadingState=a;const t=async(u,b)=>{try{return{data:await Promise.all(u.map(h=>h())),success:!0}}catch(x){const h=x instanceof Error?x:new Error(String(x));return e.logger.error(`Parallel operations failed: ${h.message}`,b,x),{error:h,success:!1}}};K.safeParallel=t;const o=async(u,b,x)=>{const h=new Promise((g,p)=>setTimeout(()=>p(new Error(`Operation timed out after ${b}ms`)),b));try{return await Promise.race([u(),h])}catch(g){throw e.logger.error("Timeout operation failed",x,g),g}};K.withTimeout=o;const i=new Map,s=async(u,b,x=300*1e3)=>{const h=i.get(u),g=Date.now();if(h&&g-h.timestamp<h.ttl)return h.data;const p=await b();return i.set(u,{data:p,timestamp:g,ttl:x}),p};K.withCache=s;const l=()=>{const u=Date.now();for(const[b,x]of i.entries())u-x.timestamp>=x.ttl&&i.delete(b)};K.clearExpiredCache=l;const d=new Map,c=(u,b,x)=>(...h)=>new Promise(g=>{const p=d.get(x);p&&clearTimeout(p);const N=setTimeout(async()=>{d.delete(x);try{const j=await u(...h);g(j)}catch(j){e.logger.error("Debounced operation failed",x,j),g(void 0)}},b);d.set(x,N)});return K.debounceAsync=c,K}var sa;function la(){return sa||(sa=1,(function(e){var r=ke&&ke.__createBinding||(Object.create?(function(t,o,i,s){s===void 0&&(s=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(t,s,l)}):(function(t,o,i,s){s===void 0&&(s=i),t[s]=o[i]})),a=ke&&ke.__exportStar||function(t,o){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(Yo(),e),a(Zo(),e),a(Xo(),e),a(ri(),e),a(ti(),e),a(aa(),e),a(si(),e),a(li(),e)})(ke)),ke}var ca;function ci(){return ca||(ca=1,(function(e){var r=ge&&ge.__createBinding||(Object.create?(function(i,s,l,d){d===void 0&&(d=l);var c=Object.getOwnPropertyDescriptor(s,l);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(i,d,c)}):(function(i,s,l,d){d===void 0&&(d=l),i[d]=s[l]})),a=ge&&ge.__exportStar||function(i,s){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&r(s,i,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.MailboxSpecialUse=e.ReviewRejectType=e.ApplicantType=e.SumsubReviewAnswer=e.SumsubReviewStatus=e.KYCApplicationStatus=e.KYCVerificationLevel=e.FeeType=e.ClaimType=e.ConfirmationStatus=e.ProcessedEventName=e.ContractType=e.StorageType=e.WalletType=e.ChainType=e.AnalyticsEvent=e.TransactionStatus=e.MessageType=e.NotificationType=e.RequestStatus=e.MobileView=e.EmailComposeType=e.FontSize=e.Theme=e.Chain=e.AuthStatus=e.debounceAsync=e.clearExpiredCache=e.withCache=e.withTimeout=e.safeParallel=e.withLoadingState=e.safeAsync=void 0,a(Bn(),e),a(la(),e);var t=la();Object.defineProperty(e,"safeAsync",{enumerable:!0,get:function(){return t.safeAsync}}),Object.defineProperty(e,"withLoadingState",{enumerable:!0,get:function(){return t.withLoadingState}}),Object.defineProperty(e,"safeParallel",{enumerable:!0,get:function(){return t.safeParallel}}),Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return t.withTimeout}}),Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return t.withCache}}),Object.defineProperty(e,"clearExpiredCache",{enumerable:!0,get:function(){return t.clearExpiredCache}}),Object.defineProperty(e,"debounceAsync",{enumerable:!0,get:function(){return t.debounceAsync}});var o=Bn();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return o.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return o.Chain}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return o.Theme}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return o.FontSize}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return o.EmailComposeType}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return o.MobileView}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return o.RequestStatus}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return o.MessageType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return o.TransactionStatus}}),Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return o.AnalyticsEvent}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return o.ChainType}}),Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}}),Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return o.StorageType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return o.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return o.ProcessedEventName}}),Object.defineProperty(e,"ConfirmationStatus",{enumerable:!0,get:function(){return o.ConfirmationStatus}}),Object.defineProperty(e,"ClaimType",{enumerable:!0,get:function(){return o.ClaimType}}),Object.defineProperty(e,"FeeType",{enumerable:!0,get:function(){return o.FeeType}}),Object.defineProperty(e,"KYCVerificationLevel",{enumerable:!0,get:function(){return o.KYCVerificationLevel}}),Object.defineProperty(e,"KYCApplicationStatus",{enumerable:!0,get:function(){return o.KYCApplicationStatus}}),Object.defineProperty(e,"SumsubReviewStatus",{enumerable:!0,get:function(){return o.SumsubReviewStatus}}),Object.defineProperty(e,"SumsubReviewAnswer",{enumerable:!0,get:function(){return o.SumsubReviewAnswer}}),Object.defineProperty(e,"ApplicantType",{enumerable:!0,get:function(){return o.ApplicantType}}),Object.defineProperty(e,"ReviewRejectType",{enumerable:!0,get:function(){return o.ReviewRejectType}}),Object.defineProperty(e,"MailboxSpecialUse",{enumerable:!0,get:function(){return o.MailboxSpecialUse}})})(ge)),ge}var da=ci();const di=e=>{switch(e){case"verified":case"success":return Ce("success");case"connected":case"warning":return Ce("warning");case"disconnected":case"error":return Ce("error");case"pending":return Ce("info");default:return Ce("neutral")}},ui=e=>{switch(e){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},mi=({status:e,label:r,showDot:a=!0,size:t="md"})=>{const i=r||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((u,b)=>{const x={sm:"small",md:"default",lg:"large"},g={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[u]||"default",p=x[b];return p==="default"?O.badge[g]():O.badge[p](g)})(e,t),d=di(e),c=ui(t);return n.jsxDEV("span",{className:l,children:[a&&n.jsxDEV("span",{className:`inline-block ${c} rounded-full ${d} mr-1`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:108,columnNumber:9},void 0),i]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:106,columnNumber:5},void 0)},bi=({chainType:e,size:r="md"})=>{if(!e)return null;const a=e===da.ChainType.SOLANA?"SOL":"ETH",o={sm:"small",md:"default",lg:"large"}[r],i=()=>{const s=e===da.ChainType.SOLANA?"solana":"ethereum";return o==="default"?O.badge[s]():O.badge[o](s)};return n.jsxDEV("span",{className:i(),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-badge.tsx",lineNumber:137,columnNumber:10},void 0)},fi={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},gi=({status:e,size:r="sm",pulse:a=!1,className:t})=>n.jsxDEV("div",{className:f("rounded-full flex-shrink-0",Ce(e),fi[r],a&&"animate-pulse",t)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-indicator.tsx",lineNumber:26,columnNumber:5},void 0),hi=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UstatusUpipeline",children:r||"UstatusUpipeline Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/primitives/feedback/status-pipeline.tsx",lineNumber:43,columnNumber:5},void 0),Xe=G.forwardRef(({className:e,type:r,...a},t)=>n.jsxDEV("input",{type:r,className:f(O.input.default(),e),ref:t,...a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/input.tsx",lineNumber:11,columnNumber:7},void 0));Xe.displayName="Input";const pi=({value:e,onChange:r,placeholder:a,rows:t=4,disabled:o=!1,readOnly:i=!1,showCount:s=!1,maxLength:l,resize:d="vertical",size:c="md",className:u,textareaProps:b})=>{const x={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},h={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},g=j=>{const k=j.target.value;l&&k.length>l||r(k)},p=e.length,N=s||l!==void 0;return n.jsxDEV("div",{className:f("w-full",u),children:[n.jsxDEV("textarea",{value:e,onChange:g,placeholder:a,rows:t,disabled:o,readOnly:i,maxLength:l,className:f("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x[c],h[d],o&&"opacity-50 cursor-not-allowed",i&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:103,columnNumber:7},void 0),N&&n.jsxDEV("div",{className:"flex justify-end mt-1",children:n.jsxDEV("span",{className:f("text-xs",l&&p>l*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",l&&p>=l&&"text-red-600 dark:text-red-400"),children:[p,l&&` / ${l}`]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:130,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-area.tsx",lineNumber:102,columnNumber:5},void 0)},xi=({value:e,onChange:r,min:a,max:t,step:o=1,disabled:i=!1,showSteppers:s=!1,stepperPosition:l="right",placeholder:d,size:c="md",className:u,inputProps:b})=>{const h={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[c],g=w=>{const S=parseFloat(w.target.value);if(isNaN(S))w.target.value===""&&r(a??0);else{const E=p(S);r(E)}},p=w=>{let S=w;return a!==void 0&&S<a&&(S=a),t!==void 0&&S>t&&(S=t),S},N=()=>{const w=p(e+o);r(w)},j=()=>{const w=p(e-o);r(w)},k=t===void 0||e<t,U=a===void 0||e>a,_=({onClick:w,icon:S,disabled:E,ariaLabel:V})=>n.jsxDEV("button",{type:"button",onClick:w,disabled:i||E,"aria-label":V,className:f("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",h.button,(i||E)&&"opacity-50 cursor-not-allowed"),children:S},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:137,columnNumber:5},void 0);return s&&l==="sides"?n.jsxDEV("div",{className:f("inline-flex items-stretch",u),children:[n.jsxDEV(_,{onClick:j,disabled:!U,icon:n.jsxDEV(A.MinusIcon,{className:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:165,columnNumber:17},void 0),ariaLabel:"Decrement"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:162,columnNumber:9},void 0),n.jsxDEV("input",{type:"number",value:e,onChange:g,min:a,max:t,step:o,disabled:i,placeholder:d,className:f("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",h.input,i&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:168,columnNumber:9},void 0),n.jsxDEV(_,{onClick:N,disabled:!k,icon:n.jsxDEV(A.PlusIcon,{className:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:196,columnNumber:17},void 0),ariaLabel:"Increment"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:193,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:161,columnNumber:7},void 0):s&&l==="right"?n.jsxDEV("div",{className:f("inline-flex items-stretch gap-2",u),children:[n.jsxDEV("input",{type:"number",value:e,onChange:g,min:a,max:t,step:o,disabled:i,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",h.input,i&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:207,columnNumber:9},void 0),n.jsxDEV("div",{className:"inline-flex flex-col gap-0.5",children:[n.jsxDEV("button",{type:"button",onClick:N,disabled:i||!k,"aria-label":"Increment",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",h.button.replace(/h-\d+/,"h-auto"),(i||!k)&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV(A.PlusIcon,{className:f(h.icon,"w-3 h-3")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:252,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:234,columnNumber:11},void 0),n.jsxDEV("button",{type:"button",onClick:j,disabled:i||!U,"aria-label":"Decrement",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",h.button.replace(/h-\d+/,"h-auto"),(i||!U)&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV(A.MinusIcon,{className:f(h.icon,"w-3 h-3")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:272,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:254,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:233,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:206,columnNumber:7},void 0):n.jsxDEV("input",{type:"number",value:e,onChange:g,min:a,max:t,step:o,disabled:i,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",h.input,i&&"opacity-50 cursor-not-allowed",u),...b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/number-input.tsx",lineNumber:281,columnNumber:5},void 0)},Ni=({value:e,onChange:r,placeholder:a="Search...",autoFocus:t=!1,disabled:o=!1,size:i="md",showIcon:s=!0,showClear:l=!0,loading:d=!1,className:c,inputProps:u})=>{const[b,x]=y.useState(""),h=e!==void 0?e:b,g=e!==void 0,N={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:s?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:s?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:s?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[i],j=y.useCallback(U=>{const _=U.target.value;g||x(_),r?.(_)},[r,g]),k=y.useCallback(()=>{g||x(""),r?.("")},[r,g]);return n.jsxDEV("div",{className:f("relative w-full",c),children:[s&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",N.iconLeft),children:n.jsxDEV(A.MagnifyingGlassIcon,{className:f(N.icon,"text-gray-400 dark:text-gray-500")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:130,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:124,columnNumber:9},void 0),n.jsxDEV("input",{type:"text",value:h,onChange:j,placeholder:a,autoFocus:t,disabled:o||d,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",N.input,N.padding,o&&"opacity-50 cursor-not-allowed",d&&"opacity-60"),...u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:137,columnNumber:7},void 0),l&&h&&!d&&n.jsxDEV("button",{type:"button",onClick:k,disabled:o,className:f("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",o?"cursor-not-allowed":"cursor-pointer",N.iconRight),"aria-label":"Clear search",children:n.jsxDEV(A.XMarkIcon,{className:N.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:175,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:162,columnNumber:9},void 0),d&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center",N.iconRight),children:n.jsxDEV("svg",{className:f(N.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:193,columnNumber:13},void 0),n.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:201,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:187,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:181,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/search-input.tsx",lineNumber:121,columnNumber:5},void 0)},yi=({value:e,onChange:r,type:a="date",min:t,max:o,disabled:i=!1,showIcon:s=!1,placeholder:l,size:d="md",className:c,inputProps:u})=>{const x={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:s?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:s?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:s?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[d],h=e instanceof Date?vi(e,a):e,g=p=>{r(p.target.value)};return n.jsxDEV("div",{className:f("relative",c),children:[s&&n.jsxDEV("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",x.iconLeft),children:n.jsxDEV(A.CalendarIcon,{className:f(x.icon,"text-gray-400 dark:text-gray-500")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:111,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:105,columnNumber:9},void 0),n.jsxDEV("input",{type:a,value:h,onChange:g,min:t,max:o,disabled:i,placeholder:l,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",x.input,x.padding,i&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:118,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-input.tsx",lineNumber:102,columnNumber:5},void 0)};function vi(e,r){const a=d=>String(d).padStart(2,"0"),t=e.getFullYear(),o=a(e.getMonth()+1),i=a(e.getDate()),s=a(e.getHours()),l=a(e.getMinutes());switch(r){case"date":return`${t}-${o}-${i}`;case"time":return`${s}:${l}`;case"datetime-local":return`${t}-${o}-${i}T${s}:${l}`;case"month":return`${t}-${o}`;case"week":{const d=new Date(t,0,1),c=Math.floor((e.getTime()-d.getTime())/(1440*60*1e3)),u=Math.ceil((c+d.getDay()+1)/7);return`${t}-W${a(u)}`}default:return`${t}-${o}-${i}`}}const ua=({value:e,onChange:r,use12Hour:a=!1,minuteStep:t=1,disabled:o=!1,className:i})=>{const[s,l]=y.useState(!1),[d,c]=y.useState("12"),[u,b]=y.useState("00"),[x,h]=y.useState("AM"),g=y.useRef(null);y.useEffect(()=>{if(e){const[U,_]=e.split(":"),w=parseInt(U,10);if(a){const S=w>=12,E=w===0?12:w>12?w-12:w;c(E.toString().padStart(2,"0")),h(S?"PM":"AM")}else c(U);b(_)}},[e,a]),y.useEffect(()=>{const U=_=>{g.current&&!g.current.contains(_.target)&&l(!1)};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[]);const p=()=>{if(!e)return"";const[U,_]=e.split(":"),w=parseInt(U,10);if(a){const S=w===0?12:w>12?w-12:w,E=w>=12?"PM":"AM";return`${S}:${_} ${E}`}return`${U}:${_}`},N=(U,_,w)=>{let S=parseInt(U,10);const E=parseInt(_,10);a&&w&&(w==="PM"&&S!==12?S+=12:w==="AM"&&S===12&&(S=0));const V=`${S.toString().padStart(2,"0")}:${E.toString().padStart(2,"0")}`;r(V)},j=a?Array.from({length:12},(U,_)=>(_+1).toString().padStart(2,"0")):Array.from({length:24},(U,_)=>_.toString().padStart(2,"0")),k=Array.from({length:Math.ceil(60/t)},(U,_)=>(_*t).toString().padStart(2,"0"));return n.jsxDEV("div",{ref:g,className:f("relative w-full",i),children:[n.jsxDEV("button",{type:"button",onClick:()=>!o&&l(!s),disabled:o,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",s&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:f(e?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:e?p():"Select time"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:157,columnNumber:9},void 0),n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:172,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:166,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:142,columnNumber:7},void 0),s&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:n.jsxDEV("div",{className:"flex gap-1 p-2",children:[n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:187,columnNumber:15},void 0),n.jsxDEV("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:j.map(U=>n.jsxDEV("button",{onClick:()=>{c(U),N(U,u,a?x:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",U===d&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:U},U,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:192,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:190,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:186,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:218,columnNumber:15},void 0),n.jsxDEV("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:k.map(U=>n.jsxDEV("button",{onClick:()=>{b(U),N(d,U,a?x:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",U===u&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:U},U,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:223,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:221,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:217,columnNumber:13},void 0),a&&n.jsxDEV("div",{className:"flex flex-col",children:[n.jsxDEV("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:250,columnNumber:17},void 0),n.jsxDEV("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[n.jsxDEV("button",{onClick:()=>{h("AM"),N(d,u,"AM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:254,columnNumber:19},void 0),n.jsxDEV("button",{onClick:()=>{h("PM"),N(d,u,"PM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",x==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:269,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:253,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:249,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:184,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:183,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/time-picker.tsx",lineNumber:140,columnNumber:5},void 0)},_i=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],ki=({value:e,onChange:r,country:a,onCountryChange:t,countries:o=_i,placeholder:i="Phone number",disabled:s=!1,className:l})=>{const[d,c]=y.useState(o[0]?.code||"US"),[u,b]=y.useState(!1),[x,h]=y.useState(""),g=a!==void 0?a:d,p=o.find(_=>_.code===g),N=_=>{a!==void 0&&t?t(_):c(_),b(!1),h("")},j=_=>{const w=_.replace(/\D/g,"");return p?.dialCode==="+1"?w.length<=3?w:w.length<=6?`(${w.slice(0,3)}) ${w.slice(3)}`:`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`:w},k=_=>{const w=j(_.target.value);r(w)},U=o.filter(_=>_.name.toLowerCase().includes(x.toLowerCase())||_.dialCode.includes(x)||_.code.toLowerCase().includes(x.toLowerCase()));return n.jsxDEV("div",{className:f("relative w-full",l),children:[n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&b(!u),disabled:s,className:f("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",u&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-xl",children:p?.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:162,columnNumber:13},void 0),n.jsxDEV("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p?.dialCode},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:163,columnNumber:13},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:175,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:166,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:147,columnNumber:11},void 0),u&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:x,onChange:_=>h(_.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:_=>_.stopPropagation()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:189,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:188,columnNumber:15},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:U.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:202,columnNumber:19},void 0):U.map(_=>n.jsxDEV("button",{onClick:()=>N(_.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",_.code===g&&"bg-blue-50 dark:bg-blue-900/30"),children:[n.jsxDEV("span",{className:"text-xl",children:_.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:218,columnNumber:23},void 0),n.jsxDEV("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:_.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:219,columnNumber:23},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_.dialCode},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:222,columnNumber:23},void 0)]},_.code,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:207,columnNumber:21},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:200,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:186,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:146,columnNumber:9},void 0),n.jsxDEV("input",{type:"tel",value:e,onChange:k,placeholder:i,disabled:s,className:f("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:234,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:144,columnNumber:7},void 0),e&&p&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",p.dialCode," ",e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:253,columnNumber:9},void 0),u&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:260,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/phone-input.tsx",lineNumber:143,columnNumber:5},void 0)},wi=({checked:e,defaultChecked:r=!1,onChange:a,label:t,description:o,disabled:i=!1,size:s="md",variant:l="primary",color:d,className:c,id:u,name:b,value:x,required:h=!1,indeterminate:g=!1,error:p=!1,errorMessage:N,icon:j})=>{const[k,U]=y.useState(r),_=e!==void 0,w=_?e:k,S={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},V=d?{blue:"primary",green:"success",yellow:"warning",red:"error"}[d]:l,v=()=>p?w?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:w?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:w?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:w?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:w?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[V],T=z=>{if(i)return;const D=z.target.checked;_||U(D),a?.(D)},M=z=>{if(!i&&(z.key===" "||z.key==="Spacebar")){z.preventDefault();const D=!w;_||U(D),a?.(D)}},I=S[s];return n.jsxDEV("div",{className:f("inline-flex flex-col",c),children:[n.jsxDEV("label",{className:f("inline-flex items-start gap-2 cursor-pointer",i&&"opacity-50 cursor-not-allowed"),children:[n.jsxDEV("div",{className:"relative flex items-center",children:[n.jsxDEV("input",{type:"checkbox",checked:w,defaultChecked:_?void 0:r,onChange:T,onKeyDown:M,disabled:i,id:u,name:b,value:x,required:h,className:"sr-only peer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:188,columnNumber:11},void 0),n.jsxDEV("div",{"data-indeterminate":g?"true":void 0,className:f("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",I.box,v(),!i&&"hover:border-opacity-75"),children:g?n.jsxDEV(me.MinusIcon,{className:f("text-white",I.check)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:211,columnNumber:15},void 0):w?j||n.jsxDEV(me.CheckIcon,{className:f("text-white",I.check)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:216,columnNumber:17},void 0):null},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:201,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:187,columnNumber:9},void 0),(t||o)&&n.jsxDEV("div",{className:"flex flex-col",children:[t&&n.jsxDEV("span",{className:f("text-gray-900 dark:text-white",I.text),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:224,columnNumber:15},void 0),o&&n.jsxDEV("span",{className:f("text-gray-600 dark:text-gray-400",I.desc),children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:231,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:222,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:181,columnNumber:7},void 0),N&&n.jsxDEV("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:241,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/checkbox.tsx",lineNumber:180,columnNumber:5},void 0)},ma=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(dr.Root,{className:f("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",e),...r,ref:a,children:n.jsxDEV(dr.Thumb,{className:f("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/switch.tsx",lineNumber:17,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/switch.tsx",lineNumber:9,columnNumber:3},void 0));ma.displayName=dr.Root.displayName;const Ei=({name:e="radio-group",value:r,onChange:a,options:t,label:o,orientation:i="vertical",disabled:s=!1,error:l=!1,errorMessage:d,required:c=!1,size:u="md",renderOption:b,className:x})=>{const h=y.useRef(null),p={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[u],N=(k,U)=>{!s&&!U&&a(k)},j=(k,U)=>{const _=t.filter(S=>!S.disabled&&!s),w=_.findIndex(S=>S.value===t[U].value);if(k.key==="ArrowDown"||k.key==="ArrowRight"){k.preventDefault();const S=(w+1)%_.length;a(_[S].value)}else if(k.key==="ArrowUp"||k.key==="ArrowLeft"){k.preventDefault();const S=(w-1+_.length)%_.length;a(_[S].value)}};return n.jsxDEV("div",{className:f("w-full",x),children:[o&&n.jsxDEV("div",{className:"mb-2",children:n.jsxDEV("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[o,c&&n.jsxDEV("span",{className:"text-red-600 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:147,columnNumber:26},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:145,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:144,columnNumber:9},void 0),n.jsxDEV("div",{ref:h,className:f(i==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:t.map((k,U)=>{const _=s||k.disabled,w=r===k.value;return n.jsxDEV("label",{className:f("flex items-start cursor-pointer",_&&"opacity-50 cursor-not-allowed",l&&"border-red-600 dark:border-red-500"),children:[n.jsxDEV("input",{type:"radio",name:e,value:k.value,checked:w,onChange:()=>N(k.value,!!k.disabled),onKeyDown:S=>j(S,U),disabled:_,className:f("mt-0.5 mr-2",p.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",l&&"border-red-600 dark:border-red-500",_&&"cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:173,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:b?b(k):n.jsxDEV(n.Fragment,{children:[n.jsxDEV("span",{className:f("font-medium text-gray-700 dark:text-gray-300",p.label),children:k.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:197,columnNumber:21},void 0),k.description&&n.jsxDEV("p",{className:f("text-gray-500 dark:text-gray-400 mt-0.5",p.description),children:k.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:206,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:196,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:192,columnNumber:15},void 0)]},k.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:165,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:151,columnNumber:7},void 0),d&&n.jsxDEV("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:d},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:223,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/radio-group.tsx",lineNumber:142,columnNumber:5},void 0)},Tr=q.Root,Ui=q.Group,ba=q.Value,Je=G.forwardRef(({className:e,children:r,...a},t)=>n.jsxDEV(q.Trigger,{ref:t,className:f("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[r,n.jsxDEV(q.Icon,{asChild:!0,children:n.jsxDEV(Ze.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:27,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:26,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:17,columnNumber:3},void 0));Je.displayName=q.Trigger.displayName;const Lr=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(q.ScrollUpButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:n.jsxDEV(Ze.ChevronUp,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:45,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:37,columnNumber:3},void 0));Lr.displayName=q.ScrollUpButton.displayName;const Ir=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(q.ScrollDownButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:n.jsxDEV(Ze.ChevronDown,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:62,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:54,columnNumber:3},void 0));Ir.displayName=q.ScrollDownButton.displayName;const Re=G.forwardRef(({className:e,children:r,position:a="popper",...t},o)=>n.jsxDEV(q.Portal,{children:n.jsxDEV(q.Content,{ref:o,className:f(O.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...t,children:[n.jsxDEV(Lr,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:85,columnNumber:7},void 0),n.jsxDEV(q.Viewport,{className:f(O.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:86,columnNumber:7},void 0),n.jsxDEV(Ir,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:95,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:73,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:72,columnNumber:3},void 0));Re.displayName=q.Content.displayName;const fa=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(q.Label,{ref:a,className:f(O.overlays.dropdown.header(),"py-1.5",e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:105,columnNumber:3},void 0));fa.displayName=q.Label.displayName;const er=G.forwardRef(({className:e,children:r,...a},t)=>n.jsxDEV(q.Item,{ref:t,className:f(O.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[n.jsxDEV(q.ItemText,{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:126,columnNumber:5},void 0),n.jsxDEV("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxDEV(q.ItemIndicator,{children:n.jsxDEV(Ze.Check,{className:"h-4 w-4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:130,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:129,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:128,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:117,columnNumber:3},void 0));er.displayName=q.Item.displayName;const ga=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(q.Separator,{ref:a,className:f("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/select.tsx",lineNumber:141,columnNumber:3},void 0));ga.displayName=q.Separator.displayName;const ji=({options:e,value:r,onChange:a,placeholder:t="Select items...",searchPlaceholder:o="Search...",searchable:i=!0,maxDisplay:s=3,disabled:l=!1,className:d})=>{const[c,u]=y.useState(!1),[b,x]=y.useState(""),h=y.useRef(null),g=i?e.filter(_=>_.label.toLowerCase().includes(b.toLowerCase())):e,p=e.filter(_=>r.includes(_.value)),N=_=>{r.includes(_)?a(r.filter(w=>w!==_)):a([...r,_])},j=_=>{a(r.filter(w=>w!==_))};y.useEffect(()=>{const _=w=>{h.current&&!h.current.contains(w.target)&&(u(!1),x(""))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const k=p.length,U=k>s?k-s:0;return n.jsxDEV("div",{ref:h,className:f("relative w-full",d),children:[n.jsxDEV("button",{type:"button",onClick:()=>!l&&u(!c),disabled:l,className:f("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:n.jsxDEV("div",{className:"flex flex-wrap gap-1.5",children:p.length===0?n.jsxDEV("span",{className:"text-gray-500 dark:text-gray-400",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:140,columnNumber:13},void 0):n.jsxDEV(n.Fragment,{children:[p.slice(0,s).map(_=>n.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[_.label,n.jsxDEV("button",{onClick:w=>{w.stopPropagation(),j(_.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:n.jsxDEV("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:164,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:158,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:151,columnNumber:19},void 0)]},_.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:146,columnNumber:17},void 0)),U>0&&n.jsxDEV("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",U," more"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:175,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:144,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:138,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:123,columnNumber:7},void 0),c&&n.jsxDEV("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[i&&n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:b,onChange:_=>x(_.target.value),placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:_=>_.stopPropagation()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:190,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:189,columnNumber:13},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:g.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:204,columnNumber:15},void 0):g.map(_=>{const w=r.includes(_.value);return n.jsxDEV("button",{onClick:()=>!_.disabled&&N(_.value),disabled:_.disabled,className:f("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[n.jsxDEV("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center",w?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:w&&n.jsxDEV("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:241,columnNumber:27},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:235,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:226,columnNumber:21},void 0),n.jsxDEV("span",{className:"flex-1 text-gray-900 dark:text-white",children:_.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:252,columnNumber:21},void 0)]},_.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:212,columnNumber:19},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:202,columnNumber:11},void 0),r.length>0&&n.jsxDEV("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[r.length," selected"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:264,columnNumber:15},void 0),n.jsxDEV("button",{onClick:_=>{_.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:267,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:263,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:186,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/multi-select.tsx",lineNumber:121,columnNumber:5},void 0)},Ci=({options:e,value:r,onChange:a,placeholder:t="Select option...",searchPlaceholder:o="Search...",emptyMessage:i="No results found.",disabled:s=!1,className:l})=>{const[d,c]=y.useState(!1),[u,b]=y.useState(""),[x,h]=y.useState(0),g=y.useRef(null),p=y.useRef(null),N=e.filter(_=>_.label.toLowerCase().includes(u.toLowerCase())),j=e.find(_=>_.value===r);y.useEffect(()=>{if(!d)return;const _=w=>{g.current&&!g.current.contains(w.target)&&(c(!1),b(""))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[d]),y.useEffect(()=>{d&&p.current&&p.current.focus()},[d]),y.useEffect(()=>{h(0)},[u]);const k=_=>{if(!d){(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c(!0));return}switch(_.key){case"ArrowDown":_.preventDefault(),h(w=>w<N.length-1?w+1:w);break;case"ArrowUp":_.preventDefault(),h(w=>w>0?w-1:w);break;case"Enter":_.preventDefault(),N[x]&&!N[x].disabled&&(a(N[x].value),c(!1),b(""));break;case"Escape":_.preventDefault(),c(!1),b("");break}},U=(_,w)=>{w||(a(_),c(!1),b(""))};return n.jsxDEV("div",{ref:g,className:f("relative w-full",l),children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&c(!d),onKeyDown:k,disabled:s,className:f("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:f("truncate",!j&&"text-gray-500 dark:text-gray-400"),children:j?j.label:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:182,columnNumber:9},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 ml-2 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:199,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:190,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:165,columnNumber:7},void 0),d&&n.jsxDEV("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{ref:p,type:"text",value:u,onChange:_=>b(_.target.value),onKeyDown:k,placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:213,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:212,columnNumber:11},void 0),n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:N.length===0?n.jsxDEV("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:227,columnNumber:15},void 0):N.map((_,w)=>n.jsxDEV("button",{onClick:()=>U(_.value,_.disabled),disabled:_.disabled,className:f("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",_.value===r?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":w===x?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:_.label},_.value,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:232,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:225,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:210,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/combobox.tsx",lineNumber:163,columnNumber:5},void 0)};function ha(e,r){y.useEffect(()=>{const a=t=>{const o=e?.current;!o||o.contains(t?.target||null)||r(t)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[e,r])}const Si=({trigger:e,items:r,align:a="right",className:t="",variant:o="default"})=>{const[i,s]=y.useState(!1),l=y.useRef(null);ha(l,()=>s(!1));const d=b=>{b.disabled||(b.onClick(),s(!1))},c=a==="left"?O.overlays.dropdown.menuRight():O.overlays.dropdown.menuLeft(),u=o==="bordered"?O.overlays.dropdown.triggerBordered():O.overlays.dropdown.trigger();return n.jsxDEV("div",{className:`${O.overlays.dropdown.container()} ${t}`,ref:l,children:[n.jsxDEV("div",{className:u,onClick:()=>s(!i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:57,columnNumber:7},void 0),i&&n.jsxDEV("div",{className:`${O.overlays.dropdown.menu()} ${c} ${O.overlays.dropdown.menuBottom()}`,children:n.jsxDEV("div",{className:O.overlays.dropdown.itemContainer(),children:r.map(b=>b.separator?n.jsxDEV("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},b.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:68,columnNumber:17},void 0):n.jsxDEV("button",{onClick:()=>d(b),disabled:b.disabled,className:`${b.disabled?O.overlays.dropdown.itemDisabled():O.overlays.dropdown.item()} flex items-center gap-2`,children:[b.icon&&n.jsxDEV(b.icon,{className:O.overlays.dropdown.itemIcon()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:85,columnNumber:21},void 0),n.jsxDEV("span",{children:b.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:89,columnNumber:19},void 0)]},b.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:74,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:65,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:62,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dropdown.tsx",lineNumber:53,columnNumber:5},void 0)},Vi=({options:e,value:r,values:a=[],onChange:t,onValuesChange:o,multiple:i=!1,size:s="md",variant:l="default",className:d})=>{const c=(h,g)=>{if(!g)if(i){const p=a.includes(h)?a.filter(N=>N!==h):[...a,h];o?.(p)}else t?.(h)},u=h=>i?a.includes(h):r===h,b={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},x={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return n.jsxDEV("div",{className:f("inline-flex rounded-lg p-1 gap-1",x[l].base,d),role:"group",children:e.map(h=>{const g=u(h.value);return n.jsxDEV("button",{onClick:()=>c(h.value,h.disabled),disabled:h.disabled,className:f("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",b[s],g?x[l].selected:x[l].button,g?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":g,children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:148,columnNumber:15},void 0),h.label]},h.value,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:128,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/toggle-group.tsx",lineNumber:116,columnNumber:5},void 0)},Ai=({value:e,onChange:r,min:a=0,max:t=100,step:o=1,disabled:i=!1,showValue:s=!1,formatValue:l=g=>String(g),showMinMax:d=!1,minLabel:c,maxLabel:u,variant:b="primary",size:x="md",className:h})=>{const g={sm:"h-1",md:"h-2",lg:"h-3"},p={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},N=k=>{r(Number(k.target.value))},j=(e-a)/(t-a)*100;return n.jsxDEV("div",{className:f("w-full",h),children:[s&&n.jsxDEV("div",{className:"flex justify-between items-center mb-2",children:[n.jsxDEV("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:l(e)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:110,columnNumber:11},void 0),d&&n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c||a," - ",u||t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:114,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:109,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("div",{className:f("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",g[x])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:124,columnNumber:9},void 0),n.jsxDEV("div",{className:f("absolute left-0 rounded-full transition-all","bg-current",p[b],g[x]),style:{width:`${j}%`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:133,columnNumber:9},void 0),n.jsxDEV("input",{type:"range",min:a,max:t,step:o,value:e,onChange:N,disabled:i,className:f("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",g[x],p[b],i&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:144,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:122,columnNumber:7},void 0),d&&!s&&n.jsxDEV("div",{className:"flex justify-between mt-1",children:[n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:c||a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:186,columnNumber:11},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:u||t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:189,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:185,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider.tsx",lineNumber:106,columnNumber:5},void 0)},Ti=({value:e,onChange:r,min:a=0,max:t=100,step:o=1,showValue:i=!0,className:s})=>n.jsxDEV("div",{className:f("flex items-center gap-4",s),children:[n.jsxDEV("input",{type:"range",min:a,max:t,step:o,value:e,onChange:l=>r(Number(l.target.value)),className:"flex-1 accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:24,columnNumber:7},void 0),i&&n.jsxDEV("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:34,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/slider-input.tsx",lineNumber:23,columnNumber:5},void 0),Li=({onChange:e,accept:r,multiple:a=!1,maxSize:t,maxFiles:o,disabled:i=!1,showDropZone:s=!1,showFileList:l=!0,files:d=[],onRemove:c,className:u,buttonText:b="Choose Files",dropZoneText:x="Drop files here or click to browse"})=>{const h=y.useRef(null),[g,p]=y.useState(!1),[N,j]=y.useState(null),k=T=>(j(null),o&&d.length+T.length>o?(j(`Maximum ${o} files allowed`),[]):T.filter(I=>t&&I.size>t?(j(`File "${I.name}" exceeds maximum size of ${Mr(t)}`),!1):!0)),U=T=>{const M=Array.from(T.target.files||[]),I=k(M);I.length>0&&e(I),h.current&&(h.current.value="")},_=()=>{h.current?.click()},w=T=>{T.preventDefault(),T.stopPropagation(),i||p(!0)},S=T=>{T.preventDefault(),T.stopPropagation(),p(!1)},E=T=>{T.preventDefault(),T.stopPropagation()},V=T=>{if(T.preventDefault(),T.stopPropagation(),p(!1),i)return;const M=Array.from(T.dataTransfer.files),I=k(M);I.length>0&&e(I)},v=T=>{c&&c(T)};return s?n.jsxDEV("div",{className:f("w-full",u),children:[n.jsxDEV("input",{ref:h,type:"file",onChange:U,accept:r,multiple:a,disabled:i,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:170,columnNumber:9},void 0),n.jsxDEV("div",{onClick:_,onDragEnter:w,onDragLeave:S,onDragOver:E,onDrop:V,className:f("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",g?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",i&&"opacity-50 cursor-not-allowed"),children:n.jsxDEV("div",{className:"flex flex-col items-center justify-center space-y-3",children:[n.jsxDEV(A.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:197,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:x},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:198,columnNumber:13},void 0),t&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Mr(t)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:202,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:196,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:180,columnNumber:9},void 0),N&&n.jsxDEV("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:210,columnNumber:11},void 0),l&&d.length>0&&n.jsxDEV(pa,{files:d,onRemove:v},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:214,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:169,columnNumber:7},void 0):n.jsxDEV("div",{className:f("w-full",u),children:[n.jsxDEV("input",{ref:h,type:"file",onChange:U,accept:r,multiple:a,disabled:i,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:223,columnNumber:7},void 0),n.jsxDEV("button",{type:"button",onClick:_,disabled:i,className:f("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",i&&"opacity-50 cursor-not-allowed"),children:[n.jsxDEV(A.DocumentIcon,{className:"h-5 w-5 mr-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:248,columnNumber:9},void 0),b]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:233,columnNumber:7},void 0),N&&n.jsxDEV("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:253,columnNumber:9},void 0),l&&d.length>0&&n.jsxDEV(pa,{files:d,onRemove:v},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:257,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:222,columnNumber:5},void 0)},pa=({files:e,onRemove:r})=>n.jsxDEV("div",{className:"mt-3 space-y-2",children:e.map((a,t)=>n.jsxDEV("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[n.jsxDEV("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[n.jsxDEV(A.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:278,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:280,columnNumber:15},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Mr(a.size)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:283,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:279,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:277,columnNumber:11},void 0),n.jsxDEV("button",{type:"button",onClick:()=>r(t),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:n.jsxDEV(A.XMarkIcon,{className:"h-5 w-5"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:294,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:288,columnNumber:11},void 0)]},`${a.name}-${t}`,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:273,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/file-input.tsx",lineNumber:271,columnNumber:5},void 0);function Mr(e){if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB"],t=Math.floor(Math.log(e)/Math.log(r));return Math.round(e/Math.pow(r,t)*100)/100+" "+a[t]}const Ii=({value:e,onChange:r,placeholder:a="Type and press Enter...",maxTags:t,validate:o,validator:i,separators:s=[],allowDuplicates:l=!1,disabled:d=!1,error:c=!1,errorMessage:u,variant:b="primary",renderTag:x,className:h})=>{const g=o||i,[p,N]=y.useState(""),j=y.useRef(null),k={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},U=V=>{const v=V.trim();v&&(t&&e.length>=t||!l&&e.includes(v)||g&&!g(v)||(r([...e,v]),N("")))},_=V=>{r(e.filter((v,T)=>T!==V))},w=V=>{N(V.target.value)},S=V=>{V.key==="Enter"&&(V.preventDefault(),p.trim()&&U(p)),V.key===","&&(V.preventDefault(),p.trim()&&U(p)),s.length>0&&s.includes(V.key)&&V.key!==","&&(V.preventDefault(),p.trim()&&U(p)),V.key==="Backspace"&&!p&&e.length>0&&_(e.length-1),V.key==="Escape"&&N("")},E=t!==void 0&&e.length>=t;return n.jsxDEV("div",{className:f("w-full",h),children:[n.jsxDEV("div",{className:f("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",d&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",c&&"border-red-500 dark:border-red-400"),onClick:()=>!d&&j.current?.focus(),children:[e.map((V,v)=>x?n.jsxDEV(y.Fragment,{children:x(V,v,()=>_(v))},v,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:182,columnNumber:13},void 0):n.jsxDEV("span",{className:f("inline-flex items-center gap-1.5 px-2.5 py-1",k[b],"text-sm font-medium","rounded-md","transition-colors"),children:[n.jsxDEV("span",{className:"truncate max-w-[200px]",children:V},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:196,columnNumber:15},void 0),n.jsxDEV("button",{type:"button",onClick:T=>{T.stopPropagation(),_(v)},disabled:d,className:f("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${V}`,children:n.jsxDEV("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:217,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:211,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:197,columnNumber:15},void 0)]},v,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:186,columnNumber:13},void 0)),n.jsxDEV("input",{ref:j,type:"text",value:p,onChange:w,onKeyDown:S,placeholder:e.length===0?a:E?`Max ${t} tags`:"",disabled:d,className:f("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:230,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:165,columnNumber:7},void 0),u&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:255,columnNumber:9},void 0),t&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[e.length," / ",t," tags"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:262,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/tag-input.tsx",lineNumber:163,columnNumber:5},void 0)},Mi=({value:e,onChange:r,mentions:a,trigger:t="@",placeholder:o="Type a message...",disabled:i=!1,className:s})=>{const[l,d]=y.useState(!1),[c,u]=y.useState([]),[b,x]=y.useState(0),[h,g]=y.useState(0),p=y.useRef(null),N=y.useRef(null),j=_=>{const w=_.target.value,S=_.target.selectionStart||0;r(w),g(S);const V=w.substring(0,S).split(/\s/),v=V[V.length-1];if(v.startsWith(t)){const T=v.substring(t.length),M=a.filter(I=>I.label.toLowerCase().includes(T.toLowerCase()));u(M),d(M.length>0),x(0)}else d(!1)},k=_=>{const w=e.substring(0,h),S=e.substring(h),E=w.split(/\s/),V=E[E.length-1],v=w.length-V.length,T=e.substring(0,v)+t+_.label+" "+S;if(r(T),d(!1),p.current){const M=v+t.length+_.label.length+1;setTimeout(()=>{p.current?.focus(),p.current?.setSelectionRange(M,M)},0)}},U=_=>{if(l)switch(_.key){case"ArrowDown":_.preventDefault(),x(w=>w<c.length-1?w+1:w);break;case"ArrowUp":_.preventDefault(),x(w=>w>0?w-1:w);break;case"Enter":_.preventDefault(),c[b]&&k(c[b]);break;case"Escape":_.preventDefault(),d(!1);break}};return y.useEffect(()=>{const _=w=>{N.current&&!N.current.contains(w.target)&&p.current&&!p.current.contains(w.target)&&d(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]),n.jsxDEV("div",{className:f("relative w-full",s),children:[n.jsxDEV("textarea",{ref:p,value:e,onChange:j,onKeyDown:U,placeholder:o,disabled:i,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:181,columnNumber:7},void 0),l&&n.jsxDEV("div",{ref:N,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:c.map((_,w)=>n.jsxDEV("button",{onClick:()=>k(_),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[_.avatar&&n.jsxDEV("img",{src:_.avatar,alt:_.label,className:"w-8 h-8 rounded-full"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:218,columnNumber:17},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:_.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:225,columnNumber:17},void 0),_.metadata&&n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:_.metadata},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:229,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:224,columnNumber:15},void 0)]},_.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:207,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:202,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/mention-input.tsx",lineNumber:180,columnNumber:5},void 0)},Pi=Z.cva(`${L.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Pr=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(sn.Root,{ref:a,className:f(Pi(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/label.tsx",lineNumber:16,columnNumber:3},void 0));Pr.displayName=sn.Root.displayName;const Oi=({id:e,label:r,type:a="text",value:t,onChange:o,placeholder:i,helperText:s,error:l,required:d=!1,disabled:c=!1,maxLength:u,autoFocus:b=!1,className:x,inputClassName:h})=>{const g=!!l,p=s||l?`${e}-helper`:void 0;return n.jsxDEV("div",{className:f("space-y-2",x),children:[n.jsxDEV(Pr,{htmlFor:e,children:[r,d&&n.jsxDEV("span",{className:"text-red-500 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:80,columnNumber:22},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:78,columnNumber:7},void 0),n.jsxDEV(Xe,{type:a,id:e,value:t,onChange:o,placeholder:i,disabled:c,maxLength:u,autoFocus:b,required:d,"aria-invalid":g,"aria-describedby":p,className:h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:82,columnNumber:7},void 0),(s||l)&&n.jsxDEV("p",{id:p,className:f(L.body.sm(),g?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:g?"alert":void 0,children:l||s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:97,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field.tsx",lineNumber:77,columnNumber:5},void 0)},rr=({label:e,required:r=!1,error:a,helpText:t,children:o,layout:i="vertical",className:s="",labelClassName:l="",contentClassName:d=""})=>{const c=i==="horizontal";return n.jsxDEV("div",{className:`${c?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${s}`,children:[n.jsxDEV("div",{className:c?"md:col-span-1":"",children:[n.jsxDEV("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,r&&n.jsxDEV("span",{className:"text-red-500 ml-1",children:"*"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:42,columnNumber:24},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:38,columnNumber:9},void 0),t&&!a&&n.jsxDEV("div",{className:"mt-1 flex items-start",children:[n.jsxDEV(A.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:46,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:47,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:37,columnNumber:7},void 0),n.jsxDEV("div",{className:`${c?"md:col-span-2":""} ${d}`,children:[n.jsxDEV("div",{className:a?"relative":"",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:58,columnNumber:9},void 0),a&&n.jsxDEV("div",{className:"mt-1 flex items-start",children:[n.jsxDEV(A.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:63,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-red-600 dark:text-red-400",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:64,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:62,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:55,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:33,columnNumber:5},void 0)},Di=({label:e,value:r,onChange:a,placeholder:t,required:o=!1,error:i,helpText:s,type:l="text",layout:d="vertical",className:c=""})=>n.jsxDEV(rr,{label:e,required:o,error:i,helpText:s,layout:d,className:c,children:n.jsxDEV("input",{type:l,value:r,onChange:u=>a(u.target.value),placeholder:t,className:`
19
14
  block w-full px-3 py-2 border rounded-md shadow-sm
20
15
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
21
16
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
22
17
  transition-colors duration-200
23
- ${o?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
24
- `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:107,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:99,columnNumber:5},void 0),as=({label:e,value:r,onChange:t,placeholder:a,required:i=!1,error:o,helpText:s,rows:l=4,layout:c="vertical",className:u=""})=>n.jsxDEV(br,{label:e,required:i,error:o,helpText:s,layout:c,className:u,children:n.jsxDEV("textarea",{value:r,onChange:m=>t(m.target.value),placeholder:a,rows:l,className:`
18
+ ${i?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
19
+ `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:107,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:99,columnNumber:5},void 0),zi=({label:e,value:r,onChange:a,placeholder:t,required:o=!1,error:i,helpText:s,rows:l=4,layout:d="vertical",className:c=""})=>n.jsxDEV(rr,{label:e,required:o,error:i,helpText:s,layout:d,className:c,children:n.jsxDEV("textarea",{value:r,onChange:u=>a(u.target.value),placeholder:t,rows:l,className:`
25
20
  block w-full px-3 py-2 border rounded-md shadow-sm
26
21
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
27
22
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
28
23
  transition-colors duration-200 resize-vertical
29
- ${o?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
30
- `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:162,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:154,columnNumber:5},void 0),is=({label:e,value:r,onChange:t,options:a,required:i=!1,error:o,helpText:s,placeholder:l="Select an option",layout:c="vertical",className:u=""})=>n.jsxDEV(br,{label:e,required:i,error:o,helpText:s,layout:c,className:u,children:n.jsxDEV("select",{value:r,onChange:m=>t(m.target.value),className:`
24
+ ${i?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
25
+ `},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:162,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:154,columnNumber:5},void 0),Bi=({label:e,value:r,onChange:a,options:t,required:o=!1,error:i,helpText:s,placeholder:l="Select an option",layout:d="vertical",className:c=""})=>n.jsxDEV(rr,{label:e,required:o,error:i,helpText:s,layout:d,className:c,children:n.jsxDEV("select",{value:r,onChange:u=>a(u.target.value),className:`
31
26
  block w-full px-3 py-2 border rounded-md shadow-sm
32
27
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
33
28
  dark:bg-gray-800 dark:border-gray-600 dark:text-white
34
29
  transition-colors duration-200
35
- ${o?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
36
- `,children:[l&&n.jsxDEV("option",{value:"",disabled:!0,children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:233,columnNumber:11},void 0),a.map(m=>n.jsxDEV("option",{value:m.value,disabled:m.disabled,children:m.label},m.value,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:238,columnNumber:11},void 0))]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:217,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:209,columnNumber:5},void 0),os=({successMessage:e,errorMessage:r,successTitle:t="Success",errorTitle:a="Error",autoDismissDelay:i=0,onSuccessDismiss:o,className:s=""})=>(y.useEffect(()=>{if(e&&i>0&&o){const l=setTimeout(()=>{o()},i);return()=>clearTimeout(l)}},[e,i,o]),!e&&!r?null:n.jsxDEV("div",{className:`space-y-3 ${s}`,children:[r&&n.jsxDEV(wr,{variant:"error",title:a,description:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:68,columnNumber:9},void 0),e&&n.jsxDEV(wr,{variant:"success",title:t,description:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:71,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:66,columnNumber:5},void 0)),ss=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PhoneDirectory",children:r||"PhoneDirectory Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/phone-directory.tsx",lineNumber:26,columnNumber:5},void 0),Lt=J.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),me=Z.forwardRef(({className:e,variant:r,size:t,animation:a,asChild:i=!1,...o},s)=>{const l=i?wa.Slot:"button",c=r||"default",u=t&&t!=="default"&&t!=="icon"?t:void 0,m=h=>h?{sm:"small",lg:"large",default:"default"}[h]||h:"default",p=(()=>{if(c.startsWith("gradient")){const h=c.replace("gradient-","").replace("gradient","primary");return O.button.gradient[h]?.()||O.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(c))return O.button.web3[c]?.()||O.button.primary.default();{const h=m(u);return O.button[c]?.[h]?.()||O.button.primary.default()}}})();return n.jsxDEV(l,{className:f(Lt({size:t,animation:a}),p,e),ref:s,...o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/button.tsx",lineNumber:102,columnNumber:7},void 0)});me.displayName="Button";const ls=({children:e,isLoading:r=!1,loadingText:t="Loading...",showSpinner:a=!0,disabled:i,...o})=>n.jsxDEV(me,{...o,disabled:i||r,className:o.className,children:r?n.jsxDEV("span",{className:"flex items-center gap-2",children:[a&&n.jsxDEV(qe,{size:"small"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:51,columnNumber:27},void 0),n.jsxDEV("span",{children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:50,columnNumber:9},void 0):e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:44,columnNumber:5},void 0),It=({value:e,onChange:r,minDate:t,maxDate:a,disabledDates:i=[],showOutsideDays:o=!0,className:s})=>{const[l,c]=y.useState(e||new Date),u=j=>{const k=j.getFullYear(),C=j.getMonth();return new Date(k,C+1,0).getDate()},m=j=>{const k=j.getFullYear(),C=j.getMonth();return new Date(k,C,1).getDay()},b=(j,k)=>j.getFullYear()===k.getFullYear()&&j.getMonth()===k.getMonth()&&j.getDate()===k.getDate(),p=j=>t&&j<t||a&&j>a?!0:i.some(k=>b(j,k)),h=()=>{c(new Date(l.getFullYear(),l.getMonth()-1))},g=()=>{c(new Date(l.getFullYear(),l.getMonth()+1))},N=(()=>{const j=l.getFullYear(),k=l.getMonth(),C=u(l),w=m(l),S=[];if(o){const v=u(new Date(j,k-1));for(let T=w-1;T>=0;T--)S.push(new Date(j,k-1,v-T))}else for(let v=0;v<w;v++)S.push(null);for(let v=1;v<=C;v++)S.push(new Date(j,k,v));if(o){const v=42-S.length;for(let T=1;T<=v;T++)S.push(new Date(j,k+1,T))}return S})(),U=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_=j=>{!j||p(j)||r(j)},E=l.toLocaleDateString("en-US",{month:"long",year:"numeric"});return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[n.jsxDEV("button",{onClick:h,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:164,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:158,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:153,columnNumber:9},void 0),n.jsxDEV("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:E},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:173,columnNumber:9},void 0),n.jsxDEV("button",{onClick:g,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:188,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:177,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:152,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1 mb-2",children:U.map(j=>n.jsxDEV("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:j},j,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:201,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:199,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1",children:N.map((j,k)=>{if(!j)return n.jsxDEV("div",{className:"aspect-square"},k,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:214,columnNumber:20},void 0);const C=j.getMonth()===l.getMonth(),w=e&&b(j,e),S=b(j,new Date),v=p(j);return n.jsxDEV("button",{onClick:()=>_(j),disabled:v,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",C?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",w&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",S&&!w&&"border-2 border-blue-600 dark:border-blue-400"),children:j.getDate()},k,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:223,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:211,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:150,columnNumber:5},void 0)},us=({value:e,onChange:r,use12Hour:t=!1,minuteStep:a=1,minDate:i,maxDate:o,disabled:s=!1,className:l})=>{const[c,u]=y.useState(!1),[m,b]=y.useState(e),p=N=>{const U=N.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),_=N.getHours(),E=N.getMinutes();if(t){const j=_===0?12:_>12?_-12:_,k=_>=12?"PM":"AM";return`${U}, ${j}:${E.toString().padStart(2,"0")} ${k}`}return`${U}, ${_.toString().padStart(2,"0")}:${E.toString().padStart(2,"0")}`},h=N=>{const U=new Date(N);U.setHours(m.getHours()),U.setMinutes(m.getMinutes()),b(U),r(U)},g=N=>{const[U,_]=N.split(":").map(Number),E=new Date(m);E.setHours(U),E.setMinutes(_),b(E),r(E)},x=N=>{const U=N.getHours(),_=N.getMinutes();return`${U.toString().padStart(2,"0")}:${_.toString().padStart(2,"0")}`};return n.jsxDEV("div",{className:f("relative w-full",l),children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&u(!c),disabled:s,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-gray-900 dark:text-white",children:p(e)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:127,columnNumber:9},void 0),n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:136,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:130,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:112,columnNumber:7},void 0),c&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:n.jsxDEV("div",{className:"space-y-3",children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:151,columnNumber:15},void 0),n.jsxDEV(It,{value:m,onChange:h,minDate:i,maxDate:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:154,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:150,columnNumber:13},void 0),n.jsxDEV("div",{className:"h-px bg-gray-200 dark:bg-gray-700"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:163,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:167,columnNumber:15},void 0),n.jsxDEV(Ut,{value:x(m),onChange:g,use12Hour:t,minuteStep:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:170,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:166,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex gap-2 pt-2",children:[n.jsxDEV("button",{onClick:()=>u(!1),className:f("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:180,columnNumber:15},void 0),n.jsxDEV("button",{onClick:()=>{r(m),u(!1)},className:f("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:193,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:179,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:148,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:147,columnNumber:9},void 0),c&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>u(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:216,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:110,columnNumber:5},void 0)},cs=({value:e,onChange:r,minDate:t,maxDate:a,disabledDates:i=[],months:o=2,className:s})=>{const[l,c]=y.useState(new Date),[u,m]=y.useState(null),b=(w,S)=>w.getFullYear()===S.getFullYear()&&w.getMonth()===S.getMonth()&&w.getDate()===S.getDate(),p=w=>t&&w<t||a&&w>a?!0:i.some(S=>b(w,S)),h=w=>{if(!e.start||!e.end&&!u)return!1;const S=e.end||u;return S?w>e.start&&w<S:!1},g=w=>e.start?b(w,e.start):!1,x=w=>e.end?b(w,e.end):!1,N=w=>{p(w)||(!e.start||e.start&&e.end?r({start:w,end:null}):w<e.start?r({start:w,end:e.start}):r({start:e.start,end:w}))},U=w=>{const S=w.getFullYear(),v=w.getMonth();return new Date(S,v+1,0).getDate()},_=w=>{const S=w.getFullYear(),v=w.getMonth();return new Date(S,v,1).getDay()},E=w=>{const S=new Date(l.getFullYear(),l.getMonth()+w),v=S.getFullYear(),T=S.getMonth(),P=U(S),I=_(S),z=[];for(let R=0;R<I;R++)z.push(null);for(let R=1;R<=P;R++)z.push(new Date(v,T,R));return{days:z,monthName:S.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},j=()=>{c(new Date(l.getFullYear(),l.getMonth()-1))},k=()=>{c(new Date(l.getFullYear(),l.getMonth()+1))},C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[n.jsxDEV("button",{onClick:j,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:185,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:179,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:174,columnNumber:9},void 0),n.jsxDEV("button",{onClick:k,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:205,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:199,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:194,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:173,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${o}, 1fr)`},children:Array.from({length:o},(w,S)=>{const{days:v,monthName:T}=E(S);return n.jsxDEV("div",{children:[n.jsxDEV("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:T},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:226,columnNumber:15},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1 mb-2",children:C.map(P=>n.jsxDEV("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:P},P,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:233,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:231,columnNumber:15},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1",children:v.map((P,I)=>{if(!P)return n.jsxDEV("div",{className:"aspect-square"},I,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:246,columnNumber:28},void 0);const z=p(P),R=g(P),F=x(P),ne=h(P),Re=b(P,new Date);return n.jsxDEV("button",{onClick:()=>N(P),onMouseEnter:()=>m(P),onMouseLeave:()=>m(null),disabled:z,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",ne&&"bg-blue-100 dark:bg-blue-900/30",(R||F)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!R&&!F&&!ne&&"hover:bg-gray-100 dark:hover:bg-gray-800",Re&&!R&&!F&&"border-2 border-blue-600 dark:border-blue-400"),children:P.getDate()},I,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:256,columnNumber:21},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:243,columnNumber:15},void 0)]},S,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:224,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:216,columnNumber:7},void 0),(e.start||e.end)&&n.jsxDEV("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:n.jsxDEV("div",{className:"flex items-center justify-between text-sm",children:[n.jsxDEV("div",{children:[n.jsxDEV("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:293,columnNumber:15},void 0),n.jsxDEV("span",{className:"font-medium text-gray-900 dark:text-white",children:e.start?.toLocaleDateString()||"Not selected"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:294,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:292,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:299,columnNumber:15},void 0),n.jsxDEV("span",{className:"font-medium text-gray-900 dark:text-white",children:e.end?.toLocaleDateString()||"Not selected"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:300,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:298,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:291,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:290,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:171,columnNumber:5},void 0)},ms=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UtimeUslotUpicker",children:r||"UtimeUslotUpicker Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/time-slot-picker.tsx",lineNumber:43,columnNumber:5},void 0),ds=({value:e,onChange:r,presets:t=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:a=!0,showOpacity:i=!1,className:o})=>{const[s,l]=y.useState(e),[c,u]=y.useState(100),m=x=>{r(x),l(x)},b=x=>{const N=x.target.value;l(N),/^#[0-9A-F]{6}$/i.test(N)&&r(N)},p=x=>{u(Number(x.target.value))},g=i?((x,N)=>{const U=parseInt(x.slice(1,3),16),_=parseInt(x.slice(3,5),16),E=parseInt(x.slice(5,7),16);return`rgba(${U}, ${_}, ${E}, ${N/100})`})(e,c):e;return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",o),children:[n.jsxDEV("div",{className:"mb-4",children:n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:g}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:107,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:112,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[e,i&&` (${c}%)`]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:115,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:111,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:106,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:105,columnNumber:7},void 0),n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:125,columnNumber:9},void 0),n.jsxDEV("div",{className:"grid grid-cols-6 gap-2",children:t.map(x=>n.jsxDEV("button",{onClick:()=>m(x),className:f("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",x===e?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:x},"aria-label":`Select color ${x}`},x,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:130,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:128,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:124,columnNumber:7},void 0),a&&n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:149,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:s,onChange:b,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:153,columnNumber:13},void 0),n.jsxDEV("input",{type:"color",value:e,onChange:x=>m(x.target.value),className:"w-12 h-10 rounded-md cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:160,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:152,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:148,columnNumber:9},void 0),i&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",c,"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:173,columnNumber:11},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"100",value:c,onChange:p,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:176,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:172,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:103,columnNumber:5},void 0)},bs=({value:e,onChange:r,presets:t,className:a})=>{const o=t||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return n.jsxDEV("div",{className:f("space-y-3",a),children:[n.jsxDEV("input",{type:"color",value:e,onChange:s=>r(s.target.value),className:"w-full h-12 rounded cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:30,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-8 gap-2",children:o.map(s=>n.jsxDEV("button",{onClick:()=>r(s),className:f("w-8 h-8 rounded border-2",e===s?"border-blue-500":"border-transparent"),style:{backgroundColor:s}},s,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:38,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:36,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:29,columnNumber:5},void 0)},fs=({colors:e,selectedColor:r,onColorSelect:t,size:a="md",showNames:i=!1,showCopy:o=!1,className:s})=>{const[l,c]=y.useState(null),u={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},m=()=>e.map(h=>typeof h=="string"?{hex:h}:h),b=async(h,g)=>{g.stopPropagation(),await navigator.clipboard.writeText(h),c(h),setTimeout(()=>c(null),2e3)},p=m();return n.jsxDEV("div",{className:f("flex flex-wrap gap-3",s),children:p.map((h,g)=>{const x=r===h.hex,N=l===h.hex;return n.jsxDEV("div",{className:"flex flex-col items-center gap-2",children:[n.jsxDEV("button",{onClick:()=>t?.(h.hex),className:f("rounded-lg transition-all relative group",u[a],x&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!x&&"hover:scale-110"),style:{backgroundColor:h.hex},"aria-label":h.name||h.hex,children:o&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:U=>b(h.hex,U),children:N?n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:108,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:102,columnNumber:21},void 0):n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:122,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:116,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:97,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:84,columnNumber:13},void 0),i&&n.jsxDEV("div",{className:"text-center",children:[h.name&&n.jsxDEV("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:h.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:137,columnNumber:19},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:h.hex},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:141,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:135,columnNumber:15},void 0)]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:83,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:77,columnNumber:5},void 0)},gs=({onSave:e,width:r=400,height:t=200,className:a})=>n.jsxDEV("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",a),children:[n.jsxDEV("canvas",{width:r,height:t,className:"bg-white dark:bg-gray-900"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:23,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex gap-2 p-2",children:[n.jsxDEV("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:29,columnNumber:9},void 0),n.jsxDEV("button",{onClick:()=>e?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:32,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:17,columnNumber:5},void 0),hs=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"SignatureRequest",children:r||"SignatureRequest Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-request.tsx",lineNumber:26,columnNumber:5},void 0),xs=({value:e,onChange:r,placeholder:t,className:a})=>n.jsxDEV("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",a),children:[n.jsxDEV("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(i=>n.jsxDEV("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:i},i,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:25,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:23,columnNumber:7},void 0),n.jsxDEV("textarea",{value:e,onChange:i=>r(i.target.value),placeholder:t,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:17,columnNumber:5},void 0),ps=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UmarkdownUrenderer",children:r||"UmarkdownUrenderer Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/markdown-renderer.tsx",lineNumber:43,columnNumber:5},void 0),Ns=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UcodeUhighlighter",children:r||"UcodeUhighlighter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/code-highlighter.tsx",lineNumber:43,columnNumber:5},void 0),ys=({cardNumber:e,onCardNumberChange:r,expiryDate:t="",onExpiryDateChange:a,cvv:i="",onCVVChange:o,cardholderName:s="",onCardholderNameChange:l,showAllFields:c=!1,disabled:u=!1,className:m})=>{const b=j=>{const k=j.replace(/\s/g,"");return/^4/.test(k)?"visa":/^5[1-5]/.test(k)?"mastercard":/^3[47]/.test(k)?"amex":/^6(?:011|5)/.test(k)?"discover":"unknown"},p=b(e),h=j=>{const k=j.replace(/\D/g,"");if(b(k)==="amex"){const P=k.slice(0,15);return[P.slice(0,4),P.slice(4,10),P.slice(10,15)].filter(Boolean).join(" ")}return(k.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},g=j=>{const w=j.replace(/\D/g,"").slice(0,4);return w.length>=2?`${w.slice(0,2)}/${w.slice(2)}`:w},x=j=>{const k=j.replace(/\D/g,""),C=p==="amex"?4:3;return k.slice(0,C)},N=j=>{const k=h(j.target.value);r(k)},U=j=>{if(!a)return;const k=g(j.target.value);a(k)},_=j=>{if(!o)return;const k=x(j.target.value);o(k)},E=()=>{switch(p){case"visa":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:157,columnNumber:13},void 0),n.jsxDEV("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:158,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:156,columnNumber:11},void 0);case"mastercard":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:167,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:168,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:169,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:166,columnNumber:11},void 0);case"amex":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:175,columnNumber:13},void 0),n.jsxDEV("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:176,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:174,columnNumber:11},void 0);case"discover":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:182,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:183,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:181,columnNumber:11},void 0);default:return n.jsxDEV("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:194,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:188,columnNumber:11},void 0)}};return n.jsxDEV("div",{className:f("w-full space-y-3",m),children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:209,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("input",{type:"text",value:e,onChange:N,placeholder:"1234 5678 9012 3456",disabled:u,className:f("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:213,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:E()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:228,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:212,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:208,columnNumber:7},void 0),c&&n.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:238,columnNumber:13},void 0),n.jsxDEV("input",{type:"text",value:t,onChange:U,placeholder:"MM/YY",disabled:u,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:241,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:237,columnNumber:11},void 0),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:259,columnNumber:13},void 0),n.jsxDEV("input",{type:"text",value:i,onChange:_,placeholder:p==="amex"?"1234":"123",disabled:u,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:262,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:258,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:236,columnNumber:9},void 0),c&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:284,columnNumber:11},void 0),n.jsxDEV("input",{type:"text",value:s,onChange:j=>l?.(j.target.value),placeholder:"John Doe",disabled:u,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:287,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:283,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:206,columnNumber:5},void 0)},Pt=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],vs=({value:e,onChange:r,currency:t="USD",onCurrencyChange:a,currencies:i=Pt,showCurrencySelector:o=!1,placeholder:s="0.00",min:l,max:c,disabled:u=!1,className:m})=>{const[b,p]=y.useState(""),[h,g]=y.useState(!1),[x,N]=y.useState(!1),_=typeof t=="string"?i.find(S=>S.code===t)||Pt[0]:t,E=y.useCallback(S=>{const v=_.decimals??2;return S.toLocaleString("en-US",{minimumFractionDigits:v,maximumFractionDigits:v})},[_]);y.useEffect(()=>{h||p(E(e||0))},[e,E,h]);const j=S=>{const T=S.target.value.replace(/[^\d.]/g,""),P=T.split("."),I=P.length>2?`${P[0]}.${P.slice(1).join("")}`:T;p(I);let R=parseFloat(I)||0;l!==void 0&&R<l&&(R=l),c!==void 0&&R>c&&(R=c),r(R)},k=()=>{g(!0),p(e?e.toString():"")},C=()=>{g(!1),p(E(e||0))},w=S=>{a?.(S),N(!1)};return n.jsxDEV("div",{className:f("relative w-full",m),children:[n.jsxDEV("div",{className:"flex gap-2",children:[o&&n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{type:"button",onClick:()=>!u&&N(!x),disabled:u,className:f("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",x&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:_.code},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:196,columnNumber:15},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",x&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:208,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:199,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:181,columnNumber:13},void 0),x&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:i.map(S=>n.jsxDEV("button",{onClick:()=>w(S.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",S.code===_.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[n.jsxDEV("span",{className:"text-lg font-semibold w-8",children:S.symbol},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:233,columnNumber:23},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:S.code},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:237,columnNumber:25},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:S.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:240,columnNumber:25},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:236,columnNumber:23},void 0)]},S.code,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:222,columnNumber:21},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:220,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:219,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:180,columnNumber:11},void 0),n.jsxDEV("div",{className:"relative flex-1",children:[n.jsxDEV("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:_.symbol},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:254,columnNumber:11},void 0),n.jsxDEV("input",{type:"text",value:b,onChange:j,onFocus:k,onBlur:C,placeholder:s,disabled:u,className:f("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:257,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:253,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:177,columnNumber:7},void 0),(l!==void 0||c!==void 0)&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:l!==void 0&&c!==void 0?`Range: ${_.symbol}${E(l)} - ${_.symbol}${E(c)}`:l!==void 0?`Minimum: ${_.symbol}${E(l)}`:`Maximum: ${_.symbol}${E(c)}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:279,columnNumber:9},void 0),x&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>N(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:290,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:176,columnNumber:5},void 0)},js=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UcurrencyUconverter",children:r||"UcurrencyUconverter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-converter.tsx",lineNumber:43,columnNumber:5},void 0),_s=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UcurrencyUrates",children:r||"UcurrencyUrates Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-rates.tsx",lineNumber:43,columnNumber:5},void 0),ks=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UformUbuilder",children:r||"UformUbuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-builder.tsx",lineNumber:43,columnNumber:5},void 0),ws=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UformUvalidator",children:r||"UformUvalidator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-validator.tsx",lineNumber:43,columnNumber:5},void 0),Es=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UformUtemplate",children:r||"UformUtemplate Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-template.tsx",lineNumber:43,columnNumber:5},void 0),Us=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UschemaUvalidator",children:r||"UschemaUvalidator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/schema-validator.tsx",lineNumber:43,columnNumber:5},void 0),Ds=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UfieldUmapper",children:r||"UfieldUmapper Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/field-mapper.tsx",lineNumber:43,columnNumber:5},void 0),Cs=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UsurveyUbuilder",children:r||"UsurveyUbuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/survey-builder.tsx",lineNumber:43,columnNumber:5},void 0),Ss=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"QuizBuilder",children:r||"QuizBuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/quiz-builder.tsx",lineNumber:26,columnNumber:5},void 0),Vs=(e,r,t)=>{if(t)return`${t}/address/${e}`;if(!r)return null;if(r<0)return`https://explorer.solana.com/address/${e}${r===-101?"":r===-102?"?cluster=devnet":"?cluster=testnet"}`;const i={1:"https://etherscan.io",11155111:"https://sepolia.etherscan.io",5:"https://goerli.etherscan.io",137:"https://polygonscan.com",80002:"https://amoy.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org"}[r];return i?`${i}/address/${e}`:null},As=(e,r)=>r==="full"?e:r==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,Ts=({address:e,chainId:r,explorerUrl:t,label:a,format:i="short",showCopy:o=!0,showExplorer:s=!0,className:l="",textClassName:c=""})=>{const[u,m]=y.useState(!1),b=As(e,i),p=Vs(e,r,t),h=async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}};return n.jsxDEV("div",{className:f("flex items-center gap-2",l),children:[a&&n.jsxDEV("span",{className:L.label.default(),children:[a,":"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:136,columnNumber:17},void 0),n.jsxDEV("span",{className:f("font-mono text-sm",i==="full"&&"break-all",c),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:138,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center gap-1",children:[o&&n.jsxDEV("button",{onClick:h,className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),title:u?"Copied!":"Copy address","aria-label":"Copy address",children:u?n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:166,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:160,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:180,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:174,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:150,columnNumber:11},void 0),s&&p&&n.jsxDEV("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400"),title:"View on block explorer","aria-label":"View on block explorer",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:209,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:203,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:192,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:148,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:135,columnNumber:5},void 0)},Ls=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UanimatedUcounter",children:r||"UanimatedUcounter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-counter.tsx",lineNumber:43,columnNumber:5},void 0),Mt=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Is=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},Ps=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},Ms=e=>{const r=typeof document<"u"?document.head:null;if(r&&e)try{return r.appendChild(e),!0}catch{}return!1},fr=({animation:e="fade-in-up",delay:r=0,duration:t=600,once:a=!0,children:i,className:o="",threshold:s=.1})=>{const[l,c]=y.useState(!1),[u,m]=y.useState(!1),b=y.useRef(null);y.useEffect(()=>{if(!Mt()||typeof IntersectionObserver>"u"){c(!0),a&&m(!0);return}const h=new IntersectionObserver(([x])=>{x.isIntersecting&&(!u||!a)?(c(!0),a&&m(!0)):a||c(!1)},{threshold:s}),g=b.current;return g&&h.observe(g),()=>{g&&h.unobserve(g)}},[s,a,u]);const p=()=>{if(e==="none")return"";const h=`transition-all duration-${t} ease-out`,g=r>0?`delay-${r}`:"",x={"fade-in-up":l?`opacity-100 translate-y-0 ${h} ${g}`:`opacity-0 translate-y-8 ${h} ${g}`,"fade-in-scale":l?`opacity-100 scale-100 ${h} ${g}`:`opacity-0 scale-95 ${h} ${g}`,"fade-in-left":l?`opacity-100 translate-x-0 ${h} ${g}`:`opacity-0 -translate-x-8 ${h} ${g}`,"fade-in-right":l?`opacity-100 translate-x-0 ${h} ${g}`:`opacity-0 translate-x-8 ${h} ${g}`,"slide-in-bottom":l?`translate-y-0 ${h} ${g}`:`translate-y-full ${h} ${g}`,"zoom-in":l?`opacity-100 scale-100 ${h} ${g}`:`opacity-0 scale-50 ${h} ${g}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return x[e]||x["fade-in-up"]};return y.useEffect(()=>{if(Mt()&&(e==="float"||e==="bounce-slow")){const h="animated-section-keyframes";if(!Is(h)){const g=Ps("style");g&&(g.id=h,g.textContent=`
30
+ ${i?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
31
+ `,children:[l&&n.jsxDEV("option",{value:"",disabled:!0,children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:233,columnNumber:11},void 0),t.map(u=>n.jsxDEV("option",{value:u.value,disabled:u.disabled,children:u.label},u.value,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:238,columnNumber:11},void 0))]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:217,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/form-field-group.tsx",lineNumber:209,columnNumber:5},void 0),Wi=({successMessage:e,errorMessage:r,successTitle:a="Success",errorTitle:t="Error",autoDismissDelay:o=0,onSuccessDismiss:i,className:s=""})=>(y.useEffect(()=>{if(e&&o>0&&i){const l=setTimeout(()=>{i()},o);return()=>clearTimeout(l)}},[e,o,i]),!e&&!r?null:n.jsxDEV("div",{className:`space-y-3 ${s}`,children:[r&&n.jsxDEV(br,{variant:"error",title:t,description:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:68,columnNumber:9},void 0),e&&n.jsxDEV(br,{variant:"success",title:a,description:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:71,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/form-alerts.tsx",lineNumber:66,columnNumber:5},void 0)),Fi=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PhoneDirectory",children:r||"PhoneDirectory Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/inputs/phone-directory.tsx",lineNumber:26,columnNumber:5},void 0),xa=Z.cva("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),oe=G.forwardRef(({className:e,variant:r,size:a,animation:t,asChild:o=!1,...i},s)=>{const l=o?ct.Slot:"button",d=r||"default",c=a&&a!=="default"&&a!=="icon"?a:void 0,u=h=>h?{sm:"small",lg:"large",default:"default"}[h]||h:"default",x=(()=>{if(d.startsWith("gradient")){const h=d.replace("gradient-","").replace("gradient","primary");return O.button.gradient[h]?.()||O.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(d))return O.button.web3[d]?.()||O.button.primary.default();{const h=u(c);return O.button[d]?.[h]?.()||O.button.primary.default()}}})();return n.jsxDEV(l,{className:f(xa({size:a,animation:t}),x,e),ref:s,...i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/button.tsx",lineNumber:102,columnNumber:7},void 0)});oe.displayName="Button";const qi=({children:e,isLoading:r=!1,loadingText:a="Loading...",showSpinner:t=!0,disabled:o,...i})=>n.jsxDEV(oe,{...i,disabled:o||r,className:i.className,children:r?n.jsxDEV("span",{className:"flex items-center gap-2",children:[t&&n.jsxDEV(Me,{size:"small"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:51,columnNumber:27},void 0),n.jsxDEV("span",{children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:50,columnNumber:9},void 0):e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/action-button.tsx",lineNumber:44,columnNumber:5},void 0),Na=({value:e,onChange:r,minDate:a,maxDate:t,disabledDates:o=[],showOutsideDays:i=!0,className:s})=>{const[l,d]=y.useState(e||new Date),c=_=>{const w=_.getFullYear(),S=_.getMonth();return new Date(w,S+1,0).getDate()},u=_=>{const w=_.getFullYear(),S=_.getMonth();return new Date(w,S,1).getDay()},b=(_,w)=>_.getFullYear()===w.getFullYear()&&_.getMonth()===w.getMonth()&&_.getDate()===w.getDate(),x=_=>a&&_<a||t&&_>t?!0:o.some(w=>b(_,w)),h=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},g=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},N=(()=>{const _=l.getFullYear(),w=l.getMonth(),S=c(l),E=u(l),V=[];if(i){const v=c(new Date(_,w-1));for(let T=E-1;T>=0;T--)V.push(new Date(_,w-1,v-T))}else for(let v=0;v<E;v++)V.push(null);for(let v=1;v<=S;v++)V.push(new Date(_,w,v));if(i){const v=42-V.length;for(let T=1;T<=v;T++)V.push(new Date(_,w+1,T))}return V})(),j=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],k=_=>{!_||x(_)||r(_)},U=l.toLocaleDateString("en-US",{month:"long",year:"numeric"});return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[n.jsxDEV("button",{onClick:h,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:164,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:158,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:153,columnNumber:9},void 0),n.jsxDEV("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:U},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:173,columnNumber:9},void 0),n.jsxDEV("button",{onClick:g,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:188,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:177,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:152,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1 mb-2",children:j.map(_=>n.jsxDEV("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:_},_,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:201,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:199,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1",children:N.map((_,w)=>{if(!_)return n.jsxDEV("div",{className:"aspect-square"},w,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:214,columnNumber:20},void 0);const S=_.getMonth()===l.getMonth(),E=e&&b(_,e),V=b(_,new Date),v=x(_);return n.jsxDEV("button",{onClick:()=>k(_),disabled:v,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",S?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",E&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",V&&!E&&"border-2 border-blue-600 dark:border-blue-400"),children:_.getDate()},w,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:223,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:211,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/calendar.tsx",lineNumber:150,columnNumber:5},void 0)},$i=({value:e,onChange:r,use12Hour:a=!1,minuteStep:t=1,minDate:o,maxDate:i,disabled:s=!1,className:l})=>{const[d,c]=y.useState(!1),[u,b]=y.useState(e),x=N=>{const j=N.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),k=N.getHours(),U=N.getMinutes();if(a){const _=k===0?12:k>12?k-12:k,w=k>=12?"PM":"AM";return`${j}, ${_}:${U.toString().padStart(2,"0")} ${w}`}return`${j}, ${k.toString().padStart(2,"0")}:${U.toString().padStart(2,"0")}`},h=N=>{const j=new Date(N);j.setHours(u.getHours()),j.setMinutes(u.getMinutes()),b(j),r(j)},g=N=>{const[j,k]=N.split(":").map(Number),U=new Date(u);U.setHours(j),U.setMinutes(k),b(U),r(U)},p=N=>{const j=N.getHours(),k=N.getMinutes();return`${j.toString().padStart(2,"0")}:${k.toString().padStart(2,"0")}`};return n.jsxDEV("div",{className:f("relative w-full",l),children:[n.jsxDEV("button",{type:"button",onClick:()=>!s&&c(!d),disabled:s,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-gray-900 dark:text-white",children:x(e)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:127,columnNumber:9},void 0),n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:136,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:130,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:112,columnNumber:7},void 0),d&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:n.jsxDEV("div",{className:"space-y-3",children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:151,columnNumber:15},void 0),n.jsxDEV(Na,{value:u,onChange:h,minDate:o,maxDate:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:154,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:150,columnNumber:13},void 0),n.jsxDEV("div",{className:"h-px bg-gray-200 dark:bg-gray-700"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:163,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:167,columnNumber:15},void 0),n.jsxDEV(ua,{value:p(u),onChange:g,use12Hour:a,minuteStep:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:170,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:166,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex gap-2 pt-2",children:[n.jsxDEV("button",{onClick:()=>c(!1),className:f("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:180,columnNumber:15},void 0),n.jsxDEV("button",{onClick:()=>{r(u),c(!1)},className:f("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:193,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:179,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:148,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:147,columnNumber:9},void 0),d&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:216,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/date-time-picker.tsx",lineNumber:110,columnNumber:5},void 0)},Hi=({value:e,onChange:r,minDate:a,maxDate:t,disabledDates:o=[],months:i=2,className:s})=>{const[l,d]=y.useState(new Date),[c,u]=y.useState(null),b=(E,V)=>E.getFullYear()===V.getFullYear()&&E.getMonth()===V.getMonth()&&E.getDate()===V.getDate(),x=E=>a&&E<a||t&&E>t?!0:o.some(V=>b(E,V)),h=E=>{if(!e.start||!e.end&&!c)return!1;const V=e.end||c;return V?E>e.start&&E<V:!1},g=E=>e.start?b(E,e.start):!1,p=E=>e.end?b(E,e.end):!1,N=E=>{x(E)||(!e.start||e.start&&e.end?r({start:E,end:null}):E<e.start?r({start:E,end:e.start}):r({start:e.start,end:E}))},j=E=>{const V=E.getFullYear(),v=E.getMonth();return new Date(V,v+1,0).getDate()},k=E=>{const V=E.getFullYear(),v=E.getMonth();return new Date(V,v,1).getDay()},U=E=>{const V=new Date(l.getFullYear(),l.getMonth()+E),v=V.getFullYear(),T=V.getMonth(),M=j(V),I=k(V),z=[];for(let D=0;D<I;D++)z.push(null);for(let D=1;D<=M;D++)z.push(new Date(v,T,D));return{days:z,monthName:V.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},_=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},w=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},S=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[n.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[n.jsxDEV("button",{onClick:_,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:185,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:179,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:174,columnNumber:9},void 0),n.jsxDEV("button",{onClick:w,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:205,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:199,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:194,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:173,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${i}, 1fr)`},children:Array.from({length:i},(E,V)=>{const{days:v,monthName:T}=U(V);return n.jsxDEV("div",{children:[n.jsxDEV("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:T},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:226,columnNumber:15},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1 mb-2",children:S.map(M=>n.jsxDEV("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:M},M,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:233,columnNumber:19},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:231,columnNumber:15},void 0),n.jsxDEV("div",{className:"grid grid-cols-7 gap-1",children:v.map((M,I)=>{if(!M)return n.jsxDEV("div",{className:"aspect-square"},I,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:246,columnNumber:28},void 0);const z=x(M),D=g(M),W=p(M),ae=h(M),an=b(M,new Date);return n.jsxDEV("button",{onClick:()=>N(M),onMouseEnter:()=>u(M),onMouseLeave:()=>u(null),disabled:z,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",ae&&"bg-blue-100 dark:bg-blue-900/30",(D||W)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!D&&!W&&!ae&&"hover:bg-gray-100 dark:hover:bg-gray-800",an&&!D&&!W&&"border-2 border-blue-600 dark:border-blue-400"),children:M.getDate()},I,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:256,columnNumber:21},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:243,columnNumber:15},void 0)]},V,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:224,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:216,columnNumber:7},void 0),(e.start||e.end)&&n.jsxDEV("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:n.jsxDEV("div",{className:"flex items-center justify-between text-sm",children:[n.jsxDEV("div",{children:[n.jsxDEV("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:293,columnNumber:15},void 0),n.jsxDEV("span",{className:"font-medium text-gray-900 dark:text-white",children:e.start?.toLocaleDateString()||"Not selected"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:294,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:292,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:299,columnNumber:15},void 0),n.jsxDEV("span",{className:"font-medium text-gray-900 dark:text-white",children:e.end?.toLocaleDateString()||"Not selected"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:300,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:298,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:291,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:290,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/date-range-picker.tsx",lineNumber:171,columnNumber:5},void 0)},Gi=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UtimeUslotUpicker",children:r||"UtimeUslotUpicker Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/time-slot-picker.tsx",lineNumber:43,columnNumber:5},void 0),Yi=({value:e,onChange:r,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:t=!0,showOpacity:o=!1,className:i})=>{const[s,l]=y.useState(e),[d,c]=y.useState(100),u=p=>{r(p),l(p)},b=p=>{const N=p.target.value;l(N),/^#[0-9A-F]{6}$/i.test(N)&&r(N)},x=p=>{c(Number(p.target.value))},g=o?((p,N)=>{const j=parseInt(p.slice(1,3),16),k=parseInt(p.slice(3,5),16),U=parseInt(p.slice(5,7),16);return`rgba(${j}, ${k}, ${U}, ${N/100})`})(e,d):e;return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",i),children:[n.jsxDEV("div",{className:"mb-4",children:n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:g}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:107,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:112,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[e,o&&` (${d}%)`]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:115,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:111,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:106,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:105,columnNumber:7},void 0),n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:125,columnNumber:9},void 0),n.jsxDEV("div",{className:"grid grid-cols-6 gap-2",children:a.map(p=>n.jsxDEV("button",{onClick:()=>u(p),className:f("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",p===e?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:p},"aria-label":`Select color ${p}`},p,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:130,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:128,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:124,columnNumber:7},void 0),t&&n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:149,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("input",{type:"text",value:s,onChange:b,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:153,columnNumber:13},void 0),n.jsxDEV("input",{type:"color",value:e,onChange:p=>u(p.target.value),className:"w-12 h-10 rounded-md cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:160,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:152,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:148,columnNumber:9},void 0),o&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",d,"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:173,columnNumber:11},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"100",value:d,onChange:x,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:176,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:172,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker.tsx",lineNumber:103,columnNumber:5},void 0)},Ki=({value:e,onChange:r,presets:a,className:t})=>{const i=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return n.jsxDEV("div",{className:f("space-y-3",t),children:[n.jsxDEV("input",{type:"color",value:e,onChange:s=>r(s.target.value),className:"w-full h-12 rounded cursor-pointer"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:30,columnNumber:7},void 0),n.jsxDEV("div",{className:"grid grid-cols-8 gap-2",children:i.map(s=>n.jsxDEV("button",{onClick:()=>r(s),className:f("w-8 h-8 rounded border-2",e===s?"border-blue-500":"border-transparent"),style:{backgroundColor:s}},s,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:38,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:36,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-picker-advanced.tsx",lineNumber:29,columnNumber:5},void 0)},Zi=({colors:e,selectedColor:r,onColorSelect:a,size:t="md",showNames:o=!1,showCopy:i=!1,className:s})=>{const[l,d]=y.useState(null),c={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},u=()=>e.map(h=>typeof h=="string"?{hex:h}:h),b=async(h,g)=>{g.stopPropagation(),await navigator.clipboard.writeText(h),d(h),setTimeout(()=>d(null),2e3)},x=u();return n.jsxDEV("div",{className:f("flex flex-wrap gap-3",s),children:x.map((h,g)=>{const p=r===h.hex,N=l===h.hex;return n.jsxDEV("div",{className:"flex flex-col items-center gap-2",children:[n.jsxDEV("button",{onClick:()=>a?.(h.hex),className:f("rounded-lg transition-all relative group",c[t],p&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!p&&"hover:scale-110"),style:{backgroundColor:h.hex},"aria-label":h.name||h.hex,children:i&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:j=>b(h.hex,j),children:N?n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:108,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:102,columnNumber:21},void 0):n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:122,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:116,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:97,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:84,columnNumber:13},void 0),o&&n.jsxDEV("div",{className:"text-center",children:[h.name&&n.jsxDEV("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:h.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:137,columnNumber:19},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:h.hex},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:141,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:135,columnNumber:15},void 0)]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:83,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/color-swatch.tsx",lineNumber:77,columnNumber:5},void 0)},Qi=({onSave:e,width:r=400,height:a=200,className:t})=>n.jsxDEV("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",t),children:[n.jsxDEV("canvas",{width:r,height:a,className:"bg-white dark:bg-gray-900"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:23,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex gap-2 p-2",children:[n.jsxDEV("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:29,columnNumber:9},void 0),n.jsxDEV("button",{onClick:()=>e?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:32,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-pad.tsx",lineNumber:17,columnNumber:5},void 0),Xi=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"SignatureRequest",children:r||"SignatureRequest Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/signature-request.tsx",lineNumber:26,columnNumber:5},void 0),Ji=({value:e,onChange:r,placeholder:a,className:t})=>n.jsxDEV("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",t),children:[n.jsxDEV("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(o=>n.jsxDEV("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:o},o,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:25,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:23,columnNumber:7},void 0),n.jsxDEV("textarea",{value:e,onChange:o=>r(o.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/wysiwyg-editor.tsx",lineNumber:17,columnNumber:5},void 0),Ri=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UmarkdownUrenderer",children:r||"UmarkdownUrenderer Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/markdown-renderer.tsx",lineNumber:43,columnNumber:5},void 0),es=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UcodeUhighlighter",children:r||"UcodeUhighlighter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/code-highlighter.tsx",lineNumber:43,columnNumber:5},void 0),rs=({cardNumber:e,onCardNumberChange:r,expiryDate:a="",onExpiryDateChange:t,cvv:o="",onCVVChange:i,cardholderName:s="",onCardholderNameChange:l,showAllFields:d=!1,disabled:c=!1,className:u})=>{const b=_=>{const w=_.replace(/\s/g,"");return/^4/.test(w)?"visa":/^5[1-5]/.test(w)?"mastercard":/^3[47]/.test(w)?"amex":/^6(?:011|5)/.test(w)?"discover":"unknown"},x=b(e),h=_=>{const w=_.replace(/\D/g,"");if(b(w)==="amex"){const M=w.slice(0,15);return[M.slice(0,4),M.slice(4,10),M.slice(10,15)].filter(Boolean).join(" ")}return(w.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},g=_=>{const E=_.replace(/\D/g,"").slice(0,4);return E.length>=2?`${E.slice(0,2)}/${E.slice(2)}`:E},p=_=>{const w=_.replace(/\D/g,""),S=x==="amex"?4:3;return w.slice(0,S)},N=_=>{const w=h(_.target.value);r(w)},j=_=>{if(!t)return;const w=g(_.target.value);t(w)},k=_=>{if(!i)return;const w=p(_.target.value);i(w)},U=()=>{switch(x){case"visa":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:157,columnNumber:13},void 0),n.jsxDEV("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:158,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:156,columnNumber:11},void 0);case"mastercard":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:167,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:168,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:169,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:166,columnNumber:11},void 0);case"amex":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:175,columnNumber:13},void 0),n.jsxDEV("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:176,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:174,columnNumber:11},void 0);case"discover":return n.jsxDEV("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[n.jsxDEV("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:182,columnNumber:13},void 0),n.jsxDEV("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:183,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:181,columnNumber:11},void 0);default:return n.jsxDEV("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:194,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:188,columnNumber:11},void 0)}};return n.jsxDEV("div",{className:f("w-full space-y-3",u),children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:209,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("input",{type:"text",value:e,onChange:N,placeholder:"1234 5678 9012 3456",disabled:c,className:f("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:213,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:U()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:228,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:212,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:208,columnNumber:7},void 0),d&&n.jsxDEV("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:238,columnNumber:13},void 0),n.jsxDEV("input",{type:"text",value:a,onChange:j,placeholder:"MM/YY",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:241,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:237,columnNumber:11},void 0),n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:259,columnNumber:13},void 0),n.jsxDEV("input",{type:"text",value:o,onChange:k,placeholder:x==="amex"?"1234":"123",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:262,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:258,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:236,columnNumber:9},void 0),d&&n.jsxDEV("div",{children:[n.jsxDEV("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:284,columnNumber:11},void 0),n.jsxDEV("input",{type:"text",value:s,onChange:_=>l?.(_.target.value),placeholder:"John Doe",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:287,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:283,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/credit-card-input.tsx",lineNumber:206,columnNumber:5},void 0)},ya=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],ns=({value:e,onChange:r,currency:a="USD",onCurrencyChange:t,currencies:o=ya,showCurrencySelector:i=!1,placeholder:s="0.00",min:l,max:d,disabled:c=!1,className:u})=>{const[b,x]=y.useState(""),[h,g]=y.useState(!1),[p,N]=y.useState(!1),k=typeof a=="string"?o.find(V=>V.code===a)||ya[0]:a,U=y.useCallback(V=>{const v=k.decimals??2;return V.toLocaleString("en-US",{minimumFractionDigits:v,maximumFractionDigits:v})},[k]);y.useEffect(()=>{h||x(U(e||0))},[e,U,h]);const _=V=>{const T=V.target.value.replace(/[^\d.]/g,""),M=T.split("."),I=M.length>2?`${M[0]}.${M.slice(1).join("")}`:T;x(I);let D=parseFloat(I)||0;l!==void 0&&D<l&&(D=l),d!==void 0&&D>d&&(D=d),r(D)},w=()=>{g(!0),x(e?e.toString():"")},S=()=>{g(!1),x(U(e||0))},E=V=>{t?.(V),N(!1)};return n.jsxDEV("div",{className:f("relative w-full",u),children:[n.jsxDEV("div",{className:"flex gap-2",children:[i&&n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{type:"button",onClick:()=>!c&&N(!p),disabled:c,className:f("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",p&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[n.jsxDEV("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:k.code},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:196,columnNumber:15},void 0),n.jsxDEV("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",p&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:208,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:199,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:181,columnNumber:13},void 0),p&&n.jsxDEV("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:n.jsxDEV("div",{className:"max-h-60 overflow-y-auto py-1",children:o.map(V=>n.jsxDEV("button",{onClick:()=>E(V.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",V.code===k.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[n.jsxDEV("span",{className:"text-lg font-semibold w-8",children:V.symbol},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:233,columnNumber:23},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:V.code},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:237,columnNumber:25},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:V.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:240,columnNumber:25},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:236,columnNumber:23},void 0)]},V.code,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:222,columnNumber:21},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:220,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:219,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:180,columnNumber:11},void 0),n.jsxDEV("div",{className:"relative flex-1",children:[n.jsxDEV("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:k.symbol},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:254,columnNumber:11},void 0),n.jsxDEV("input",{type:"text",value:b,onChange:_,onFocus:w,onBlur:S,placeholder:s,disabled:c,className:f("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:257,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:253,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:177,columnNumber:7},void 0),(l!==void 0||d!==void 0)&&n.jsxDEV("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:l!==void 0&&d!==void 0?`Range: ${k.symbol}${U(l)} - ${k.symbol}${U(d)}`:l!==void 0?`Minimum: ${k.symbol}${U(l)}`:`Maximum: ${k.symbol}${U(d)}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:279,columnNumber:9},void 0),p&&n.jsxDEV("div",{className:"fixed inset-0 z-40",onClick:()=>N(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:290,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-input.tsx",lineNumber:176,columnNumber:5},void 0)},as=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UcurrencyUconverter",children:r||"UcurrencyUconverter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-converter.tsx",lineNumber:43,columnNumber:5},void 0),ts=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UcurrencyUrates",children:r||"UcurrencyUrates Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/advanced/currency-rates.tsx",lineNumber:43,columnNumber:5},void 0),os=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UformUbuilder",children:r||"UformUbuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-builder.tsx",lineNumber:43,columnNumber:5},void 0),is=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UformUvalidator",children:r||"UformUvalidator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-validator.tsx",lineNumber:43,columnNumber:5},void 0),ss=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UformUtemplate",children:r||"UformUtemplate Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/form-template.tsx",lineNumber:43,columnNumber:5},void 0),ls=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UschemaUvalidator",children:r||"UschemaUvalidator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/schema-validator.tsx",lineNumber:43,columnNumber:5},void 0),cs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UfieldUmapper",children:r||"UfieldUmapper Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/field-mapper.tsx",lineNumber:43,columnNumber:5},void 0),ds=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UsurveyUbuilder",children:r||"UsurveyUbuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/survey-builder.tsx",lineNumber:43,columnNumber:5},void 0),us=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"QuizBuilder",children:r||"QuizBuilder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/forms/builders/quiz-builder.tsx",lineNumber:26,columnNumber:5},void 0),ms=(e,r,a)=>{if(a)return`${a}/address/${e}`;if(!r)return null;if(r<0)return`https://explorer.solana.com/address/${e}${r===-101?"":r===-102?"?cluster=devnet":"?cluster=testnet"}`;const o={1:"https://etherscan.io",11155111:"https://sepolia.etherscan.io",5:"https://goerli.etherscan.io",137:"https://polygonscan.com",80002:"https://amoy.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org"}[r];return o?`${o}/address/${e}`:null},bs=(e,r)=>r==="full"?e:r==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,fs=({address:e,chainId:r,explorerUrl:a,label:t,format:o="short",showCopy:i=!0,showExplorer:s=!0,className:l="",textClassName:d=""})=>{const[c,u]=y.useState(!1),b=bs(e,o),x=ms(e,r,a),h=async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}};return n.jsxDEV("div",{className:f("flex items-center gap-2",l),children:[t&&n.jsxDEV("span",{className:L.label.default(),children:[t,":"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:136,columnNumber:17},void 0),n.jsxDEV("span",{className:f("font-mono text-sm",o==="full"&&"break-all",d),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:138,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center gap-1",children:[i&&n.jsxDEV("button",{onClick:h,className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),title:c?"Copied!":"Copy address","aria-label":"Copy address",children:c?n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:166,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:160,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:180,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:174,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:150,columnNumber:11},void 0),s&&x&&n.jsxDEV("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400"),title:"View on block explorer","aria-label":"View on block explorer",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:209,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:203,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:192,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:148,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/address-link.tsx",lineNumber:135,columnNumber:5},void 0)},gs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UanimatedUcounter",children:r||"UanimatedUcounter Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-counter.tsx",lineNumber:43,columnNumber:5},void 0),va=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",hs=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},ps=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},xs=e=>{const r=typeof document<"u"?document.head:null;if(r&&e)try{return r.appendChild(e),!0}catch{}return!1},nr=({animation:e="fade-in-up",delay:r=0,duration:a=600,once:t=!0,children:o,className:i="",threshold:s=.1})=>{const[l,d]=y.useState(!1),[c,u]=y.useState(!1),b=y.useRef(null);y.useEffect(()=>{if(!va()||typeof IntersectionObserver>"u"){d(!0),t&&u(!0);return}const h=new IntersectionObserver(([p])=>{p.isIntersecting&&(!c||!t)?(d(!0),t&&u(!0)):t||d(!1)},{threshold:s}),g=b.current;return g&&h.observe(g),()=>{g&&h.unobserve(g)}},[s,t,c]);const x=()=>{if(e==="none")return"";const h=`transition-all duration-${a} ease-out`,g=r>0?`delay-${r}`:"",p={"fade-in-up":l?`opacity-100 translate-y-0 ${h} ${g}`:`opacity-0 translate-y-8 ${h} ${g}`,"fade-in-scale":l?`opacity-100 scale-100 ${h} ${g}`:`opacity-0 scale-95 ${h} ${g}`,"fade-in-left":l?`opacity-100 translate-x-0 ${h} ${g}`:`opacity-0 -translate-x-8 ${h} ${g}`,"fade-in-right":l?`opacity-100 translate-x-0 ${h} ${g}`:`opacity-0 translate-x-8 ${h} ${g}`,"slide-in-bottom":l?`translate-y-0 ${h} ${g}`:`translate-y-full ${h} ${g}`,"zoom-in":l?`opacity-100 scale-100 ${h} ${g}`:`opacity-0 scale-50 ${h} ${g}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return p[e]||p["fade-in-up"]};return y.useEffect(()=>{if(va()&&(e==="float"||e==="bounce-slow")){const h="animated-section-keyframes";if(!hs(h)){const g=ps("style");g&&(g.id=h,g.textContent=`
37
32
  @keyframes float {
38
33
  0%, 100% { transform: translateY(0px); }
39
34
  50% { transform: translateY(-20px); }
@@ -48,23 +43,23 @@ Nonce: ${b}`}function t(u,m=24){const b=new Date(u.getTime()+m*60*60*1e3);return
48
43
  .animate-bounce-slow {
49
44
  animation: bounce-slow 4s ease-in-out infinite;
50
45
  }
51
- `,Ms(g))}}},[e]),n.jsxDEV("div",{ref:b,className:`${p()} ${o}`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:186,columnNumber:5},void 0)},Os=({children:e,delay:r=0,className:t=""})=>n.jsxDEV(fr,{animation:"fade-in-up",delay:r,className:t,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:198,columnNumber:3},void 0),Rs=({children:e,delay:r=0,className:t=""})=>n.jsxDEV(fr,{animation:"fade-in-scale",delay:r,className:t,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:208,columnNumber:3},void 0),zs=({children:e,className:r=""})=>n.jsxDEV(fr,{animation:"float",className:r,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:221,columnNumber:3},void 0),Bs=({isOpen:e,onClick:r,opacity:t="medium",blur:a=!1,zIndex:i=50,className:o,children:s})=>{const l={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return e?n.jsxDEV("div",{onClick:r,className:f("fixed inset-0","transition-all duration-200",l[t],a&&"backdrop-blur-sm",o),style:{zIndex:i},role:"presentation","aria-hidden":"true",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/backdrop.tsx",lineNumber:67,columnNumber:5},void 0):null},Ot=({isOpen:e,onClose:r,children:t,size:a="md",showCloseButton:i=!0,closeOnOutsideClick:o=!0,closeOnEscape:s=!0,className:l})=>{if(y.useEffect(()=>{if(!s||!e||!r)return;const m=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,r,s]),!e)return null;const c={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},u=()=>{o&&r&&r()};return n.jsxDEV(Ne,{children:[n.jsxDEV(lr,{isOpen:e,onClose:u,opacity:"dark",blur:!0},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:96,columnNumber:7},void 0),n.jsxDEV("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:n.jsxDEV("div",{className:f("relative w-full",c[a],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",l),onClick:m=>m.stopPropagation(),children:[i&&r&&n.jsxDEV("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:127,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:121,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:116,columnNumber:13},void 0),t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:103,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:102,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:95,columnNumber:5},void 0)},Ws=({isOpen:e,onClose:r,items:t,placeholder:a="Type a command or search...",emptyMessage:i="No results found.",className:o})=>{const[s,l]=y.useState(""),[c,u]=y.useState(0),m=y.useRef(null),b=t.filter(x=>{const N=s.toLowerCase();return x.label.toLowerCase().includes(N)||x.keywords?.some(U=>U.toLowerCase().includes(N))||x.group?.toLowerCase().includes(N)}),p=b.reduce((x,N)=>{const U=N.group||"Commands";return x[U]||(x[U]=[]),x[U].push(N),x},{});y.useEffect(()=>{e||(l(""),u(0))},[e]),y.useEffect(()=>{e&&m.current&&m.current.focus()},[e]),y.useEffect(()=>{u(0)},[s]);const h=x=>{switch(x.key){case"ArrowDown":x.preventDefault(),u(N=>N<b.length-1?N+1:N);break;case"ArrowUp":x.preventDefault(),u(N=>N>0?N-1:N);break;case"Enter":x.preventDefault(),b[c]&&(b[c].onSelect(),r());break;case"Escape":x.preventDefault(),r();break}},g=x=>{x.onSelect(),r()};return n.jsxDEV(Ot,{isOpen:e,onClose:r,size:"lg",showCloseButton:!1,className:f("overflow-hidden p-0",o),children:[n.jsxDEV("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:159,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:153,columnNumber:11},void 0),n.jsxDEV("input",{ref:m,type:"text",value:s,onChange:x=>l(x.target.value),onKeyDown:h,placeholder:a,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:166,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:152,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:151,columnNumber:7},void 0),n.jsxDEV("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(p).length===0?n.jsxDEV("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:181,columnNumber:11},void 0):Object.entries(p).map(([x,N])=>n.jsxDEV("div",{className:"mb-4 last:mb-0",children:[n.jsxDEV("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:x},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:188,columnNumber:15},void 0),n.jsxDEV("div",{className:"space-y-1",children:N.map(U=>{const E=b.indexOf(U)===c;return n.jsxDEV("button",{onClick:()=>g(U),className:f("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",E?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[U.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:U.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:211,columnNumber:25},void 0),n.jsxDEV("span",{className:"flex-1 truncate",children:U.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:215,columnNumber:23},void 0),U.shortcut&&n.jsxDEV("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:U.shortcut},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:217,columnNumber:25},void 0)]},U.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:199,columnNumber:21},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:193,columnNumber:15},void 0)]},x,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:186,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:179,columnNumber:7},void 0),n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:234,columnNumber:13},void 0),n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:237,columnNumber:13},void 0),"to navigate"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:233,columnNumber:11},void 0),n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:243,columnNumber:13},void 0),"to select"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:242,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:232,columnNumber:9},void 0),n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:250,columnNumber:11},void 0),"to close"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:249,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:231,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:143,columnNumber:5},void 0)},Fs=J.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),qs=({label:e,value:r,change:t,trend:a="none",icon:i,variant:o="default",className:s})=>{const l={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},c={up:"↗",down:"↘",neutral:"→",none:""};return n.jsxDEV("div",{className:f(Fs({variant:o,trend:a}),s),children:n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:65,columnNumber:11},void 0),n.jsxDEV("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:68,columnNumber:11},void 0),t&&n.jsxDEV("p",{className:f("text-sm font-medium flex items-center gap-1 mt-1",l[a||"none"]),children:[n.jsxDEV("span",{children:c[a||"none"]},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:78,columnNumber:15},void 0),t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:72,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:64,columnNumber:9},void 0),i&&n.jsxDEV("div",{className:"text-3xl opacity-80",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:83,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:63,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:62,columnNumber:5},void 0)},$s=J.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),Hs=({title:e,description:r,children:t,variant:a="default",spacing:i="normal",className:o})=>n.jsxDEV("div",{className:f($s({variant:a,spacing:i}),o),children:[(e||r)&&n.jsxDEV("div",{className:"space-y-1",children:[e&&n.jsxDEV("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:130,columnNumber:13},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:135,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:128,columnNumber:9},void 0),t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:126,columnNumber:5},void 0),Gs=J.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),Ys=({icon:e,title:r,description:t,layout:a="vertical",spacing:i="normal",interactive:o=!1,className:s,onClick:l})=>n.jsxDEV("div",{className:f(Gs({layout:a,spacing:i,interactive:o}),s),onClick:l,children:[n.jsxDEV("div",{className:"text-4xl mb-4 flex-shrink-0",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:200,columnNumber:7},void 0),n.jsxDEV("div",{className:"space-y-2",children:[n.jsxDEV("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:202,columnNumber:9},void 0),n.jsxDEV("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:205,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:201,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:193,columnNumber:5},void 0),Ks=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-indicator.tsx",lineNumber:43,columnNumber:5},void 0),Zs=({icon:e,size:r="md",shape:t="rounded",variant:a="blue-purple",gradientClasses:i,className:o,iconClassName:s})=>{const l={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},c={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},u={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:i||"bg-gradient-to-r from-blue-600 to-purple-600"},m=l[r];return n.jsxDEV("div",{className:f("flex items-center justify-center flex-shrink-0",m.container,c[t],u[a],o),children:n.jsxDEV(e,{className:f("text-white",m.icon,s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/gradient-icon-container.tsx",lineNumber:96,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/gradient-icon-container.tsx",lineNumber:87,columnNumber:5},void 0)},Qs={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},Xs={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},Js={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},el={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},rl={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},nl=({children:e,size:r="lg",variant:t="primary",shape:a="rounded",animation:i="float",className:o})=>n.jsxDEV("div",{className:f("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",Qs[r],Js[t],el[a],rl[i],o),children:n.jsxDEV("div",{className:f(Xs[r]),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-container.tsx",lineNumber:80,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-container.tsx",lineNumber:70,columnNumber:5},void 0),tl=({icon:e,children:r,iconPosition:t="left",gap:a="md",iconSize:i="md",align:o="left",variant:s="default",className:l,iconClassName:c,textClassName:u})=>{const m={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},b={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},p={left:"text-left",center:"text-center items-center",right:"text-right items-end"},h={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},g={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return n.jsxDEV("div",{className:f(g[t],m[a],t==="top"&&p[o],h[s],l),children:[n.jsxDEV(e,{className:f(b[i],"flex-shrink-0",c)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:119,columnNumber:7},void 0),n.jsxDEV("span",{className:f(u),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:126,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:110,columnNumber:5},void 0)},al=({children:e,title:r,variant:t="info",size:a="md",icon:i,bordered:o=!0,className:s})=>{const l={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},c={sm:"p-3",md:"p-4",lg:"p-6"},u=l[t];return n.jsxDEV("div",{className:f("rounded-lg",u.bg,o&&`border ${u.border}`,c[a],s),children:[(r||i)&&n.jsxDEV("div",{className:"flex items-start gap-3 mb-2",children:[i&&n.jsxDEV(i,{className:f("h-5 w-5 flex-shrink-0 mt-0.5",u.icon)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:119,columnNumber:13},void 0),r&&n.jsxDEV("h3",{className:f(L.body.strong.md(),u.title),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:124,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:117,columnNumber:9},void 0),n.jsxDEV("div",{className:f(!r&&!i&&u.text),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:132,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:107,columnNumber:5},void 0)},il=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/keyboard-shortcut.tsx",lineNumber:43,columnNumber:5},void 0),ol=({size:e="md",className:r="",showText:t=!0,onClick:a,logoSrc:i="/logo.png",logoAlt:o="Logo",logoText:s,fontFamily:l="Dancing Script, cursive"})=>{const u=(()=>{switch(e){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),m=n.jsxDEV(n.Fragment,{children:[n.jsxDEV("img",{src:i,alt:o,className:u.image},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:63,columnNumber:7},void 0),t&&n.jsxDEV("div",{className:`${u.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:65,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:62,columnNumber:5},void 0);return a?n.jsxDEV("button",{onClick:a,className:`flex items-center ${u.container} ${r} hover:opacity-80 transition-opacity`,children:m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:77,columnNumber:7},void 0):n.jsxDEV("div",{className:`flex items-center ${u.container} ${r}`,children:m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:87,columnNumber:5},void 0)},sl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/morph-transition.tsx",lineNumber:43,columnNumber:5},void 0),ll=({title:e,description:r,count:t,countLabel:a,action:i,loading:o=!1,loadingText:s="Loading...",size:l="md",className:c})=>{const m={sm:{title:L.heading.h4(),description:L.body.sm(),count:L.caption.default()},md:{title:L.heading.h3(),description:L.body.md(),count:L.body.sm()},lg:{title:L.heading.h2(),description:L.body.lg(),count:L.body.md()}}[l];return n.jsxDEV("div",{className:f("flex items-start justify-between gap-4",c),children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsxDEV("h2",{className:f(m.title,"text-gray-900 dark:text-gray-100"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:88,columnNumber:11},void 0),t!==void 0&&n.jsxDEV("span",{className:f(m.count,"text-gray-500 dark:text-gray-400"),children:["(",t,a&&` ${a}`,")"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:94,columnNumber:13},void 0),o&&n.jsxDEV("span",{className:f(m.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:111,columnNumber:15},void 0),s]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:105,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:87,columnNumber:9},void 0),r&&n.jsxDEV("p",{className:f(m.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:117,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:86,columnNumber:7},void 0),i&&n.jsxDEV("div",{className:"flex-shrink-0",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:127,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:85,columnNumber:5},void 0)},ul=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/parallax-scroll.tsx",lineNumber:43,columnNumber:5},void 0),cl=({actions:e,orientation:r="horizontal",columns:t=3,className:a})=>{const i={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},o={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return n.jsxDEV("div",{className:f(o[r],r==="grid"&&`grid-cols-${t}`,a),style:r==="grid"?{gridTemplateColumns:`repeat(${t}, 1fr)`}:void 0,children:e.map(s=>n.jsxDEV("button",{onClick:s.onClick,disabled:s.disabled,className:f("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",i[s.variant||"default"],s.disabled&&"opacity-50 cursor-not-allowed"),children:[s.icon&&n.jsxDEV("span",{className:"w-5 h-5",children:s.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:88,columnNumber:27},void 0),n.jsxDEV("span",{children:s.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:89,columnNumber:11},void 0)]},s.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:78,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:65,columnNumber:5},void 0)},ml=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/reveal-on-scroll.tsx",lineNumber:43,columnNumber:5},void 0),dl={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},bl=({icon:e,text:r,variant:t="default",size:a="md",className:i})=>{const{container:o,icon:s}=Xa(t),l=dl[a];return n.jsxDEV("div",{className:f("inline-flex items-center rounded-full mb-6",o,l.container,i),children:[n.jsxDEV("div",{className:f("animate-float-icon",s,l.icon),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:50,columnNumber:7},void 0),n.jsxDEV("span",{className:l.text,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:53,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:42,columnNumber:5},void 0)},fl=({title:e,onAdd:r,addButtonTooltip:t,loading:a,className:i=""})=>n.jsxDEV("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${i}`,children:n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:40,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex items-center space-x-2",children:[a&&n.jsxDEV("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:45,columnNumber:13},void 0),r&&n.jsxDEV("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:t,"aria-label":t||"Add",children:n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:60,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:54,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:48,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:43,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:39,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:36,columnNumber:5},void 0),gl=e=>{switch(e){case"cog":return A.Cog6ToothIcon;case"arrow-right":return A.ArrowRightIcon;case"shield":return A.ShieldCheckIcon;case"reply":case"chat":return A.ChatBubbleLeftRightIcon;case"filter":return A.FunnelIcon;case"plug":return A.LinkIcon;case"adjustments":return A.AdjustmentsHorizontalIcon;case"currency-dollar":return A.CurrencyDollarIcon;default:return A.Cog6ToothIcon}},hl=({settings:e,selectedSetting:r,onSettingSelect:t,className:a=""})=>n.jsxDEV("nav",{className:f("space-y-1",a),"aria-label":"Settings navigation",children:n.jsxDEV("ul",{className:"space-y-1",role:"list",children:e.map(i=>{const o=gl(i.icon),s=r===i.id;return n.jsxDEV("li",{children:n.jsxDEV("button",{onClick:()=>t(i.id),className:f("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",L.body.sm(),s?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":s?"page":void 0,title:i.description,children:n.jsxDEV("div",{className:"flex items-center flex-1 min-w-0",children:[n.jsxDEV(o,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:122,columnNumber:19},void 0),n.jsxDEV("span",{className:"truncate",children:i.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:126,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:121,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:109,columnNumber:15},void 0)},i.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:108,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:102,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:98,columnNumber:5},void 0),xl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skip-navigation.tsx",lineNumber:43,columnNumber:5},void 0),pl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sort-dropdown.tsx",lineNumber:43,columnNumber:5},void 0),Nl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/version-badge.tsx",lineNumber:43,columnNumber:5},void 0),yl=({children:e,as:r="span"})=>n.jsxDEV(r,{className:"sr-only",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/visually-hidden.tsx",lineNumber:35,columnNumber:10},void 0),gr=J.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:L.link.subtle(),default:L.link.default(),muted:L.link.muted(),external:L.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Kr=Z.forwardRef(({className:e,variant:r,size:t,to:a,href:i,external:o,children:s,...l},c)=>{const u=a||i;return u?o||u.startsWith("http")||u.startsWith("mailto:")?n.jsxDEV("a",{className:f(gr({variant:r==="subtle"?"external":r,size:t,className:e})),href:u,target:"_blank",rel:"noopener noreferrer",ref:c,...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:71,columnNumber:9},void 0):n.jsxDEV(_r.Link,{className:f(gr({variant:r,size:t,className:e})),to:u,ref:c,...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:92,columnNumber:7},void 0):n.jsxDEV("span",{className:f(gr({variant:r,size:t,className:e})),...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:55,columnNumber:9},void 0)});Kr.displayName="SmartLink";const vl=(e,r)=>Z.useMemo(()=>{let t=e;return Object.entries(r).forEach(([a,i])=>{const o=new RegExp(`\\b${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");t=t.replace(o,s=>`<SmartLink to="${i}" variant="subtle">${s}</SmartLink>`)}),t},[e,r]),jl={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},_l=({children:e,mappings:r=jl,className:t,variant:a="subtle"})=>{const i=Z.useMemo(()=>{if(!e||typeof e!="string")return e||"";let s=e;return Object.entries(r).sort(([c],[u])=>u.length-c.length).forEach(([c,u])=>{if(c&&u){const m=new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");s=s.replace(m,b=>`__LINK_START__${u}__LINK_MID__${b}__LINK_END__`)}}),s},[e,r]);if(!i||typeof i!="string")return n.jsxDEV("span",{className:t,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:219,columnNumber:12},void 0);const o=i.split(/(__LINK_START__.*?__LINK_END__)/);return n.jsxDEV("span",{className:t,children:o.map((s,l)=>{const c=s.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(c){const[,u,m]=c;return n.jsxDEV(Kr,{to:u,variant:a,children:m},l,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:233,columnNumber:13},void 0)}return s})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:225,columnNumber:5},void 0)},kl=({href:e,children:r,variant:t="default",external:a=!1,showExternalIcon:i=!1,disabled:o=!1,className:s,...l})=>{const c=a||e.startsWith("http://")||e.startsWith("https://"),u={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},m=c?{target:"_blank",rel:"noopener noreferrer"}:{};return o?n.jsxDEV("span",{className:f("cursor-not-allowed opacity-50",u[t],s),children:[r,i&&c&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:94,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:85,columnNumber:7},void 0):n.jsxDEV("a",{href:e,className:f("inline-flex items-center transition-colors",u[t],s),...m,...l,children:[r,i&&c&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:113,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:101,columnNumber:5},void 0)},wl=({href:e,children:r,showIcon:t=!0,iconPosition:a="right",size:i="md",variant:o="default",className:s,onClick:l})=>{const c={sm:{text:L.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:L.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:L.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},u={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},m=c[i];return n.jsxDEV("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:l,className:f("inline-flex items-center",m.gap,m.text,u[o],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",s),children:[t&&a==="left"&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:f(m.icon,"flex-shrink-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:108,columnNumber:9},void 0),n.jsxDEV("span",{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:112,columnNumber:7},void 0),t&&a==="right"&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:f(m.icon,"flex-shrink-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:114,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:91,columnNumber:5},void 0)},El=({items:e,separator:r="/",className:t})=>n.jsxDEV("nav",{className:f("flex items-center gap-2 text-sm",t),children:e.map((a,i)=>n.jsxDEV(y.Fragment,{children:[i>0&&n.jsxDEV("span",{className:"text-gray-400 dark:text-gray-600",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:26,columnNumber:13},void 0),i===e.length-1?n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-medium",children:a.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:31,columnNumber:13},void 0):n.jsxDEV("button",{onClick:a.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:a.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:35,columnNumber:13},void 0)]},i,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:24,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:22,columnNumber:5},void 0),Ul=pe.Root,Rt=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV(pe.List,{ref:t,className:f(O.navigation.tabs.list(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:12,columnNumber:3},void 0));Rt.displayName=pe.List.displayName;const zt=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV(pe.Trigger,{ref:t,className:f(O.navigation.tabs.trigger(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:24,columnNumber:3},void 0));zt.displayName=pe.Trigger.displayName;const Bt=Z.forwardRef(({className:e,...r},t)=>n.jsxDEV(pe.Content,{ref:t,className:f(O.navigation.tabs.content(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:36,columnNumber:3},void 0));Bt.displayName=pe.Content.displayName;const Dl=({items:e,orientation:r="horizontal",className:t})=>{const[a,i]=y.useState(new Set),o=l=>{i(c=>{const u=new Set(c);return u.has(l)?u.delete(l):u.add(l),u})},s=(l,c)=>{const u=l.children&&l.children.length>0,m=a.has(c),b=n.jsxDEV(n.Fragment,{children:[l.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:l.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:77,columnNumber:11},void 0),n.jsxDEV("span",{className:"flex-1",children:l.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:79,columnNumber:9},void 0),u&&n.jsxDEV("svg",{className:f("w-4 h-4 transition-transform",r==="horizontal"&&!m&&"-rotate-90",m&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:91,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:81,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:75,columnNumber:7},void 0),p=f("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return n.jsxDEV("div",{children:[u?n.jsxDEV("button",{onClick:()=>o(c),className:f(p,"w-full"),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:113,columnNumber:11},void 0):l.href?n.jsxDEV("a",{href:l.href,className:p,onClick:l.onClick,children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:120,columnNumber:11},void 0):n.jsxDEV("button",{onClick:l.onClick,className:f(p,"w-full"),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:124,columnNumber:11},void 0),u&&m&&n.jsxDEV("div",{className:f("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:l.children.map((h,g)=>n.jsxDEV("div",{children:h.href?n.jsxDEV("a",{href:h.href,onClick:h.onClick,className:f("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",h.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:154,columnNumber:23},void 0),h.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:142,columnNumber:19},void 0):n.jsxDEV("button",{onClick:h.onClick,className:f("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",h.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:172,columnNumber:23},void 0),h.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:161,columnNumber:19},void 0)},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:140,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:131,columnNumber:11},void 0)]},c,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:111,columnNumber:7},void 0)};return n.jsxDEV("nav",{className:f("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",t),children:e.map((l,c)=>s(l,c))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:188,columnNumber:5},void 0)},Cl=({items:e,selectedPath:r,onSelect:t,variant:a="default",className:i})=>{const o=a==="compact"?"space-y-1":"space-y-0";return n.jsxDEV("div",{className:f(o,i),children:e.map(s=>{const l=s.icon,c=r===s.path,u=s.disabled,m=f("flex items-start cursor-pointer transition-colors",a==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",u&&"opacity-50 cursor-not-allowed"),b=c?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return n.jsxDEV("div",{onClick:()=>!u&&t(s.path),className:f(m,!u&&b),role:"button",tabIndex:u?-1:0,"aria-current":c?"page":void 0,"aria-disabled":u,onKeyDown:p=>{!u&&(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),t(s.path))},children:[n.jsxDEV(l,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:105,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:f("font-medium",L.body.md()),children:[s.label,s.badge!==void 0&&s.badge>0&&n.jsxDEV("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:s.badge},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:110,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:107,columnNumber:15},void 0),s.description&&n.jsxDEV("div",{className:f("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:s.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:116,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:106,columnNumber:13},void 0)]},s.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:90,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:71,columnNumber:5},void 0)},Sl=({items:e,className:r})=>n.jsxDEV("nav",{className:f("flex flex-col gap-1",r),children:e.map(t=>n.jsxDEV("button",{onClick:t.onClick,className:f("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",t.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[t.icon&&n.jsxDEV("span",{className:"w-5 h-5",children:t.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:32,columnNumber:25},void 0),n.jsxDEV("span",{className:"flex-1 text-left font-medium",children:t.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:33,columnNumber:11},void 0),t.badge&&n.jsxDEV("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:t.badge},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:35,columnNumber:13},void 0)]},t.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:22,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:20,columnNumber:5},void 0),Vl=({currentPage:e,totalPages:r,onPageChange:t,siblingCount:a=1,showFirstLast:i=!1,size:o="md",className:s})=>{const c={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:L.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:L.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:L.body.lg()}}[o],m=(()=>{const _=[];_.push(1);const E=Math.max(e-a,2),j=Math.min(e+a,r-1);E>2&&_.push("ellipsis");for(let k=E;k<=j;k++)_.push(k);return j<r-1&&_.push("ellipsis"),r>1&&_.push(r),_})(),b=()=>{e>1&&t(e-1)},p=()=>{e<r&&t(e+1)},h=()=>{t(1)},g=()=>{t(r)},x=f("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),N=_=>f(x,c.button,c.text,_?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),U=f(x,c.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return n.jsxDEV("nav",{className:f("flex items-center gap-1",s),"aria-label":"Pagination",children:[i&&n.jsxDEV("button",{onClick:h,disabled:e===1,className:U,"aria-label":"Go to first page",children:n.jsxDEV("span",{className:c.text,children:"First"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:177,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:171,columnNumber:9},void 0),n.jsxDEV("button",{onClick:b,disabled:e===1,className:U,"aria-label":"Go to previous page",children:n.jsxDEV(A.ChevronLeftIcon,{className:c.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:188,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:182,columnNumber:7},void 0),m.map((_,E)=>_==="ellipsis"?n.jsxDEV("span",{className:f("inline-flex items-center justify-center",c.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${E}`,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:195,columnNumber:13},void 0):n.jsxDEV("button",{onClick:()=>t(_),className:N(_===e),"aria-label":`Go to page ${_}`,"aria-current":_===e?"page":void 0,children:_},_,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:209,columnNumber:11},void 0)),n.jsxDEV("button",{onClick:p,disabled:e===r,className:U,"aria-label":"Go to next page",children:n.jsxDEV(A.ChevronRightIcon,{className:c.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:228,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:222,columnNumber:7},void 0),i&&n.jsxDEV("button",{onClick:g,disabled:e===r,className:U,"aria-label":"Go to last page",children:n.jsxDEV("span",{className:c.text,children:"Last"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:239,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:233,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:165,columnNumber:5},void 0)},Al=({currentPage:e,totalPages:r,onPageChange:t,maxVisible:a=7,className:i})=>{const o=[];if(r<=a)for(let s=1;s<=r;s++)o.push(s);else{o.push(1),e>3&&o.push("...");const s=Math.max(2,e-1),l=Math.min(r-1,e+1);for(let c=s;c<=l;c++)o.push(c);e<r-2&&o.push("..."),o.push(r)}return n.jsxDEV("nav",{className:f("flex items-center gap-1",i),children:[n.jsxDEV("button",{onClick:()=>t(e-1),disabled:e===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:37,columnNumber:7},void 0),o.map((s,l)=>s==="..."?n.jsxDEV("span",{className:"px-3 py-2",children:"..."},`ellipsis-${l}`,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:47,columnNumber:11},void 0):n.jsxDEV("button",{onClick:()=>t(s),className:f("px-3 py-2 rounded",s===e?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:s},s,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:51,columnNumber:11},void 0)),n.jsxDEV("button",{onClick:()=>t(e+1),disabled:e===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:66,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:36,columnNumber:5},void 0)},Tl=({steps:e,currentStep:r,orientation:t="horizontal",clickable:a=!1,onStepClick:i,className:o})=>{const s=c=>{a&&i&&i(c)},l=c=>c<r?"completed":c===r?"active":"upcoming";return t==="horizontal"?n.jsxDEV("div",{className:f("w-full",o),children:n.jsxDEV("div",{className:"flex items-center justify-between",children:e.map((c,u)=>{const m=l(u),b=u===e.length-1;return n.jsxDEV(y.Fragment,{children:[n.jsxDEV("div",{className:"flex flex-col items-center",children:[n.jsxDEV("button",{onClick:()=>s(u),disabled:!a,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",a&&"hover:scale-110",m==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",m==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",m==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:m==="completed"?n.jsxDEV("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:115,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:109,columnNumber:23},void 0):c.icon?n.jsxDEV("span",{className:f("w-5 h-5",m==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:123,columnNumber:23},void 0):n.jsxDEV("span",{className:f("text-sm font-semibold",m==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:u+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:134,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:93,columnNumber:19},void 0),n.jsxDEV("div",{className:"mt-2 text-center",children:[n.jsxDEV("p",{className:f("text-sm font-medium",m==="active"?"text-blue-600 dark:text-blue-500":m==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:148,columnNumber:21},void 0),c.description&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:c.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:161,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:147,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:92,columnNumber:17},void 0),!b&&n.jsxDEV("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:n.jsxDEV("div",{className:f("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",u<r?"w-full":"w-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:171,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:170,columnNumber:19},void 0)]},c.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:90,columnNumber:15},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:84,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:83,columnNumber:7},void 0):n.jsxDEV("div",{className:f("w-full",o),children:n.jsxDEV("div",{className:"space-y-4",children:e.map((c,u)=>{const m=l(u),b=u===e.length-1;return n.jsxDEV("div",{className:"flex gap-4",children:[n.jsxDEV("div",{className:"flex flex-col items-center",children:[n.jsxDEV("button",{onClick:()=>s(u),disabled:!a,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",a&&"hover:scale-110",m==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",m==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",m==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:m==="completed"?n.jsxDEV("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:221,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:215,columnNumber:21},void 0):c.icon?n.jsxDEV("span",{className:f("w-5 h-5",m==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:229,columnNumber:21},void 0):n.jsxDEV("span",{className:f("text-sm font-semibold",m==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:u+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:240,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:199,columnNumber:17},void 0),!b&&n.jsxDEV("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:n.jsxDEV("div",{className:f("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",u<r?"h-full":"h-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:256,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:255,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:198,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex-1 pb-4",children:[n.jsxDEV("p",{className:f("text-sm font-medium",m==="active"?"text-blue-600 dark:text-blue-500":m==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:c.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:268,columnNumber:17},void 0),c.description&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:c.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:281,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:267,columnNumber:15},void 0)]},c.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:196,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:190,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:189,columnNumber:5},void 0)},Ll=({steps:e,currentStep:r,onStepClick:t,orientation:a="horizontal",className:i})=>n.jsxDEV("nav",{className:f(a==="horizontal"?"flex items-center":"flex flex-col",i),children:e.map((o,s)=>n.jsxDEV("div",{className:f("flex items-center",a==="vertical"&&"flex-col items-start"),children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("button",{onClick:()=>t?.(s),disabled:s>r,className:f("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",s<r&&"bg-green-500 text-white",s===r&&"bg-blue-500 text-white",s>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:s<r?"✓":s+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:41,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"font-medium text-gray-900 dark:text-white",children:o.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:55,columnNumber:15},void 0),o.description&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:o.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:59,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:54,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:40,columnNumber:11},void 0),s<e.length-1&&n.jsxDEV("div",{className:f(a==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:66,columnNumber:13},void 0)]},o.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:33,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:26,columnNumber:5},void 0),Il=({subsections:e,isExpanded:r,selectedSubsection:t,parentSectionId:a,onSubsectionSelect:i})=>{const o=y.useRef(null),[s,l]=y.useState(void 0);return y.useEffect(()=>{if(o.current){const c=o.current.scrollHeight;l(r?c+8:0)}},[r,e]),n.jsxDEV("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:s!==void 0?`${s}px`:"auto"},children:n.jsxDEV("div",{ref:o,className:"ml-6 mt-2 space-y-1",children:e.map(c=>n.jsxDEV("button",{onClick:()=>i?.(c.id,a),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${t===c.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title},c.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:53,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:51,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:47,columnNumber:5},void 0)},Pl=({sections:e,selectedSection:r,selectedSubsection:t,expandedSections:a,onSectionSelect:i,onSubsectionSelect:o,onToggleSection:s,className:l=""})=>n.jsxDEV("nav",{className:`space-y-2 ${l}`,children:e.map(c=>n.jsxDEV("div",{children:[n.jsxDEV("div",{className:"flex items-center",children:[n.jsxDEV("button",{onClick:()=>i(c.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===c.id&&!t?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:c.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:85,columnNumber:13},void 0),c.subsections&&c.subsections.length>0&&n.jsxDEV("button",{onClick:()=>s(c.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:n.jsxDEV(A.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${a.includes(c.id)?"rotate-90":"rotate-0"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:100,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:96,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:84,columnNumber:11},void 0),c.subsections&&n.jsxDEV(Il,{subsections:c.subsections,isExpanded:a.includes(c.id),selectedSubsection:t,parentSectionId:c.id,onSubsectionSelect:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:112,columnNumber:13},void 0)]},c.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:83,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:81,columnNumber:5},void 0);function Ml({columns:e,data:r,keyExtractor:t,sort:a,onSort:i,onRowClick:o,striped:s=!1,hoverable:l=!1,compact:c=!1,bordered:u=!1,emptyMessage:m="No data available",className:b}){const p=g=>{g.sortable&&i&&i(g.key)},h={left:"text-left",center:"text-center",right:"text-right"};return n.jsxDEV("div",{className:f("w-full overflow-x-auto",b),children:n.jsxDEV("table",{className:"w-full",children:[n.jsxDEV("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("tr",{children:e.map(g=>n.jsxDEV("th",{className:f(c?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",h[g.align||"left"],g.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",u&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:g.width},onClick:()=>g.sortable&&p(g),children:n.jsxDEV("div",{className:"flex items-center gap-2",children:[g.label,g.sortable&&n.jsxDEV("span",{className:"flex flex-col",children:a?.column===g.key?a.direction==="asc"?n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M5 10l5-5 5 5H5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:130,columnNumber:29},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:125,columnNumber:27},this):n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M15 10l-5 5-5-5h10z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:138,columnNumber:29},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:133,columnNumber:27},this):n.jsxDEV("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M5 10l5-5 5 5H5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:147,columnNumber:27},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:142,columnNumber:25},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:122,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:119,columnNumber:17},this)},g.key,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:105,columnNumber:15},this))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:103,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:102,columnNumber:9},this),n.jsxDEV("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?n.jsxDEV("tr",{children:n.jsxDEV("td",{colSpan:e.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:m},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:162,columnNumber:15},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:161,columnNumber:13},this):r.map((g,x)=>n.jsxDEV("tr",{className:f(s&&x%2===1&&"bg-gray-50 dark:bg-gray-800/50",l&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",o&&"cursor-pointer"),onClick:()=>o?.(g,x),children:e.map(N=>n.jsxDEV("td",{className:f(c?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",h[N.align||"left"],u&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:N.render?N.render(g,x):g[N.key]},N.key,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:184,columnNumber:19},this))},t(g,x),!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:171,columnNumber:15},this))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:159,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:100,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:99,columnNumber:5},this)}const Ol=({data:e,columns:r,hasActions:t=!1,renderCell:a,renderAction:i,emptyMessage:o="No data available",getRowKey:s=(c,u)=>String(u),className:l=""})=>!e||e.length===0?n.jsxDEV("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${l}`,children:n.jsxDEV("p",{className:`${L.body.sm()} text-gray-500 dark:text-gray-400`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:99,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:96,columnNumber:7},void 0):n.jsxDEV("div",{className:`relative ${l}`,children:n.jsxDEV("div",{className:"overflow-x-auto",children:n.jsxDEV("table",{className:"w-full border-collapse",children:[n.jsxDEV("thead",{children:n.jsxDEV("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((c,u)=>n.jsxDEV("th",{className:`${L.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:c},u,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:115,columnNumber:17},void 0)),t&&n.jsxDEV("th",{className:`${L.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:123,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:113,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:112,columnNumber:11},void 0),n.jsxDEV("tbody",{children:e.map((c,u)=>n.jsxDEV("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((m,b)=>{const p=a(c,b);return n.jsxDEV("td",{className:"py-3 px-4",children:typeof p=="string"?n.jsxDEV("span",{className:L.body.sm(),children:p},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:142,columnNumber:25},void 0):p},b,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:140,columnNumber:21},void 0)}),t&&n.jsxDEV("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:i?.(c)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:152,columnNumber:19},void 0)]},s(c,u),!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:133,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:131,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:111,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:110,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:109,columnNumber:5},void 0),Rl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-grid.tsx",lineNumber:43,columnNumber:5},void 0),zl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/pivot-table.tsx",lineNumber:43,columnNumber:5},void 0),Bl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/spreadsheet-grid.tsx",lineNumber:43,columnNumber:5},void 0),Wl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/column-resize.tsx",lineNumber:43,columnNumber:5},void 0),Fl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/cell-editor.tsx",lineNumber:43,columnNumber:5},void 0),ql=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/table-reservation.tsx",lineNumber:43,columnNumber:5},void 0),$l=({children:e,type:r="unordered",spacing:t="sm",marker:a,size:i="md",className:o})=>{const s=r==="ordered"?"ol":"ul",l={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},c={sm:"text-sm",md:"text-base",lg:"text-lg"},u=()=>a==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[a||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[a||"decimal"];return n.jsxDEV(s,{className:f("ml-6",u(),l[t],c[i],"text-gray-900 dark:text-gray-100",o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list.tsx",lineNumber:111,columnNumber:5},void 0)},Hl=({children:e,className:r})=>n.jsxDEV("li",{className:f("leading-relaxed",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list.tsx",lineNumber:132,columnNumber:10},void 0),Gl=({children:e,onAction:r,actionText:t="Remove",actionIcon:a=A.TrashIcon,destructive:i=!0,isProcessing:o=!1,variant:s="default",className:l})=>{const c="flex items-center justify-between p-4 rounded-lg transition-colors",u={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return n.jsxDEV("div",{className:f(c,u[s],l),children:[n.jsxDEV("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:65,columnNumber:7},void 0),n.jsxDEV(me,{variant:i?"ghost":"outline",size:"sm",onClick:r,disabled:o,className:f("ml-4",i&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[n.jsxDEV(a,{className:"h-4 w-4 mr-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:79,columnNumber:9},void 0),t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:68,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:64,columnNumber:5},void 0)},Yl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/user-table.tsx",lineNumber:43,columnNumber:5},void 0),Kl=({source:e,target:r,onChange:t,sourceTitle:a="Available",targetTitle:i="Selected",searchable:o=!0,sourceSearchPlaceholder:s="Search available...",targetSearchPlaceholder:l="Search selected...",height:c=300,disabled:u=!1,className:m})=>{const[b,p]=y.useState(""),[h,g]=y.useState(""),[x,N]=y.useState(new Set),[U,_]=y.useState(new Set),E=o?e.filter(I=>I.label.toLowerCase().includes(b.toLowerCase())):e,j=o?r.filter(I=>I.label.toLowerCase().includes(h.toLowerCase())):r,k=I=>{const z=new Set(x);z.has(I)?z.delete(I):z.add(I),N(z)},C=I=>{const z=new Set(U);z.has(I)?z.delete(I):z.add(I),_(z)},w=()=>{const I=e.filter(F=>x.has(F.id)),z=e.filter(F=>!x.has(F.id)),R=[...r,...I];t(z,R),N(new Set)},S=()=>{const I=r.filter(F=>U.has(F.id)),z=r.filter(F=>!U.has(F.id)),R=[...e,...I];t(R,z),_(new Set)},v=()=>{const I=[...r,...e];t([],I),N(new Set)},T=()=>{const I=[...e,...r];t(I,[]),_(new Set)},P=(I,z,R,F,ne,Re,hn)=>n.jsxDEV("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[n.jsxDEV("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[n.jsxDEV("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:z},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:168,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[I.length," item",I.length!==1?"s":""]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:171,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:167,columnNumber:7},void 0),o&&n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:ne,onChange:se=>Re(se.target.value),placeholder:hn,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:179,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:178,columnNumber:9},void 0),n.jsxDEV("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:o?c-120:c-60},children:I.length===0?n.jsxDEV("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:195,columnNumber:11},void 0):I.map(se=>{const ze=R.has(se.id);return n.jsxDEV("button",{onClick:()=>!se.disabled&&F(se.id),disabled:se.disabled||u,className:f("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",ze&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:n.jsxDEV("div",{className:"flex items-start gap-2",children:[n.jsxDEV("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",ze?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:ze&&n.jsxDEV("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:232,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:226,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:217,columnNumber:19},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:se.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:244,columnNumber:21},void 0),se.description&&n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:se.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:248,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:243,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:215,columnNumber:17},void 0)},se.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:203,columnNumber:15},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:190,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:165,columnNumber:5},void 0);return n.jsxDEV("div",{className:f("flex gap-4",m),children:[P(E,a,x,k,b,p,s),n.jsxDEV("div",{className:"flex flex-col justify-center gap-2",children:[n.jsxDEV("button",{onClick:v,disabled:u||e.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:296,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:290,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:277,columnNumber:9},void 0),n.jsxDEV("button",{onClick:w,disabled:u||x.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:324,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:318,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:305,columnNumber:9},void 0),n.jsxDEV("button",{onClick:S,disabled:u||U.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:352,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:346,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:333,columnNumber:9},void 0),n.jsxDEV("button",{onClick:T,disabled:u||r.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:380,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:374,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:361,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:276,columnNumber:7},void 0),P(j,i,U,C,h,g,l)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:263,columnNumber:5},void 0)};function Zl({items:e,itemHeight:r,height:t,renderItem:a,keyExtractor:i,overscan:o=3,className:s}){const[l,c]=y.useState(0),u=y.useRef(null),m=x=>{c(x.currentTarget.scrollTop)},b=e.length*r,p=Math.max(0,Math.floor(l/r)-o),h=Math.min(e.length-1,Math.ceil((l+t)/r)+o),g=e.slice(p,h+1);return n.jsxDEV("div",{ref:u,className:f("overflow-auto",s),style:{height:t},onScroll:m,children:n.jsxDEV("div",{style:{height:b,position:"relative"},children:g.map((x,N)=>{const U=p+N;return n.jsxDEV("div",{style:{position:"absolute",top:U*r,height:r,width:"100%"},children:a(x,U)},i(x,U),!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:89,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:84,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:77,columnNumber:5},this)}const Ql=({data:e,selectedId:r,onSelect:t,expandedIds:a,onExpand:i,defaultExpanded:o=!1,showLines:s=!1,className:l})=>{const[c,u]=y.useState(new Set(o?e.map(g=>g.id):[])),m=a!==void 0?new Set(a):c,b=g=>{a!==void 0&&i?i(g):u(x=>{const N=new Set(x);return N.has(g)?N.delete(g):N.add(g),N})},p=g=>{!g.disabled&&t&&t(g)},h=(g,x=0)=>{const N=g.children&&g.children.length>0,U=m.has(g.id),_=r===g.id;return n.jsxDEV("div",{children:[n.jsxDEV("div",{className:f("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!g.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",_&&"bg-blue-50 dark:bg-blue-900/30",g.disabled&&"opacity-50 cursor-not-allowed",!g.disabled&&"cursor-pointer"),style:{paddingLeft:`${x*1.5+.5}rem`},onClick:()=>p(g),children:[N?n.jsxDEV("button",{onClick:E=>{E.stopPropagation(),b(g.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:n.jsxDEV("svg",{className:f("w-3 h-3 transition-transform",U&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:140,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:131,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:124,columnNumber:13},void 0):n.jsxDEV("div",{className:"w-4 h-4 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:149,columnNumber:13},void 0),g.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:g.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:154,columnNumber:13},void 0),n.jsxDEV("span",{className:f("flex-1 text-sm",_?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:g.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:160,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:111,columnNumber:9},void 0),N&&U&&n.jsxDEV("div",{className:f(s&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:g.children.map(E=>h(E,x+1))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:174,columnNumber:11},void 0)]},g.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:109,columnNumber:7},void 0)};return n.jsxDEV("div",{className:f("w-full",l),children:e.map(g=>h(g,0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:188,columnNumber:5},void 0)},Xl=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/listing-form.tsx",lineNumber:43,columnNumber:5},void 0),Jl="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",eu={none:"",sm:"p-3",md:"p-6",lg:"p-8"},Zr=({variant:e="elevated",padding:r="md",icon:t,onClose:a,className:i,children:o,...s})=>{const c=["info","success","warning","error"].includes(e)&&(t||a),u=e==="callout"?Jl:Za(e);return n.jsxDEV("div",{className:f("rounded-lg",u,eu[r],i),...s,children:c?n.jsxDEV("div",{className:"flex items-start gap-3",children:[t&&n.jsxDEV("div",{className:"flex-shrink-0 text-lg",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:69,columnNumber:20},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:70,columnNumber:11},void 0),a&&n.jsxDEV("button",{onClick:a,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:83,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:77,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:72,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:68,columnNumber:9},void 0):o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:58,columnNumber:5},void 0)},ru=({title:e,description:r,className:t,children:a,...i})=>n.jsxDEV("div",{className:f("space-y-1.5",t),...i,children:[e&&n.jsxDEV("h3",{className:L.heading.h4(),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:114,columnNumber:17},void 0),r&&n.jsxDEV("p",{className:L.body.sm(),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:115,columnNumber:23},void 0),a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:113,columnNumber:5},void 0),nu=({className:e,children:r,...t})=>n.jsxDEV("div",{className:f("",e),...t,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:127,columnNumber:5},void 0),tu=({className:e,children:r,...t})=>n.jsxDEV("div",{className:f("flex items-center pt-4",e),...t,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:139,columnNumber:5},void 0),au=({title:e,children:r,variant:t="info",size:a="default",className:i})=>{const o={sm:"sm",default:"md",lg:"lg"},s=t==="neutral"?"bordered":t;return n.jsxDEV(Zr,{variant:s,padding:o[a],className:i,children:[e&&n.jsxDEV("h3",{className:f("font-semibold mb-2",a==="sm"?"text-base":a==="lg"?"text-xl":"text-lg"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:171,columnNumber:9},void 0),r]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:165,columnNumber:5},void 0)},iu=({title:e,icon:r,children:t,variant:a="gradient",size:i="default",centered:o=!1,className:s})=>{const l={sm:"sm",default:"md",lg:"lg"},c=a==="gradient"||a==="neutral"?"callout":a;return n.jsxDEV(Zr,{variant:c,padding:l[i],className:s,children:n.jsxDEV("div",{className:f("space-y-4",o&&"text-center"),children:[r&&n.jsxDEV("div",{className:f("font-bold",i==="sm"?"text-2xl":i==="lg"?"text-5xl":"text-4xl",o?"text-center":"text-left"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:217,columnNumber:11},void 0),e&&n.jsxDEV("h3",{className:f("font-bold mb-4",i==="sm"?"text-lg":i==="lg"?"text-3xl":"text-2xl"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:232,columnNumber:11},void 0),n.jsxDEV("div",{className:f("text-gray-600 dark:text-gray-400",i==="sm"?"text-sm":i==="lg"?"text-lg":"text-base"),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:245,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:215,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:210,columnNumber:5},void 0)},ou=({title:e,value:r,change:t,changePeriod:a="vs last period",icon:i,variant:o="default",className:s})=>{const l={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return n.jsxDEV("div",{className:f("rounded-lg border border-gray-200 dark:border-gray-700 p-6",l[o],s),children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[n.jsxDEV("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:64,columnNumber:9},void 0),i&&n.jsxDEV("div",{className:"text-gray-400 dark:text-gray-600",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:67,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:63,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-end justify-between",children:n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:72,columnNumber:11},void 0),t!==void 0&&n.jsxDEV("div",{className:"flex items-center gap-1 mt-2",children:[n.jsxDEV("span",{className:f("text-sm font-medium",t>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[t>=0?"↑":"↓"," ",Math.abs(t),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:77,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:87,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:76,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:71,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:70,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:56,columnNumber:5},void 0)},su=({src:e,alt:r="Avatar",fallback:t,name:a,size:i="md",status:o,className:s,onClick:l})=>{const[c,u]=y.useState(!1),m={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},p={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},g=t||(a?(U=>{const _=U.trim().split(/\s+/);return _.length===1?_[0].charAt(0).toUpperCase():_[0].charAt(0).toUpperCase()+_[_.length-1].charAt(0).toUpperCase()})(a):""),x=e&&!c,N=()=>{u(!0)};return n.jsxDEV("div",{className:"relative inline-block flex-shrink-0",children:[n.jsxDEV("div",{className:f("flex items-center justify-center overflow-hidden rounded-full",m[i],!x&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",l&&"cursor-pointer hover:opacity-80 transition-opacity",s),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:x?n.jsxDEV("img",{src:e,alt:r,className:"w-full h-full object-cover",onError:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:110,columnNumber:11},void 0):n.jsxDEV("span",{className:"font-semibold",children:g},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:117,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:96,columnNumber:7},void 0),o&&n.jsxDEV("span",{className:f("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",p[o],b[i]),"aria-label":o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:121,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:95,columnNumber:5},void 0)},lu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar-group.tsx",lineNumber:43,columnNumber:5},void 0),uu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/profile-header.tsx",lineNumber:43,columnNumber:5},void 0),cu=({label:e,value:r,orientation:t="vertical",align:a="start",labelWidth:i="auto",size:o="md",separator:s=!1,labelVariant:l="muted",valueVariant:c="default",className:u,labelClassName:m,valueClassName:b})=>{const p={sm:{label:L.body.sm(),value:L.body.sm(),gap:"gap-1"},md:{label:L.body.md(),value:L.body.md(),gap:"gap-2"},lg:{label:L.body.lg(),value:L.body.lg(),gap:"gap-3"}},h={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},g={start:"justify-start",center:"justify-center",between:"justify-between"},x={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},N={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},U=p[o];return n.jsxDEV("div",{className:f(t==="horizontal"?"flex items-center":"flex flex-col",t==="horizontal"&&g[a],U.gap,s&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",u),children:[n.jsxDEV("dt",{className:f(U.label,x[l],t==="horizontal"&&h[i],t==="horizontal"&&"flex-shrink-0",m),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:134,columnNumber:7},void 0),n.jsxDEV("dd",{className:f(U.value,N[c],t==="horizontal"&&"flex-1",b),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:145,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:125,columnNumber:5},void 0)},mu=({value:e,label:r,variant:t="neutral",size:a="md",align:i="center",icon:o,iconPosition:s="top",className:l,valueClassName:c,labelClassName:u})=>{const m={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:L.heading.h5(),label:L.caption.default(),icon:"h-4 w-4"},md:{value:L.heading.h4(),label:L.body.sm(),icon:"h-5 w-5"},lg:{value:L.heading.h3(),label:L.body.md(),icon:"h-6 w-6"},xl:{value:L.heading.h2(),label:L.body.lg(),icon:"h-8 w-8"}},p={left:"text-left",center:"text-center",right:"text-right"},h=m[t],g=b[a];return n.jsxDEV("div",{className:f(p[i],l),children:[o&&s==="top"&&n.jsxDEV(o,{className:f(g.icon,h.icon,"mb-2",i==="center"&&"mx-auto")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:136,columnNumber:9},void 0),n.jsxDEV("div",{className:f(s==="left"&&o&&"flex items-center gap-3",i==="center"&&s==="left"&&"justify-center"),children:[o&&s==="left"&&n.jsxDEV(o,{className:f(g.icon,h.icon)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:152,columnNumber:11},void 0),n.jsxDEV("div",{children:[n.jsxDEV("div",{className:f("font-bold",g.value,h.value,c),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:155,columnNumber:11},void 0),n.jsxDEV("div",{className:f(g.label,h.label,u),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:165,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:154,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:145,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:134,columnNumber:5},void 0)},Wt=({icon:e,title:r="No data",description:t,action:a,className:i})=>n.jsxDEV("div",{className:f("flex flex-col items-center justify-center py-12 px-4 text-center",i),children:[e&&n.jsxDEV("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:28,columnNumber:9},void 0),n.jsxDEV("h3",{className:f(L.heading.h3(),"mb-2"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:30,columnNumber:7},void 0),t&&n.jsxDEV("p",{className:f(L.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:32,columnNumber:9},void 0),a&&n.jsxDEV("div",{className:"mt-4",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:41,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:21,columnNumber:5},void 0),du=({title:e,subtext:r,className:t})=>n.jsxDEV(Wt,{title:e,description:r,className:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/no-content.tsx",lineNumber:22,columnNumber:5},void 0),bu=({data:e,orientation:r="vertical",showValues:t=!1,showGrid:a=!0,barWidth:i=40,height:o=300,className:s})=>{const l=Math.max(...e.map(u=>u.value)),c="#3b82f6";return n.jsxDEV("div",{className:f("w-full",s),children:n.jsxDEV("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${o}px`},children:[a&&n.jsxDEV("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((u,m)=>n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700"},m,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:68,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:66,columnNumber:11},void 0),r==="vertical"?n.jsxDEV("div",{className:"relative h-full flex items-end justify-around gap-2",children:e.map((u,m)=>{const b=u.value/l*100;return n.jsxDEV("div",{className:"flex flex-col items-center gap-2",style:{width:`${i}px`},children:[t&&n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:u.value},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:88,columnNumber:21},void 0),n.jsxDEV("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:u.color||c}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:92,columnNumber:19},void 0),n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:u.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:99,columnNumber:19},void 0)]},m,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:82,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:78,columnNumber:11},void 0):n.jsxDEV("div",{className:"relative h-full flex flex-col justify-around gap-2",children:e.map((u,m)=>{const b=u.value/l*100;return n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:u.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:112,columnNumber:19},void 0),n.jsxDEV("div",{className:"flex-1 flex items-center gap-2",children:[n.jsxDEV("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:u.color||c}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:116,columnNumber:21},void 0),t&&n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:u.value},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:124,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:115,columnNumber:19},void 0)]},m,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:111,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:107,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:60,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:59,columnNumber:5},void 0)},fu=({series:e,showLegend:r=!0,showGrid:t=!0,showPoints:a=!0,height:i=300,xLabels:o,className:s})=>{const l=e.flatMap(h=>h.data),c=Math.max(...l.map(h=>h.y)),u=Math.min(...l.map(h=>h.y)),m=Math.max(...l.map(h=>h.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],p=h=>h.length===0?"":`M ${h.map(x=>{const N=x.x/m*100,U=100-(x.y-u)/(c-u)*100;return`${N},${U}`}).join(" L ")}`;return n.jsxDEV("div",{className:f("w-full",s),children:[r&&n.jsxDEV("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((h,g)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:h.color||b[g%b.length]}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:93,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:h.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:100,columnNumber:15},void 0)]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:92,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:90,columnNumber:9},void 0),n.jsxDEV("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[n.jsxDEV("div",{className:"relative",style:{height:`${i}px`},children:[t&&n.jsxDEV("div",{className:"absolute inset-0",children:[...Array(5)].map((h,g)=>n.jsxDEV("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${g*25}%`}},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:115,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:113,columnNumber:13},void 0),n.jsxDEV("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((h,g)=>{const x=h.color||b[g%b.length];return n.jsxDEV("g",{children:[n.jsxDEV("path",{d:p(h.data),fill:"none",stroke:x,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:135,columnNumber:19},void 0),a&&h.data.map((N,U)=>{const _=N.x/m*100,E=100-(N.y-u)/(c-u)*100;return n.jsxDEV("circle",{cx:_,cy:E,r:"1",fill:x,vectorEffect:"non-scaling-stroke"},U,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:149,columnNumber:25},void 0)})]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:133,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:125,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:110,columnNumber:9},void 0),o&&n.jsxDEV("div",{className:"flex justify-between mt-2",children:o.map((h,g)=>n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:h},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:169,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:167,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:109,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:87,columnNumber:5},void 0)},gu=({data:e,variant:r="pie",showLegend:t=!0,showPercentages:a=!1,size:i=200,donutHoleSize:o=40,className:s})=>{const l=e.reduce((g,x)=>g+x.value,0),c=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],u=e.reduce((g,x,N)=>{const U=x.value/l*100,_=U/100*360,E=g.length>0?g[g.length-1].endAngle:-90,j=E+_;return g.push({...x,percentage:U,startAngle:E,endAngle:j,color:x.color||c[N%c.length]}),g},[]),m=(g,x,N,U)=>{const _=(U-90)*Math.PI/180;return{x:g+N*Math.cos(_),y:x+N*Math.sin(_)}},b=(g,x,N,U,_)=>{const E=m(g,x,N,_),j=m(g,x,N,U),k=_-U<=180?"0":"1";if(r==="donut"){const C=N*o/100,w=m(g,x,C,_),S=m(g,x,C,U);return["M",E.x,E.y,"A",N,N,0,k,0,j.x,j.y,"L",S.x,S.y,"A",C,C,0,k,1,w.x,w.y,"Z"].join(" ")}return["M",g,x,"L",E.x,E.y,"A",N,N,0,k,0,j.x,j.y,"Z"].join(" ")},p=i/2,h=i/2-10;return n.jsxDEV("div",{className:f("flex flex-col items-center gap-4",s),children:[n.jsxDEV("svg",{width:i,height:i,className:"transform rotate-0",children:u.map((g,x)=>n.jsxDEV("path",{d:b(p,p,h,g.startAngle,g.endAngle),fill:g.color,className:"transition-opacity hover:opacity-80"},x,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:175,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:173,columnNumber:7},void 0),t&&n.jsxDEV("div",{className:"flex flex-col gap-2",children:u.map((g,x)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:g.color}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:195,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[g.label,a&&n.jsxDEV("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(g.percentage),"%)"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:202,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:199,columnNumber:15},void 0)]},x,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:194,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:192,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:171,columnNumber:5},void 0)},hu=({series:e,showLegend:r=!0,showGrid:t=!0,fillOpacity:a=.2,height:i=300,xLabels:o,className:s})=>{const l=e.flatMap(g=>g.data),c=Math.max(...l.map(g=>g.y)),u=Math.min(...l.map(g=>g.y)),m=Math.max(...l.map(g=>g.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],p=g=>{if(g.length===0)return"";const x=g.map(_=>{const E=_.x/m*100,j=100-(_.y-u)/(c-u)*100;return`${E},${j}`}),N=g[0].x/m*100,U=g[g.length-1].x/m*100;return`M ${N},100 L ${x.join(" L ")} L ${U},100 Z`},h=g=>g.length===0?"":`M ${g.map(N=>{const U=N.x/m*100,_=100-(N.y-u)/(c-u)*100;return`${U},${_}`}).join(" L ")}`;return n.jsxDEV("div",{className:f("w-full",s),children:[r&&n.jsxDEV("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((g,x)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:g.color||b[x%b.length]}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:108,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:115,columnNumber:15},void 0)]},x,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:107,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:105,columnNumber:9},void 0),n.jsxDEV("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[n.jsxDEV("div",{className:"relative",style:{height:`${i}px`},children:[t&&n.jsxDEV("div",{className:"absolute inset-0",children:[...Array(5)].map((g,x)=>n.jsxDEV("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${x*25}%`}},x,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:130,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:128,columnNumber:13},void 0),n.jsxDEV("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((g,x)=>{const N=g.color||b[x%b.length];return n.jsxDEV("g",{children:[n.jsxDEV("path",{d:p(g.data),fill:N,fillOpacity:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:150,columnNumber:19},void 0),n.jsxDEV("path",{d:h(g.data),fill:"none",stroke:N,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:157,columnNumber:19},void 0)]},x,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:148,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:125,columnNumber:9},void 0),o&&n.jsxDEV("div",{className:"flex justify-between mt-2",children:o.map((g,x)=>n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g},x,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:174,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:172,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:124,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:102,columnNumber:5},void 0)},xu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/radar-chart.tsx",lineNumber:43,columnNumber:5},void 0),pu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bubble-chart.tsx",lineNumber:43,columnNumber:5},void 0),Nu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/scatter-plot.tsx",lineNumber:43,columnNumber:5},void 0),yu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/tree-map.tsx",lineNumber:43,columnNumber:5},void 0),vu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sankey-diagram.tsx",lineNumber:43,columnNumber:5},void 0),ju=({data:e,width:r=100,height:t=30,color:a="#3b82f6",fill:i=!1,className:o})=>{if(e.length===0)return null;const s=Math.max(...e),l=Math.min(...e),c=s-l||1,u=e.map((m,b)=>{const p=b/(e.length-1)*r,h=t-(m-l)/c*t;return`${p},${h}`}).join(" ");return n.jsxDEV("svg",{width:r,height:t,className:f("inline-block",o),children:[i&&n.jsxDEV("polygon",{points:`0,${t} ${u} ${r},${t}`,fill:a,opacity:"0.2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:59,columnNumber:9},void 0),n.jsxDEV("polyline",{points:u,fill:"none",stroke:a,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:65,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:53,columnNumber:5},void 0)},_u=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/heatmap.tsx",lineNumber:43,columnNumber:5},void 0),ku=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/funnel-chart.tsx",lineNumber:43,columnNumber:5},void 0),wu=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/burndown-chart.tsx",lineNumber:26,columnNumber:5},void 0),Eu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/performance-chart.tsx",lineNumber:43,columnNumber:5},void 0),Uu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/metric-comparison.tsx",lineNumber:43,columnNumber:5},void 0),Du=({value:e,min:r=0,max:t=100,size:a=120,strokeWidth:i=10,showValue:o=!0,label:s,variant:l="primary",className:c})=>{const u=Math.min(t,Math.max(r,e)),m=(u-r)/(t-r)*100,b=a/2,p=(a-i)/2,h=Math.PI*p,g=h-m/100*h,x={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return n.jsxDEV("div",{className:f("inline-flex flex-col items-center gap-2",c),children:[n.jsxDEV("svg",{width:a,height:a*.65,className:"transform rotate-180",children:[n.jsxDEV("path",{d:`M ${i/2} ${b} A ${p} ${p} 0 0 1 ${a-i/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:i,strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:65,columnNumber:9},void 0),n.jsxDEV("path",{d:`M ${i/2} ${b} A ${p} ${p} 0 0 1 ${a-i/2} ${b}`,fill:"none",className:f(x[l],"transition-all duration-500"),strokeWidth:i,strokeDasharray:h,strokeDashoffset:g,strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:72,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:64,columnNumber:7},void 0),o&&n.jsxDEV("div",{className:"text-center -mt-8",children:[n.jsxDEV("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(u)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:84,columnNumber:11},void 0),s&&n.jsxDEV("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:88,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:83,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:63,columnNumber:5},void 0)},Cu=({value:e=0,max:r=100,variant:t="default",size:a="md",showLabel:i=!1,label:o,indeterminate:s=!1,striped:l=!1,animated:c=!1,className:u})=>{const m=Math.min(Math.max(e/r*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},p={sm:"h-1",md:"h-2",lg:"h-4"};return n.jsxDEV("div",{className:f("w-full",u),children:[n.jsxDEV("div",{className:f("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",p[a]),role:"progressbar","aria-valuenow":s?void 0:m,"aria-valuemin":0,"aria-valuemax":100,children:s?n.jsxDEV("div",{className:f("h-full rounded-full animate-pulse",b[t]),style:{width:"100%"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:96,columnNumber:11},void 0):n.jsxDEV("div",{className:f("h-full rounded-full transition-all duration-300",b[t],l&&"bg-stripe",l&&c&&"animate-stripe"),style:{width:`${m}%`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:104,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:85,columnNumber:7},void 0),(i||o)&&n.jsxDEV("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:o||`${Math.round(m)}%`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:116,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:84,columnNumber:5},void 0)},Su=({value:e,size:r=100,strokeWidth:t=8,showValue:a=!0,label:i,variant:o="primary",color:s,trackColor:l,className:c})=>{const u=Math.min(100,Math.max(0,e)),m=r/2,b=(r-t)/2,p=2*Math.PI*b,h=p-u/100*p,g={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},x=l||"stroke-gray-200 dark:stroke-gray-700";return n.jsxDEV("div",{className:f("inline-flex items-center justify-center",c),children:n.jsxDEV("div",{className:"relative",style:{width:r,height:r},children:[n.jsxDEV("svg",{width:r,height:r,className:"transform -rotate-90",children:[n.jsxDEV("circle",{cx:m,cy:m,r:b,className:x,strokeWidth:t,fill:"none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:86,columnNumber:11},void 0),n.jsxDEV("circle",{cx:m,cy:m,r:b,className:f(s?"":g[o],"transition-all duration-300 ease-in-out"),stroke:s,strokeWidth:t,strokeDasharray:p,strokeDashoffset:h,strokeLinecap:"round",fill:"none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:96,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:84,columnNumber:9},void 0),(a||i)&&n.jsxDEV("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[a&&!i&&n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(u),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:117,columnNumber:15},void 0),i&&n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:125,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:115,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:82,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:81,columnNumber:5},void 0)},Vu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/progress-tracker.tsx",lineNumber:43,columnNumber:5},void 0),Au=({src:e,alt:r,fallback:t,width:a,height:i,objectFit:o="cover",loading:s="lazy",showLoader:l=!0,rounded:c="none",border:u=!1,className:m,onLoad:b,onError:p})=>{const[h,g]=y.useState(!0),[x,N]=y.useState(!1),[U,_]=y.useState(e);y.useEffect(()=>{g(!0),N(!1),_(e)},[e]);const E=()=>{g(!1),b?.()},j=()=>{g(!1),N(!0),t&&U!==t&&(_(t),N(!1),g(!0)),p?.()},k={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},C={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},w={width:typeof a=="number"?`${a}px`:a,height:typeof i=="number"?`${i}px`:i};return n.jsxDEV("div",{className:f("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",k[c],u&&"border border-gray-200 dark:border-gray-700",m),style:w,children:[l&&h&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxDEV("div",{className:"animate-pulse",children:n.jsxDEV(A.PhotoIcon,{className:"h-8 w-8 text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:144,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:143,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:142,columnNumber:9},void 0),x&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxDEV(A.PhotoIcon,{className:"h-8 w-8 text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:151,columnNumber:9},void 0),!x&&n.jsxDEV("img",{src:U,alt:r,loading:s,onLoad:E,onError:j,className:f("w-full h-full",C[o],h&&l&&"opacity-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:158,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:131,columnNumber:5},void 0)},Tu=({images:e,columns:r=3,gap:t=16,lightbox:a=!0,className:i})=>{const[o,s]=y.useState(null),l=b=>{a&&s(b)},c=()=>{s(null)},u=()=>{if(!o)return;const b=e.findIndex(h=>h.id===o.id),p=b>0?b-1:e.length-1;s(e[p])},m=()=>{if(!o)return;const b=e.findIndex(h=>h.id===o.id),p=b<e.length-1?b+1:0;s(e[p])};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:f("grid",i),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${t}px`},children:e.map(b=>n.jsxDEV("div",{className:f("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",a&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>l(b),children:[n.jsxDEV("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:95,columnNumber:13},void 0),b.caption&&n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:101,columnNumber:15},void 0)]},b.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:87,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:79,columnNumber:7},void 0),a&&o&&n.jsxDEV("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:c,children:[n.jsxDEV("button",{onClick:c,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:125,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:119,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:115,columnNumber:11},void 0),n.jsxDEV("button",{onClick:b=>{b.stopPropagation(),u()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:147,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:141,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:134,columnNumber:11},void 0),n.jsxDEV("button",{onClick:b=>{b.stopPropagation(),m()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:169,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:163,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:156,columnNumber:11},void 0),n.jsxDEV("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[n.jsxDEV("img",{src:o.src,alt:o.alt||"",className:"max-w-full max-h-[80vh] object-contain"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:182,columnNumber:13},void 0),o.caption&&n.jsxDEV("p",{className:"text-white text-center mt-4",children:o.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:188,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:178,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:111,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:78,columnNumber:5},void 0)},Lu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-comparison.tsx",lineNumber:43,columnNumber:5},void 0),Iu=({src:e,onCropComplete:r,initialCrop:t,className:a})=>{const[i,o]=y.useState(t||{x:50,y:50,width:200,height:200}),s=y.useRef(null),l=async()=>{if(!s.current||!r)return;const c=document.createElement("canvas"),u=c.getContext("2d");if(!u)return;const m=s.current,b=m.naturalWidth/m.width,p=m.naturalHeight/m.height;c.width=i.width*b,c.height=i.height*p,u.drawImage(m,i.x*b,i.y*p,i.width*b,i.height*p,0,0,c.width,c.height);const h=c.toDataURL("image/png");r(h,i)};return n.jsxDEV("div",{className:f("inline-flex flex-col gap-4",a),children:[n.jsxDEV("div",{className:"relative inline-block",children:[n.jsxDEV("img",{ref:s,src:e,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:88,columnNumber:9},void 0),n.jsxDEV("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${i.x}px`,top:`${i.y}px`,width:`${i.width}px`,height:`${i.height}px`,cursor:"move"},children:[n.jsxDEV("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:107,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:108,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:109,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:110,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:97,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:87,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:115,columnNumber:9},void 0),n.jsxDEV("button",{onClick:()=>o(t||{x:50,y:50,width:200,height:200}),className:f("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:128,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:114,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:146,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:86,columnNumber:5},void 0)},Pu=({images:e,index:r,isOpen:t,onClose:a,onIndexChange:i,showThumbnails:o=!1,showDownload:s=!1,showZoom:l=!0,className:c})=>{const[u,m]=y.useState(1),b=e[r],p=r>0,h=r<e.length-1,g=y.useCallback(()=>{if(p){const j=r-1;i?.(j),m(1)}},[p,r,i]),x=y.useCallback(()=>{if(h){const j=r+1;i?.(j),m(1)}},[h,r,i]),N=()=>{m(j=>Math.min(j+.5,3))},U=()=>{m(j=>Math.max(j-.5,.5))},_=()=>{m(1)},E=()=>{const j=document.createElement("a");j.href=b.src,j.download=b.alt||"image",j.click()};return y.useEffect(()=>{if(!t)return;const j=k=>{switch(k.key){case"Escape":a();break;case"ArrowLeft":g();break;case"ArrowRight":x();break;case"+":case"=":N();break;case"-":case"_":U();break;case"0":_();break}};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[t,r,e.length,a,g,x]),y.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),y.useEffect(()=>{m(1)},[r]),!t||!b?null:n.jsxDEV(Ne,{children:n.jsxDEV("div",{className:f("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",c),children:[n.jsxDEV("div",{className:"absolute inset-0",onClick:a,"aria-label":"Close lightbox"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:188,columnNumber:9},void 0),n.jsxDEV("button",{onClick:a,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:206,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:200,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:195,columnNumber:9},void 0),p&&n.jsxDEV("button",{onClick:g,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:228,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:222,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:217,columnNumber:11},void 0),h&&n.jsxDEV("button",{onClick:x,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:251,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:245,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:240,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[n.jsxDEV("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",e.length]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:264,columnNumber:11},void 0),l&&n.jsxDEV("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[n.jsxDEV("button",{onClick:U,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:282,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:276,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:271,columnNumber:15},void 0),n.jsxDEV("button",{onClick:_,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(u*100),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:290,columnNumber:15},void 0),n.jsxDEV("button",{onClick:N,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:308,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:302,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:297,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:270,columnNumber:13},void 0),s&&n.jsxDEV("button",{onClick:E,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:332,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:326,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:321,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:262,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:n.jsxDEV("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${u})`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:345,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:344,columnNumber:9},void 0),b.caption&&n.jsxDEV("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:n.jsxDEV("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:358,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:357,columnNumber:11},void 0),o&&e.length>1&&n.jsxDEV("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:e.map((j,k)=>n.jsxDEV("button",{onClick:()=>{i?.(k),m(1)},className:f("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",k===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:n.jsxDEV("img",{src:j.thumbnail||j.src,alt:j.alt||"",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:382,columnNumber:17},void 0)},k,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:368,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:366,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:180,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:179,columnNumber:5},void 0)},Mu=({src:e,poster:r,autoPlay:t=!1,loop:a=!1,muted:i=!1,controls:o=!0,className:s})=>{const l=y.useRef(null),[c,u]=y.useState(t),[m,b]=y.useState(1),[p,h]=y.useState(0),[g,x]=y.useState(0);y.useEffect(()=>{const k=l.current;if(!k)return;const C=()=>h(k.currentTime),w=()=>x(k.duration),S=()=>u(!0),v=()=>u(!1);return k.addEventListener("timeupdate",C),k.addEventListener("loadedmetadata",w),k.addEventListener("play",S),k.addEventListener("pause",v),()=>{k.removeEventListener("timeupdate",C),k.removeEventListener("loadedmetadata",w),k.removeEventListener("play",S),k.removeEventListener("pause",v)}},[]);const N=()=>{l.current&&(c?l.current.pause():l.current.play())},U=k=>{const C=parseFloat(k.target.value);b(C),l.current&&(l.current.volume=C)},_=k=>{const C=parseFloat(k.target.value);h(C),l.current&&(l.current.currentTime=C)},E=()=>{l.current&&(document.fullscreenElement?document.exitFullscreen():l.current.requestFullscreen())},j=k=>{const C=Math.floor(k/60),w=Math.floor(k%60);return`${C}:${w.toString().padStart(2,"0")}`};return n.jsxDEV("div",{className:f("relative group",s),children:[n.jsxDEV("video",{ref:l,src:e,poster:r,autoPlay:t,loop:a,muted:i,className:"w-full rounded-lg",onClick:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:117,columnNumber:7},void 0),o&&n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsxDEV("input",{type:"range",min:"0",max:g||0,value:p,onChange:_,className:"w-full mb-2 accent-white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:131,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex items-center justify-between gap-4",children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("button",{onClick:N,className:"text-white hover:text-gray-300 transition-colors",children:c?n.jsxDEV("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:153,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:148,columnNumber:19},void 0):n.jsxDEV("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M8 5v14l11-7z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:161,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:156,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:143,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:173,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:168,columnNumber:17},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"1",step:"0.1",value:m,onChange:U,className:"w-20 accent-white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:175,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:167,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-white text-sm",children:[j(p)," / ",j(g)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:187,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:141,columnNumber:13},void 0),n.jsxDEV("button",{onClick:E,className:"text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:198,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:197,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:193,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:116,columnNumber:5},void 0)},Ou=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-thumbnail.tsx",lineNumber:43,columnNumber:5},void 0),Ru=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-editor.tsx",lineNumber:26,columnNumber:5},void 0),zu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-call.tsx",lineNumber:43,columnNumber:5},void 0),Bu=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/live-stream.tsx",lineNumber:26,columnNumber:5},void 0),Wu=({src:e,title:r,artist:t,artwork:a,autoPlay:i=!1,loop:o=!1,className:s})=>{const l=y.useRef(null),[c,u]=y.useState(i),[m,b]=y.useState(0),[p,h]=y.useState(0),[g,x]=y.useState(1);y.useEffect(()=>{const k=l.current;if(!k)return;const C=()=>b(k.currentTime),w=()=>h(k.duration),S=()=>u(!0),v=()=>u(!1),T=()=>u(!1);return k.addEventListener("timeupdate",C),k.addEventListener("loadedmetadata",w),k.addEventListener("play",S),k.addEventListener("pause",v),k.addEventListener("ended",T),()=>{k.removeEventListener("timeupdate",C),k.removeEventListener("loadedmetadata",w),k.removeEventListener("play",S),k.removeEventListener("pause",v),k.removeEventListener("ended",T)}},[]);const N=()=>{l.current&&(c?l.current.pause():l.current.play())},U=k=>{const C=parseFloat(k.target.value);b(C),l.current&&(l.current.currentTime=C)},_=k=>{const C=parseFloat(k.target.value);x(C),l.current&&(l.current.volume=C)},E=k=>{const C=Math.floor(k/60),w=Math.floor(k%60);return`${C}:${w.toString().padStart(2,"0")}`},j=p>0?m/p*100:0;return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",s),children:[n.jsxDEV("audio",{ref:l,src:e,autoPlay:i,loop:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:118,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center gap-4 mb-4",children:[a&&n.jsxDEV("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:n.jsxDEV("img",{src:a,alt:r||"Album artwork",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:124,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:123,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[r&&n.jsxDEV("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:135,columnNumber:13},void 0),t&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:140,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:133,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:120,columnNumber:7},void 0),n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("input",{type:"range",min:"0",max:p||0,value:m,onChange:U,className:"w-full accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:149,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[n.jsxDEV("span",{children:E(m)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:158,columnNumber:11},void 0),n.jsxDEV("span",{children:E(p)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:159,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:157,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:148,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("button",{onClick:N,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:c?n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:173,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:172,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M8 5v14l11-7z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:181,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:176,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:167,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:193,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:188,columnNumber:13},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"1",step:"0.1",value:g,onChange:_,className:"w-24 accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:195,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:187,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:165,columnNumber:9},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[j.toFixed(0),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:208,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:112,columnNumber:5},void 0)},Fu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-waveform.tsx",lineNumber:43,columnNumber:5},void 0),qu=({data:e,width:r=200,height:t=40,color:a="#3b82f6",gap:i=2,className:o})=>{if(e.length===0)return null;const s=(r-(e.length-1)*i)/e.length;return n.jsxDEV("svg",{width:r,height:t,className:f("inline-block",o),children:e.map((l,c)=>{const u=Math.max(2,l*t),m=c*(s+i),b=(t-u)/2;return n.jsxDEV("rect",{x:m,y:b,width:s,height:u,fill:a,rx:s/2},c,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/wave-form.tsx",lineNumber:59,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/wave-form.tsx",lineNumber:48,columnNumber:5},void 0)},$u=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/voice-recorder.tsx",lineNumber:43,columnNumber:5},void 0),Hu=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/podcast-player.tsx",lineNumber:26,columnNumber:5},void 0),Gu=({accept:e=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:t=10,multiple:a=!0,onUpload:i,onRemove:o,className:s})=>{const[l,c]=y.useState([]),[u,m]=y.useState(!1),b=y.useRef(null),p=E=>{E.preventDefault(),m(!0)},h=E=>{E.preventDefault(),m(!1)},g=E=>{E.preventDefault(),m(!1);const j=Array.from(E.dataTransfer.files);N(j)},x=E=>{if(E.target.files){const j=Array.from(E.target.files);N(j)}},N=E=>{const j=E.filter(S=>{const v=e.some(P=>{if(P.endsWith("/*")){const I=P.split("/")[0];return S.type.startsWith(I)}return S.type===P}),T=S.size<=r;return v&&T}),k=t-l.length,C=j.slice(0,k),w=C.map(S=>({id:`${Date.now()}-${Math.random()}`,file:S,preview:S.type.startsWith("image/")?URL.createObjectURL(S):void 0,status:"pending"}));c(S=>[...S,...w]),i&&i(C)},U=E=>{c(j=>j.filter(k=>k.id!==E)),o&&o(E)},_=E=>E<1024?`${E} B`:E<1024*1024?`${(E/1024).toFixed(1)} KB`:`${(E/(1024*1024)).toFixed(1)} MB`;return n.jsxDEV("div",{className:f("space-y-4",s),children:[n.jsxDEV("div",{onDragEnter:p,onDragOver:E=>E.preventDefault(),onDragLeave:h,onDrop:g,onClick:()=>b.current?.click(),className:f("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",u?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[n.jsxDEV("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:157,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:151,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:164,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",t," files, ",_(r)," each"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:167,columnNumber:9},void 0),n.jsxDEV("input",{ref:b,type:"file",multiple:a,accept:e.join(","),onChange:x,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:171,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:138,columnNumber:7},void 0),l.length>0&&n.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:l.map(E=>n.jsxDEV("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[E.preview?n.jsxDEV("img",{src:E.preview,alt:E.file.name,className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:190,columnNumber:17},void 0):n.jsxDEV("div",{className:"w-full h-full flex items-center justify-center",children:n.jsxDEV("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:202,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:197,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:196,columnNumber:17},void 0),n.jsxDEV("button",{onClick:()=>U(E.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:217,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:211,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:207,columnNumber:15},void 0),n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[n.jsxDEV("p",{className:"truncate",children:E.file.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:227,columnNumber:17},void 0),n.jsxDEV("p",{className:"text-gray-300",children:_(E.file.size)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:228,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:226,columnNumber:15},void 0)]},E.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:185,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:183,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:136,columnNumber:5},void 0)},Yu=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-playlist.tsx",lineNumber:43,columnNumber:5},void 0),Ku=({className:e,children:r,disabled:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/playlist-manager.tsx",lineNumber:26,columnNumber:5},void 0),Zu=({value:e,size:r=200,fgColor:t="#000000",bgColor:a="#ffffff",showDownload:i=!1,className:o})=>{const s=y.useRef(null);y.useEffect(()=>{const c=s.current;if(!c)return;const u=c.getContext("2d");if(!u)return;u.fillStyle=a,u.fillRect(0,0,r,r),u.fillStyle=t;const m=8,b=r/m,p=e.split("").reduce((g,x)=>g+x.charCodeAt(0),0);for(let g=0;g<m;g++)for(let x=0;x<m;x++)(p+g*m+x)%3!==0&&u.fillRect(x*b,g*b,b,b);const h=b*3;[[0,0],[r-h,0],[0,r-h]].forEach(([g,x])=>{u.strokeStyle=t,u.lineWidth=b,u.strokeRect(g+b/2,x+b/2,h-b,h-b)})},[e,r,t,a]);const l=()=>{const c=s.current;if(!c)return;const u=c.toDataURL("image/png"),m=document.createElement("a");m.download="qrcode.png",m.href=u,m.click()};return n.jsxDEV("div",{className:f("inline-flex flex-col items-center gap-3",o),children:[n.jsxDEV("canvas",{ref:s,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:120,columnNumber:7},void 0),i&&n.jsxDEV("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:128,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:142,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:119,columnNumber:5},void 0)},Qr=({isOpen:e,onClose:r,title:t,size:a="medium",variant:i="default",overlay:o="default",showCloseButton:s=!0,closeOnOverlayClick:l=!0,closeOnEscape:c=!0,children:u,className:m,"aria-labelledby":b,"aria-describedby":p,closeAriaLabel:h="Close modal"})=>{const g=y.useRef(null),x=y.useRef(null);if(y.useEffect(()=>{if(!e||!c)return;const E=j=>{j.key==="Escape"&&r()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[e,c,r]),y.useEffect(()=>{if(e)return x.current=document.activeElement,g.current&&g.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",x.current&&x.current.focus()}},[e]),!e)return null;const N=()=>{const E=O.overlays.modal.content(),j=O.overlays.modal[a]();return f(E,j)},U=E=>{l&&E.target===E.currentTarget&&r()},_=n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:O.overlays.modal.backdrop(),onClick:U},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:99,columnNumber:7},void 0),n.jsxDEV("div",{className:O.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":p,children:n.jsxDEV("div",{ref:g,"data-testid":"modal-content",className:f(N(),m),tabIndex:-1,onClick:E=>E.stopPropagation(),children:[t&&n.jsxDEV("div",{className:O.overlays.modal.header(),children:[n.jsxDEV("h2",{id:b,className:O.overlays.modal.title(),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:119,columnNumber:15},void 0),s&&n.jsxDEV("button",{onClick:r,className:O.overlays.modal.closeButton(),"aria-label":h,children:n.jsxDEV(A.XMarkIcon,{className:O.icon.variant.muted.md()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:131,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:126,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:118,columnNumber:13},void 0),u]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:110,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:103,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:98,columnNumber:5},void 0);return Nn.createPortal(_,document.body)},Qu=({children:e,variant:r="default",className:t})=>n.jsxDEV("div",{"data-testid":"modal-header",className:f(O.overlays.modal.header(),t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:156,columnNumber:3},void 0),Xr=({children:e,variant:r="default",className:t})=>n.jsxDEV("div",{"data-testid":"modal-body",className:f(O.overlays.modal.body(),t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:175,columnNumber:3},void 0),Jr=({children:e,variant:r="default",className:t})=>n.jsxDEV("div",{"data-testid":"modal-footer",className:f(O.overlays.modal.footer(),t),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:194,columnNumber:3},void 0),Xu=({isOpen:e,onClose:r,children:t,side:a="right",size:i="md",showCloseButton:o=!0,title:s,footer:l,className:c})=>{if(y.useEffect(()=>{const p=h=>{h.key==="Escape"&&e&&r()};if(e)return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,r]),!e)return null;const u={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},m={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:e?"translate-x-0":"-translate-x-full",right:e?"translate-x-0":"translate-x-full",top:e?"translate-y-0":"-translate-y-full",bottom:e?"translate-y-0":"translate-y-full"};return n.jsxDEV(Ne,{children:[n.jsxDEV(lr,{isOpen:e,onClose:r,opacity:"medium"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:126,columnNumber:7},void 0),n.jsxDEV("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",m[a],u[a][i],b[a],c),children:[(s||o)&&n.jsxDEV("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[s&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:143,columnNumber:15},void 0),o&&n.jsxDEV("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:159,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:153,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:148,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:141,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 overflow-y-auto p-6",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:172,columnNumber:9},void 0),l&&n.jsxDEV("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:176,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:127,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:125,columnNumber:5},void 0)},Ju=({children:e,active:r=!0,initialFocus:t,returnFocus:a=!0,className:i})=>{const o=y.useRef(null),s=y.useRef(null);return y.useEffect(()=>{if(!r)return;a&&(s.current=document.activeElement);const l=()=>{if(!o.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(o.current.querySelectorAll(b))},c=()=>{if(t){const p=o.current?.querySelector(t);if(p){p.focus();return}}const b=l();b.length>0&&b[0].focus()},u=b=>{if(b.key!=="Tab")return;const p=l();if(p.length===0){b.preventDefault();return}const h=p[0],g=p[p.length-1];b.shiftKey?document.activeElement===h&&(b.preventDefault(),g.focus()):document.activeElement===g&&(b.preventDefault(),h.focus())},m=setTimeout(c,0);return document.addEventListener("keydown",u),()=>{clearTimeout(m),document.removeEventListener("keydown",u),a&&s.current&&s.current.focus()}},[r,t,a]),r?n.jsxDEV("div",{ref:o,className:f(i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-trap.tsx",lineNumber:149,columnNumber:5},void 0):n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-trap.tsx",lineNumber:145,columnNumber:12},void 0)},ec=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/hover-tooltip.tsx",lineNumber:43,columnNumber:5},void 0),rc=({children:e,onLoadMore:r,loading:t=!1,hasMore:a=!0,threshold:i=100,loader:o,endMessage:s,height:l,scrollDirection:c="vertical",reverse:u=!1,className:m})=>{const b=y.useRef(null),[p,h]=y.useState(!1);y.useEffect(()=>{const U=b.current;if(!U||t||!a)return;const _=()=>{const{scrollTop:E,scrollHeight:j,clientHeight:k,scrollLeft:C,scrollWidth:w,clientWidth:S}=U;c==="vertical"&&h(E>300);let v;c==="vertical"?u?v=E:v=j-E-k:u?v=C:v=w-C-S,v<i&&r()};return U.addEventListener("scroll",_),()=>U.removeEventListener("scroll",_)},[t,a,i,r,c,u]);const g=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},x=n.jsxDEV("div",{className:"flex justify-center items-center py-4",children:[n.jsxDEV("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:134,columnNumber:7},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:135,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:133,columnNumber:5},void 0),N=n.jsxDEV("div",{className:"flex justify-center items-center py-4",children:n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:144,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:143,columnNumber:5},void 0);return n.jsxDEV("div",{className:f("relative",m),children:[n.jsxDEV("div",{ref:b,className:f(c==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:c==="vertical"?l:void 0,width:c==="horizontal"?"100%":void 0,display:c==="horizontal"?"flex":void 0,flexDirection:u&&c==="vertical"?"column-reverse":void 0},children:[u&&t&&(o||x),u&&!t&&!a&&s,n.jsxDEV("div",{className:f(c==="horizontal"&&"flex",c==="horizontal"&&u&&"flex-row-reverse"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:176,columnNumber:9},void 0),!u&&t&&(o||x),!u&&!t&&!a&&(s||N)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:153,columnNumber:7},void 0),c==="vertical"&&!u&&p&&n.jsxDEV("button",{onClick:g,className:f("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:212,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:206,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:192,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:151,columnNumber:5},void 0)},nc=({trigger:e,children:r,placement:t="bottom",isOpen:a,onOpenChange:i,trigger_action:o="click",showArrow:s=!0,className:l})=>{const[c,u]=y.useState(!1),m=a!==void 0?a:c,b=y.useCallback(k=>{a===void 0&&u(k),i?.(k)},[a,i]),p=y.useRef(null),h=y.useRef(null),[g,x]=y.useState({top:0,left:0});y.useEffect(()=>{if(!m||!p.current)return;const k=()=>{const C=p.current.getBoundingClientRect(),w=8;let S=0,v=0;switch(t){case"top":S=C.top-w,v=C.left+C.width/2;break;case"top-start":S=C.top-w,v=C.left;break;case"top-end":S=C.top-w,v=C.right;break;case"bottom":S=C.bottom+w,v=C.left+C.width/2;break;case"bottom-start":S=C.bottom+w,v=C.left;break;case"bottom-end":S=C.bottom+w,v=C.right;break;case"left":S=C.top+C.height/2,v=C.left-w;break;case"right":S=C.top+C.height/2,v=C.right+w;break}x({top:S,left:v})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[m,t]),y.useEffect(()=>{if(!m)return;const k=C=>{p.current&&!p.current.contains(C.target)&&h.current&&!h.current.contains(C.target)&&b(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[m,b]),y.useEffect(()=>{if(!m)return;const k=C=>{C.key==="Escape"&&b(!1)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[m,b]);const N=()=>{o==="click"&&b(!m)},U=()=>{o==="hover"&&b(!0)},_=()=>{o==="hover"&&b(!1)},E={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},j={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return n.jsxDEV("div",{className:f("relative inline-block",l),children:[n.jsxDEV("div",{ref:p,onClick:N,onMouseEnter:U,onMouseLeave:_,className:"inline-block",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:219,columnNumber:7},void 0),m&&n.jsxDEV("div",{ref:h,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",E[t],j[t]),style:{position:"fixed",top:g.top+"px",left:g.left+"px"},onMouseEnter:o==="hover"?()=>b(!0):void 0,onMouseLeave:o==="hover"?()=>b(!1):void 0,children:[r,s&&n.jsxDEV("div",{className:f("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",t.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",t.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",t==="left"&&"right-[-5px] border-l-0 border-b-0",t==="right"&&"left-[-5px] border-r-0 border-t-0",(t==="top"||t==="bottom")&&"left-1/2 -translate-x-1/2",(t==="left"||t==="right")&&"top-1/2 -translate-y-1/2")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:256,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:230,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:218,columnNumber:5},void 0)},tc=({sections:e,activeId:r,onActiveChange:t,offset:a=80,container:i,smoothScroll:o=!0,showSubsections:s=!0,className:l})=>{const[c,u]=y.useState(""),m=y.useRef(null),b=r!==void 0?r:c;y.useEffect(()=>{const g=i?document.querySelector(i):window;if(!g)return;const x=_=>_.flatMap(E=>[E.id,...E.subsections?x(E.subsections):[]]),U=x(e).map(_=>document.getElementById(_)).filter(Boolean);if(U.length!==0)return m.current=new IntersectionObserver(_=>{_.forEach(E=>{if(E.isIntersecting){const j=E.target.id;r!==void 0&&t?t(j):u(j)}})},{root:i?g:null,rootMargin:`-${a}px 0px -50% 0px`,threshold:0}),U.forEach(_=>{m.current?.observe(_)}),()=>{m.current?.disconnect()}},[e,i,a,r,t]);const p=g=>{const x=document.getElementById(g);if(!x)return;const N=i?document.querySelector(i):window;if(!N)return;const _=x.offsetTop-a;o?N===window?window.scrollTo({top:_,behavior:"smooth"}):N.scrollTo({top:_,behavior:"smooth"}):N===window?window.scrollTo(0,_):N.scrollTop=_},h=(g,x=0)=>{const N=b===g.id,U=g.subsections?.some(_=>b===_.id)||!1;return n.jsxDEV("div",{children:[n.jsxDEV("button",{onClick:()=>p(g.id),className:f("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",x===0?"font-medium":"pl-6 text-sm",N?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":U?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${x*.75+.75}rem`},children:g.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:175,columnNumber:9},void 0),s&&g.subsections&&g.subsections.length>0&&n.jsxDEV("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:g.subsections.map(_=>h(_,x+1))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:195,columnNumber:13},void 0)]},g.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:174,columnNumber:7},void 0)};return n.jsxDEV("nav",{className:f("space-y-1",l),children:e.map(g=>h(g,0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:206,columnNumber:5},void 0)},ac=({isOpen:e,onClose:r,children:t,title:a,description:i,footer:o,side:s="bottom",size:l="md",showHandle:c=!0,showCloseButton:u=!0,className:m})=>{if(y.useEffect(()=>{if(!e)return;const g=x=>{x.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,r]),!e)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},p={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},h={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return n.jsxDEV(Ne,{children:[n.jsxDEV(lr,{isOpen:e,onClose:r,opacity:"dark"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:137,columnNumber:7},void 0),n.jsxDEV("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",p[s],b[s][l],h[s],m),children:[c&&(s==="bottom"||s==="top")&&n.jsxDEV("div",{className:f("flex items-center justify-center",s==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:n.jsxDEV("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:158,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:152,columnNumber:11},void 0),(a||i||u)&&n.jsxDEV("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("div",{className:"flex items-start justify-between",children:[n.jsxDEV("div",{className:"flex-1",children:[a&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:168,columnNumber:19},void 0),i&&n.jsxDEV("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:173,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:166,columnNumber:15},void 0),u&&n.jsxDEV("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:190,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:184,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:179,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:165,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:164,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:204,columnNumber:9},void 0),o&&n.jsxDEV("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:208,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:138,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:136,columnNumber:5},void 0)},ic=({isOpen:e,onClose:r,onSubmit:t,title:a,description:i,placeholder:o="",initialValue:s="",cancelText:l="Cancel",confirmText:c="Confirm",isLoading:u=!1,loadingText:m="Processing...",maxLength:b,required:p=!0,validate:h})=>{const[g,x]=y.useState(s),[N,U]=y.useState(null);y.useEffect(()=>{e&&(x(s),U(null))},[e,s]);const _=async k=>{if(k.preventDefault(),U(null),p&&!g.trim()){U("This field is required");return}if(h){const C=h(g);if(C){U(C);return}}try{await t(g.trim())}catch(C){U(C instanceof Error?C.message:"An error occurred")}},E=()=>{x(s),U(null),r()},j=p?g.trim().length>0:!0;return n.jsxDEV(Qr,{isOpen:e,onClose:E,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!u,closeOnOverlayClick:!u,children:n.jsxDEV("form",{onSubmit:_,children:[n.jsxDEV(Xr,{variant:"padded",children:[n.jsxDEV("h3",{id:"text-input-modal-title",className:L.heading.h4(),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:101,columnNumber:11},void 0),n.jsxDEV("p",{id:"text-input-modal-description",className:`${L.body.md()} mt-2 mb-4`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:104,columnNumber:11},void 0),n.jsxDEV(ur,{type:"text",value:g,onChange:k=>x(k.target.value),placeholder:o,maxLength:b,disabled:u,autoFocus:!0,"aria-invalid":!!N,"aria-describedby":N?"text-input-error":void 0},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:110,columnNumber:11},void 0),N&&n.jsxDEV("p",{id:"text-input-error",className:`${L.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:122,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:100,columnNumber:9},void 0),n.jsxDEV(Jr,{children:[n.jsxDEV(me,{type:"button",variant:"outline",onClick:E,disabled:u,children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:132,columnNumber:11},void 0),n.jsxDEV(me,{type:"submit",variant:"default",disabled:!j||u,children:u?m:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:131,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:99,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:90,columnNumber:5},void 0)},oc=({content:e,children:r,placement:t="top",delayShow:a=0,delayHide:i=0,className:o,disabled:s=!1,showArrow:l=!0,variant:c="default",trigger:u="hover",isOpen:m,onVisibilityChange:b})=>{const[p,h]=y.useState(!1),g=y.useRef(void 0),x=y.useRef(void 0),N=y.useRef(null),U=y.useRef(null),_=m!==void 0,E=_?m:p,j=y.useCallback(()=>{s||_||(x.current&&(clearTimeout(x.current),x.current=void 0),a>0?g.current=setTimeout(()=>{h(!0),b?.(!0)},a):(h(!0),b?.(!0)))},[s,_,a,b]),k=y.useCallback(()=>{_||(g.current&&(clearTimeout(g.current),g.current=void 0),i>0?x.current=setTimeout(()=>{h(!1),b?.(!1)},i):(h(!1),b?.(!1)))},[_,i,b]);y.useEffect(()=>()=>{g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current)},[]),y.useEffect(()=>{if(u!=="click"||!E)return;const F=ne=>{N.current&&!N.current.contains(ne.target)&&U.current&&!U.current.contains(ne.target)&&k()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[u,E,k]);const C=()=>{u==="hover"&&j()},w=()=>{u==="hover"&&k()},S=()=>{u==="hover"&&j()},v=()=>{u==="hover"&&k()},T=()=>{u==="click"&&!_&&(E?(h(!1),b?.(!1)):(h(!0),b?.(!0)))},P={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},I={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},z={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},R={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return n.jsxDEV("div",{ref:U,className:"relative inline-block",onMouseEnter:C,onMouseLeave:w,onFocus:S,onBlur:v,onClick:T,children:[r,E&&!s&&n.jsxDEV("div",{ref:N,className:f("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",P[t],z[c],o),role:"tooltip",children:[e,l&&n.jsxDEV("div",{className:f("absolute w-0 h-0 border-4 arrow",I[t],R[c][t])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:274,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:262,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:251,columnNumber:5},void 0)},sc={default:A.InformationCircleIcon,warning:A.ExclamationTriangleIcon,danger:A.XCircleIcon,success:A.CheckCircleIcon,info:A.InformationCircleIcon},lc={default:()=>O.icon.variant.default.lg(),warning:()=>O.icon.variant.warning.lg(),danger:()=>O.icon.variant.error.lg(),success:()=>O.icon.variant.success.lg(),info:()=>O.icon.variant.default.lg()},uc={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},cc=({isOpen:e,onClose:r,onConfirm:t,title:a,message:i,confirmText:o="Confirm",cancelText:s="Cancel",loadingText:l="Processing...",variant:c="default",isLoading:u=!1})=>{const m=sc[c],b=lc[c],p=uc[c];return n.jsxDEV(Qr,{isOpen:e,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[n.jsxDEV(Xr,{variant:"padded",children:[n.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[n.jsxDEV(m,{className:b()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:77,columnNumber:11},void 0),n.jsxDEV("h3",{id:"confirmation-dialog-title",className:L.heading.h4(),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:78,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:76,columnNumber:9},void 0),n.jsxDEV("p",{id:"confirmation-dialog-description",className:L.body.md(),children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:85,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:75,columnNumber:7},void 0),n.jsxDEV(Jr,{children:[n.jsxDEV(me,{variant:"outline",onClick:r,disabled:u,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:93,columnNumber:9},void 0),n.jsxDEV(me,{variant:p,onClick:t,disabled:u,children:u?l:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:96,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:92,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:67,columnNumber:5},void 0)},mc=({trigger:e,children:r,placement:t="bottom",openDelay:a=200,closeDelay:i=300,className:o})=>{const[s,l]=y.useState(!1),[c,u]=y.useState({top:0,left:0}),m=y.useRef(null),b=y.useRef(null),p=y.useRef(void 0),h=y.useRef(void 0);y.useEffect(()=>{if(!s||!m.current)return;const _=()=>{const E=m.current.getBoundingClientRect(),j=8;let k=0,C=0;switch(t){case"top":k=E.top-j,C=E.left+E.width/2;break;case"bottom":k=E.bottom+j,C=E.left+E.width/2;break;case"left":k=E.top+E.height/2,C=E.left-j;break;case"right":k=E.top+E.height/2,C=E.right+j;break}u({top:k,left:C})};return _(),window.addEventListener("scroll",_),window.addEventListener("resize",_),()=>{window.removeEventListener("scroll",_),window.removeEventListener("resize",_)}},[s,t]);const g=()=>{h.current&&clearTimeout(h.current),p.current=setTimeout(()=>{l(!0)},a)},x=()=>{p.current&&clearTimeout(p.current),h.current=setTimeout(()=>{l(!1)},i)},N={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},U={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{ref:m,onMouseEnter:g,onMouseLeave:x,className:"inline-block",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:144,columnNumber:7},void 0),s&&n.jsxDEV(Ne,{children:n.jsxDEV("div",{ref:b,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",N[t],U[t],o),style:{top:c.top+"px",left:c.left+"px"},onMouseEnter:()=>{h.current&&clearTimeout(h.current)},onMouseLeave:x,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:155,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:154,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:143,columnNumber:5},void 0)},dc=({children:e,onDrop:r,onDragOver:t,accept:a,showIndicator:i=!0,indicator:o,disabled:s=!1,className:l})=>{const[c,u]=y.useState(!1),[m,b]=y.useState(0),p=U=>{U.preventDefault(),U.stopPropagation(),!s&&(b(_=>_+1),U.dataTransfer.items&&U.dataTransfer.items.length>0&&u(!0))},h=U=>{U.preventDefault(),U.stopPropagation(),!s&&b(_=>{const E=_-1;return E===0&&u(!1),E})},g=U=>{U.preventDefault(),U.stopPropagation(),!s&&t&&t(U)},x=U=>{if(U.preventDefault(),U.stopPropagation(),s)return;if(u(!1),b(0),U.dataTransfer.files&&U.dataTransfer.files.length>0){const E=Array.from(U.dataTransfer.files);let j=E;a&&a.length>0&&(j=E.filter(k=>a.some(C=>{if(C.endsWith("/*")){const w=C.split("/")[0];return k.type.startsWith(w)}return k.type===C}))),r(j);return}const _=U.dataTransfer.getData("text/plain");if(_)try{const E=JSON.parse(_);r(E)}catch{r(_)}},N=n.jsxDEV("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[n.jsxDEV("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:157,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:151,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:150,columnNumber:5},void 0);return n.jsxDEV("div",{onDragEnter:p,onDragLeave:h,onDragOver:g,onDrop:x,className:f("relative",s&&"opacity-50 cursor-not-allowed",l),children:[e,i&&c&&!s&&(o||N)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:169,columnNumber:5},void 0)},bc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop-list.tsx",lineNumber:43,columnNumber:5},void 0),fc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/sortable-grid.tsx",lineNumber:43,columnNumber:5},void 0),gc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/nested-drag.tsx",lineNumber:43,columnNumber:5},void 0),hc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/gesture-detector.tsx",lineNumber:43,columnNumber:5},void 0),xc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/swipe-actions.tsx",lineNumber:43,columnNumber:5},void 0),pc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pinch-zoom.tsx",lineNumber:43,columnNumber:5},void 0),Nc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/double-tap.tsx",lineNumber:43,columnNumber:5},void 0),yc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/long-press.tsx",lineNumber:43,columnNumber:5},void 0),vc=({className:e,children:r,disabled:t=!1,onClick:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",t&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:t?void 0:a,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/radial-menu.tsx",lineNumber:43,columnNumber:5},void 0),jc=({children:e,onRefresh:r,disabled:t=!1,refreshingText:a="Refreshing...",pullDownText:i="Pull down to refresh",releaseText:o="Release to refresh",threshold:s=80,maxPullDistance:l=120,className:c=""})=>{const[u,m]=y.useState(0),[b,p]=y.useState(!1),[h,g]=y.useState(!1),x=y.useRef(0),N=y.useRef(null);y.useEffect(()=>{const k=N.current;if(!k)return;const C=v=>{if(t||b)return;k.scrollTop<=0&&(x.current=v.touches[0].clientY,g(!0))},w=v=>{if(!h)return;const P=v.touches[0].clientY-x.current;if(P>0&&k.scrollTop<=0){const I=Math.min(P/l,1),z=Math.min(P*(1-I*.5),l);m(z),P>10&&v.preventDefault()}},S=async()=>{if(h)if(g(!1),u>=s&&!b){p(!0);try{await r()}catch{}finally{p(!1),m(0)}}else m(0)};return k.addEventListener("touchstart",C,{passive:!0}),k.addEventListener("touchmove",w,{passive:!1}),k.addEventListener("touchend",S),()=>{k.removeEventListener("touchstart",C),k.removeEventListener("touchmove",w),k.removeEventListener("touchend",S)}},[t,b,h,u,s,l,r]);const U=Math.min(u/s,1),_=h||b,E=h?u:b?s:0,j=()=>b?a:u>=s?o:i;return n.jsxDEV("div",{ref:N,className:`relative ${c}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[n.jsxDEV("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${E}px`,marginTop:h?0:`-${E}px`,opacity:_?1:0,pointerEvents:"none"},children:n.jsxDEV("div",{className:"flex flex-col items-center justify-center gap-2",children:[n.jsxDEV(A.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${U*360}deg)`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:147,columnNumber:11},void 0),u>20&&n.jsxDEV("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:j()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:156,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:146,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:137,columnNumber:7},void 0),n.jsxDEV("div",{style:{paddingTop:h?`${u}px`:0,transition:h?"none":"padding-top 200ms ease-out"},children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:127,columnNumber:5},void 0)},fe={twitter:(e,r,t)=>{const a=t.length>0?`&hashtags=${t.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}${a}`},facebook:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,linkedin:(e,r,t)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,reddit:(e,r)=>`https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(r)}`,telegram:(e,r)=>`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}`,whatsapp:(e,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+e)}`,email:(e,r,t)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(t+`
46
+ `,xs(g))}}},[e]),n.jsxDEV("div",{ref:b,className:`${x()} ${i}`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:186,columnNumber:5},void 0)},Ns=({children:e,delay:r=0,className:a=""})=>n.jsxDEV(nr,{animation:"fade-in-up",delay:r,className:a,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:198,columnNumber:3},void 0),ys=({children:e,delay:r=0,className:a=""})=>n.jsxDEV(nr,{animation:"fade-in-scale",delay:r,className:a,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:208,columnNumber:3},void 0),vs=({children:e,className:r=""})=>n.jsxDEV(nr,{animation:"float",className:r,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/animated-section.tsx",lineNumber:221,columnNumber:3},void 0),_s=({isOpen:e,onClick:r,opacity:a="medium",blur:t=!1,zIndex:o=50,className:i,children:s})=>{const l={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return e?n.jsxDEV("div",{onClick:r,className:f("fixed inset-0","transition-all duration-200",l[a],t&&"backdrop-blur-sm",i),style:{zIndex:o},role:"presentation","aria-hidden":"true",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/backdrop.tsx",lineNumber:67,columnNumber:5},void 0):null},_a=({isOpen:e,onClose:r,children:a,size:t="md",showCloseButton:o=!0,closeOnOutsideClick:i=!0,closeOnEscape:s=!0,className:l})=>{if(y.useEffect(()=>{if(!s||!e||!r)return;const u=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,r,s]),!e)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},c=()=>{i&&r&&r()};return n.jsxDEV(fe,{children:[n.jsxDEV(Qe,{isOpen:e,onClose:c,opacity:"dark",blur:!0},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:96,columnNumber:7},void 0),n.jsxDEV("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:n.jsxDEV("div",{className:f("relative w-full",d[t],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",l),onClick:u=>u.stopPropagation(),children:[o&&r&&n.jsxDEV("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:127,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:121,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:116,columnNumber:13},void 0),a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:103,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:102,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/dialog.tsx",lineNumber:95,columnNumber:5},void 0)},ks=({isOpen:e,onClose:r,items:a,placeholder:t="Type a command or search...",emptyMessage:o="No results found.",className:i})=>{const[s,l]=y.useState(""),[d,c]=y.useState(0),u=y.useRef(null),b=a.filter(p=>{const N=s.toLowerCase();return p.label.toLowerCase().includes(N)||p.keywords?.some(j=>j.toLowerCase().includes(N))||p.group?.toLowerCase().includes(N)}),x=b.reduce((p,N)=>{const j=N.group||"Commands";return p[j]||(p[j]=[]),p[j].push(N),p},{});y.useEffect(()=>{e||(l(""),c(0))},[e]),y.useEffect(()=>{e&&u.current&&u.current.focus()},[e]),y.useEffect(()=>{c(0)},[s]);const h=p=>{switch(p.key){case"ArrowDown":p.preventDefault(),c(N=>N<b.length-1?N+1:N);break;case"ArrowUp":p.preventDefault(),c(N=>N>0?N-1:N);break;case"Enter":p.preventDefault(),b[d]&&(b[d].onSelect(),r());break;case"Escape":p.preventDefault(),r();break}},g=p=>{p.onSelect(),r()};return n.jsxDEV(_a,{isOpen:e,onClose:r,size:"lg",showCloseButton:!1,className:f("overflow-hidden p-0",i),children:[n.jsxDEV("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:159,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:153,columnNumber:11},void 0),n.jsxDEV("input",{ref:u,type:"text",value:s,onChange:p=>l(p.target.value),onKeyDown:h,placeholder:t,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:166,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:152,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:151,columnNumber:7},void 0),n.jsxDEV("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(x).length===0?n.jsxDEV("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:181,columnNumber:11},void 0):Object.entries(x).map(([p,N])=>n.jsxDEV("div",{className:"mb-4 last:mb-0",children:[n.jsxDEV("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:p},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:188,columnNumber:15},void 0),n.jsxDEV("div",{className:"space-y-1",children:N.map(j=>{const U=b.indexOf(j)===d;return n.jsxDEV("button",{onClick:()=>g(j),className:f("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",U?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[j.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:j.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:211,columnNumber:25},void 0),n.jsxDEV("span",{className:"flex-1 truncate",children:j.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:215,columnNumber:23},void 0),j.shortcut&&n.jsxDEV("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:j.shortcut},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:217,columnNumber:25},void 0)]},j.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:199,columnNumber:21},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:193,columnNumber:15},void 0)]},p,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:186,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:179,columnNumber:7},void 0),n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:234,columnNumber:13},void 0),n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:237,columnNumber:13},void 0),"to navigate"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:233,columnNumber:11},void 0),n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:243,columnNumber:13},void 0),"to select"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:242,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:232,columnNumber:9},void 0),n.jsxDEV("span",{className:"flex items-center gap-1",children:[n.jsxDEV("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:250,columnNumber:11},void 0),"to close"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:249,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:231,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/command.tsx",lineNumber:143,columnNumber:5},void 0)},ws=Z.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),Es=({label:e,value:r,change:a,trend:t="none",icon:o,variant:i="default",className:s})=>{const l={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},d={up:"↗",down:"↘",neutral:"→",none:""};return n.jsxDEV("div",{className:f(ws({variant:i,trend:t}),s),children:n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:65,columnNumber:11},void 0),n.jsxDEV("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:68,columnNumber:11},void 0),a&&n.jsxDEV("p",{className:f("text-sm font-medium flex items-center gap-1 mt-1",l[t||"none"]),children:[n.jsxDEV("span",{children:d[t||"none"]},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:78,columnNumber:15},void 0),a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:72,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:64,columnNumber:9},void 0),o&&n.jsxDEV("div",{className:"text-3xl opacity-80",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:83,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:63,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:62,columnNumber:5},void 0)},Us=Z.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),js=({title:e,description:r,children:a,variant:t="default",spacing:o="normal",className:i})=>n.jsxDEV("div",{className:f(Us({variant:t,spacing:o}),i),children:[(e||r)&&n.jsxDEV("div",{className:"space-y-1",children:[e&&n.jsxDEV("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:130,columnNumber:13},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:135,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:128,columnNumber:9},void 0),a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:126,columnNumber:5},void 0),Cs=Z.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),Ss=({icon:e,title:r,description:a,layout:t="vertical",spacing:o="normal",interactive:i=!1,className:s,onClick:l})=>n.jsxDEV("div",{className:f(Cs({layout:t,spacing:o,interactive:i}),s),onClick:l,children:[n.jsxDEV("div",{className:"text-4xl mb-4 flex-shrink-0",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:200,columnNumber:7},void 0),n.jsxDEV("div",{className:"space-y-2",children:[n.jsxDEV("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:202,columnNumber:9},void 0),n.jsxDEV("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:205,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:201,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/design-system-components.tsx",lineNumber:193,columnNumber:5},void 0),Vs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-indicator.tsx",lineNumber:43,columnNumber:5},void 0),As=({icon:e,size:r="md",shape:a="rounded",variant:t="blue-purple",gradientClasses:o,className:i,iconClassName:s})=>{const l={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},d={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},c={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:o||"bg-gradient-to-r from-blue-600 to-purple-600"},u=l[r];return n.jsxDEV("div",{className:f("flex items-center justify-center flex-shrink-0",u.container,d[a],c[t],i),children:n.jsxDEV(e,{className:f("text-white",u.icon,s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/gradient-icon-container.tsx",lineNumber:96,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/gradient-icon-container.tsx",lineNumber:87,columnNumber:5},void 0)},Ts={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},Ls={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},Is={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},Ms={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},Ps={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},Os=({children:e,size:r="lg",variant:a="primary",shape:t="rounded",animation:o="float",className:i})=>n.jsxDEV("div",{className:f("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",Ts[r],Is[a],Ms[t],Ps[o],i),children:n.jsxDEV("div",{className:f(Ls[r]),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-container.tsx",lineNumber:80,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-container.tsx",lineNumber:70,columnNumber:5},void 0),Ds=({icon:e,children:r,iconPosition:a="left",gap:t="md",iconSize:o="md",align:i="left",variant:s="default",className:l,iconClassName:d,textClassName:c})=>{const u={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},b={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},x={left:"text-left",center:"text-center items-center",right:"text-right items-end"},h={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},g={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return n.jsxDEV("div",{className:f(g[a],u[t],a==="top"&&x[i],h[s],l),children:[n.jsxDEV(e,{className:f(b[o],"flex-shrink-0",d)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:119,columnNumber:7},void 0),n.jsxDEV("span",{className:f(c),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:126,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/icon-text.tsx",lineNumber:110,columnNumber:5},void 0)},zs=({children:e,title:r,variant:a="info",size:t="md",icon:o,bordered:i=!0,className:s})=>{const l={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},d={sm:"p-3",md:"p-4",lg:"p-6"},c=l[a];return n.jsxDEV("div",{className:f("rounded-lg",c.bg,i&&`border ${c.border}`,d[t],s),children:[(r||o)&&n.jsxDEV("div",{className:"flex items-start gap-3 mb-2",children:[o&&n.jsxDEV(o,{className:f("h-5 w-5 flex-shrink-0 mt-0.5",c.icon)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:119,columnNumber:13},void 0),r&&n.jsxDEV("h3",{className:f(L.body.strong.md(),c.title),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:124,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:117,columnNumber:9},void 0),n.jsxDEV("div",{className:f(!r&&!o&&c.text),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:132,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/info-box.tsx",lineNumber:107,columnNumber:5},void 0)},Bs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/keyboard-shortcut.tsx",lineNumber:43,columnNumber:5},void 0),Ws=({size:e="md",className:r="",showText:a=!0,onClick:t,logoSrc:o="/logo.png",logoAlt:i="Logo",logoText:s,fontFamily:l="Dancing Script, cursive"})=>{const c=(()=>{switch(e){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),u=n.jsxDEV(n.Fragment,{children:[n.jsxDEV("img",{src:o,alt:i,className:c.image},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:63,columnNumber:7},void 0),a&&n.jsxDEV("div",{className:`${c.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:65,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:62,columnNumber:5},void 0);return t?n.jsxDEV("button",{onClick:t,className:`flex items-center ${c.container} ${r} hover:opacity-80 transition-opacity`,children:u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:77,columnNumber:7},void 0):n.jsxDEV("div",{className:`flex items-center ${c.container} ${r}`,children:u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/logo.tsx",lineNumber:87,columnNumber:5},void 0)},Fs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/morph-transition.tsx",lineNumber:43,columnNumber:5},void 0),qs=({title:e,description:r,count:a,countLabel:t,action:o,loading:i=!1,loadingText:s="Loading...",size:l="md",className:d})=>{const u={sm:{title:L.heading.h4(),description:L.body.sm(),count:L.caption.default()},md:{title:L.heading.h3(),description:L.body.md(),count:L.body.sm()},lg:{title:L.heading.h2(),description:L.body.lg(),count:L.body.md()}}[l];return n.jsxDEV("div",{className:f("flex items-start justify-between gap-4",d),children:[n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:"flex items-center gap-3 flex-wrap",children:[n.jsxDEV("h2",{className:f(u.title,"text-gray-900 dark:text-gray-100"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:88,columnNumber:11},void 0),a!==void 0&&n.jsxDEV("span",{className:f(u.count,"text-gray-500 dark:text-gray-400"),children:["(",a,t&&` ${t}`,")"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:94,columnNumber:13},void 0),i&&n.jsxDEV("span",{className:f(u.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:111,columnNumber:15},void 0),s]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:105,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:87,columnNumber:9},void 0),r&&n.jsxDEV("p",{className:f(u.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:117,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:86,columnNumber:7},void 0),o&&n.jsxDEV("div",{className:"flex-shrink-0",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:127,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/page-section-header.tsx",lineNumber:85,columnNumber:5},void 0)},$s=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/parallax-scroll.tsx",lineNumber:43,columnNumber:5},void 0),Hs=({actions:e,orientation:r="horizontal",columns:a=3,className:t})=>{const o={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},i={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return n.jsxDEV("div",{className:f(i[r],r==="grid"&&`grid-cols-${a}`,t),style:r==="grid"?{gridTemplateColumns:`repeat(${a}, 1fr)`}:void 0,children:e.map(s=>n.jsxDEV("button",{onClick:s.onClick,disabled:s.disabled,className:f("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",o[s.variant||"default"],s.disabled&&"opacity-50 cursor-not-allowed"),children:[s.icon&&n.jsxDEV("span",{className:"w-5 h-5",children:s.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:88,columnNumber:27},void 0),n.jsxDEV("span",{children:s.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:89,columnNumber:11},void 0)]},s.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:78,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/quick-actions.tsx",lineNumber:65,columnNumber:5},void 0)},Gs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/reveal-on-scroll.tsx",lineNumber:43,columnNumber:5},void 0),Ys={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Ks=({icon:e,text:r,variant:a="default",size:t="md",className:o})=>{const{container:i,icon:s}=Lt(a),l=Ys[t];return n.jsxDEV("div",{className:f("inline-flex items-center rounded-full mb-6",i,l.container,o),children:[n.jsxDEV("div",{className:f("animate-float-icon",s,l.icon),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:50,columnNumber:7},void 0),n.jsxDEV("span",{className:l.text,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:53,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-badge.tsx",lineNumber:42,columnNumber:5},void 0)},Zs=({title:e,onAdd:r,addButtonTooltip:a,loading:t,className:o=""})=>n.jsxDEV("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,children:n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:40,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex items-center space-x-2",children:[t&&n.jsxDEV("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:45,columnNumber:13},void 0),r&&n.jsxDEV("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:a,"aria-label":a||"Add",children:n.jsxDEV("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:60,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:54,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:48,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:43,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:39,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/section-header.tsx",lineNumber:36,columnNumber:5},void 0),Qs=e=>{switch(e){case"cog":return A.Cog6ToothIcon;case"arrow-right":return A.ArrowRightIcon;case"shield":return A.ShieldCheckIcon;case"reply":case"chat":return A.ChatBubbleLeftRightIcon;case"filter":return A.FunnelIcon;case"plug":return A.LinkIcon;case"adjustments":return A.AdjustmentsHorizontalIcon;case"currency-dollar":return A.CurrencyDollarIcon;default:return A.Cog6ToothIcon}},Xs=({settings:e,selectedSetting:r,onSettingSelect:a,className:t=""})=>n.jsxDEV("nav",{className:f("space-y-1",t),"aria-label":"Settings navigation",children:n.jsxDEV("ul",{className:"space-y-1",role:"list",children:e.map(o=>{const i=Qs(o.icon),s=r===o.id;return n.jsxDEV("li",{children:n.jsxDEV("button",{onClick:()=>a(o.id),className:f("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",L.body.sm(),s?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":s?"page":void 0,title:o.description,children:n.jsxDEV("div",{className:"flex items-center flex-1 min-w-0",children:[n.jsxDEV(i,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:122,columnNumber:19},void 0),n.jsxDEV("span",{className:"truncate",children:o.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:126,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:121,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:109,columnNumber:15},void 0)},o.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:108,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:102,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/settings-list.tsx",lineNumber:98,columnNumber:5},void 0),Js=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/skip-navigation.tsx",lineNumber:43,columnNumber:5},void 0),Rs=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sort-dropdown.tsx",lineNumber:43,columnNumber:5},void 0),el=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/version-badge.tsx",lineNumber:43,columnNumber:5},void 0),rl=({children:e,as:r="span"})=>n.jsxDEV(r,{className:"sr-only",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/visually-hidden.tsx",lineNumber:35,columnNumber:10},void 0),ar=Z.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:L.link.subtle(),default:L.link.default(),muted:L.link.muted(),external:L.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),Or=G.forwardRef(({className:e,variant:r,size:a,to:t,href:o,external:i,children:s,...l},d)=>{const c=t||o;return c?i||c.startsWith("http")||c.startsWith("mailto:")?n.jsxDEV("a",{className:f(ar({variant:r==="subtle"?"external":r,size:a,className:e})),href:c,target:"_blank",rel:"noopener noreferrer",ref:d,...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:71,columnNumber:9},void 0):n.jsxDEV(ur.Link,{className:f(ar({variant:r,size:a,className:e})),to:c,ref:d,...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:92,columnNumber:7},void 0):n.jsxDEV("span",{className:f(ar({variant:r,size:a,className:e})),...l,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:55,columnNumber:9},void 0)});Or.displayName="SmartLink";const nl=(e,r)=>G.useMemo(()=>{let a=e;return Object.entries(r).forEach(([t,o])=>{const i=new RegExp(`\\b${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(i,s=>`<SmartLink to="${o}" variant="subtle">${s}</SmartLink>`)}),a},[e,r]),al={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},tl=({children:e,mappings:r=al,className:a,variant:t="subtle"})=>{const o=G.useMemo(()=>{if(!e||typeof e!="string")return e||"";let s=e;return Object.entries(r).sort(([d],[c])=>c.length-d.length).forEach(([d,c])=>{if(d&&c){const u=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");s=s.replace(u,b=>`__LINK_START__${c}__LINK_MID__${b}__LINK_END__`)}}),s},[e,r]);if(!o||typeof o!="string")return n.jsxDEV("span",{className:a,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:219,columnNumber:12},void 0);const i=o.split(/(__LINK_START__.*?__LINK_END__)/);return n.jsxDEV("span",{className:a,children:i.map((s,l)=>{const d=s.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,c,u]=d;return n.jsxDEV(Or,{to:c,variant:t,children:u},l,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:233,columnNumber:13},void 0)}return s})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/smart-link.tsx",lineNumber:225,columnNumber:5},void 0)},ol=({href:e,children:r,variant:a="default",external:t=!1,showExternalIcon:o=!1,disabled:i=!1,className:s,...l})=>{const d=t||e.startsWith("http://")||e.startsWith("https://"),c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},u=d?{target:"_blank",rel:"noopener noreferrer"}:{};return i?n.jsxDEV("span",{className:f("cursor-not-allowed opacity-50",c[a],s),children:[r,o&&d&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:94,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:85,columnNumber:7},void 0):n.jsxDEV("a",{href:e,className:f("inline-flex items-center transition-colors",c[a],s),...u,...l,children:[r,o&&d&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:113,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/link.tsx",lineNumber:101,columnNumber:5},void 0)},il=({href:e,children:r,showIcon:a=!0,iconPosition:t="right",size:o="md",variant:i="default",className:s,onClick:l})=>{const d={sm:{text:L.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:L.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:L.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},u=d[o];return n.jsxDEV("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:l,className:f("inline-flex items-center",u.gap,u.text,c[i],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",s),children:[a&&t==="left"&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:f(u.icon,"flex-shrink-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:108,columnNumber:9},void 0),n.jsxDEV("span",{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:112,columnNumber:7},void 0),a&&t==="right"&&n.jsxDEV(A.ArrowTopRightOnSquareIcon,{className:f(u.icon,"flex-shrink-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:114,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/external-link.tsx",lineNumber:91,columnNumber:5},void 0)},sl=({items:e,separator:r="/",className:a})=>n.jsxDEV("nav",{className:f("flex items-center gap-2 text-sm",a),children:e.map((t,o)=>n.jsxDEV(y.Fragment,{children:[o>0&&n.jsxDEV("span",{className:"text-gray-400 dark:text-gray-600",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:26,columnNumber:13},void 0),o===e.length-1?n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-medium",children:t.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:31,columnNumber:13},void 0):n.jsxDEV("button",{onClick:t.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:t.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:35,columnNumber:13},void 0)]},o,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:24,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/breadcrumb-nav.tsx",lineNumber:22,columnNumber:5},void 0),ll=be.Root,ka=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(be.List,{ref:a,className:f(O.navigation.tabs.list(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:12,columnNumber:3},void 0));ka.displayName=be.List.displayName;const wa=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(be.Trigger,{ref:a,className:f(O.navigation.tabs.trigger(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:24,columnNumber:3},void 0));wa.displayName=be.Trigger.displayName;const Ea=G.forwardRef(({className:e,...r},a)=>n.jsxDEV(be.Content,{ref:a,className:f(O.navigation.tabs.content(),e),...r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tabs.tsx",lineNumber:36,columnNumber:3},void 0));Ea.displayName=be.Content.displayName;const cl=({items:e,orientation:r="horizontal",className:a})=>{const[t,o]=y.useState(new Set),i=l=>{o(d=>{const c=new Set(d);return c.has(l)?c.delete(l):c.add(l),c})},s=(l,d)=>{const c=l.children&&l.children.length>0,u=t.has(d),b=n.jsxDEV(n.Fragment,{children:[l.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:l.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:77,columnNumber:11},void 0),n.jsxDEV("span",{className:"flex-1",children:l.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:79,columnNumber:9},void 0),c&&n.jsxDEV("svg",{className:f("w-4 h-4 transition-transform",r==="horizontal"&&!u&&"-rotate-90",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:91,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:81,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:75,columnNumber:7},void 0),x=f("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return n.jsxDEV("div",{children:[c?n.jsxDEV("button",{onClick:()=>i(d),className:f(x,"w-full"),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:113,columnNumber:11},void 0):l.href?n.jsxDEV("a",{href:l.href,className:x,onClick:l.onClick,children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:120,columnNumber:11},void 0):n.jsxDEV("button",{onClick:l.onClick,className:f(x,"w-full"),children:b},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:124,columnNumber:11},void 0),c&&u&&n.jsxDEV("div",{className:f("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:l.children.map((h,g)=>n.jsxDEV("div",{children:h.href?n.jsxDEV("a",{href:h.href,onClick:h.onClick,className:f("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",h.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:154,columnNumber:23},void 0),h.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:142,columnNumber:19},void 0):n.jsxDEV("button",{onClick:h.onClick,className:f("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",h.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[h.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4",children:h.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:172,columnNumber:23},void 0),h.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:161,columnNumber:19},void 0)},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:140,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:131,columnNumber:11},void 0)]},d,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:111,columnNumber:7},void 0)};return n.jsxDEV("nav",{className:f("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:e.map((l,d)=>s(l,d))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/navigation-menu.tsx",lineNumber:188,columnNumber:5},void 0)},dl=({items:e,selectedPath:r,onSelect:a,variant:t="default",className:o})=>{const i=t==="compact"?"space-y-1":"space-y-0";return n.jsxDEV("div",{className:f(i,o),children:e.map(s=>{const l=s.icon,d=r===s.path,c=s.disabled,u=f("flex items-start cursor-pointer transition-colors",t==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",c&&"opacity-50 cursor-not-allowed"),b=d?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return n.jsxDEV("div",{onClick:()=>!c&&a(s.path),className:f(u,!c&&b),role:"button",tabIndex:c?-1:0,"aria-current":d?"page":void 0,"aria-disabled":c,onKeyDown:x=>{!c&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),a(s.path))},children:[n.jsxDEV(l,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:105,columnNumber:13},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:f("font-medium",L.body.md()),children:[s.label,s.badge!==void 0&&s.badge>0&&n.jsxDEV("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:s.badge},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:110,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:107,columnNumber:15},void 0),s.description&&n.jsxDEV("div",{className:f("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:s.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:116,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:106,columnNumber:13},void 0)]},s.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:90,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/navigation-list.tsx",lineNumber:71,columnNumber:5},void 0)},ul=({items:e,className:r})=>n.jsxDEV("nav",{className:f("flex flex-col gap-1",r),children:e.map(a=>n.jsxDEV("button",{onClick:a.onClick,className:f("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&n.jsxDEV("span",{className:"w-5 h-5",children:a.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:32,columnNumber:25},void 0),n.jsxDEV("span",{className:"flex-1 text-left font-medium",children:a.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:33,columnNumber:11},void 0),a.badge&&n.jsxDEV("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:35,columnNumber:13},void 0)]},a.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:22,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/side-nav.tsx",lineNumber:20,columnNumber:5},void 0),ml=({currentPage:e,totalPages:r,onPageChange:a,siblingCount:t=1,showFirstLast:o=!1,size:i="md",className:s})=>{const d={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:L.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:L.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:L.body.lg()}}[i],u=(()=>{const k=[];k.push(1);const U=Math.max(e-t,2),_=Math.min(e+t,r-1);U>2&&k.push("ellipsis");for(let w=U;w<=_;w++)k.push(w);return _<r-1&&k.push("ellipsis"),r>1&&k.push(r),k})(),b=()=>{e>1&&a(e-1)},x=()=>{e<r&&a(e+1)},h=()=>{a(1)},g=()=>{a(r)},p=f("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),N=k=>f(p,d.button,d.text,k?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),j=f(p,d.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return n.jsxDEV("nav",{className:f("flex items-center gap-1",s),"aria-label":"Pagination",children:[o&&n.jsxDEV("button",{onClick:h,disabled:e===1,className:j,"aria-label":"Go to first page",children:n.jsxDEV("span",{className:d.text,children:"First"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:177,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:171,columnNumber:9},void 0),n.jsxDEV("button",{onClick:b,disabled:e===1,className:j,"aria-label":"Go to previous page",children:n.jsxDEV(A.ChevronLeftIcon,{className:d.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:188,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:182,columnNumber:7},void 0),u.map((k,U)=>k==="ellipsis"?n.jsxDEV("span",{className:f("inline-flex items-center justify-center",d.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${U}`,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:195,columnNumber:13},void 0):n.jsxDEV("button",{onClick:()=>a(k),className:N(k===e),"aria-label":`Go to page ${k}`,"aria-current":k===e?"page":void 0,children:k},k,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:209,columnNumber:11},void 0)),n.jsxDEV("button",{onClick:x,disabled:e===r,className:j,"aria-label":"Go to next page",children:n.jsxDEV(A.ChevronRightIcon,{className:d.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:228,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:222,columnNumber:7},void 0),o&&n.jsxDEV("button",{onClick:g,disabled:e===r,className:j,"aria-label":"Go to last page",children:n.jsxDEV("span",{className:d.text,children:"Last"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:239,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:233,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/pagination.tsx",lineNumber:165,columnNumber:5},void 0)},bl=({currentPage:e,totalPages:r,onPageChange:a,maxVisible:t=7,className:o})=>{const i=[];if(r<=t)for(let s=1;s<=r;s++)i.push(s);else{i.push(1),e>3&&i.push("...");const s=Math.max(2,e-1),l=Math.min(r-1,e+1);for(let d=s;d<=l;d++)i.push(d);e<r-2&&i.push("..."),i.push(r)}return n.jsxDEV("nav",{className:f("flex items-center gap-1",o),children:[n.jsxDEV("button",{onClick:()=>a(e-1),disabled:e===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:37,columnNumber:7},void 0),i.map((s,l)=>s==="..."?n.jsxDEV("span",{className:"px-3 py-2",children:"..."},`ellipsis-${l}`,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:47,columnNumber:11},void 0):n.jsxDEV("button",{onClick:()=>a(s),className:f("px-3 py-2 rounded",s===e?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:s},s,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:51,columnNumber:11},void 0)),n.jsxDEV("button",{onClick:()=>a(e+1),disabled:e===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:66,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/pagination-nav.tsx",lineNumber:36,columnNumber:5},void 0)},fl=({steps:e,currentStep:r,orientation:a="horizontal",clickable:t=!1,onStepClick:o,className:i})=>{const s=d=>{t&&o&&o(d)},l=d=>d<r?"completed":d===r?"active":"upcoming";return a==="horizontal"?n.jsxDEV("div",{className:f("w-full",i),children:n.jsxDEV("div",{className:"flex items-center justify-between",children:e.map((d,c)=>{const u=l(c),b=c===e.length-1;return n.jsxDEV(y.Fragment,{children:[n.jsxDEV("div",{className:"flex flex-col items-center",children:[n.jsxDEV("button",{onClick:()=>s(c),disabled:!t,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",t&&"hover:scale-110",u==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",u==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",u==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:u==="completed"?n.jsxDEV("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:115,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:109,columnNumber:23},void 0):d.icon?n.jsxDEV("span",{className:f("w-5 h-5",u==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:123,columnNumber:23},void 0):n.jsxDEV("span",{className:f("text-sm font-semibold",u==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:134,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:93,columnNumber:19},void 0),n.jsxDEV("div",{className:"mt-2 text-center",children:[n.jsxDEV("p",{className:f("text-sm font-medium",u==="active"?"text-blue-600 dark:text-blue-500":u==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:148,columnNumber:21},void 0),d.description&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:161,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:147,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:92,columnNumber:17},void 0),!b&&n.jsxDEV("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:n.jsxDEV("div",{className:f("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"w-full":"w-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:171,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:170,columnNumber:19},void 0)]},d.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:90,columnNumber:15},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:84,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:83,columnNumber:7},void 0):n.jsxDEV("div",{className:f("w-full",i),children:n.jsxDEV("div",{className:"space-y-4",children:e.map((d,c)=>{const u=l(c),b=c===e.length-1;return n.jsxDEV("div",{className:"flex gap-4",children:[n.jsxDEV("div",{className:"flex flex-col items-center",children:[n.jsxDEV("button",{onClick:()=>s(c),disabled:!t,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",t&&"hover:scale-110",u==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",u==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",u==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:u==="completed"?n.jsxDEV("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:221,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:215,columnNumber:21},void 0):d.icon?n.jsxDEV("span",{className:f("w-5 h-5",u==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:229,columnNumber:21},void 0):n.jsxDEV("span",{className:f("text-sm font-semibold",u==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:240,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:199,columnNumber:17},void 0),!b&&n.jsxDEV("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:n.jsxDEV("div",{className:f("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"h-full":"h-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:256,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:255,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:198,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex-1 pb-4",children:[n.jsxDEV("p",{className:f("text-sm font-medium",u==="active"?"text-blue-600 dark:text-blue-500":u==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:268,columnNumber:17},void 0),d.description&&n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:281,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:267,columnNumber:15},void 0)]},d.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:196,columnNumber:13},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:190,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper.tsx",lineNumber:189,columnNumber:5},void 0)},gl=({steps:e,currentStep:r,onStepClick:a,orientation:t="horizontal",className:o})=>n.jsxDEV("nav",{className:f(t==="horizontal"?"flex items-center":"flex flex-col",o),children:e.map((i,s)=>n.jsxDEV("div",{className:f("flex items-center",t==="vertical"&&"flex-col items-start"),children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("button",{onClick:()=>a?.(s),disabled:s>r,className:f("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",s<r&&"bg-green-500 text-white",s===r&&"bg-blue-500 text-white",s>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:s<r?"✓":s+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:41,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"font-medium text-gray-900 dark:text-white",children:i.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:55,columnNumber:15},void 0),i.description&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:i.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:59,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:54,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:40,columnNumber:11},void 0),s<e.length-1&&n.jsxDEV("div",{className:f(t==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:66,columnNumber:13},void 0)]},i.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:33,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/stepper-nav.tsx",lineNumber:26,columnNumber:5},void 0),hl=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:t,onSubsectionSelect:o})=>{const i=y.useRef(null),[s,l]=y.useState(void 0);return y.useEffect(()=>{if(i.current){const d=i.current.scrollHeight;l(r?d+8:0)}},[r,e]),n.jsxDEV("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:s!==void 0?`${s}px`:"auto"},children:n.jsxDEV("div",{ref:i,className:"ml-6 mt-2 space-y-1",children:e.map(d=>n.jsxDEV("button",{onClick:()=>o?.(d.id,t),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===d.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},d.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:53,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:51,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:47,columnNumber:5},void 0)},pl=({sections:e,selectedSection:r,selectedSubsection:a,expandedSections:t,onSectionSelect:o,onSubsectionSelect:i,onToggleSection:s,className:l=""})=>n.jsxDEV("nav",{className:`space-y-2 ${l}`,children:e.map(d=>n.jsxDEV("div",{children:[n.jsxDEV("div",{className:"flex items-center",children:[n.jsxDEV("button",{onClick:()=>o(d.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===d.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:d.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:85,columnNumber:13},void 0),d.subsections&&d.subsections.length>0&&n.jsxDEV("button",{onClick:()=>s(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:n.jsxDEV(A.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${t.includes(d.id)?"rotate-90":"rotate-0"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:100,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:96,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:84,columnNumber:11},void 0),d.subsections&&n.jsxDEV(hl,{subsections:d.subsections,isExpanded:t.includes(d.id),selectedSubsection:a,parentSectionId:d.id,onSubsectionSelect:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:112,columnNumber:13},void 0)]},d.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:83,columnNumber:9},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/navigation/table-of-contents.tsx",lineNumber:81,columnNumber:5},void 0);function xl({columns:e,data:r,keyExtractor:a,sort:t,onSort:o,onRowClick:i,striped:s=!1,hoverable:l=!1,compact:d=!1,bordered:c=!1,emptyMessage:u="No data available",className:b}){const x=g=>{g.sortable&&o&&o(g.key)},h={left:"text-left",center:"text-center",right:"text-right"};return n.jsxDEV("div",{className:f("w-full overflow-x-auto",b),children:n.jsxDEV("table",{className:"w-full",children:[n.jsxDEV("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("tr",{children:e.map(g=>n.jsxDEV("th",{className:f(d?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",h[g.align||"left"],g.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:g.width},onClick:()=>g.sortable&&x(g),children:n.jsxDEV("div",{className:"flex items-center gap-2",children:[g.label,g.sortable&&n.jsxDEV("span",{className:"flex flex-col",children:t?.column===g.key?t.direction==="asc"?n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M5 10l5-5 5 5H5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:130,columnNumber:29},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:125,columnNumber:27},this):n.jsxDEV("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M15 10l-5 5-5-5h10z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:138,columnNumber:29},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:133,columnNumber:27},this):n.jsxDEV("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:n.jsxDEV("path",{d:"M5 10l5-5 5 5H5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:147,columnNumber:27},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:142,columnNumber:25},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:122,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:119,columnNumber:17},this)},g.key,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:105,columnNumber:15},this))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:103,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:102,columnNumber:9},this),n.jsxDEV("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?n.jsxDEV("tr",{children:n.jsxDEV("td",{colSpan:e.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:162,columnNumber:15},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:161,columnNumber:13},this):r.map((g,p)=>n.jsxDEV("tr",{className:f(s&&p%2===1&&"bg-gray-50 dark:bg-gray-800/50",l&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",i&&"cursor-pointer"),onClick:()=>i?.(g,p),children:e.map(N=>n.jsxDEV("td",{className:f(d?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",h[N.align||"left"],c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:N.render?N.render(g,p):g[N.key]},N.key,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:184,columnNumber:19},this))},a(g,p),!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:171,columnNumber:15},this))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:159,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:100,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/table.tsx",lineNumber:99,columnNumber:5},this)}const Nl=({data:e,columns:r,hasActions:a=!1,renderCell:t,renderAction:o,emptyMessage:i="No data available",getRowKey:s=(d,c)=>String(c),className:l=""})=>!e||e.length===0?n.jsxDEV("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${l}`,children:n.jsxDEV("p",{className:`${L.body.sm()} text-gray-500 dark:text-gray-400`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:99,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:96,columnNumber:7},void 0):n.jsxDEV("div",{className:`relative ${l}`,children:n.jsxDEV("div",{className:"overflow-x-auto",children:n.jsxDEV("table",{className:"w-full border-collapse",children:[n.jsxDEV("thead",{children:n.jsxDEV("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((d,c)=>n.jsxDEV("th",{className:`${L.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:d},c,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:115,columnNumber:17},void 0)),a&&n.jsxDEV("th",{className:`${L.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:123,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:113,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:112,columnNumber:11},void 0),n.jsxDEV("tbody",{children:e.map((d,c)=>n.jsxDEV("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((u,b)=>{const x=t(d,b);return n.jsxDEV("td",{className:"py-3 px-4",children:typeof x=="string"?n.jsxDEV("span",{className:L.body.sm(),children:x},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:142,columnNumber:25},void 0):x},b,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:140,columnNumber:21},void 0)}),a&&n.jsxDEV("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:o?.(d)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:152,columnNumber:19},void 0)]},s(d,c),!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:133,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:131,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:111,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:110,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-table.tsx",lineNumber:109,columnNumber:5},void 0),yl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/data-grid.tsx",lineNumber:43,columnNumber:5},void 0),vl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/pivot-table.tsx",lineNumber:43,columnNumber:5},void 0),_l=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/spreadsheet-grid.tsx",lineNumber:43,columnNumber:5},void 0),kl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/column-resize.tsx",lineNumber:43,columnNumber:5},void 0),wl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/cell-editor.tsx",lineNumber:43,columnNumber:5},void 0),El=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/table-reservation.tsx",lineNumber:43,columnNumber:5},void 0),Ul=({children:e,type:r="unordered",spacing:a="sm",marker:t,size:o="md",className:i})=>{const s=r==="ordered"?"ol":"ul",l={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},d={sm:"text-sm",md:"text-base",lg:"text-lg"},c=()=>t==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[t||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[t||"decimal"];return n.jsxDEV(s,{className:f("ml-6",c(),l[a],d[o],"text-gray-900 dark:text-gray-100",i),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list.tsx",lineNumber:111,columnNumber:5},void 0)},jl=({children:e,className:r})=>n.jsxDEV("li",{className:f("leading-relaxed",r),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list.tsx",lineNumber:132,columnNumber:10},void 0),Cl=({children:e,onAction:r,actionText:a="Remove",actionIcon:t=A.TrashIcon,destructive:o=!0,isProcessing:i=!1,variant:s="default",className:l})=>{const d="flex items-center justify-between p-4 rounded-lg transition-colors",c={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return n.jsxDEV("div",{className:f(d,c[s],l),children:[n.jsxDEV("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:65,columnNumber:7},void 0),n.jsxDEV(oe,{variant:o?"ghost":"outline",size:"sm",onClick:r,disabled:i,className:f("ml-4",o&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[n.jsxDEV(t,{className:"h-4 w-4 mr-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:79,columnNumber:9},void 0),a]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:68,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/list-item-with-action.tsx",lineNumber:64,columnNumber:5},void 0)},Sl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/user-table.tsx",lineNumber:43,columnNumber:5},void 0),Vl=({source:e,target:r,onChange:a,sourceTitle:t="Available",targetTitle:o="Selected",searchable:i=!0,sourceSearchPlaceholder:s="Search available...",targetSearchPlaceholder:l="Search selected...",height:d=300,disabled:c=!1,className:u})=>{const[b,x]=y.useState(""),[h,g]=y.useState(""),[p,N]=y.useState(new Set),[j,k]=y.useState(new Set),U=i?e.filter(I=>I.label.toLowerCase().includes(b.toLowerCase())):e,_=i?r.filter(I=>I.label.toLowerCase().includes(h.toLowerCase())):r,w=I=>{const z=new Set(p);z.has(I)?z.delete(I):z.add(I),N(z)},S=I=>{const z=new Set(j);z.has(I)?z.delete(I):z.add(I),k(z)},E=()=>{const I=e.filter(W=>p.has(W.id)),z=e.filter(W=>!p.has(W.id)),D=[...r,...I];a(z,D),N(new Set)},V=()=>{const I=r.filter(W=>j.has(W.id)),z=r.filter(W=>!j.has(W.id)),D=[...e,...I];a(D,z),k(new Set)},v=()=>{const I=[...r,...e];a([],I),N(new Set)},T=()=>{const I=[...e,...r];a(I,[]),k(new Set)},M=(I,z,D,W,ae,an,A0)=>n.jsxDEV("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[n.jsxDEV("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[n.jsxDEV("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:z},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:168,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[I.length," item",I.length!==1?"s":""]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:171,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:167,columnNumber:7},void 0),i&&n.jsxDEV("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("input",{type:"text",value:ae,onChange:le=>an(le.target.value),placeholder:A0,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:179,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:178,columnNumber:9},void 0),n.jsxDEV("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:i?d-120:d-60},children:I.length===0?n.jsxDEV("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:195,columnNumber:11},void 0):I.map(le=>{const tn=D.has(le.id);return n.jsxDEV("button",{onClick:()=>!le.disabled&&W(le.id),disabled:le.disabled||c,className:f("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",tn&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:n.jsxDEV("div",{className:"flex items-start gap-2",children:[n.jsxDEV("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",tn?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:tn&&n.jsxDEV("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:232,columnNumber:25},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:226,columnNumber:23},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:217,columnNumber:19},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:le.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:244,columnNumber:21},void 0),le.description&&n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:le.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:248,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:243,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:215,columnNumber:17},void 0)},le.id,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:203,columnNumber:15},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:190,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:165,columnNumber:5},void 0);return n.jsxDEV("div",{className:f("flex gap-4",u),children:[M(U,t,p,w,b,x,s),n.jsxDEV("div",{className:"flex flex-col justify-center gap-2",children:[n.jsxDEV("button",{onClick:v,disabled:c||e.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:296,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:290,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:277,columnNumber:9},void 0),n.jsxDEV("button",{onClick:E,disabled:c||p.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:324,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:318,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:305,columnNumber:9},void 0),n.jsxDEV("button",{onClick:V,disabled:c||j.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:352,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:346,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:333,columnNumber:9},void 0),n.jsxDEV("button",{onClick:T,disabled:c||r.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:380,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:374,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:361,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:276,columnNumber:7},void 0),M(_,o,j,S,h,g,l)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/transfer-list.tsx",lineNumber:263,columnNumber:5},void 0)};function Al({items:e,itemHeight:r,height:a,renderItem:t,keyExtractor:o,overscan:i=3,className:s}){const[l,d]=y.useState(0),c=y.useRef(null),u=p=>{d(p.currentTarget.scrollTop)},b=e.length*r,x=Math.max(0,Math.floor(l/r)-i),h=Math.min(e.length-1,Math.ceil((l+a)/r)+i),g=e.slice(x,h+1);return n.jsxDEV("div",{ref:c,className:f("overflow-auto",s),style:{height:a},onScroll:u,children:n.jsxDEV("div",{style:{height:b,position:"relative"},children:g.map((p,N)=>{const j=x+N;return n.jsxDEV("div",{style:{position:"absolute",top:j*r,height:r,width:"100%"},children:t(p,j)},o(p,j),!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:89,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:84,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/virtual-list.tsx",lineNumber:77,columnNumber:5},this)}const Tl=({data:e,selectedId:r,onSelect:a,expandedIds:t,onExpand:o,defaultExpanded:i=!1,showLines:s=!1,className:l})=>{const[d,c]=y.useState(new Set(i?e.map(g=>g.id):[])),u=t!==void 0?new Set(t):d,b=g=>{t!==void 0&&o?o(g):c(p=>{const N=new Set(p);return N.has(g)?N.delete(g):N.add(g),N})},x=g=>{!g.disabled&&a&&a(g)},h=(g,p=0)=>{const N=g.children&&g.children.length>0,j=u.has(g.id),k=r===g.id;return n.jsxDEV("div",{children:[n.jsxDEV("div",{className:f("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!g.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",k&&"bg-blue-50 dark:bg-blue-900/30",g.disabled&&"opacity-50 cursor-not-allowed",!g.disabled&&"cursor-pointer"),style:{paddingLeft:`${p*1.5+.5}rem`},onClick:()=>x(g),children:[N?n.jsxDEV("button",{onClick:U=>{U.stopPropagation(),b(g.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:n.jsxDEV("svg",{className:f("w-3 h-3 transition-transform",j&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:140,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:131,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:124,columnNumber:13},void 0):n.jsxDEV("div",{className:"w-4 h-4 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:149,columnNumber:13},void 0),g.icon&&n.jsxDEV("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:g.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:154,columnNumber:13},void 0),n.jsxDEV("span",{className:f("flex-1 text-sm",k?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:g.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:160,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:111,columnNumber:9},void 0),N&&j&&n.jsxDEV("div",{className:f(s&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:g.children.map(U=>h(U,p+1))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:174,columnNumber:11},void 0)]},g.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:109,columnNumber:7},void 0)};return n.jsxDEV("div",{className:f("w-full",l),children:e.map(g=>h(g,0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tree-view.tsx",lineNumber:188,columnNumber:5},void 0)},Ll=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/listing-form.tsx",lineNumber:43,columnNumber:5},void 0),Il="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",Ml={none:"",sm:"p-3",md:"p-6",lg:"p-8"},Dr=({variant:e="elevated",padding:r="md",icon:a,onClose:t,className:o,children:i,...s})=>{const d=["info","success","warning","error"].includes(e)&&(a||t),c=e==="callout"?Il:At(e);return n.jsxDEV("div",{className:f("rounded-lg",c,Ml[r],o),...s,children:d?n.jsxDEV("div",{className:"flex items-start gap-3",children:[a&&n.jsxDEV("div",{className:"flex-shrink-0 text-lg",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:69,columnNumber:20},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:70,columnNumber:11},void 0),t&&n.jsxDEV("button",{onClick:t,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:83,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:77,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:72,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:68,columnNumber:9},void 0):i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:58,columnNumber:5},void 0)},Pl=({title:e,description:r,className:a,children:t,...o})=>n.jsxDEV("div",{className:f("space-y-1.5",a),...o,children:[e&&n.jsxDEV("h3",{className:L.heading.h4(),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:114,columnNumber:17},void 0),r&&n.jsxDEV("p",{className:L.body.sm(),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:115,columnNumber:23},void 0),t]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:113,columnNumber:5},void 0),Ol=({className:e,children:r,...a})=>n.jsxDEV("div",{className:f("",e),...a,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:127,columnNumber:5},void 0),Dl=({className:e,children:r,...a})=>n.jsxDEV("div",{className:f("flex items-center pt-4",e),...a,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:139,columnNumber:5},void 0),zl=({title:e,children:r,variant:a="info",size:t="default",className:o})=>{const i={sm:"sm",default:"md",lg:"lg"},s=a==="neutral"?"bordered":a;return n.jsxDEV(Dr,{variant:s,padding:i[t],className:o,children:[e&&n.jsxDEV("h3",{className:f("font-semibold mb-2",t==="sm"?"text-base":t==="lg"?"text-xl":"text-lg"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:171,columnNumber:9},void 0),r]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:165,columnNumber:5},void 0)},Bl=({title:e,icon:r,children:a,variant:t="gradient",size:o="default",centered:i=!1,className:s})=>{const l={sm:"sm",default:"md",lg:"lg"},d=t==="gradient"||t==="neutral"?"callout":t;return n.jsxDEV(Dr,{variant:d,padding:l[o],className:s,children:n.jsxDEV("div",{className:f("space-y-4",i&&"text-center"),children:[r&&n.jsxDEV("div",{className:f("font-bold",o==="sm"?"text-2xl":o==="lg"?"text-5xl":"text-4xl",i?"text-center":"text-left"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:217,columnNumber:11},void 0),e&&n.jsxDEV("h3",{className:f("font-bold mb-4",o==="sm"?"text-lg":o==="lg"?"text-3xl":"text-2xl"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:232,columnNumber:11},void 0),n.jsxDEV("div",{className:f("text-gray-600 dark:text-gray-400",o==="sm"?"text-sm":o==="lg"?"text-lg":"text-base"),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:245,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:215,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/card.tsx",lineNumber:210,columnNumber:5},void 0)},Wl=({title:e,value:r,change:a,changePeriod:t="vs last period",icon:o,variant:i="default",className:s})=>{const l={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return n.jsxDEV("div",{className:f("rounded-lg border border-gray-200 dark:border-gray-700 p-6",l[i],s),children:[n.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[n.jsxDEV("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:64,columnNumber:9},void 0),o&&n.jsxDEV("div",{className:"text-gray-400 dark:text-gray-600",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:67,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:63,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-end justify-between",children:n.jsxDEV("div",{children:[n.jsxDEV("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:72,columnNumber:11},void 0),a!==void 0&&n.jsxDEV("div",{className:"flex items-center gap-1 mt-2",children:[n.jsxDEV("span",{className:f("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:77,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:87,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:76,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:71,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:70,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/dashboard-stat-card.tsx",lineNumber:56,columnNumber:5},void 0)},Fl=({src:e,alt:r="Avatar",fallback:a,name:t,size:o="md",status:i,className:s,onClick:l})=>{const[d,c]=y.useState(!1),u={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},b={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},x={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},g=a||(t?(j=>{const k=j.trim().split(/\s+/);return k.length===1?k[0].charAt(0).toUpperCase():k[0].charAt(0).toUpperCase()+k[k.length-1].charAt(0).toUpperCase()})(t):""),p=e&&!d,N=()=>{c(!0)};return n.jsxDEV("div",{className:"relative inline-block flex-shrink-0",children:[n.jsxDEV("div",{className:f("flex items-center justify-center overflow-hidden rounded-full",u[o],!p&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",l&&"cursor-pointer hover:opacity-80 transition-opacity",s),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:p?n.jsxDEV("img",{src:e,alt:r,className:"w-full h-full object-cover",onError:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:110,columnNumber:11},void 0):n.jsxDEV("span",{className:"font-semibold",children:g},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:117,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:96,columnNumber:7},void 0),i&&n.jsxDEV("span",{className:f("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",x[i],b[o]),"aria-label":i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:121,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar.tsx",lineNumber:95,columnNumber:5},void 0)},ql=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/avatar-group.tsx",lineNumber:43,columnNumber:5},void 0),$l=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/profile-header.tsx",lineNumber:43,columnNumber:5},void 0),Hl=({label:e,value:r,orientation:a="vertical",align:t="start",labelWidth:o="auto",size:i="md",separator:s=!1,labelVariant:l="muted",valueVariant:d="default",className:c,labelClassName:u,valueClassName:b})=>{const x={sm:{label:L.body.sm(),value:L.body.sm(),gap:"gap-1"},md:{label:L.body.md(),value:L.body.md(),gap:"gap-2"},lg:{label:L.body.lg(),value:L.body.lg(),gap:"gap-3"}},h={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},g={start:"justify-start",center:"justify-center",between:"justify-between"},p={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},N={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},j=x[i];return n.jsxDEV("div",{className:f(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&g[t],j.gap,s&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",c),children:[n.jsxDEV("dt",{className:f(j.label,p[l],a==="horizontal"&&h[o],a==="horizontal"&&"flex-shrink-0",u),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:134,columnNumber:7},void 0),n.jsxDEV("dd",{className:f(j.value,N[d],a==="horizontal"&&"flex-1",b),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:145,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/key-value-pair.tsx",lineNumber:125,columnNumber:5},void 0)},Gl=({value:e,label:r,variant:a="neutral",size:t="md",align:o="center",icon:i,iconPosition:s="top",className:l,valueClassName:d,labelClassName:c})=>{const u={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},b={sm:{value:L.heading.h5(),label:L.caption.default(),icon:"h-4 w-4"},md:{value:L.heading.h4(),label:L.body.sm(),icon:"h-5 w-5"},lg:{value:L.heading.h3(),label:L.body.md(),icon:"h-6 w-6"},xl:{value:L.heading.h2(),label:L.body.lg(),icon:"h-8 w-8"}},x={left:"text-left",center:"text-center",right:"text-right"},h=u[a],g=b[t];return n.jsxDEV("div",{className:f(x[o],l),children:[i&&s==="top"&&n.jsxDEV(i,{className:f(g.icon,h.icon,"mb-2",o==="center"&&"mx-auto")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:136,columnNumber:9},void 0),n.jsxDEV("div",{className:f(s==="left"&&i&&"flex items-center gap-3",o==="center"&&s==="left"&&"justify-center"),children:[i&&s==="left"&&n.jsxDEV(i,{className:f(g.icon,h.icon)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:152,columnNumber:11},void 0),n.jsxDEV("div",{children:[n.jsxDEV("div",{className:f("font-bold",g.value,h.value,d),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:155,columnNumber:11},void 0),n.jsxDEV("div",{className:f(g.label,h.label,c),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:165,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:154,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:145,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/stat-display.tsx",lineNumber:134,columnNumber:5},void 0)},Ua=({icon:e,title:r="No data",description:a,action:t,className:o})=>n.jsxDEV("div",{className:f("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[e&&n.jsxDEV("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:28,columnNumber:9},void 0),n.jsxDEV("h3",{className:f(L.heading.h3(),"mb-2"),children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:30,columnNumber:7},void 0),a&&n.jsxDEV("p",{className:f(L.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:32,columnNumber:9},void 0),t&&n.jsxDEV("div",{className:"mt-4",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:41,columnNumber:18},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/empty-state.tsx",lineNumber:21,columnNumber:5},void 0),Yl=({title:e,subtext:r,className:a})=>n.jsxDEV(Ua,{title:e,description:r,className:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/data-display/no-content.tsx",lineNumber:22,columnNumber:5},void 0),Kl=({data:e,orientation:r="vertical",showValues:a=!1,showGrid:t=!0,barWidth:o=40,height:i=300,className:s})=>{const l=Math.max(...e.map(c=>c.value)),d="#3b82f6";return n.jsxDEV("div",{className:f("w-full",s),children:n.jsxDEV("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${i}px`},children:[t&&n.jsxDEV("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((c,u)=>n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700"},u,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:68,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:66,columnNumber:11},void 0),r==="vertical"?n.jsxDEV("div",{className:"relative h-full flex items-end justify-around gap-2",children:e.map((c,u)=>{const b=c.value/l*100;return n.jsxDEV("div",{className:"flex flex-col items-center gap-2",style:{width:`${o}px`},children:[a&&n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:88,columnNumber:21},void 0),n.jsxDEV("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${b}%`,backgroundColor:c.color||d}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:92,columnNumber:19},void 0),n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:99,columnNumber:19},void 0)]},u,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:82,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:78,columnNumber:11},void 0):n.jsxDEV("div",{className:"relative h-full flex flex-col justify-around gap-2",children:e.map((c,u)=>{const b=c.value/l*100;return n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:c.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:112,columnNumber:19},void 0),n.jsxDEV("div",{className:"flex-1 flex items-center gap-2",children:[n.jsxDEV("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${b}%`,backgroundColor:c.color||d}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:116,columnNumber:21},void 0),a&&n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:124,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:115,columnNumber:19},void 0)]},u,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:111,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:107,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:60,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bar-chart.tsx",lineNumber:59,columnNumber:5},void 0)},Zl=({series:e,showLegend:r=!0,showGrid:a=!0,showPoints:t=!0,height:o=300,xLabels:i,className:s})=>{const l=e.flatMap(h=>h.data),d=Math.max(...l.map(h=>h.y)),c=Math.min(...l.map(h=>h.y)),u=Math.max(...l.map(h=>h.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=h=>h.length===0?"":`M ${h.map(p=>{const N=p.x/u*100,j=100-(p.y-c)/(d-c)*100;return`${N},${j}`}).join(" L ")}`;return n.jsxDEV("div",{className:f("w-full",s),children:[r&&n.jsxDEV("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((h,g)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:h.color||b[g%b.length]}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:93,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:h.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:100,columnNumber:15},void 0)]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:92,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:90,columnNumber:9},void 0),n.jsxDEV("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[n.jsxDEV("div",{className:"relative",style:{height:`${o}px`},children:[a&&n.jsxDEV("div",{className:"absolute inset-0",children:[...Array(5)].map((h,g)=>n.jsxDEV("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${g*25}%`}},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:115,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:113,columnNumber:13},void 0),n.jsxDEV("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((h,g)=>{const p=h.color||b[g%b.length];return n.jsxDEV("g",{children:[n.jsxDEV("path",{d:x(h.data),fill:"none",stroke:p,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:135,columnNumber:19},void 0),t&&h.data.map((N,j)=>{const k=N.x/u*100,U=100-(N.y-c)/(d-c)*100;return n.jsxDEV("circle",{cx:k,cy:U,r:"1",fill:p,vectorEffect:"non-scaling-stroke"},j,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:149,columnNumber:25},void 0)})]},g,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:133,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:125,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:110,columnNumber:9},void 0),i&&n.jsxDEV("div",{className:"flex justify-between mt-2",children:i.map((h,g)=>n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:h},g,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:169,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:167,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:109,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/line-chart.tsx",lineNumber:87,columnNumber:5},void 0)},Ql=({data:e,variant:r="pie",showLegend:a=!0,showPercentages:t=!1,size:o=200,donutHoleSize:i=40,className:s})=>{const l=e.reduce((g,p)=>g+p.value,0),d=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],c=e.reduce((g,p,N)=>{const j=p.value/l*100,k=j/100*360,U=g.length>0?g[g.length-1].endAngle:-90,_=U+k;return g.push({...p,percentage:j,startAngle:U,endAngle:_,color:p.color||d[N%d.length]}),g},[]),u=(g,p,N,j)=>{const k=(j-90)*Math.PI/180;return{x:g+N*Math.cos(k),y:p+N*Math.sin(k)}},b=(g,p,N,j,k)=>{const U=u(g,p,N,k),_=u(g,p,N,j),w=k-j<=180?"0":"1";if(r==="donut"){const S=N*i/100,E=u(g,p,S,k),V=u(g,p,S,j);return["M",U.x,U.y,"A",N,N,0,w,0,_.x,_.y,"L",V.x,V.y,"A",S,S,0,w,1,E.x,E.y,"Z"].join(" ")}return["M",g,p,"L",U.x,U.y,"A",N,N,0,w,0,_.x,_.y,"Z"].join(" ")},x=o/2,h=o/2-10;return n.jsxDEV("div",{className:f("flex flex-col items-center gap-4",s),children:[n.jsxDEV("svg",{width:o,height:o,className:"transform rotate-0",children:c.map((g,p)=>n.jsxDEV("path",{d:b(x,x,h,g.startAngle,g.endAngle),fill:g.color,className:"transition-opacity hover:opacity-80"},p,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:175,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:173,columnNumber:7},void 0),a&&n.jsxDEV("div",{className:"flex flex-col gap-2",children:c.map((g,p)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:g.color}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:195,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[g.label,t&&n.jsxDEV("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(g.percentage),"%)"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:202,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:199,columnNumber:15},void 0)]},p,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:194,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:192,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/pie-chart.tsx",lineNumber:171,columnNumber:5},void 0)},Xl=({series:e,showLegend:r=!0,showGrid:a=!0,fillOpacity:t=.2,height:o=300,xLabels:i,className:s})=>{const l=e.flatMap(g=>g.data),d=Math.max(...l.map(g=>g.y)),c=Math.min(...l.map(g=>g.y)),u=Math.max(...l.map(g=>g.x)),b=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],x=g=>{if(g.length===0)return"";const p=g.map(k=>{const U=k.x/u*100,_=100-(k.y-c)/(d-c)*100;return`${U},${_}`}),N=g[0].x/u*100,j=g[g.length-1].x/u*100;return`M ${N},100 L ${p.join(" L ")} L ${j},100 Z`},h=g=>g.length===0?"":`M ${g.map(N=>{const j=N.x/u*100,k=100-(N.y-c)/(d-c)*100;return`${j},${k}`}).join(" L ")}`;return n.jsxDEV("div",{className:f("w-full",s),children:[r&&n.jsxDEV("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((g,p)=>n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:g.color||b[p%b.length]}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:108,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:115,columnNumber:15},void 0)]},p,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:107,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:105,columnNumber:9},void 0),n.jsxDEV("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[n.jsxDEV("div",{className:"relative",style:{height:`${o}px`},children:[a&&n.jsxDEV("div",{className:"absolute inset-0",children:[...Array(5)].map((g,p)=>n.jsxDEV("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${p*25}%`}},p,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:130,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:128,columnNumber:13},void 0),n.jsxDEV("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((g,p)=>{const N=g.color||b[p%b.length];return n.jsxDEV("g",{children:[n.jsxDEV("path",{d:x(g.data),fill:N,fillOpacity:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:150,columnNumber:19},void 0),n.jsxDEV("path",{d:h(g.data),fill:"none",stroke:N,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:157,columnNumber:19},void 0)]},p,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:148,columnNumber:17},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:125,columnNumber:9},void 0),i&&n.jsxDEV("div",{className:"flex justify-between mt-2",children:i.map((g,p)=>n.jsxDEV("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:g},p,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:174,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:172,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:124,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/area-chart.tsx",lineNumber:102,columnNumber:5},void 0)},Jl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/radar-chart.tsx",lineNumber:43,columnNumber:5},void 0),Rl=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/bubble-chart.tsx",lineNumber:43,columnNumber:5},void 0),ec=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/scatter-plot.tsx",lineNumber:43,columnNumber:5},void 0),rc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/tree-map.tsx",lineNumber:43,columnNumber:5},void 0),nc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sankey-diagram.tsx",lineNumber:43,columnNumber:5},void 0),ac=({data:e,width:r=100,height:a=30,color:t="#3b82f6",fill:o=!1,className:i})=>{if(e.length===0)return null;const s=Math.max(...e),l=Math.min(...e),d=s-l||1,c=e.map((u,b)=>{const x=b/(e.length-1)*r,h=a-(u-l)/d*a;return`${x},${h}`}).join(" ");return n.jsxDEV("svg",{width:r,height:a,className:f("inline-block",i),children:[o&&n.jsxDEV("polygon",{points:`0,${a} ${c} ${r},${a}`,fill:t,opacity:"0.2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:59,columnNumber:9},void 0),n.jsxDEV("polyline",{points:c,fill:"none",stroke:t,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:65,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/sparkline.tsx",lineNumber:53,columnNumber:5},void 0)},tc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/heatmap.tsx",lineNumber:43,columnNumber:5},void 0),oc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/funnel-chart.tsx",lineNumber:43,columnNumber:5},void 0),ic=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/burndown-chart.tsx",lineNumber:26,columnNumber:5},void 0),sc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/performance-chart.tsx",lineNumber:43,columnNumber:5},void 0),lc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/metric-comparison.tsx",lineNumber:43,columnNumber:5},void 0),cc=({value:e,min:r=0,max:a=100,size:t=120,strokeWidth:o=10,showValue:i=!0,label:s,variant:l="primary",className:d})=>{const c=Math.min(a,Math.max(r,e)),u=(c-r)/(a-r)*100,b=t/2,x=(t-o)/2,h=Math.PI*x,g=h-u/100*h,p={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return n.jsxDEV("div",{className:f("inline-flex flex-col items-center gap-2",d),children:[n.jsxDEV("svg",{width:t,height:t*.65,className:"transform rotate-180",children:[n.jsxDEV("path",{d:`M ${o/2} ${b} A ${x} ${x} 0 0 1 ${t-o/2} ${b}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:o,strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:65,columnNumber:9},void 0),n.jsxDEV("path",{d:`M ${o/2} ${b} A ${x} ${x} 0 0 1 ${t-o/2} ${b}`,fill:"none",className:f(p[l],"transition-all duration-500"),strokeWidth:o,strokeDasharray:h,strokeDashoffset:g,strokeLinecap:"round"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:72,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:64,columnNumber:7},void 0),i&&n.jsxDEV("div",{className:"text-center -mt-8",children:[n.jsxDEV("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(c)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:84,columnNumber:11},void 0),s&&n.jsxDEV("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:88,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:83,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/gauge.tsx",lineNumber:63,columnNumber:5},void 0)},dc=({value:e=0,max:r=100,variant:a="default",size:t="md",showLabel:o=!1,label:i,indeterminate:s=!1,striped:l=!1,animated:d=!1,className:c})=>{const u=Math.min(Math.max(e/r*100,0),100),b={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},x={sm:"h-1",md:"h-2",lg:"h-4"};return n.jsxDEV("div",{className:f("w-full",c),children:[n.jsxDEV("div",{className:f("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",x[t]),role:"progressbar","aria-valuenow":s?void 0:u,"aria-valuemin":0,"aria-valuemax":100,children:s?n.jsxDEV("div",{className:f("h-full rounded-full animate-pulse",b[a]),style:{width:"100%"}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:96,columnNumber:11},void 0):n.jsxDEV("div",{className:f("h-full rounded-full transition-all duration-300",b[a],l&&"bg-stripe",l&&d&&"animate-stripe"),style:{width:`${u}%`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:104,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:85,columnNumber:7},void 0),(o||i)&&n.jsxDEV("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:i||`${Math.round(u)}%`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:116,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress.tsx",lineNumber:84,columnNumber:5},void 0)},uc=({value:e,size:r=100,strokeWidth:a=8,showValue:t=!0,label:o,variant:i="primary",color:s,trackColor:l,className:d})=>{const c=Math.min(100,Math.max(0,e)),u=r/2,b=(r-a)/2,x=2*Math.PI*b,h=x-c/100*x,g={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},p=l||"stroke-gray-200 dark:stroke-gray-700";return n.jsxDEV("div",{className:f("inline-flex items-center justify-center",d),children:n.jsxDEV("div",{className:"relative",style:{width:r,height:r},children:[n.jsxDEV("svg",{width:r,height:r,className:"transform -rotate-90",children:[n.jsxDEV("circle",{cx:u,cy:u,r:b,className:p,strokeWidth:a,fill:"none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:86,columnNumber:11},void 0),n.jsxDEV("circle",{cx:u,cy:u,r:b,className:f(s?"":g[i],"transition-all duration-300 ease-in-out"),stroke:s,strokeWidth:a,strokeDasharray:x,strokeDashoffset:h,strokeLinecap:"round",fill:"none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:96,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:84,columnNumber:9},void 0),(t||o)&&n.jsxDEV("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[t&&!o&&n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(c),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:117,columnNumber:15},void 0),o&&n.jsxDEV("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:125,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:115,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:82,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/progress-circle.tsx",lineNumber:81,columnNumber:5},void 0)},mc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/charts/progress-tracker.tsx",lineNumber:43,columnNumber:5},void 0),bc=({src:e,alt:r,fallback:a,width:t,height:o,objectFit:i="cover",loading:s="lazy",showLoader:l=!0,rounded:d="none",border:c=!1,className:u,onLoad:b,onError:x})=>{const[h,g]=y.useState(!0),[p,N]=y.useState(!1),[j,k]=y.useState(e);y.useEffect(()=>{g(!0),N(!1),k(e)},[e]);const U=()=>{g(!1),b?.()},_=()=>{g(!1),N(!0),a&&j!==a&&(k(a),N(!1),g(!0)),x?.()},w={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},S={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},E={width:typeof t=="number"?`${t}px`:t,height:typeof o=="number"?`${o}px`:o};return n.jsxDEV("div",{className:f("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",w[d],c&&"border border-gray-200 dark:border-gray-700",u),style:E,children:[l&&h&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxDEV("div",{className:"animate-pulse",children:n.jsxDEV(A.PhotoIcon,{className:"h-8 w-8 text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:144,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:143,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:142,columnNumber:9},void 0),p&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsxDEV(A.PhotoIcon,{className:"h-8 w-8 text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:151,columnNumber:9},void 0),!p&&n.jsxDEV("img",{src:j,alt:r,loading:s,onLoad:U,onError:_,className:f("w-full h-full",S[i],h&&l&&"opacity-0")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:158,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image.tsx",lineNumber:131,columnNumber:5},void 0)},fc=({images:e,columns:r=3,gap:a=16,lightbox:t=!0,className:o})=>{const[i,s]=y.useState(null),l=b=>{t&&s(b)},d=()=>{s(null)},c=()=>{if(!i)return;const b=e.findIndex(h=>h.id===i.id),x=b>0?b-1:e.length-1;s(e[x])},u=()=>{if(!i)return;const b=e.findIndex(h=>h.id===i.id),x=b<e.length-1?b+1:0;s(e[x])};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:f("grid",o),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${a}px`},children:e.map(b=>n.jsxDEV("div",{className:f("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",t&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>l(b),children:[n.jsxDEV("img",{src:b.thumbnail||b.src,alt:b.alt||"",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:95,columnNumber:13},void 0),b.caption&&n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:b.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:101,columnNumber:15},void 0)]},b.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:87,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:79,columnNumber:7},void 0),t&&i&&n.jsxDEV("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:d,children:[n.jsxDEV("button",{onClick:d,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:125,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:119,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:115,columnNumber:11},void 0),n.jsxDEV("button",{onClick:b=>{b.stopPropagation(),c()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:147,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:141,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:134,columnNumber:11},void 0),n.jsxDEV("button",{onClick:b=>{b.stopPropagation(),u()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:169,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:163,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:156,columnNumber:11},void 0),n.jsxDEV("div",{className:"max-w-4xl max-h-full",onClick:b=>b.stopPropagation(),children:[n.jsxDEV("img",{src:i.src,alt:i.alt||"",className:"max-w-full max-h-[80vh] object-contain"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:182,columnNumber:13},void 0),i.caption&&n.jsxDEV("p",{className:"text-white text-center mt-4",children:i.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:188,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:178,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:111,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-gallery.tsx",lineNumber:78,columnNumber:5},void 0)},gc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-comparison.tsx",lineNumber:43,columnNumber:5},void 0),hc=({src:e,onCropComplete:r,initialCrop:a,className:t})=>{const[o,i]=y.useState(a||{x:50,y:50,width:200,height:200}),s=y.useRef(null),l=async()=>{if(!s.current||!r)return;const d=document.createElement("canvas"),c=d.getContext("2d");if(!c)return;const u=s.current,b=u.naturalWidth/u.width,x=u.naturalHeight/u.height;d.width=o.width*b,d.height=o.height*x,c.drawImage(u,o.x*b,o.y*x,o.width*b,o.height*x,0,0,d.width,d.height);const h=d.toDataURL("image/png");r(h,o)};return n.jsxDEV("div",{className:f("inline-flex flex-col gap-4",t),children:[n.jsxDEV("div",{className:"relative inline-block",children:[n.jsxDEV("img",{ref:s,src:e,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:88,columnNumber:9},void 0),n.jsxDEV("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`,cursor:"move"},children:[n.jsxDEV("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:107,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:108,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:109,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:110,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:97,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:87,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex gap-2",children:[n.jsxDEV("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:115,columnNumber:9},void 0),n.jsxDEV("button",{onClick:()=>i(a||{x:50,y:50,width:200,height:200}),className:f("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:128,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:114,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:146,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/image-cropper.tsx",lineNumber:86,columnNumber:5},void 0)},pc=({images:e,index:r,isOpen:a,onClose:t,onIndexChange:o,showThumbnails:i=!1,showDownload:s=!1,showZoom:l=!0,className:d})=>{const[c,u]=y.useState(1),b=e[r],x=r>0,h=r<e.length-1,g=y.useCallback(()=>{if(x){const _=r-1;o?.(_),u(1)}},[x,r,o]),p=y.useCallback(()=>{if(h){const _=r+1;o?.(_),u(1)}},[h,r,o]),N=()=>{u(_=>Math.min(_+.5,3))},j=()=>{u(_=>Math.max(_-.5,.5))},k=()=>{u(1)},U=()=>{const _=document.createElement("a");_.href=b.src,_.download=b.alt||"image",_.click()};return y.useEffect(()=>{if(!a)return;const _=w=>{switch(w.key){case"Escape":t();break;case"ArrowLeft":g();break;case"ArrowRight":p();break;case"+":case"=":N();break;case"-":case"_":j();break;case"0":k();break}};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[a,r,e.length,t,g,p]),y.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),y.useEffect(()=>{u(1)},[r]),!a||!b?null:n.jsxDEV(fe,{children:n.jsxDEV("div",{className:f("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",d),children:[n.jsxDEV("div",{className:"absolute inset-0",onClick:t,"aria-label":"Close lightbox"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:188,columnNumber:9},void 0),n.jsxDEV("button",{onClick:t,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:206,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:200,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:195,columnNumber:9},void 0),x&&n.jsxDEV("button",{onClick:g,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:228,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:222,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:217,columnNumber:11},void 0),h&&n.jsxDEV("button",{onClick:p,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:251,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:245,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:240,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[n.jsxDEV("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",e.length]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:264,columnNumber:11},void 0),l&&n.jsxDEV("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[n.jsxDEV("button",{onClick:j,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:282,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:276,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:271,columnNumber:15},void 0),n.jsxDEV("button",{onClick:k,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(c*100),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:290,columnNumber:15},void 0),n.jsxDEV("button",{onClick:N,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:308,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:302,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:297,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:270,columnNumber:13},void 0),s&&n.jsxDEV("button",{onClick:U,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:332,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:326,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:321,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:262,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:n.jsxDEV("img",{src:b.src,alt:b.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${c})`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:345,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:344,columnNumber:9},void 0),b.caption&&n.jsxDEV("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:n.jsxDEV("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:b.caption},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:358,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:357,columnNumber:11},void 0),i&&e.length>1&&n.jsxDEV("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:e.map((_,w)=>n.jsxDEV("button",{onClick:()=>{o?.(w),u(1)},className:f("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",w===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:n.jsxDEV("img",{src:_.thumbnail||_.src,alt:_.alt||"",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:382,columnNumber:17},void 0)},w,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:368,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:366,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:180,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/lightbox.tsx",lineNumber:179,columnNumber:5},void 0)},xc=({src:e,poster:r,autoPlay:a=!1,loop:t=!1,muted:o=!1,controls:i=!0,className:s})=>{const l=y.useRef(null),[d,c]=y.useState(a),[u,b]=y.useState(1),[x,h]=y.useState(0),[g,p]=y.useState(0);y.useEffect(()=>{const w=l.current;if(!w)return;const S=()=>h(w.currentTime),E=()=>p(w.duration),V=()=>c(!0),v=()=>c(!1);return w.addEventListener("timeupdate",S),w.addEventListener("loadedmetadata",E),w.addEventListener("play",V),w.addEventListener("pause",v),()=>{w.removeEventListener("timeupdate",S),w.removeEventListener("loadedmetadata",E),w.removeEventListener("play",V),w.removeEventListener("pause",v)}},[]);const N=()=>{l.current&&(d?l.current.pause():l.current.play())},j=w=>{const S=parseFloat(w.target.value);b(S),l.current&&(l.current.volume=S)},k=w=>{const S=parseFloat(w.target.value);h(S),l.current&&(l.current.currentTime=S)},U=()=>{l.current&&(document.fullscreenElement?document.exitFullscreen():l.current.requestFullscreen())},_=w=>{const S=Math.floor(w/60),E=Math.floor(w%60);return`${S}:${E.toString().padStart(2,"0")}`};return n.jsxDEV("div",{className:f("relative group",s),children:[n.jsxDEV("video",{ref:l,src:e,poster:r,autoPlay:a,loop:t,muted:o,className:"w-full rounded-lg",onClick:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:117,columnNumber:7},void 0),i&&n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsxDEV("input",{type:"range",min:"0",max:g||0,value:x,onChange:k,className:"w-full mb-2 accent-white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:131,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex items-center justify-between gap-4",children:[n.jsxDEV("div",{className:"flex items-center gap-3",children:[n.jsxDEV("button",{onClick:N,className:"text-white hover:text-gray-300 transition-colors",children:d?n.jsxDEV("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:153,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:148,columnNumber:19},void 0):n.jsxDEV("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M8 5v14l11-7z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:161,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:156,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:143,columnNumber:15},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:173,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:168,columnNumber:17},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"1",step:"0.1",value:u,onChange:j,className:"w-20 accent-white"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:175,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:167,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-white text-sm",children:[_(x)," / ",_(g)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:187,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:141,columnNumber:13},void 0),n.jsxDEV("button",{onClick:U,className:"text-white hover:text-gray-300 transition-colors",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:198,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:197,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:193,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-player.tsx",lineNumber:116,columnNumber:5},void 0)},Nc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-thumbnail.tsx",lineNumber:43,columnNumber:5},void 0),yc=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-editor.tsx",lineNumber:26,columnNumber:5},void 0),vc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/video-call.tsx",lineNumber:43,columnNumber:5},void 0),_c=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/live-stream.tsx",lineNumber:26,columnNumber:5},void 0),kc=({src:e,title:r,artist:a,artwork:t,autoPlay:o=!1,loop:i=!1,className:s})=>{const l=y.useRef(null),[d,c]=y.useState(o),[u,b]=y.useState(0),[x,h]=y.useState(0),[g,p]=y.useState(1);y.useEffect(()=>{const w=l.current;if(!w)return;const S=()=>b(w.currentTime),E=()=>h(w.duration),V=()=>c(!0),v=()=>c(!1),T=()=>c(!1);return w.addEventListener("timeupdate",S),w.addEventListener("loadedmetadata",E),w.addEventListener("play",V),w.addEventListener("pause",v),w.addEventListener("ended",T),()=>{w.removeEventListener("timeupdate",S),w.removeEventListener("loadedmetadata",E),w.removeEventListener("play",V),w.removeEventListener("pause",v),w.removeEventListener("ended",T)}},[]);const N=()=>{l.current&&(d?l.current.pause():l.current.play())},j=w=>{const S=parseFloat(w.target.value);b(S),l.current&&(l.current.currentTime=S)},k=w=>{const S=parseFloat(w.target.value);p(S),l.current&&(l.current.volume=S)},U=w=>{const S=Math.floor(w/60),E=Math.floor(w%60);return`${S}:${E.toString().padStart(2,"0")}`},_=x>0?u/x*100:0;return n.jsxDEV("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",s),children:[n.jsxDEV("audio",{ref:l,src:e,autoPlay:o,loop:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:118,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center gap-4 mb-4",children:[t&&n.jsxDEV("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:n.jsxDEV("img",{src:t,alt:r||"Album artwork",className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:124,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:123,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[r&&n.jsxDEV("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:135,columnNumber:13},void 0),a&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:140,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:133,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:120,columnNumber:7},void 0),n.jsxDEV("div",{className:"mb-4",children:[n.jsxDEV("input",{type:"range",min:"0",max:x||0,value:u,onChange:j,className:"w-full accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:149,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[n.jsxDEV("span",{children:U(u)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:158,columnNumber:11},void 0),n.jsxDEV("span",{children:U(x)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:159,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:157,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:148,columnNumber:7},void 0),n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("div",{className:"flex items-center gap-4",children:[n.jsxDEV("button",{onClick:N,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:d?n.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:173,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:172,columnNumber:15},void 0):n.jsxDEV("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M8 5v14l11-7z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:181,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:176,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:167,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex items-center gap-2",children:[n.jsxDEV("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:193,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:188,columnNumber:13},void 0),n.jsxDEV("input",{type:"range",min:"0",max:"1",step:"0.1",value:g,onChange:k,className:"w-24 accent-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:195,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:187,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:165,columnNumber:9},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[_.toFixed(0),"%"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:208,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-player.tsx",lineNumber:112,columnNumber:5},void 0)},wc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/audio-waveform.tsx",lineNumber:43,columnNumber:5},void 0),Ec=({data:e,width:r=200,height:a=40,color:t="#3b82f6",gap:o=2,className:i})=>{if(e.length===0)return null;const s=(r-(e.length-1)*o)/e.length;return n.jsxDEV("svg",{width:r,height:a,className:f("inline-block",i),children:e.map((l,d)=>{const c=Math.max(2,l*a),u=d*(s+o),b=(a-c)/2;return n.jsxDEV("rect",{x:u,y:b,width:s,height:c,fill:t,rx:s/2},d,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/wave-form.tsx",lineNumber:59,columnNumber:11},void 0)})},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/wave-form.tsx",lineNumber:48,columnNumber:5},void 0)},Uc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/voice-recorder.tsx",lineNumber:43,columnNumber:5},void 0),jc=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/podcast-player.tsx",lineNumber:26,columnNumber:5},void 0),Cc=({accept:e=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:a=10,multiple:t=!0,onUpload:o,onRemove:i,className:s})=>{const[l,d]=y.useState([]),[c,u]=y.useState(!1),b=y.useRef(null),x=U=>{U.preventDefault(),u(!0)},h=U=>{U.preventDefault(),u(!1)},g=U=>{U.preventDefault(),u(!1);const _=Array.from(U.dataTransfer.files);N(_)},p=U=>{if(U.target.files){const _=Array.from(U.target.files);N(_)}},N=U=>{const _=U.filter(V=>{const v=e.some(M=>{if(M.endsWith("/*")){const I=M.split("/")[0];return V.type.startsWith(I)}return V.type===M}),T=V.size<=r;return v&&T}),w=a-l.length,S=_.slice(0,w),E=S.map(V=>({id:`${Date.now()}-${Math.random()}`,file:V,preview:V.type.startsWith("image/")?URL.createObjectURL(V):void 0,status:"pending"}));d(V=>[...V,...E]),o&&o(S)},j=U=>{d(_=>_.filter(w=>w.id!==U)),i&&i(U)},k=U=>U<1024?`${U} B`:U<1024*1024?`${(U/1024).toFixed(1)} KB`:`${(U/(1024*1024)).toFixed(1)} MB`;return n.jsxDEV("div",{className:f("space-y-4",s),children:[n.jsxDEV("div",{onDragEnter:x,onDragOver:U=>U.preventDefault(),onDragLeave:h,onDrop:g,onClick:()=>b.current?.click(),className:f("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",c?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[n.jsxDEV("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:157,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:151,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:164,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",k(r)," each"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:167,columnNumber:9},void 0),n.jsxDEV("input",{ref:b,type:"file",multiple:t,accept:e.join(","),onChange:p,className:"hidden"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:171,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:138,columnNumber:7},void 0),l.length>0&&n.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:l.map(U=>n.jsxDEV("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[U.preview?n.jsxDEV("img",{src:U.preview,alt:U.file.name,className:"w-full h-full object-cover"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:190,columnNumber:17},void 0):n.jsxDEV("div",{className:"w-full h-full flex items-center justify-center",children:n.jsxDEV("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:202,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:197,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:196,columnNumber:17},void 0),n.jsxDEV("button",{onClick:()=>j(U.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:217,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:211,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:207,columnNumber:15},void 0),n.jsxDEV("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[n.jsxDEV("p",{className:"truncate",children:U.file.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:227,columnNumber:17},void 0),n.jsxDEV("p",{className:"text-gray-300",children:k(U.file.size)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:228,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:226,columnNumber:15},void 0)]},U.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:185,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:183,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-uploader.tsx",lineNumber:136,columnNumber:5},void 0)},Sc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/media-playlist.tsx",lineNumber:43,columnNumber:5},void 0),Vc=({className:e,children:r,disabled:a})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/playlist-manager.tsx",lineNumber:26,columnNumber:5},void 0),Ac=({value:e,size:r=200,fgColor:a="#000000",bgColor:t="#ffffff",showDownload:o=!1,className:i})=>{const s=y.useRef(null);y.useEffect(()=>{const d=s.current;if(!d)return;const c=d.getContext("2d");if(!c)return;c.fillStyle=t,c.fillRect(0,0,r,r),c.fillStyle=a;const u=8,b=r/u,x=e.split("").reduce((g,p)=>g+p.charCodeAt(0),0);for(let g=0;g<u;g++)for(let p=0;p<u;p++)(x+g*u+p)%3!==0&&c.fillRect(p*b,g*b,b,b);const h=b*3;[[0,0],[r-h,0],[0,r-h]].forEach(([g,p])=>{c.strokeStyle=a,c.lineWidth=b,c.strokeRect(g+b/2,p+b/2,h-b,h-b)})},[e,r,a,t]);const l=()=>{const d=s.current;if(!d)return;const c=d.toDataURL("image/png"),u=document.createElement("a");u.download="qrcode.png",u.href=c,u.click()};return n.jsxDEV("div",{className:f("inline-flex flex-col items-center gap-3",i),children:[n.jsxDEV("canvas",{ref:s,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:120,columnNumber:7},void 0),o&&n.jsxDEV("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:128,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:142,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/media/qr-code-display.tsx",lineNumber:119,columnNumber:5},void 0)},zr=({isOpen:e,onClose:r,title:a,size:t="medium",variant:o="default",overlay:i="default",showCloseButton:s=!0,closeOnOverlayClick:l=!0,closeOnEscape:d=!0,children:c,className:u,"aria-labelledby":b,"aria-describedby":x,closeAriaLabel:h="Close modal"})=>{const g=y.useRef(null),p=y.useRef(null);if(y.useEffect(()=>{if(!e||!d)return;const U=_=>{_.key==="Escape"&&r()};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[e,d,r]),y.useEffect(()=>{if(e)return p.current=document.activeElement,g.current&&g.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",p.current&&p.current.focus()}},[e]),!e)return null;const N=()=>{const U=O.overlays.modal.content(),_=O.overlays.modal[t]();return f(U,_)},j=U=>{l&&U.target===U.currentTarget&&r()},k=n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:O.overlays.modal.backdrop(),onClick:j},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:99,columnNumber:7},void 0),n.jsxDEV("div",{className:O.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":x,children:n.jsxDEV("div",{ref:g,"data-testid":"modal-content",className:f(N(),u),tabIndex:-1,onClick:U=>U.stopPropagation(),children:[a&&n.jsxDEV("div",{className:O.overlays.modal.header(),children:[n.jsxDEV("h2",{id:b,className:O.overlays.modal.title(),children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:119,columnNumber:15},void 0),s&&n.jsxDEV("button",{onClick:r,className:O.overlays.modal.closeButton(),"aria-label":h,children:n.jsxDEV(A.XMarkIcon,{className:O.icon.variant.muted.md()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:131,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:126,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:118,columnNumber:13},void 0),c]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:110,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:103,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:98,columnNumber:5},void 0);return on.createPortal(k,document.body)},Tc=({children:e,variant:r="default",className:a})=>n.jsxDEV("div",{"data-testid":"modal-header",className:f(O.overlays.modal.header(),a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:156,columnNumber:3},void 0),Br=({children:e,variant:r="default",className:a})=>n.jsxDEV("div",{"data-testid":"modal-body",className:f(O.overlays.modal.body(),a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:175,columnNumber:3},void 0),Wr=({children:e,variant:r="default",className:a})=>n.jsxDEV("div",{"data-testid":"modal-footer",className:f(O.overlays.modal.footer(),a),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/modal.tsx",lineNumber:194,columnNumber:3},void 0),Lc=({isOpen:e,onClose:r,children:a,side:t="right",size:o="md",showCloseButton:i=!0,title:s,footer:l,className:d})=>{if(y.useEffect(()=>{const x=h=>{h.key==="Escape"&&e&&r()};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,r]),!e)return null;const c={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},u={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},b={left:e?"translate-x-0":"-translate-x-full",right:e?"translate-x-0":"translate-x-full",top:e?"translate-y-0":"-translate-y-full",bottom:e?"translate-y-0":"translate-y-full"};return n.jsxDEV(fe,{children:[n.jsxDEV(Qe,{isOpen:e,onClose:r,opacity:"medium"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:126,columnNumber:7},void 0),n.jsxDEV("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",u[t],c[t][o],b[t],d),children:[(s||i)&&n.jsxDEV("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[s&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:143,columnNumber:15},void 0),i&&n.jsxDEV("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:159,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:153,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:148,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:141,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 overflow-y-auto p-6",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:172,columnNumber:9},void 0),l&&n.jsxDEV("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:176,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:127,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/drawer.tsx",lineNumber:125,columnNumber:5},void 0)},Ic=({children:e,active:r=!0,initialFocus:a,returnFocus:t=!0,className:o})=>{const i=y.useRef(null),s=y.useRef(null);return y.useEffect(()=>{if(!r)return;t&&(s.current=document.activeElement);const l=()=>{if(!i.current)return[];const b=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(i.current.querySelectorAll(b))},d=()=>{if(a){const x=i.current?.querySelector(a);if(x){x.focus();return}}const b=l();b.length>0&&b[0].focus()},c=b=>{if(b.key!=="Tab")return;const x=l();if(x.length===0){b.preventDefault();return}const h=x[0],g=x[x.length-1];b.shiftKey?document.activeElement===h&&(b.preventDefault(),g.focus()):document.activeElement===g&&(b.preventDefault(),h.focus())},u=setTimeout(d,0);return document.addEventListener("keydown",c),()=>{clearTimeout(u),document.removeEventListener("keydown",c),t&&s.current&&s.current.focus()}},[r,a,t]),r?n.jsxDEV("div",{ref:i,className:f(o),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-trap.tsx",lineNumber:149,columnNumber:5},void 0):n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/focus-trap.tsx",lineNumber:145,columnNumber:12},void 0)},Mc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/hover-tooltip.tsx",lineNumber:43,columnNumber:5},void 0),Pc=({children:e,onLoadMore:r,loading:a=!1,hasMore:t=!0,threshold:o=100,loader:i,endMessage:s,height:l,scrollDirection:d="vertical",reverse:c=!1,className:u})=>{const b=y.useRef(null),[x,h]=y.useState(!1);y.useEffect(()=>{const j=b.current;if(!j||a||!t)return;const k=()=>{const{scrollTop:U,scrollHeight:_,clientHeight:w,scrollLeft:S,scrollWidth:E,clientWidth:V}=j;d==="vertical"&&h(U>300);let v;d==="vertical"?c?v=U:v=_-U-w:c?v=S:v=E-S-V,v<o&&r()};return j.addEventListener("scroll",k),()=>j.removeEventListener("scroll",k)},[a,t,o,r,d,c]);const g=()=>{b.current?.scrollTo({top:0,behavior:"smooth"})},p=n.jsxDEV("div",{className:"flex justify-center items-center py-4",children:[n.jsxDEV("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:134,columnNumber:7},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:135,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:133,columnNumber:5},void 0),N=n.jsxDEV("div",{className:"flex justify-center items-center py-4",children:n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:144,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:143,columnNumber:5},void 0);return n.jsxDEV("div",{className:f("relative",u),children:[n.jsxDEV("div",{ref:b,className:f(d==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:d==="vertical"?l:void 0,width:d==="horizontal"?"100%":void 0,display:d==="horizontal"?"flex":void 0,flexDirection:c&&d==="vertical"?"column-reverse":void 0},children:[c&&a&&(i||p),c&&!a&&!t&&s,n.jsxDEV("div",{className:f(d==="horizontal"&&"flex",d==="horizontal"&&c&&"flex-row-reverse"),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:176,columnNumber:9},void 0),!c&&a&&(i||p),!c&&!a&&!t&&(s||N)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:153,columnNumber:7},void 0),d==="vertical"&&!c&&x&&n.jsxDEV("button",{onClick:g,className:f("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:n.jsxDEV("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:212,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:206,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:192,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/infinite-scroll.tsx",lineNumber:151,columnNumber:5},void 0)},Oc=({trigger:e,children:r,placement:a="bottom",isOpen:t,onOpenChange:o,trigger_action:i="click",showArrow:s=!0,className:l})=>{const[d,c]=y.useState(!1),u=t!==void 0?t:d,b=y.useCallback(w=>{t===void 0&&c(w),o?.(w)},[t,o]),x=y.useRef(null),h=y.useRef(null),[g,p]=y.useState({top:0,left:0});y.useEffect(()=>{if(!u||!x.current)return;const w=()=>{const S=x.current.getBoundingClientRect(),E=8;let V=0,v=0;switch(a){case"top":V=S.top-E,v=S.left+S.width/2;break;case"top-start":V=S.top-E,v=S.left;break;case"top-end":V=S.top-E,v=S.right;break;case"bottom":V=S.bottom+E,v=S.left+S.width/2;break;case"bottom-start":V=S.bottom+E,v=S.left;break;case"bottom-end":V=S.bottom+E,v=S.right;break;case"left":V=S.top+S.height/2,v=S.left-E;break;case"right":V=S.top+S.height/2,v=S.right+E;break}p({top:V,left:v})};return w(),window.addEventListener("scroll",w),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[u,a]),y.useEffect(()=>{if(!u)return;const w=S=>{x.current&&!x.current.contains(S.target)&&h.current&&!h.current.contains(S.target)&&b(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[u,b]),y.useEffect(()=>{if(!u)return;const w=S=>{S.key==="Escape"&&b(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[u,b]);const N=()=>{i==="click"&&b(!u)},j=()=>{i==="hover"&&b(!0)},k=()=>{i==="hover"&&b(!1)},U={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},_={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return n.jsxDEV("div",{className:f("relative inline-block",l),children:[n.jsxDEV("div",{ref:x,onClick:N,onMouseEnter:j,onMouseLeave:k,className:"inline-block",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:219,columnNumber:7},void 0),u&&n.jsxDEV("div",{ref:h,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",U[a],_[a]),style:{position:"fixed",top:g.top+"px",left:g.left+"px"},onMouseEnter:i==="hover"?()=>b(!0):void 0,onMouseLeave:i==="hover"?()=>b(!1):void 0,children:[r,s&&n.jsxDEV("div",{className:f("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:256,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:230,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/popover.tsx",lineNumber:218,columnNumber:5},void 0)},Dc=({sections:e,activeId:r,onActiveChange:a,offset:t=80,container:o,smoothScroll:i=!0,showSubsections:s=!0,className:l})=>{const[d,c]=y.useState(""),u=y.useRef(null),b=r!==void 0?r:d;y.useEffect(()=>{const g=o?document.querySelector(o):window;if(!g)return;const p=k=>k.flatMap(U=>[U.id,...U.subsections?p(U.subsections):[]]),j=p(e).map(k=>document.getElementById(k)).filter(Boolean);if(j.length!==0)return u.current=new IntersectionObserver(k=>{k.forEach(U=>{if(U.isIntersecting){const _=U.target.id;r!==void 0&&a?a(_):c(_)}})},{root:o?g:null,rootMargin:`-${t}px 0px -50% 0px`,threshold:0}),j.forEach(k=>{u.current?.observe(k)}),()=>{u.current?.disconnect()}},[e,o,t,r,a]);const x=g=>{const p=document.getElementById(g);if(!p)return;const N=o?document.querySelector(o):window;if(!N)return;const k=p.offsetTop-t;i?N===window?window.scrollTo({top:k,behavior:"smooth"}):N.scrollTo({top:k,behavior:"smooth"}):N===window?window.scrollTo(0,k):N.scrollTop=k},h=(g,p=0)=>{const N=b===g.id,j=g.subsections?.some(k=>b===k.id)||!1;return n.jsxDEV("div",{children:[n.jsxDEV("button",{onClick:()=>x(g.id),className:f("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",p===0?"font-medium":"pl-6 text-sm",N?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":j?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${p*.75+.75}rem`},children:g.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:175,columnNumber:9},void 0),s&&g.subsections&&g.subsections.length>0&&n.jsxDEV("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:g.subsections.map(k=>h(k,p+1))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:195,columnNumber:13},void 0)]},g.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:174,columnNumber:7},void 0)};return n.jsxDEV("nav",{className:f("space-y-1",l),children:e.map(g=>h(g,0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/scroll-spy.tsx",lineNumber:206,columnNumber:5},void 0)},zc=({isOpen:e,onClose:r,children:a,title:t,description:o,footer:i,side:s="bottom",size:l="md",showHandle:d=!0,showCloseButton:c=!0,className:u})=>{if(y.useEffect(()=>{if(!e)return;const g=p=>{p.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,r]),!e)return null;const b={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},x={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},h={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return n.jsxDEV(fe,{children:[n.jsxDEV(Qe,{isOpen:e,onClose:r,opacity:"dark"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:137,columnNumber:7},void 0),n.jsxDEV("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",x[s],b[s][l],h[s],u),children:[d&&(s==="bottom"||s==="top")&&n.jsxDEV("div",{className:f("flex items-center justify-center",s==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:n.jsxDEV("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:158,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:152,columnNumber:11},void 0),(t||o||c)&&n.jsxDEV("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:n.jsxDEV("div",{className:"flex items-start justify-between",children:[n.jsxDEV("div",{className:"flex-1",children:[t&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:168,columnNumber:19},void 0),o&&n.jsxDEV("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:173,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:166,columnNumber:15},void 0),c&&n.jsxDEV("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:n.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:190,columnNumber:21},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:184,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:179,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:165,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:164,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:204,columnNumber:9},void 0),i&&n.jsxDEV("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:208,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:138,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/sheet.tsx",lineNumber:136,columnNumber:5},void 0)},Bc=({isOpen:e,onClose:r,onSubmit:a,title:t,description:o,placeholder:i="",initialValue:s="",cancelText:l="Cancel",confirmText:d="Confirm",isLoading:c=!1,loadingText:u="Processing...",maxLength:b,required:x=!0,validate:h})=>{const[g,p]=y.useState(s),[N,j]=y.useState(null);y.useEffect(()=>{e&&(p(s),j(null))},[e,s]);const k=async w=>{if(w.preventDefault(),j(null),x&&!g.trim()){j("This field is required");return}if(h){const S=h(g);if(S){j(S);return}}try{await a(g.trim())}catch(S){j(S instanceof Error?S.message:"An error occurred")}},U=()=>{p(s),j(null),r()},_=x?g.trim().length>0:!0;return n.jsxDEV(zr,{isOpen:e,onClose:U,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!c,closeOnOverlayClick:!c,children:n.jsxDEV("form",{onSubmit:k,children:[n.jsxDEV(Br,{variant:"padded",children:[n.jsxDEV("h3",{id:"text-input-modal-title",className:L.heading.h4(),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:101,columnNumber:11},void 0),n.jsxDEV("p",{id:"text-input-modal-description",className:`${L.body.md()} mt-2 mb-4`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:104,columnNumber:11},void 0),n.jsxDEV(Xe,{type:"text",value:g,onChange:w=>p(w.target.value),placeholder:i,maxLength:b,disabled:c,autoFocus:!0,"aria-invalid":!!N,"aria-describedby":N?"text-input-error":void 0},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:110,columnNumber:11},void 0),N&&n.jsxDEV("p",{id:"text-input-error",className:`${L.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:N},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:122,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:100,columnNumber:9},void 0),n.jsxDEV(Wr,{children:[n.jsxDEV(oe,{type:"button",variant:"outline",onClick:U,disabled:c,children:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:132,columnNumber:11},void 0),n.jsxDEV(oe,{type:"submit",variant:"default",disabled:!_||c,children:c?u:d},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:140,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:131,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:99,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/text-input-modal.tsx",lineNumber:90,columnNumber:5},void 0)},Wc=({content:e,children:r,placement:a="top",delayShow:t=0,delayHide:o=0,className:i,disabled:s=!1,showArrow:l=!0,variant:d="default",trigger:c="hover",isOpen:u,onVisibilityChange:b})=>{const[x,h]=y.useState(!1),g=y.useRef(void 0),p=y.useRef(void 0),N=y.useRef(null),j=y.useRef(null),k=u!==void 0,U=k?u:x,_=y.useCallback(()=>{s||k||(p.current&&(clearTimeout(p.current),p.current=void 0),t>0?g.current=setTimeout(()=>{h(!0),b?.(!0)},t):(h(!0),b?.(!0)))},[s,k,t,b]),w=y.useCallback(()=>{k||(g.current&&(clearTimeout(g.current),g.current=void 0),o>0?p.current=setTimeout(()=>{h(!1),b?.(!1)},o):(h(!1),b?.(!1)))},[k,o,b]);y.useEffect(()=>()=>{g.current&&clearTimeout(g.current),p.current&&clearTimeout(p.current)},[]),y.useEffect(()=>{if(c!=="click"||!U)return;const W=ae=>{N.current&&!N.current.contains(ae.target)&&j.current&&!j.current.contains(ae.target)&&w()};return document.addEventListener("mousedown",W),()=>{document.removeEventListener("mousedown",W)}},[c,U,w]);const S=()=>{c==="hover"&&_()},E=()=>{c==="hover"&&w()},V=()=>{c==="hover"&&_()},v=()=>{c==="hover"&&w()},T=()=>{c==="click"&&!k&&(U?(h(!1),b?.(!1)):(h(!0),b?.(!0)))},M={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},I={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},z={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},D={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return n.jsxDEV("div",{ref:j,className:"relative inline-block",onMouseEnter:S,onMouseLeave:E,onFocus:V,onBlur:v,onClick:T,children:[r,U&&!s&&n.jsxDEV("div",{ref:N,className:f("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",M[a],z[d],i),role:"tooltip",children:[e,l&&n.jsxDEV("div",{className:f("absolute w-0 h-0 border-4 arrow",I[a],D[d][a])},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:274,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:262,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/ui/tooltip.tsx",lineNumber:251,columnNumber:5},void 0)},Fc={default:A.InformationCircleIcon,warning:A.ExclamationTriangleIcon,danger:A.XCircleIcon,success:A.CheckCircleIcon,info:A.InformationCircleIcon},qc={default:()=>O.icon.variant.default.lg(),warning:()=>O.icon.variant.warning.lg(),danger:()=>O.icon.variant.error.lg(),success:()=>O.icon.variant.success.lg(),info:()=>O.icon.variant.default.lg()},$c={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Hc=({isOpen:e,onClose:r,onConfirm:a,title:t,message:o,confirmText:i="Confirm",cancelText:s="Cancel",loadingText:l="Processing...",variant:d="default",isLoading:c=!1})=>{const u=Fc[d],b=qc[d],x=$c[d];return n.jsxDEV(zr,{isOpen:e,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[n.jsxDEV(Br,{variant:"padded",children:[n.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[n.jsxDEV(u,{className:b()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:77,columnNumber:11},void 0),n.jsxDEV("h3",{id:"confirmation-dialog-title",className:L.heading.h4(),children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:78,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:76,columnNumber:9},void 0),n.jsxDEV("p",{id:"confirmation-dialog-description",className:L.body.md(),children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:85,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:75,columnNumber:7},void 0),n.jsxDEV(Wr,{children:[n.jsxDEV(oe,{variant:"outline",onClick:r,disabled:c,children:s},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:93,columnNumber:9},void 0),n.jsxDEV(oe,{variant:x,onClick:a,disabled:c,children:c?l:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:96,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:92,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/confirmation-dialog.tsx",lineNumber:67,columnNumber:5},void 0)},Gc=({trigger:e,children:r,placement:a="bottom",openDelay:t=200,closeDelay:o=300,className:i})=>{const[s,l]=y.useState(!1),[d,c]=y.useState({top:0,left:0}),u=y.useRef(null),b=y.useRef(null),x=y.useRef(void 0),h=y.useRef(void 0);y.useEffect(()=>{if(!s||!u.current)return;const k=()=>{const U=u.current.getBoundingClientRect(),_=8;let w=0,S=0;switch(a){case"top":w=U.top-_,S=U.left+U.width/2;break;case"bottom":w=U.bottom+_,S=U.left+U.width/2;break;case"left":w=U.top+U.height/2,S=U.left-_;break;case"right":w=U.top+U.height/2,S=U.right+_;break}c({top:w,left:S})};return k(),window.addEventListener("scroll",k),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k),window.removeEventListener("resize",k)}},[s,a]);const g=()=>{h.current&&clearTimeout(h.current),x.current=setTimeout(()=>{l(!0)},t)},p=()=>{x.current&&clearTimeout(x.current),h.current=setTimeout(()=>{l(!1)},o)},N={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},j={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{ref:u,onMouseEnter:g,onMouseLeave:p,className:"inline-block",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:144,columnNumber:7},void 0),s&&n.jsxDEV(fe,{children:n.jsxDEV("div",{ref:b,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",N[a],j[a],i),style:{top:d.top+"px",left:d.left+"px"},onMouseEnter:()=>{h.current&&clearTimeout(h.current)},onMouseLeave:p,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:155,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:154,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/modals/hover-card.tsx",lineNumber:143,columnNumber:5},void 0)},Yc=({children:e,onDrop:r,onDragOver:a,accept:t,showIndicator:o=!0,indicator:i,disabled:s=!1,className:l})=>{const[d,c]=y.useState(!1),[u,b]=y.useState(0),x=j=>{j.preventDefault(),j.stopPropagation(),!s&&(b(k=>k+1),j.dataTransfer.items&&j.dataTransfer.items.length>0&&c(!0))},h=j=>{j.preventDefault(),j.stopPropagation(),!s&&b(k=>{const U=k-1;return U===0&&c(!1),U})},g=j=>{j.preventDefault(),j.stopPropagation(),!s&&a&&a(j)},p=j=>{if(j.preventDefault(),j.stopPropagation(),s)return;if(c(!1),b(0),j.dataTransfer.files&&j.dataTransfer.files.length>0){const U=Array.from(j.dataTransfer.files);let _=U;t&&t.length>0&&(_=U.filter(w=>t.some(S=>{if(S.endsWith("/*")){const E=S.split("/")[0];return w.type.startsWith(E)}return w.type===S}))),r(_);return}const k=j.dataTransfer.getData("text/plain");if(k)try{const U=JSON.parse(k);r(U)}catch{r(k)}},N=n.jsxDEV("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[n.jsxDEV("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:157,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:151,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:150,columnNumber:5},void 0);return n.jsxDEV("div",{onDragEnter:x,onDragLeave:h,onDragOver:g,onDrop:p,className:f("relative",s&&"opacity-50 cursor-not-allowed",l),children:[e,o&&d&&!s&&(i||N)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop.tsx",lineNumber:169,columnNumber:5},void 0)},Kc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/drag-drop-list.tsx",lineNumber:43,columnNumber:5},void 0),Zc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/sortable-grid.tsx",lineNumber:43,columnNumber:5},void 0),Qc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/nested-drag.tsx",lineNumber:43,columnNumber:5},void 0),Xc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/gesture-detector.tsx",lineNumber:43,columnNumber:5},void 0),Jc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/swipe-actions.tsx",lineNumber:43,columnNumber:5},void 0),Rc=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pinch-zoom.tsx",lineNumber:43,columnNumber:5},void 0),ed=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/double-tap.tsx",lineNumber:43,columnNumber:5},void 0),rd=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/long-press.tsx",lineNumber:43,columnNumber:5},void 0),nd=({className:e,children:r,disabled:a=!1,onClick:t})=>n.jsxDEV("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:t,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/radial-menu.tsx",lineNumber:43,columnNumber:5},void 0),ad=({children:e,onRefresh:r,disabled:a=!1,refreshingText:t="Refreshing...",pullDownText:o="Pull down to refresh",releaseText:i="Release to refresh",threshold:s=80,maxPullDistance:l=120,className:d=""})=>{const[c,u]=y.useState(0),[b,x]=y.useState(!1),[h,g]=y.useState(!1),p=y.useRef(0),N=y.useRef(null);y.useEffect(()=>{const w=N.current;if(!w)return;const S=v=>{if(a||b)return;w.scrollTop<=0&&(p.current=v.touches[0].clientY,g(!0))},E=v=>{if(!h)return;const M=v.touches[0].clientY-p.current;if(M>0&&w.scrollTop<=0){const I=Math.min(M/l,1),z=Math.min(M*(1-I*.5),l);u(z),M>10&&v.preventDefault()}},V=async()=>{if(h)if(g(!1),c>=s&&!b){x(!0);try{await r()}catch{}finally{x(!1),u(0)}}else u(0)};return w.addEventListener("touchstart",S,{passive:!0}),w.addEventListener("touchmove",E,{passive:!1}),w.addEventListener("touchend",V),()=>{w.removeEventListener("touchstart",S),w.removeEventListener("touchmove",E),w.removeEventListener("touchend",V)}},[a,b,h,c,s,l,r]);const j=Math.min(c/s,1),k=h||b,U=h?c:b?s:0,_=()=>b?t:c>=s?i:o;return n.jsxDEV("div",{ref:N,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[n.jsxDEV("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${U}px`,marginTop:h?0:`-${U}px`,opacity:k?1:0,pointerEvents:"none"},children:n.jsxDEV("div",{className:"flex flex-col items-center justify-center gap-2",children:[n.jsxDEV(A.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${b?"animate-spin":""}`,style:{transform:`rotate(${j*360}deg)`}},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:147,columnNumber:11},void 0),c>20&&n.jsxDEV("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:_()},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:156,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:146,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:137,columnNumber:7},void 0),n.jsxDEV("div",{style:{paddingTop:h?`${c}px`:0,transition:h?"none":"padding-top 200ms ease-out"},children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:164,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/interactive/pull-to-refresh.tsx",lineNumber:127,columnNumber:5},void 0)},ce={twitter:(e,r,a)=>{const t=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}${t}`},facebook:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,linkedin:(e,r,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,reddit:(e,r)=>`https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(r)}`,telegram:(e,r)=>`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}`,whatsapp:(e,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+e)}`,email:(e,r,a)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(a+`
52
47
 
53
48
  `+e)}`,discord:(e,r)=>`https://discord.com/channels/@me?message=${encodeURIComponent(r+`
54
- `+e)}`,messages:(e,r)=>`sms:?&body=${encodeURIComponent(r+" "+e)}`},_c=({shareConfig:e})=>{const[r,t]=y.useState(!1),[a,i]=y.useState(""),[o,s]=y.useState(!1),[l,c]=y.useState(!1),[u,m]=y.useState(!1);y.useEffect(()=>{const _=e.onBeforeShare;_&&!a&&(async()=>{s(!0);try{const j=typeof window<"u"?window.location.href:"",k=await _(j);i(k)}catch{const j=typeof window<"u"?window.location.href:"";i(j)}finally{s(!1)}})()},[e,a]);const b=a||(typeof window<"u"?window.location.href:""),p=typeof navigator<"u"&&navigator.share!==void 0,h=async()=>{if(!(!p||u)){m(!0);try{await navigator.share({title:e.title,text:e.description,url:b}),t(!1)}catch(_){_ instanceof Error&&_.name!=="AbortError"&&(console.error("Share failed:",_),_.name!=="InvalidStateError"&&t(!0))}finally{m(!1)}}},g=async()=>{try{await navigator.clipboard.writeText(b),c(!0),setTimeout(()=>{c(!1),t(!1)},1500)}catch{}},x=()=>{t(!r)},N=_=>{window.open(_,"_blank","noopener,noreferrer,width=600,height=400"),t(!1)},U=[{name:"Twitter",url:fe.twitter(b,e.title,e.hashtags),color:"text-blue-400",svg:n.jsxDEV("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:153,columnNumber:9},void 0)},{name:"Facebook",url:fe.facebook(b),color:"text-blue-600",svg:n.jsxDEV("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:161,columnNumber:9},void 0)},{name:"LinkedIn",url:fe.linkedin(b,e.title,e.description),color:"text-blue-700",svg:n.jsxDEV("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:173,columnNumber:9},void 0)},{name:"Reddit",url:fe.reddit(b,e.title),color:"text-orange-600",svg:n.jsxDEV("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:181,columnNumber:9},void 0)},{name:"Telegram",url:fe.telegram(b,e.title),color:"text-blue-500",svg:n.jsxDEV("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:189,columnNumber:9},void 0)},{name:"WhatsApp",url:fe.whatsapp(b,e.title),color:"text-green-600",svg:n.jsxDEV("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:197,columnNumber:9},void 0)},{name:"Discord",url:fe.discord(b,e.title),color:"text-indigo-500",svg:n.jsxDEV("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:205,columnNumber:9},void 0)},{name:"Messages",url:fe.messages(b,e.title),color:"text-green-500",svg:n.jsxDEV("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:213,columnNumber:9},void 0)},{name:"Email",url:fe.email(b,e.title,e.description),color:"text-gray-600",svg:n.jsxDEV("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:225,columnNumber:9},void 0)}];return n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{onClick:x,disabled:o||u,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:o||u?n.jsxDEV("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:239,columnNumber:11},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:247,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:241,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:232,columnNumber:7},void 0),r&&n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"fixed inset-0 z-[999998]",onClick:()=>t(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:260,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[U.map(_=>n.jsxDEV("button",{onClick:()=>N(_.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsxDEV("svg",{className:`w-4 h-4 mr-2 ${_.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:_.svg},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:271,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:_.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:279,columnNumber:17},void 0)]},_.name,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:266,columnNumber:15},void 0)),n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:284,columnNumber:13},void 0),p&&n.jsxDEV("button",{onClick:()=>{t(!1),h()},disabled:u,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[n.jsxDEV("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:302,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:296,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:309,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:288,columnNumber:15},void 0),n.jsxDEV("button",{onClick:g,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsxDEV("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:325,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:319,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l?"Copied!":"Copy Link"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:332,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:315,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:264,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:259,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:231,columnNumber:5},void 0)},Ft=({items:e,shareConfig:r,className:t,showHome:a})=>n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("nav",{"aria-label":"Breadcrumb",children:n.jsxDEV("ol",{className:"flex items-center text-sm space-x-2",children:e.map((i,o)=>n.jsxDEV(y.Fragment,{children:[n.jsxDEV("li",{children:i.current?n.jsxDEV("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:i.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:357,columnNumber:19},void 0):n.jsxDEV(_r.Link,{to:i.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:i.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:361,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:355,columnNumber:15},void 0),o<e.length-1&&n.jsxDEV("li",{children:n.jsxDEV("span",{className:"text-gray-400 dark:text-gray-500",children:"/"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:371,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:370,columnNumber:17},void 0)]},o,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:354,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:352,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:351,columnNumber:7},void 0),r&&n.jsxDEV(_c,{shareConfig:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:378,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:350,columnNumber:5},void 0),kc=({items:e,shareConfig:r})=>n.jsxDEV("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:n.jsxDEV(Ft,{items:e,shareConfig:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:22,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:21,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:20,columnNumber:5},void 0),qt=e=>{const[r,t]=y.useState(""),[a,i]=y.useState(!0),[o,s]=y.useState(null);return y.useEffect(()=>{e&&(async()=>{try{i(!0),s(null);const c=await fetch(`/code/${e}`);if(!c.ok)throw new Error(`Failed to load code file: ${e}`);const u=await c.text();t(u)}catch(c){s(c instanceof Error?c.message:"Unknown error"),t("// Error loading code file")}finally{i(!1)}})()},[e]),{code:r,loading:a,error:o}},wc=({filename:e,code:r,language:t,title:a,className:i="",showCopy:o=!0,showHeader:s=!0})=>{const{t:l}=vn.useTranslation("codeBlock"),{code:c,loading:u,error:m}=qt(e||""),[b,p]=y.useState(!1),h=r||c,x=t||(e?(U=>{switch(U.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(e):"text"),N=async()=>{if(h)try{await navigator.clipboard.writeText(h),p(!0),setTimeout(()=>p(!1),2e3)}catch{}};return e&&u?n.jsxDEV("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${i}`,children:n.jsxDEV("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:112,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:109,columnNumber:7},void 0):e&&m?n.jsxDEV("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${i}`,children:[l("error","Error"),": ",m]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:122,columnNumber:7},void 0):h?n.jsxDEV("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${i}`,children:[s&&n.jsxDEV("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[n.jsxDEV("span",{className:"text-sm text-green-400 font-mono",children:a||e||`${x} code`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:148,columnNumber:11},void 0),o&&n.jsxDEV("button",{onClick:N,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:l("copyCode","Copy code"),children:b?n.jsxDEV(A.CheckIcon,{className:"h-4 w-4 text-green-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:158,columnNumber:17},void 0):n.jsxDEV(A.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:160,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:152,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:147,columnNumber:9},void 0),n.jsxDEV("div",{className:"p-4 overflow-x-auto text-left",children:n.jsxDEV("pre",{className:`text-sm language-${x}`,children:n.jsxDEV("code",{className:"text-gray-100",children:h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:170,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:169,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:168,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:142,columnNumber:5},void 0):n.jsxDEV("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${i}`,children:l("noCode","No code to display")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:133,columnNumber:7},void 0)},Ec=({subsections:e,isExpanded:r,selectedSubsection:t,parentSectionId:a,onSubsectionSelect:i})=>{const o=y.useRef(null),[s,l]=y.useState(void 0);return y.useLayoutEffect(()=>{if(o.current){const c=o.current.scrollHeight;l(r?c+16:0)}},[r,e]),n.jsxDEV("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:s!==void 0?`${s}px`:"auto"},children:n.jsxDEV("div",{ref:o,className:"ml-6 mt-1 mb-1 space-y-1",children:e.map(c=>n.jsxDEV("div",{className:"relative group",children:[t===c.id&&n.jsxDEV("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:56,columnNumber:15},void 0),t!==c.id&&n.jsxDEV("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:60,columnNumber:15},void 0),n.jsxDEV("button",{onClick:()=>i?.(c.id,a),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${t===c.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:c.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:62,columnNumber:13},void 0)]},c.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:53,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:51,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:47,columnNumber:5},void 0)},Uc=({id:e,title:r,content:t,subsections:a,isSelected:i=!1,selectedSubsection:o=null,onSectionSelect:s,onSubsectionSelect:l,className:c=""})=>{const[u,m]=y.useState(!1),b=()=>{m(!u)},p=()=>{s?.(e)},h=a&&a.length>0;return n.jsxDEV("div",{className:c,children:[n.jsxDEV("div",{className:"relative flex items-center group",children:[i&&!o&&n.jsxDEV("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:131,columnNumber:11},void 0),!(i&&!o)&&n.jsxDEV("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:135,columnNumber:11},void 0),n.jsxDEV("button",{onClick:p,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${i&&!o?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:137,columnNumber:9},void 0),h&&n.jsxDEV("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":u?"Collapse section":"Expand section",children:n.jsxDEV(A.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${u?"rotate-90":"rotate-0"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:153,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:148,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:128,columnNumber:7},void 0),h&&n.jsxDEV(Ec,{subsections:a,isExpanded:u,selectedSubsection:o,parentSectionId:e,onSubsectionSelect:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:163,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:127,columnNumber:5},void 0)},Dc=({title:e,subtitle:r,buttonText:t,buttonIcon:a="envelope",variant:i="default",badgeText:o="FREE",prominentBadgeText:s="100% Free",onButtonClick:l,className:c=""})=>{const u=()=>a==="envelope"||a==="both"?n.jsxDEV(A.EnvelopeIcon,{className:i==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:51,columnNumber:9},void 0):a==="none"?null:n.jsxDEV("svg",{className:i==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:67,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:61,columnNumber:7},void 0),m=()=>a==="arrow"||a==="both"?n.jsxDEV(A.ArrowRightIcon,{className:"h-4 w-4 ml-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:79,columnNumber:14},void 0):null,b=()=>i==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",p=()=>{const x="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return i==="prominent"?`${x} px-8 py-3 text-base`:`${x} px-6 py-2 text-sm`},h=()=>i==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",g=i==="prominent"?s:o;return n.jsxDEV("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${c}`,children:n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:n.jsxDEV("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[n.jsxDEV("div",{className:`flex items-center ${i==="prominent"?"text-center sm:text-left":""}`,children:[n.jsxDEV("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:g},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:120,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("span",{className:h(),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:124,columnNumber:15},void 0),r&&n.jsxDEV("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:126,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:123,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:117,columnNumber:11},void 0),n.jsxDEV("button",{onClick:l,className:p(),children:[u(),t,m()]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:132,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:116,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:115,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:112,columnNumber:5},void 0)},Cc=({children:e,onClick:r,variant:t,size:a,disabled:i,className:o,type:s,trackingLabel:l,actionType:c,componentName:u,onTrack:m,trackingParams:b={},...p})=>{const h=g=>{if(m){const x=l||(typeof e=="string"?e:"")||"Unknown Button",U=t&&["default","primary","secondary","outline","ghost","destructive","link"].includes(t)?t:"default";m({button_text:x,button_type:U,component_name:u,action_type:c,...b})}r&&r(g)};return n.jsxDEV(me,{...p,variant:t,size:a,disabled:i,className:o,type:s,onClick:h,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedButton.tsx",lineNumber:110,columnNumber:5},void 0)},Sc=({children:e,onClick:r,to:t,href:a,trackingLabel:i,componentName:o,onTrack:s,trackingParams:l={},LinkComponent:c,linkProps:u={},...m})=>{const b=h=>{if(s){const g=i||(typeof e=="string"?e:"")||"Unknown Link",x=t?typeof t=="string"?t:t.pathname||"":a||"";s({link_text:g,link_url:x,to_page:x,navigation_type:c?"router_link":"anchor_link",component_name:o,...l})}r&&r(h)};if(c&&t!==void 0)return n.jsxDEV(c,{...u,to:t,onClick:b,...m,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedLink.tsx",lineNumber:104,columnNumber:7},void 0);const p=t?typeof t=="string"?t:t.pathname||"#":a;return n.jsxDEV("a",{...m,href:p,onClick:b,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedLink.tsx",lineNumber:118,columnNumber:5},void 0)},$t={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},Vc=({variant:e="compact",className:r=""})=>{const{i18n:t,t:a}=vn.useTranslation("languageSelector"),[i,o]=y.useState(t.language),s=y.useMemo(()=>t.options.supportedLngs?t.options.supportedLngs.filter(u=>u!=="cimode").map(u=>({code:u,name:$t[u]?.name||u.toUpperCase(),flag:$t[u]?.flag||"🌐"})).sort((u,m)=>u.name.localeCompare(m.name)):[],[t.options.supportedLngs]),l=s.find(u=>u.code===i||u.code.toLowerCase()===i.toLowerCase());y.useEffect(()=>{o(t.language)},[t.language]);const c=u=>{localStorage.setItem("language",u),t.changeLanguage(u).then(()=>{o(t.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?n.jsxDEV("div",{className:`relative ${r}`,children:n.jsxDEV(qr,{value:i,onValueChange:c,children:[n.jsxDEV(cr,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:l?.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:110,columnNumber:15},void 0),n.jsxDEV("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:113,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:109,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:108,columnNumber:11},void 0),n.jsxDEV(mr,{children:s.map(u=>n.jsxDEV(dr,{value:u.code,className:"cursor-pointer",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:u.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:127,columnNumber:21},void 0),n.jsxDEV("span",{className:"text-sm",children:u.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:128,columnNumber:21},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:126,columnNumber:19},void 0)},u.code,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:121,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:118,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:107,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:106,columnNumber:7},void 0):n.jsxDEV("div",{className:`space-y-2 ${r}`,children:[n.jsxDEV("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[n.jsxDEV(A.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:142,columnNumber:9},void 0),n.jsxDEV("span",{children:a("language","Language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:143,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:141,columnNumber:7},void 0),n.jsxDEV(qr,{value:i,onValueChange:c,children:[n.jsxDEV(cr,{children:n.jsxDEV(Ct,{placeholder:a("selectLanguage","Select language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:147,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:146,columnNumber:9},void 0),n.jsxDEV(mr,{children:s.map(u=>n.jsxDEV(dr,{value:u.code,className:"cursor-pointer",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:u.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:158,columnNumber:19},void 0),n.jsxDEV("span",{children:u.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:159,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:157,columnNumber:17},void 0)},u.code,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:152,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:149,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:145,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a("selectPreferredLanguage","Select your preferred language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:166,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:140,columnNumber:5},void 0)},Ac=({items:e,type:r="ordered",variant:t="default",className:a,itemClassName:i})=>{const o=()=>{const u="space-y-2",m={ordered:r==="ordered"?"list-decimal":"",unordered:r==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return f(u,m[r],b[t])},s=u=>{const m="text-gray-600 dark:text-gray-400";return t==="enhanced"?f(m,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",u===e.length-1&&"border-l-transparent"):t==="minimal"?f(m,"flex items-start"):m},l=u=>t==="enhanced"&&r==="ordered"?n.jsxDEV("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:u+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:66,columnNumber:9},void 0):null,c=(u,m)=>{const b=typeof u=="object",p=b?u.content:u,h=b?u.subItems:void 0;return n.jsxDEV("li",{className:f(s(m),i),children:[l(m),t==="minimal"&&r==="ordered"&&n.jsxDEV("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:m+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:83,columnNumber:11},void 0),t==="minimal"&&r==="unordered"&&n.jsxDEV("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:88,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("div",{children:p},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:91,columnNumber:11},void 0),h&&h.length>0&&n.jsxDEV("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:h.map((g,x)=>n.jsxDEV("li",{children:g},x,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:95,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:93,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:90,columnNumber:9},void 0)]},m,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:80,columnNumber:7},void 0)};return n.jsxDEV("ul",{className:f(o(),a),children:e.map(c)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:105,columnNumber:5},void 0)};class Tc extends y.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),this.props.onError?.(r,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:n.jsxDEV("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[n.jsxDEV("h2",{children:"Something went wrong"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:38,columnNumber:11},this),n.jsxDEV("p",{children:["Error: ",this.state.error?.message||"Unknown error"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:39,columnNumber:11},this),n.jsxDEV("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:40,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:35,columnNumber:9},this):this.props.children}}class hr extends y.Component{constructor(r){super(r),this.retryTimer=null,this.sendErrorToMonitoring=(t,a)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(t,{contexts:{react:{componentStack:a.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:t.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:t=3,retryDelay:a=1e3}=this.props,{retryCount:i}=this.state;if(i>=t)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const o=a*Math.pow(2,i);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:i+1,isRetrying:!1})},o)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(r){return{hasError:!0,error:r,lastErrorTime:Date.now()}}componentDidCatch(r,t){const{onError:a,componentName:i}=this.props;this.setState({error:r,errorInfo:t}),console.error(`LazyErrorBoundary caught an error in ${i||"Unknown Component"}:`,r,t),a?.(r,t),this.sendErrorToMonitoring(r,t)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:r,fallback:t,componentName:a,showRetryButton:i=!0,maxRetries:o=3}=this.props,{hasError:s,error:l,isRetrying:c,retryCount:u}=this.state;return s&&l?t||n.jsxDEV("div",{className:"lazy-error-boundary error-boundary-container",children:n.jsxDEV("div",{className:"error-content",children:[n.jsxDEV("div",{className:"error-icon",children:"⚠️"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:205,columnNumber:13},this),n.jsxDEV("h3",{className:"error-title",children:["Something went wrong loading ",a||"this component"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:206,columnNumber:13},this),n.jsxDEV("div",{className:"error-details",children:[n.jsxDEV("p",{className:"error-message",children:l.message},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:211,columnNumber:15},this),process.env.NODE_ENV==="development"&&n.jsxDEV("details",{className:"error-stack",children:[n.jsxDEV("summary",{children:"Error Details (Development)"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:215,columnNumber:19},this),n.jsxDEV("pre",{children:l.stack},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:216,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:214,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:210,columnNumber:13},this),n.jsxDEV("div",{className:"error-actions",children:[i&&u<o&&n.jsxDEV("button",{onClick:this.handleRetry,disabled:c,className:"retry-button",children:c?"Retrying...":`Retry (${u}/${o})`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:223,columnNumber:17},this),u>=o&&n.jsxDEV("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:235,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:221,columnNumber:13},this),n.jsxDEV("div",{className:"error-help",children:[n.jsxDEV("p",{children:"This might be a temporary issue. Try refreshing the page."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:242,columnNumber:15},this),navigator.onLine===!1&&n.jsxDEV("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:244,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:241,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:204,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:203,columnNumber:9},this):r}}function Lc(e,r){const t=a=>n.jsxDEV(hr,{...r,children:n.jsxDEV(e,{...a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:267,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:266,columnNumber:5},this);return t.displayName=`withLazyErrorBoundary(${e.displayName||e.name})`,t}class Ic extends hr{static getDerivedStateFromError(r){return r.message.includes("Loading chunk")||r.message.includes("Loading CSS chunk")||r.message.includes("ChunkLoadError")||r.name==="ChunkLoadError"?{hasError:!0,error:new Error("Network error while loading component. Please check your connection and try again."),lastErrorTime:Date.now()}:super.getDerivedStateFromError(r)}}function Pc(){const[e,r]=y.useState(0),t=y.useCallback(()=>{r(a=>a+1)},[]);return{errorRecoveryCount:e,triggerErrorRecovery:t}}function Mc({children:e}){const r=(t,a)=>{console.error("Global lazy loading error:",t,a),typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(t,{level:"error",tags:{globalErrorBoundary:!0,lazyLoading:!0}})};return n.jsxDEV(hr,{onError:r,componentName:"Application",maxRetries:1,showRetryButton:!0,fallback:n.jsxDEV("div",{className:"global-error-fallback",children:[n.jsxDEV("h1",{children:"Application Error"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:365,columnNumber:11},this),n.jsxDEV("p",{children:"Something went wrong with the application. Please refresh the page."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:366,columnNumber:11},this),n.jsxDEV("button",{onClick:()=>window.location.reload(),children:"Refresh Page"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:369,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:364,columnNumber:9},this),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:358,columnNumber:5},this)}const Oc=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/SafeAppWrapper.tsx",lineNumber:8,columnNumber:10},void 0),Rc=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/SecurityProvider.tsx",lineNumber:10,columnNumber:10},void 0),zc=(e,r,t)=>{const a=y.memo(e,r);return t&&(a.displayName=`Memo(${t})`),process.env.NODE_ENV==="development"?i=>(y.useMemo(()=>{let s=0;return()=>++s},[])(),n.jsxDEV(a,{...i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:33,columnNumber:14},void 0)):a},Bc=(e,r)=>y.memo(e,(t,a)=>r.every(i=>t[i]===a[i])),Wc=y.memo(({children:e,compute:r,deps:t})=>{const a=y.useRef(t),i=y.useRef(r),o=y.useRef(void 0),s=y.useMemo(()=>{const l=t.length!==a.current.length||t.some((u,m)=>u!==a.current[m]),c=r!==i.current;if(l||c||o.current===void 0){let u;return process.env.NODE_ENV==="development"?(performance.now(),u=r(),performance.now()):u=r(),a.current=t,i.current=r,o.current=u,u}return o.current},[r,t]);return n.jsxDEV(n.Fragment,{children:e(s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:95,columnNumber:12},void 0)}),Fc=y.memo(({item:e,index:r,style:t,renderItem:a})=>n.jsxDEV("div",{style:t,children:a(e,r)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:109,columnNumber:12},void 0),(e,r)=>e.index===r.index&&e.item===r.item&&e.style.height===r.style.height&&e.style.top===r.style.top),qc=y.memo(({condition:e,children:r,fallback:t=null})=>e?n.jsxDEV(n.Fragment,{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:130,columnNumber:24},void 0):n.jsxDEV(n.Fragment,{children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:130,columnNumber:42},void 0)),$c=({children:e,threshold:r=.1,rootMargin:t="50px",fallback:a=null})=>{const[i,o]=y.useState(!1),s=y.useRef(null);return y.useEffect(()=>{const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(!0),l.disconnect())},{threshold:r,rootMargin:t});return s.current&&l.observe(s.current),()=>l.disconnect()},[r,t]),n.jsxDEV("div",{ref:s,children:i?e:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:169,columnNumber:10},void 0)},Hc=({children:e,maxRenderTime:r=16,onSlowRender:t})=>{const a=y.useRef(0);return y.useLayoutEffect(()=>{a.current=performance.now()}),y.useEffect(()=>{const i=performance.now()-a.current;i>r&&t?.(i)}),n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:197,columnNumber:10},void 0)},Gc=({children:e,batchSize:r=5,delay:t=0})=>{const[a,i]=y.useState(r);return y.useEffect(()=>{if(a<e.length){const o=setTimeout(()=>{i(s=>Math.min(s+r,e.length))},t);return()=>clearTimeout(o)}},[a,e.length,r,t]),n.jsxDEV(n.Fragment,{children:e.slice(0,a)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:224,columnNumber:10},void 0)},Yc=({src:e,alt:r,placeholder:t,lowQualitySrc:a,aspectRatio:i="16/9",eager:o=!1,className:s="",...l})=>{const[c,u]=y.useState(!1),[m,b]=y.useState(o),[p,h]=y.useState(!1),g=y.useRef(null),x=y.useRef(null);y.useEffect(()=>{if(o){b(!0);return}return x.current=new IntersectionObserver(_=>{_.forEach(E=>{E.isIntersecting&&(b(!0),x.current&&g.current&&x.current.unobserve(g.current))})},{rootMargin:"50px",threshold:.01}),g.current&&x.current.observe(g.current),()=>{x.current&&x.current.disconnect()}},[o]);const N=()=>{u(!0)},U=()=>{h(!0)};return n.jsxDEV("div",{className:`relative overflow-hidden ${s}`,style:{aspectRatio:i},children:[a&&!c&&n.jsxDEV("img",{src:a,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:88,columnNumber:9},void 0),!a&&!c&&n.jsxDEV("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:98,columnNumber:9},void 0),m&&!p&&n.jsxDEV("img",{ref:g,src:e,alt:r,onLoad:N,onError:U,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${c?"opacity-100":"opacity-0"}`,loading:o?"eager":"lazy",...l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:106,columnNumber:9},void 0),p&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:n.jsxDEV("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[n.jsxDEV("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:130,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:124,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-sm",children:"Failed to load image"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:137,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:123,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:122,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:82,columnNumber:5},void 0)},Kc=({icon:e,title:r,description:t,benefits:a,metrics:i,color:o="blue",isHighlight:s=!1,learnMoreUrl:l,cta:c,onClick:u,interactive:m=!1,borderColor:b=!1,className:p})=>{const h={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400",red:"text-red-600 dark:text-red-400",indigo:"text-indigo-600 dark:text-indigo-400",cyan:"text-cyan-600 dark:text-cyan-400",emerald:"text-emerald-600 dark:text-emerald-400"},g={green:"border-l-4 border-green-500",blue:"border-l-4 border-blue-500",purple:"border-l-4 border-purple-500",orange:"border-l-4 border-orange-500",red:"border-l-4 border-red-500",indigo:"border-l-4 border-indigo-500",cyan:"border-l-4 border-cyan-500",emerald:"border-l-4 border-emerald-500",pink:"border-l-4 border-pink-500",gray:"border-l-4 border-gray-500"},x={green:"bg-green-100 dark:bg-green-900/20",blue:"bg-blue-100 dark:bg-blue-900/20",purple:"bg-purple-100 dark:bg-purple-900/20",orange:"bg-orange-100 dark:bg-orange-900/20",red:"bg-red-100 dark:bg-red-900/20",indigo:"bg-indigo-100 dark:bg-indigo-900/20",cyan:"bg-cyan-100 dark:bg-cyan-900/20",emerald:"bg-emerald-100 dark:bg-emerald-900/20",pink:"bg-pink-100 dark:bg-pink-900/20",gray:"bg-gray-100 dark:bg-gray-900/20"},N=h[o],U=typeof e=="string",_=()=>n.jsxDEV(n.Fragment,{children:[U?n.jsxDEV("div",{className:"text-4xl mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:148,columnNumber:9},void 0):b?n.jsxDEV("div",{className:f("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",x[o],N),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:151,columnNumber:9},void 0):n.jsxDEV("div",{className:f("flex-shrink-0 mb-4",N),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:165,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:169,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:172,columnNumber:9},void 0),c&&n.jsxDEV("div",{className:"mt-3 mb-4",children:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:176,columnNumber:17},void 0),a&&a.length>0&&n.jsxDEV("ul",{className:"space-y-2 mb-4",children:a.map((k,C)=>n.jsxDEV("li",{className:"flex items-start",children:[n.jsxDEV("div",{className:f("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${o}-500`)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:182,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:k},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:188,columnNumber:17},void 0)]},C,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:181,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:179,columnNumber:11},void 0),i&&Object.keys(i).length>0&&n.jsxDEV("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(i).map(([k,C],w)=>n.jsxDEV("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[n.jsxDEV("div",{className:f("text-lg font-bold",N),children:C},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:203,columnNumber:17},void 0),n.jsxDEV("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:k},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:206,columnNumber:17},void 0)]},w,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:199,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:197,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:168,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:144,columnNumber:5},void 0),E=f("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",b&&g[o],(m||u)&&"cursor-pointer hover:scale-[1.02]",s?"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border",p),j=k=>{u&&("key"in k?(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),u()):u())};return l?n.jsxDEV("a",{href:l,className:f(E,"block group"),onClick:u?k=>{k.preventDefault(),j(k)}:void 0,children:n.jsxDEV(_,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:259,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:247,columnNumber:7},void 0):u?n.jsxDEV("div",{className:E,onClick:j,onKeyDown:j,role:"button",tabIndex:0,"aria-label":r,children:n.jsxDEV(_,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:275,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:267,columnNumber:7},void 0):n.jsxDEV("div",{className:E,children:n.jsxDEV(_,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:283,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:282,columnNumber:5},void 0)},Zc=J.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),Qc=J.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),Xc=J.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}}),Jc={success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},em=({className:e,features:r,columns:t=3,spacing:a="md",cardVariant:i="default",cardAnimation:o="hover",iconSize:s="md",iconStyle:l="gradient",iconPosition:c="center",titleClass:u,descriptionClass:m,animate:b=!0,animationDelay:p=0,staggerDelay:h=100,onFeatureClick:g,defaultLinkText:x="Learn more"})=>{const N=(_,E)=>{if(l==="colorful"&&_.gradient)return{background:`linear-gradient(135deg, ${_.gradient.from}, ${_.gradient.to})`};if(l==="colorful"){const j=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],k=j[E%j.length];return{background:`linear-gradient(135deg, ${k.from}, ${k.to})`}}},U=(_,E)=>{const j=n.jsxDEV("div",{className:f(Qc({variant:i,animation:o})),onClick:()=>g?.(_),role:g?"button":void 0,tabIndex:g?0:void 0,children:[_.badge&&n.jsxDEV("div",{className:"mb-4",children:n.jsxDEV("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Jc[_.badge.variant||"default"]),children:_.badge.text},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:199,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:198,columnNumber:11},void 0),n.jsxDEV("div",{className:f(Xc({size:s,style:l,position:c})),style:N(_,E),children:n.jsxDEV("div",{className:f("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:_.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:221,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:211,columnNumber:9},void 0),n.jsxDEV("h3",{className:f("text-xl font-bold text-gray-900 dark:text-white mb-4",u),children:_.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:234,columnNumber:9},void 0),n.jsxDEV("div",{className:f("text-gray-600 dark:text-gray-300 leading-relaxed",m),children:_.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:244,columnNumber:9},void 0),_.link&&n.jsxDEV("div",{className:"mt-6",children:n.jsxDEV("a",{href:_.link.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200",children:[_.link.text||x,n.jsxDEV("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:267,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:261,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:256,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:255,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:188,columnNumber:7},void 0);return n.jsxDEV("div",{children:j},_.id||E,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:280,columnNumber:12},void 0)};return n.jsxDEV("div",{className:f(Zc({columns:t,spacing:a}),e),children:r.map(U)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:284,columnNumber:5},void 0)},en=(e,r,t,a)=>({icon:e,title:r,description:t,...a}),rm=e=>[en(n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:318,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:312,columnNumber:5},void 0),e?.passwordlessTitle||"Passwordless Security",e?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),en(n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:336,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:330,columnNumber:5},void 0),e?.encryptionTitle||"End-to-End Encryption",e?.encryptionDescription||"Your emails are encrypted and only you can read them.")],nm=({title:e,description:r,primaryButton:t,secondaryButton:a,gradient:i={from:"blue-600",to:"purple-600"},textColor:o="light",className:s="",size:l="lg"})=>{const u=(()=>{const x=i.via?`${i.from}-${i.via}-${i.to}`:`${i.from}-${i.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[x]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),m=o==="light"?"text-white":"text-gray-900 dark:text-gray-100",b={sm:"py-12",md:"py-16",lg:"py-20"},p={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},h={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},g=(x,N=!1)=>{const U=()=>x.variant==="primary"||N?"gradient":(x.variant==="secondary","outline"),_=n.jsxDEV(me,{variant:U(),size:"lg",className:N?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:x.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:91,columnNumber:7},void 0);return x.external?n.jsxDEV("a",{href:x.href,target:"_blank",rel:"noopener noreferrer",children:_},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:106,columnNumber:9},void 0):n.jsxDEV(_r.Link,{to:x.href,children:_},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:112,columnNumber:12},void 0)};return n.jsxDEV("section",{className:`${u} ${b[l]} relative overflow-hidden ${s}`,children:[n.jsxDEV("div",{className:"absolute inset-0 bg-black/20"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:120,columnNumber:7},void 0),n.jsxDEV("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[n.jsxDEV("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:122,columnNumber:9},void 0),n.jsxDEV("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:123,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:121,columnNumber:7},void 0),n.jsxDEV("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsxDEV("h2",{className:`${p[l]} font-bold ${m} mb-6`,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:127,columnNumber:9},void 0),n.jsxDEV("p",{className:`${h[l]} ${m}/90 mb-8 max-w-2xl mx-auto`,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:133,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[g(t,!0),a&&g(a,!1)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:139,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:126,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:116,columnNumber:5},void 0)},tm={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},am={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},im=({status:e,level:r,className:t=""})=>{const a=tm[e],i=am[r];return n.jsxDEV("div",{className:`inline-flex items-center gap-2 ${t}`,children:n.jsxDEV("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${a.color} ${a.textColor}`,children:[i,": ",a.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCStatusBadge.tsx",lineNumber:57,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCStatusBadge.tsx",lineNumber:56,columnNumber:5},void 0)},om=({accessToken:e,onComplete:r,onError:t,className:a=""})=>{const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{if(!e)return;const s=document.createElement("script");return s.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",s.async=!0,s.onload=()=>{if(i.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",c=>{}).on("idCheck.onApplicantSubmitted",c=>{r?.()}).on("idCheck.onError",c=>{console.error("SumsubWebSDK: Error",c),t?.(c)}).build();o.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),t?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!i.current,"snsWebSdk:",!!window.snsWebSdk)},s.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),t?.(l)},document.body.appendChild(s),()=>{document.body.contains(s)&&document.body.removeChild(s),o.current&&typeof o.current.destroy=="function"&&o.current.destroy()}},[e,r,t]),n.jsxDEV("div",{className:`sumsub-sdk-container ${a}`,children:n.jsxDEV("div",{ref:i,id:"sumsub-websdk-container"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/SumsubWebSDK.tsx",lineNumber:110,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/SumsubWebSDK.tsx",lineNumber:109,columnNumber:5},void 0)},sm={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},lm=({level:e,price:r,features:t,isActive:a=!1,isVerified:i=!1,onSelect:o,className:s=""})=>{const l=sm[e];return n.jsxDEV("div",{className:`
49
+ `+e)}`,messages:(e,r)=>`sms:?&body=${encodeURIComponent(r+" "+e)}`},td=({shareConfig:e})=>{const[r,a]=y.useState(!1),[t,o]=y.useState(""),[i,s]=y.useState(!1),[l,d]=y.useState(!1),[c,u]=y.useState(!1);y.useEffect(()=>{const k=e.onBeforeShare;k&&!t&&(async()=>{s(!0);try{const _=typeof window<"u"?window.location.href:"",w=await k(_);o(w)}catch{const _=typeof window<"u"?window.location.href:"";o(_)}finally{s(!1)}})()},[e,t]);const b=t||(typeof window<"u"?window.location.href:""),x=typeof navigator<"u"&&navigator.share!==void 0,h=async()=>{if(!(!x||c)){u(!0);try{await navigator.share({title:e.title,text:e.description,url:b}),a(!1)}catch(k){k instanceof Error&&k.name!=="AbortError"&&(console.error("Share failed:",k),k.name!=="InvalidStateError"&&a(!0))}finally{u(!1)}}},g=async()=>{try{await navigator.clipboard.writeText(b),d(!0),setTimeout(()=>{d(!1),a(!1)},1500)}catch{}},p=()=>{a(!r)},N=k=>{window.open(k,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},j=[{name:"Twitter",url:ce.twitter(b,e.title,e.hashtags),color:"text-blue-400",svg:n.jsxDEV("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:153,columnNumber:9},void 0)},{name:"Facebook",url:ce.facebook(b),color:"text-blue-600",svg:n.jsxDEV("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:161,columnNumber:9},void 0)},{name:"LinkedIn",url:ce.linkedin(b,e.title,e.description),color:"text-blue-700",svg:n.jsxDEV("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:173,columnNumber:9},void 0)},{name:"Reddit",url:ce.reddit(b,e.title),color:"text-orange-600",svg:n.jsxDEV("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:181,columnNumber:9},void 0)},{name:"Telegram",url:ce.telegram(b,e.title),color:"text-blue-500",svg:n.jsxDEV("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:189,columnNumber:9},void 0)},{name:"WhatsApp",url:ce.whatsapp(b,e.title),color:"text-green-600",svg:n.jsxDEV("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:197,columnNumber:9},void 0)},{name:"Discord",url:ce.discord(b,e.title),color:"text-indigo-500",svg:n.jsxDEV("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:205,columnNumber:9},void 0)},{name:"Messages",url:ce.messages(b,e.title),color:"text-green-500",svg:n.jsxDEV("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:213,columnNumber:9},void 0)},{name:"Email",url:ce.email(b,e.title,e.description),color:"text-gray-600",svg:n.jsxDEV("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:225,columnNumber:9},void 0)}];return n.jsxDEV("div",{className:"relative",children:[n.jsxDEV("button",{onClick:p,disabled:i||c,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:i||c?n.jsxDEV("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:239,columnNumber:11},void 0):n.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:247,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:241,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:232,columnNumber:7},void 0),r&&n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:260,columnNumber:11},void 0),n.jsxDEV("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[j.map(k=>n.jsxDEV("button",{onClick:()=>N(k.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsxDEV("svg",{className:`w-4 h-4 mr-2 ${k.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:k.svg},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:271,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:k.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:279,columnNumber:17},void 0)]},k.name,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:266,columnNumber:15},void 0)),n.jsxDEV("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:284,columnNumber:13},void 0),x&&n.jsxDEV("button",{onClick:()=>{a(!1),h()},disabled:c,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[n.jsxDEV("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:302,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:296,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:309,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:288,columnNumber:15},void 0),n.jsxDEV("button",{onClick:g,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[n.jsxDEV("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:325,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:319,columnNumber:15},void 0),n.jsxDEV("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l?"Copied!":"Copy Link"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:332,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:315,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:264,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:259,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:231,columnNumber:5},void 0)},ja=({items:e,shareConfig:r,className:a,showHome:t})=>n.jsxDEV("div",{className:"flex items-center justify-between",children:[n.jsxDEV("nav",{"aria-label":"Breadcrumb",children:n.jsxDEV("ol",{className:"flex items-center text-sm space-x-2",children:e.map((o,i)=>n.jsxDEV(y.Fragment,{children:[n.jsxDEV("li",{children:o.current?n.jsxDEV("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:o.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:357,columnNumber:19},void 0):n.jsxDEV(ur.Link,{to:o.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:o.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:361,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:355,columnNumber:15},void 0),i<e.length-1&&n.jsxDEV("li",{children:n.jsxDEV("span",{className:"text-gray-400 dark:text-gray-500",children:"/"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:371,columnNumber:19},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:370,columnNumber:17},void 0)]},i,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:354,columnNumber:13},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:352,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:351,columnNumber:7},void 0),r&&n.jsxDEV(td,{shareConfig:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:378,columnNumber:23},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/Breadcrumb.tsx",lineNumber:350,columnNumber:5},void 0),od=({items:e,shareConfig:r})=>n.jsxDEV("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:n.jsxDEV(ja,{items:e,shareConfig:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:22,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:21,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/BreadcrumbSection.tsx",lineNumber:20,columnNumber:5},void 0),Ca=e=>{const[r,a]=y.useState(""),[t,o]=y.useState(!0),[i,s]=y.useState(null);return y.useEffect(()=>{e&&(async()=>{try{o(!0),s(null);const d=await fetch(`/code/${e}`);if(!d.ok)throw new Error(`Failed to load code file: ${e}`);const c=await d.text();a(c)}catch(d){s(d instanceof Error?d.message:"Unknown error"),a("// Error loading code file")}finally{o(!1)}})()},[e]),{code:r,loading:t,error:i}},id=({filename:e,code:r,language:a,title:t,className:o="",showCopy:i=!0,showHeader:s=!0})=>{const{t:l}=ln.useTranslation("codeBlock"),{code:d,loading:c,error:u}=Ca(e||""),[b,x]=y.useState(!1),h=r||d,p=a||(e?(j=>{switch(j.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(e):"text"),N=async()=>{if(h)try{await navigator.clipboard.writeText(h),x(!0),setTimeout(()=>x(!1),2e3)}catch{}};return e&&c?n.jsxDEV("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,children:n.jsxDEV("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:112,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:109,columnNumber:7},void 0):e&&u?n.jsxDEV("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,children:[l("error","Error"),": ",u]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:122,columnNumber:7},void 0):h?n.jsxDEV("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,children:[s&&n.jsxDEV("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[n.jsxDEV("span",{className:"text-sm text-green-400 font-mono",children:t||e||`${p} code`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:148,columnNumber:11},void 0),i&&n.jsxDEV("button",{onClick:N,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:l("copyCode","Copy code"),children:b?n.jsxDEV(A.CheckIcon,{className:"h-4 w-4 text-green-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:158,columnNumber:17},void 0):n.jsxDEV(A.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:160,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:152,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:147,columnNumber:9},void 0),n.jsxDEV("div",{className:"p-4 overflow-x-auto text-left",children:n.jsxDEV("pre",{className:`text-sm language-${p}`,children:n.jsxDEV("code",{className:"text-gray-100",children:h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:170,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:169,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:168,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:142,columnNumber:5},void 0):n.jsxDEV("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${o}`,children:l("noCode","No code to display")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CodeBlock.tsx",lineNumber:133,columnNumber:7},void 0)},sd=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:t,onSubsectionSelect:o})=>{const i=y.useRef(null),[s,l]=y.useState(void 0);return y.useLayoutEffect(()=>{if(i.current){const d=i.current.scrollHeight;l(r?d+16:0)}},[r,e]),n.jsxDEV("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:s!==void 0?`${s}px`:"auto"},children:n.jsxDEV("div",{ref:i,className:"ml-6 mt-1 mb-1 space-y-1",children:e.map(d=>n.jsxDEV("div",{className:"relative group",children:[a===d.id&&n.jsxDEV("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:56,columnNumber:15},void 0),a!==d.id&&n.jsxDEV("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:60,columnNumber:15},void 0),n.jsxDEV("button",{onClick:()=>o?.(d.id,t),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===d.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:62,columnNumber:13},void 0)]},d.id,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:53,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:51,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:47,columnNumber:5},void 0)},ld=({id:e,title:r,content:a,subsections:t,isSelected:o=!1,selectedSubsection:i=null,onSectionSelect:s,onSubsectionSelect:l,className:d=""})=>{const[c,u]=y.useState(!1),b=()=>{u(!c)},x=()=>{s?.(e)},h=t&&t.length>0;return n.jsxDEV("div",{className:d,children:[n.jsxDEV("div",{className:"relative flex items-center group",children:[o&&!i&&n.jsxDEV("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:131,columnNumber:11},void 0),!(o&&!i)&&n.jsxDEV("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:135,columnNumber:11},void 0),n.jsxDEV("button",{onClick:x,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${o&&!i?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:137,columnNumber:9},void 0),h&&n.jsxDEV("button",{onClick:b,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":c?"Collapse section":"Expand section",children:n.jsxDEV(A.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${c?"rotate-90":"rotate-0"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:153,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:148,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:128,columnNumber:7},void 0),h&&n.jsxDEV(sd,{subsections:t,isExpanded:c,selectedSubsection:i,parentSectionId:e,onSubsectionSelect:l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:163,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/CollapsibleDocumentationTopic.tsx",lineNumber:127,columnNumber:5},void 0)},cd=({title:e,subtitle:r,buttonText:a,buttonIcon:t="envelope",variant:o="default",badgeText:i="FREE",prominentBadgeText:s="100% Free",onButtonClick:l,className:d=""})=>{const c=()=>t==="envelope"||t==="both"?n.jsxDEV(A.EnvelopeIcon,{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:51,columnNumber:9},void 0):t==="none"?null:n.jsxDEV("svg",{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:67,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:61,columnNumber:7},void 0),u=()=>t==="arrow"||t==="both"?n.jsxDEV(A.ArrowRightIcon,{className:"h-4 w-4 ml-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:79,columnNumber:14},void 0):null,b=()=>o==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",x=()=>{const p="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return o==="prominent"?`${p} px-8 py-3 text-base`:`${p} px-6 py-2 text-sm`},h=()=>o==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",g=o==="prominent"?s:i;return n.jsxDEV("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${b()} ${d}`,children:n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:n.jsxDEV("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[n.jsxDEV("div",{className:`flex items-center ${o==="prominent"?"text-center sm:text-left":""}`,children:[n.jsxDEV("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:g},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:120,columnNumber:13},void 0),n.jsxDEV("div",{children:[n.jsxDEV("span",{className:h(),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:124,columnNumber:15},void 0),r&&n.jsxDEV("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:126,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:123,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:117,columnNumber:11},void 0),n.jsxDEV("button",{onClick:l,className:x(),children:[c(),a,u()]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:132,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:116,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:115,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/PromotionalBanner.tsx",lineNumber:112,columnNumber:5},void 0)},dd=({children:e,onClick:r,variant:a,size:t,disabled:o,className:i,type:s,trackingLabel:l,actionType:d,componentName:c,onTrack:u,trackingParams:b={},...x})=>{const h=g=>{if(u){const p=l||(typeof e=="string"?e:"")||"Unknown Button",j=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";u({button_text:p,button_type:j,component_name:c,action_type:d,...b})}r&&r(g)};return n.jsxDEV(oe,{...x,variant:a,size:t,disabled:o,className:i,type:s,onClick:h,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedButton.tsx",lineNumber:110,columnNumber:5},void 0)},ud=({children:e,onClick:r,to:a,href:t,trackingLabel:o,componentName:i,onTrack:s,trackingParams:l={},LinkComponent:d,linkProps:c={},...u})=>{const b=h=>{if(s){const g=o||(typeof e=="string"?e:"")||"Unknown Link",p=a?typeof a=="string"?a:a.pathname||"":t||"";s({link_text:g,link_url:p,to_page:p,navigation_type:d?"router_link":"anchor_link",component_name:i,...l})}r&&r(h)};if(d&&a!==void 0)return n.jsxDEV(d,{...c,to:a,onClick:b,...u,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedLink.tsx",lineNumber:104,columnNumber:7},void 0);const x=a?typeof a=="string"?a:a.pathname||"#":t;return n.jsxDEV("a",{...u,href:x,onClick:b,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/TrackedLink.tsx",lineNumber:118,columnNumber:5},void 0)},Sa={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},md=({variant:e="compact",className:r=""})=>{const{i18n:a,t}=ln.useTranslation("languageSelector"),[o,i]=y.useState(a.language),s=y.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(c=>c!=="cimode").map(c=>({code:c,name:Sa[c]?.name||c.toUpperCase(),flag:Sa[c]?.flag||"🌐"})).sort((c,u)=>c.name.localeCompare(u.name)):[],[a.options.supportedLngs]),l=s.find(c=>c.code===o||c.code.toLowerCase()===o.toLowerCase());y.useEffect(()=>{i(a.language)},[a.language]);const d=c=>{localStorage.setItem("language",c),a.changeLanguage(c).then(()=>{i(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?n.jsxDEV("div",{className:`relative ${r}`,children:n.jsxDEV(Tr,{value:o,onValueChange:d,children:[n.jsxDEV(Je,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:l?.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:110,columnNumber:15},void 0),n.jsxDEV("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:113,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:109,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:108,columnNumber:11},void 0),n.jsxDEV(Re,{children:s.map(c=>n.jsxDEV(er,{value:c.code,className:"cursor-pointer",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:c.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:127,columnNumber:21},void 0),n.jsxDEV("span",{className:"text-sm",children:c.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:128,columnNumber:21},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:126,columnNumber:19},void 0)},c.code,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:121,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:118,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:107,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:106,columnNumber:7},void 0):n.jsxDEV("div",{className:`space-y-2 ${r}`,children:[n.jsxDEV("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[n.jsxDEV(A.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:142,columnNumber:9},void 0),n.jsxDEV("span",{children:t("language","Language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:143,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:141,columnNumber:7},void 0),n.jsxDEV(Tr,{value:o,onValueChange:d,children:[n.jsxDEV(Je,{children:n.jsxDEV(ba,{placeholder:t("selectLanguage","Select language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:147,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:146,columnNumber:9},void 0),n.jsxDEV(Re,{children:s.map(c=>n.jsxDEV(er,{value:c.code,className:"cursor-pointer",children:n.jsxDEV("div",{className:"flex items-center space-x-2",children:[n.jsxDEV("span",{className:"text-lg leading-none",children:c.flag},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:158,columnNumber:19},void 0),n.jsxDEV("span",{children:c.name},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:159,columnNumber:19},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:157,columnNumber:17},void 0)},c.code,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:152,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:149,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:145,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("selectPreferredLanguage","Select your preferred language")},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:166,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/LanguageSelector.tsx",lineNumber:140,columnNumber:5},void 0)},bd=({items:e,type:r="ordered",variant:a="default",className:t,itemClassName:o})=>{const i=()=>{const c="space-y-2",u={ordered:r==="ordered"?"list-decimal":"",unordered:r==="unordered"?"list-disc":""},b={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return f(c,u[r],b[a])},s=c=>{const u="text-gray-600 dark:text-gray-400";return a==="enhanced"?f(u,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",c===e.length-1&&"border-l-transparent"):a==="minimal"?f(u,"flex items-start"):u},l=c=>a==="enhanced"&&r==="ordered"?n.jsxDEV("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:c+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:66,columnNumber:9},void 0):null,d=(c,u)=>{const b=typeof c=="object",x=b?c.content:c,h=b?c.subItems:void 0;return n.jsxDEV("li",{className:f(s(u),o),children:[l(u),a==="minimal"&&r==="ordered"&&n.jsxDEV("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:u+1},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:83,columnNumber:11},void 0),a==="minimal"&&r==="unordered"&&n.jsxDEV("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:88,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("div",{children:x},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:91,columnNumber:11},void 0),h&&h.length>0&&n.jsxDEV("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:h.map((g,p)=>n.jsxDEV("li",{children:g},p,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:95,columnNumber:17},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:93,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:90,columnNumber:9},void 0)]},u,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:80,columnNumber:7},void 0)};return n.jsxDEV("ul",{className:f(i(),t),children:e.map(d)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/StepList.tsx",lineNumber:105,columnNumber:5},void 0)};class fd extends y.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){console.error("ErrorBoundary caught an error:",r,a),this.props.onError?.(r,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:n.jsxDEV("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[n.jsxDEV("h2",{children:"Something went wrong"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:38,columnNumber:11},this),n.jsxDEV("p",{children:["Error: ",this.state.error?.message||"Unknown error"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:39,columnNumber:11},this),n.jsxDEV("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:40,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundary.tsx",lineNumber:35,columnNumber:9},this):this.props.children}}class tr extends y.Component{constructor(r){super(r),this.retryTimer=null,this.sendErrorToMonitoring=(a,t)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:t.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:t=1e3}=this.props,{retryCount:o}=this.state;if(o>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const i=t*Math.pow(2,o);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:o+1,isRetrying:!1})},i)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(r){return{hasError:!0,error:r,lastErrorTime:Date.now()}}componentDidCatch(r,a){const{onError:t,componentName:o}=this.props;this.setState({error:r,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${o||"Unknown Component"}:`,r,a),t?.(r,a),this.sendErrorToMonitoring(r,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:r,fallback:a,componentName:t,showRetryButton:o=!0,maxRetries:i=3}=this.props,{hasError:s,error:l,isRetrying:d,retryCount:c}=this.state;return s&&l?a||n.jsxDEV("div",{className:"lazy-error-boundary error-boundary-container",children:n.jsxDEV("div",{className:"error-content",children:[n.jsxDEV("div",{className:"error-icon",children:"⚠️"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:205,columnNumber:13},this),n.jsxDEV("h3",{className:"error-title",children:["Something went wrong loading ",t||"this component"]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:206,columnNumber:13},this),n.jsxDEV("div",{className:"error-details",children:[n.jsxDEV("p",{className:"error-message",children:l.message},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:211,columnNumber:15},this),process.env.NODE_ENV==="development"&&n.jsxDEV("details",{className:"error-stack",children:[n.jsxDEV("summary",{children:"Error Details (Development)"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:215,columnNumber:19},this),n.jsxDEV("pre",{children:l.stack},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:216,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:214,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:210,columnNumber:13},this),n.jsxDEV("div",{className:"error-actions",children:[o&&c<i&&n.jsxDEV("button",{onClick:this.handleRetry,disabled:d,className:"retry-button",children:d?"Retrying...":`Retry (${c}/${i})`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:223,columnNumber:17},this),c>=i&&n.jsxDEV("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:235,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:221,columnNumber:13},this),n.jsxDEV("div",{className:"error-help",children:[n.jsxDEV("p",{children:"This might be a temporary issue. Try refreshing the page."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:242,columnNumber:15},this),navigator.onLine===!1&&n.jsxDEV("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:244,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:241,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:204,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:203,columnNumber:9},this):r}}function gd(e,r){const a=t=>n.jsxDEV(tr,{...r,children:n.jsxDEV(e,{...t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:267,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:266,columnNumber:5},this);return a.displayName=`withLazyErrorBoundary(${e.displayName||e.name})`,a}class hd extends tr{static getDerivedStateFromError(r){return r.message.includes("Loading chunk")||r.message.includes("Loading CSS chunk")||r.message.includes("ChunkLoadError")||r.name==="ChunkLoadError"?{hasError:!0,error:new Error("Network error while loading component. Please check your connection and try again."),lastErrorTime:Date.now()}:super.getDerivedStateFromError(r)}}function pd(){const[e,r]=y.useState(0),a=y.useCallback(()=>{r(t=>t+1)},[]);return{errorRecoveryCount:e,triggerErrorRecovery:a}}function xd({children:e}){const r=(a,t)=>{console.error("Global lazy loading error:",a,t),typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{level:"error",tags:{globalErrorBoundary:!0,lazyLoading:!0}})};return n.jsxDEV(tr,{onError:r,componentName:"Application",maxRetries:1,showRetryButton:!0,fallback:n.jsxDEV("div",{className:"global-error-fallback",children:[n.jsxDEV("h1",{children:"Application Error"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:365,columnNumber:11},this),n.jsxDEV("p",{children:"Something went wrong with the application. Please refresh the page."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:366,columnNumber:11},this),n.jsxDEV("button",{onClick:()=>window.location.reload(),children:"Refresh Page"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:369,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:364,columnNumber:9},this),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/ErrorBoundaryLazy.tsx",lineNumber:358,columnNumber:5},this)}const Nd=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/SafeAppWrapper.tsx",lineNumber:8,columnNumber:10},void 0),yd=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/SecurityProvider.tsx",lineNumber:10,columnNumber:10},void 0),vd=(e,r,a)=>{const t=y.memo(e,r);return a&&(t.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?o=>(y.useMemo(()=>{let s=0;return()=>++s},[])(),n.jsxDEV(t,{...o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:33,columnNumber:14},void 0)):t},_d=(e,r)=>y.memo(e,(a,t)=>r.every(o=>a[o]===t[o])),kd=y.memo(({children:e,compute:r,deps:a})=>{const t=y.useRef(a),o=y.useRef(r),i=y.useRef(void 0),s=y.useMemo(()=>{const l=a.length!==t.current.length||a.some((c,u)=>c!==t.current[u]),d=r!==o.current;if(l||d||i.current===void 0){let c;return process.env.NODE_ENV==="development"?(performance.now(),c=r(),performance.now()):c=r(),t.current=a,o.current=r,i.current=c,c}return i.current},[r,a]);return n.jsxDEV(n.Fragment,{children:e(s)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:95,columnNumber:12},void 0)}),wd=y.memo(({item:e,index:r,style:a,renderItem:t})=>n.jsxDEV("div",{style:a,children:t(e,r)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:109,columnNumber:12},void 0),(e,r)=>e.index===r.index&&e.item===r.item&&e.style.height===r.style.height&&e.style.top===r.style.top),Ed=y.memo(({condition:e,children:r,fallback:a=null})=>e?n.jsxDEV(n.Fragment,{children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:130,columnNumber:24},void 0):n.jsxDEV(n.Fragment,{children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:130,columnNumber:42},void 0)),Ud=({children:e,threshold:r=.1,rootMargin:a="50px",fallback:t=null})=>{const[o,i]=y.useState(!1),s=y.useRef(null);return y.useEffect(()=>{const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(i(!0),l.disconnect())},{threshold:r,rootMargin:a});return s.current&&l.observe(s.current),()=>l.disconnect()},[r,a]),n.jsxDEV("div",{ref:s,children:o?e:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:169,columnNumber:10},void 0)},jd=({children:e,maxRenderTime:r=16,onSlowRender:a})=>{const t=y.useRef(0);return y.useLayoutEffect(()=>{t.current=performance.now()}),y.useEffect(()=>{const o=performance.now()-t.current;o>r&&a?.(o)}),n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:197,columnNumber:10},void 0)},Cd=({children:e,batchSize:r=5,delay:a=0})=>{const[t,o]=y.useState(r);return y.useEffect(()=>{if(t<e.length){const i=setTimeout(()=>{o(s=>Math.min(s+r,e.length))},a);return()=>clearTimeout(i)}},[t,e.length,r,a]),n.jsxDEV(n.Fragment,{children:e.slice(0,t)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/optimized/MemoizedComponent.tsx",lineNumber:224,columnNumber:10},void 0)},Sd=({src:e,alt:r,placeholder:a,lowQualitySrc:t,aspectRatio:o="16/9",eager:i=!1,className:s="",...l})=>{const[d,c]=y.useState(!1),[u,b]=y.useState(i),[x,h]=y.useState(!1),g=y.useRef(null),p=y.useRef(null);y.useEffect(()=>{if(i){b(!0);return}return p.current=new IntersectionObserver(k=>{k.forEach(U=>{U.isIntersecting&&(b(!0),p.current&&g.current&&p.current.unobserve(g.current))})},{rootMargin:"50px",threshold:.01}),g.current&&p.current.observe(g.current),()=>{p.current&&p.current.disconnect()}},[i]);const N=()=>{c(!0)},j=()=>{h(!0)};return n.jsxDEV("div",{className:`relative overflow-hidden ${s}`,style:{aspectRatio:o},children:[t&&!d&&n.jsxDEV("img",{src:t,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:88,columnNumber:9},void 0),!t&&!d&&n.jsxDEV("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:98,columnNumber:9},void 0),u&&!x&&n.jsxDEV("img",{ref:g,src:e,alt:r,onLoad:N,onError:j,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,loading:i?"eager":"lazy",...l},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:106,columnNumber:9},void 0),x&&n.jsxDEV("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:n.jsxDEV("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[n.jsxDEV("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:130,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:124,columnNumber:13},void 0),n.jsxDEV("p",{className:"text-sm",children:"Failed to load image"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:137,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:123,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:122,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/core/OptimizedImage.tsx",lineNumber:82,columnNumber:5},void 0)},Vd=({icon:e,title:r,description:a,benefits:t,metrics:o,color:i="blue",isHighlight:s=!1,learnMoreUrl:l,cta:d,onClick:c,interactive:u=!1,borderColor:b=!1,className:x})=>{const h={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400",red:"text-red-600 dark:text-red-400",indigo:"text-indigo-600 dark:text-indigo-400",cyan:"text-cyan-600 dark:text-cyan-400",emerald:"text-emerald-600 dark:text-emerald-400"},g={green:"border-l-4 border-green-500",blue:"border-l-4 border-blue-500",purple:"border-l-4 border-purple-500",orange:"border-l-4 border-orange-500",red:"border-l-4 border-red-500",indigo:"border-l-4 border-indigo-500",cyan:"border-l-4 border-cyan-500",emerald:"border-l-4 border-emerald-500",pink:"border-l-4 border-pink-500",gray:"border-l-4 border-gray-500"},p={green:"bg-green-100 dark:bg-green-900/20",blue:"bg-blue-100 dark:bg-blue-900/20",purple:"bg-purple-100 dark:bg-purple-900/20",orange:"bg-orange-100 dark:bg-orange-900/20",red:"bg-red-100 dark:bg-red-900/20",indigo:"bg-indigo-100 dark:bg-indigo-900/20",cyan:"bg-cyan-100 dark:bg-cyan-900/20",emerald:"bg-emerald-100 dark:bg-emerald-900/20",pink:"bg-pink-100 dark:bg-pink-900/20",gray:"bg-gray-100 dark:bg-gray-900/20"},N=h[i],j=typeof e=="string",k=()=>n.jsxDEV(n.Fragment,{children:[j?n.jsxDEV("div",{className:"text-4xl mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:148,columnNumber:9},void 0):b?n.jsxDEV("div",{className:f("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",p[i],N),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:151,columnNumber:9},void 0):n.jsxDEV("div",{className:f("flex-shrink-0 mb-4",N),children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:165,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex-1",children:[n.jsxDEV("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:169,columnNumber:9},void 0),n.jsxDEV("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:172,columnNumber:9},void 0),d&&n.jsxDEV("div",{className:"mt-3 mb-4",children:d},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:176,columnNumber:17},void 0),t&&t.length>0&&n.jsxDEV("ul",{className:"space-y-2 mb-4",children:t.map((w,S)=>n.jsxDEV("li",{className:"flex items-start",children:[n.jsxDEV("div",{className:f("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${i}-500`)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:182,columnNumber:17},void 0),n.jsxDEV("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:w},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:188,columnNumber:17},void 0)]},S,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:181,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:179,columnNumber:11},void 0),o&&Object.keys(o).length>0&&n.jsxDEV("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(o).map(([w,S],E)=>n.jsxDEV("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[n.jsxDEV("div",{className:f("text-lg font-bold",N),children:S},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:203,columnNumber:17},void 0),n.jsxDEV("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:w},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:206,columnNumber:17},void 0)]},E,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:199,columnNumber:15},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:197,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:168,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:144,columnNumber:5},void 0),U=f("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",b&&g[i],(u||c)&&"cursor-pointer hover:scale-[1.02]",s?"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border",x),_=w=>{c&&("key"in w?(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),c()):c())};return l?n.jsxDEV("a",{href:l,className:f(U,"block group"),onClick:c?w=>{w.preventDefault(),_(w)}:void 0,children:n.jsxDEV(k,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:259,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:247,columnNumber:7},void 0):c?n.jsxDEV("div",{className:U,onClick:_,onKeyDown:_,role:"button",tabIndex:0,"aria-label":r,children:n.jsxDEV(k,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:275,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:267,columnNumber:7},void 0):n.jsxDEV("div",{className:U,children:n.jsxDEV(k,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:283,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureCard.tsx",lineNumber:282,columnNumber:5},void 0)},Ad=Z.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),Td=Z.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),Ld=Z.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}}),Id={success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},Md=({className:e,features:r,columns:a=3,spacing:t="md",cardVariant:o="default",cardAnimation:i="hover",iconSize:s="md",iconStyle:l="gradient",iconPosition:d="center",titleClass:c,descriptionClass:u,animate:b=!0,animationDelay:x=0,staggerDelay:h=100,onFeatureClick:g,defaultLinkText:p="Learn more"})=>{const N=(k,U)=>{if(l==="colorful"&&k.gradient)return{background:`linear-gradient(135deg, ${k.gradient.from}, ${k.gradient.to})`};if(l==="colorful"){const _=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],w=_[U%_.length];return{background:`linear-gradient(135deg, ${w.from}, ${w.to})`}}},j=(k,U)=>{const _=n.jsxDEV("div",{className:f(Td({variant:o,animation:i})),onClick:()=>g?.(k),role:g?"button":void 0,tabIndex:g?0:void 0,children:[k.badge&&n.jsxDEV("div",{className:"mb-4",children:n.jsxDEV("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Id[k.badge.variant||"default"]),children:k.badge.text},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:199,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:198,columnNumber:11},void 0),n.jsxDEV("div",{className:f(Ld({size:s,style:l,position:d})),style:N(k,U),children:n.jsxDEV("div",{className:f("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:k.icon},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:221,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:211,columnNumber:9},void 0),n.jsxDEV("h3",{className:f("text-xl font-bold text-gray-900 dark:text-white mb-4",c),children:k.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:234,columnNumber:9},void 0),n.jsxDEV("div",{className:f("text-gray-600 dark:text-gray-300 leading-relaxed",u),children:k.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:244,columnNumber:9},void 0),k.link&&n.jsxDEV("div",{className:"mt-6",children:n.jsxDEV("a",{href:k.link.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200",children:[k.link.text||p,n.jsxDEV("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:267,columnNumber:17},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:261,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:256,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:255,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:188,columnNumber:7},void 0);return n.jsxDEV("div",{children:_},k.id||U,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:280,columnNumber:12},void 0)};return n.jsxDEV("div",{className:f(Ad({columns:a,spacing:t}),e),children:r.map(j)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:284,columnNumber:5},void 0)},Fr=(e,r,a,t)=>({icon:e,title:r,description:a,...t}),Pd=e=>[Fr(n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:318,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:312,columnNumber:5},void 0),e?.passwordlessTitle||"Passwordless Security",e?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),Fr(n.jsxDEV("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:336,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/FeatureGrid.tsx",lineNumber:330,columnNumber:5},void 0),e?.encryptionTitle||"End-to-End Encryption",e?.encryptionDescription||"Your emails are encrypted and only you can read them.")],Od=({title:e,description:r,primaryButton:a,secondaryButton:t,gradient:o={from:"blue-600",to:"purple-600"},textColor:i="light",className:s="",size:l="lg"})=>{const c=(()=>{const p=o.via?`${o.from}-${o.via}-${o.to}`:`${o.from}-${o.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[p]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),u=i==="light"?"text-white":"text-gray-900 dark:text-gray-100",b={sm:"py-12",md:"py-16",lg:"py-20"},x={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},h={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},g=(p,N=!1)=>{const j=()=>p.variant==="primary"||N?"gradient":(p.variant==="secondary","outline"),k=n.jsxDEV(oe,{variant:j(),size:"lg",className:N?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:p.label},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:91,columnNumber:7},void 0);return p.external?n.jsxDEV("a",{href:p.href,target:"_blank",rel:"noopener noreferrer",children:k},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:106,columnNumber:9},void 0):n.jsxDEV(ur.Link,{to:p.href,children:k},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:112,columnNumber:12},void 0)};return n.jsxDEV("section",{className:`${c} ${b[l]} relative overflow-hidden ${s}`,children:[n.jsxDEV("div",{className:"absolute inset-0 bg-black/20"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:120,columnNumber:7},void 0),n.jsxDEV("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[n.jsxDEV("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:122,columnNumber:9},void 0),n.jsxDEV("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:123,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:121,columnNumber:7},void 0),n.jsxDEV("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsxDEV("h2",{className:`${x[l]} font-bold ${u} mb-6`,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:127,columnNumber:9},void 0),n.jsxDEV("p",{className:`${h[l]} ${u}/90 mb-8 max-w-2xl mx-auto`,children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:133,columnNumber:9},void 0),n.jsxDEV("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[g(a,!0),t&&g(t,!1)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:139,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:126,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/features/CTASection.tsx",lineNumber:116,columnNumber:5},void 0)},Dd={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},zd={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},Bd=({status:e,level:r,className:a=""})=>{const t=Dd[e],o=zd[r];return n.jsxDEV("div",{className:`inline-flex items-center gap-2 ${a}`,children:n.jsxDEV("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${t.color} ${t.textColor}`,children:[o,": ",t.label]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCStatusBadge.tsx",lineNumber:57,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCStatusBadge.tsx",lineNumber:56,columnNumber:5},void 0)},Wd=({accessToken:e,onComplete:r,onError:a,className:t=""})=>{const o=y.useRef(null),i=y.useRef(null);return y.useEffect(()=>{if(!e)return;const s=document.createElement("script");return s.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",s.async=!0,s.onload=()=>{if(o.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",d=>{}).on("idCheck.onApplicantSubmitted",d=>{r?.()}).on("idCheck.onError",d=>{console.error("SumsubWebSDK: Error",d),a?.(d)}).build();i.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),a?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!o.current,"snsWebSdk:",!!window.snsWebSdk)},s.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),a?.(l)},document.body.appendChild(s),()=>{document.body.contains(s)&&document.body.removeChild(s),i.current&&typeof i.current.destroy=="function"&&i.current.destroy()}},[e,r,a]),n.jsxDEV("div",{className:`sumsub-sdk-container ${t}`,children:n.jsxDEV("div",{ref:o,id:"sumsub-websdk-container"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/SumsubWebSDK.tsx",lineNumber:110,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/SumsubWebSDK.tsx",lineNumber:109,columnNumber:5},void 0)},Fd={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},qd=({level:e,price:r,features:a,isActive:t=!1,isVerified:o=!1,onSelect:i,className:s=""})=>{const l=Fd[e];return n.jsxDEV("div",{className:`
55
50
  relative border-2 rounded-lg p-6 transition-all
56
- ${a?l.activeColor:`${l.color} hover:border-gray-400`}
51
+ ${t?l.activeColor:`${l.color} hover:border-gray-400`}
57
52
  ${s}
58
- `,children:[i&&n.jsxDEV("div",{className:"absolute top-4 right-4",children:n.jsxDEV("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"✓ Verified"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:63,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:62,columnNumber:9},void 0),n.jsxDEV("h3",{className:"text-xl font-bold mb-2",children:l.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:69,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-gray-600 mb-4",children:l.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:70,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-3xl font-bold mb-4",children:[r,n.jsxDEV("span",{className:"text-sm font-normal text-gray-600",children:"/year"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:73,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:71,columnNumber:7},void 0),n.jsxDEV("ul",{className:"space-y-2 mb-6",children:t.map((c,u)=>n.jsxDEV("li",{className:"flex items-start gap-2",children:[n.jsxDEV("span",{className:"text-green-500 mt-0.5",children:"✓"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:79,columnNumber:13},void 0),n.jsxDEV("span",{className:"text-sm",children:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:80,columnNumber:13},void 0)]},u,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:78,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:76,columnNumber:7},void 0),o&&n.jsxDEV("button",{onClick:o,disabled:i,className:`
53
+ `,children:[o&&n.jsxDEV("div",{className:"absolute top-4 right-4",children:n.jsxDEV("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"✓ Verified"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:63,columnNumber:11},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:62,columnNumber:9},void 0),n.jsxDEV("h3",{className:"text-xl font-bold mb-2",children:l.title},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:69,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-gray-600 mb-4",children:l.description},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:70,columnNumber:7},void 0),n.jsxDEV("p",{className:"text-3xl font-bold mb-4",children:[r,n.jsxDEV("span",{className:"text-sm font-normal text-gray-600",children:"/year"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:73,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:71,columnNumber:7},void 0),n.jsxDEV("ul",{className:"space-y-2 mb-6",children:a.map((d,c)=>n.jsxDEV("li",{className:"flex items-start gap-2",children:[n.jsxDEV("span",{className:"text-green-500 mt-0.5",children:"✓"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:79,columnNumber:13},void 0),n.jsxDEV("span",{className:"text-sm",children:d},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:80,columnNumber:13},void 0)]},c,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:78,columnNumber:11},void 0))},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:76,columnNumber:7},void 0),i&&n.jsxDEV("button",{onClick:i,disabled:o,className:`
59
54
  w-full py-2 px-4 rounded font-medium transition-colors
60
- ${i?"bg-gray-200 text-gray-500 cursor-not-allowed":a?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
61
- `,children:i?"Verified":a?"Current Plan":"Select Plan"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:86,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:54,columnNumber:5},void 0)},um=({children:e,backgroundClassName:r="",contentClassName:t=""})=>n.jsxDEV("div",{className:r,children:n.jsxDEV("div",{className:t,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/StandardPageLayout.tsx",lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/StandardPageLayout.tsx",lineNumber:21,columnNumber:5},void 0),cm=({title:e,description:r})=>n.jsxDEV("div",{className:"mb-8",children:[n.jsxDEV("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:15,columnNumber:7},void 0),r&&n.jsxDEV("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:19,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:14,columnNumber:5},void 0),mm=({isSelected:e,onClick:r,icon:t,label:a,description:i,className:o=""})=>n.jsxDEV("div",{onClick:r,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${o}`,children:[e&&n.jsxDEV("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:38,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative z-10 flex items-start w-full",children:[t&&n.jsxDEV(t,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:44,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:`font-medium transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:53,columnNumber:11},void 0),i&&n.jsxDEV("div",{className:`text-xs mt-0.5 transition-colors ${e?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:63,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:52,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:42,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:32,columnNumber:5},void 0),dm=({masterTitle:e,masterSubtitle:r,backButtonText:t,masterContent:a,detailContent:i,detailTitle:o,mobileView:s="navigation",onBackToNavigation:l,masterClassName:c="",detailClassName:u="",detailTitleClassName:m="",masterWidth:b=320,stickyMaster:p=!0,stickyTopOffset:h=96,desktopGap:g=32,showMasterBackground:x=!0,enableAnimations:N=!0,animationDuration:U=300,animationRef:_})=>{const E=`gap-${Math.round(g/4)}`||"gap-8",j=F=>F?F.split("-")[0].trim():"Back",k=t?j(t):e?j(e):"Back",[C,w]=y.useState(!1),[S,v]=y.useState("auto"),T=y.useRef(null),P=y.useRef(null);y.useEffect(()=>(_&&(_.current={triggerTransition:F=>{if(!N){F();return}if(T.current){const ne=T.current.scrollHeight;v(ne)}w(!0),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{F(),setTimeout(()=>{if(T.current){const ne=T.current.scrollHeight;v(ne),setTimeout(()=>{v("auto"),w(!1)},U)}},50)},U/2)}}),()=>{P.current&&clearTimeout(P.current)}),[N,U,_]);const I=N?{height:S==="auto"?"auto":`${S}px`,transition:`height ${U}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},z=N?`${C?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",R=N?{transition:`opacity ${U}ms ease-in-out, transform ${U}ms ease-in-out`}:{};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:`md:hidden ${s==="navigation"?"block":"hidden"} flex-1`,children:n.jsxDEV("div",{className:x?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxDEV("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:280,columnNumber:15},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:284,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:279,columnNumber:13},void 0),n.jsxDEV("div",{className:c,children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:290,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:273,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:268,columnNumber:7},void 0),n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[n.jsxDEV("div",{className:`md:hidden ${s==="content"?"block":"hidden"}`,children:[s==="content"&&l&&n.jsxDEV("button",{onClick:l,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",k]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:303,columnNumber:13},void 0),n.jsxDEV("div",{ref:T,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${u}`,style:I,children:n.jsxDEV("div",{className:z,style:R,children:[o&&n.jsxDEV("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${m}`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:317,columnNumber:17},void 0),i]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:315,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:310,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:296,columnNumber:9},void 0),n.jsxDEV("div",{className:`hidden md:flex min-h-full ${E}`,style:{width:"100%"},children:[n.jsxDEV("aside",{className:"flex-shrink-0",style:{width:`${b}px`,minWidth:`${b}px`},children:n.jsxDEV("div",{className:p?"sticky":"",style:p?{top:`${h}px`}:void 0,children:[e&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:343,columnNumber:17},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:348,columnNumber:17},void 0),n.jsxDEV("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${p?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${c}`,children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:352,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:338,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:334,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${b+g}px)`},children:n.jsxDEV("div",{ref:T,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${u}`,style:I,children:n.jsxDEV("div",{className:z,style:R,children:[o&&n.jsxDEV("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${m}`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:376,columnNumber:19},void 0),i]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:374,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:369,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:365,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:329,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:294,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:266,columnNumber:5},void 0)},bm=({contentType:e,aiSummary:r,technicalComplexity:t="intermediate"})=>n.jsxDEV(Ea.Helmet,{children:[n.jsxDEV("meta",{name:"ai:content-type",content:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:28,columnNumber:7},void 0),n.jsxDEV("meta",{name:"ai:summary",content:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:29,columnNumber:7},void 0),n.jsxDEV("meta",{name:"ai:complexity",content:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:30,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:27,columnNumber:5},void 0),fm=({children:e,className:r,...t})=>n.jsxDEV("main",{className:r,...t,role:"main",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/SemanticHTML.tsx",lineNumber:24,columnNumber:3},void 0),gm=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AITrainingEnhancer.tsx",lineNumber:10,columnNumber:10},void 0),Ie=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Se=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),rn=e=>{const r=Ie(e.audience),t=Se(e.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:t.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:t.baseUrl,downloadUrl:`${t.baseUrl}/connect`,installUrl:`${t.baseUrl}/connect`,screenshot:`${t.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:r.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:t.appName,url:t.baseUrl},datePublished:"2024-01-01",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},nn=e=>{const r=Ie(e.keywords),t=Ie(e.audience),a=Se(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:a.appName,url:a.baseUrl,logo:{"@type":"ImageObject",url:`${a.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:a.appName,logo:{"@type":"ImageObject",url:`${a.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${a.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${a.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:r.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:t.join(", "),educationalLevel:e.complexity},educationalLevel:e.complexity,proficiencyLevel:e.complexity,learningResourceType:e.contentType,timeRequired:e.readingTime?`PT${e.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:e.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},hm=(e,r)=>{const t=Se(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(a=>({"@type":"Question",name:a.question,acceptedAnswer:{"@type":"Answer",text:a.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:t.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:a.category||"General"}))}},tn=e=>{const r=Se(e.branding);return{"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`${r.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${r.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${r.baseUrl}/document`,`${r.baseUrl}/web3-users`,`${r.baseUrl}/web3-projects`,`${r.baseUrl}/connect`],relatedLink:e.relatedTopics?.map(t=>`${r.baseUrl}/search?q=${encodeURIComponent(t)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":r.baseUrl,name:r.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${r.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},Ht=e=>{const r=Ie(e.keywords),t=Se(e.branding);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`${t.baseUrl}${location.pathname}`,"og:image":`${t.baseUrl}/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - ${t.appName}`,"og:site_name":t.appName,"og:locale":"en_US","article:author":`${t.baseUrl}/about`,"article:section":e.category,"article:tag":r.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},Gt=e=>{const r=Se(e.branding);return{"twitter:card":"summary_large_image","twitter:site":r.twitterHandle||"","twitter:creator":r.twitterHandle||"","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`${r.baseUrl}/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - ${r.appName}`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}},Yt=e=>{const r=Ie(e.keywords),t=Ie(e.audience),a=Se(e.branding);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":t.join(","),"ai:keywords":r.join(","),"ai:reading-time":e.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":e.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${a.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},xm=e=>({structuredData:{product:rn(e),article:nn(e),aiOptimized:tn(e)},openGraph:Ht(e),twitterCard:Gt(e),aiMetaTags:Yt(e),jsonLD:[rn(e),nn(e),tn(e)]}),pm={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},Nm=e=>{const{level:r,text:t,className:a="",id:i,semanticContext:o="section"}=e,s=`h${r}`,l={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},c={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},u=[l[r],c[o],a].filter(Boolean).join(" "),m=i||t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return y.createElement(s,{id:m,className:u,"aria-level":r},t)},de={pageTitle:(e,r)=>({level:1,text:e,className:r,semanticContext:"page-title"}),majorSection:(e,r)=>({level:2,text:e,className:r,semanticContext:"section"}),feature:(e,r)=>({level:3,text:e,className:r,semanticContext:"feature"}),benefit:(e,r)=>({level:3,text:e,className:r,semanticContext:"benefit"}),step:(e,r,t)=>({level:3,text:r?`Step ${r}: ${e}`:e,className:t,semanticContext:"step"}),subFeature:(e,r)=>({level:4,text:e,className:r,semanticContext:"feature"})},ym=e=>{const r=[],t=[],a=e.filter(i=>i.level===1).length;a===0?r.push("Missing H1 tag - every page should have exactly one H1"):a>1&&r.push(`Multiple H1 tags found (${a}) - use only one H1 per page`);for(let i=1;i<e.length;i++){const o=e[i],s=e[i-1];o.level>s.level+1&&r.push(`Heading level jump from H${s.level} to H${o.level} - avoid skipping levels`)}return e.forEach((i,o)=>{i.text.length<3&&r.push(`Heading ${o+1} is too short - use descriptive text`),i.text.length>70&&t.push(`Heading "${i.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:r.length===0,errors:r,suggestions:t}},vm={walletConnection:de.pageTitle("Connect Your Web3 Wallet"),emailBenefits:de.majorSection("Why Choose Web3 Email?"),securityFeature:de.feature("Secure & Private"),ensIntegration:de.feature("ENS Domain Support"),multiChain:de.feature("Multi-Chain Compatibility"),passwordless:de.benefit("No Passwords Required"),setupStep1:de.step("Connect Your Wallet",1),setupStep2:de.step("Verify Your Identity",2),setupStep3:de.step("Access Your Emails",3)},jm=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],_m=e=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:e.difficulty,learningResourceType:"Technical Documentation",timeRequired:e.estimatedTime?`PT${e.estimatedTime}M`:void 0,teaches:e.learningObjectives,requires:e.prerequisites,about:{"@type":"Thing",name:e.domain,category:e.category,subcategory:e.subcategory},keywords:e.concepts,applicationExample:e.practicalApplications,isRelatedTo:e.relatedConcepts}),km=e=>{const r={nodes:e.map(t=>({id:t.term,label:t.term,category:t.category,definition:t.definition})),edges:[]};return e.forEach(t=>{t.relatedTerms?.forEach(a=>{e.find(o=>o.term===a)&&r.edges.push({source:t.term,target:a,relationship:"related_to"})}),t.synonyms?.forEach(a=>{r.edges.push({source:t.term,target:a,relationship:"synonym_of"})})}),r},wm=e=>{const r=[];return e.examples?.forEach(t=>{r.push({text:t,label:e.term,type:"positive",confidence:1})}),e.context&&r.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),r.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),r},Em=e=>{const r=[];return e.forEach(t=>{r.push({question:`What is ${t.term}?`,answer:t.definition,category:t.category,difficulty:"basic"}),t.context&&r.push({question:`How does ${t.term} work?`,answer:t.context,category:t.category,difficulty:"intermediate"}),t.examples&&t.examples.length>0&&r.push({question:`What are examples of ${t.term}?`,answer:t.examples.join(", "),category:t.category,difficulty:"basic"}),t.relatedTerms&&t.relatedTerms.length>0&&r.push({question:`What is ${t.term} related to?`,answer:`${t.term} is related to ${t.relatedTerms.join(", ")}`,category:t.category,difficulty:"intermediate"})}),r},Um={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Dm=({children:e,appName:r,appUrl:t,apiUrl:a})=>(y.useEffect(()=>{const i=()=>{[].forEach(g=>{const x=document.createElement("link");x.rel="preload",x.href=g.href,x.as=g.as,g.type&&(x.type=g.type),g.crossorigin&&(x.crossOrigin=""),document.head.appendChild(x)})},o=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(x=>{x.fetchPriority="high"});const g=document.querySelector("[data-hero]");if(g){const x=g.getAttribute("data-bg-image");if(x){const N=document.createElement("link");N.rel="preload",N.href=x,N.as="image",document.head.appendChild(N)}}},s=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(x=>{const N=x;N.naturalWidth&&N.naturalHeight&&(N.width=N.naturalWidth,N.height=N.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(x=>{x.getAttribute("style")?.includes("min-height")||(x.style.minHeight="200px")})},l=()=>{const h=()=>{document.querySelectorAll("script[data-defer]").forEach(N=>{N.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{h()}):setTimeout(h,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(N=>{document.addEventListener(N,()=>{},{passive:!0})})})()},c=()=>{},u=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...a?[{rel:"dns-prefetch",href:`//${a.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...a?[{rel:"preconnect",href:a}]:[]].forEach(g=>{const x=document.createElement("link");x.rel=g.rel,x.href=g.href,g.crossorigin&&(x.crossOrigin=""),document.head.appendChild(x)})},m=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(g=>{g.loading="lazy"}),"IntersectionObserver"in window){const g=new IntersectionObserver(N=>{N.forEach(U=>{if(U.isIntersecting){const _=U.target;_.dataset.src&&(_.src=_.dataset.src,_.removeAttribute("data-src")),g.unobserve(_)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(N=>g.observe(N))}},b=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:N,content:U})=>{if(!document.querySelector(`meta[name="${N}"]`)){const _=document.createElement("meta");_.name=N,_.content=U,document.head.appendChild(_)}});const g={"@context":"https://schema.org","@type":"WebApplication",name:r,description:"Web3 email platform using blockchain wallet authentication",url:t,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},x=document.createElement("script");x.type="application/ld+json",x.textContent=JSON.stringify(g),document.head.appendChild(x)},p=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(g=>{const x=g.cloneNode(!0);x.rel="preload",x.as="style",x.onload=()=>{x.onload=null,x.rel="stylesheet"},document.head.appendChild(x),g.remove()})};return i(),o(),s(),l(),u(),m(),b(),p(),setTimeout(c,2e3),()=>{}},[a,r,t]),n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/PerformanceOptimizer.tsx",lineNumber:291,columnNumber:10},void 0)),Cm=()=>(y.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(c=>{c.forEach(u=>{if(u.isIntersecting){const m=u.target;m.dataset.src&&(m.src=m.dataset.src,m.removeAttribute("data-src"),l.unobserve(m))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(c=>{l.observe(c)})}const i=()=>{["/connect","/mail","/settings"].forEach(c=>{const u=document.createElement("link");u.rel="prefetch",u.href=c,document.head.appendChild(u)})},o=()=>{if(!document.querySelector("script[data-wallet-detection]")){const l=document.createElement("script");l.dataset.walletDetection="true",l.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(l)}},s=()=>{document.querySelectorAll("img[data-hero]").forEach(l=>{const c=l;c.loading="eager","fetchPriority"in c&&(c.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const c=l;c.loading="lazy","fetchPriority"in c&&(c.fetchPriority="low")})};requestIdleCallback(()=>{i(),o(),s()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const i=new PerformanceObserver(s=>{const l=s.getEntries(),c=l[l.length-1];c&&c.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{i.observe({entryTypes:["largest-contentful-paint"]})}catch{}const o=new PerformanceObserver(s=>{let l=0;for(const c of s.getEntries())c.hadRecentInput||(l+=c.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(c=>{const u=c;u.style.aspectRatio="16/9"})});try{o.observe({entryTypes:["layout-shift"]})}catch{}}},t=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const i=navigator.connection;if(i){const o=i.effectiveType;o==="slow-2g"||o==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(s=>{s.getAttribute("data-critical")||s.remove()}),localStorage.setItem("use-low-quality-images","true")):o==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{e(),r(),t()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Sm=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/OptimizedRoutePreloader.tsx",lineNumber:10,columnNumber:10},void 0),Kt={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class Vm{constructor(){this.cache=new Map}set(r,t,a){if(this.cache.size>=a.maxSize){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(r,{data:t,timestamp:Date.now(),isStale:!1})}get(r,t){const a=this.cache.get(r);if(!a)return null;const o=Date.now()-a.timestamp>t.duration;return o&&!t.staleWhileRevalidate?(this.cache.delete(r),null):{data:a.data,isStale:o}}invalidate(r){for(const t of this.cache.keys())t.includes(r)&&this.cache.delete(t)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((r,t)=>r+JSON.stringify(t).length*2,0)}}const Pe=new Vm,Ve=new Map,Zt=async(e,r,t="messages")=>{const a=Kt[t],i=Pe.get(e,a);if(i&&!i.isStale)return i.data;const o=Ve.get(e);if(o)return o;if(i&&i.isStale&&a.staleWhileRevalidate){const l=r().then(c=>(Pe.set(e,c,a),Ve.delete(e),c)).catch(c=>{throw Ve.delete(e),c});return Ve.set(e,l),i.data}const s=r().then(l=>(Pe.set(e,l,a),Ve.delete(e),l)).catch(l=>{throw Ve.delete(e),l});return Ve.set(e,s),s};class Am{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,t){return new Promise((a,i)=>{this.queue.push({key:r,fetcher:t,resolve:a,reject:i}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const r=[...this.queue];this.queue.length=0,this.timer=null;const t=this.groupRequests(r);for(const a of t)await Promise.allSettled(a.map(async i=>{try{const o=await i.fetcher();i.resolve(o)}catch(o){i.reject(o)}}))}groupRequests(r){const t=[];for(let i=0;i<r.length;i+=5)t.push(r.slice(i,i+5));return t}}const Tm=new Am;class Lm{constructor(r,t={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=r,this.defaultHeaders=t}addRequestInterceptor(r){this.requestInterceptors.push(r)}addResponseInterceptor(r){this.responseInterceptors.push(r)}async request(r,t={},a,i="messages"){const o=`${this.baseURL}${r}`,s=a||`${t.method||"GET"}:${o}`,l=async()=>{let c={...t,headers:{...this.defaultHeaders,...t.headers}};for(const m of this.requestInterceptors)c=m(c);let u=await fetch(o,c);for(const m of this.responseInterceptors)u=await m(u);if(!u.ok)throw new Error(`API Error: ${u.status} ${u.statusText}`);return u.json()};return t.method==="GET"&&this.shouldBatch(r)?Tm.add(s,l):Zt(s,l,i)}shouldBatch(r){return r.includes("/messages/")&&!r.includes("/messages?")}async get(r,t){return this.request(r,{method:"GET"},void 0,t)}async post(r,t){return this.request(r,{method:"POST",body:JSON.stringify(t)})}async put(r,t){return this.request(r,{method:"PUT",body:JSON.stringify(t)})}async delete(r){return this.request(r,{method:"DELETE"})}}const Im=async(e,r=3,t=1e3)=>{let a;for(let i=0;i<=r;i++)try{return await e()}catch(o){if(a=o,i===r)throw a;const s=t*Math.pow(2,i)+Math.random()*1e3;await new Promise(l=>setTimeout(l,s))}throw a};class Pm{constructor(){this.abortController=new AbortController}async request(r,t={}){const a=await fetch(r,{...t,signal:this.abortController.signal});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);return a.json()}cancel(){this.abortController.abort()}}const Mm={invalidate:e=>Pe.invalidate(e),clear:()=>Pe.clear(),getStats:()=>Pe.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(r=>r()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(r=>r()))}):setTimeout(async()=>{await Promise.allSettled(e.map(r=>r()))},100)}};function Qt(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(t=>e.includes(t))}function Xt(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Jt(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function ea(){return Xt()?"localhost":Qt()?"wallet-browser":Jt()?"network":"production"}function Om(){const e=ea();return e==="localhost"||e==="wallet-browser"}function Rm(e){}function ra(){return typeof window<"u"}function zm(){return typeof window<"u"}function Bm(e,r){if(ra())e();else return r}const an=e=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...e?.apiUrls||[],...e?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),Wm=an(),na=e=>{const r=an(e);return Object.entries(r).map(([t,a])=>`${t} ${a.join(" ")}`).join("; ")},ta=e=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":na(e)}),Fm=ta(),qm={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},$m=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},Hm={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},ge=new Map,Ze=new Map,xr=new Set;let Qe="medium",on=!1;function Gm(){if("connection"in navigator){const t=navigator.connection;t&&(Qe=t.effectiveType==="4g"?"fast":t.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;on=e&&e<4||r&&r<4}Gm();function Ym(e,r,t={}){const{retries:a=3,timeout:i=1e4,fallback:o,preloadCondition:s,cacheStrategy:l="memory",priority:c="medium",onLoad:u,onError:m}=t;if(ge.has(r))return ge.get(r).component;const b=y.lazy(async()=>{const h=performance.now();if(Ze.has(r))return Ze.get(r).then(x=>({default:x}));const g=Km(e,a,i);Ze.set(r,g.then(x=>x.default));try{const x=await g,N=performance.now()-h;if(l!=="none"){const U={component:x.default,timestamp:Date.now(),loadTime:N};if(ge.set(r,U),l==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:U.timestamp,loadTime:N}))}catch{}}return Ze.delete(r),u?.(x.default),x}catch(x){throw Ze.delete(r),m?.(x),x}}),p=h=>{const[g,x]=y.useState(!0);y.useEffect(()=>{if(s&&!ge.has(r)&&s()&&!xr.has(r)){xr.add(r);const _=Zm(c,Qe);setTimeout(()=>{e().catch(()=>{})},_)}},[]);const N=o||n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:176,columnNumber:9},this),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:177,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:175,columnNumber:7},this);return!g&&on&&Qe==="slow"?n.jsxDEV("div",{className:"lazy-placeholder",children:n.jsxDEV("button",{onClick:()=>x(!0),className:"load-component-btn",children:["Load ",r]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:186,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:185,columnNumber:9},this):n.jsxDEV(y.Suspense,{fallback:N,children:n.jsxDEV(b,{...h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:198,columnNumber:9},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:197,columnNumber:7},this)};return p.displayName=`AdvancedLazy(${r})`,p}async function Km(e,r,t){let a;for(let i=0;i<r;i++)try{const o=new Promise((l,c)=>{setTimeout(()=>c(new Error("Load timeout")),t)});return await Promise.race([e(),o])}catch(o){if(a=o,i<r-1){const s=Math.pow(2,i)*1e3,l=Math.random()*1e3;await new Promise(c=>setTimeout(c,s+l))}}throw a}function Zm(e,r){const t={critical:0,high:500,medium:2e3,low:5e3},a={fast:.5,medium:1,slow:2},i=t[e]||2e3,o=a[r]||1;return i*o}const nr=class nr{static registerRoute(r,t){this.routeMap.set(r,t),this.routeUsageStats.set(r,0)}static setCurrentRoute(r){this.currentRoute=r;const t=this.routeUsageStats.get(r)||0;this.routeUsageStats.set(r,t+1),this.preloadLikelyRoutes(r)}static preloadLikelyRoutes(r){this.getRouteTransitionProbability(r).forEach(({route:a,probability:i})=>{i>.3&&!ge.has(a)&&setTimeout(()=>{this.routeMap.get(a)},Qe==="fast"?1e3:3e3)})}static getRouteTransitionProbability(r){const t=[];switch(r){case"/":t.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":t.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":t.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:t.push({route:"/",probability:.1})}return t}static getStats(){return{routeCount:this.routeMap.size,cacheSize:ge.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};nr.routeMap=new Map,nr.routeUsageStats=new Map,nr.currentRoute="";let sn=nr;const Qm=({src:e,alt:r,className:t,placeholder:a,priority:i="medium"})=>{const[o,s]=y.useState(!1),[l,c]=y.useState(!1),u=y.useRef(null);y.useEffect(()=>{if(!u.current)return;if(i==="high"){c(!0);return}const b=new IntersectionObserver(([p])=>{p.isIntersecting&&(c(!0),b.unobserve(p.target))},{rootMargin:i==="low"?"100px":"200px",threshold:.1});return b.observe(u.current),()=>b.disconnect()},[i]);const m=()=>{s(!0)};return n.jsxDEV("div",{className:`lazy-image-container ${t}`,children:[n.jsxDEV("img",{ref:u,src:l?e:a||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${o?"opacity-100":"opacity-0"}`,onLoad:m,loading:i==="high"?"eager":"lazy",fetchPriority:i==="high"?"high":"low"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:401,columnNumber:7},void 0),!o&&l&&n.jsxDEV("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:416,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:400,columnNumber:5},void 0)};function Xm(){ge.clear(),xr.clear()}function Jm(){return{cachedComponents:ge.size,preloadQueue:xr.size,networkSpeed:Qe,isLowEndDevice:on,cacheEntries:Array.from(ge.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const ed=({message:e})=>n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:9,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:10,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:8,columnNumber:3},void 0),rd=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>n.jsxDEV("div",{className:"flex justify-center items-center p-4",children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:35,columnNumber:9},void 0);case"skeleton":return()=>n.jsxDEV("div",{className:"animate-pulse",children:[n.jsxDEV("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:40,columnNumber:11},void 0),n.jsxDEV("div",{className:"h-4 bg-gray-200 rounded w-1/2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:41,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:39,columnNumber:9},void 0);case"default":default:return()=>n.jsxDEV(ed,{message:"Loading component..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:46,columnNumber:20},void 0)}},aa=(e,r="default",t=3)=>{const a=y.lazy(async()=>{let o=null;for(let s=0;s<t;s++)try{return await e()}catch(l){o=l,s<t-1&&await new Promise(c=>setTimeout(c,Math.pow(2,s)*1e3))}throw o}),i=rd(r);return o=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(i,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:83,columnNumber:25},void 0),children:n.jsxDEV(a,{...o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:84,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:83,columnNumber:5},void 0)},nd=async e=>{try{await e()}catch{}},td=e=>{const r={};return Object.entries(e).forEach(([t,a])=>{r[t]=aa(a,"skeleton")}),r},ad=e=>e,ia={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},tr=class tr{static add(r,t){this.preloadedComponents.has(r)||(this.preloadQueue.push({name:r,loader:t}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(r){return this.preloadedComponents.has(r)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};tr.preloadedComponents=new Set,tr.preloadQueue=[],tr.isPreloading=!1;let ln=tr;const id=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{ia.secondary.forEach(e=>{})})},oa=({message:e})=>n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:10,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:11,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:9,columnNumber:3},void 0),Xe=new Map;function od(e,r){const{condition:t,fallback:a,retries:i=3,timeout:o=1e4,priority:s="medium",cacheKey:l=`conditional-${Math.random()}`}=r,c=u=>{const[m,b]=y.useState(!1),[p,h]=y.useState(null);return y.useEffect(()=>{const N=setTimeout(async()=>{const U=Xe.get(l);if(U&&U.isValid&&Date.now()-U.lastCheck<3e5)try{if(await U.condition()){h(()=>U.component),b(!0);return}}catch{}try{if(await t()){const E=await ud(e,i,o);Xe.set(l,{component:E.default,condition:t,lastCheck:Date.now(),isValid:!0}),h(()=>E.default),b(!0)}}catch{}},s==="high"?0:s==="medium"?100:500);return()=>clearTimeout(N)},[]),m?p?n.jsxDEV(y.Suspense,{fallback:a||n.jsxDEV(oa,{message:"Loading component..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:122,columnNumber:31},this),children:n.jsxDEV(p,{...u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:124,columnNumber:9},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:121,columnNumber:7},this):null:a||n.jsxDEV(oa,{message:"Checking conditions..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:113,columnNumber:26},this)};return c.displayName=`ConditionalLazy(${l})`,c}const sd={},ld={};async function ud(e,r,t){let a;for(let i=0;i<r;i++)try{const o=new Promise((s,l)=>{setTimeout(()=>l(new Error("Import timeout")),t)});return await Promise.race([e(),o])}catch(o){if(a=o,i<r-1){const s=Math.pow(2,i)*1e3;await new Promise(l=>setTimeout(l,s))}}throw a}function cd(){Xe.clear()}function md(){return{cachedComponents:Xe.size,cacheEntries:Array.from(Xe.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const sa=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class dd{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const t=navigator.connection;if(t){const a=t.effectiveType;a==="4g"?this.networkSpeedEstimate="fast":a==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const r=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const t=performance.now()-r;t<100?this.networkSpeedEstimate="fast":t<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const r=navigator.deviceMemory,t=navigator.hardwareConcurrency;r&&r<4&&(this.isLowEndDevice=!0),t&&t<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(a=>{a.level&&a.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let r;const t=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(r),r=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(a=>{document.addEventListener(a,t,{passive:!0})})}shouldPreload(r){return this.networkSpeedEstimate==="slow"&&r.size>50||this.isLowEndDevice&&r.size>30?!1:r.config.condition()}async preloadChunk(r){if(!this.preloaded.has(r.name))try{if(document.querySelectorAll('script[src*="'+r.name+'"]').length===0&&document.querySelectorAll('link[href*="'+r.name+'"]').length>0)return;const a=document.createElement("link");a.rel="modulepreload",a.href=r.path.replace("*",this.getChunkHash(r.name)),a.crossOrigin="","fetchPriority"in a&&(a.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(a),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const t=Array.from(document.querySelectorAll("script[src]"));for(const a of t){const i=a.src;if(i.includes(r)){const o=i.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(o)return o[1]}}return"unknown"}async schedulePreload(r){const t=r.config;return t.delay&&await new Promise(a=>setTimeout(a,t.delay)),t.onIdle&&"requestIdleCallback"in window?new Promise(a=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(a)})}):this.preloadChunk(r)}initializePreloading(){sa.sort((t,a)=>{const i={critical:0,high:1,medium:2,low:3};return i[t.config.priority]-i[a.config.priority]}).forEach(t=>{this.shouldPreload(t)&&(t.config.priority==="critical"?this.preloadChunk(t):this.schedulePreload(t),t.config.onHover&&this.setupHoverPreloading(t),t.config.onScroll&&this.setupScrollPreloading(t,t.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(r){document.querySelectorAll("[data-preload-on-hover]").forEach(a=>{let i=!1;a.addEventListener("mouseenter",()=>{!i&&this.userActivityScore>30&&(this.preloadChunk(r),i=!0)},{passive:!0})})}setupScrollPreloading(r,t){let a=!1;const i=()=>{if(a)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=t&&(this.preloadChunk(r),a=!0,window.removeEventListener("scroll",i))};window.addEventListener("scroll",i,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&sa.filter(t=>t.config.priority==="medium"&&this.shouldPreload(t)).forEach(t=>{Math.random()>.5&&this.schedulePreload(t)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let Je=null;function bd(){Je||(Je=new dd,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Je?.initializePreloading()}):Je.initializePreloading())}function fd(){return Je?.getPreloadingStats()}function gd(e){const r={"ai-content-type":e.contentType,"ai-primary-topic":e.primaryTopic,"ai-complexity-level":e.complexityLevel,"ai-content-purpose":e.contentPurpose,"ai-industry-vertical":e.industryVertical,"ai-semantic-keywords":e.semanticKeywords.join(","),"ai-target-audience":e.targetAudience.join(","),"ai-technical-tags":e.technicalTags.join(","),"ai-user-intent":e.userIntent.join(","),"ai-conversion-goals":e.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return e.contentType==="governance-page"&&(r["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",r["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",r["ai-participation-boost"]="85%",r["ai-treasury-management"]="enabled"),r}function la(e){const r={"@context":"https://schema.org","@type":pd(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(t=>({"@type":"Thing",name:t})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...r,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:r}function hd(e,r){return r.map(t=>({type:"related-content",target:t.url,strength:t.relevance}))}function ua(e){const r=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],t=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...r,...t]:r}function ca(e){const r=["web3-infrastructure","email-technology","blockchain-applications"],t=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...r,...t]:r}function xd(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:la(e),entityRecognition:ua(e),topicClustering:ca(e),contentRelationships:r?.contentRelationships||[],...r}}function pd(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function Nd(e){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${e}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${e} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const yd={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},vd=({message:e,className:r})=>n.jsxDEV("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:13,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:14,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:12,columnNumber:3},void 0),un=new Map,er=new Set;function cn(){const e=[];return!!window.ethereum?.isMetaMask&&(er.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(er.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(er.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((i,o)=>i.priority-o.priority)}function mn(e){const r=`wallet-${e.toLowerCase()}`;if(un.has(r))return un.get(r);const t=()=>Promise.resolve({default:()=>y.createElement("div",{},`${e} Provider Placeholder`)}),a=y.lazy(t),i=o=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(vd,{message:`Loading ${e} wallet...`,className:"wallet-loading"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:102,columnNumber:9},this),children:n.jsxDEV(a,{...o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:108,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:100,columnNumber:5},this);return i.displayName=`Lazy${e}Provider`,un.set(r,i),i}function jd({children:e}){const r=cn();return r.filter(t=>t.priority<=2&&t.detected).forEach(t=>{setTimeout(()=>{},1e3)}),n.jsxDEV(n.Fragment,{children:[r.map(t=>{const a=mn(t.name);return n.jsxDEV(a,{},t.name,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:141,columnNumber:16},this)}),e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:138,columnNumber:5},this)}const gn=class gn{static preloadWallet(r){const t=r.toLowerCase();this.preloadedWallets.has(t)||(this.preloadedWallets.add(t),setTimeout(()=>{mn(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((t,a)=>{setTimeout(()=>{this.preloadWallet(t)},a*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};gn.preloadedWallets=new Set;let rr=gn;function _d(){return{availableWallets:cn(),preloadWallet:a=>{rr.preloadWallet(a)},getDetectedWallets:()=>Array.from(er),hasWallet:a=>er.has(a.toLowerCase())}}function kd({walletName:e,onConnect:r,disabled:t=!1}){const a=()=>{rr.preloadWallet(e),setTimeout(r,100)};return n.jsxDEV("button",{onClick:a,disabled:t,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:228,columnNumber:5},this)}class wd{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(o=>{for(const s of o.getEntries())s.name==="first-contentful-paint"&&(this.observedMetrics.fcp=s.startTime,this.optimizeBasedOnFCP(s.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(o=>{for(const s of o.getEntries())this.observedMetrics.lcp=s.startTime,this.optimizeBasedOnLCP(s.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let a=0;new PerformanceObserver(o=>{for(const s of o.getEntries())s.hadRecentInput||(a+=s.value);this.observedMetrics.cls=a}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const r=performance.getEntriesByType("navigation")[0];r&&(this.observedMetrics.ttfb=r.responseStart-r.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(r){r>2e3?this.applyEmergencyOptimizations():r>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(r){r>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(r){r>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(a=>{a.loading="lazy",a.style.display="none",setTimeout(()=>{a.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(a=>{a.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(t=>{this.preloadResource(t,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(a=>{a instanceof HTMLImageElement&&(a.fetchPriority="high",a.loading="eager")});const t=document.querySelector("img[data-hero]")?.getAttribute("src");t&&this.preloadResource(t,"image")}enableAggressiveCaching(){const r=document.createElement("meta");r.httpEquiv="Cache-Control",r.content="public, max-age=31536000, immutable",document.head.appendChild(r)}preloadResource(r,t){if(document.querySelector(`link[href*="${r}"]`))return;const i=document.createElement("link");switch(i.rel="preload",i.href=r,t){case"script":i.as="script";break;case"style":i.as="style";break;case"font":i.as="font",i.type="font/woff2",i.crossOrigin="";break;case"image":i.as="image";break}document.head.appendChild(i)}optimizeCriticalPath(){this.criticalResources.filter(r=>r.priority==="critical"&&r.preload).forEach(r=>{this.preloadResource(r.url,r.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const r=document.querySelector('link[rel="stylesheet"][data-critical]');r&&this.isSmallResource(r.getAttribute("href")||"")&&fetch(r.getAttribute("href")||"").then(t=>t.text()).then(t=>{if(t.length<1e4){const a=document.createElement("style");a.textContent=t,document.head.appendChild(a),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(t=>{const a=t.getAttribute("href")||"";if(!a.includes("display=swap")){const i=a.includes("?")?"&":"?";t.setAttribute("href",`${a}${i}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(t=>{const a=t.cloneNode(!0);a.rel="preload",a.as="style",a.onload=()=>{a.onload=null,a.rel="stylesheet"};const i=document.createElement("noscript"),o=t.cloneNode(!0);i.appendChild(o),document.head.appendChild(a),document.head.appendChild(i),t.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const t=new IntersectionObserver(a=>{a.forEach(i=>{if(i.isIntersecting){const o=i.target;o.src=o.dataset.src||"",o.removeAttribute("data-src"),t.unobserve(o)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(a=>t.observe(a))}else r.forEach(t=>{const a=t;a.src=a.dataset.src||""})}isSmallResource(r){return r.includes("critical")||r.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let r=100;return this.observedMetrics.fcp>2e3?r-=20:this.observedMetrics.fcp>1500&&(r-=10),this.observedMetrics.lcp>2500?r-=25:this.observedMetrics.lcp>2e3&&(r-=15),this.observedMetrics.cls>.1?r-=15:this.observedMetrics.cls>.05&&(r-=8),this.observedMetrics.ttfb>600?r-=10:this.observedMetrics.ttfb>400&&(r-=5),Math.max(r,0)}}const pr={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,r,t)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,r,t);const a=performance.getEntriesByName(e);return a[a.length-1]?.duration||0}catch{return 0}return 0},getEntries:e=>typeof performance<"u"&&performance.getEntriesByName?e?performance.getEntriesByName(e):performance.getEntries():[],clearEntries:e=>{typeof performance<"u"&&(e?(performance.clearMeasures?.(e),performance.clearMarks?.(e)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},Ed=(e,r=[])=>{y.useEffect(()=>(pr.mark(`${e}-start`),()=>{pr.mark(`${e}-end`),pr.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},Ud=e=>{const r=y.useRef(e);return r.current=e,y.useCallback((...t)=>r.current(...t),[])},Dd=(e,r,t)=>{const a=y.useRef(r),i=y.useRef(void 0);return y.useMemo(()=>(t&&process.env.NODE_ENV==="development"&&r.some((o,s)=>o!==a.current[s]),a.current=r,i.current=e(),i.current),[e,t,r])},Nr=new Map,Cd=e=>{const r=Nr.get(e)||0;Nr.set(e,r+1),y.useEffect(()=>{process.env.NODE_ENV})},Sd=()=>Object.fromEntries(Nr),Vd=()=>Nr.clear(),Ad=e=>y.lazy(e),Td=(e=.1)=>{const[r,t]=y.useState(new Set),a=y.useRef(null);y.useEffect(()=>(a.current=new IntersectionObserver(o=>{o.forEach(s=>{if(s.isIntersecting){const l=s.target,c=l.dataset.src;c&&(l.src=c,l.onload=()=>{t(u=>new Set(u).add(c))},a.current?.unobserve(l))}})},{threshold:e}),()=>a.current?.disconnect()),[e]);const i=y.useCallback(o=>{o&&a.current&&a.current.observe(o)},[]);return{loadedImages:r,observeImage:i}},Ld=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},ma={},Id=e=>{ma[e.name]=e.value,process.env.NODE_ENV},Pd=()=>ma,Md=(e,r="script")=>{if(typeof document<"u"){const t=document.createElement("link");t.rel="prefetch",t.href=e,t.as=r,document.head.appendChild(t)}},Od=(e,r="script",t)=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="preload",a.href=e,a.as=r,t&&(a.crossOrigin="anonymous"),document.head.appendChild(a)}},Rd=e=>{const r=y.useRef(new Set),t=y.useRef(new Set),a=y.useCallback((o,s)=>{const l=setTimeout(()=>{r.current.delete(l),o()},s);return r.current.add(l),l},[]),i=y.useCallback((o,s)=>{const l=setInterval(o,s);return t.current.add(l),l},[]);return y.useEffect(()=>{const o=r.current,s=t.current;return()=>{o.forEach(l=>clearTimeout(l)),s.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:a,createInterval:i}},he={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>he.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${he.maxFCP}ms)`),e.LCP&&e.LCP>he.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${he.maxLCP}ms)`),e.FID&&e.FID>he.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${he.maxFID}ms)`),e.CLS&&e.CLS>he.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${he.maxCLS})`),r}};class zd{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Fe.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),Fe.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),Fe.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),Fe.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),Fe.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(a=>{a.getEntries().forEach(o=>{if(o.entryType==="navigation"){const s=o;this.metrics.bundleLoadTime=s.loadEventEnd-s.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const t=new PerformanceObserver(a=>{a.getEntries().forEach(o=>{(o.name.includes(".js")||o.name.includes(".css"))&&this.trackResourceLoad(o.name,o.duration)})});try{t.observe({entryTypes:["resource"]}),this.observers.push(t)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const r=navigator;r.connection&&(this.metrics.connection=r.connection.effectiveType||r.connection.type),r.deviceMemory&&(this.metrics.deviceMemory=r.deviceMemory),r.hardwareConcurrency&&(this.metrics.hardwareConcurrency=r.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(r,t){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(r,t){const a=r.includes(".js"),i=r.includes(".css");if(a||i){const o=a?"JavaScript":"CSS";this.reportMetric(`${o} Load`,t)}}measureComponentRender(r,t){this.metrics.componentRenderTime=t,this.reportMetric(`Component Render (${r})`,t)}measureAPICall(r,t){this.metrics.apiResponseTime=t,this.reportMetric(`API Call (${r})`,t)}measureRouteChange(r,t){this.metrics.routeChangeTime=t,this.reportMetric(`Route Change (${r})`,t)}markStart(r){this.performanceMarks.set(r,performance.now())}markEnd(r){const t=this.performanceMarks.get(r);if(t){const a=performance.now()-t;this.reportMetric(`Mark (${r})`,a),this.performanceMarks.delete(r)}}trackRouteChange(r,t,a){typeof t=="string"?this.measureRouteChange(t,a||performance.now()):this.measureRouteChange(r,t)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let r=100;return this.metrics.LCP&&this.metrics.LCP>2500?r-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(r-=15),this.metrics.INP&&this.metrics.INP>200?r-=20:this.metrics.INP&&this.metrics.INP>100&&(r-=10),this.metrics.CLS&&this.metrics.CLS>.1?r-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(r-=8),Math.max(r,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(r=>r.disconnect()),this.observers=[]}}let yr=null;const Bd=e=>(yr||(yr=new zd(e)),yr),vr=()=>yr,da=e=>{const r=y.useRef(performance.now());y.useEffect(()=>{const t=performance.now()-r.current,a=vr();a&&a.measureComponentRender(e,t)},[e])},Wd=(e,r)=>y.forwardRef((t,a)=>(da(r),y.createElement(e,{...t,ref:a}))),Fd=async(e,r)=>{const t=performance.now(),a=await e(),i=performance.now()-t,o=vr();return o&&o.measureAPICall(r,i),a},ba={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},qd=(e,r=ba)=>{const t=[];return r.LCP&&e.LCP&&e.LCP>r.LCP&&t.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${r.LCP}ms)`),r.INP&&e.INP&&e.INP>r.INP&&t.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${r.INP}ms)`),r.CLS&&e.CLS&&e.CLS>r.CLS&&t.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${r.CLS})`),r.FCP&&e.FCP&&e.FCP>r.FCP&&t.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${r.FCP}ms)`),r.TTFB&&e.TTFB&&e.TTFB>r.TTFB&&t.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${r.TTFB}ms)`),{passed:t.length===0,violations:t}},$d=e=>{const r=e||vr()?.getMetrics()||{timestamp:Date.now()},t={timestamp:new Date().toISOString(),metrics:r,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:r.viewport,connection:r.connection,deviceMemory:r.deviceMemory,hardwareConcurrency:r.hardwareConcurrency}};return JSON.stringify(t,null,2)},Hd=(e={})=>{const{successMessage:r="",successDuration:t=3e3,errorPrefix:a="",onSuccess:i,onError:o}=e,[s,l]=y.useState(!1),[c,u]=y.useState(""),[m,b]=y.useState(""),p=y.useCallback(()=>{u(""),b("")},[]),h=y.useCallback(()=>{u("")},[]),g=y.useCallback(()=>{b("")},[]),x=y.useCallback(async N=>{l(!0),p();try{await N(),r&&(u(r),t>0&&setTimeout(()=>{u("")},t)),i&&i()}catch(U){const _=U instanceof Error?U.message:"An error occurred";throw b(a?`${a}: ${_}`:_),o&&U instanceof Error&&o(U),U}finally{l(!1)}},[r,t,a,i,o,p]);return{isSubmitting:s,successMessage:c,errorMessage:m,submit:x,clearMessages:p,clearSuccess:h,clearError:g}},Gd=(e=!1)=>{const[r,t]=y.useState(e),a=y.useCallback(()=>t(!0),[]),i=y.useCallback(()=>t(!1),[]),o=y.useCallback(()=>t(s=>!s),[]);return{value:r,setTrue:a,setFalse:i,toggle:o,setValue:t}},Yd=(e={})=>{const{successDuration:r=2e3,onSuccess:t,onError:a}=e,[i,o]=y.useState(null),s=y.useCallback(async u=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(u);else{const m=document.createElement("textarea");m.value=u,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();const b=document.execCommand("copy");if(document.body.removeChild(m),!b)throw new Error("Copy command was unsuccessful")}return o(u),t?.(u),setTimeout(()=>{o(null)},r),!0}catch(m){const b=m instanceof Error?m:new Error("Copy failed");return a?.(b),!1}},[r,t,a]),l=y.useCallback(u=>i===u,[i]),c=y.useCallback(()=>{o(null)},[]);return{copiedValue:i,copyToClipboard:s,isCopied:l,resetCopiedState:c}},Kd=(e={})=>{const{successDuration:r=2e3,onSuccess:t,onError:a}=e,[i,o]=y.useState({}),s=y.useCallback(async(u,m)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(u);else{const b=document.createElement("textarea");b.value=u,b.style.position="fixed",b.style.left="-999999px",b.style.top="-999999px",document.body.appendChild(b),b.focus(),b.select();const p=document.execCommand("copy");if(document.body.removeChild(b),!p)throw new Error("Copy command was unsuccessful")}return o(b=>({...b,[m]:!0})),t?.(u),setTimeout(()=>{o(b=>({...b,[m]:!1}))},r),!0}catch(b){const p=b instanceof Error?b:new Error("Copy failed");return a?.(p),!1}},[r,t,a]),l=y.useCallback(u=>i[u]||!1,[i]),c=y.useCallback(u=>{o(u?m=>({...m,[u]:!1}):{})},[]);return{copiedStates:i,copyToClipboard:s,isCopied:l,resetCopiedState:c}},Zd=e=>{if(e===0)return"0 Bytes";const r=1024,t=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(r)),i=Math.min(a,t.length-1);return parseFloat((e/Math.pow(r,i)).toFixed(2))+" "+t[i]},Qd=(e,r,t)=>{const a={bytes:0,kb:1,mb:2,gb:3,tb:4},i=1024,s=e*Math.pow(i,a[r])/Math.pow(i,a[t]);return Math.round(s*100)/100},Xd=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const t=parseFloat(r[1]),a=r[2].toLowerCase(),o={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[a];return o?Math.round(t*o):null},Jd=e=>e,e0=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},r0=e=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as="style",r.href=e,r.onload=()=>{r.rel="stylesheet"},document.head.appendChild(r);const t=document.createElement("noscript");t.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(t)},n0=e=>{const r={};return Object.entries(e).forEach(([t,a])=>{r[`--${t}`]=typeof a=="number"?`${a}px`:a}),r},t0={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},a0=(e,r=t0)=>{const[t,a]=y.useState("base");return y.useEffect(()=>{const i=()=>{const o=window.innerWidth;o>=r["2xl"]?a("2xl"):o>=r.xl?a("xl"):o>=r.lg?a("lg"):o>=r.md?a("md"):o>=r.sm?a("sm"):o>=r.xs?a("xs"):a("base")};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[r]),e[t]||e.base||{}},fa=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,i0=()=>{const[e,r]=y.useState(fa);return y.useEffect(()=>{const t=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{r(t.matches)};return t.addEventListener?t.addEventListener("change",a):t.addListener(a),()=>{t.removeEventListener?t.removeEventListener("change",a):t.removeListener(a)}},[]),e},o0=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},s0=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,l0=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},u0=(...e)=>e.filter(Boolean).join(" "),c0=e=>{const r={},t=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([a,i])=>{t.includes(a)&&(r[a]=i)}),r},m0=(e,r=[])=>{const[t,a]=y.useState(null),[i,o]=y.useState(!0);return y.useEffect(()=>{let s=!0;return e().then(l=>{s&&(a(l.default),o(!1))}),()=>{s=!1}},[e,...r]),{styles:t,loading:i}},d0=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),b0=(e="row",r="center",t="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:t,contain:"layout"}),f0=e=>{const[r,t]=y.useState(!1);return y.useEffect(()=>{const a=window.matchMedia(e);t(a.matches);const i=()=>t(a.matches);return a.addEventListener?a.addEventListener("change",i):a.addListener(i),()=>{a.removeEventListener?a.removeEventListener("change",i):a.removeListener(i)}},[e]),r},g0=(e,r)=>{const[t,a]=y.useState("light");return y.useEffect(()=>{const i=window.matchMedia("(prefers-color-scheme: dark)");a(i.matches?"dark":"light");const o=()=>{a(i.matches?"dark":"light")};return i.addEventListener?i.addEventListener("change",o):i.addListener(o),()=>{i.removeEventListener?i.removeEventListener("change",o):i.removeListener(o)}},[]),t==="dark"?r:e},h0=e=>{const r={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(r.title=e.title),e.width&&(r.width=e.width),e.height&&(r.height=e.height),e.sizes&&(r.sizes=e.sizes),e.srcSet&&(r.srcSet=e.srcSet),r.itemProp="image",r},x0=(e,r=[320,640,768,1024,1280,1920])=>r.map(t=>`${e.replace(/\{width\}/g,t.toString())} ${t}w`).join(", "),p0=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),N0=(e,r="openGraph")=>{const t={};return r==="openGraph"?(t["og:image"]=e.url,e.width&&(t["og:image:width"]=e.width.toString()),e.height&&(t["og:image:height"]=e.height.toString()),e.alt&&(t["og:image:alt"]=e.alt),e.type&&(t["og:image:type"]=e.type)):(t["twitter:image"]=e.url,e.alt&&(t["twitter:image:alt"]=e.alt)),t},y0=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(a=>{a.dataset.src&&(a.src=a.dataset.src)});return}const t=new IntersectionObserver(a=>{a.forEach(i=>{if(i.isIntersecting){const o=i.target;o.dataset.src&&(o.src=o.dataset.src,o.removeAttribute("data-src")),o.dataset.srcset&&(o.srcset=o.dataset.srcset,o.removeAttribute("data-srcset")),t.unobserve(o)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(a=>t.observe(a)),()=>{r.forEach(a=>t.unobserve(a))}},ga=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=r.onerror=function(){e(r.height===2)},r.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),ha=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),v0=async(e="jpg")=>{const[r,t]=await Promise.all([ga(),ha()]);return t?"avif":r?"webp":e},j0=(e,r,t,a)=>`
55
+ ${o?"bg-gray-200 text-gray-500 cursor-not-allowed":t?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
56
+ `,children:o?"Verified":t?"Current Plan":"Select Plan"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:86,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/kyc/KYCLevelCard.tsx",lineNumber:54,columnNumber:5},void 0)},$d=({children:e,backgroundClassName:r="",contentClassName:a=""})=>n.jsxDEV("div",{className:r,children:n.jsxDEV("div",{className:a,children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/StandardPageLayout.tsx",lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/StandardPageLayout.tsx",lineNumber:21,columnNumber:5},void 0),Hd=({title:e,description:r})=>n.jsxDEV("div",{className:"mb-8",children:[n.jsxDEV("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:15,columnNumber:7},void 0),r&&n.jsxDEV("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:19,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/PageHeader.tsx",lineNumber:14,columnNumber:5},void 0),Gd=({isSelected:e,onClick:r,icon:a,label:t,description:o,className:i=""})=>n.jsxDEV("div",{onClick:r,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${i}`,children:[e&&n.jsxDEV("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:38,columnNumber:9},void 0),n.jsxDEV("div",{className:"relative z-10 flex items-start w-full",children:[a&&n.jsxDEV(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:44,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",children:[n.jsxDEV("div",{className:`font-medium transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:53,columnNumber:11},void 0),o&&n.jsxDEV("div",{className:`text-xs mt-0.5 transition-colors ${e?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:o},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:63,columnNumber:13},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:52,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:42,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:32,columnNumber:5},void 0),Yd=({masterTitle:e,masterSubtitle:r,backButtonText:a,masterContent:t,detailContent:o,detailTitle:i,mobileView:s="navigation",onBackToNavigation:l,masterClassName:d="",detailClassName:c="",detailTitleClassName:u="",masterWidth:b=320,stickyMaster:x=!0,stickyTopOffset:h=96,desktopGap:g=32,showMasterBackground:p=!0,enableAnimations:N=!0,animationDuration:j=300,animationRef:k})=>{const U=`gap-${Math.round(g/4)}`||"gap-8",_=W=>W?W.split("-")[0].trim():"Back",w=a?_(a):e?_(e):"Back",[S,E]=y.useState(!1),[V,v]=y.useState("auto"),T=y.useRef(null),M=y.useRef(null);y.useEffect(()=>(k&&(k.current={triggerTransition:W=>{if(!N){W();return}if(T.current){const ae=T.current.scrollHeight;v(ae)}E(!0),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{W(),setTimeout(()=>{if(T.current){const ae=T.current.scrollHeight;v(ae),setTimeout(()=>{v("auto"),E(!1)},j)}},50)},j/2)}}),()=>{M.current&&clearTimeout(M.current)}),[N,j,k]);const I=N?{height:V==="auto"?"auto":`${V}px`,transition:`height ${j}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},z=N?`${S?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",D=N?{transition:`opacity ${j}ms ease-in-out, transform ${j}ms ease-in-out`}:{};return n.jsxDEV(n.Fragment,{children:[n.jsxDEV("div",{className:`md:hidden ${s==="navigation"?"block":"hidden"} flex-1`,children:n.jsxDEV("div",{className:p?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxDEV("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:280,columnNumber:15},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:284,columnNumber:17},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:279,columnNumber:13},void 0),n.jsxDEV("div",{className:d,children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:290,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:273,columnNumber:9},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:268,columnNumber:7},void 0),n.jsxDEV("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[n.jsxDEV("div",{className:`md:hidden ${s==="content"?"block":"hidden"}`,children:[s==="content"&&l&&n.jsxDEV("button",{onClick:l,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",w]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:303,columnNumber:13},void 0),n.jsxDEV("div",{ref:T,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:I,children:n.jsxDEV("div",{className:z,style:D,children:[i&&n.jsxDEV("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${u}`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:317,columnNumber:17},void 0),o]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:315,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:310,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:296,columnNumber:9},void 0),n.jsxDEV("div",{className:`hidden md:flex min-h-full ${U}`,style:{width:"100%"},children:[n.jsxDEV("aside",{className:"flex-shrink-0",style:{width:`${b}px`,minWidth:`${b}px`},children:n.jsxDEV("div",{className:x?"sticky":"",style:x?{top:`${h}px`}:void 0,children:[e&&n.jsxDEV("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:343,columnNumber:17},void 0),r&&n.jsxDEV("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:348,columnNumber:17},void 0),n.jsxDEV("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${x?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:352,columnNumber:15},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:338,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:334,columnNumber:11},void 0),n.jsxDEV("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${b+g}px)`},children:n.jsxDEV("div",{ref:T,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:I,children:n.jsxDEV("div",{className:z,style:D,children:[i&&n.jsxDEV("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${u}`,children:i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:376,columnNumber:19},void 0),o]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:374,columnNumber:15},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:369,columnNumber:13},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:365,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:329,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:294,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/layout/MasterDetailLayout.tsx",lineNumber:266,columnNumber:5},void 0)},Kd=({contentType:e,aiSummary:r,technicalComplexity:a="intermediate"})=>n.jsxDEV(dt.Helmet,{children:[n.jsxDEV("meta",{name:"ai:content-type",content:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:28,columnNumber:7},void 0),n.jsxDEV("meta",{name:"ai:summary",content:r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:29,columnNumber:7},void 0),n.jsxDEV("meta",{name:"ai:complexity",content:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:30,columnNumber:7},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AIMeta.tsx",lineNumber:27,columnNumber:5},void 0),Zd=({children:e,className:r,...a})=>n.jsxDEV("main",{className:r,...a,role:"main",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/SemanticHTML.tsx",lineNumber:24,columnNumber:3},void 0),Qd=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/seo/AITrainingEnhancer.tsx",lineNumber:10,columnNumber:10},void 0),Se=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Ee=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),qr=e=>{const r=Se(e.audience),a=Ee(e.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:r.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},$r=e=>{const r=Se(e.keywords),a=Se(e.audience),t=Ee(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:t.appName,url:t.baseUrl,logo:{"@type":"ImageObject",url:`${t.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:t.appName,logo:{"@type":"ImageObject",url:`${t.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${t.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${t.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:r.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:e.complexity},educationalLevel:e.complexity,proficiencyLevel:e.complexity,learningResourceType:e.contentType,timeRequired:e.readingTime?`PT${e.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:e.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},Xd=(e,r)=>{const a=Ee(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:t.category||"General"}))}},Hr=e=>{const r=Ee(e.branding);return{"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`${r.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${r.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${r.baseUrl}/document`,`${r.baseUrl}/web3-users`,`${r.baseUrl}/web3-projects`,`${r.baseUrl}/connect`],relatedLink:e.relatedTopics?.map(a=>`${r.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":r.baseUrl,name:r.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${r.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},Va=e=>{const r=Se(e.keywords),a=Ee(e.branding);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":e.category,"article:tag":r.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},Aa=e=>{const r=Ee(e.branding);return{"twitter:card":"summary_large_image","twitter:site":r.twitterHandle||"","twitter:creator":r.twitterHandle||"","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`${r.baseUrl}/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - ${r.appName}`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}},Ta=e=>{const r=Se(e.keywords),a=Se(e.audience),t=Ee(e.branding);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":a.join(","),"ai:keywords":r.join(","),"ai:reading-time":e.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":e.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${t.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},Jd=e=>({structuredData:{product:qr(e),article:$r(e),aiOptimized:Hr(e)},openGraph:Va(e),twitterCard:Aa(e),aiMetaTags:Ta(e),jsonLD:[qr(e),$r(e),Hr(e)]}),Rd={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},eu=e=>{const{level:r,text:a,className:t="",id:o,semanticContext:i="section"}=e,s=`h${r}`,l={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},d={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},c=[l[r],d[i],t].filter(Boolean).join(" "),u=o||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return y.createElement(s,{id:u,className:c,"aria-level":r},a)},ie={pageTitle:(e,r)=>({level:1,text:e,className:r,semanticContext:"page-title"}),majorSection:(e,r)=>({level:2,text:e,className:r,semanticContext:"section"}),feature:(e,r)=>({level:3,text:e,className:r,semanticContext:"feature"}),benefit:(e,r)=>({level:3,text:e,className:r,semanticContext:"benefit"}),step:(e,r,a)=>({level:3,text:r?`Step ${r}: ${e}`:e,className:a,semanticContext:"step"}),subFeature:(e,r)=>({level:4,text:e,className:r,semanticContext:"feature"})},ru=e=>{const r=[],a=[],t=e.filter(o=>o.level===1).length;t===0?r.push("Missing H1 tag - every page should have exactly one H1"):t>1&&r.push(`Multiple H1 tags found (${t}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const i=e[o],s=e[o-1];i.level>s.level+1&&r.push(`Heading level jump from H${s.level} to H${i.level} - avoid skipping levels`)}return e.forEach((o,i)=>{o.text.length<3&&r.push(`Heading ${i+1} is too short - use descriptive text`),o.text.length>70&&a.push(`Heading "${o.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:r.length===0,errors:r,suggestions:a}},nu={walletConnection:ie.pageTitle("Connect Your Web3 Wallet"),emailBenefits:ie.majorSection("Why Choose Web3 Email?"),securityFeature:ie.feature("Secure & Private"),ensIntegration:ie.feature("ENS Domain Support"),multiChain:ie.feature("Multi-Chain Compatibility"),passwordless:ie.benefit("No Passwords Required"),setupStep1:ie.step("Connect Your Wallet",1),setupStep2:ie.step("Verify Your Identity",2),setupStep3:ie.step("Access Your Emails",3)},au=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],tu=e=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:e.difficulty,learningResourceType:"Technical Documentation",timeRequired:e.estimatedTime?`PT${e.estimatedTime}M`:void 0,teaches:e.learningObjectives,requires:e.prerequisites,about:{"@type":"Thing",name:e.domain,category:e.category,subcategory:e.subcategory},keywords:e.concepts,applicationExample:e.practicalApplications,isRelatedTo:e.relatedConcepts}),ou=e=>{const r={nodes:e.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return e.forEach(a=>{a.relatedTerms?.forEach(t=>{e.find(i=>i.term===t)&&r.edges.push({source:a.term,target:t,relationship:"related_to"})}),a.synonyms?.forEach(t=>{r.edges.push({source:a.term,target:t,relationship:"synonym_of"})})}),r},iu=e=>{const r=[];return e.examples?.forEach(a=>{r.push({text:a,label:e.term,type:"positive",confidence:1})}),e.context&&r.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),r.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),r},su=e=>{const r=[];return e.forEach(a=>{r.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&r.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&r.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&r.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),r},lu={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},cu=({children:e,appName:r,appUrl:a,apiUrl:t})=>(y.useEffect(()=>{const o=()=>{[].forEach(g=>{const p=document.createElement("link");p.rel="preload",p.href=g.href,p.as=g.as,g.type&&(p.type=g.type),g.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},i=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(p=>{p.fetchPriority="high"});const g=document.querySelector("[data-hero]");if(g){const p=g.getAttribute("data-bg-image");if(p){const N=document.createElement("link");N.rel="preload",N.href=p,N.as="image",document.head.appendChild(N)}}},s=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(p=>{const N=p;N.naturalWidth&&N.naturalHeight&&(N.width=N.naturalWidth,N.height=N.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(p=>{p.getAttribute("style")?.includes("min-height")||(p.style.minHeight="200px")})},l=()=>{const h=()=>{document.querySelectorAll("script[data-defer]").forEach(N=>{N.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{h()}):setTimeout(h,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(N=>{document.addEventListener(N,()=>{},{passive:!0})})})()},d=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...t?[{rel:"dns-prefetch",href:`//${t.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...t?[{rel:"preconnect",href:t}]:[]].forEach(g=>{const p=document.createElement("link");p.rel=g.rel,p.href=g.href,g.crossorigin&&(p.crossOrigin=""),document.head.appendChild(p)})},u=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(g=>{g.loading="lazy"}),"IntersectionObserver"in window){const g=new IntersectionObserver(N=>{N.forEach(j=>{if(j.isIntersecting){const k=j.target;k.dataset.src&&(k.src=k.dataset.src,k.removeAttribute("data-src")),g.unobserve(k)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(N=>g.observe(N))}},b=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:N,content:j})=>{if(!document.querySelector(`meta[name="${N}"]`)){const k=document.createElement("meta");k.name=N,k.content=j,document.head.appendChild(k)}});const g={"@context":"https://schema.org","@type":"WebApplication",name:r,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},p=document.createElement("script");p.type="application/ld+json",p.textContent=JSON.stringify(g),document.head.appendChild(p)},x=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(g=>{const p=g.cloneNode(!0);p.rel="preload",p.as="style",p.onload=()=>{p.onload=null,p.rel="stylesheet"},document.head.appendChild(p),g.remove()})};return o(),i(),s(),l(),c(),u(),b(),x(),setTimeout(d,2e3),()=>{}},[t,r,a]),n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/PerformanceOptimizer.tsx",lineNumber:291,columnNumber:10},void 0)),du=()=>(y.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(d=>{d.forEach(c=>{if(c.isIntersecting){const u=c.target;u.dataset.src&&(u.src=u.dataset.src,u.removeAttribute("data-src"),l.unobserve(u))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{l.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const c=document.createElement("link");c.rel="prefetch",c.href=d,document.head.appendChild(c)})},i=()=>{if(!document.querySelector("script[data-wallet-detection]")){const l=document.createElement("script");l.dataset.walletDetection="true",l.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(l)}},s=()=>{document.querySelectorAll("img[data-hero]").forEach(l=>{const d=l;d.loading="eager","fetchPriority"in d&&(d.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const d=l;d.loading="lazy","fetchPriority"in d&&(d.fetchPriority="low")})};requestIdleCallback(()=>{o(),i(),s()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(s=>{const l=s.getEntries(),d=l[l.length-1];d&&d.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{o.observe({entryTypes:["largest-contentful-paint"]})}catch{}const i=new PerformanceObserver(s=>{let l=0;for(const d of s.getEntries())d.hadRecentInput||(l+=d.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const c=d;c.style.aspectRatio="16/9"})});try{i.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const i=o.effectiveType;i==="slow-2g"||i==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(s=>{s.getAttribute("data-critical")||s.remove()}),localStorage.setItem("use-low-quality-images","true")):i==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{e(),r(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),uu=({children:e})=>n.jsxDEV(n.Fragment,{children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/OptimizedRoutePreloader.tsx",lineNumber:10,columnNumber:10},void 0),La={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class mu{constructor(){this.cache=new Map}set(r,a,t){if(this.cache.size>=t.maxSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}this.cache.set(r,{data:a,timestamp:Date.now(),isStale:!1})}get(r,a){const t=this.cache.get(r);if(!t)return null;const i=Date.now()-t.timestamp>a.duration;return i&&!a.staleWhileRevalidate?(this.cache.delete(r),null):{data:t.data,isStale:i}}invalidate(r){for(const a of this.cache.keys())a.includes(r)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((r,a)=>r+JSON.stringify(a).length*2,0)}}const Ve=new mu,Ue=new Map,Ia=async(e,r,a="messages")=>{const t=La[a],o=Ve.get(e,t);if(o&&!o.isStale)return o.data;const i=Ue.get(e);if(i)return i;if(o&&o.isStale&&t.staleWhileRevalidate){const l=r().then(d=>(Ve.set(e,d,t),Ue.delete(e),d)).catch(d=>{throw Ue.delete(e),d});return Ue.set(e,l),o.data}const s=r().then(l=>(Ve.set(e,l,t),Ue.delete(e),l)).catch(l=>{throw Ue.delete(e),l});return Ue.set(e,s),s};class bu{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,a){return new Promise((t,o)=>{this.queue.push({key:r,fetcher:a,resolve:t,reject:o}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const r=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(r);for(const t of a)await Promise.allSettled(t.map(async o=>{try{const i=await o.fetcher();o.resolve(i)}catch(i){o.reject(i)}}))}groupRequests(r){const a=[];for(let o=0;o<r.length;o+=5)a.push(r.slice(o,o+5));return a}}const fu=new bu;class gu{constructor(r,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=r,this.defaultHeaders=a}addRequestInterceptor(r){this.requestInterceptors.push(r)}addResponseInterceptor(r){this.responseInterceptors.push(r)}async request(r,a={},t,o="messages"){const i=`${this.baseURL}${r}`,s=t||`${a.method||"GET"}:${i}`,l=async()=>{let d={...a,headers:{...this.defaultHeaders,...a.headers}};for(const u of this.requestInterceptors)d=u(d);let c=await fetch(i,d);for(const u of this.responseInterceptors)c=await u(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(r)?fu.add(s,l):Ia(s,l,o)}shouldBatch(r){return r.includes("/messages/")&&!r.includes("/messages?")}async get(r,a){return this.request(r,{method:"GET"},void 0,a)}async post(r,a){return this.request(r,{method:"POST",body:JSON.stringify(a)})}async put(r,a){return this.request(r,{method:"PUT",body:JSON.stringify(a)})}async delete(r){return this.request(r,{method:"DELETE"})}}const hu=async(e,r=3,a=1e3)=>{let t;for(let o=0;o<=r;o++)try{return await e()}catch(i){if(t=i,o===r)throw t;const s=a*Math.pow(2,o)+Math.random()*1e3;await new Promise(l=>setTimeout(l,s))}throw t};class pu{constructor(){this.abortController=new AbortController}async request(r,a={}){const t=await fetch(r,{...a,signal:this.abortController.signal});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return t.json()}cancel(){this.abortController.abort()}}const xu={invalidate:e=>Ve.invalidate(e),clear:()=>Ve.clear(),getStats:()=>Ve.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(r=>r()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(r=>r()))}):setTimeout(async()=>{await Promise.allSettled(e.map(r=>r()))},100)}};function Ma(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>e.includes(a))}function Pa(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Oa(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Da(){return Pa()?"localhost":Ma()?"wallet-browser":Oa()?"network":"production"}function Nu(){const e=Da();return e==="localhost"||e==="wallet-browser"}function yu(e){}function za(){return typeof window<"u"}function vu(){return typeof window<"u"}function _u(e,r){if(za())e();else return r}const Gr=e=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'",...e?.apiUrls||[],...e?.appUrls||[],"https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),ku=Gr(),Ba=e=>{const r=Gr(e);return Object.entries(r).map(([a,t])=>`${a} ${t.join(" ")}`).join("; ")},Wa=e=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":Ba(e)}),wu=Wa(),Eu={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},Uu=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},ju={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},de=new Map,We=new Map,or=new Set;let Fe="medium",Yr=!1;function Cu(){if("connection"in navigator){const a=navigator.connection;a&&(Fe=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;Yr=e&&e<4||r&&r<4}Cu();function Su(e,r,a={}){const{retries:t=3,timeout:o=1e4,fallback:i,preloadCondition:s,cacheStrategy:l="memory",priority:d="medium",onLoad:c,onError:u}=a;if(de.has(r))return de.get(r).component;const b=y.lazy(async()=>{const h=performance.now();if(We.has(r))return We.get(r).then(p=>({default:p}));const g=Vu(e,t,o);We.set(r,g.then(p=>p.default));try{const p=await g,N=performance.now()-h;if(l!=="none"){const j={component:p.default,timestamp:Date.now(),loadTime:N};if(de.set(r,j),l==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:j.timestamp,loadTime:N}))}catch{}}return We.delete(r),c?.(p.default),p}catch(p){throw We.delete(r),u?.(p),p}}),x=h=>{const[g,p]=y.useState(!0);y.useEffect(()=>{if(s&&!de.has(r)&&s()&&!or.has(r)){or.add(r);const k=Au(d,Fe);setTimeout(()=>{e().catch(()=>{})},k)}},[]);const N=i||n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:176,columnNumber:9},this),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:177,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:175,columnNumber:7},this);return!g&&Yr&&Fe==="slow"?n.jsxDEV("div",{className:"lazy-placeholder",children:n.jsxDEV("button",{onClick:()=>p(!0),className:"load-component-btn",children:["Load ",r]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:186,columnNumber:11},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:185,columnNumber:9},this):n.jsxDEV(y.Suspense,{fallback:N,children:n.jsxDEV(b,{...h},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:198,columnNumber:9},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:197,columnNumber:7},this)};return x.displayName=`AdvancedLazy(${r})`,x}async function Vu(e,r,a){let t;for(let o=0;o<r;o++)try{const i=new Promise((l,d)=>{setTimeout(()=>d(new Error("Load timeout")),a)});return await Promise.race([e(),i])}catch(i){if(t=i,o<r-1){const s=Math.pow(2,o)*1e3,l=Math.random()*1e3;await new Promise(d=>setTimeout(d,s+l))}}throw t}function Au(e,r){const a={critical:0,high:500,medium:2e3,low:5e3},t={fast:.5,medium:1,slow:2},o=a[e]||2e3,i=t[r]||1;return o*i}const Ye=class Ye{static registerRoute(r,a){this.routeMap.set(r,a),this.routeUsageStats.set(r,0)}static setCurrentRoute(r){this.currentRoute=r;const a=this.routeUsageStats.get(r)||0;this.routeUsageStats.set(r,a+1),this.preloadLikelyRoutes(r)}static preloadLikelyRoutes(r){this.getRouteTransitionProbability(r).forEach(({route:t,probability:o})=>{o>.3&&!de.has(t)&&setTimeout(()=>{this.routeMap.get(t)},Fe==="fast"?1e3:3e3)})}static getRouteTransitionProbability(r){const a=[];switch(r){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:de.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Ye.routeMap=new Map,Ye.routeUsageStats=new Map,Ye.currentRoute="";let Kr=Ye;const Tu=({src:e,alt:r,className:a,placeholder:t,priority:o="medium"})=>{const[i,s]=y.useState(!1),[l,d]=y.useState(!1),c=y.useRef(null);y.useEffect(()=>{if(!c.current)return;if(o==="high"){d(!0);return}const b=new IntersectionObserver(([x])=>{x.isIntersecting&&(d(!0),b.unobserve(x.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return b.observe(c.current),()=>b.disconnect()},[o]);const u=()=>{s(!0)};return n.jsxDEV("div",{className:`lazy-image-container ${a}`,children:[n.jsxDEV("img",{ref:c,src:l?e:t||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${i?"opacity-100":"opacity-0"}`,onLoad:u,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:401,columnNumber:7},void 0),!i&&l&&n.jsxDEV("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:416,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/advancedLazyLoading.tsx",lineNumber:400,columnNumber:5},void 0)};function Lu(){de.clear(),or.clear()}function Iu(){return{cachedComponents:de.size,preloadQueue:or.size,networkSpeed:Fe,isLowEndDevice:Yr,cacheEntries:Array.from(de.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const Mu=({message:e})=>n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:9,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:10,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:8,columnNumber:3},void 0),Pu=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>n.jsxDEV("div",{className:"flex justify-center items-center p-4",children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:35,columnNumber:9},void 0);case"skeleton":return()=>n.jsxDEV("div",{className:"animate-pulse",children:[n.jsxDEV("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:40,columnNumber:11},void 0),n.jsxDEV("div",{className:"h-4 bg-gray-200 rounded w-1/2"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:41,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:39,columnNumber:9},void 0);case"default":default:return()=>n.jsxDEV(Mu,{message:"Loading component..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:46,columnNumber:20},void 0)}},Fa=(e,r="default",a=3)=>{const t=y.lazy(async()=>{let i=null;for(let s=0;s<a;s++)try{return await e()}catch(l){i=l,s<a-1&&await new Promise(d=>setTimeout(d,Math.pow(2,s)*1e3))}throw i}),o=Pu(r);return i=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(o,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:83,columnNumber:25},void 0),children:n.jsxDEV(t,{...i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:84,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/dynamicImports.tsx",lineNumber:83,columnNumber:5},void 0)},Ou=async e=>{try{await e()}catch{}},Du=e=>{const r={};return Object.entries(e).forEach(([a,t])=>{r[a]=Fa(t,"skeleton")}),r},zu=e=>e,qa={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Ke=class Ke{static add(r,a){this.preloadedComponents.has(r)||(this.preloadQueue.push({name:r,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(r){return this.preloadedComponents.has(r)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};Ke.preloadedComponents=new Set,Ke.preloadQueue=[],Ke.isPreloading=!1;let Zr=Ke;const Bu=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{qa.secondary.forEach(e=>{})})},$a=({message:e})=>n.jsxDEV("div",{className:"flex items-center justify-center p-4",children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:10,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:11,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:9,columnNumber:3},void 0),qe=new Map;function Wu(e,r){const{condition:a,fallback:t,retries:o=3,timeout:i=1e4,priority:s="medium",cacheKey:l=`conditional-${Math.random()}`}=r,d=c=>{const[u,b]=y.useState(!1),[x,h]=y.useState(null);return y.useEffect(()=>{const N=setTimeout(async()=>{const j=qe.get(l);if(j&&j.isValid&&Date.now()-j.lastCheck<3e5)try{if(await j.condition()){h(()=>j.component),b(!0);return}}catch{}try{if(await a()){const U=await $u(e,o,i);qe.set(l,{component:U.default,condition:a,lastCheck:Date.now(),isValid:!0}),h(()=>U.default),b(!0)}}catch{}},s==="high"?0:s==="medium"?100:500);return()=>clearTimeout(N)},[]),u?x?n.jsxDEV(y.Suspense,{fallback:t||n.jsxDEV($a,{message:"Loading component..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:122,columnNumber:31},this),children:n.jsxDEV(x,{...c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:124,columnNumber:9},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:121,columnNumber:7},this):null:t||n.jsxDEV($a,{message:"Checking conditions..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/conditionalImports.tsx",lineNumber:113,columnNumber:26},this)};return d.displayName=`ConditionalLazy(${l})`,d}const Fu={},qu={};async function $u(e,r,a){let t;for(let o=0;o<r;o++)try{const i=new Promise((s,l)=>{setTimeout(()=>l(new Error("Import timeout")),a)});return await Promise.race([e(),i])}catch(i){if(t=i,o<r-1){const s=Math.pow(2,o)*1e3;await new Promise(l=>setTimeout(l,s))}}throw t}function Hu(){qe.clear()}function Gu(){return{cachedComponents:qe.size,cacheEntries:Array.from(qe.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const Ha=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class Yu{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const t=a.effectiveType;t==="4g"?this.networkSpeedEstimate="fast":t==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const r=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-r;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const r=navigator.deviceMemory,a=navigator.hardwareConcurrency;r&&r<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(t=>{t.level&&t.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let r;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(r),r=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(t=>{document.addEventListener(t,a,{passive:!0})})}shouldPreload(r){return this.networkSpeedEstimate==="slow"&&r.size>50||this.isLowEndDevice&&r.size>30?!1:r.config.condition()}async preloadChunk(r){if(!this.preloaded.has(r.name))try{if(document.querySelectorAll('script[src*="'+r.name+'"]').length===0&&document.querySelectorAll('link[href*="'+r.name+'"]').length>0)return;const t=document.createElement("link");t.rel="modulepreload",t.href=r.path.replace("*",this.getChunkHash(r.name)),t.crossOrigin="","fetchPriority"in t&&(t.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(t),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const a=Array.from(document.querySelectorAll("script[src]"));for(const t of a){const o=t.src;if(o.includes(r)){const i=o.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(i)return i[1]}}return"unknown"}async schedulePreload(r){const a=r.config;return a.delay&&await new Promise(t=>setTimeout(t,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(t=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(t)})}):this.preloadChunk(r)}initializePreloading(){Ha.sort((a,t)=>{const o={critical:0,high:1,medium:2,low:3};return o[a.config.priority]-o[t.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(r){document.querySelectorAll("[data-preload-on-hover]").forEach(t=>{let o=!1;t.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(r),o=!0)},{passive:!0})})}setupScrollPreloading(r,a){let t=!1;const o=()=>{if(t)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(r),t=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&Ha.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let $e=null;function Ku(){$e||($e=new Yu,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{$e?.initializePreloading()}):$e.initializePreloading())}function Zu(){return $e?.getPreloadingStats()}function Qu(e){const r={"ai-content-type":e.contentType,"ai-primary-topic":e.primaryTopic,"ai-complexity-level":e.complexityLevel,"ai-content-purpose":e.contentPurpose,"ai-industry-vertical":e.industryVertical,"ai-semantic-keywords":e.semanticKeywords.join(","),"ai-target-audience":e.targetAudience.join(","),"ai-technical-tags":e.technicalTags.join(","),"ai-user-intent":e.userIntent.join(","),"ai-conversion-goals":e.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return e.contentType==="governance-page"&&(r["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",r["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",r["ai-participation-boost"]="85%",r["ai-treasury-management"]="enabled"),r}function Ga(e){const r={"@context":"https://schema.org","@type":Ru(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...r,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:r}function Xu(e,r){return r.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function Ya(e){const r=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...r,...a]:r}function Ka(e){const r=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...r,...a]:r}function Ju(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:Ga(e),entityRecognition:Ya(e),topicClustering:Ka(e),contentRelationships:r?.contentRelationships||[],...r}}function Ru(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function em(e){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${e}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${e} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const rm={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},nm=({message:e,className:r})=>n.jsxDEV("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[n.jsxDEV("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:13,columnNumber:5},void 0),n.jsxDEV("span",{className:"ml-2 text-sm text-gray-600",children:e},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:14,columnNumber:5},void 0)]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:12,columnNumber:3},void 0),Qr=new Map,He=new Set;function Xr(){const e=[];return!!window.ethereum?.isMetaMask&&(He.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(He.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(He.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,i)=>o.priority-i.priority)}function Jr(e){const r=`wallet-${e.toLowerCase()}`;if(Qr.has(r))return Qr.get(r);const a=()=>Promise.resolve({default:()=>y.createElement("div",{},`${e} Provider Placeholder`)}),t=y.lazy(a),o=i=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(nm,{message:`Loading ${e} wallet...`,className:"wallet-loading"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:102,columnNumber:9},this),children:n.jsxDEV(t,{...i},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:108,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:100,columnNumber:5},this);return o.displayName=`Lazy${e}Provider`,Qr.set(r,o),o}function am({children:e}){const r=Xr();return r.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),n.jsxDEV(n.Fragment,{children:[r.map(a=>{const t=Jr(a.name);return n.jsxDEV(t,{},a.name,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:141,columnNumber:16},this)}),e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:138,columnNumber:5},this)}const nn=class nn{static preloadWallet(r){const a=r.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{Jr(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,t)=>{setTimeout(()=>{this.preloadWallet(a)},t*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};nn.preloadedWallets=new Set;let Ge=nn;function tm(){return{availableWallets:Xr(),preloadWallet:t=>{Ge.preloadWallet(t)},getDetectedWallets:()=>Array.from(He),hasWallet:t=>He.has(t.toLowerCase())}}function om({walletName:e,onConnect:r,disabled:a=!1}){const t=()=>{Ge.preloadWallet(e),setTimeout(r,100)};return n.jsxDEV("button",{onClick:t,disabled:a,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]},void 0,!0,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/optimization/optimization/walletLazyLoading.tsx",lineNumber:228,columnNumber:5},this)}class im{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(i=>{for(const s of i.getEntries())s.name==="first-contentful-paint"&&(this.observedMetrics.fcp=s.startTime,this.optimizeBasedOnFCP(s.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(i=>{for(const s of i.getEntries())this.observedMetrics.lcp=s.startTime,this.optimizeBasedOnLCP(s.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let t=0;new PerformanceObserver(i=>{for(const s of i.getEntries())s.hadRecentInput||(t+=s.value);this.observedMetrics.cls=t}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const r=performance.getEntriesByType("navigation")[0];r&&(this.observedMetrics.ttfb=r.responseStart-r.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(r){r>2e3?this.applyEmergencyOptimizations():r>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(r){r>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(r){r>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(t=>{t.loading="lazy",t.style.display="none",setTimeout(()=>{t.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(t=>{t.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(t=>{t instanceof HTMLImageElement&&(t.fetchPriority="high",t.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const r=document.createElement("meta");r.httpEquiv="Cache-Control",r.content="public, max-age=31536000, immutable",document.head.appendChild(r)}preloadResource(r,a){if(document.querySelector(`link[href*="${r}"]`))return;const o=document.createElement("link");switch(o.rel="preload",o.href=r,a){case"script":o.as="script";break;case"style":o.as="style";break;case"font":o.as="font",o.type="font/woff2",o.crossOrigin="";break;case"image":o.as="image";break}document.head.appendChild(o)}optimizeCriticalPath(){this.criticalResources.filter(r=>r.priority==="critical"&&r.preload).forEach(r=>{this.preloadResource(r.url,r.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const r=document.querySelector('link[rel="stylesheet"][data-critical]');r&&this.isSmallResource(r.getAttribute("href")||"")&&fetch(r.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const t=document.createElement("style");t.textContent=a,document.head.appendChild(t),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const t=a.getAttribute("href")||"";if(!t.includes("display=swap")){const o=t.includes("?")?"&":"?";a.setAttribute("href",`${t}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const t=a.cloneNode(!0);t.rel="preload",t.as="style",t.onload=()=>{t.onload=null,t.rel="stylesheet"};const o=document.createElement("noscript"),i=a.cloneNode(!0);o.appendChild(i),document.head.appendChild(t),document.head.appendChild(o),a.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(t=>{t.forEach(o=>{if(o.isIntersecting){const i=o.target;i.src=i.dataset.src||"",i.removeAttribute("data-src"),a.unobserve(i)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(t=>a.observe(t))}else r.forEach(a=>{const t=a;t.src=t.dataset.src||""})}isSmallResource(r){return r.includes("critical")||r.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let r=100;return this.observedMetrics.fcp>2e3?r-=20:this.observedMetrics.fcp>1500&&(r-=10),this.observedMetrics.lcp>2500?r-=25:this.observedMetrics.lcp>2e3&&(r-=15),this.observedMetrics.cls>.1?r-=15:this.observedMetrics.cls>.05&&(r-=8),this.observedMetrics.ttfb>600?r-=10:this.observedMetrics.ttfb>400&&(r-=5),Math.max(r,0)}}const ir={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,r,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,r,a);const t=performance.getEntriesByName(e);return t[t.length-1]?.duration||0}catch{return 0}return 0},getEntries:e=>typeof performance<"u"&&performance.getEntriesByName?e?performance.getEntriesByName(e):performance.getEntries():[],clearEntries:e=>{typeof performance<"u"&&(e?(performance.clearMeasures?.(e),performance.clearMarks?.(e)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},sm=(e,r=[])=>{y.useEffect(()=>(ir.mark(`${e}-start`),()=>{ir.mark(`${e}-end`),ir.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},lm=e=>{const r=y.useRef(e);return r.current=e,y.useCallback((...a)=>r.current(...a),[])},cm=(e,r,a)=>{const t=y.useRef(r),o=y.useRef(void 0);return y.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&r.some((i,s)=>i!==t.current[s]),t.current=r,o.current=e(),o.current),[e,a,r])},sr=new Map,dm=e=>{const r=sr.get(e)||0;sr.set(e,r+1),y.useEffect(()=>{process.env.NODE_ENV})},um=()=>Object.fromEntries(sr),mm=()=>sr.clear(),bm=e=>y.lazy(e),fm=(e=.1)=>{const[r,a]=y.useState(new Set),t=y.useRef(null);y.useEffect(()=>(t.current=new IntersectionObserver(i=>{i.forEach(s=>{if(s.isIntersecting){const l=s.target,d=l.dataset.src;d&&(l.src=d,l.onload=()=>{a(c=>new Set(c).add(d))},t.current?.unobserve(l))}})},{threshold:e}),()=>t.current?.disconnect()),[e]);const o=y.useCallback(i=>{i&&t.current&&t.current.observe(i)},[]);return{loadedImages:r,observeImage:o}},gm=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},Za={},hm=e=>{Za[e.name]=e.value,process.env.NODE_ENV},pm=()=>Za,xm=(e,r="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=e,a.as=r,document.head.appendChild(a)}},Nm=(e,r="script",a)=>{if(typeof document<"u"){const t=document.createElement("link");t.rel="preload",t.href=e,t.as=r,a&&(t.crossOrigin="anonymous"),document.head.appendChild(t)}},ym=e=>{const r=y.useRef(new Set),a=y.useRef(new Set),t=y.useCallback((i,s)=>{const l=setTimeout(()=>{r.current.delete(l),i()},s);return r.current.add(l),l},[]),o=y.useCallback((i,s)=>{const l=setInterval(i,s);return a.current.add(l),l},[]);return y.useEffect(()=>{const i=r.current,s=a.current;return()=>{i.forEach(l=>clearTimeout(l)),s.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:t,createInterval:o}},ue={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>ue.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${ue.maxFCP}ms)`),e.LCP&&e.LCP>ue.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${ue.maxLCP}ms)`),e.FID&&e.FID>ue.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${ue.maxFID}ms)`),e.CLS&&e.CLS>ue.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${ue.maxCLS})`),r}};class vm{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Ie.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),Ie.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),Ie.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),Ie.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),Ie.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(t=>{t.getEntries().forEach(i=>{if(i.entryType==="navigation"){const s=i;this.metrics.bundleLoadTime=s.loadEventEnd-s.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const a=new PerformanceObserver(t=>{t.getEntries().forEach(i=>{(i.name.includes(".js")||i.name.includes(".css"))&&this.trackResourceLoad(i.name,i.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const r=navigator;r.connection&&(this.metrics.connection=r.connection.effectiveType||r.connection.type),r.deviceMemory&&(this.metrics.deviceMemory=r.deviceMemory),r.hardwareConcurrency&&(this.metrics.hardwareConcurrency=r.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(r,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(r,a){const t=r.includes(".js"),o=r.includes(".css");if(t||o){const i=t?"JavaScript":"CSS";this.reportMetric(`${i} Load`,a)}}measureComponentRender(r,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${r})`,a)}measureAPICall(r,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${r})`,a)}measureRouteChange(r,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${r})`,a)}markStart(r){this.performanceMarks.set(r,performance.now())}markEnd(r){const a=this.performanceMarks.get(r);if(a){const t=performance.now()-a;this.reportMetric(`Mark (${r})`,t),this.performanceMarks.delete(r)}}trackRouteChange(r,a,t){typeof a=="string"?this.measureRouteChange(a,t||performance.now()):this.measureRouteChange(r,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let r=100;return this.metrics.LCP&&this.metrics.LCP>2500?r-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(r-=15),this.metrics.INP&&this.metrics.INP>200?r-=20:this.metrics.INP&&this.metrics.INP>100&&(r-=10),this.metrics.CLS&&this.metrics.CLS>.1?r-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(r-=8),Math.max(r,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(r=>r.disconnect()),this.observers=[]}}let lr=null;const _m=e=>(lr||(lr=new vm(e)),lr),cr=()=>lr,Qa=e=>{const r=y.useRef(performance.now());y.useEffect(()=>{const a=performance.now()-r.current,t=cr();t&&t.measureComponentRender(e,a)},[e])},km=(e,r)=>y.forwardRef((a,t)=>(Qa(r),y.createElement(e,{...a,ref:t}))),wm=async(e,r)=>{const a=performance.now(),t=await e(),o=performance.now()-a,i=cr();return i&&i.measureAPICall(r,o),t},Xa={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Em=(e,r=Xa)=>{const a=[];return r.LCP&&e.LCP&&e.LCP>r.LCP&&a.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${r.LCP}ms)`),r.INP&&e.INP&&e.INP>r.INP&&a.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${r.INP}ms)`),r.CLS&&e.CLS&&e.CLS>r.CLS&&a.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${r.CLS})`),r.FCP&&e.FCP&&e.FCP>r.FCP&&a.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${r.FCP}ms)`),r.TTFB&&e.TTFB&&e.TTFB>r.TTFB&&a.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${r.TTFB}ms)`),{passed:a.length===0,violations:a}},Um=e=>{const r=e||cr()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:r,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:r.viewport,connection:r.connection,deviceMemory:r.deviceMemory,hardwareConcurrency:r.hardwareConcurrency}};return JSON.stringify(a,null,2)},jm=(e={})=>{const{successMessage:r="",successDuration:a=3e3,errorPrefix:t="",onSuccess:o,onError:i}=e,[s,l]=y.useState(!1),[d,c]=y.useState(""),[u,b]=y.useState(""),x=y.useCallback(()=>{c(""),b("")},[]),h=y.useCallback(()=>{c("")},[]),g=y.useCallback(()=>{b("")},[]),p=y.useCallback(async N=>{l(!0),x();try{await N(),r&&(c(r),a>0&&setTimeout(()=>{c("")},a)),o&&o()}catch(j){const k=j instanceof Error?j.message:"An error occurred";throw b(t?`${t}: ${k}`:k),i&&j instanceof Error&&i(j),j}finally{l(!1)}},[r,a,t,o,i,x]);return{isSubmitting:s,successMessage:d,errorMessage:u,submit:p,clearMessages:x,clearSuccess:h,clearError:g}},Cm=(e=!1)=>{const[r,a]=y.useState(e),t=y.useCallback(()=>a(!0),[]),o=y.useCallback(()=>a(!1),[]),i=y.useCallback(()=>a(s=>!s),[]);return{value:r,setTrue:t,setFalse:o,toggle:i,setValue:a}},Sm=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:t}=e,[o,i]=y.useState(null),s=y.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const u=document.createElement("textarea");u.value=c,u.style.position="fixed",u.style.left="-999999px",u.style.top="-999999px",document.body.appendChild(u),u.focus(),u.select();const b=document.execCommand("copy");if(document.body.removeChild(u),!b)throw new Error("Copy command was unsuccessful")}return i(c),a?.(c),setTimeout(()=>{i(null)},r),!0}catch(u){const b=u instanceof Error?u:new Error("Copy failed");return t?.(b),!1}},[r,a,t]),l=y.useCallback(c=>o===c,[o]),d=y.useCallback(()=>{i(null)},[]);return{copiedValue:o,copyToClipboard:s,isCopied:l,resetCopiedState:d}},Vm=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:t}=e,[o,i]=y.useState({}),s=y.useCallback(async(c,u)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const b=document.createElement("textarea");b.value=c,b.style.position="fixed",b.style.left="-999999px",b.style.top="-999999px",document.body.appendChild(b),b.focus(),b.select();const x=document.execCommand("copy");if(document.body.removeChild(b),!x)throw new Error("Copy command was unsuccessful")}return i(b=>({...b,[u]:!0})),a?.(c),setTimeout(()=>{i(b=>({...b,[u]:!1}))},r),!0}catch(b){const x=b instanceof Error?b:new Error("Copy failed");return t?.(x),!1}},[r,a,t]),l=y.useCallback(c=>o[c]||!1,[o]),d=y.useCallback(c=>{i(c?u=>({...u,[c]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:s,isCopied:l,resetCopiedState:d}},Am=e=>{if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB","TB"],t=Math.floor(Math.log(e)/Math.log(r)),o=Math.min(t,a.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+a[o]},Tm=(e,r,a)=>{const t={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,s=e*Math.pow(o,t[r])/Math.pow(o,t[a]);return Math.round(s*100)/100},Lm=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const a=parseFloat(r[1]),t=r[2].toLowerCase(),i={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[t];return i?Math.round(a*i):null},Im=e=>e,Mm=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},Pm=e=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as="style",r.href=e,r.onload=()=>{r.rel="stylesheet"},document.head.appendChild(r);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(a)},Om=e=>{const r={};return Object.entries(e).forEach(([a,t])=>{r[`--${a}`]=typeof t=="number"?`${t}px`:t}),r},Dm={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},zm=(e,r=Dm)=>{const[a,t]=y.useState("base");return y.useEffect(()=>{const o=()=>{const i=window.innerWidth;i>=r["2xl"]?t("2xl"):i>=r.xl?t("xl"):i>=r.lg?t("lg"):i>=r.md?t("md"):i>=r.sm?t("sm"):i>=r.xs?t("xs"):t("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[r]),e[a]||e.base||{}},Ja=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,Bm=()=>{const[e,r]=y.useState(Ja);return y.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{r(a.matches)};return a.addEventListener?a.addEventListener("change",t):a.addListener(t),()=>{a.removeEventListener?a.removeEventListener("change",t):a.removeListener(t)}},[]),e},Wm=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},Fm=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,qm=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},$m=(...e)=>e.filter(Boolean).join(" "),Hm=e=>{const r={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([t,o])=>{a.includes(t)&&(r[t]=o)}),r},Gm=(e,r=[])=>{const[a,t]=y.useState(null),[o,i]=y.useState(!0);return y.useEffect(()=>{let s=!0;return e().then(l=>{s&&(t(l.default),i(!1))}),()=>{s=!1}},[e,...r]),{styles:a,loading:o}},Ym=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),Km=(e="row",r="center",a="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:a,contain:"layout"}),Zm=e=>{const[r,a]=y.useState(!1);return y.useEffect(()=>{const t=window.matchMedia(e);a(t.matches);const o=()=>a(t.matches);return t.addEventListener?t.addEventListener("change",o):t.addListener(o),()=>{t.removeEventListener?t.removeEventListener("change",o):t.removeListener(o)}},[e]),r},Qm=(e,r)=>{const[a,t]=y.useState("light");return y.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");t(o.matches?"dark":"light");const i=()=>{t(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",i):o.addListener(i),()=>{o.removeEventListener?o.removeEventListener("change",i):o.removeListener(i)}},[]),a==="dark"?r:e},Xm=e=>{const r={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(r.title=e.title),e.width&&(r.width=e.width),e.height&&(r.height=e.height),e.sizes&&(r.sizes=e.sizes),e.srcSet&&(r.srcSet=e.srcSet),r.itemProp="image",r},Jm=(e,r=[320,640,768,1024,1280,1920])=>r.map(a=>`${e.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Rm=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),e0=(e,r="openGraph")=>{const a={};return r==="openGraph"?(a["og:image"]=e.url,e.width&&(a["og:image:width"]=e.width.toString()),e.height&&(a["og:image:height"]=e.height.toString()),e.alt&&(a["og:image:alt"]=e.alt),e.type&&(a["og:image:type"]=e.type)):(a["twitter:image"]=e.url,e.alt&&(a["twitter:image:alt"]=e.alt)),a},r0=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(t=>{t.dataset.src&&(t.src=t.dataset.src)});return}const a=new IntersectionObserver(t=>{t.forEach(o=>{if(o.isIntersecting){const i=o.target;i.dataset.src&&(i.src=i.dataset.src,i.removeAttribute("data-src")),i.dataset.srcset&&(i.srcset=i.dataset.srcset,i.removeAttribute("data-srcset")),a.unobserve(i)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(t=>a.observe(t)),()=>{r.forEach(t=>a.unobserve(t))}},Ra=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=r.onerror=function(){e(r.height===2)},r.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),et=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),n0=async(e="jpg")=>{const[r,a]=await Promise.all([Ra(),et()]);return a?"avif":r?"webp":e},a0=(e,r,a,t)=>`
62
57
  <picture>
63
- ${e.map(o=>{const s=[`srcset="${o.srcSet}"`];return o.type&&s.push(`type="${o.type}"`),o.media&&s.push(`media="${o.media}"`),o.sizes&&s.push(`sizes="${o.sizes}"`),`<source ${s.join(" ")}>`}).join(`
58
+ ${e.map(i=>{const s=[`srcset="${i.srcSet}"`];return i.type&&s.push(`type="${i.type}"`),i.media&&s.push(`media="${i.media}"`),i.sizes&&s.push(`sizes="${i.sizes}"`),`<source ${s.join(" ")}>`}).join(`
64
59
  `)}
65
- <img src="${r}" alt="${t}"${a?` class="${a}"`:""} loading="lazy">
66
- </picture>`.trim(),_0=(e,r="image")=>{if(typeof document>"u")return;const t=document.createElement("link");t.rel="preload",t.as=r,t.href=e,e.includes(".webp")?t.type="image/webp":e.includes(".avif")&&(t.type="image/avif"),document.head.appendChild(t)},k0=(e,r,t)=>{if(typeof window>"u")return;const a=new Image;a.src=e,a.classList.add("progressive-image-placeholder"),t.appendChild(a);const i=new Image;i.src=r,i.classList.add("progressive-image-main"),i.style.opacity="0",i.onload=()=>{t.appendChild(i),requestAnimationFrame(()=>{i.style.transition="opacity 0.3s",i.style.opacity="1",setTimeout(()=>{a.remove()},300)})}},w0=e=>new Promise(r=>{const t=performance.now();e.complete?r({loadTime:0,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""}):e.addEventListener("load",()=>{const a=performance.now()-t;r({loadTime:a,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""})})}),E0=(e,r,t="#e0e0e0")=>{const a=`
60
+ <img src="${r}" alt="${a}"${t?` class="${t}"`:""} loading="lazy">
61
+ </picture>`.trim(),t0=(e,r="image")=>{if(typeof document>"u")return;const a=document.createElement("link");a.rel="preload",a.as=r,a.href=e,e.includes(".webp")?a.type="image/webp":e.includes(".avif")&&(a.type="image/avif"),document.head.appendChild(a)},o0=(e,r,a)=>{if(typeof window>"u")return;const t=new Image;t.src=e,t.classList.add("progressive-image-placeholder"),a.appendChild(t);const o=new Image;o.src=r,o.classList.add("progressive-image-main"),o.style.opacity="0",o.onload=()=>{a.appendChild(o),requestAnimationFrame(()=>{o.style.transition="opacity 0.3s",o.style.opacity="1",setTimeout(()=>{t.remove()},300)})}},i0=e=>new Promise(r=>{const a=performance.now();e.complete?r({loadTime:0,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""}):e.addEventListener("load",()=>{const t=performance.now()-a;r({loadTime:t,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""})})}),s0=(e,r,a="#e0e0e0")=>{const t=`
67
62
  <svg width="${e}" height="${r}" xmlns="http://www.w3.org/2000/svg">
68
- <rect width="100%" height="100%" fill="${t}"/>
63
+ <rect width="100%" height="100%" fill="${a}"/>
69
64
  </svg>
70
- `;return`data:image/svg+xml;base64,${btoa(a)}`},U0=(e,r)=>{const t=1/r*100;e.style.position="relative",e.style.paddingTop=`${t}%`;const a=e.querySelector("img");a&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.objectFit="cover")},Me={createPureFunction:e=>e,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(e={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...e})},D0=e=>{const r={};return Object.entries(e).forEach(([t,a])=>{r[t]=()=>{try{return a()}catch{return Promise.resolve({default:null})}}}),r},xa={createDebounce:e=>r=>{let t;return((...a)=>{clearTimeout(t),t=setTimeout(()=>r(...a),e)})},memoize:e=>{const r=new Map;return((...t)=>{const a=JSON.stringify(t);if(r.has(a))return r.get(a);const i=e(...t);return r.set(a,i),i})},isDeepEqual:(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const t=Object.keys(e),a=Object.keys(r);if(t.length!==a.length)return!1;for(const i of t)if(!a.includes(i)||!xa.isDeepEqual(e[i],r[i]))return!1;return!0},createThrottle:e=>r=>{let t=0;return((...a)=>{const i=Date.now();if(i-t>=e)return t=i,r(...a)})}},C0=e=>{const r={};return Object.entries(e).forEach(([t,a])=>{r[t]={},Object.entries(a).forEach(([i,o])=>{r[t][i]=()=>import(o).then(s=>({[i]:s[i]}))})}),r},Oe={getModuleSize:e=>new Promise(r=>{if(typeof window<"u"&&"performance"in window){const a=performance.getEntriesByType("resource").find(i=>i.name.includes(e));r(a?.transferSize||0)}else r(0)}),usageTracker:new Set,trackUsage:e=>{Me.isDevelopment&&Oe.usageTracker.add(e)},getUsageReport:()=>Me.isDevelopment?Array.from(Oe.usageTracker).sort():[],estimateImpact:e=>{const r=e.map(t=>Oe.getModuleSize(t).then(a=>[t,a]));return Promise.all(r).then(t=>{const a={};let i=0;return t.forEach(([o,s])=>{a[o]=s,i+=s}),{total:i,modules:a}})}},pa={inlineCriticalCSS:e=>{if(typeof document<"u"){const r=document.createElement("style");r.textContent=e,document.head.appendChild(r)}},loadAsyncCSS:e=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.media="print",r.onload=()=>{r.media="all"},document.head.appendChild(r)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const r=new Set;return e.forEach(t=>{try{document.querySelector(t)&&r.add(t)}catch{}}),{used:Array.from(r),unused:e.filter(t=>!r.has(t))}}},S0=(e={})=>{const{features:r={},criticalCSS:t="",enableUsageTracking:a=Me.isDevelopment}=e;return{features:Me.createFeatureFlags(r),initialize:()=>{t&&typeof document<"u"&&pa.inlineCriticalCSS(t)},cleanup:()=>{Oe.usageTracker.clear()},getReport:()=>({usage:Oe.getUsageReport(),features:Me.createFeatureFlags(r)})}};let dn;function V0(e){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function be(e){return dn||(dn=V0()),dn}function A0(){const e=be(),r=e.getCurrentState();return{navigate:(t,a)=>{e.navigate(t,a)},goBack:t=>{e.goBack(t)},replace:(t,a)=>{e.replace(t,a)},currentPath:r.currentPath,searchParams:r.searchParams,params:r.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function T0(){const r=be().getCurrentState(),t=Object.keys(r.searchParams).length>0?"?"+new URLSearchParams(r.searchParams).toString():"";return{pathname:r.currentPath,search:t,searchParams:r.searchParams,hash:"",state:{},key:r.currentPath}}function L0(){const e=be(),r=e.getCurrentState();return[new URLSearchParams(r.searchParams),i=>{const o=i instanceof URLSearchParams?Object.fromEntries(i.entries()):i,s=new URLSearchParams(o).toString(),l=r.currentPath+(s?`?${s}`:"");e.replace(l)}]}const Ae={navigate:(e,r)=>{be().navigate(e,r)},goBack:e=>{be().goBack(e)},replace:(e,r)=>{be().replace(e,r)},getCurrentPath:()=>be().getCurrentPath(),getSearchParams:()=>be().getSearchParams(),goToMail:()=>{Ae.navigate("/mail")},goToPreferences:()=>{Ae.navigate("/preferences")},goToCompose:(e,r)=>{const t=new URLSearchParams;e&&t.set("type",e),r&&Object.entries(r).forEach(([i,o])=>{t.set(i,o)});const a=t.toString();Ae.navigate(`/mail/compose${a?`?${a}`:""}`)},goToConnect:()=>{Ae.navigate("/connect")},goToDelegate:()=>{Ae.navigate("/admin/delegate")},goToHome:()=>{Ae.navigate("/")},canGoBack:()=>be().canGoBack()};function I0(e,r=3,t=1e3){return y.lazy(()=>new Promise((a,i)=>{const o=s=>{e().then(a).catch(l=>{s>0?setTimeout(()=>{o(s-1)},t):i(l)})};o(r)}))}function P0(e){let r=null;const t=()=>(r||(r=e()),r.then(()=>{}));return{Component:y.lazy(()=>r||e()),preload:t}}function M0(e,r={}){const{fallback:t=n.jsxDEV("div",{children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:75,columnNumber:16},this),errorFallback:a=n.jsxDEV("div",{children:"Failed to load component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:76,columnNumber:21},this),loadingDelay:i=200,minimumLoadingTime:o=500}=r,s=y.lazy(async()=>{const c=Date.now();try{const u=await e(),m=Date.now()-c;return m<o&&await new Promise(b=>setTimeout(b,o-m)),u}catch{return{default:(()=>a)}}}),l=()=>{const[c,u]=y.useState(!1);return y.useEffect(()=>{const m=setTimeout(()=>{u(!0)},i);return()=>clearTimeout(m)},[]),c?n.jsxDEV(n.Fragment,{children:t},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:120,columnNumber:12},this):null};return y.forwardRef((c,u)=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(l,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:124,columnNumber:25},this),children:n.jsxDEV(s,{...c,ref:u},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:124,columnNumber:5},this))}function Na(e,r={}){const[t,a]=y.useState(!1),[i,o]=y.useState(!1);return y.useEffect(()=>{const s=e.current;if(!s||i)return;const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),o(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...r});return l.observe(s),()=>{l.disconnect()}},[e,r,i]),t}const O0=({children:e,fallback:r=n.jsxDEV("div",{children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:178,columnNumber:14},void 0),threshold:t=.01,rootMargin:a="50px",placeholder:i})=>{const o=y.useRef(null),s=Na(o,{threshold:t,rootMargin:a});return n.jsxDEV("div",{ref:o,children:s?e:i||r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:189,columnNumber:10},void 0)};function R0(e){const{importFn:r,preloadOnHover:t=!0,preloadOnFocus:a=!0,prefetchDelay:i=50}=e;let o=null,s=null;const l=()=>(s||(s=r()),s),c=()=>{o&&clearTimeout(o),o=setTimeout(()=>{l()},i)};return{Component:y.lazy(()=>s||r()),preload:l,linkProps:{...t&&{onMouseEnter:c,onMouseLeave:()=>{o&&clearTimeout(o)}},...a&&{onFocus:c}}}}function z0(e,r=[]){const[t,a]=y.useState(null),[i,o]=y.useState(!0),[s,l]=y.useState(null);return y.useEffect(()=>{let c=!0;return o(!0),l(null),e().then(u=>{c&&(a(u),o(!1))}).catch(u=>{c&&(l(u),o(!1))}),()=>{c=!1}},[e,...r]),{module:t,loading:i,error:s}}class ya{constructor(r=3,t=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=r,this.delay=t}add(r){this.queue.add(r),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const r=Array.from(this.queue).slice(0,this.batchSize);r.forEach(t=>this.queue.delete(t)),await Promise.all(r.map(t=>t().catch(()=>{}))),this.queue.size>0&&await new Promise(t=>setTimeout(t,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function B0(e,r,t){if(typeof document>"u")return;const a=document.createElement("link");a.rel=r,a.href=e,t&&(r==="preload"||r==="prefetch")&&(a.as=t),document.head.appendChild(a)}var bn=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(bn||{});class va{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(bn).filter(r=>typeof r=="number").forEach(r=>{this.queues.set(r,[])})}load(r,t=1){const a=this.queues.get(t);a&&a.push(r),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[r,t]of this.queues)for(;t.length>0;){const a=t.shift();if(a)try{await a()}catch{}r>=2&&await new Promise(i=>setTimeout(i,50))}this.isProcessing=!1}}}const W0=new ya,F0=new va;class fn{constructor(r={}){this.prefix=r.prefix||"mailbox",this.defaultTTL=r.ttl,this.platformStorage=r.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const r=new Map;return{getItem:t=>r.get(t)||null,setItem:(t,a)=>{r.set(t,a)},removeItem:t=>{r.delete(t)},clear:()=>{r.clear()},getAllKeys:()=>Array.from(r.keys())}}getKey(r){return`${this.prefix}-${r}`}isExpired(r){return r.ttl?Date.now()-r.timestamp>r.ttl:!1}set(r,t,a){try{const i={value:t,timestamp:Date.now(),ttl:a||this.defaultTTL};this.platformStorage.setItem(this.getKey(r),JSON.stringify(i))}catch{}}get(r,t){try{const a=this.platformStorage.getItem(this.getKey(r));if(!a)return t;const i=JSON.parse(a);return this.isExpired(i)?(this.remove(r),t):i.value}catch{return t}}remove(r){try{this.platformStorage.removeItem(this.getKey(r))}catch{}}clear(r){try{if(this.platformStorage.getAllKeys){const t=this.platformStorage.getAllKeys(),a=this.getKey(r||""),i=t.filter(o=>o.startsWith(a));for(const o of i)this.platformStorage.removeItem(o)}else this.platformStorage.clear?.()}catch(t){console.error("Failed to clear storage:",t)}}has(r){try{return this.platformStorage.getItem(this.getKey(r))!==null}catch(t){return console.error(`Failed to check item ${r}:`,t),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),t=`${this.prefix}-`;return r.filter(a=>a.startsWith(t)).map(a=>a.substring(t.length))}return[]}catch(r){return console.error("Failed to get all keys:",r),[]}}}const q0=new fn,$0=new fn({prefix:"mailbox-theme"}),H0=new fn({prefix:"walletUser",ttl:10080*60*1e3}),G0=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(r,t)=>{try{e.setItem(r,t)}catch{}},getItem:r=>{try{return e.getItem(r)}catch{return null}},removeItem:r=>{try{e.removeItem(r)}catch{}}}};function ja(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const r=navigator.userAgent.toLowerCase();let t="unknown",a=!1;r.includes("metamask")?(t="metamask",a=!0):r.includes("trustwallet")?(t="trustwallet",a=!0):r.includes("coinbase")?(t="coinbase",a=!0):r.includes("rainbow")?(t="rainbow",a=!0):r.includes("phantom")?(t="phantom",a=!0):r.includes("solflare")?(t="solflare",a=!0):r.includes("exodus")&&(t="exodus",a=!0);const i=!!window.ethereum,o=!!window.solana||!!window.phantom?.solana;(i||o)&&!a&&(a=!0,window.ethereum?.isMetaMask?t="metamask":window.ethereum?.isCoinbaseWallet?t="coinbase":window.ethereum?.isRainbow?t="rainbow":window.phantom?t="phantom":window.solflare&&(t="solflare"));const s=i?window.ethereum:o?window.solana||window.phantom?.solana:null;return{isWalletBrowser:a,walletType:t,hasEthereum:i,hasSolana:o,provider:s}}catch{return e}}async function Y0(){const e=ja();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const r=await e.provider.request({method:"eth_requestAccounts"});if(r&&r.length>0)return{success:!0,address:r[0]}}catch{}if(e.hasSolana&&e.provider)try{const r=await e.provider.connect();if(r.publicKey)return{success:!0,address:r.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown connection error"}}}const K0={utils:{cn:f}};Object.defineProperty(d,"ArrowLeftIcon",{enumerable:!0,get:()=>A.ArrowLeftIcon}),Object.defineProperty(d,"ArrowRightIcon",{enumerable:!0,get:()=>A.ArrowRightIcon}),Object.defineProperty(d,"Bars3Icon",{enumerable:!0,get:()=>A.Bars3Icon}),Object.defineProperty(d,"BellIcon",{enumerable:!0,get:()=>A.BellIcon}),Object.defineProperty(d,"BellSlashIcon",{enumerable:!0,get:()=>A.BellSlashIcon}),Object.defineProperty(d,"ChartBarIcon",{enumerable:!0,get:()=>A.ChartBarIcon}),Object.defineProperty(d,"CheckCircleIcon",{enumerable:!0,get:()=>A.CheckCircleIcon}),Object.defineProperty(d,"CheckIcon",{enumerable:!0,get:()=>A.CheckIcon}),Object.defineProperty(d,"ChevronDownIcon",{enumerable:!0,get:()=>A.ChevronDownIcon}),Object.defineProperty(d,"ChevronLeftIcon",{enumerable:!0,get:()=>A.ChevronLeftIcon}),Object.defineProperty(d,"ChevronRightIcon",{enumerable:!0,get:()=>A.ChevronRightIcon}),Object.defineProperty(d,"ChevronUpIcon",{enumerable:!0,get:()=>A.ChevronUpIcon}),Object.defineProperty(d,"ClockIcon",{enumerable:!0,get:()=>A.ClockIcon}),Object.defineProperty(d,"CodeBracketIcon",{enumerable:!0,get:()=>A.CodeBracketIcon}),Object.defineProperty(d,"Cog6ToothIcon",{enumerable:!0,get:()=>A.Cog6ToothIcon}),Object.defineProperty(d,"CreditCardIcon",{enumerable:!0,get:()=>A.CreditCardIcon}),Object.defineProperty(d,"DocumentTextIcon",{enumerable:!0,get:()=>A.DocumentTextIcon}),Object.defineProperty(d,"EnvelopeIcon",{enumerable:!0,get:()=>A.EnvelopeIcon}),Object.defineProperty(d,"ExclamationTriangleIcon",{enumerable:!0,get:()=>A.ExclamationTriangleIcon}),Object.defineProperty(d,"EyeSlashIcon",{enumerable:!0,get:()=>A.EyeSlashIcon}),Object.defineProperty(d,"GlobeAltIcon",{enumerable:!0,get:()=>A.GlobeAltIcon}),Object.defineProperty(d,"HomeIcon",{enumerable:!0,get:()=>A.HomeIcon}),Object.defineProperty(d,"InboxIcon",{enumerable:!0,get:()=>A.InboxIcon}),Object.defineProperty(d,"InformationCircleIcon",{enumerable:!0,get:()=>A.InformationCircleIcon}),Object.defineProperty(d,"KeyIcon",{enumerable:!0,get:()=>A.KeyIcon}),Object.defineProperty(d,"MegaphoneIcon",{enumerable:!0,get:()=>A.MegaphoneIcon}),Object.defineProperty(d,"MinusIcon",{enumerable:!0,get:()=>A.MinusIcon}),Object.defineProperty(d,"PaperAirplaneIcon",{enumerable:!0,get:()=>A.PaperAirplaneIcon}),Object.defineProperty(d,"PaperClipIcon",{enumerable:!0,get:()=>A.PaperClipIcon}),Object.defineProperty(d,"PlusIcon",{enumerable:!0,get:()=>A.PlusIcon}),Object.defineProperty(d,"RocketLaunchIcon",{enumerable:!0,get:()=>A.RocketLaunchIcon}),Object.defineProperty(d,"ShieldCheckIcon",{enumerable:!0,get:()=>A.ShieldCheckIcon}),Object.defineProperty(d,"SparklesIcon",{enumerable:!0,get:()=>A.SparklesIcon}),Object.defineProperty(d,"StarIcon",{enumerable:!0,get:()=>A.StarIcon}),Object.defineProperty(d,"TrashIcon",{enumerable:!0,get:()=>A.TrashIcon}),Object.defineProperty(d,"UserGroupIcon",{enumerable:!0,get:()=>A.UserGroupIcon}),Object.defineProperty(d,"XMarkIcon",{enumerable:!0,get:()=>A.XMarkIcon}),Object.defineProperty(d,"CheckCircleIconSolid",{enumerable:!0,get:()=>xe.CheckCircleIcon}),Object.defineProperty(d,"CheckIconSolid",{enumerable:!0,get:()=>xe.CheckIcon}),Object.defineProperty(d,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>xe.ExclamationTriangleIcon}),Object.defineProperty(d,"StarIconSolid",{enumerable:!0,get:()=>xe.StarIcon}),d.AIMeta=bm,d.AITrainingEnhancer=gm,d.AI_TRAINING_CONFIGS=Um,d.ActionButton=ls,d.AddressLink=Ts,d.Alert=wr,d.AlertBanner=Li,d.AlertDescription=Ti,d.AlertTitle=Ai,d.AnimatedSection=fr,d.AreaChart=hu,d.AspectRatio=Ga,d.AudioPlayer=Wu,d.Avatar=su,d.Backdrop=Bs,d.Badge=Bi,d.BarChart=bu,d.BatchRender=Gc,d.Blockquote=vi,d.BodyText=gi,d.BorderAccent=ri,d.Box=En,d.Breadcrumb=Ft,d.BreadcrumbNav=El,d.BreadcrumbSection=kc,d.BurndownChart=wu,d.Button=me,d.CACHE_CONFIGS=Kt,d.CTASection=nm,d.Calendar=It,d.CalloutBox=iu,d.CancellableRequest=Pm,d.Card=Zr,d.CardContent=nu,d.CardFooter=tu,d.CardHeader=ru,d.Center=Ba,d.ChainBadge=Ao,d.Checkbox=Fo,d.Code=pi,d.CodeBlock=wc,d.CodeDisplay=Ni,d.CollapsibleDocumentationTopic=Uc,d.ColorPicker=ds,d.ColorPickerAdvanced=bs,d.ColorSwatch=fs,d.Combobox=Go,d.Command=Ws,d.ComponentPreloader=ln,d.ConditionalRender=qc,d.ConfirmationDialog=cc,d.Container=Ma,d.CreditCardInput=ys,d.CriticalPathOptimizer=wd,d.CurrencyInput=vs,d.DashboardStatCard=ou,d.DataTable=Ol,d.DateInput=Ro,d.DateRangePicker=cs,d.DateTimePicker=us,d.Dialog=Ot,d.Divider=Ja,d.DragDrop=dc,d.Drawer=Xu,d.Dropdown=Yo,d.EmptyState=Wt,d.ErrorBoundary=Tc,d.ExpensiveComponent=Wc,d.ExternalLink=wl,d.FadeInScale=Rs,d.FadeInUp=Os,d.FeatureBlock=Ys,d.FeatureCard=Kc,d.FeatureGrid=em,d.FileInput=Xo,d.Flex=Sa,d.FlexContainer=Pa,d.FloatingElement=zs,d.FloatingPanel=ni,d.FocusTrap=Ju,d.FormAlerts=os,d.FormField=ns,d.FormFieldGroup=br,d.FormSection=Hs,d.FormattedNumber=wi,d.Gauge=Du,d.GlobalLazyErrorBoundary=Mc,d.GradientIconContainer=Zs,d.Grid=Oa,d.HStack=za,d.Heading=ui,d.HelperText=ji,d.HoverCard=mc,d.IconContainer=nl,d.IconText=tl,d.Image=Au,d.ImageCropper=Iu,d.ImageGallery=Tu,d.InfiniteScroll=rc,d.InfoBox=al,d.InfoCard=au,d.Input=ur,d.KYCLevelCard=lm,d.KYCStatusBadge=im,d.Kbd=yi,d.KeyValuePair=cu,d.Label=Yr,d.LanguageSelector=Vc,d.LazyComponent=$c,d.LazyErrorBoundary=hr,d.LazyImage=Qm,d.LazyLoadQueue=ya,d.LazyWalletButton=kd,d.LazyWrapper=O0,d.Lightbox=Pu,d.LineChart=fu,d.Link=kl,d.List=$l,d.ListItem=Hl,d.ListItemWithAction=Gl,d.LiveStream=Bu,d.LoadPriority=bn,d.LoadingDots=Di,d.LoadingOptimizer=Cm,d.LoadingOverlay=Ui,d.LoadingState=Ci,d.Logo=ol,d.Main=fm,d.Masonry=si,d.MasterDetailLayout=dm,d.MasterListItem=mm,d.MediaUploader=Gu,d.MentionInput=es,d.Modal=Qr,d.ModalContent=Xr,d.ModalFooter=Jr,d.ModalHeader=Qu,d.MultiSelect=Ho,d.NavigationList=Cl,d.NavigationMenu=Dl,d.NetworkErrorBoundary=Ic,d.NoContent=du,d.NotificationBadge=Ri,d.NotificationPanel=zi,d.NumberInput=Mo,d.OptimizedAPIClient=Lm,d.OptimizedImage=Yc,d.OptimizedRoutePreloader=Sm,d.Overlay=lr,d.PageContainer=Ha,d.PageHeader=cm,d.PageSectionHeader=ll,d.PageTitle=mi,d.Pagination=Vl,d.PaginationNav=Al,d.PerformanceBoundary=Hc,d.PerformanceOptimizer=Dm,d.PhoneDirectory=ss,d.PhoneInput=Wo,d.PieChart=gu,d.PlatformSpecificComponents=ld,d.PlaylistManager=Ku,d.PodcastPlayer=Hu,d.Popover=nc,d.Portal=Ne,d.PriorityLoader=va,d.Progress=Cu,d.ProgressCircle=Su,d.PromotionalBanner=Dc,d.PullToRefresh=jc,d.QRCodeDisplay=Zu,d.QuickActions=cl,d.QuizBuilder=Ss,d.RadioGroup=qo,d.RelativeTime=Ei,d.Resizable=ai,d.RouteBasedLazyLoader=sn,d.SafeAppWrapper=Oc,d.ScrollArea=oi,d.ScrollSpy=tc,d.SearchInput=Oo,d.Section=qa,d.SectionBadge=bl,d.SectionHeader=fl,d.SectionTitle=bi,d.SecurityProvider=Rc,d.Select=qr,d.SelectContent=mr,d.SelectField=is,d.SelectGroup=$o,d.SelectItem=dr,d.SelectLabel=St,d.SelectScrollDownButton=Hr,d.SelectScrollUpButton=$r,d.SelectSeparator=Vt,d.SelectTrigger=cr,d.SelectValue=Ct,d.Separator=ei,d.SettingsList=hl,d.Sheet=ac,d.SideNav=Sl,d.SignaturePad=gs,d.SignatureRequest=hs,d.SkeletonLoader=Si,d.Slider=Zo,d.SliderInput=Qo,d.SmartContent=_l,d.SmartLink=Kr,d.SmartWalletProviders=jd,d.Spacer=Wa,d.Sparkline=ju,d.Spinner=qe,d.SplitPane=ti,d.Stack=kr,d.StandardPageLayout=um,d.StatCard=qs,d.StatDisplay=mu,d.StatusBadge=Vo,d.StatusIndicator=Lo,d.StepList=Ac,d.Stepper=Tl,d.StepperNav=Ll,d.SubscriptionGatedComponents=sd,d.SumsubWebSDK=om,d.Switch=Dt,d.Table=Ml,d.TableOfContents=Pl,d.Tabs=Ul,d.TabsContent=Bt,d.TabsList=Rt,d.TabsTrigger=zt,d.TagInput=Jo,d.Text=li,d.TextArea=Po,d.TextAreaField=as,d.TextField=ts,d.TextInputModal=ic,d.TextLink=xi,d.TimePicker=Ut,d.Toast=Dn,d.ToastNotification=Oi,d.ToastProvider=Mi,d.ToggleGroup=Ko,d.Tooltip=oc,d.TrackedButton=Cc,d.TrackedLink=Sc,d.TransferList=Kl,d.TreeView=Ql,d.TruncatedText=ki,d.UanimatedUcounter=Ls,d.UaudioUwaveform=Fu,d.UavatarUgroup=lu,d.UbadgeUdesigner=Wi,d.UbubbleUchart=pu,d.UcellUeditor=Fl,d.UcodeUhighlighter=Ns,d.UcolumnUresize=Wl,d.UcurrencyUconverter=js,d.UcurrencyUrates=_s,d.UdataUgrid=Rl,d.UdoubleUtap=Nc,d.UdragUdropUlist=bc,d.UfieldUmapper=Ds,d.UfocusUindicator=Ks,d.UformUbuilder=ks,d.UformUtemplate=Es,d.UformUvalidator=ws,d.UfunnelUchart=ku,d.UgestureUdetector=hc,d.Uheatmap=_u,d.UhoverUtooltip=ec,d.UimageUcomparison=Lu,d.UkeyboardUshortcut=il,d.UlistingUform=Xl,d.UlongUpress=yc,d.UmarkdownUrenderer=ps,d.UmediaUplaylist=Yu,d.UmetricUcomparison=Uu,d.UmorphUtransition=sl,d.UnestedUdrag=gc,d.UparallaxUscroll=ul,d.UperformanceUchart=Eu,d.UpinchUzoom=pc,d.UpivotUtable=zl,d.UprofileUheader=uu,d.UprogressUtracker=Vu,d.UradarUchart=xu,d.UradialUmenu=vc,d.UresizableUpanels=ii,d.UrevealUonUscroll=ml,d.UsankeyUdiagram=vu,d.UscatterUplot=Nu,d.UschemaUvalidator=Us,d.UscreenUreaderUtext=_i,d.UskipUnavigation=xl,d.UsortUdropdown=pl,d.UsortableUgrid=fc,d.UspreadsheetUgrid=Bl,d.UstatusUpipeline=Io,d.UsurveyUbuilder=Cs,d.UswipeUactions=xc,d.UtableUreservation=ql,d.UtimeUslotUpicker=ms,d.UtreeUmap=yu,d.UuserUtable=Yl,d.UversionUbadge=Nl,d.UvideoUcall=zu,d.UvideoUthumbnail=Ou,d.UvoiceUrecorder=$u,d.VStack=Ra,d.VideoEditor=Ru,d.VideoPlayer=Mu,d.VirtualList=Zl,d.VirtualListItem=Fc,d.VisuallyHidden=yl,d.WEB3_CONCEPTS=jm,d.WEB3_EMAIL_HEADINGS=vm,d.WEB3_HEADING_PATTERNS=de,d.WalletPreloader=rr,d.WaveForm=qu,d.WysiwygEditor=xs,d.addResourceHint=B0,d.aiOptimizationPresets=yd,d.appStorage=q0,d.autoConnectWalletBrowser=Y0,d.batchDOMUpdates=l0,d.bundleAnalysis=Oe,d.buttonVariants=Lt,d.cacheHeaders=qm,d.cacheUtils=Mm,d.checkPerformanceBudget=qd,d.clearComponentCache=Xm,d.clearConditionalCache=cd,d.clearRenderCounts=Vd,d.cn=f,d.conditionalCSS=Bm,d.convertFileSize=Qd,d.createAIMetaTags=Yt,d.createAIOptimizedSchema=tn,d.createAdvancedLazyComponent=Ym,d.createCSSVariables=n0,d.createConditionalImports=D0,d.createConditionalLazyComponent=od,d.createEnhancedFAQSchema=hm,d.createEnhancedOpenGraph=Ht,d.createEnhancedTwitterCard=Gt,d.createFeature=en,d.createLazyComponent=aa,d.createLazyComponentFactory=Ad,d.createLazyRoute=R0,d.createLazyWalletProvider=mn,d.createLibraryImports=ad,d.createMemoComponent=zc,d.createOptimizedStyles=Jd,d.createProgressiveComponent=M0,d.createSecurityFeatures=rm,d.createSelectiveExports=C0,d.createSelectiveMemoComponent=Bc,d.createSemanticHeading=Nm,d.createSimpleStorage=G0,d.createTechnicalArticleSchema=nn,d.createTreeShakingConfig=S0,d.createUIComponents=td,d.createWeb3ProductSchema=rn,d.cspDirectives=Wm,d.cssOptimization=pa,d.deadCodeElimination=Me,d.default=K0,d.defaultPerformanceBudget=ba,d.detectAvailableWallets=cn,d.detectWalletBrowser=ja,d.exportPerformanceData=$d,d.formatFileSize=Zd,d.generateAIMetaTags=gd,d.generateAIMetadata=_m,d.generateAIStructuredData=xd,d.generateAdvancedSEO=xm,d.generateCSP=na,d.generateCSPDirectives=an,d.generateConceptGraph=km,d.generateContentRelationships=hd,d.generateEntityRecognition=ua,d.generateImageSEO=h0,d.generatePerformanceTrackingSchema=Nd,d.generatePictureElement=j0,d.generatePlaceholder=E0,d.generateQAPairs=Em,d.generateSemanticMarkup=la,d.generateSizes=p0,d.generateSocialImageMeta=N0,d.generateSrcSet=x0,d.generateTopicClustering=ca,d.generateTrainingExamples=wm,d.getConditionalStats=md,d.getEnvironmentType=ea,d.getLazyLoadingStats=Jm,d.getOptimalImageFormat=v0,d.getPerformanceMonitor=vr,d.getPreloadingStats=fd,d.getRenderCounts=Sd,d.getSecurityHeaders=ta,d.getUINavigationService=be,d.getWebVitals=Pd,d.initializeAdvancedPreloading=bd,d.initializePerformanceMonitoring=Bd,d.initializePreloading=id,d.inlineCriticalStyles=c0,d.isLocalhost=Xt,d.isNetworkAccess=Jt,d.isWalletBrowser=Qt,d.isWebEnvironment=ra,d.lazyLoadQueue=W0,d.lazyWithPreload=P0,d.lazyWithRetry=I0,d.loadCSS=Rm,d.loadCriticalCSS=e0,d.loadNonCriticalCSS=r0,d.measureAsyncOperation=Fd,d.measureImagePerformance=w0,d.navigationHelper=Ae,d.optimizeClassNames=u0,d.optimizeContainment=o0,d.optimizeFlex=b0,d.optimizeGrid=d0,d.optimizeWillChange=s0,d.optimizedFetch=Zt,d.pageSEOConfigs=pm,d.parseFileSize=Xd,d.performanceBudget=he,d.performanceUtils=pr,d.prefersReducedMotion=fa,d.prefetchResource=Md,d.preloadComponent=nd,d.preloadImage=_0,d.preloadResource=Od,d.preloadRoute=Ld,d.preserveAspectRatio=U0,d.priorityLoader=F0,d.reportWebVitals=Id,d.routeConfig=ia,d.securityHeaders=Fm,d.setupCSPReporting=$m,d.setupLazyLoading=y0,d.setupProgressiveLoading=k0,d.shouldEnableWallet=Om,d.smartLinkVariants=gr,d.supportsAVIF=ha,d.supportsCSSImports=zm,d.supportsWebP=ga,d.themeStorage=$0,d.useClickOutside=At,d.useCodeLoader=qt,d.useComponentPerformance=da,d.useCopyToClipboard=Yd,d.useDebugMemo=Dd,d.useDynamicImport=z0,d.useErrorRecovery=Pc,d.useFormSubmission=Hd,d.useImageLazyLoading=Td,d.useLazyLoad=Na,d.useLazyStyles=m0,d.useLocation=T0,d.useMediaQuery=f0,d.useMemoryLeakDetection=Rd,d.useMultipleCopyToClipboard=Kd,d.useNavigation=A0,d.useOptimizedTheme=g0,d.useOptimizedWallets=_d,d.usePerformanceMark=Ed,d.useReducedMotion=i0,d.useRenderCount=Cd,d.useResponsiveStyles=a0,d.useSearchParams=L0,d.useSmartLinks=vl,d.useStableCallback=Ud,d.useToast=Ii,d.useToggle=Gd,d.utils=xa,d.validateHeadingStructure=ym,d.walletStorage=H0,d.web3SecurityNotes=Hm,d.withLazyErrorBoundary=Lc,d.withPerformanceTracking=Wd,d.withRetry=Im,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
65
+ `;return`data:image/svg+xml;base64,${btoa(t)}`},l0=(e,r)=>{const a=1/r*100;e.style.position="relative",e.style.paddingTop=`${a}%`;const t=e.querySelector("img");t&&(t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.objectFit="cover")},Ae={createPureFunction:e=>e,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(e={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...e})},c0=e=>{const r={};return Object.entries(e).forEach(([a,t])=>{r[a]=()=>{try{return t()}catch{return Promise.resolve({default:null})}}}),r},rt={createDebounce:e=>r=>{let a;return((...t)=>{clearTimeout(a),a=setTimeout(()=>r(...t),e)})},memoize:e=>{const r=new Map;return((...a)=>{const t=JSON.stringify(a);if(r.has(t))return r.get(t);const o=e(...a);return r.set(t,o),o})},isDeepEqual:(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const a=Object.keys(e),t=Object.keys(r);if(a.length!==t.length)return!1;for(const o of a)if(!t.includes(o)||!rt.isDeepEqual(e[o],r[o]))return!1;return!0},createThrottle:e=>r=>{let a=0;return((...t)=>{const o=Date.now();if(o-a>=e)return a=o,r(...t)})}},d0=e=>{const r={};return Object.entries(e).forEach(([a,t])=>{r[a]={},Object.entries(t).forEach(([o,i])=>{r[a][o]=()=>import(i).then(s=>({[o]:s[o]}))})}),r},Te={getModuleSize:e=>new Promise(r=>{if(typeof window<"u"&&"performance"in window){const t=performance.getEntriesByType("resource").find(o=>o.name.includes(e));r(t?.transferSize||0)}else r(0)}),usageTracker:new Set,trackUsage:e=>{Ae.isDevelopment&&Te.usageTracker.add(e)},getUsageReport:()=>Ae.isDevelopment?Array.from(Te.usageTracker).sort():[],estimateImpact:e=>{const r=e.map(a=>Te.getModuleSize(a).then(t=>[a,t]));return Promise.all(r).then(a=>{const t={};let o=0;return a.forEach(([i,s])=>{t[i]=s,o+=s}),{total:o,modules:t}})}},nt={inlineCriticalCSS:e=>{if(typeof document<"u"){const r=document.createElement("style");r.textContent=e,document.head.appendChild(r)}},loadAsyncCSS:e=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.media="print",r.onload=()=>{r.media="all"},document.head.appendChild(r)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const r=new Set;return e.forEach(a=>{try{document.querySelector(a)&&r.add(a)}catch{}}),{used:Array.from(r),unused:e.filter(a=>!r.has(a))}}},u0=(e={})=>{const{features:r={},criticalCSS:a="",enableUsageTracking:t=Ae.isDevelopment}=e;return{features:Ae.createFeatureFlags(r),initialize:()=>{a&&typeof document<"u"&&nt.inlineCriticalCSS(a)},cleanup:()=>{Te.usageTracker.clear()},getReport:()=>({usage:Te.getUsageReport(),features:Ae.createFeatureFlags(r)})}};let Rr;function m0(e){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function se(e){return Rr||(Rr=m0()),Rr}function b0(){const e=se(),r=e.getCurrentState();return{navigate:(a,t)=>{e.navigate(a,t)},goBack:a=>{e.goBack(a)},replace:(a,t)=>{e.replace(a,t)},currentPath:r.currentPath,searchParams:r.searchParams,params:r.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function f0(){const r=se().getCurrentState(),a=Object.keys(r.searchParams).length>0?"?"+new URLSearchParams(r.searchParams).toString():"";return{pathname:r.currentPath,search:a,searchParams:r.searchParams,hash:"",state:{},key:r.currentPath}}function g0(){const e=se(),r=e.getCurrentState();return[new URLSearchParams(r.searchParams),o=>{const i=o instanceof URLSearchParams?Object.fromEntries(o.entries()):o,s=new URLSearchParams(i).toString(),l=r.currentPath+(s?`?${s}`:"");e.replace(l)}]}const je={navigate:(e,r)=>{se().navigate(e,r)},goBack:e=>{se().goBack(e)},replace:(e,r)=>{se().replace(e,r)},getCurrentPath:()=>se().getCurrentPath(),getSearchParams:()=>se().getSearchParams(),goToMail:()=>{je.navigate("/mail")},goToPreferences:()=>{je.navigate("/preferences")},goToCompose:(e,r)=>{const a=new URLSearchParams;e&&a.set("type",e),r&&Object.entries(r).forEach(([o,i])=>{a.set(o,i)});const t=a.toString();je.navigate(`/mail/compose${t?`?${t}`:""}`)},goToConnect:()=>{je.navigate("/connect")},goToDelegate:()=>{je.navigate("/admin/delegate")},goToHome:()=>{je.navigate("/")},canGoBack:()=>se().canGoBack()};function h0(e,r=3,a=1e3){return y.lazy(()=>new Promise((t,o)=>{const i=s=>{e().then(t).catch(l=>{s>0?setTimeout(()=>{i(s-1)},a):o(l)})};i(r)}))}function p0(e){let r=null;const a=()=>(r||(r=e()),r.then(()=>{}));return{Component:y.lazy(()=>r||e()),preload:a}}function x0(e,r={}){const{fallback:a=n.jsxDEV("div",{children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:75,columnNumber:16},this),errorFallback:t=n.jsxDEV("div",{children:"Failed to load component"},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:76,columnNumber:21},this),loadingDelay:o=200,minimumLoadingTime:i=500}=r,s=y.lazy(async()=>{const d=Date.now();try{const c=await e(),u=Date.now()-d;return u<i&&await new Promise(b=>setTimeout(b,i-u)),c}catch{return{default:(()=>t)}}}),l=()=>{const[d,c]=y.useState(!1);return y.useEffect(()=>{const u=setTimeout(()=>{c(!0)},o);return()=>clearTimeout(u)},[]),d?n.jsxDEV(n.Fragment,{children:a},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:120,columnNumber:12},this):null};return y.forwardRef((d,c)=>n.jsxDEV(y.Suspense,{fallback:n.jsxDEV(l,{},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:124,columnNumber:25},this),children:n.jsxDEV(s,{...d,ref:c},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:125,columnNumber:7},this)},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:124,columnNumber:5},this))}function at(e,r={}){const[a,t]=y.useState(!1),[o,i]=y.useState(!1);return y.useEffect(()=>{const s=e.current;if(!s||o)return;const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(t(!0),i(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...r});return l.observe(s),()=>{l.disconnect()}},[e,r,o]),a}const N0=({children:e,fallback:r=n.jsxDEV("div",{children:"Loading..."},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:178,columnNumber:14},void 0),threshold:a=.01,rootMargin:t="50px",placeholder:o})=>{const i=y.useRef(null),s=at(i,{threshold:a,rootMargin:t});return n.jsxDEV("div",{ref:i,children:s?e:o||r},void 0,!1,{fileName:"/Users/johnhuang/0xmail/mail_box_components/src/utils/lazy-loading.tsx",lineNumber:189,columnNumber:10},void 0)};function y0(e){const{importFn:r,preloadOnHover:a=!0,preloadOnFocus:t=!0,prefetchDelay:o=50}=e;let i=null,s=null;const l=()=>(s||(s=r()),s),d=()=>{i&&clearTimeout(i),i=setTimeout(()=>{l()},o)};return{Component:y.lazy(()=>s||r()),preload:l,linkProps:{...a&&{onMouseEnter:d,onMouseLeave:()=>{i&&clearTimeout(i)}},...t&&{onFocus:d}}}}function v0(e,r=[]){const[a,t]=y.useState(null),[o,i]=y.useState(!0),[s,l]=y.useState(null);return y.useEffect(()=>{let d=!0;return i(!0),l(null),e().then(c=>{d&&(t(c),i(!1))}).catch(c=>{d&&(l(c),i(!1))}),()=>{d=!1}},[e,...r]),{module:a,loading:o,error:s}}class tt{constructor(r=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=r,this.delay=a}add(r){this.queue.add(r),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const r=Array.from(this.queue).slice(0,this.batchSize);r.forEach(a=>this.queue.delete(a)),await Promise.all(r.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function _0(e,r,a){if(typeof document>"u")return;const t=document.createElement("link");t.rel=r,t.href=e,a&&(r==="preload"||r==="prefetch")&&(t.as=a),document.head.appendChild(t)}var en=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(en||{});class ot{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(en).filter(r=>typeof r=="number").forEach(r=>{this.queues.set(r,[])})}load(r,a=1){const t=this.queues.get(a);t&&t.push(r),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[r,a]of this.queues)for(;a.length>0;){const t=a.shift();if(t)try{await t()}catch{}r>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}const k0=new tt,w0=new ot;class rn{constructor(r={}){this.prefix=r.prefix||"mailbox",this.defaultTTL=r.ttl,this.platformStorage=r.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const r=new Map;return{getItem:a=>r.get(a)||null,setItem:(a,t)=>{r.set(a,t)},removeItem:a=>{r.delete(a)},clear:()=>{r.clear()},getAllKeys:()=>Array.from(r.keys())}}getKey(r){return`${this.prefix}-${r}`}isExpired(r){return r.ttl?Date.now()-r.timestamp>r.ttl:!1}set(r,a,t){try{const o={value:a,timestamp:Date.now(),ttl:t||this.defaultTTL};this.platformStorage.setItem(this.getKey(r),JSON.stringify(o))}catch{}}get(r,a){try{const t=this.platformStorage.getItem(this.getKey(r));if(!t)return a;const o=JSON.parse(t);return this.isExpired(o)?(this.remove(r),a):o.value}catch{return a}}remove(r){try{this.platformStorage.removeItem(this.getKey(r))}catch{}}clear(r){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),t=this.getKey(r||""),o=a.filter(i=>i.startsWith(t));for(const i of o)this.platformStorage.removeItem(i)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(r){try{return this.platformStorage.getItem(this.getKey(r))!==null}catch(a){return console.error(`Failed to check item ${r}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return r.filter(t=>t.startsWith(a)).map(t=>t.substring(a.length))}return[]}catch(r){return console.error("Failed to get all keys:",r),[]}}}const E0=new rn,U0=new rn({prefix:"mailbox-theme"}),j0=new rn({prefix:"walletUser",ttl:10080*60*1e3}),C0=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(r,a)=>{try{e.setItem(r,a)}catch{}},getItem:r=>{try{return e.getItem(r)}catch{return null}},removeItem:r=>{try{e.removeItem(r)}catch{}}}};function it(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const r=navigator.userAgent.toLowerCase();let a="unknown",t=!1;r.includes("metamask")?(a="metamask",t=!0):r.includes("trustwallet")?(a="trustwallet",t=!0):r.includes("coinbase")?(a="coinbase",t=!0):r.includes("rainbow")?(a="rainbow",t=!0):r.includes("phantom")?(a="phantom",t=!0):r.includes("solflare")?(a="solflare",t=!0):r.includes("exodus")&&(a="exodus",t=!0);const o=!!window.ethereum,i=!!window.solana||!!window.phantom?.solana;(o||i)&&!t&&(t=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const s=o?window.ethereum:i?window.solana||window.phantom?.solana:null;return{isWalletBrowser:t,walletType:a,hasEthereum:o,hasSolana:i,provider:s}}catch{return e}}async function S0(){const e=it();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const r=await e.provider.request({method:"eth_requestAccounts"});if(r&&r.length>0)return{success:!0,address:r[0]}}catch{}if(e.hasSolana&&e.provider)try{const r=await e.provider.connect();if(r.publicKey)return{success:!0,address:r.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown connection error"}}}const V0={utils:{cn:f}};Object.defineProperty(m,"ArrowLeftIcon",{enumerable:!0,get:()=>A.ArrowLeftIcon}),Object.defineProperty(m,"ArrowRightIcon",{enumerable:!0,get:()=>A.ArrowRightIcon}),Object.defineProperty(m,"Bars3Icon",{enumerable:!0,get:()=>A.Bars3Icon}),Object.defineProperty(m,"BellIcon",{enumerable:!0,get:()=>A.BellIcon}),Object.defineProperty(m,"BellSlashIcon",{enumerable:!0,get:()=>A.BellSlashIcon}),Object.defineProperty(m,"ChartBarIcon",{enumerable:!0,get:()=>A.ChartBarIcon}),Object.defineProperty(m,"CheckCircleIcon",{enumerable:!0,get:()=>A.CheckCircleIcon}),Object.defineProperty(m,"CheckIcon",{enumerable:!0,get:()=>A.CheckIcon}),Object.defineProperty(m,"ChevronDownIcon",{enumerable:!0,get:()=>A.ChevronDownIcon}),Object.defineProperty(m,"ChevronLeftIcon",{enumerable:!0,get:()=>A.ChevronLeftIcon}),Object.defineProperty(m,"ChevronRightIcon",{enumerable:!0,get:()=>A.ChevronRightIcon}),Object.defineProperty(m,"ChevronUpIcon",{enumerable:!0,get:()=>A.ChevronUpIcon}),Object.defineProperty(m,"ClockIcon",{enumerable:!0,get:()=>A.ClockIcon}),Object.defineProperty(m,"CodeBracketIcon",{enumerable:!0,get:()=>A.CodeBracketIcon}),Object.defineProperty(m,"Cog6ToothIcon",{enumerable:!0,get:()=>A.Cog6ToothIcon}),Object.defineProperty(m,"CreditCardIcon",{enumerable:!0,get:()=>A.CreditCardIcon}),Object.defineProperty(m,"DocumentTextIcon",{enumerable:!0,get:()=>A.DocumentTextIcon}),Object.defineProperty(m,"EnvelopeIcon",{enumerable:!0,get:()=>A.EnvelopeIcon}),Object.defineProperty(m,"ExclamationTriangleIcon",{enumerable:!0,get:()=>A.ExclamationTriangleIcon}),Object.defineProperty(m,"EyeSlashIcon",{enumerable:!0,get:()=>A.EyeSlashIcon}),Object.defineProperty(m,"GlobeAltIcon",{enumerable:!0,get:()=>A.GlobeAltIcon}),Object.defineProperty(m,"HomeIcon",{enumerable:!0,get:()=>A.HomeIcon}),Object.defineProperty(m,"InboxIcon",{enumerable:!0,get:()=>A.InboxIcon}),Object.defineProperty(m,"InformationCircleIcon",{enumerable:!0,get:()=>A.InformationCircleIcon}),Object.defineProperty(m,"KeyIcon",{enumerable:!0,get:()=>A.KeyIcon}),Object.defineProperty(m,"MegaphoneIcon",{enumerable:!0,get:()=>A.MegaphoneIcon}),Object.defineProperty(m,"MinusIcon",{enumerable:!0,get:()=>A.MinusIcon}),Object.defineProperty(m,"PaperAirplaneIcon",{enumerable:!0,get:()=>A.PaperAirplaneIcon}),Object.defineProperty(m,"PaperClipIcon",{enumerable:!0,get:()=>A.PaperClipIcon}),Object.defineProperty(m,"PlusIcon",{enumerable:!0,get:()=>A.PlusIcon}),Object.defineProperty(m,"RocketLaunchIcon",{enumerable:!0,get:()=>A.RocketLaunchIcon}),Object.defineProperty(m,"ShieldCheckIcon",{enumerable:!0,get:()=>A.ShieldCheckIcon}),Object.defineProperty(m,"SparklesIcon",{enumerable:!0,get:()=>A.SparklesIcon}),Object.defineProperty(m,"StarIcon",{enumerable:!0,get:()=>A.StarIcon}),Object.defineProperty(m,"TrashIcon",{enumerable:!0,get:()=>A.TrashIcon}),Object.defineProperty(m,"UserGroupIcon",{enumerable:!0,get:()=>A.UserGroupIcon}),Object.defineProperty(m,"XMarkIcon",{enumerable:!0,get:()=>A.XMarkIcon}),Object.defineProperty(m,"CheckCircleIconSolid",{enumerable:!0,get:()=>me.CheckCircleIcon}),Object.defineProperty(m,"CheckIconSolid",{enumerable:!0,get:()=>me.CheckIcon}),Object.defineProperty(m,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>me.ExclamationTriangleIcon}),Object.defineProperty(m,"StarIconSolid",{enumerable:!0,get:()=>me.StarIcon}),m.AIMeta=Kd,m.AITrainingEnhancer=Qd,m.AI_TRAINING_CONFIGS=lu,m.ActionButton=qi,m.AddressLink=fs,m.Alert=br,m.AlertBanner=ho,m.AlertDescription=go,m.AlertTitle=fo,m.AnimatedSection=nr,m.AreaChart=Xl,m.AspectRatio=Ct,m.AudioPlayer=kc,m.Avatar=Fl,m.Backdrop=_s,m.Badge=ko,m.BarChart=Kl,m.BatchRender=Cd,m.Blockquote=no,m.BodyText=Qt,m.BorderAccent=Pt,m.Box=dn,m.Breadcrumb=ja,m.BreadcrumbNav=sl,m.BreadcrumbSection=od,m.BurndownChart=ic,m.Button=oe,m.CACHE_CONFIGS=La,m.CTASection=Od,m.Calendar=Na,m.CalloutBox=Bl,m.CancellableRequest=pu,m.Card=Dr,m.CardContent=Ol,m.CardFooter=Dl,m.CardHeader=Pl,m.Center=_t,m.ChainBadge=bi,m.Checkbox=wi,m.Code=Rt,m.CodeBlock=id,m.CodeDisplay=eo,m.CollapsibleDocumentationTopic=ld,m.ColorPicker=Yi,m.ColorPickerAdvanced=Ki,m.ColorSwatch=Zi,m.Combobox=Ci,m.Command=ks,m.ComponentPreloader=Zr,m.ConditionalRender=Ed,m.ConfirmationDialog=Hc,m.Container=xt,m.CreditCardInput=rs,m.CriticalPathOptimizer=im,m.CurrencyInput=ns,m.DashboardStatCard=Wl,m.DataTable=Nl,m.DateInput=yi,m.DateRangePicker=Hi,m.DateTimePicker=$i,m.Dialog=_a,m.Divider=It,m.DragDrop=Yc,m.Drawer=Lc,m.Dropdown=Si,m.EmptyState=Ua,m.ErrorBoundary=fd,m.ExpensiveComponent=kd,m.ExternalLink=il,m.FadeInScale=ys,m.FadeInUp=Ns,m.FeatureBlock=Ss,m.FeatureCard=Vd,m.FeatureGrid=Md,m.FileInput=Li,m.Flex=ut,m.FlexContainer=pt,m.FloatingElement=vs,m.FloatingPanel=Ot,m.FocusTrap=Ic,m.FormAlerts=Wi,m.FormField=Oi,m.FormFieldGroup=rr,m.FormSection=js,m.FormattedNumber=io,m.Gauge=cc,m.GlobalLazyErrorBoundary=xd,m.GradientIconContainer=As,m.Grid=Nt,m.HStack=vt,m.Heading=$t,m.HelperText=ao,m.HoverCard=Gc,m.IconContainer=Os,m.IconText=Ds,m.Image=bc,m.ImageCropper=hc,m.ImageGallery=fc,m.InfiniteScroll=Pc,m.InfoBox=zs,m.InfoCard=zl,m.Input=Xe,m.KYCLevelCard=qd,m.KYCStatusBadge=Bd,m.Kbd=ro,m.KeyValuePair=Hl,m.Label=Pr,m.LanguageSelector=md,m.LazyComponent=Ud,m.LazyErrorBoundary=tr,m.LazyImage=Tu,m.LazyLoadQueue=tt,m.LazyWalletButton=om,m.LazyWrapper=N0,m.Lightbox=pc,m.LineChart=Zl,m.Link=ol,m.List=Ul,m.ListItem=jl,m.ListItemWithAction=Cl,m.LiveStream=_c,m.LoadPriority=en,m.LoadingDots=co,m.LoadingOptimizer=du,m.LoadingOverlay=lo,m.LoadingState=uo,m.Logo=Ws,m.Main=Zd,m.Masonry=Ft,m.MasterDetailLayout=Yd,m.MasterListItem=Gd,m.MediaUploader=Cc,m.MentionInput=Mi,m.Modal=zr,m.ModalContent=Br,m.ModalFooter=Wr,m.ModalHeader=Tc,m.MultiSelect=ji,m.NavigationList=dl,m.NavigationMenu=cl,m.NetworkErrorBoundary=hd,m.NoContent=Yl,m.NotificationBadge=vo,m.NotificationPanel=_o,m.NumberInput=xi,m.OptimizedAPIClient=gu,m.OptimizedImage=Sd,m.OptimizedRoutePreloader=uu,m.Overlay=Qe,m.PageContainer=jt,m.PageHeader=Hd,m.PageSectionHeader=qs,m.PageTitle=Gt,m.Pagination=ml,m.PaginationNav=bl,m.PerformanceBoundary=jd,m.PerformanceOptimizer=cu,m.PhoneDirectory=Fi,m.PhoneInput=ki,m.PieChart=Ql,m.PlatformSpecificComponents=qu,m.PlaylistManager=Vc,m.PodcastPlayer=jc,m.Popover=Oc,m.Portal=fe,m.PriorityLoader=ot,m.Progress=dc,m.ProgressCircle=uc,m.PromotionalBanner=cd,m.PullToRefresh=ad,m.QRCodeDisplay=Ac,m.QuickActions=Hs,m.QuizBuilder=us,m.RadioGroup=Ei,m.RelativeTime=so,m.Resizable=zt,m.RouteBasedLazyLoader=Kr,m.SafeAppWrapper=Nd,m.ScrollArea=Wt,m.ScrollSpy=Dc,m.SearchInput=Ni,m.Section=Et,m.SectionBadge=Ks,m.SectionHeader=Zs,m.SectionTitle=Kt,m.SecurityProvider=yd,m.Select=Tr,m.SelectContent=Re,m.SelectField=Bi,m.SelectGroup=Ui,m.SelectItem=er,m.SelectLabel=fa,m.SelectScrollDownButton=Ir,m.SelectScrollUpButton=Lr,m.SelectSeparator=ga,m.SelectTrigger=Je,m.SelectValue=ba,m.Separator=Mt,m.SettingsList=Xs,m.Sheet=zc,m.SideNav=ul,m.SignaturePad=Qi,m.SignatureRequest=Xi,m.SkeletonLoader=mo,m.Slider=Ai,m.SliderInput=Ti,m.SmartContent=tl,m.SmartLink=Or,m.SmartWalletProviders=am,m.Spacer=kt,m.Sparkline=ac,m.Spinner=Me,m.SplitPane=Dt,m.Stack=mr,m.StandardPageLayout=$d,m.StatCard=Es,m.StatDisplay=Gl,m.StatusBadge=mi,m.StatusIndicator=gi,m.StepList=bd,m.Stepper=fl,m.StepperNav=gl,m.SubscriptionGatedComponents=Fu,m.SumsubWebSDK=Wd,m.Switch=ma,m.Table=xl,m.TableOfContents=pl,m.Tabs=ll,m.TabsContent=Ea,m.TabsList=ka,m.TabsTrigger=wa,m.TagInput=Ii,m.Text=qt,m.TextArea=pi,m.TextAreaField=zi,m.TextField=Di,m.TextInputModal=Bc,m.TextLink=Jt,m.TimePicker=ua,m.Toast=mn,m.ToastNotification=yo,m.ToastProvider=No,m.ToggleGroup=Vi,m.Tooltip=Wc,m.TrackedButton=dd,m.TrackedLink=ud,m.TransferList=Vl,m.TreeView=Tl,m.TruncatedText=oo,m.UanimatedUcounter=gs,m.UaudioUwaveform=wc,m.UavatarUgroup=ql,m.UbadgeUdesigner=wo,m.UbubbleUchart=Rl,m.UcellUeditor=wl,m.UcodeUhighlighter=es,m.UcolumnUresize=kl,m.UcurrencyUconverter=as,m.UcurrencyUrates=ts,m.UdataUgrid=yl,m.UdoubleUtap=ed,m.UdragUdropUlist=Kc,m.UfieldUmapper=cs,m.UfocusUindicator=Vs,m.UformUbuilder=os,m.UformUtemplate=ss,m.UformUvalidator=is,m.UfunnelUchart=oc,m.UgestureUdetector=Xc,m.Uheatmap=tc,m.UhoverUtooltip=Mc,m.UimageUcomparison=gc,m.UkeyboardUshortcut=Bs,m.UlistingUform=Ll,m.UlongUpress=rd,m.UmarkdownUrenderer=Ri,m.UmediaUplaylist=Sc,m.UmetricUcomparison=lc,m.UmorphUtransition=Fs,m.UnestedUdrag=Qc,m.UparallaxUscroll=$s,m.UperformanceUchart=sc,m.UpinchUzoom=Rc,m.UpivotUtable=vl,m.UprofileUheader=$l,m.UprogressUtracker=mc,m.UradarUchart=Jl,m.UradialUmenu=nd,m.UresizableUpanels=Bt,m.UrevealUonUscroll=Gs,m.UsankeyUdiagram=nc,m.UscatterUplot=ec,m.UschemaUvalidator=ls,m.UscreenUreaderUtext=to,m.UskipUnavigation=Js,m.UsortUdropdown=Rs,m.UsortableUgrid=Zc,m.UspreadsheetUgrid=_l,m.UstatusUpipeline=hi,m.UsurveyUbuilder=ds,m.UswipeUactions=Jc,m.UtableUreservation=El,m.UtimeUslotUpicker=Gi,m.UtreeUmap=rc,m.UuserUtable=Sl,m.UversionUbadge=el,m.UvideoUcall=vc,m.UvideoUthumbnail=Nc,m.UvoiceUrecorder=Uc,m.VStack=yt,m.VideoEditor=yc,m.VideoPlayer=xc,m.VirtualList=Al,m.VirtualListItem=wd,m.VisuallyHidden=rl,m.WEB3_CONCEPTS=au,m.WEB3_EMAIL_HEADINGS=nu,m.WEB3_HEADING_PATTERNS=ie,m.WalletPreloader=Ge,m.WaveForm=Ec,m.WysiwygEditor=Ji,m.addResourceHint=_0,m.aiOptimizationPresets=rm,m.appStorage=E0,m.autoConnectWalletBrowser=S0,m.batchDOMUpdates=qm,m.bundleAnalysis=Te,m.buttonVariants=xa,m.cacheHeaders=Eu,m.cacheUtils=xu,m.checkPerformanceBudget=Em,m.clearComponentCache=Lu,m.clearConditionalCache=Hu,m.clearRenderCounts=mm,m.cn=f,m.conditionalCSS=_u,m.convertFileSize=Tm,m.createAIMetaTags=Ta,m.createAIOptimizedSchema=Hr,m.createAdvancedLazyComponent=Su,m.createCSSVariables=Om,m.createConditionalImports=c0,m.createConditionalLazyComponent=Wu,m.createEnhancedFAQSchema=Xd,m.createEnhancedOpenGraph=Va,m.createEnhancedTwitterCard=Aa,m.createFeature=Fr,m.createLazyComponent=Fa,m.createLazyComponentFactory=bm,m.createLazyRoute=y0,m.createLazyWalletProvider=Jr,m.createLibraryImports=zu,m.createMemoComponent=vd,m.createOptimizedStyles=Im,m.createProgressiveComponent=x0,m.createSecurityFeatures=Pd,m.createSelectiveExports=d0,m.createSelectiveMemoComponent=_d,m.createSemanticHeading=eu,m.createSimpleStorage=C0,m.createTechnicalArticleSchema=$r,m.createTreeShakingConfig=u0,m.createUIComponents=Du,m.createWeb3ProductSchema=qr,m.cspDirectives=ku,m.cssOptimization=nt,m.deadCodeElimination=Ae,m.default=V0,m.defaultPerformanceBudget=Xa,m.detectAvailableWallets=Xr,m.detectWalletBrowser=it,m.exportPerformanceData=Um,m.formatFileSize=Am,m.generateAIMetaTags=Qu,m.generateAIMetadata=tu,m.generateAIStructuredData=Ju,m.generateAdvancedSEO=Jd,m.generateCSP=Ba,m.generateCSPDirectives=Gr,m.generateConceptGraph=ou,m.generateContentRelationships=Xu,m.generateEntityRecognition=Ya,m.generateImageSEO=Xm,m.generatePerformanceTrackingSchema=em,m.generatePictureElement=a0,m.generatePlaceholder=s0,m.generateQAPairs=su,m.generateSemanticMarkup=Ga,m.generateSizes=Rm,m.generateSocialImageMeta=e0,m.generateSrcSet=Jm,m.generateTopicClustering=Ka,m.generateTrainingExamples=iu,m.getConditionalStats=Gu,m.getEnvironmentType=Da,m.getLazyLoadingStats=Iu,m.getOptimalImageFormat=n0,m.getPerformanceMonitor=cr,m.getPreloadingStats=Zu,m.getRenderCounts=um,m.getSecurityHeaders=Wa,m.getUINavigationService=se,m.getWebVitals=pm,m.initializeAdvancedPreloading=Ku,m.initializePerformanceMonitoring=_m,m.initializePreloading=Bu,m.inlineCriticalStyles=Hm,m.isLocalhost=Pa,m.isNetworkAccess=Oa,m.isWalletBrowser=Ma,m.isWebEnvironment=za,m.lazyLoadQueue=k0,m.lazyWithPreload=p0,m.lazyWithRetry=h0,m.loadCSS=yu,m.loadCriticalCSS=Mm,m.loadNonCriticalCSS=Pm,m.measureAsyncOperation=wm,m.measureImagePerformance=i0,m.navigationHelper=je,m.optimizeClassNames=$m,m.optimizeContainment=Wm,m.optimizeFlex=Km,m.optimizeGrid=Ym,m.optimizeWillChange=Fm,m.optimizedFetch=Ia,m.pageSEOConfigs=Rd,m.parseFileSize=Lm,m.performanceBudget=ue,m.performanceUtils=ir,m.prefersReducedMotion=Ja,m.prefetchResource=xm,m.preloadComponent=Ou,m.preloadImage=t0,m.preloadResource=Nm,m.preloadRoute=gm,m.preserveAspectRatio=l0,m.priorityLoader=w0,m.reportWebVitals=hm,m.routeConfig=qa,m.securityHeaders=wu,m.setupCSPReporting=Uu,m.setupLazyLoading=r0,m.setupProgressiveLoading=o0,m.shouldEnableWallet=Nu,m.smartLinkVariants=ar,m.supportsAVIF=et,m.supportsCSSImports=vu,m.supportsWebP=Ra,m.themeStorage=U0,m.useClickOutside=ha,m.useCodeLoader=Ca,m.useComponentPerformance=Qa,m.useCopyToClipboard=Sm,m.useDebugMemo=cm,m.useDynamicImport=v0,m.useErrorRecovery=pd,m.useFormSubmission=jm,m.useImageLazyLoading=fm,m.useLazyLoad=at,m.useLazyStyles=Gm,m.useLocation=f0,m.useMediaQuery=Zm,m.useMemoryLeakDetection=ym,m.useMultipleCopyToClipboard=Vm,m.useNavigation=b0,m.useOptimizedTheme=Qm,m.useOptimizedWallets=tm,m.usePerformanceMark=sm,m.useReducedMotion=Bm,m.useRenderCount=dm,m.useResponsiveStyles=zm,m.useSearchParams=g0,m.useSmartLinks=nl,m.useStableCallback=lm,m.useToast=po,m.useToggle=Cm,m.utils=rt,m.validateHeadingStructure=ru,m.walletStorage=j0,m.web3SecurityNotes=ju,m.withLazyErrorBoundary=gd,m.withPerformanceTracking=km,m.withRetry=hu,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));