@sudobility/components 4.0.85 → 4.0.87
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.esm.js
CHANGED
|
@@ -18772,7 +18772,7 @@ const Eg = ({
|
|
|
18772
18772
|
className: m(
|
|
18773
18773
|
d,
|
|
18774
18774
|
ia[o],
|
|
18775
|
-
"flex items-center justify-between"
|
|
18775
|
+
"flex flex-wrap items-center justify-between"
|
|
18776
18776
|
),
|
|
18777
18777
|
children: e
|
|
18778
18778
|
}
|
|
@@ -18789,7 +18789,7 @@ const Eg = ({
|
|
|
18789
18789
|
), $g = ({ children: e, className: t }) => /* @__PURE__ */ a("div", { className: m("flex items-center gap-2 shrink-0", t), children: e }), qg = ({
|
|
18790
18790
|
children: e,
|
|
18791
18791
|
className: t
|
|
18792
|
-
}) => /* @__PURE__ */ a("div", { className: m("md:hidden
|
|
18792
|
+
}) => /* @__PURE__ */ a("div", { className: m("md:hidden w-full basis-full pt-2 pb-3", t), children: e }), Hg = ({
|
|
18793
18793
|
className: e
|
|
18794
18794
|
}) => /* @__PURE__ */ a(
|
|
18795
18795
|
"div",
|
package/dist/index.umd.js
CHANGED
|
@@ -53,7 +53,7 @@ Nonce: ${h}`}function a(c,g=24){const h=new Date(c.getTime()+g*60*60*1e3);return
|
|
|
53
53
|
`,children:[o&&t.jsx("div",{className:"absolute top-4 right-4",children:t.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"✓ Verified"})}),t.jsx("h3",{className:"text-xl font-bold mb-2",children:i.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:i.description}),t.jsxs("p",{className:"text-3xl font-bold mb-4",children:[r,t.jsx("span",{className:"text-sm font-normal text-gray-600",children:"/year"})]}),t.jsx("ul",{className:"space-y-2 mb-6",children:a.map((d,c)=>t.jsxs("li",{className:"flex items-start gap-2",children:[t.jsx("span",{className:"text-green-500 mt-0.5",children:"✓"}),t.jsx("span",{className:"text-sm",children:d})]},c))}),s&&t.jsx("button",{onClick:s,disabled:o,className:`
|
|
54
54
|
w-full py-2 px-4 rounded font-medium transition-colors
|
|
55
55
|
${o?"bg-gray-200 text-gray-500 cursor-not-allowed":n?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
|
|
56
|
-
`,children:o?"Verified":n?"Current Plan":"Select Plan"})]})},x0=({children:e,backgroundClassName:r="",contentClassName:a=""})=>t.jsx("div",{className:r,children:t.jsx("div",{className:a,children:e})}),N0=({title:e,description:r})=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r})]}),C0=({children:e,mode:r,className:a,as:n="div",withPadding:o=!0})=>{const s=he(),l=r?S0(r,o):o?s.containerClass:s.maxWidthClass;return t.jsx(n,{className:f(l,a),children:e})};function S0(e,r){const a={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"};return r?`${a[e]} px-4`:a[e]}const E0=({variant:e="full",sticky:r=!1,className:a,children:n})=>{const{containerClass:o}=he(),s=e==="compact";return t.jsx("footer",{className:f("bg-gray-900 text-white transition-all duration-300 ease-in-out",s?"py-4":"py-12",r?"sticky bottom-0 z-50 border-t border-gray-700":"relative z-10","pointer-events-auto",a),children:t.jsx("div",{className:o,children:n})})},A0=({children:e,className:r})=>t.jsx("div",{className:f("grid md:grid-cols-5 gap-8",r),children:e}),T0=({children:e,description:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("div",{className:"mb-4",children:e}),r&&t.jsx("p",{className:P.body.sm(),children:r})]}),I0=({title:e,children:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("h3",{className:f(P.heading.h5(),"mb-4 text-white"),children:e}),t.jsx("ul",{className:f("space-y-2",P.body.sm()),children:r})]}),M0=({children:e,className:r})=>t.jsx("li",{className:f("hover:text-white transition-colors",r),children:e}),L0=({children:e,className:r})=>t.jsx("div",{className:f("border-t mt-8 pt-8 text-center space-y-4",go.border.default,r),children:e}),P0=({children:e,className:r})=>v.Children.toArray(e).filter(Boolean).length===0?null:t.jsx("div",{className:f("flex items-center justify-center gap-3 text-gray-400 text-sm",r),children:e}),O0=({children:e,className:r})=>t.jsx("div",{className:f("flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0",r),children:e}),U0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-3 text-gray-400 text-sm",r),children:e}),D0=({children:e,className:r})=>t.jsx("div",{className:f("flex space-x-6 text-sm",r),children:e}),j0=({version:e,className:r})=>t.jsxs("span",{className:f("text-gray-500",r),children:["v",e]}),_0=({year:e,companyName:r,rightsText:a,companyLink:n,className:o})=>t.jsxs("span",{className:o,children:["© ",e," ",n||t.jsx("span",{className:"text-blue-400",children:r}),a&&`. ${a}`]}),Ae=({href:e,label:r,children:a})=>t.jsx(Ua,{content:r,children:t.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":r,children:a})}),z0=({twitterUrl:e,redditUrl:r,discordUrl:a,linkedinUrl:n,farcasterUrl:o,telegramUrl:s,githubUrl:l,className:i})=>e||r||a||n||o||s||l?t.jsxs("div",{className:f("flex items-center gap-4",i),children:[e&&t.jsx(Ae,{href:e,label:"Twitter / X",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),r&&t.jsx(Ae,{href:r,label:"Reddit",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),a&&t.jsx(Ae,{href:a,label:"Discord",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),n&&t.jsx(Ae,{href:n,label:"LinkedIn",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),o&&t.jsx(Ae,{href:o,label:"Farcaster",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{d:"M18.24 2.4H5.76a3.36 3.36 0 0 0-3.36 3.36v12.48a3.36 3.36 0 0 0 3.36 3.36h12.48a3.36 3.36 0 0 0 3.36-3.36V5.76a3.36 3.36 0 0 0-3.36-3.36zm-2.16 13.2h-1.2v-4.8h-5.76v4.8H7.92V8.4h1.2v3.6h5.76V8.4h1.2v7.2z"})})}),s&&t.jsx(Ae,{href:s,label:"Telegram",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),l&&t.jsx(Ae,{href:l,label:"GitHub",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})})]}):null,B0=({isSelected:e,onClick:r,icon:a,label:n,description:o,className:s=""})=>t.jsxs("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 ${s}`,children:[e&&t.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),t.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&t.jsx(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"}`}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("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:n}),o&&t.jsx("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})]})]})]}),W0=({masterTitle:e,masterSubtitle:r,backButtonText:a,masterContent:n,detailContent:o,detailTitle:s,mobileView:l="navigation",onBackToNavigation:i,masterClassName:d="",detailClassName:c="",detailTitleClassName:g="",masterWidth:h=320,stickyMaster:w=!0,stickyTopOffset:m=96,desktopGap:b=32,showMasterBackground:y=!0,enableAnimations:p=!0,animationDuration:A=300,animationRef:N})=>{const{containerClass:C}=he(),k=`gap-${Math.round(b/4)}`||"gap-8",S=ee=>ee?ee.split("-")[0].trim():"Back",I=a?S(a):e?S(e):"Back",[E,M]=v.useState(!1),[x,O]=v.useState("auto"),D=v.useRef(null),U=v.useRef(null);v.useEffect(()=>(N&&(N.current={triggerTransition:ee=>{if(!p){ee();return}if(D.current){const Pe=D.current.scrollHeight;O(Pe)}M(!0),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{ee(),setTimeout(()=>{if(D.current){const Pe=D.current.scrollHeight;O(Pe),setTimeout(()=>{O("auto"),M(!1)},A)}},50)},A/2)}}),()=>{U.current&&clearTimeout(U.current)}),[p,A,N]);const B=p?{height:x==="auto"?"auto":`${x}px`,transition:`height ${A}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},z=p?`${E?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",V=p?{transition:`opacity ${A}ms ease-in-out, transform ${A}ms ease-in-out`}:{};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`md:hidden ${l==="navigation"?"block":"hidden"} flex-1`,children:t.jsxs("div",{className:y?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&t.jsxs("div",{className:C,children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r})]}),t.jsx("div",{className:d,children:n})]})}),t.jsxs("div",{className:`${C} py-8`,children:[t.jsxs("div",{className:`md:hidden ${l==="content"?"block":"hidden"}`,children:[l==="content"&&i&&t.jsxs("button",{onClick:i,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:["← ",I]}),t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})]}),t.jsxs("div",{className:`hidden md:flex min-h-full ${k}`,style:{width:"100%"},children:[t.jsx("aside",{className:"flex-shrink-0",style:{width:`${h}px`,minWidth:`${h}px`},children:t.jsxs("div",{className:w?"sticky":"",style:w?{top:`${m}px`}:void 0,children:[e&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r}),t.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${w?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:n})]})}),t.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${h+b}px)`},children:t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})})]})]})]})},Xr=v.createContext(null),Fa=({children:e,variant:r="default",sticky:a=!0})=>{const[n,o]=v.useState(!1),s=v.useCallback(()=>{o(l=>!l)},[]);return t.jsx(Xr.Provider,{value:{variant:r,sticky:a,mobileMenuOpen:n,setMobileMenuOpen:o,toggleMobileMenu:s},children:e})},Qr=()=>{const e=v.useContext(Xr);if(!e)throw new Error("useTopbar must be used within a TopbarProvider");return e},Va={sm:"min-h-12",md:"min-h-14",lg:"min-h-16"},F0={default:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",app:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm",minimal:"bg-transparent",transparent:"bg-white/80 dark:bg-gray-900/80 border-b border-gray-200/50 dark:border-gray-700/50"},V0={default:"z-40",high:"z-50",highest:"z-[60]"},$0=({children:e,variant:r="default",sticky:a=!0,className:n,height:o="md",blur:s=!1,zIndex:l="high","aria-label":i="Main navigation"})=>{const{containerClass:d}=he();return t.jsx(Fa,{variant:r,sticky:a,children:t.jsxs("header",{role:"banner","aria-label":i,className:f("w-full",Va[o],F0[r],V0[l],a&&"sticky top-0",s&&"backdrop-blur-md","transition-colors duration-200",n),children:[t.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-blue-600 text-white px-4 py-2 rounded-md z-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Skip to main content"}),t.jsx("div",{className:f(d,Va[o],"flex items-center justify-between"),children:e})]})})},q0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),H0=({children:e,className:r})=>t.jsx("div",{className:f("flex-1 flex items-center justify-center px-4",r),children:e}),G0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),Y0=({children:e,className:r})=>t.jsx("div",{className:f("md:hidden px-4 pb-3",r),children:e}),K0=({className:e})=>t.jsx("div",{className:f("hidden md:block h-6 w-px bg-gray-200 dark:bg-gray-700 mx-2",e),role:"separator","aria-orientation":"vertical"}),Z0={sm:"h-6",md:"h-8",lg:"h-10"},X0=({children:e,src:r,alt:a="Logo",onClick:n,href:o,className:s,size:l="md"})=>{const i=e||r&&t.jsx("img",{src:r,alt:a,className:f(Z0[l],"w-auto object-contain")}),d=f("flex items-center","hover:opacity-80 transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-md",s);return o?t.jsx("a",{href:o,className:d,title:a,children:i}):n?t.jsx("button",{type:"button",onClick:n,className:d,title:a,"aria-label":`Go to ${a||"home"}`,children:i}):t.jsx("div",{className:d,children:i})},Q0={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},J0=({className:e,isOpen:r})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:r?t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})}),$a=({icon:e,"aria-label":r="Toggle navigation menu",className:a,onClick:n,hideAbove:o="lg",menuItems:s,LinkComponent:l})=>{const{mobileMenuOpen:i,toggleMobileMenu:d,setMobileMenuOpen:c}=Qr(),[g,h]=v.useState(!1),w=v.useRef(null);sr(w,()=>{h(!1)});const m=s?g:i,b=()=>{n?n():s?h(!g):d()},y=()=>{h(!1),c(!1)};return t.jsxs("div",{className:f("relative",Q0[o]),ref:w,children:[t.jsx("button",{type:"button",onClick:b,className:f("p-2 rounded-lg","text-gray-600 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",a),"aria-label":r,"aria-expanded":m,"aria-haspopup":s?"menu":void 0,"aria-controls":s?"topbar-dropdown-menu":"mobile-menu",children:e?t.jsx(e,{className:"h-6 w-6"}):t.jsx(J0,{className:"h-6 w-6",isOpen:m})}),s&&g&&t.jsx("div",{id:"topbar-dropdown-menu",role:"menu",className:f("absolute left-0 top-full mt-2","min-w-[200px] py-2 rounded-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","shadow-lg","z-50"),children:s.map(p=>{const A=p.icon,N=t.jsxs(t.Fragment,{children:[A&&t.jsx(A,{className:"h-5 w-5 mr-3 flex-shrink-0"}),t.jsx("span",{children:p.label})]}),C=f("flex items-center w-full px-4 py-2.5 text-sm font-medium","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","transition-colors duration-150",p.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400",p.disabled&&"opacity-50 cursor-not-allowed");return p.href&&l?t.jsx(l,{href:p.href,className:C,children:t.jsx("div",{className:"flex items-center",onClick:y,children:N})},p.id):p.href?t.jsx("a",{href:p.href,role:"menuitem",className:C,onClick:y,children:N},p.id):t.jsx("button",{type:"button",role:"menuitem",className:C,onClick:()=>{y(),p.onClick?.()},disabled:p.disabled,children:N},p.id)})})]})},R0={sm:{show:"hidden sm:flex",hide:"sm:hidden"},md:{show:"hidden md:flex",hide:"md:hidden"},lg:{show:"hidden lg:flex",hide:"lg:hidden"},xl:{show:"hidden xl:flex",hide:"xl:hidden"}},eu={left:"justify-start",center:"justify-center",right:"justify-end"},qa=({items:e,className:r,collapseBelow:a="lg",LinkComponent:n,align:o="center"})=>{const[s,l]=v.useState(null),i=v.useRef(null);sr(i,()=>l(null));const d=(c,g=!1)=>{const h=c.children&&c.children.length>0,w=s===c.id,m=f("px-3 py-2 rounded-md text-sm font-medium","transition-colors duration-200",c.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-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700",c.disabled&&"opacity-50 cursor-not-allowed pointer-events-none",g&&"w-full text-left");return h?t.jsxs("div",{className:"relative",ref:i,children:[t.jsxs("button",{type:"button",onClick:()=>l(w?null:c.id),className:f(m,"flex items-center gap-1"),"aria-expanded":w,"aria-haspopup":"true",disabled:c.disabled,children:[c.icon&&t.jsx(c.icon,{className:"h-4 w-4 mr-1"}),c.label,t.jsx("svg",{className:f("h-4 w-4 transition-transform duration-200",w&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w&&t.jsx("div",{className:f("absolute top-full left-0 mt-1 py-1","min-w-[200px] rounded-md shadow-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","z-50"),children:c.children?.map(b=>t.jsx(Jr,{item:b,LinkComponent:n,className:f("block px-4 py-2 text-sm","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700",b.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"),onClick:()=>l(null)},b.id))})]},c.id):t.jsx(Jr,{item:c,LinkComponent:n,className:m},c.id)};return t.jsx("nav",{className:f("flex items-center gap-1",R0[a].show,eu[o],r),"aria-label":"Main navigation",children:e.map(c=>d(c))})},Jr=({item:e,LinkComponent:r,className:a,onClick:n})=>{const o=()=>{n?.(),e.onClick?.()},s=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx(e.icon,{className:"h-4 w-4 mr-2"}),e.label]});return e.href&&r?t.jsx(r,{href:e.href,className:f(a,"flex items-center"),children:s}):e.href?t.jsx("a",{href:e.href,className:f(a,"flex items-center"),onClick:o,children:s}):t.jsx("button",{type:"button",onClick:o,className:f(a,"flex items-center"),disabled:e.disabled,children:s})},ru=({items:e,isOpen:r,className:a,LinkComponent:n})=>{const{mobileMenuOpen:o,setMobileMenuOpen:s}=Qr();return r??o?t.jsx("div",{id:"mobile-menu",className:f("lg:hidden","border-t border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900","shadow-lg",a),children:t.jsx("nav",{className:"px-4 py-2 space-y-1","aria-label":"Mobile navigation",children:e.map(i=>t.jsx(Jr,{item:i,LinkComponent:n,className:f("flex items-center w-full px-3 py-2 rounded-md text-base font-medium","transition-colors duration-200",i.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-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700"),onClick:()=>s(!1)},i.id))})}):null},tu=({items:e,LinkComponent:r,collapseBelow:a="lg",align:n="center",className:o,mobileMenuLabel:s="Toggle navigation menu",children:l})=>t.jsxs(t.Fragment,{children:[t.jsx($a,{hideAbove:a,menuItems:e,LinkComponent:r,"aria-label":s,className:o}),l,t.jsx(qa,{items:e,collapseBelow:a,LinkComponent:r,align:n,className:o})]}),au={sm:"gap-1",md:"gap-2",lg:"gap-3"},nu={left:"justify-start",center:"justify-center",right:"justify-end"},ou=({children:e,className:r,gap:a="md",align:n="right"})=>t.jsx("div",{className:f("flex items-center",au[a],nu[n],r),children:e}),su={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},lu={sm:"p-1.5",md:"p-2",lg:"p-2.5"},iu=({icon:e,onClick:r,"aria-label":a,className:n,disabled:o=!1,badge:s,size:l="md"})=>t.jsxs("button",{type:"button",onClick:r,className:f("relative rounded-lg",lu[l],"text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-700 dark:hover:text-gray-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",o&&"opacity-50 cursor-not-allowed",n),"aria-label":a,disabled:o,children:[t.jsx(e,{className:su[l]}),s!==void 0&&s>0&&t.jsx("span",{className:f("absolute -top-1 -right-1","min-w-[18px] h-[18px] px-1","flex items-center justify-center","text-xs font-medium","bg-red-500 text-white rounded-full","ring-2 ring-white dark:ring-gray-900"),"aria-label":`${s} notifications`,children:s>99?"99+":s})]}),cu={sm:"w-48",md:"w-64",lg:"w-96",full:"w-full"},du=({placeholder:e="Search...",value:r,onChange:a,onSubmit:n,className:o,width:s="md",showOnMobile:l=!1})=>{const[i,d]=v.useState(r||""),c=h=>{const w=h.target.value;d(w),a?.(w)},g=h=>{h.preventDefault(),n?.(i)};return t.jsx("form",{onSubmit:g,className:f(!l&&"hidden md:block",o),role:"search",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"search",value:i,onChange:c,placeholder:e,"aria-label":e,className:f(cu[s],"pl-10 pr-4 py-2","text-sm","bg-gray-100 dark:bg-gray-800","border border-transparent","rounded-lg","text-gray-900 dark:text-gray-100","placeholder:text-gray-500 dark:placeholder:text-gray-400","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white dark:focus:bg-gray-700 focus:border-transparent","transition-colors duration-200")})]})})},uu=({contentType:e,aiSummary:r,technicalComplexity:a="intermediate"})=>t.jsxs(Fn.Helmet,{children:[t.jsx("meta",{name:"ai:content-type",content:e}),t.jsx("meta",{name:"ai:summary",content:r}),t.jsx("meta",{name:"ai:complexity",content:a})]}),gu=({children:e,className:r,...a})=>t.jsx("main",{className:r,...a,role:"main",children:e}),hu=({children:e})=>t.jsx(t.Fragment,{children:e}),Ue=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Te=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),Rr=e=>{const r=Ue(e.audience),a=Te(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}}},et=e=>{const r=Ue(e.keywords),a=Ue(e.audience),n=Te(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:n.appName,url:n.baseUrl,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:n.appName,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${n.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${n.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"]}},fu=(e,r)=>{const a=Te(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.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:n.category||"General"}))}},rt=e=>{const r=Te(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"}}},Ha=e=>{const r=Ue(e.keywords),a=Te(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()}},Ga=e=>{const r=Te(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"}},Ya=e=>{const r=Ue(e.keywords),a=Ue(e.audience),n=Te(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":`${n.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},bu=e=>({structuredData:{product:Rr(e),article:et(e),aiOptimized:rt(e)},openGraph:Ha(e),twitterCard:Ga(e),aiMetaTags:Ya(e),jsonLD:[Rr(e),et(e),rt(e)]}),mu={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"]}},yu=e=>{const{level:r,text:a,className:n="",id:o,semanticContext:s="section"}=e,l=`h${r}`,i={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=[i[r],d[s],n].filter(Boolean).join(" "),g=o||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return v.createElement(l,{id:g,className:c,"aria-level":r},a)},le={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"})},pu=e=>{const r=[],a=[],n=e.filter(o=>o.level===1).length;n===0?r.push("Missing H1 tag - every page should have exactly one H1"):n>1&&r.push(`Multiple H1 tags found (${n}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const s=e[o],l=e[o-1];s.level>l.level+1&&r.push(`Heading level jump from H${l.level} to H${s.level} - avoid skipping levels`)}return e.forEach((o,s)=>{o.text.length<3&&r.push(`Heading ${s+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}},vu={walletConnection:le.pageTitle("Connect Your Web3 Wallet"),emailBenefits:le.majorSection("Why Choose Web3 Email?"),securityFeature:le.feature("Secure & Private"),ensIntegration:le.feature("ENS Domain Support"),multiChain:le.feature("Multi-Chain Compatibility"),passwordless:le.benefit("No Passwords Required"),setupStep1:le.step("Connect Your Wallet",1),setupStep2:le.step("Verify Your Identity",2),setupStep3:le.step("Access Your Emails",3)},wu=[{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"}],ku=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}),xu=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(n=>{e.find(s=>s.term===n)&&r.edges.push({source:a.term,target:n,relationship:"related_to"})}),a.synonyms?.forEach(n=>{r.edges.push({source:a.term,target:n,relationship:"synonym_of"})})}),r},Nu=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},Cu=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},Su={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"]}},Eu=({children:e,appName:r,appUrl:a,apiUrl:n})=>(v.useEffect(()=>{const o=()=>{[].forEach(b=>{const y=document.createElement("link");y.rel="preload",y.href=b.href,y.as=b.as,b.type&&(y.type=b.type),b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(y=>{y.fetchPriority="high"});const b=document.querySelector("[data-hero]");if(b){const y=b.getAttribute("data-bg-image");if(y){const p=document.createElement("link");p.rel="preload",p.href=y,p.as="image",document.head.appendChild(p)}}},l=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(y=>{const p=y;p.naturalWidth&&p.naturalHeight&&(p.width=p.naturalWidth,p.height=p.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(y=>{y.getAttribute("style")?.includes("min-height")||(y.style.minHeight="200px")})},i=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(p=>{p.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(p=>{document.addEventListener(p,()=>{},{passive:!0})})})()},d=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...n?[{rel:"dns-prefetch",href:`//${n.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...n?[{rel:"preconnect",href:n}]:[]].forEach(b=>{const y=document.createElement("link");y.rel=b.rel,y.href=b.href,b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},g=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(b=>{b.loading="lazy"}),"IntersectionObserver"in window){const b=new IntersectionObserver(p=>{p.forEach(A=>{if(A.isIntersecting){const N=A.target;N.dataset.src&&(N.src=N.dataset.src,N.removeAttribute("data-src")),b.unobserve(N)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(p=>b.observe(p))}},h=()=>{[{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:p,content:A})=>{if(!document.querySelector(`meta[name="${p}"]`)){const N=document.createElement("meta");N.name=p,N.content=A,document.head.appendChild(N)}});const b={"@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"}},y=document.createElement("script");y.type="application/ld+json",y.textContent=JSON.stringify(b),document.head.appendChild(y)},w=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(b=>{const y=b.cloneNode(!0);y.rel="preload",y.as="style",y.onload=()=>{y.onload=null,y.rel="stylesheet"},document.head.appendChild(y),b.remove()})};return o(),s(),l(),i(),c(),g(),h(),w(),setTimeout(d,2e3),()=>{}},[n,r,a]),t.jsx(t.Fragment,{children:e})),Au=()=>(v.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const i=new IntersectionObserver(d=>{d.forEach(c=>{if(c.isIntersecting){const g=c.target;g.dataset.src&&(g.src=g.dataset.src,g.removeAttribute("data-src"),i.unobserve(g))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{i.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const c=document.createElement("link");c.rel="prefetch",c.href=d,document.head.appendChild(c)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const i=document.createElement("script");i.dataset.walletDetection="true",i.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(i)}},l=()=>{document.querySelectorAll("img[data-hero]").forEach(i=>{const d=i;d.loading="eager","fetchPriority"in d&&(d.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(i=>{const d=i;d.loading="lazy","fetchPriority"in d&&(d.fetchPriority="low")})};requestIdleCallback(()=>{o(),s(),l()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(l=>{const i=l.getEntries(),d=i[i.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 s=new PerformanceObserver(l=>{let i=0;for(const d of l.getEntries())d.hadRecentInput||(i+=d.value);i>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const c=d;c.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const s=o.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(l=>{l.getAttribute("data-critical")||l.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="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),Tu=({children:e})=>t.jsx(t.Fragment,{children:e}),Ka={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 Iu{constructor(){this.cache=new Map}set(r,a,n){if(this.cache.size>=n.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 n=this.cache.get(r);if(!n)return null;const s=Date.now()-n.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(r),null):{data:n.data,isStale:s}}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 De=new Iu,Ie=new Map,Za=async(e,r,a="messages")=>{const n=Ka[a],o=De.get(e,n);if(o&&!o.isStale)return o.data;const s=Ie.get(e);if(s)return s;if(o&&o.isStale&&n.staleWhileRevalidate){const i=r().then(d=>(De.set(e,d,n),Ie.delete(e),d)).catch(d=>{throw Ie.delete(e),d});return Ie.set(e,i),o.data}const l=r().then(i=>(De.set(e,i,n),Ie.delete(e),i)).catch(i=>{throw Ie.delete(e),i});return Ie.set(e,l),l};class Mu{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,a){return new Promise((n,o)=>{this.queue.push({key:r,fetcher:a,resolve:n,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 n of a)await Promise.allSettled(n.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(r){const a=[];for(let o=0;o<r.length;o+=5)a.push(r.slice(o,o+5));return a}}const Lu=new Mu;class Pu{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={},n,o="messages"){const s=`${this.baseURL}${r}`,l=n||`${a.method||"GET"}:${s}`,i=async()=>{let d={...a,headers:{...this.defaultHeaders,...a.headers}};for(const g of this.requestInterceptors)d=g(d);let c=await fetch(s,d);for(const g of this.responseInterceptors)c=await g(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(r)?Lu.add(l,i):Za(l,i,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 Ou=async(e,r=3,a=1e3)=>{let n;for(let o=0;o<=r;o++)try{return await e()}catch(s){if(n=s,o===r)throw n;const l=a*Math.pow(2,o)+Math.random()*1e3;await new Promise(i=>setTimeout(i,l))}throw n};class Uu{constructor(){this.abortController=new AbortController}async request(r,a={}){const n=await fetch(r,{...a,signal:this.abortController.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}cancel(){this.abortController.abort()}}const Du={invalidate:e=>De.invalidate(e),clear:()=>De.clear(),getStats:()=>De.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 Xa(){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 Qa(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Ja(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Ra(){return Qa()?"localhost":Xa()?"wallet-browser":Ja()?"network":"production"}function ju(){const e=Ra();return e==="localhost"||e==="wallet-browser"}function _u(e){}function en(){return typeof window<"u"}function zu(){return typeof window<"u"}function Bu(e,r){if(en())e();else return r}const tt=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'"]}),Wu=tt(),rn=e=>{const r=tt(e);return Object.entries(r).map(([a,n])=>`${a} ${n.join(" ")}`).join("; ")},tn=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":rn(e)}),Fu=tn(),Vu={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"},$u=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},qu={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"},ue=new Map,Ge=new Map,ur=new Set;let Ye="medium",at=!1;function Hu(){if("connection"in navigator){const a=navigator.connection;a&&(Ye=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;at=e&&e<4||r&&r<4}Hu();function Gu(e,r,a={}){const{retries:n=3,timeout:o=1e4,fallback:s,preloadCondition:l,cacheStrategy:i="memory",priority:d="medium",onLoad:c,onError:g}=a;if(ue.has(r))return ue.get(r).component;const h=v.lazy(async()=>{const m=performance.now();if(Ge.has(r))return Ge.get(r).then(y=>({default:y}));const b=Yu(e,n,o);Ge.set(r,b.then(y=>y.default));try{const y=await b,p=performance.now()-m;if(i!=="none"){const A={component:y.default,timestamp:Date.now(),loadTime:p};if(ue.set(r,A),i==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:A.timestamp,loadTime:p}))}catch{}}return Ge.delete(r),c?.(y.default),y}catch(y){throw Ge.delete(r),g?.(y),y}}),w=m=>{const[b,y]=v.useState(!0);v.useEffect(()=>{if(l&&!ue.has(r)&&l()&&!ur.has(r)){ur.add(r);const N=Ku(d,Ye);setTimeout(()=>{e().catch(()=>{})},N)}},[]);const p=s||t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!b&&at&&Ye==="slow"?t.jsx("div",{className:"lazy-placeholder",children:t.jsxs("button",{onClick:()=>y(!0),className:"load-component-btn",children:["Load ",r]})}):t.jsx(v.Suspense,{fallback:p,children:t.jsx(h,{...m})})};return w.displayName=`AdvancedLazy(${r})`,w}async function Yu(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((i,d)=>{setTimeout(()=>d(new Error("Load timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const l=Math.pow(2,o)*1e3,i=Math.random()*1e3;await new Promise(d=>setTimeout(d,l+i))}}throw n}function Ku(e,r){const a={critical:0,high:500,medium:2e3,low:5e3},n={fast:.5,medium:1,slow:2},o=a[e]||2e3,s=n[r]||1;return o*s}const Je=class Je{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:n,probability:o})=>{o>.3&&!ue.has(n)&&setTimeout(()=>{this.routeMap.get(n)},Ye==="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:ue.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Je.routeMap=new Map,Je.routeUsageStats=new Map,Je.currentRoute="";let nt=Je;const Zu=({src:e,alt:r,className:a,placeholder:n,priority:o="medium"})=>{const[s,l]=v.useState(!1),[i,d]=v.useState(!1),c=v.useRef(null);v.useEffect(()=>{if(!c.current)return;if(o==="high"){d(!0);return}const h=new IntersectionObserver(([w])=>{w.isIntersecting&&(d(!0),h.unobserve(w.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return h.observe(c.current),()=>h.disconnect()},[o]);const g=()=>{l(!0)};return t.jsxs("div",{className:`lazy-image-container ${a}`,children:[t.jsx("img",{ref:c,src:i?e:n||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&i&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function Xu(){ue.clear(),ur.clear()}function Qu(){return{cachedComponents:ue.size,preloadQueue:ur.size,networkSpeed:Ye,isLowEndDevice:at,cacheEntries:Array.from(ue.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const Ju=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Ru=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>t.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),t.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>t.jsx(Ju,{message:"Loading component..."})}},an=(e,r="default",a=3)=>{const n=v.lazy(async()=>{let s=null;for(let l=0;l<a;l++)try{return await e()}catch(i){s=i,l<a-1&&await new Promise(d=>setTimeout(d,Math.pow(2,l)*1e3))}throw s}),o=Ru(r);return s=>t.jsx(v.Suspense,{fallback:t.jsx(o,{}),children:t.jsx(n,{...s})})},eg=async e=>{try{await e()}catch{}},rg=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=an(n,"skeleton")}),r},tg=e=>e,nn={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Re=class Re{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}};Re.preloadedComponents=new Set,Re.preloadQueue=[],Re.isPreloading=!1;let ot=Re;const ag=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{nn.secondary.forEach(e=>{})})},on=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Ke=new Map;function ng(e,r){const{condition:a,fallback:n,retries:o=3,timeout:s=1e4,priority:l="medium",cacheKey:i=`conditional-${Math.random()}`}=r,d=c=>{const[g,h]=v.useState(!1),[w,m]=v.useState(null);return v.useEffect(()=>{const p=setTimeout(async()=>{const A=Ke.get(i);if(A&&A.isValid&&Date.now()-A.lastCheck<3e5)try{if(await A.condition()){m(()=>A.component),h(!0);return}}catch{}try{if(await a()){const C=await lg(e,o,s);Ke.set(i,{component:C.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>C.default),h(!0)}}catch{}},l==="high"?0:l==="medium"?100:500);return()=>clearTimeout(p)},[]),g?w?t.jsx(v.Suspense,{fallback:n||t.jsx(on,{message:"Loading component..."}),children:t.jsx(w,{...c})}):null:n||t.jsx(on,{message:"Checking conditions..."})};return d.displayName=`ConditionalLazy(${i})`,d}const og={},sg={};async function lg(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((l,i)=>{setTimeout(()=>i(new Error("Import timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const l=Math.pow(2,o)*1e3;await new Promise(i=>setTimeout(i,l))}}throw n}function ig(){Ke.clear()}function cg(){return{cachedComponents:Ke.size,cacheEntries:Array.from(Ke.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const sn=[{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 dg{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 n=a.effectiveType;n==="4g"?this.networkSpeedEstimate="fast":n==="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(n=>{n.level&&n.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(n=>{document.addEventListener(n,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 n=document.createElement("link");n.rel="modulepreload",n.href=r.path.replace("*",this.getChunkHash(r.name)),n.crossOrigin="","fetchPriority"in n&&(n.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(n),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const a=Array.from(document.querySelectorAll("script[src]"));for(const n of a){const o=n.src;if(o.includes(r)){const s=o.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(r){const a=r.config;return a.delay&&await new Promise(n=>setTimeout(n,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(n=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(n)})}):this.preloadChunk(r)}initializePreloading(){sn.sort((a,n)=>{const o={critical:0,high:1,medium:2,low:3};return o[a.config.priority]-o[n.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(n=>{let o=!1;n.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(r),o=!0)},{passive:!0})})}setupScrollPreloading(r,a){let n=!1;const o=()=>{if(n)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(r),n=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&sn.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 Ze=null;function ug(){Ze||(Ze=new dg,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ze?.initializePreloading()}):Ze.initializePreloading())}function gg(){return Ze?.getPreloadingStats()}function hg(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 ln(e){const r={"@context":"https://schema.org","@type":mg(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 fg(e,r){return r.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function cn(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 dn(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 bg(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:ln(e),entityRecognition:cn(e),topicClustering:dn(e),contentRelationships:r?.contentRelationships||[],...r}}function mg(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function yg(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 pg={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"]}},vg=({message:e,className:r})=>t.jsxs("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),st=new Map,Xe=new Set;function lt(){const e=[];return!!window.ethereum?.isMetaMask&&(Xe.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(Xe.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(Xe.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,s)=>o.priority-s.priority)}function it(e){const r=`wallet-${e.toLowerCase()}`;if(st.has(r))return st.get(r);const a=()=>Promise.resolve({default:()=>v.createElement("div",{},`${e} Provider Placeholder`)}),n=v.lazy(a),o=s=>t.jsx(v.Suspense,{fallback:t.jsx(vg,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:t.jsx(n,{...s})});return o.displayName=`Lazy${e}Provider`,st.set(r,o),o}function wg({children:e}){const r=lt();return r.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),t.jsxs(t.Fragment,{children:[r.map(a=>{const n=it(a.name);return t.jsx(n,{},a.name)}),e]})}const gt=class gt{static preloadWallet(r){const a=r.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{it(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,n)=>{setTimeout(()=>{this.preloadWallet(a)},n*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};gt.preloadedWallets=new Set;let Qe=gt;function kg(){return{availableWallets:lt(),preloadWallet:n=>{Qe.preloadWallet(n)},getDetectedWallets:()=>Array.from(Xe),hasWallet:n=>Xe.has(n.toLowerCase())}}function xg({walletName:e,onConnect:r,disabled:a=!1}){const n=()=>{Qe.preloadWallet(e),setTimeout(r,100)};return t.jsxs("button",{onClick:n,disabled:a,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class Ng{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(s=>{for(const l of s.getEntries())l.name==="first-contentful-paint"&&(this.observedMetrics.fcp=l.startTime,this.optimizeBasedOnFCP(l.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const l of s.getEntries())this.observedMetrics.lcp=l.startTime,this.optimizeBasedOnLCP(l.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let n=0;new PerformanceObserver(s=>{for(const l of s.getEntries())l.hadRecentInput||(n+=l.value);this.observedMetrics.cls=n}).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(n=>{n.loading="lazy",n.style.display="none",setTimeout(()=>{n.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(n=>{n.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(n=>{n instanceof HTMLImageElement&&(n.fetchPriority="high",n.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 n=document.createElement("style");n.textContent=a,document.head.appendChild(n),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const n=a.getAttribute("href")||"";if(!n.includes("display=swap")){const o=n.includes("?")?"&":"?";a.setAttribute("href",`${n}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const n=a.cloneNode(!0);n.rel="preload",n.as="style",n.onload=()=>{n.onload=null,n.rel="stylesheet"};const o=document.createElement("noscript"),s=a.cloneNode(!0);o.appendChild(s),document.head.appendChild(n),document.head.appendChild(o),a.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(n=>a.observe(n))}else r.forEach(a=>{const n=a;n.src=n.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 gr={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 n=performance.getEntriesByName(e);return n[n.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?.()))}},Cg=(e,r=[])=>{v.useEffect(()=>(gr.mark(`${e}-start`),()=>{gr.mark(`${e}-end`),gr.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},Sg=e=>{const r=v.useRef(e);return r.current=e,v.useCallback((...a)=>r.current(...a),[])},Eg=(e,r,a)=>{const n=v.useRef(r),o=v.useRef(void 0);return v.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&r.some((s,l)=>s!==n.current[l]),n.current=r,o.current=e(),o.current),[e,a,r])},hr=new Map,Ag=e=>{const r=hr.get(e)||0;hr.set(e,r+1),v.useEffect(()=>{process.env.NODE_ENV})},Tg=()=>Object.fromEntries(hr),Ig=()=>hr.clear(),Mg=e=>v.lazy(e),Lg=(e=.1)=>{const[r,a]=v.useState(new Set),n=v.useRef(null);v.useEffect(()=>(n.current=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){const i=l.target,d=i.dataset.src;d&&(i.src=d,i.onload=()=>{a(c=>new Set(c).add(d))},n.current?.unobserve(i))}})},{threshold:e}),()=>n.current?.disconnect()),[e]);const o=v.useCallback(s=>{s&&n.current&&n.current.observe(s)},[]);return{loadedImages:r,observeImage:o}},Pg=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},un={},Og=e=>{un[e.name]=e.value,process.env.NODE_ENV},Ug=()=>un,Dg=(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)}},jg=(e,r="script",a)=>{if(typeof document<"u"){const n=document.createElement("link");n.rel="preload",n.href=e,n.as=r,a&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}},_g=e=>{const r=v.useRef(new Set),a=v.useRef(new Set),n=v.useCallback((s,l)=>{const i=setTimeout(()=>{r.current.delete(i),s()},l);return r.current.add(i),i},[]),o=v.useCallback((s,l)=>{const i=setInterval(s,l);return a.current.add(i),i},[]);return v.useEffect(()=>{const s=r.current,l=a.current;return()=>{s.forEach(i=>clearTimeout(i)),l.forEach(i=>clearInterval(i)),process.env.NODE_ENV}},[e]),{createTimer:n,createInterval:o}},ge={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>ge.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${ge.maxFCP}ms)`),e.LCP&&e.LCP>ge.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${ge.maxLCP}ms)`),e.FID&&e.FID>ge.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${ge.maxFID}ms)`),e.CLS&&e.CLS>ge.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${ge.maxCLS})`),r}};class zg{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Be.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),Be.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),Be.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),Be.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),Be.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{if(s.entryType==="navigation"){const l=s;this.metrics.bundleLoadTime=l.loadEventEnd-l.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const a=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.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 n=r.includes(".js"),o=r.includes(".css");if(n||o){const s=n?"JavaScript":"CSS";this.reportMetric(`${s} 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 n=performance.now()-a;this.reportMetric(`Mark (${r})`,n),this.performanceMarks.delete(r)}}trackRouteChange(r,a,n){typeof a=="string"?this.measureRouteChange(a,n||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 fr=null;const Bg=e=>(fr||(fr=new zg(e)),fr),br=()=>fr,gn=e=>{const r=v.useRef(performance.now());v.useEffect(()=>{const a=performance.now()-r.current,n=br();n&&n.measureComponentRender(e,a)},[e])},Wg=(e,r)=>v.forwardRef((a,n)=>(gn(r),v.createElement(e,{...a,ref:n}))),Fg=async(e,r)=>{const a=performance.now(),n=await e(),o=performance.now()-a,s=br();return s&&s.measureAPICall(r,o),n},hn={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Vg=(e,r=hn)=>{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}},$g=e=>{const r=e||br()?.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)},qg=({direction:e,className:r})=>t.jsx("svg",{className:f("w-4 h-4",r),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="up"?"M5 15l7-7 7 7":"M19 9l-7 7-7-7"})}),Hg=({className:e})=>t.jsx("svg",{className:f("w-4 h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),fn=({title:e="Performance Monitor",isCollapsed:r,onToggleCollapse:a,onClose:n,onMouseDown:o,isDragging:s,className:l})=>t.jsxs("div",{className:f("bg-gray-900 text-white rounded-t-lg px-3 py-2","flex items-center justify-between","shadow-lg border border-gray-700","select-none",o&&"cursor-grab",s&&"cursor-grabbing",l),onMouseDown:o,children:[t.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[t.jsx("span",{children:"🚀"}),e]}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("button",{onClick:a,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":r?"Expand":"Collapse",type:"button",children:t.jsx(qg,{direction:r?"up":"down"})}),n&&t.jsx("button",{onClick:n,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":"Close",type:"button",children:t.jsx(Hg,{})})]})]}),Gg={sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Yg={good:"bg-green-500","needs-improvement":"bg-yellow-500",poor:"bg-red-500",unknown:"bg-gray-400",neutral:"bg-gray-500"},Kg={good:"Good","needs-improvement":"Needs Improvement",poor:"Poor",unknown:"Unknown",neutral:"Neutral"},Zg=({rating:e,size:r="sm",showLabel:a=!1,className:n})=>t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("span",{className:f("rounded-full",Gg[r],Yg[e])}),a&&t.jsx("span",{className:"text-xs text-gray-400",children:Kg[e]})]}),bn=({className:e})=>t.jsxs("div",{className:f("flex gap-3 text-[10px] text-gray-400",e),children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Good"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Needs Improvement"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Poor"]})]}),Xg={good:"text-green-500","needs-improvement":"text-yellow-500",poor:"text-red-500",unknown:"text-gray-400",neutral:"text-gray-300"},H=({label:e,value:r,unit:a="",rating:n="neutral",description:o,className:s})=>{const l=typeof r=="number"?Number.isInteger(r)?r.toString():r.toFixed(r<1?3:0):r;return t.jsxs("div",{className:f("flex justify-between items-center",s),children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{className:"text-gray-300",children:e}),o&&t.jsx("span",{className:"text-[10px] text-gray-500",children:o})]}),t.jsxs("span",{className:f("font-medium",Xg[n]),children:[l,a]})]})},Qg=(e,r="ms",a=0)=>e===void 0?"N/A":`${e.toFixed(a)}${r}`,mn=(e={})=>{const{enabled:r=!0,onUpdate:a}=e,[n,o]=v.useState({}),[s,l]=v.useState(!0),i=v.useRef(a);v.useEffect(()=>{i.current=a},[a]);const d=v.useCallback(c=>{o(g=>{const h={...g,...c};return i.current?.(h),h})},[]);return v.useEffect(()=>{if(!r)return;if(typeof PerformanceObserver>"u"){l(!1);return}const c=[];try{const g=new PerformanceObserver(h=>{const w=h.getEntries(),m=w[w.length-1];d({lcp:m.renderTime||m.loadTime})});g.observe({type:"largest-contentful-paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.processingStart&&d({fid:m.processingStart-m.startTime})})});g.observe({type:"first-input",buffered:!0}),c.push(g)}catch{}try{let g=0;const h=new PerformanceObserver(w=>{for(const m of w.getEntries())!m.hadRecentInput&&m.value&&(g+=m.value,d({cls:g}))});h.observe({type:"layout-shift",buffered:!0}),c.push(h)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.name==="first-contentful-paint"&&d({fcp:m.startTime})})});g.observe({type:"paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.duration&&d({inp:m.duration})})});g.observe({type:"event",buffered:!0}),c.push(g)}catch{}try{const g=performance.getEntriesByType("navigation")[0];g&&d({ttfb:g.responseStart-g.requestStart})}catch{}return()=>{c.forEach(g=>g.disconnect())}},[r,d]),{metrics:n,isSupported:s}},Me=(e,r)=>{if(r===void 0)return"unknown";const n={lcp:{good:2500,poor:4e3},fid:{good:100,poor:300},cls:{good:.1,poor:.25},fcp:{good:1800,poor:3e3},ttfb:{good:800,poor:1800},inp:{good:200,poor:500}}[e];return n?r<=n.good?"good":r<=n.poor?"needs-improvement":"poor":"unknown"},yn=({metrics:e,className:r})=>{const a=(n,o=0)=>n===void 0?"N/A":n.toFixed(o);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-yellow-400 mb-2 text-xs",children:"Web Vitals"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"LCP",value:a(e.lcp),unit:"ms",rating:Me("lcp",e.lcp),description:"Largest Contentful Paint"}),t.jsx(H,{label:"FID",value:a(e.fid),unit:"ms",rating:Me("fid",e.fid),description:"First Input Delay"}),t.jsx(H,{label:"CLS",value:a(e.cls,3),rating:Me("cls",e.cls),description:"Cumulative Layout Shift"}),t.jsx(H,{label:"FCP",value:a(e.fcp),unit:"ms",rating:Me("fcp",e.fcp),description:"First Contentful Paint"}),t.jsx(H,{label:"TTFB",value:a(e.ttfb),unit:"ms",rating:Me("ttfb",e.ttfb),description:"Time to First Byte"}),e.inp!==void 0&&t.jsx(H,{label:"INP",value:a(e.inp),unit:"ms",rating:Me("inp",e.inp),description:"Interaction to Next Paint"})]})]})},pn=(e={})=>{const{enabled:r=!0,refreshInterval:a=5e3,onUpdate:n}=e,[o,s]=v.useState({}),l=v.useRef(n);v.useEffect(()=>{l.current=n},[n]);const i=v.useCallback(()=>{if(!(typeof performance>"u"))try{const c=performance.getEntriesByType("resource"),g=c.filter(p=>p.name.endsWith(".js")||p.initiatorType==="script"),h=g.reduce((p,A)=>p+A.duration,0),w=c.filter(p=>p.name.endsWith(".css")||p.initiatorType==="link"),m=w.reduce((p,A)=>p+A.duration,0),b=c.reduce((p,A)=>p+(A.transferSize||0),0),y={jsLoadTime:h,cssLoadTime:m,jsCount:g.length,cssCount:w.length,totalTransferSize:b};s(y),l.current?.(y)}catch{}},[]),d=v.useCallback(()=>{i()},[i]);return v.useEffect(()=>{if(!r)return;i();const c=setInterval(i,a);return()=>clearInterval(c)},[r,a,i]),{metrics:o,refresh:d}},vn=e=>e===void 0?"N/A":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`,wn=({metrics:e,className:r})=>{const a=n=>n===void 0?"N/A":n.toFixed(0);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-blue-400 mb-2 text-xs",children:"Bundle Performance"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"JS Load",value:a(e.jsLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"CSS Load",value:a(e.cssLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"JS Files",value:e.jsCount??"N/A",rating:"neutral"}),t.jsx(H,{label:"Transfer Size",value:vn(e.totalTransferSize),rating:"neutral"})]})]})},Jg=e=>e===void 0?"unknown":e<=200?"good":e<=500?"needs-improvement":"poor",kn=({metrics:e,className:r})=>{const a=n=>n===void 0||isNaN(n)?"N/A":n.toFixed(0);return e.callCount===0?null:t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-purple-400 mb-2 text-xs",children:"API Calls"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Count",value:e.callCount,rating:"neutral"}),t.jsx(H,{label:"Total Time",value:a(e.totalTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"Avg Time",value:a(e.averageTime),unit:"ms",rating:Jg(e.averageTime)}),e.slowestCall!==void 0&&t.jsx(H,{label:"Slowest",value:a(e.slowestCall),unit:"ms",rating:e.slowestCall>1e3?"poor":"neutral"}),e.failedCalls>0&&t.jsx(H,{label:"Failed",value:e.failedCalls,rating:"poor"})]})]})},xn=e=>e===void 0?"N/A":(e/(1024*1024)).toFixed(1),Nn=(e,r)=>{if(e===void 0||r===void 0)return"unknown";const a=e/r;return a<=.5?"good":a<=.75?"needs-improvement":"poor"},Cn=({refreshInterval:e=2e3,className:r})=>{const[a,n]=v.useState({}),[o,s]=v.useState(!0);if(v.useEffect(()=>{const i=performance;if(!i.memory){s(!1);return}const d=()=>{i.memory&&n({usedJSHeapSize:i.memory.usedJSHeapSize,totalJSHeapSize:i.memory.totalJSHeapSize,jsHeapSizeLimit:i.memory.jsHeapSizeLimit})};d();const c=setInterval(d,e);return()=>clearInterval(c)},[e]),!o)return null;const l=a.usedJSHeapSize&&a.jsHeapSizeLimit?(a.usedJSHeapSize/a.jsHeapSizeLimit*100).toFixed(0):"N/A";return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-cyan-400 mb-2 text-xs",children:"Memory"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Used Heap",value:xn(a.usedJSHeapSize),unit:"MB",rating:Nn(a.usedJSHeapSize,a.jsHeapSizeLimit)}),t.jsx(H,{label:"Total Heap",value:xn(a.totalJSHeapSize),unit:"MB",rating:"neutral"}),t.jsx(H,{label:"Usage",value:l,unit:"%",rating:Nn(a.usedJSHeapSize,a.jsHeapSizeLimit)})]})]})},Rg=e=>{if(e.rating)return e.rating;if(typeof e.value=="number"&&e.thresholds){const{good:r,poor:a}=e.thresholds;return e.value<=r?"good":e.value<=a?"needs-improvement":"poor"}return"neutral"},Sn=({title:e="Custom Metrics",titleColor:r="text-orange-400",metrics:a,className:n})=>a.length===0?null:t.jsxs("div",{className:f("space-y-1",n),children:[t.jsx("h3",{className:f("font-semibold mb-2 text-xs",r),children:e}),t.jsx("div",{className:"space-y-1.5",children:a.map(o=>t.jsx(H,{label:o.label,value:o.value,unit:o.unit,rating:Rg(o),description:o.description},o.id))})]}),eh=["/api/","graphql",".json"],En=(e={})=>{const{enabled:r=!0,patterns:a=eh,refreshInterval:n=5e3,onUpdate:o}=e,[s,l]=v.useState({callCount:0,totalTime:0,averageTime:0,failedCalls:0}),i=v.useRef(a),d=v.useRef(o);v.useEffect(()=>{i.current=a},[a]),v.useEffect(()=>{d.current=o},[o]);const c=v.useCallback(()=>{if(!(typeof performance>"u"))try{const h=performance.getEntriesByType("resource"),w=i.current,m=h.filter(N=>w.some(C=>N.name.includes(C)));if(m.length===0)return;const b=m.reduce((N,C)=>N+C.duration,0),y=Math.max(...m.map(N=>N.duration)),p=m.filter(N=>{const C=N.responseStatus;return C!==void 0&&C>=400}).length,A={callCount:m.length,totalTime:b,averageTime:b/m.length,slowestCall:y,failedCalls:p};l(A),d.current?.(A)}catch{}},[]),g=v.useCallback(()=>{c()},[c]);return v.useEffect(()=>{if(!r)return;c();const h=setInterval(c,n);return()=>clearInterval(h)},[r,n,c]),{metrics:s,refresh:g}},An=(e={})=>{const{enabled:r=!0,constrainToViewport:a=!0,horizontalOnly:n=!1,verticalOnly:o=!1,initialPosition:s}=e,l=v.useRef(null),[i,d]=v.useState({x:s?.x??null,y:s?.y??null}),[c,g]=v.useState(!1),[h,w]=v.useState({x:0,y:0}),m=v.useCallback(y=>{if(!r||!l.current)return;const p=l.current.getBoundingClientRect();g(!0),w({x:y.clientX-p.left,y:y.clientY-p.top}),(i.x===null||i.y===null)&&d({x:n?p.left:i.x??p.left,y:o?p.top:i.y??p.top}),y.preventDefault()},[r,i,n,o]),b=v.useCallback(()=>{d({x:s?.x??null,y:s?.y??null})},[s]);return v.useEffect(()=>{if(!c)return;const y=A=>{if(!l.current)return;let N=A.clientX-h.x,C=A.clientY-h.y;if(a){const k=window.innerWidth-l.current.offsetWidth,S=window.innerHeight-l.current.offsetHeight;N=Math.max(0,Math.min(N,k)),C=Math.max(0,Math.min(C,S))}d({x:n?N:o?i.x:N,y:o?C:n?i.y:C})},p=()=>{g(!1)};return document.addEventListener("mousemove",y),document.addEventListener("mouseup",p),()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",p)}},[c,h,a,n,o,i.x,i.y]),{position:i,isDragging:c,handleMouseDown:m,resetPosition:b,ref:l}},Tn={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},rh=["webVitals","bundle","api","memory"],th=({enabled:e,defaultCollapsed:r=!0,defaultVisible:a=!0,position:n="bottom-right",draggable:o=!0,sections:s=rh,customMetrics:l=[],customSectionTitle:i="Custom Metrics",apiPatterns:d,onMetricsUpdate:c,className:g})=>{const h=e??(typeof process<"u"&&process.env?.NODE_ENV!=="production"),[w,m]=v.useState(r),[b,y]=v.useState(a),p=v.useMemo(()=>d,[JSON.stringify(d)]),A=v.useRef(c);v.useEffect(()=>{A.current=c},[c]);const{metrics:N}=mn({enabled:h&&s.includes("webVitals")}),{metrics:C}=pn({enabled:h&&s.includes("bundle")}),{metrics:k}=En({enabled:h&&s.includes("api"),patterns:p});v.useEffect(()=>{A.current&&A.current({webVitals:N,bundle:C,api:k})},[N,C,k]);const{position:S,isDragging:I,handleMouseDown:E,ref:M}=An({enabled:o,horizontalOnly:n.includes("bottom")||n.includes("top")}),x=v.useCallback(()=>{m(z=>!z)},[]),O=v.useCallback(()=>{y(!1)},[]),D=v.useCallback(()=>{y(!0)},[]);if(!h)return null;if(!b)return t.jsx("button",{onClick:D,className:f("fixed z-[9999]",Tn[n],"bg-gray-900 text-white px-3 py-2 rounded-lg","shadow-lg border border-gray-700","hover:bg-gray-800 transition-colors","text-xs font-mono"),type:"button",children:"🚀 Performance"});const U=S.x!==null?{left:`${S.x}px`,bottom:n.includes("bottom")?"1rem":void 0,top:n.includes("top")?"1rem":void 0,position:"fixed",transition:I?"none":"height 0.2s ease-in-out"}:{transition:"height 0.2s ease-in-out"},B=l.length>0||s.includes("custom");return t.jsxs("div",{ref:M,className:f(S.x!==null?"":`fixed ${Tn[n]}`,"z-[9999] font-mono text-xs",I&&"cursor-grabbing",g),style:{maxWidth:"320px",...U},children:[t.jsx(fn,{isCollapsed:w,onToggleCollapse:x,onClose:O,onMouseDown:o?E:void 0,isDragging:I}),t.jsx("div",{className:f("bg-gray-800 text-gray-100 rounded-b-lg","shadow-lg border-x border-b border-gray-700","overflow-hidden transition-all duration-300 ease-in-out",w?"max-h-0 opacity-0":"max-h-[70vh] opacity-100 py-2 px-3"),children:t.jsxs("div",{className:"overflow-y-auto max-h-full space-y-3",children:[s.includes("webVitals")&&t.jsx(yn,{metrics:N}),s.includes("bundle")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(wn,{metrics:C})}),s.includes("api")&&k.callCount>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(kn,{metrics:k})}),s.includes("memory")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Cn,{})}),B&&l.length>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Sn,{title:i,metrics:l})}),t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(bn,{})})]})})]})},ah=(e={})=>{const{successMessage:r="",successDuration:a=3e3,errorPrefix:n="",onSuccess:o,onError:s}=e,[l,i]=v.useState(!1),[d,c]=v.useState(""),[g,h]=v.useState(""),w=v.useCallback(()=>{c(""),h("")},[]),m=v.useCallback(()=>{c("")},[]),b=v.useCallback(()=>{h("")},[]),y=v.useCallback(async p=>{i(!0),w();try{await p(),r&&(c(r),a>0&&setTimeout(()=>{c("")},a)),o&&o()}catch(A){const N=A instanceof Error?A.message:"An error occurred";throw h(n?`${n}: ${N}`:N),s&&A instanceof Error&&s(A),A}finally{i(!1)}},[r,a,n,o,s,w]);return{isSubmitting:l,successMessage:d,errorMessage:g,submit:y,clearMessages:w,clearSuccess:m,clearError:b}},nh=(e=!1)=>{const[r,a]=v.useState(e),n=v.useCallback(()=>a(!0),[]),o=v.useCallback(()=>a(!1),[]),s=v.useCallback(()=>a(l=>!l),[]);return{value:r,setTrue:n,setFalse:o,toggle:s,setValue:a}},oh=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState(null),l=v.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const g=document.createElement("textarea");g.value=c,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const h=document.execCommand("copy");if(document.body.removeChild(g),!h)throw new Error("Copy command was unsuccessful")}return s(c),a?.(c),setTimeout(()=>{s(null)},r),!0}catch(g){const h=g instanceof Error?g:new Error("Copy failed");return n?.(h),!1}},[r,a,n]),i=v.useCallback(c=>o===c,[o]),d=v.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:l,isCopied:i,resetCopiedState:d}},sh=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState({}),l=v.useCallback(async(c,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const h=document.createElement("textarea");h.value=c,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const w=document.execCommand("copy");if(document.body.removeChild(h),!w)throw new Error("Copy command was unsuccessful")}return s(h=>({...h,[g]:!0})),a?.(c),setTimeout(()=>{s(h=>({...h,[g]:!1}))},r),!0}catch(h){const w=h instanceof Error?h:new Error("Copy failed");return n?.(w),!1}},[r,a,n]),i=v.useCallback(c=>o[c]||!1,[o]),d=v.useCallback(c=>{s(c?g=>({...g,[c]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:l,isCopied:i,resetCopiedState:d}},lh=e=>{if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(r)),o=Math.min(n,a.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+a[o]},ih=(e,r,a)=>{const n={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,l=e*Math.pow(o,n[r])/Math.pow(o,n[a]);return Math.round(l*100)/100},ch=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const a=parseFloat(r[1]),n=r[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[n];return s?Math.round(a*s):null},dh=e=>e,uh=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},gh=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)},hh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[`--${a}`]=typeof n=="number"?`${n}px`:n}),r},fh={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},bh=(e,r=fh)=>{const[a,n]=v.useState("base");return v.useEffect(()=>{const o=()=>{const s=window.innerWidth;s>=r["2xl"]?n("2xl"):s>=r.xl?n("xl"):s>=r.lg?n("lg"):s>=r.md?n("md"):s>=r.sm?n("sm"):s>=r.xs?n("xs"):n("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[r]),e[a]||e.base||{}},In=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,mh=()=>{const[e,r]=v.useState(In);return v.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{r(a.matches)};return a.addEventListener?a.addEventListener("change",n):a.addListener(n),()=>{a.removeEventListener?a.removeEventListener("change",n):a.removeListener(n)}},[]),e},yh=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},ph=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,vh=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},wh=(...e)=>e.filter(Boolean).join(" "),kh=e=>{const r={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([n,o])=>{a.includes(n)&&(r[n]=o)}),r},xh=(e,r=[])=>{const[a,n]=v.useState(null),[o,s]=v.useState(!0);return v.useEffect(()=>{let l=!0;return e().then(i=>{l&&(n(i.default),s(!1))}),()=>{l=!1}},[e,...r]),{styles:a,loading:o}},Nh=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),Ch=(e="row",r="center",a="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:a,contain:"layout"}),Sh=e=>{const[r,a]=v.useState(!1);return v.useEffect(()=>{const n=window.matchMedia(e);a(n.matches);const o=()=>a(n.matches);return n.addEventListener?n.addEventListener("change",o):n.addListener(o),()=>{n.removeEventListener?n.removeEventListener("change",o):n.removeListener(o)}},[e]),r},Eh=(e,r)=>{const[a,n]=v.useState("light");return v.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");n(o.matches?"dark":"light");const s=()=>{n(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",s):o.addListener(s),()=>{o.removeEventListener?o.removeEventListener("change",s):o.removeListener(s)}},[]),a==="dark"?r:e},Ah=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},Th=(e,r=[320,640,768,1024,1280,1920])=>r.map(a=>`${e.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Ih=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),Mh=(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},Lh=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(n=>{n.dataset.src&&(n.src=n.dataset.src)});return}const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(n=>a.observe(n)),()=>{r.forEach(n=>a.unobserve(n))}},Mn=()=>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"}),Ln=()=>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="}),Ph=async(e="jpg")=>{const[r,a]=await Promise.all([Mn(),Ln()]);return a?"avif":r?"webp":e},Oh=(e,r,a,n)=>`
|
|
56
|
+
`,children:o?"Verified":n?"Current Plan":"Select Plan"})]})},x0=({children:e,backgroundClassName:r="",contentClassName:a=""})=>t.jsx("div",{className:r,children:t.jsx("div",{className:a,children:e})}),N0=({title:e,description:r})=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r})]}),C0=({children:e,mode:r,className:a,as:n="div",withPadding:o=!0})=>{const s=he(),l=r?S0(r,o):o?s.containerClass:s.maxWidthClass;return t.jsx(n,{className:f(l,a),children:e})};function S0(e,r){const a={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"};return r?`${a[e]} px-4`:a[e]}const E0=({variant:e="full",sticky:r=!1,className:a,children:n})=>{const{containerClass:o}=he(),s=e==="compact";return t.jsx("footer",{className:f("bg-gray-900 text-white transition-all duration-300 ease-in-out",s?"py-4":"py-12",r?"sticky bottom-0 z-50 border-t border-gray-700":"relative z-10","pointer-events-auto",a),children:t.jsx("div",{className:o,children:n})})},A0=({children:e,className:r})=>t.jsx("div",{className:f("grid md:grid-cols-5 gap-8",r),children:e}),T0=({children:e,description:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("div",{className:"mb-4",children:e}),r&&t.jsx("p",{className:P.body.sm(),children:r})]}),I0=({title:e,children:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("h3",{className:f(P.heading.h5(),"mb-4 text-white"),children:e}),t.jsx("ul",{className:f("space-y-2",P.body.sm()),children:r})]}),M0=({children:e,className:r})=>t.jsx("li",{className:f("hover:text-white transition-colors",r),children:e}),L0=({children:e,className:r})=>t.jsx("div",{className:f("border-t mt-8 pt-8 text-center space-y-4",go.border.default,r),children:e}),P0=({children:e,className:r})=>v.Children.toArray(e).filter(Boolean).length===0?null:t.jsx("div",{className:f("flex items-center justify-center gap-3 text-gray-400 text-sm",r),children:e}),O0=({children:e,className:r})=>t.jsx("div",{className:f("flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0",r),children:e}),U0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-3 text-gray-400 text-sm",r),children:e}),D0=({children:e,className:r})=>t.jsx("div",{className:f("flex space-x-6 text-sm",r),children:e}),j0=({version:e,className:r})=>t.jsxs("span",{className:f("text-gray-500",r),children:["v",e]}),_0=({year:e,companyName:r,rightsText:a,companyLink:n,className:o})=>t.jsxs("span",{className:o,children:["© ",e," ",n||t.jsx("span",{className:"text-blue-400",children:r}),a&&`. ${a}`]}),Ae=({href:e,label:r,children:a})=>t.jsx(Ua,{content:r,children:t.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":r,children:a})}),z0=({twitterUrl:e,redditUrl:r,discordUrl:a,linkedinUrl:n,farcasterUrl:o,telegramUrl:s,githubUrl:l,className:i})=>e||r||a||n||o||s||l?t.jsxs("div",{className:f("flex items-center gap-4",i),children:[e&&t.jsx(Ae,{href:e,label:"Twitter / X",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),r&&t.jsx(Ae,{href:r,label:"Reddit",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),a&&t.jsx(Ae,{href:a,label:"Discord",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),n&&t.jsx(Ae,{href:n,label:"LinkedIn",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),o&&t.jsx(Ae,{href:o,label:"Farcaster",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{d:"M18.24 2.4H5.76a3.36 3.36 0 0 0-3.36 3.36v12.48a3.36 3.36 0 0 0 3.36 3.36h12.48a3.36 3.36 0 0 0 3.36-3.36V5.76a3.36 3.36 0 0 0-3.36-3.36zm-2.16 13.2h-1.2v-4.8h-5.76v4.8H7.92V8.4h1.2v3.6h5.76V8.4h1.2v7.2z"})})}),s&&t.jsx(Ae,{href:s,label:"Telegram",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("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"})})}),l&&t.jsx(Ae,{href:l,label:"GitHub",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})})})]}):null,B0=({isSelected:e,onClick:r,icon:a,label:n,description:o,className:s=""})=>t.jsxs("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 ${s}`,children:[e&&t.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),t.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&t.jsx(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"}`}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("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:n}),o&&t.jsx("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})]})]})]}),W0=({masterTitle:e,masterSubtitle:r,backButtonText:a,masterContent:n,detailContent:o,detailTitle:s,mobileView:l="navigation",onBackToNavigation:i,masterClassName:d="",detailClassName:c="",detailTitleClassName:g="",masterWidth:h=320,stickyMaster:w=!0,stickyTopOffset:m=96,desktopGap:b=32,showMasterBackground:y=!0,enableAnimations:p=!0,animationDuration:A=300,animationRef:N})=>{const{containerClass:C}=he(),k=`gap-${Math.round(b/4)}`||"gap-8",S=ee=>ee?ee.split("-")[0].trim():"Back",I=a?S(a):e?S(e):"Back",[E,M]=v.useState(!1),[x,O]=v.useState("auto"),D=v.useRef(null),U=v.useRef(null);v.useEffect(()=>(N&&(N.current={triggerTransition:ee=>{if(!p){ee();return}if(D.current){const Pe=D.current.scrollHeight;O(Pe)}M(!0),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{ee(),setTimeout(()=>{if(D.current){const Pe=D.current.scrollHeight;O(Pe),setTimeout(()=>{O("auto"),M(!1)},A)}},50)},A/2)}}),()=>{U.current&&clearTimeout(U.current)}),[p,A,N]);const B=p?{height:x==="auto"?"auto":`${x}px`,transition:`height ${A}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},z=p?`${E?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",V=p?{transition:`opacity ${A}ms ease-in-out, transform ${A}ms ease-in-out`}:{};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`md:hidden ${l==="navigation"?"block":"hidden"} flex-1`,children:t.jsxs("div",{className:y?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&t.jsxs("div",{className:C,children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r})]}),t.jsx("div",{className:d,children:n})]})}),t.jsxs("div",{className:`${C} py-8`,children:[t.jsxs("div",{className:`md:hidden ${l==="content"?"block":"hidden"}`,children:[l==="content"&&i&&t.jsxs("button",{onClick:i,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:["← ",I]}),t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})]}),t.jsxs("div",{className:`hidden md:flex min-h-full ${k}`,style:{width:"100%"},children:[t.jsx("aside",{className:"flex-shrink-0",style:{width:`${h}px`,minWidth:`${h}px`},children:t.jsxs("div",{className:w?"sticky":"",style:w?{top:`${m}px`}:void 0,children:[e&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r}),t.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${w?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:n})]})}),t.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${h+b}px)`},children:t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})})]})]})]})},Xr=v.createContext(null),Fa=({children:e,variant:r="default",sticky:a=!0})=>{const[n,o]=v.useState(!1),s=v.useCallback(()=>{o(l=>!l)},[]);return t.jsx(Xr.Provider,{value:{variant:r,sticky:a,mobileMenuOpen:n,setMobileMenuOpen:o,toggleMobileMenu:s},children:e})},Qr=()=>{const e=v.useContext(Xr);if(!e)throw new Error("useTopbar must be used within a TopbarProvider");return e},Va={sm:"min-h-12",md:"min-h-14",lg:"min-h-16"},F0={default:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",app:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm",minimal:"bg-transparent",transparent:"bg-white/80 dark:bg-gray-900/80 border-b border-gray-200/50 dark:border-gray-700/50"},V0={default:"z-40",high:"z-50",highest:"z-[60]"},$0=({children:e,variant:r="default",sticky:a=!0,className:n,height:o="md",blur:s=!1,zIndex:l="high","aria-label":i="Main navigation"})=>{const{containerClass:d}=he();return t.jsx(Fa,{variant:r,sticky:a,children:t.jsxs("header",{role:"banner","aria-label":i,className:f("w-full",Va[o],F0[r],V0[l],a&&"sticky top-0",s&&"backdrop-blur-md","transition-colors duration-200",n),children:[t.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-blue-600 text-white px-4 py-2 rounded-md z-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Skip to main content"}),t.jsx("div",{className:f(d,Va[o],"flex flex-wrap items-center justify-between"),children:e})]})})},q0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),H0=({children:e,className:r})=>t.jsx("div",{className:f("flex-1 flex items-center justify-center px-4",r),children:e}),G0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),Y0=({children:e,className:r})=>t.jsx("div",{className:f("md:hidden w-full basis-full pt-2 pb-3",r),children:e}),K0=({className:e})=>t.jsx("div",{className:f("hidden md:block h-6 w-px bg-gray-200 dark:bg-gray-700 mx-2",e),role:"separator","aria-orientation":"vertical"}),Z0={sm:"h-6",md:"h-8",lg:"h-10"},X0=({children:e,src:r,alt:a="Logo",onClick:n,href:o,className:s,size:l="md"})=>{const i=e||r&&t.jsx("img",{src:r,alt:a,className:f(Z0[l],"w-auto object-contain")}),d=f("flex items-center","hover:opacity-80 transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-md",s);return o?t.jsx("a",{href:o,className:d,title:a,children:i}):n?t.jsx("button",{type:"button",onClick:n,className:d,title:a,"aria-label":`Go to ${a||"home"}`,children:i}):t.jsx("div",{className:d,children:i})},Q0={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},J0=({className:e,isOpen:r})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:r?t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})}),$a=({icon:e,"aria-label":r="Toggle navigation menu",className:a,onClick:n,hideAbove:o="lg",menuItems:s,LinkComponent:l})=>{const{mobileMenuOpen:i,toggleMobileMenu:d,setMobileMenuOpen:c}=Qr(),[g,h]=v.useState(!1),w=v.useRef(null);sr(w,()=>{h(!1)});const m=s?g:i,b=()=>{n?n():s?h(!g):d()},y=()=>{h(!1),c(!1)};return t.jsxs("div",{className:f("relative",Q0[o]),ref:w,children:[t.jsx("button",{type:"button",onClick:b,className:f("p-2 rounded-lg","text-gray-600 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",a),"aria-label":r,"aria-expanded":m,"aria-haspopup":s?"menu":void 0,"aria-controls":s?"topbar-dropdown-menu":"mobile-menu",children:e?t.jsx(e,{className:"h-6 w-6"}):t.jsx(J0,{className:"h-6 w-6",isOpen:m})}),s&&g&&t.jsx("div",{id:"topbar-dropdown-menu",role:"menu",className:f("absolute left-0 top-full mt-2","min-w-[200px] py-2 rounded-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","shadow-lg","z-50"),children:s.map(p=>{const A=p.icon,N=t.jsxs(t.Fragment,{children:[A&&t.jsx(A,{className:"h-5 w-5 mr-3 flex-shrink-0"}),t.jsx("span",{children:p.label})]}),C=f("flex items-center w-full px-4 py-2.5 text-sm font-medium","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","transition-colors duration-150",p.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400",p.disabled&&"opacity-50 cursor-not-allowed");return p.href&&l?t.jsx(l,{href:p.href,className:C,children:t.jsx("div",{className:"flex items-center",onClick:y,children:N})},p.id):p.href?t.jsx("a",{href:p.href,role:"menuitem",className:C,onClick:y,children:N},p.id):t.jsx("button",{type:"button",role:"menuitem",className:C,onClick:()=>{y(),p.onClick?.()},disabled:p.disabled,children:N},p.id)})})]})},R0={sm:{show:"hidden sm:flex",hide:"sm:hidden"},md:{show:"hidden md:flex",hide:"md:hidden"},lg:{show:"hidden lg:flex",hide:"lg:hidden"},xl:{show:"hidden xl:flex",hide:"xl:hidden"}},eu={left:"justify-start",center:"justify-center",right:"justify-end"},qa=({items:e,className:r,collapseBelow:a="lg",LinkComponent:n,align:o="center"})=>{const[s,l]=v.useState(null),i=v.useRef(null);sr(i,()=>l(null));const d=(c,g=!1)=>{const h=c.children&&c.children.length>0,w=s===c.id,m=f("px-3 py-2 rounded-md text-sm font-medium","transition-colors duration-200",c.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-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700",c.disabled&&"opacity-50 cursor-not-allowed pointer-events-none",g&&"w-full text-left");return h?t.jsxs("div",{className:"relative",ref:i,children:[t.jsxs("button",{type:"button",onClick:()=>l(w?null:c.id),className:f(m,"flex items-center gap-1"),"aria-expanded":w,"aria-haspopup":"true",disabled:c.disabled,children:[c.icon&&t.jsx(c.icon,{className:"h-4 w-4 mr-1"}),c.label,t.jsx("svg",{className:f("h-4 w-4 transition-transform duration-200",w&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w&&t.jsx("div",{className:f("absolute top-full left-0 mt-1 py-1","min-w-[200px] rounded-md shadow-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","z-50"),children:c.children?.map(b=>t.jsx(Jr,{item:b,LinkComponent:n,className:f("block px-4 py-2 text-sm","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700",b.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"),onClick:()=>l(null)},b.id))})]},c.id):t.jsx(Jr,{item:c,LinkComponent:n,className:m},c.id)};return t.jsx("nav",{className:f("flex items-center gap-1",R0[a].show,eu[o],r),"aria-label":"Main navigation",children:e.map(c=>d(c))})},Jr=({item:e,LinkComponent:r,className:a,onClick:n})=>{const o=()=>{n?.(),e.onClick?.()},s=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx(e.icon,{className:"h-4 w-4 mr-2"}),e.label]});return e.href&&r?t.jsx(r,{href:e.href,className:f(a,"flex items-center"),children:s}):e.href?t.jsx("a",{href:e.href,className:f(a,"flex items-center"),onClick:o,children:s}):t.jsx("button",{type:"button",onClick:o,className:f(a,"flex items-center"),disabled:e.disabled,children:s})},ru=({items:e,isOpen:r,className:a,LinkComponent:n})=>{const{mobileMenuOpen:o,setMobileMenuOpen:s}=Qr();return r??o?t.jsx("div",{id:"mobile-menu",className:f("lg:hidden","border-t border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900","shadow-lg",a),children:t.jsx("nav",{className:"px-4 py-2 space-y-1","aria-label":"Mobile navigation",children:e.map(i=>t.jsx(Jr,{item:i,LinkComponent:n,className:f("flex items-center w-full px-3 py-2 rounded-md text-base font-medium","transition-colors duration-200",i.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-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700"),onClick:()=>s(!1)},i.id))})}):null},tu=({items:e,LinkComponent:r,collapseBelow:a="lg",align:n="center",className:o,mobileMenuLabel:s="Toggle navigation menu",children:l})=>t.jsxs(t.Fragment,{children:[t.jsx($a,{hideAbove:a,menuItems:e,LinkComponent:r,"aria-label":s,className:o}),l,t.jsx(qa,{items:e,collapseBelow:a,LinkComponent:r,align:n,className:o})]}),au={sm:"gap-1",md:"gap-2",lg:"gap-3"},nu={left:"justify-start",center:"justify-center",right:"justify-end"},ou=({children:e,className:r,gap:a="md",align:n="right"})=>t.jsx("div",{className:f("flex items-center",au[a],nu[n],r),children:e}),su={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},lu={sm:"p-1.5",md:"p-2",lg:"p-2.5"},iu=({icon:e,onClick:r,"aria-label":a,className:n,disabled:o=!1,badge:s,size:l="md"})=>t.jsxs("button",{type:"button",onClick:r,className:f("relative rounded-lg",lu[l],"text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-700 dark:hover:text-gray-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",o&&"opacity-50 cursor-not-allowed",n),"aria-label":a,disabled:o,children:[t.jsx(e,{className:su[l]}),s!==void 0&&s>0&&t.jsx("span",{className:f("absolute -top-1 -right-1","min-w-[18px] h-[18px] px-1","flex items-center justify-center","text-xs font-medium","bg-red-500 text-white rounded-full","ring-2 ring-white dark:ring-gray-900"),"aria-label":`${s} notifications`,children:s>99?"99+":s})]}),cu={sm:"w-48",md:"w-64",lg:"w-96",full:"w-full"},du=({placeholder:e="Search...",value:r,onChange:a,onSubmit:n,className:o,width:s="md",showOnMobile:l=!1})=>{const[i,d]=v.useState(r||""),c=h=>{const w=h.target.value;d(w),a?.(w)},g=h=>{h.preventDefault(),n?.(i)};return t.jsx("form",{onSubmit:g,className:f(!l&&"hidden md:block",o),role:"search",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"search",value:i,onChange:c,placeholder:e,"aria-label":e,className:f(cu[s],"pl-10 pr-4 py-2","text-sm","bg-gray-100 dark:bg-gray-800","border border-transparent","rounded-lg","text-gray-900 dark:text-gray-100","placeholder:text-gray-500 dark:placeholder:text-gray-400","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white dark:focus:bg-gray-700 focus:border-transparent","transition-colors duration-200")})]})})},uu=({contentType:e,aiSummary:r,technicalComplexity:a="intermediate"})=>t.jsxs(Fn.Helmet,{children:[t.jsx("meta",{name:"ai:content-type",content:e}),t.jsx("meta",{name:"ai:summary",content:r}),t.jsx("meta",{name:"ai:complexity",content:a})]}),gu=({children:e,className:r,...a})=>t.jsx("main",{className:r,...a,role:"main",children:e}),hu=({children:e})=>t.jsx(t.Fragment,{children:e}),Ue=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Te=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),Rr=e=>{const r=Ue(e.audience),a=Te(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}}},et=e=>{const r=Ue(e.keywords),a=Ue(e.audience),n=Te(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:n.appName,url:n.baseUrl,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:n.appName,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${n.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${n.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"]}},fu=(e,r)=>{const a=Te(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.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:n.category||"General"}))}},rt=e=>{const r=Te(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"}}},Ha=e=>{const r=Ue(e.keywords),a=Te(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()}},Ga=e=>{const r=Te(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"}},Ya=e=>{const r=Ue(e.keywords),a=Ue(e.audience),n=Te(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":`${n.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},bu=e=>({structuredData:{product:Rr(e),article:et(e),aiOptimized:rt(e)},openGraph:Ha(e),twitterCard:Ga(e),aiMetaTags:Ya(e),jsonLD:[Rr(e),et(e),rt(e)]}),mu={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"]}},yu=e=>{const{level:r,text:a,className:n="",id:o,semanticContext:s="section"}=e,l=`h${r}`,i={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=[i[r],d[s],n].filter(Boolean).join(" "),g=o||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return v.createElement(l,{id:g,className:c,"aria-level":r},a)},le={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"})},pu=e=>{const r=[],a=[],n=e.filter(o=>o.level===1).length;n===0?r.push("Missing H1 tag - every page should have exactly one H1"):n>1&&r.push(`Multiple H1 tags found (${n}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const s=e[o],l=e[o-1];s.level>l.level+1&&r.push(`Heading level jump from H${l.level} to H${s.level} - avoid skipping levels`)}return e.forEach((o,s)=>{o.text.length<3&&r.push(`Heading ${s+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}},vu={walletConnection:le.pageTitle("Connect Your Web3 Wallet"),emailBenefits:le.majorSection("Why Choose Web3 Email?"),securityFeature:le.feature("Secure & Private"),ensIntegration:le.feature("ENS Domain Support"),multiChain:le.feature("Multi-Chain Compatibility"),passwordless:le.benefit("No Passwords Required"),setupStep1:le.step("Connect Your Wallet",1),setupStep2:le.step("Verify Your Identity",2),setupStep3:le.step("Access Your Emails",3)},wu=[{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"}],ku=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}),xu=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(n=>{e.find(s=>s.term===n)&&r.edges.push({source:a.term,target:n,relationship:"related_to"})}),a.synonyms?.forEach(n=>{r.edges.push({source:a.term,target:n,relationship:"synonym_of"})})}),r},Nu=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},Cu=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},Su={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"]}},Eu=({children:e,appName:r,appUrl:a,apiUrl:n})=>(v.useEffect(()=>{const o=()=>{[].forEach(b=>{const y=document.createElement("link");y.rel="preload",y.href=b.href,y.as=b.as,b.type&&(y.type=b.type),b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(y=>{y.fetchPriority="high"});const b=document.querySelector("[data-hero]");if(b){const y=b.getAttribute("data-bg-image");if(y){const p=document.createElement("link");p.rel="preload",p.href=y,p.as="image",document.head.appendChild(p)}}},l=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(y=>{const p=y;p.naturalWidth&&p.naturalHeight&&(p.width=p.naturalWidth,p.height=p.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(y=>{y.getAttribute("style")?.includes("min-height")||(y.style.minHeight="200px")})},i=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(p=>{p.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(p=>{document.addEventListener(p,()=>{},{passive:!0})})})()},d=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...n?[{rel:"dns-prefetch",href:`//${n.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...n?[{rel:"preconnect",href:n}]:[]].forEach(b=>{const y=document.createElement("link");y.rel=b.rel,y.href=b.href,b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},g=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(b=>{b.loading="lazy"}),"IntersectionObserver"in window){const b=new IntersectionObserver(p=>{p.forEach(A=>{if(A.isIntersecting){const N=A.target;N.dataset.src&&(N.src=N.dataset.src,N.removeAttribute("data-src")),b.unobserve(N)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(p=>b.observe(p))}},h=()=>{[{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:p,content:A})=>{if(!document.querySelector(`meta[name="${p}"]`)){const N=document.createElement("meta");N.name=p,N.content=A,document.head.appendChild(N)}});const b={"@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"}},y=document.createElement("script");y.type="application/ld+json",y.textContent=JSON.stringify(b),document.head.appendChild(y)},w=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(b=>{const y=b.cloneNode(!0);y.rel="preload",y.as="style",y.onload=()=>{y.onload=null,y.rel="stylesheet"},document.head.appendChild(y),b.remove()})};return o(),s(),l(),i(),c(),g(),h(),w(),setTimeout(d,2e3),()=>{}},[n,r,a]),t.jsx(t.Fragment,{children:e})),Au=()=>(v.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const i=new IntersectionObserver(d=>{d.forEach(c=>{if(c.isIntersecting){const g=c.target;g.dataset.src&&(g.src=g.dataset.src,g.removeAttribute("data-src"),i.unobserve(g))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{i.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const c=document.createElement("link");c.rel="prefetch",c.href=d,document.head.appendChild(c)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const i=document.createElement("script");i.dataset.walletDetection="true",i.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(i)}},l=()=>{document.querySelectorAll("img[data-hero]").forEach(i=>{const d=i;d.loading="eager","fetchPriority"in d&&(d.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(i=>{const d=i;d.loading="lazy","fetchPriority"in d&&(d.fetchPriority="low")})};requestIdleCallback(()=>{o(),s(),l()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(l=>{const i=l.getEntries(),d=i[i.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 s=new PerformanceObserver(l=>{let i=0;for(const d of l.getEntries())d.hadRecentInput||(i+=d.value);i>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const c=d;c.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const s=o.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(l=>{l.getAttribute("data-critical")||l.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="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),Tu=({children:e})=>t.jsx(t.Fragment,{children:e}),Ka={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 Iu{constructor(){this.cache=new Map}set(r,a,n){if(this.cache.size>=n.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 n=this.cache.get(r);if(!n)return null;const s=Date.now()-n.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(r),null):{data:n.data,isStale:s}}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 De=new Iu,Ie=new Map,Za=async(e,r,a="messages")=>{const n=Ka[a],o=De.get(e,n);if(o&&!o.isStale)return o.data;const s=Ie.get(e);if(s)return s;if(o&&o.isStale&&n.staleWhileRevalidate){const i=r().then(d=>(De.set(e,d,n),Ie.delete(e),d)).catch(d=>{throw Ie.delete(e),d});return Ie.set(e,i),o.data}const l=r().then(i=>(De.set(e,i,n),Ie.delete(e),i)).catch(i=>{throw Ie.delete(e),i});return Ie.set(e,l),l};class Mu{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,a){return new Promise((n,o)=>{this.queue.push({key:r,fetcher:a,resolve:n,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 n of a)await Promise.allSettled(n.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(r){const a=[];for(let o=0;o<r.length;o+=5)a.push(r.slice(o,o+5));return a}}const Lu=new Mu;class Pu{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={},n,o="messages"){const s=`${this.baseURL}${r}`,l=n||`${a.method||"GET"}:${s}`,i=async()=>{let d={...a,headers:{...this.defaultHeaders,...a.headers}};for(const g of this.requestInterceptors)d=g(d);let c=await fetch(s,d);for(const g of this.responseInterceptors)c=await g(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(r)?Lu.add(l,i):Za(l,i,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 Ou=async(e,r=3,a=1e3)=>{let n;for(let o=0;o<=r;o++)try{return await e()}catch(s){if(n=s,o===r)throw n;const l=a*Math.pow(2,o)+Math.random()*1e3;await new Promise(i=>setTimeout(i,l))}throw n};class Uu{constructor(){this.abortController=new AbortController}async request(r,a={}){const n=await fetch(r,{...a,signal:this.abortController.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}cancel(){this.abortController.abort()}}const Du={invalidate:e=>De.invalidate(e),clear:()=>De.clear(),getStats:()=>De.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 Xa(){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 Qa(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Ja(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Ra(){return Qa()?"localhost":Xa()?"wallet-browser":Ja()?"network":"production"}function ju(){const e=Ra();return e==="localhost"||e==="wallet-browser"}function _u(e){}function en(){return typeof window<"u"}function zu(){return typeof window<"u"}function Bu(e,r){if(en())e();else return r}const tt=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'"]}),Wu=tt(),rn=e=>{const r=tt(e);return Object.entries(r).map(([a,n])=>`${a} ${n.join(" ")}`).join("; ")},tn=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":rn(e)}),Fu=tn(),Vu={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"},$u=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},qu={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"},ue=new Map,Ge=new Map,ur=new Set;let Ye="medium",at=!1;function Hu(){if("connection"in navigator){const a=navigator.connection;a&&(Ye=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;at=e&&e<4||r&&r<4}Hu();function Gu(e,r,a={}){const{retries:n=3,timeout:o=1e4,fallback:s,preloadCondition:l,cacheStrategy:i="memory",priority:d="medium",onLoad:c,onError:g}=a;if(ue.has(r))return ue.get(r).component;const h=v.lazy(async()=>{const m=performance.now();if(Ge.has(r))return Ge.get(r).then(y=>({default:y}));const b=Yu(e,n,o);Ge.set(r,b.then(y=>y.default));try{const y=await b,p=performance.now()-m;if(i!=="none"){const A={component:y.default,timestamp:Date.now(),loadTime:p};if(ue.set(r,A),i==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:A.timestamp,loadTime:p}))}catch{}}return Ge.delete(r),c?.(y.default),y}catch(y){throw Ge.delete(r),g?.(y),y}}),w=m=>{const[b,y]=v.useState(!0);v.useEffect(()=>{if(l&&!ue.has(r)&&l()&&!ur.has(r)){ur.add(r);const N=Ku(d,Ye);setTimeout(()=>{e().catch(()=>{})},N)}},[]);const p=s||t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!b&&at&&Ye==="slow"?t.jsx("div",{className:"lazy-placeholder",children:t.jsxs("button",{onClick:()=>y(!0),className:"load-component-btn",children:["Load ",r]})}):t.jsx(v.Suspense,{fallback:p,children:t.jsx(h,{...m})})};return w.displayName=`AdvancedLazy(${r})`,w}async function Yu(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((i,d)=>{setTimeout(()=>d(new Error("Load timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const l=Math.pow(2,o)*1e3,i=Math.random()*1e3;await new Promise(d=>setTimeout(d,l+i))}}throw n}function Ku(e,r){const a={critical:0,high:500,medium:2e3,low:5e3},n={fast:.5,medium:1,slow:2},o=a[e]||2e3,s=n[r]||1;return o*s}const Je=class Je{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:n,probability:o})=>{o>.3&&!ue.has(n)&&setTimeout(()=>{this.routeMap.get(n)},Ye==="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:ue.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Je.routeMap=new Map,Je.routeUsageStats=new Map,Je.currentRoute="";let nt=Je;const Zu=({src:e,alt:r,className:a,placeholder:n,priority:o="medium"})=>{const[s,l]=v.useState(!1),[i,d]=v.useState(!1),c=v.useRef(null);v.useEffect(()=>{if(!c.current)return;if(o==="high"){d(!0);return}const h=new IntersectionObserver(([w])=>{w.isIntersecting&&(d(!0),h.unobserve(w.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return h.observe(c.current),()=>h.disconnect()},[o]);const g=()=>{l(!0)};return t.jsxs("div",{className:`lazy-image-container ${a}`,children:[t.jsx("img",{ref:c,src:i?e:n||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&i&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function Xu(){ue.clear(),ur.clear()}function Qu(){return{cachedComponents:ue.size,preloadQueue:ur.size,networkSpeed:Ye,isLowEndDevice:at,cacheEntries:Array.from(ue.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const Ju=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Ru=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>t.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),t.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>t.jsx(Ju,{message:"Loading component..."})}},an=(e,r="default",a=3)=>{const n=v.lazy(async()=>{let s=null;for(let l=0;l<a;l++)try{return await e()}catch(i){s=i,l<a-1&&await new Promise(d=>setTimeout(d,Math.pow(2,l)*1e3))}throw s}),o=Ru(r);return s=>t.jsx(v.Suspense,{fallback:t.jsx(o,{}),children:t.jsx(n,{...s})})},eg=async e=>{try{await e()}catch{}},rg=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=an(n,"skeleton")}),r},tg=e=>e,nn={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Re=class Re{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}};Re.preloadedComponents=new Set,Re.preloadQueue=[],Re.isPreloading=!1;let ot=Re;const ag=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{nn.secondary.forEach(e=>{})})},on=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Ke=new Map;function ng(e,r){const{condition:a,fallback:n,retries:o=3,timeout:s=1e4,priority:l="medium",cacheKey:i=`conditional-${Math.random()}`}=r,d=c=>{const[g,h]=v.useState(!1),[w,m]=v.useState(null);return v.useEffect(()=>{const p=setTimeout(async()=>{const A=Ke.get(i);if(A&&A.isValid&&Date.now()-A.lastCheck<3e5)try{if(await A.condition()){m(()=>A.component),h(!0);return}}catch{}try{if(await a()){const C=await lg(e,o,s);Ke.set(i,{component:C.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>C.default),h(!0)}}catch{}},l==="high"?0:l==="medium"?100:500);return()=>clearTimeout(p)},[]),g?w?t.jsx(v.Suspense,{fallback:n||t.jsx(on,{message:"Loading component..."}),children:t.jsx(w,{...c})}):null:n||t.jsx(on,{message:"Checking conditions..."})};return d.displayName=`ConditionalLazy(${i})`,d}const og={},sg={};async function lg(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((l,i)=>{setTimeout(()=>i(new Error("Import timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const l=Math.pow(2,o)*1e3;await new Promise(i=>setTimeout(i,l))}}throw n}function ig(){Ke.clear()}function cg(){return{cachedComponents:Ke.size,cacheEntries:Array.from(Ke.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const sn=[{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 dg{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 n=a.effectiveType;n==="4g"?this.networkSpeedEstimate="fast":n==="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(n=>{n.level&&n.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(n=>{document.addEventListener(n,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 n=document.createElement("link");n.rel="modulepreload",n.href=r.path.replace("*",this.getChunkHash(r.name)),n.crossOrigin="","fetchPriority"in n&&(n.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(n),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const a=Array.from(document.querySelectorAll("script[src]"));for(const n of a){const o=n.src;if(o.includes(r)){const s=o.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(r){const a=r.config;return a.delay&&await new Promise(n=>setTimeout(n,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(n=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(n)})}):this.preloadChunk(r)}initializePreloading(){sn.sort((a,n)=>{const o={critical:0,high:1,medium:2,low:3};return o[a.config.priority]-o[n.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(n=>{let o=!1;n.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(r),o=!0)},{passive:!0})})}setupScrollPreloading(r,a){let n=!1;const o=()=>{if(n)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(r),n=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&sn.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 Ze=null;function ug(){Ze||(Ze=new dg,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ze?.initializePreloading()}):Ze.initializePreloading())}function gg(){return Ze?.getPreloadingStats()}function hg(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 ln(e){const r={"@context":"https://schema.org","@type":mg(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 fg(e,r){return r.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function cn(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 dn(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 bg(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:ln(e),entityRecognition:cn(e),topicClustering:dn(e),contentRelationships:r?.contentRelationships||[],...r}}function mg(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function yg(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 pg={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"]}},vg=({message:e,className:r})=>t.jsxs("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),st=new Map,Xe=new Set;function lt(){const e=[];return!!window.ethereum?.isMetaMask&&(Xe.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(Xe.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(Xe.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,s)=>o.priority-s.priority)}function it(e){const r=`wallet-${e.toLowerCase()}`;if(st.has(r))return st.get(r);const a=()=>Promise.resolve({default:()=>v.createElement("div",{},`${e} Provider Placeholder`)}),n=v.lazy(a),o=s=>t.jsx(v.Suspense,{fallback:t.jsx(vg,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:t.jsx(n,{...s})});return o.displayName=`Lazy${e}Provider`,st.set(r,o),o}function wg({children:e}){const r=lt();return r.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),t.jsxs(t.Fragment,{children:[r.map(a=>{const n=it(a.name);return t.jsx(n,{},a.name)}),e]})}const gt=class gt{static preloadWallet(r){const a=r.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{it(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,n)=>{setTimeout(()=>{this.preloadWallet(a)},n*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};gt.preloadedWallets=new Set;let Qe=gt;function kg(){return{availableWallets:lt(),preloadWallet:n=>{Qe.preloadWallet(n)},getDetectedWallets:()=>Array.from(Xe),hasWallet:n=>Xe.has(n.toLowerCase())}}function xg({walletName:e,onConnect:r,disabled:a=!1}){const n=()=>{Qe.preloadWallet(e),setTimeout(r,100)};return t.jsxs("button",{onClick:n,disabled:a,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class Ng{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(s=>{for(const l of s.getEntries())l.name==="first-contentful-paint"&&(this.observedMetrics.fcp=l.startTime,this.optimizeBasedOnFCP(l.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const l of s.getEntries())this.observedMetrics.lcp=l.startTime,this.optimizeBasedOnLCP(l.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let n=0;new PerformanceObserver(s=>{for(const l of s.getEntries())l.hadRecentInput||(n+=l.value);this.observedMetrics.cls=n}).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(n=>{n.loading="lazy",n.style.display="none",setTimeout(()=>{n.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(n=>{n.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(n=>{n instanceof HTMLImageElement&&(n.fetchPriority="high",n.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 n=document.createElement("style");n.textContent=a,document.head.appendChild(n),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const n=a.getAttribute("href")||"";if(!n.includes("display=swap")){const o=n.includes("?")?"&":"?";a.setAttribute("href",`${n}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const n=a.cloneNode(!0);n.rel="preload",n.as="style",n.onload=()=>{n.onload=null,n.rel="stylesheet"};const o=document.createElement("noscript"),s=a.cloneNode(!0);o.appendChild(s),document.head.appendChild(n),document.head.appendChild(o),a.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(n=>a.observe(n))}else r.forEach(a=>{const n=a;n.src=n.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 gr={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 n=performance.getEntriesByName(e);return n[n.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?.()))}},Cg=(e,r=[])=>{v.useEffect(()=>(gr.mark(`${e}-start`),()=>{gr.mark(`${e}-end`),gr.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},Sg=e=>{const r=v.useRef(e);return r.current=e,v.useCallback((...a)=>r.current(...a),[])},Eg=(e,r,a)=>{const n=v.useRef(r),o=v.useRef(void 0);return v.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&r.some((s,l)=>s!==n.current[l]),n.current=r,o.current=e(),o.current),[e,a,r])},hr=new Map,Ag=e=>{const r=hr.get(e)||0;hr.set(e,r+1),v.useEffect(()=>{process.env.NODE_ENV})},Tg=()=>Object.fromEntries(hr),Ig=()=>hr.clear(),Mg=e=>v.lazy(e),Lg=(e=.1)=>{const[r,a]=v.useState(new Set),n=v.useRef(null);v.useEffect(()=>(n.current=new IntersectionObserver(s=>{s.forEach(l=>{if(l.isIntersecting){const i=l.target,d=i.dataset.src;d&&(i.src=d,i.onload=()=>{a(c=>new Set(c).add(d))},n.current?.unobserve(i))}})},{threshold:e}),()=>n.current?.disconnect()),[e]);const o=v.useCallback(s=>{s&&n.current&&n.current.observe(s)},[]);return{loadedImages:r,observeImage:o}},Pg=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},un={},Og=e=>{un[e.name]=e.value,process.env.NODE_ENV},Ug=()=>un,Dg=(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)}},jg=(e,r="script",a)=>{if(typeof document<"u"){const n=document.createElement("link");n.rel="preload",n.href=e,n.as=r,a&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}},_g=e=>{const r=v.useRef(new Set),a=v.useRef(new Set),n=v.useCallback((s,l)=>{const i=setTimeout(()=>{r.current.delete(i),s()},l);return r.current.add(i),i},[]),o=v.useCallback((s,l)=>{const i=setInterval(s,l);return a.current.add(i),i},[]);return v.useEffect(()=>{const s=r.current,l=a.current;return()=>{s.forEach(i=>clearTimeout(i)),l.forEach(i=>clearInterval(i)),process.env.NODE_ENV}},[e]),{createTimer:n,createInterval:o}},ge={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>ge.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${ge.maxFCP}ms)`),e.LCP&&e.LCP>ge.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${ge.maxLCP}ms)`),e.FID&&e.FID>ge.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${ge.maxFID}ms)`),e.CLS&&e.CLS>ge.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${ge.maxCLS})`),r}};class zg{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Be.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),Be.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),Be.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),Be.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),Be.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{if(s.entryType==="navigation"){const l=s;this.metrics.bundleLoadTime=l.loadEventEnd-l.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const a=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.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 n=r.includes(".js"),o=r.includes(".css");if(n||o){const s=n?"JavaScript":"CSS";this.reportMetric(`${s} 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 n=performance.now()-a;this.reportMetric(`Mark (${r})`,n),this.performanceMarks.delete(r)}}trackRouteChange(r,a,n){typeof a=="string"?this.measureRouteChange(a,n||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 fr=null;const Bg=e=>(fr||(fr=new zg(e)),fr),br=()=>fr,gn=e=>{const r=v.useRef(performance.now());v.useEffect(()=>{const a=performance.now()-r.current,n=br();n&&n.measureComponentRender(e,a)},[e])},Wg=(e,r)=>v.forwardRef((a,n)=>(gn(r),v.createElement(e,{...a,ref:n}))),Fg=async(e,r)=>{const a=performance.now(),n=await e(),o=performance.now()-a,s=br();return s&&s.measureAPICall(r,o),n},hn={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Vg=(e,r=hn)=>{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}},$g=e=>{const r=e||br()?.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)},qg=({direction:e,className:r})=>t.jsx("svg",{className:f("w-4 h-4",r),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="up"?"M5 15l7-7 7 7":"M19 9l-7 7-7-7"})}),Hg=({className:e})=>t.jsx("svg",{className:f("w-4 h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),fn=({title:e="Performance Monitor",isCollapsed:r,onToggleCollapse:a,onClose:n,onMouseDown:o,isDragging:s,className:l})=>t.jsxs("div",{className:f("bg-gray-900 text-white rounded-t-lg px-3 py-2","flex items-center justify-between","shadow-lg border border-gray-700","select-none",o&&"cursor-grab",s&&"cursor-grabbing",l),onMouseDown:o,children:[t.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[t.jsx("span",{children:"🚀"}),e]}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("button",{onClick:a,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":r?"Expand":"Collapse",type:"button",children:t.jsx(qg,{direction:r?"up":"down"})}),n&&t.jsx("button",{onClick:n,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":"Close",type:"button",children:t.jsx(Hg,{})})]})]}),Gg={sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Yg={good:"bg-green-500","needs-improvement":"bg-yellow-500",poor:"bg-red-500",unknown:"bg-gray-400",neutral:"bg-gray-500"},Kg={good:"Good","needs-improvement":"Needs Improvement",poor:"Poor",unknown:"Unknown",neutral:"Neutral"},Zg=({rating:e,size:r="sm",showLabel:a=!1,className:n})=>t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("span",{className:f("rounded-full",Gg[r],Yg[e])}),a&&t.jsx("span",{className:"text-xs text-gray-400",children:Kg[e]})]}),bn=({className:e})=>t.jsxs("div",{className:f("flex gap-3 text-[10px] text-gray-400",e),children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Good"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Needs Improvement"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Poor"]})]}),Xg={good:"text-green-500","needs-improvement":"text-yellow-500",poor:"text-red-500",unknown:"text-gray-400",neutral:"text-gray-300"},H=({label:e,value:r,unit:a="",rating:n="neutral",description:o,className:s})=>{const l=typeof r=="number"?Number.isInteger(r)?r.toString():r.toFixed(r<1?3:0):r;return t.jsxs("div",{className:f("flex justify-between items-center",s),children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{className:"text-gray-300",children:e}),o&&t.jsx("span",{className:"text-[10px] text-gray-500",children:o})]}),t.jsxs("span",{className:f("font-medium",Xg[n]),children:[l,a]})]})},Qg=(e,r="ms",a=0)=>e===void 0?"N/A":`${e.toFixed(a)}${r}`,mn=(e={})=>{const{enabled:r=!0,onUpdate:a}=e,[n,o]=v.useState({}),[s,l]=v.useState(!0),i=v.useRef(a);v.useEffect(()=>{i.current=a},[a]);const d=v.useCallback(c=>{o(g=>{const h={...g,...c};return i.current?.(h),h})},[]);return v.useEffect(()=>{if(!r)return;if(typeof PerformanceObserver>"u"){l(!1);return}const c=[];try{const g=new PerformanceObserver(h=>{const w=h.getEntries(),m=w[w.length-1];d({lcp:m.renderTime||m.loadTime})});g.observe({type:"largest-contentful-paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.processingStart&&d({fid:m.processingStart-m.startTime})})});g.observe({type:"first-input",buffered:!0}),c.push(g)}catch{}try{let g=0;const h=new PerformanceObserver(w=>{for(const m of w.getEntries())!m.hadRecentInput&&m.value&&(g+=m.value,d({cls:g}))});h.observe({type:"layout-shift",buffered:!0}),c.push(h)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.name==="first-contentful-paint"&&d({fcp:m.startTime})})});g.observe({type:"paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.duration&&d({inp:m.duration})})});g.observe({type:"event",buffered:!0}),c.push(g)}catch{}try{const g=performance.getEntriesByType("navigation")[0];g&&d({ttfb:g.responseStart-g.requestStart})}catch{}return()=>{c.forEach(g=>g.disconnect())}},[r,d]),{metrics:n,isSupported:s}},Me=(e,r)=>{if(r===void 0)return"unknown";const n={lcp:{good:2500,poor:4e3},fid:{good:100,poor:300},cls:{good:.1,poor:.25},fcp:{good:1800,poor:3e3},ttfb:{good:800,poor:1800},inp:{good:200,poor:500}}[e];return n?r<=n.good?"good":r<=n.poor?"needs-improvement":"poor":"unknown"},yn=({metrics:e,className:r})=>{const a=(n,o=0)=>n===void 0?"N/A":n.toFixed(o);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-yellow-400 mb-2 text-xs",children:"Web Vitals"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"LCP",value:a(e.lcp),unit:"ms",rating:Me("lcp",e.lcp),description:"Largest Contentful Paint"}),t.jsx(H,{label:"FID",value:a(e.fid),unit:"ms",rating:Me("fid",e.fid),description:"First Input Delay"}),t.jsx(H,{label:"CLS",value:a(e.cls,3),rating:Me("cls",e.cls),description:"Cumulative Layout Shift"}),t.jsx(H,{label:"FCP",value:a(e.fcp),unit:"ms",rating:Me("fcp",e.fcp),description:"First Contentful Paint"}),t.jsx(H,{label:"TTFB",value:a(e.ttfb),unit:"ms",rating:Me("ttfb",e.ttfb),description:"Time to First Byte"}),e.inp!==void 0&&t.jsx(H,{label:"INP",value:a(e.inp),unit:"ms",rating:Me("inp",e.inp),description:"Interaction to Next Paint"})]})]})},pn=(e={})=>{const{enabled:r=!0,refreshInterval:a=5e3,onUpdate:n}=e,[o,s]=v.useState({}),l=v.useRef(n);v.useEffect(()=>{l.current=n},[n]);const i=v.useCallback(()=>{if(!(typeof performance>"u"))try{const c=performance.getEntriesByType("resource"),g=c.filter(p=>p.name.endsWith(".js")||p.initiatorType==="script"),h=g.reduce((p,A)=>p+A.duration,0),w=c.filter(p=>p.name.endsWith(".css")||p.initiatorType==="link"),m=w.reduce((p,A)=>p+A.duration,0),b=c.reduce((p,A)=>p+(A.transferSize||0),0),y={jsLoadTime:h,cssLoadTime:m,jsCount:g.length,cssCount:w.length,totalTransferSize:b};s(y),l.current?.(y)}catch{}},[]),d=v.useCallback(()=>{i()},[i]);return v.useEffect(()=>{if(!r)return;i();const c=setInterval(i,a);return()=>clearInterval(c)},[r,a,i]),{metrics:o,refresh:d}},vn=e=>e===void 0?"N/A":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`,wn=({metrics:e,className:r})=>{const a=n=>n===void 0?"N/A":n.toFixed(0);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-blue-400 mb-2 text-xs",children:"Bundle Performance"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"JS Load",value:a(e.jsLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"CSS Load",value:a(e.cssLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"JS Files",value:e.jsCount??"N/A",rating:"neutral"}),t.jsx(H,{label:"Transfer Size",value:vn(e.totalTransferSize),rating:"neutral"})]})]})},Jg=e=>e===void 0?"unknown":e<=200?"good":e<=500?"needs-improvement":"poor",kn=({metrics:e,className:r})=>{const a=n=>n===void 0||isNaN(n)?"N/A":n.toFixed(0);return e.callCount===0?null:t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-purple-400 mb-2 text-xs",children:"API Calls"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Count",value:e.callCount,rating:"neutral"}),t.jsx(H,{label:"Total Time",value:a(e.totalTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"Avg Time",value:a(e.averageTime),unit:"ms",rating:Jg(e.averageTime)}),e.slowestCall!==void 0&&t.jsx(H,{label:"Slowest",value:a(e.slowestCall),unit:"ms",rating:e.slowestCall>1e3?"poor":"neutral"}),e.failedCalls>0&&t.jsx(H,{label:"Failed",value:e.failedCalls,rating:"poor"})]})]})},xn=e=>e===void 0?"N/A":(e/(1024*1024)).toFixed(1),Nn=(e,r)=>{if(e===void 0||r===void 0)return"unknown";const a=e/r;return a<=.5?"good":a<=.75?"needs-improvement":"poor"},Cn=({refreshInterval:e=2e3,className:r})=>{const[a,n]=v.useState({}),[o,s]=v.useState(!0);if(v.useEffect(()=>{const i=performance;if(!i.memory){s(!1);return}const d=()=>{i.memory&&n({usedJSHeapSize:i.memory.usedJSHeapSize,totalJSHeapSize:i.memory.totalJSHeapSize,jsHeapSizeLimit:i.memory.jsHeapSizeLimit})};d();const c=setInterval(d,e);return()=>clearInterval(c)},[e]),!o)return null;const l=a.usedJSHeapSize&&a.jsHeapSizeLimit?(a.usedJSHeapSize/a.jsHeapSizeLimit*100).toFixed(0):"N/A";return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-cyan-400 mb-2 text-xs",children:"Memory"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Used Heap",value:xn(a.usedJSHeapSize),unit:"MB",rating:Nn(a.usedJSHeapSize,a.jsHeapSizeLimit)}),t.jsx(H,{label:"Total Heap",value:xn(a.totalJSHeapSize),unit:"MB",rating:"neutral"}),t.jsx(H,{label:"Usage",value:l,unit:"%",rating:Nn(a.usedJSHeapSize,a.jsHeapSizeLimit)})]})]})},Rg=e=>{if(e.rating)return e.rating;if(typeof e.value=="number"&&e.thresholds){const{good:r,poor:a}=e.thresholds;return e.value<=r?"good":e.value<=a?"needs-improvement":"poor"}return"neutral"},Sn=({title:e="Custom Metrics",titleColor:r="text-orange-400",metrics:a,className:n})=>a.length===0?null:t.jsxs("div",{className:f("space-y-1",n),children:[t.jsx("h3",{className:f("font-semibold mb-2 text-xs",r),children:e}),t.jsx("div",{className:"space-y-1.5",children:a.map(o=>t.jsx(H,{label:o.label,value:o.value,unit:o.unit,rating:Rg(o),description:o.description},o.id))})]}),eh=["/api/","graphql",".json"],En=(e={})=>{const{enabled:r=!0,patterns:a=eh,refreshInterval:n=5e3,onUpdate:o}=e,[s,l]=v.useState({callCount:0,totalTime:0,averageTime:0,failedCalls:0}),i=v.useRef(a),d=v.useRef(o);v.useEffect(()=>{i.current=a},[a]),v.useEffect(()=>{d.current=o},[o]);const c=v.useCallback(()=>{if(!(typeof performance>"u"))try{const h=performance.getEntriesByType("resource"),w=i.current,m=h.filter(N=>w.some(C=>N.name.includes(C)));if(m.length===0)return;const b=m.reduce((N,C)=>N+C.duration,0),y=Math.max(...m.map(N=>N.duration)),p=m.filter(N=>{const C=N.responseStatus;return C!==void 0&&C>=400}).length,A={callCount:m.length,totalTime:b,averageTime:b/m.length,slowestCall:y,failedCalls:p};l(A),d.current?.(A)}catch{}},[]),g=v.useCallback(()=>{c()},[c]);return v.useEffect(()=>{if(!r)return;c();const h=setInterval(c,n);return()=>clearInterval(h)},[r,n,c]),{metrics:s,refresh:g}},An=(e={})=>{const{enabled:r=!0,constrainToViewport:a=!0,horizontalOnly:n=!1,verticalOnly:o=!1,initialPosition:s}=e,l=v.useRef(null),[i,d]=v.useState({x:s?.x??null,y:s?.y??null}),[c,g]=v.useState(!1),[h,w]=v.useState({x:0,y:0}),m=v.useCallback(y=>{if(!r||!l.current)return;const p=l.current.getBoundingClientRect();g(!0),w({x:y.clientX-p.left,y:y.clientY-p.top}),(i.x===null||i.y===null)&&d({x:n?p.left:i.x??p.left,y:o?p.top:i.y??p.top}),y.preventDefault()},[r,i,n,o]),b=v.useCallback(()=>{d({x:s?.x??null,y:s?.y??null})},[s]);return v.useEffect(()=>{if(!c)return;const y=A=>{if(!l.current)return;let N=A.clientX-h.x,C=A.clientY-h.y;if(a){const k=window.innerWidth-l.current.offsetWidth,S=window.innerHeight-l.current.offsetHeight;N=Math.max(0,Math.min(N,k)),C=Math.max(0,Math.min(C,S))}d({x:n?N:o?i.x:N,y:o?C:n?i.y:C})},p=()=>{g(!1)};return document.addEventListener("mousemove",y),document.addEventListener("mouseup",p),()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",p)}},[c,h,a,n,o,i.x,i.y]),{position:i,isDragging:c,handleMouseDown:m,resetPosition:b,ref:l}},Tn={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},rh=["webVitals","bundle","api","memory"],th=({enabled:e,defaultCollapsed:r=!0,defaultVisible:a=!0,position:n="bottom-right",draggable:o=!0,sections:s=rh,customMetrics:l=[],customSectionTitle:i="Custom Metrics",apiPatterns:d,onMetricsUpdate:c,className:g})=>{const h=e??(typeof process<"u"&&process.env?.NODE_ENV!=="production"),[w,m]=v.useState(r),[b,y]=v.useState(a),p=v.useMemo(()=>d,[JSON.stringify(d)]),A=v.useRef(c);v.useEffect(()=>{A.current=c},[c]);const{metrics:N}=mn({enabled:h&&s.includes("webVitals")}),{metrics:C}=pn({enabled:h&&s.includes("bundle")}),{metrics:k}=En({enabled:h&&s.includes("api"),patterns:p});v.useEffect(()=>{A.current&&A.current({webVitals:N,bundle:C,api:k})},[N,C,k]);const{position:S,isDragging:I,handleMouseDown:E,ref:M}=An({enabled:o,horizontalOnly:n.includes("bottom")||n.includes("top")}),x=v.useCallback(()=>{m(z=>!z)},[]),O=v.useCallback(()=>{y(!1)},[]),D=v.useCallback(()=>{y(!0)},[]);if(!h)return null;if(!b)return t.jsx("button",{onClick:D,className:f("fixed z-[9999]",Tn[n],"bg-gray-900 text-white px-3 py-2 rounded-lg","shadow-lg border border-gray-700","hover:bg-gray-800 transition-colors","text-xs font-mono"),type:"button",children:"🚀 Performance"});const U=S.x!==null?{left:`${S.x}px`,bottom:n.includes("bottom")?"1rem":void 0,top:n.includes("top")?"1rem":void 0,position:"fixed",transition:I?"none":"height 0.2s ease-in-out"}:{transition:"height 0.2s ease-in-out"},B=l.length>0||s.includes("custom");return t.jsxs("div",{ref:M,className:f(S.x!==null?"":`fixed ${Tn[n]}`,"z-[9999] font-mono text-xs",I&&"cursor-grabbing",g),style:{maxWidth:"320px",...U},children:[t.jsx(fn,{isCollapsed:w,onToggleCollapse:x,onClose:O,onMouseDown:o?E:void 0,isDragging:I}),t.jsx("div",{className:f("bg-gray-800 text-gray-100 rounded-b-lg","shadow-lg border-x border-b border-gray-700","overflow-hidden transition-all duration-300 ease-in-out",w?"max-h-0 opacity-0":"max-h-[70vh] opacity-100 py-2 px-3"),children:t.jsxs("div",{className:"overflow-y-auto max-h-full space-y-3",children:[s.includes("webVitals")&&t.jsx(yn,{metrics:N}),s.includes("bundle")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(wn,{metrics:C})}),s.includes("api")&&k.callCount>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(kn,{metrics:k})}),s.includes("memory")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Cn,{})}),B&&l.length>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Sn,{title:i,metrics:l})}),t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(bn,{})})]})})]})},ah=(e={})=>{const{successMessage:r="",successDuration:a=3e3,errorPrefix:n="",onSuccess:o,onError:s}=e,[l,i]=v.useState(!1),[d,c]=v.useState(""),[g,h]=v.useState(""),w=v.useCallback(()=>{c(""),h("")},[]),m=v.useCallback(()=>{c("")},[]),b=v.useCallback(()=>{h("")},[]),y=v.useCallback(async p=>{i(!0),w();try{await p(),r&&(c(r),a>0&&setTimeout(()=>{c("")},a)),o&&o()}catch(A){const N=A instanceof Error?A.message:"An error occurred";throw h(n?`${n}: ${N}`:N),s&&A instanceof Error&&s(A),A}finally{i(!1)}},[r,a,n,o,s,w]);return{isSubmitting:l,successMessage:d,errorMessage:g,submit:y,clearMessages:w,clearSuccess:m,clearError:b}},nh=(e=!1)=>{const[r,a]=v.useState(e),n=v.useCallback(()=>a(!0),[]),o=v.useCallback(()=>a(!1),[]),s=v.useCallback(()=>a(l=>!l),[]);return{value:r,setTrue:n,setFalse:o,toggle:s,setValue:a}},oh=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState(null),l=v.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const g=document.createElement("textarea");g.value=c,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const h=document.execCommand("copy");if(document.body.removeChild(g),!h)throw new Error("Copy command was unsuccessful")}return s(c),a?.(c),setTimeout(()=>{s(null)},r),!0}catch(g){const h=g instanceof Error?g:new Error("Copy failed");return n?.(h),!1}},[r,a,n]),i=v.useCallback(c=>o===c,[o]),d=v.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:l,isCopied:i,resetCopiedState:d}},sh=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState({}),l=v.useCallback(async(c,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const h=document.createElement("textarea");h.value=c,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const w=document.execCommand("copy");if(document.body.removeChild(h),!w)throw new Error("Copy command was unsuccessful")}return s(h=>({...h,[g]:!0})),a?.(c),setTimeout(()=>{s(h=>({...h,[g]:!1}))},r),!0}catch(h){const w=h instanceof Error?h:new Error("Copy failed");return n?.(w),!1}},[r,a,n]),i=v.useCallback(c=>o[c]||!1,[o]),d=v.useCallback(c=>{s(c?g=>({...g,[c]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:l,isCopied:i,resetCopiedState:d}},lh=e=>{if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(r)),o=Math.min(n,a.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+a[o]},ih=(e,r,a)=>{const n={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,l=e*Math.pow(o,n[r])/Math.pow(o,n[a]);return Math.round(l*100)/100},ch=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const a=parseFloat(r[1]),n=r[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[n];return s?Math.round(a*s):null},dh=e=>e,uh=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},gh=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)},hh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[`--${a}`]=typeof n=="number"?`${n}px`:n}),r},fh={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},bh=(e,r=fh)=>{const[a,n]=v.useState("base");return v.useEffect(()=>{const o=()=>{const s=window.innerWidth;s>=r["2xl"]?n("2xl"):s>=r.xl?n("xl"):s>=r.lg?n("lg"):s>=r.md?n("md"):s>=r.sm?n("sm"):s>=r.xs?n("xs"):n("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[r]),e[a]||e.base||{}},In=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,mh=()=>{const[e,r]=v.useState(In);return v.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{r(a.matches)};return a.addEventListener?a.addEventListener("change",n):a.addListener(n),()=>{a.removeEventListener?a.removeEventListener("change",n):a.removeListener(n)}},[]),e},yh=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},ph=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,vh=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},wh=(...e)=>e.filter(Boolean).join(" "),kh=e=>{const r={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([n,o])=>{a.includes(n)&&(r[n]=o)}),r},xh=(e,r=[])=>{const[a,n]=v.useState(null),[o,s]=v.useState(!0);return v.useEffect(()=>{let l=!0;return e().then(i=>{l&&(n(i.default),s(!1))}),()=>{l=!1}},[e,...r]),{styles:a,loading:o}},Nh=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),Ch=(e="row",r="center",a="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:a,contain:"layout"}),Sh=e=>{const[r,a]=v.useState(!1);return v.useEffect(()=>{const n=window.matchMedia(e);a(n.matches);const o=()=>a(n.matches);return n.addEventListener?n.addEventListener("change",o):n.addListener(o),()=>{n.removeEventListener?n.removeEventListener("change",o):n.removeListener(o)}},[e]),r},Eh=(e,r)=>{const[a,n]=v.useState("light");return v.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");n(o.matches?"dark":"light");const s=()=>{n(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",s):o.addListener(s),()=>{o.removeEventListener?o.removeEventListener("change",s):o.removeListener(s)}},[]),a==="dark"?r:e},Ah=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},Th=(e,r=[320,640,768,1024,1280,1920])=>r.map(a=>`${e.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Ih=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),Mh=(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},Lh=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(n=>{n.dataset.src&&(n.src=n.dataset.src)});return}const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(n=>a.observe(n)),()=>{r.forEach(n=>a.unobserve(n))}},Mn=()=>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"}),Ln=()=>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="}),Ph=async(e="jpg")=>{const[r,a]=await Promise.all([Mn(),Ln()]);return a?"avif":r?"webp":e},Oh=(e,r,a,n)=>`
|
|
57
57
|
<picture>
|
|
58
58
|
${e.map(s=>{const l=[`srcset="${s.srcSet}"`];return s.type&&l.push(`type="${s.type}"`),s.media&&l.push(`media="${s.media}"`),s.sizes&&l.push(`sizes="${s.sizes}"`),`<source ${l.join(" ")}>`}).join(`
|
|
59
59
|
`)}
|
|
@@ -19,6 +19,7 @@ export declare const TopbarRight: React.FC<SlotProps>;
|
|
|
19
19
|
/**
|
|
20
20
|
* TopbarMobileContent - Secondary row shown only on mobile
|
|
21
21
|
* Useful for search bars or additional controls
|
|
22
|
+
* Uses w-full and basis-full to force wrapping to a new line in the flex container
|
|
22
23
|
*/
|
|
23
24
|
export declare const TopbarMobileContent: React.FC<SlotProps>;
|
|
24
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopbarSlots.d.ts","sourceRoot":"","sources":["../../../src/layout/Topbar/TopbarSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAQ5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM3C,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"TopbarSlots.d.ts","sourceRoot":"","sources":["../../../src/layout/Topbar/TopbarSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAQ5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CASnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAa1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.87",
|
|
4
4
|
"description": "Reusable UI components and design system - Reorganized for better maintainability",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -128,6 +128,6 @@
|
|
|
128
128
|
"access": "public"
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@sudobility/components": "^4.0.
|
|
131
|
+
"@sudobility/components": "^4.0.86"
|
|
132
132
|
}
|
|
133
133
|
}
|