1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8197],{53943:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});/** 2 * @license lucide-react v0.438.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let a=(0,r(13289).Z)("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},42070:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});/** 7 * @license lucide-react v0.438.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */let a=(0,r(13289).Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},89019:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});/** 12 * @license lucide-react v0.438.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */let a=(0,r(13289).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},35928:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});/** 17 * @license lucide-react v0.438.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */let a=(0,r(13289).Z)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},30474:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});/** 22 * @license lucide-react v0.438.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */let a=(0,r(13289).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},40074:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/casting/preferences",function(){return r(58444)}])},68976:function(e,t,r){"use strict";var a=r(52322);r(2784),t.Z=()=>(0,a.jsx)("div",{className:"flex justify-center items-center m-20",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-t-blue-600 border-blue-200"})})},53666:function(e,t,r){"use strict";var a=r(52322);r(2784);var n=r(5632);t.Z=()=>{let e=(0,n.useRouter)();return(0,a.jsx)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-r from-[#D6DBDC] to-[#FFFFFF] dark:from-[#1e1e1e] dark:to-[#333333]",children:(0,a.jsxs)("div",{className:"text-center p-6 bg-white dark:bg-[#2D2D2D] shadow-md rounded-lg",children:[(0,a.jsx)("p",{className:"text-md text-gray-700 dark:text-gray-300 mb-4",children:"Sign in to access this feature!"}),(0,a.jsx)("button",{onClick:()=>{e.push("/")},className:"px-4 py-2 rounded-md text-white bg-blue-800 hover:bg-gray-200 transition ease-in-out duration-150",children:"Sign In from Homepage"})]})})}},25090:function(e,t,r){"use strict";r.d(t,{d:function(){return o},z:function(){return c}});var a=r(52322),n=r(2784),s=r(4222),l=r(61335),i=r(43632);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>
26{let{className:r,variant:n,size:l,asChild:c=!1,...d}=e,u=c?s.g7:"button";return(0,a.jsx)(u,{className:(0,i.cn)(o({variant:n,size:l,className:r})),ref:t,...d})});c.displayName="Button"},43510:function(e,t,r){"use strict";r.d(t,{pm:function(){return f}});var a=r(2784);let n=0,s=new Map,l=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);s.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?l(r):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],c={toasts:[]};function d(e){c=i(c,e),o.forEach(e=>{e(c)})}function u(e){let{...t}=e,r=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:r});return d({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||a()}}}),{id:r,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function f(){let[e,t]=a.useState(c);return a.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},58444:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return v}});var a=r(52322),n=r(2784),s=r(13289);/** 27 * @license lucide-react v0.438.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */let l=(0,s.Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var i=r(35928),o=r(30474),c=r(53943);/** 32 * @license lucide-react v0.438.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */let d=(0,s.Z)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var u=r(42070),f=r(89019),p=r(41982),m=r(25090),h=r(43510),y=r(53666),x=r(68976);let g="Hi {talent_name},\n\nI came across your profile on Castmenow and think you'd be a great fit for an upcoming role in {project_name}.\n\nRole: {role_name}\n{role_description}\n\nIf you're interested, please let me know and I'll send over more details.\n\nBest,\n{your_name}";var v=()=>{let{userId:e,email:t}=(0,p.a)(),{toast:r}
36=(0,h.pm)(),[s,v]=(0,n.useState)(!0),[b,j]=(0,n.useState)(!1),[N,w]=(0,n.useState)(""),[k,S]=(0,n.useState)(""),[_,T]=(0,n.useState)(""),[E,M]=(0,n.useState)(g);(0,n.useEffect)(()=>{e&&O()},[e]);let O=async()=>{try{let t=await fetch("/api/casting/get-preferences?userId=".concat(e));if(t.ok){let e=await t.json();e.preferences&&(w(e.preferences.name||""),S(e.preferences.about||""),T(e.preferences.webpage||""),M(e.preferences.outreachTemplate||g))}}catch(e){console.error("Error fetching preferences:",e)}finally{v(!1)}},Z=async()=>{if(!N.trim()){r({title:"Name required",description:"Please enter your name before saving.",variant:"destructive"});return}j(!0);try{if((await fetch("/api/casting/update-preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e,preferences:{name:N,about:k,webpage:_,outreachTemplate:E}})})).ok)r({title:"Saved",description:"Your preferences have been updated."});else throw Error("Failed to save")}catch(e){r({title:"Error",description:"Failed to save preferences. Please try again.",variant:"destructive"})}finally{j(!1)}};return e?s?(0,a.jsx)(x.Z,{}):(0,a.jsx)("div",{className:"bg-background min-h-screen pt-14 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-gray-800 mb-4",children:"Preferences"}),(0,a.jsx)("div",{className:"mb-6 text-base font-medium text-gray-700",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(l,{className:"text-blue-500 h-5 w-5 mt-1 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:"Manage your casting account."})," Set up your profile to personalize outreach to talent."]})]})}),(0,a.jsx)("div",{className:"bg-white shadow rounded-lg p-6",children:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(i.Z,{className:"h-5 w-5 text-gray-600"}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Contact Email"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-700",children:t}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"This is the email talent will use to reach you."})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(o.Z,{className:"h-5 w-5 text-gray-600"}),(0,a.jsxs)("h2",{className:"text-lg font-semibold text-gray-900",children:["Your Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]})]}),(0,a.jsx)("input",{type:"text",value:N,onChange:e=>w(e.target.value),placeholder:"Your full name",className:"w-full p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm text-gray-900 placeholder-gray-400 ".concat(N.trim()?"border-gray-300":"border-red-300")}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"This will be used to sign off your outreach messages."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"h-5 w-5 text-gray-600"}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"About"})]}),(0,a.jsx)("textarea",{value:k,onChange:e=>S(e.target.value),placeholder:"Tell us about your casting company or production house...",className:"w-full h-24 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none text-sm text-gray-900 placeholder-gray-400"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(d,{className:"h-5 w-5 text-gray-600"}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Webpage"})]}),(0,a.jsx)("input",{type:"url",value:_,onChange:e=>T(e.target.value),placeholder:"https://yourcompany.com",className:"w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm text-gray-900 placeholder-gray-400"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(u.Z,{className:"h-5 w-5 text-gray-600"}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Outreach Template"})]}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 mb-2",children:["Customize your default message to talent. Use variables: ","{talent_name}",", ","{project_name}",", ","{role_name}",", ","{role_description}",", ","{your_name}"]}),(0,a.jsx)("textarea",{value:E,onChange:e=>M(e.target.value),className:"w-full h-48 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none text-sm text-gray-900 font-mono"})]}),(0,a.jsx)("div",{className:"flex justify-end pt-4 border-t",children:(0,a.jsx)(m.z,{onClick:Z,disabled:b,className:"bg-blue-600 hover:bg-blue-700",children:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):"Save Preferences"})})]})})]})}):(0,a.jsx)(y.Z,{})}},4222:function(e,t,r){"use strict";r.d(t,{g7:function(){return d}});var a=r(2784),n=r.t(a,2);function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var l=r(52322),i=Symbol.for("react.lazy"),o=n[" use ".trim().toString()];function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=function(e){let t=function(e){let t=a.forwardRef((e,t)=>
36{let{children:r,...n}=e;if(c(r)&&"function"==typeof o&&(r=o(r._payload)),a.isValidElement(r)){var l;let e,i;let o=(l=r,(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?l.ref:(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?l.props.ref:l.props.ref||l.ref),c=function(e,t){let r={...t};for(let a in t){let n=e[a],s=t[a];/^on[A-Z]/.test(a)?n&&s?r[a]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...s}:"className"===a&&(r[a]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==a.Fragment&&(c.ref=t?function(...e){return t=>{let r=!1,a=e.map(e=>{let a=s(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():s(e[t],null)}}}}(t,o):o),a.cloneElement(r,c)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=a.forwardRef((e,r)=>{let{children:n,...s}=e;c(n)&&"function"==typeof o&&(n=o(n._payload));let i=a.Children.toArray(n),d=i.find(f);if(d){let e=d.props.children,n=i.map(t=>
36t!==d?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,l.jsx)(t,{...s,ref:r,children:a.isValidElement(e)?a.cloneElement(e,void 0,n):null})}return(0,l.jsx)(t,{...s,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}("Slot"),u=Symbol("radix.slottable");function f(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}},61335:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});let a=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,n=function(){for(var e,t,r=0,a="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,a,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(a=e(t[r]))&&(n&&(n+=" "),n+=a);else for(r in t)t[r]&&(n&&(n+=" "),n+=r)}return n}(e))&&(a&&(a+=" "),a+=t);return a},s=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;let s=a(t)||a(n);return l[e][s]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return n(e,o,null==t?void 0:null===(s=t.compoundVariants)||void 0===s?void 0:s.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...c}[t]):({...i,...c})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=40074)}),_N_E=e.O()}]);
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.