PageSourceSearch

https://creators.withwilla.io/assets/TopNav-D_e40-z3.js

js withwilla.io collected 2026-10-02 02:00:30 UTC 6,501 bytes, 1 lines download raw bytes

1import{j as t,r as c,u as B}from"./chunk-QFMPRPBF-BqID9nf9.js";import{I as E,g as G,v as H,h as O}from"./index-yZoykLQI.js";import{g as q}from"./creatorService-Cror-BVm.js";import{a as L}from"./apiClient-lZCs2piS.js";import{i as $,I as J,a as K}from"./webAuth-Dhh8tiFq.js";import{g as Q,b as V,c as X,s as S,m as Y,B as h,T as v}from"./config-BS7gYU0v.js";import{u as Z,c as _}from"./DefaultPropsProvider-bMj0XTNT.js";import{c as ee,M as te}from"./Menu-CYjPK9nz.js";import{u as b}from"./Paper-rLZjuGwm.js";import{M as C}from"./MenuItem-Df84kqc5.js";const re=ee(t.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function oe(e){return Q("MuiAvatar",e)}V("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const ae=e=>{const{classes:o,variant:r,colorDefault:s}=e;return X({root:["root",r,s&&"colorDefault"],img:["img"],fallback:["fallback"]},oe,o)},se=S("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.variant],r.colorDefault&&o.colorDefault]}})(Y(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),ne=S("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),ie=S(re,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function le({crossOrigin:e,referrerPolicy:o,src:r,srcSet:s}){const[a,i]=c.useState(!1);return c.useEffect(()=>{if(!r&&!s)return;i(!1);let d=!0;const n=new Image;return n.onload=()=>{d&&i("loaded")},n.onerror=()=>{d&&i("error")},n.crossOrigin=e,n.referrerPolicy=o,n.src=r,s&&(n.srcset=s),()=>{d=!1}},[e,o,r,s]),a}const A=c.forwardRef(function(o,r){const s=Z({props:o,name:"MuiAvatar"}),{alt:a,children:i,className:d,component:n="div",slots:p={},slotProps:l={},imgProps:u,sizes:m,src:g,srcSet:k,variant:I="circular",...F}=s;let x=null;const f={...s,component:n,variant:I},T=le({...u,...typeof l.img=="function"?l.img(f):l.img,src:g,srcSet:k}),j=g||k,w=j&&T!=="error";f.colorDefault=!w,delete f.ownerState;const y=ae(f),[N,R]=b("root",{ref:r,className:_(y.root,d),elementType:se,externalForwardedProps:{slots:p,slotProps:l,component:n,...F},ownerState:f}),[D,M]=b("img",{className:y.img,elementType:ne,externalForwardedProps:{slots:p,slotProps:{img:{...u,...l.img}}},additionalProps:{alt:a,src:g,srcSet:k,sizes:m},ownerState:f}),[U,W]=b("fallback",{className:y.fallback,elementType:ie,externalForwardedProps:{slots:p,slotProps:l},shouldForwardComponentProp:!0,ownerState:f});return w?x=t.jsx(D,{...M}):i||i===0?x=i:j&&a?x=a[0]:x=t.jsx(U,{...W}),t.jsx(N,{...R,children:x})});async function ce(){return(await L.get("/creator/link")).data}async function be(){return(await L.post("/creator/link/generate")).data}const P=c.createContext({profile:null,oneLinkUrl:"",hasGeneratedLink:!1,loading:!0,refresh:async()=>{},setLinkGenerated:()=>{}});function Ce({children:e}){const[o,r]=c.useState(null),[s,a]=c.useState(""),[i,d]=c.useState(!1),[n,p]=c.useState(!0),l=async()=>{try{const[m,g]=await Promise.all([q(),ce().catch(()=>({oneLinkUrl:"",hasGeneratedLink:!1}))]);r(m),a(g.oneLinkUrl||""),d(g.hasGeneratedLink??!1)}catch(m){console.error("Failed to load creator data",m)}finally{p(!1)}},u=()=>d(!0);return c.useEffect(()=>{l()},[]),t.jsx(P.Provider,{value:{profile:o,oneLinkUrl:s,hasGeneratedLink:i,loading:n,refresh:l,setLinkGenerated:u},children:e})}function de(){return c.useContext(P)}const z="#4361ee";function Se({title:e}){const o=B(),{profile:r}=de(),[s,a]=c.useState(null),i=(r?.firstName||"").charAt(0).toUpperCase(),d=(r?.lastName||"").charAt(0).toUpperCase(),n=i+d||"?",p=$(),l=async()=>{a(null);try{await K()}catch{}o("/login")};return t.jsxs(h,{sx:{position:"sticky",top:0,zIndex:1e3,height:72,display:"flex",alignItems:"center",justifyContent:"space-between",px:{xs:2,md:4},backgroundColor:"rgba(255,255,255,0.8)",backdropFilter:"blur(12px)",borderBottom:"1px solid #f1f4f6",width:"100%"},children:[t.jsx(v,{sx:{fontSize:{xs:"1.0625rem",md:"1.25rem"},fontWeight:600,color:"#020617"},children:e}),t.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[t.jsx(J,{size:"small",sx:{color:"#4a4a4a"},children:t.jsx(E,{size:20})}),t.jsxs(h,{sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1.5,pl:1.5,borderLeft:"1px solid #e2e8f0",cursor:"pointer"},onClick:u=>a(u.currentTarget),children:[t.jsxs(h,{sx:{textAlign:"right"},children:[t.jsx(v,{sx:{fontSize:"0.875rem",fontWeight:700,color:"#020617",lineHeight:1.3},noWrap:!0,children:`${r?.firstName||""} ${r?.lastName||""}`.trim()||"Creator"}),t.jsx(v,{sx:{fontSize:"0.6875rem",color:"#94a3b8",lineHeight:1.3},noWrap:!0,children:r?.email||""}),t.jsx(v,{sx:{fontSize:"0.5625rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.1em",color:"#586064",lineHeight:1.3},children:"Creator Profile"})]}),t.jsx(A,{sx:{width:40,height:40,backgroundColor:z,fontSize:"0.8125rem",fontWeight:600,border:"2px s
1olid #fff",boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},children:n})]}),t.jsx(A,{onClick:u=>a(u.currentTarget),sx:{width:32,height:32,backgroundColor:z,fontSize:"0.75rem",fontWeight:600,cursor:"pointer",display:{xs:"flex",md:"none"}},children:n}),t.jsxs(te,{anchorEl:s,open:!!s,onClose:()=>a(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{mt:1,borderRadius:2,minWidth:180,boxShadow:"0 4px 20px rgba(0,0,0,0.08)"}}},children:[t.jsxs(C,{onClick:()=>{a(null),o("/dashboard/settings")},sx:{gap:1.5,fontSize:"0.875rem",py:1.25},children:[t.jsx(G,{size:16})," Settings"]}),p&&t.jsxs(C,{onClick:()=>{a(null),o("/admin")},sx:{gap:1.5,fontSize:"0.875rem",py:1.25},children:[t.jsx(H,{size:16})," Admin"]}),t.jsxs(C,{onClick:l,sx:{gap:1.5,fontSize:"0.875rem",py:1.25,color:"#dc2626"},children:[t.jsx(O,{size:16})," Log out"]})]})]})]})}export{A,Ce as C,Se as T,be as g,de as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.