1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e163487e-22c1-5e39-a297-6151fa4bbdcc")}catch(e){}}(); 3(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,127479,e=>{"use strict";var t=e.i(737382),n=e.i(983403),r=e.i(851052),a=e.i(248949);e.i(948952);var i=e.i(350671),o=e.i(964977),s=e.i(79076),c=e.i(277565),l=e.i(274869);let u=["privacy","data-sharing-consent"];e.s(["dataSharingConsentQueryKey",0,u,"useDataSharingConsent",0,function(){let e=(0,s.useApiClient)(),d=(0,r.useQueryClient)(),p=(0,o.useAppI18n)(),h=(0,n.useQuery)({queryKey:u,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async({signal:t})=>{let{data:n,error:r}=await e.GET("/api/session/",{signal:t});if(r)throw r;return n.data_sharing_consent}}),g=(0,t.useMutation)({mutationFn:async t=>{let{data:n,error:r}=await e.PUT("/api/privacy/data-sharing-consent",{body:{state:t,surface:"web"}});if(r)throw r;return n},onMutate:()=>d.cancelQueries({queryKey:u}),onSuccess:async e=>{await d.cancelQueries({queryKey:u}),d.setQueryData(u,e),(0,l.setDataSharingVerdict)(e),(0,c.default)({actionName:"DataSharingConsentUpdateSucceeded",context:{new_state:e.state,revision:e.revision}})},onError:(e,t)=>{(0,c.default)({actionName:"DataSharingConsentUpdateFailed",context:{attempted_state:t,error_message:e instanceof Error?e.message:"Unknown error"}}),(0,a.resolveTextOnDemand)({instance:p,namespace:"account",resolve:e=>e("accountSettings.dataSharingUpdateError")}).then(e=>{i.toastManager.add({title:e,type:"error",timeout:5e3})})}});return{consent:h.data,isLoading:h.isLoading,isError:h.isError,refetch:h.refetch,setDataSharingConsent:e=>{let t=h.data;t&&(0,c.default)({actionName:"DataSharingConsentToggleClicked",context:{new_state:e,previous_state:t.state,previous_source:t.source}}),g.mutate(e)},isSaving:g.isPending}}])},934238,e=>{"use strict";var t=e.i(554907);let n=!1,r=!1,a=null,i=new Set;function o(){i.forEach(e=>e())}function s(e){return i.add(e),()=>i.delete(e)}let c=()=>n,l=()=>r,u=()=>a,d=()=>!1,p=()=>null;e.s(["markAppSellPromptOpen",0,function(e){(a!==e||!r||n)&&(a=e,r=!0,n=!1,o())},"markAppSellPromptResolved",0,function(e){a!==e&&r&&!n||a===e&&n||(a=e,n=!0,o())},"useAppSellPromptState",0,function(e){let n=(0,t.useSyncExternalStore)(s,c,d),r=(0,t.useSyncExternalStore)(s,l,d),a=(0,t.useSyncExternalStore)(s,u,p)===e;return{resolved:a&&n,opened:a&&r}}])},178652,e=>{"use strict";var t=e.i(505290),n=e.i(379694);function r(){return new Date().toISOString().slice(0,10)}function a(){let e=new Date;return e.setUTCDate(e.getUTCDate()-t.APPSELL_ACTIVE_DAYS_WINDOW),e.toISOString().slice(0,10)}function i(){return!(0,n.hasTimedStorageKeyExpired)(t.APPSELL_STORAGE_KEYS.loggedOutModalDismissed)||!(0,n.hasTimedStorageKeyExpired)(t.APPSELL_STORAGE_KEYS.loggedInModalDismissed)}function o(e){let t=(0,n.loadJsonFromLocalStorage)({key:e,validateTtl:!1});return t?.count??0}function s(e,r){let a=o(r),i=Math.min(a,t.APPSELL_LOGGED_IN_MODAL_BACKOFF_MS.length-1),s=t.APPSELL_LOGGED_IN_MODAL_BACKOFF_MS[i];
3(0,n.setTimedStorageKey)(e,s),(0,n.setJsonInLocalStorage)({key:r,value:{count:a+1},expireTimestamp:Date.now()+31536e6})}e.s(["canShowAppSellBar",0,function(){return(0,n.hasTimedStorageKeyExpired)(t.APPSELL_STORAGE_KEYS.barDismissed)},"canShowLoggedInAppSellModal",0,function(){return!i()&&!!(0,n.hasTimedStorageKeyExpired)(t.APPSELL_STORAGE_KEYS.loginClicked)},"canShowLoggedOutAppSellModal",0,function(){return!i()},"dismissAppSellBar",0,function(){s(t.APPSELL_STORAGE_KEYS.barDismissed,t.APPSELL_STORAGE_KEYS.barDismissCount)},"dismissLoggedInAppSellModal",0,function(){s(t.APPSELL_STORAGE_KEYS.loggedInModalDismissed,t.APPSELL_STORAGE_KEYS.loggedInModalDismissCount)},"dismissLoggedOutAppSellModal",0,function(){(0,n.setTimedStorageKey)(t.APPSELL_STORAGE_KEYS.loggedOutModalDismissed,t.APPSELL_LOGGED_OUT_MODAL_THROTTLE_MS)},"getAppSellActiveDayCount",0,function(){let e=(0,n.loadJsonFromLocalStorage)({key:t.APPSELL_STORAGE_KEYS.activeDays,validateTtl:!1}),i=new Set(e?.dates??[]);i.add(r());let o=a();return[...i].filter(e=>e>=o).length},"getLoggedInAppSellModalDismissStage",0,function(){return Math.min(o(t.APPSELL_STORAGE_KEYS.loggedInModalDismissCount),3)},"recordAppSellActiveDay",0,function(){let e=(0,n.loadJsonFromLocalStorage)({key:t.APPSELL_STORAGE_KEYS.activeDays,validateTtl:!1}),i=new Set(e?.dates??[]);i.add(r());let o=a(),s=[...i].filter(e=>e>=o).sort();(0,n.setJsonInLocalStorage)({key:t.APPSELL_STORAGE_KEYS.activeDays,value:{dates:s},expireTimestamp:Date.now()+24*t.APPSELL_ACTIVE_DAYS_WINDOW*36e5})},"recordAppSellLogInClick",0,function(){(0,n.setTimedStorageKey)(t.APPSELL_STORAGE_KEYS.loginClicked,t.APPSELL_LOGIN_CLICK_GRACE_MS)}])},505290,e=>{"use strict";e.s(["APPSELL_ACTIVE_DAYS_WINDOW",0,28,"APPSELL_APP_STORE_RATING",0,"4.8","APPSELL_LOGGED_IN_MODAL_BACKOFF_MS",0,[6048e5,12096e5,24192e5],"APPSELL_LOGGED_OUT_MODAL_THROTTLE_MS",0,864e5,"APPSELL_LOGIN_CLICK_GRACE_MS",0,18e5,"APPSELL_POWER_USER_MIN_ACTIVE_DAYS",0,8,"APPSELL_POWER_USER_MIN_TOTAL_CLIPS",0,50,"APPSELL_PROMPT_GATE_MAX_HOLD_MS",0,4e3,"APPSELL_STORAGE_KEYS",0,{loggedOutModalDismissed:"appsell-logged-out-modal-dismissed",loggedInModalDismissed:"appsell-logged-in-modal-dismissed",loggedInModalDismissCount:"appsell-logged-in-modal-dismiss-count",barDismissed:"appsell-bar-dismissed",barDismissCount:"appsell-bar-dismiss-count",loginClicked:"appsell-login-cl
3icked",activeDays:"appsell-active-days"},"SUNO_APP_ICON_URL",0,"https://cdn-o.suno.com/apple-touch-icon.png","dismissMethodFromDialogReason",0,function(e){switch(e){case"close-press":return"x_button";case"escape-key":return"escape";default:return"backdrop"}}])},828744,e=>{"use strict";var t=e.i(463984),n=e.i(554907),r=e.i(551283),a=e.i(388356),i=e.i(384655),o=e.i(934238),s=e.i(178652),c=e.i(505290),l=e.i(213267),u=e.i(548004),d=e.i(464029),p=e.i(429131),h=e.i(725516),g=e.i(610177),m=e.i(84204),f=e.i(965051),v=e.i(418627);e.s(["useAppSellAudience",0,function(){let e=(0,t.usePathname)(),_=(0,r.useIsClient)(),S=!(0,u.useBreakpointMd)(),{session:y}=(0,p.useStores)(),w=_&&(0,i.isAppSellEligibleDevice)(),{isSignedIn:E,isLoaded:b}=(0,l.useAuth)(),x=!0===(0,d.useRouteClientLayoutConfig)().isSharedSongReceiverPage,A=_&&(0,a.isLoggedOutMobileEligibleAtClick)({isAuthLoaded:b,isSignedIn:E}),P=w&&b&&!!E,C=(0,n.useMemo)(()=>!!_&&(0,s.getAppSellActiveDayCount)()>=c.APPSELL_POWER_USER_MIN_ACTIVE_DAYS,[_]),O=y?.user?.total_clips??0,T=C||!!E&&O>=c.APPSELL_POWER_USER_MIN_TOTAL_CLIPS,L=!!E&&(0,m.isProOrPremier)(y),R=!E||!!y?.isSubLoaded,I=!E||!!y?.userConfigIsLoaded,k=R&&I,D=e.startsWith("/onboarding"),M=!!E&&(!y?.userConfigIsLoaded||!y.completedOnboardingFlow&&!!y.roles?.is_day_zero_user),j=(0,f.isPathOrPrefix)(e,h.PageRoutes.StudioWelcome)||(0,g.isLocalePrefixedPath)(e,h.PageRoutes.StudioWelcome)||(0,f.isPathOrPrefix)(e,h.PageRoutes.TemplateWebpage),N=A&&!T&&!(0,v.isAuthFlowPath)(e)&&!D&&!j&&!x,G=(0,n.useMemo)(()=>N&&(0,s.canShowLoggedOutAppSellModal)(),[N,e]),U=P&&!T&&R&&!L&&!(0,v.isAuthFlowPath)(e)&&!D&&!j&&!M&&!x,F=(0,n.useMemo)(()=>U&&(0,s.canShowLoggedInAppSellModal)(),[U,e]),B=!!_&&(0,s.canShowAppSellBar)(),{resolved:K,opened:W}=(0,o.useAppSellPromptState)(e),[q,V]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!w||!b||!k)return;let t=setTimeout(()=>V(e),c.APPSELL_PROMPT_GATE_MAX_HOLD_MS);return()=>{clearTimeout(t),V(t=>t===e?null:t)}},[e,w,b,k]);let $=q===e,Y=K||$&&!W,z=W&&!K,H=P&&R&&I&&S&&B&&!(0,v.isAuthFlowPath)(e)&&!D&&!x&&!z&&(!F||Y),J=A&&S&&B&&!(0,v.isAuthFlowPath)(e)&&!D&&!x&&!z&&(!G||Y),Q=!_||w&&!b;return(0,n.useMemo)(()=>({isMobile:w,isLoggedOutMobileVisitor:A,shouldHoldCompetingPrompts:Q,promptOutOfWay:Y,canShowGlobalLoggedOutModal:N,willAutoShowLoggedOutModal:G,isLoggedInInterstitialEligible:U,willAutoShowLoggedInModal:F,isSessionAudienceKnown:k,canShowLoggedInSocialProofBar:H,canShowSocialProofBar:J,isSharedSongReceiverPage:x}),[w,A,N,G,U,F,k,H,J,x,Q,Y])},"useTrackAppSellMobileWebActivity",0,function(){let e=(0,r.useIsClient)()&&(0,i.isAppSellEligibleDevice)();(0,n.useEffect)(()=>{e&&(0,s.recordAppSellActiveDay)()},[e])}])},464029,e=>{"use strict";var t=e.i(673157),n=e.i(554907);let r=(0,n.createContext)({});e.s(["RouteClientLayoutConfigProvider",0,({config:e,children:n})=>(0,t.jsx)(r.Provider,{value:e,children:n}),"useRouteClientLayoutConfig",0,function(){return(0,n.useContext)(r)}])},221148,823422,e=>{"use strict";var t=e.i(673157),n=e.i(747852),r=e.i(948952);e.s(["default",0,()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.DialogModalContainer,{}),(0,t.jsx)(r.ToastContainer,{})]})],221148),e.i(975824);var a=e.i(524986),i=e.i(254640),o=e.i(628615),s=e.i(54559),c=e.i(551283);function l(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var d=e.i(554907),p=Object.defineProperty,h=Object.defineProperties,g=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,_=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&_(e,n,t[n]);if(m)for(var n of m(t))v.call(t,n)&&_(e,n,t[n]);return e},y=(e,t,n)=>(_(e,"symbol"!=typeof t?t+"":t,n),n),w=(e,t,n)=>new Promise((r,a)=>{var i=e=>{try{s(n.next(e))}catch(e){a(e)}},o=e=>{try{s(n.throw(e))}catch(e){a(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,o);s((n=n.apply(e,t)).next())}),E="hCaptchaOnLoad",b="script-error",x="@hCaptcha/loader";function A(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function P(e){return e||document.head}var C=class e{constructor(e){y(this,"_parent"),y(this,"breadcrumbs",[]),y(this,"context",{}),y(this,"extra",{}),y(this,"tags",{}),y(this,"request"),y(this,"user"),this._parent=e}get parent(){return this._parent}child(){return new e(this)}
3setRequest(e){return this.request=e,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(e){return typeof e.timestamp>"u"&&(e.timestamp=new Date().toISOString()),this.breadcrumbs.push(e),this}setExtra(e,t){return this.extra[e]=t,this}removeExtra(e){return delete this.extra[e],this}setContext(e,t){return typeof t.type>"u"&&(t.type=e),this.context[e]=t,this}removeContext(e){return delete this.context[e],this}setTags(e){return this.tags=S(S({},this.tags),e),this}setTag(e,t){return this.tags[e]=t,this}removeTag(e){return delete this.tags[e],this}setUser(e){return this.user=e,this}removeUser(){return this.user=void 0,this}toBody(){let e=[],t=this;for(;t;)e.push(t),t=t.parent;return e.reverse().reduce((e,t)=>{var n;return e.breadcrumbs=[...null!=(n=e.breadcrumbs)?n:[],...t.breadcrumbs],e.extra=S(S({},e.extra),t.extra),e.contexts=S(S({},e.contexts),t.context),e.tags=S(S({},e.tags),t.tags),t.user&&(e.user=t.user),t.request&&(e.request=t.request),e},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},O=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,T="An unknown error occurred";function L(e){return(e+256).toString(16).substring(1)}var R,I=[[/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,"chrome"],[/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,"winjs"],[/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,"gecko"]],k=(R=class{constructor(e){var t,n,r,a,i;y(this,"apiURL"),y(this,"dsn"),y(this,"environment"),y(this,"release"),y(this,"sampleRate"),y(this,"debug"),y(this,"_scope"),y(this,"shouldBuffer",!1),y(this,"bufferlimit",20),y(this,"buffer",[]),this.environment=e.environment,this.release=e.release,this.sampleRate=null!=(t=e.sampleRate)?t:1,this.debug=null!=(n=e.debug)&&n,this._scope=null!=(r=e.scope)?r:new C,this.apiURL=function(e){let t=O.exec(e),n=t?t.slice(1):[];if(6!==n.length)throw Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}(e.dsn),this.dsn=e.dsn,this.shouldBuffer=null!=(a=e.buffer)&&a,this.bufferlimit=null!=(i=e.bufferLimit)?i:20}static init(e){R._instance||(R._instance=new R(e))}static get instance(){if(!R._instance)throw Error("Sentry has not been initialized");return R._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return R.instance.scope}withScope(e){e(this._scope.child())}static withScope(e){R.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:function(e){if(e instanceof Error)return e;if("string"==typeof e)return Error(e);
3if("object"==typeof e&&null!==e&&!Array.isArray(e)){let{message:t}=e,n=((e,t)=>{var n={};for(var r in e)f.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&m)for(var r of m(e))0>t.indexOf(r)&&v.call(e,r)&&(n[r]=e[r]);return n})(e,["message"]);return Object.assign(Error("string"==typeof t?t:T),n)}return Object.assign(Error(T),{cause:e})}(e),scope:null!=t?t:this._scope})}static captureException(e,t){R.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:null!=n?n:this._scope})}static captureMessage(e,t="info",n){R.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate)return void this.log("Dropped event due to sample rate");if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return w(this,null,function*(){try{this.log("Sending sentry event",e);let n=function(e,t,n){var r,a,i;let o,s=S({event_id:((o=function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e}(Array(16)))[6]=15&o[6]|64,o[8]=63&o[8]|128,L(o[0])+L(o[1])+L(o[2])+L(o[3])+"-"+L(o[4])+L(o[5])+"-"+L(o[6])+L(o[7])+"-"+L(o[8])+L(o[9])+"-"+L(o[10])+L(o[11])+L(o[12])+L(o[13])+L(o[14])+L(o[15])).replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:"0.0.4"},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if("exception"===e.type){let t;s.message=null!=(a=null==(r=e.error)?void 0:r.message)?a:"Unknown error",s.fingerprint=[s.message];let n=[],o=e.error;for(let e=0;e<5&&o&&(n.push((t=function(e){var t,n,r,a;if(!e.stack)return null;let i=[],o=null!=(r=null==(n=(t=e.stack).split)?void 0:n.call(t,` 4`))?r:[];for(let t=0;t<o.length;++t){let n=null,r=null,s=null;for(let[e,n]of I)if(r=e.exec(o[t])){s=n;break}if(!(!r||!s)){if("chrome"===s)n={filename:null!=(a=r[2])&&a.startsWith("address at ")?r[2].substring(11):r[2],function:r[1]||"?",lineno:r[3]?+r[3]:null,colno:r[4]?+r[4]:null};else if("winjs"===s)n={filename:r[2],function:r[1]||"?",lineno:+r[3],colno:r[4]?+r[4]:null};else{if("gecko"!==s)continue;0===t&&!r[5]&&void 0!==e.columnNumber&&i.length>0&&(i[0].column=e.columnNumber+1),n={filename:r[3],function:r[1]||"?",lineno:r[4]?+r[4]:null,colno:r[5]?+r[5]:null}}!n.function&&n.lineno&&(n.function="?"),i.push(n)}}return i.length?i.reverse():null}(i=o),{type:i.name,value:i.message,stacktrace:{frames:null!=t?t:[]}})),!(!o.cause||!(o.cause instanceof Error)));e++)o=o.cause;s.exception={values:n.reverse()}}return"message"===e.type&&(s.message=e.message,s.level=e.level),s}(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a=JSON.stringify(r)+` 5`+JSON.stringify({type:"event"})+` 6`+JSON.stringify(n),i=yield function(e,t,n){return w(this,null,function*(){var r,a;try{if("u">typeof fetch&&"u">typeof AbortSignal){let r,a,i;if(n){let e=new AbortController;r=e.signal,setTimeout(()=>e.abort(),n)}let o=yield fetch(e,(a=S({},t),i={signal:r},h(a,g(i)))),s=yield o.text();return{status:o.status,body:s}}return yield new Promise((r,a)=>{var i,o;let s=new XMLHttpRequest;if(s.open(null!=(i=null==t?void 0:t.method)?i:"GET",e),s.onload=()=>r({status:s.status,body:s.responseText}),s.onerror=()=>a(Error("XHR Network Error")),null==t?void 0:t.headers)for(let[e,n]of Object.entries(t.headers))s.setRequestHeader(e,n);if(n){let e=setTimeout(()=>{s.abort(),a(Error("Request timed out"))},n);s.onloadend=()=>{clearTimeout(e)}}s.send(null==(o=null==t?void 0:t.body)?void 0:o.toString())})}catch(e){return{status:0,body:null!=(a=null==(r=null==e?void 0:e.toString)?void 0:r.call(e))?a:"Unknown error"}}})}(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:a},t);this.log("Sentry response",i.status),200!==i.status&&(console.log(i.body),console.error("Failed to send event to Sentry",i))}catch(e){console.error("Failed to send event",e)}})}flush(e=5e3){return w(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(t=>this.sendEvent(t,e));yield Promise.all(t),this.log("Flushed all events")}catch(e){console.error("Failed to flush events",e)}})}static flush(e=5e3){return R.instance.flush(e)}static reset(){R._instance=void 0}},y(R,"_instance"),R);function D(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>
6{e&&e.setRequest(t)},captureException:t=>{e&&k.captureException(t,e)}}}var M=[];function j(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function N(e){return e||document.head}var G=function(e){function t(t){var n;return(n=e.call(this,t)||this)._hcaptcha=void 0,n.renderCaptcha=n.renderCaptcha.bind(l(n)),n.resetCaptcha=n.resetCaptcha.bind(l(n)),n.removeCaptcha=n.removeCaptcha.bind(l(n)),n.isReady=n.isReady.bind(l(n)),n._onReady=null,n.loadCaptcha=n.loadCaptcha.bind(l(n)),n.handleOnLoad=n.handleOnLoad.bind(l(n)),n.handleSubmit=n.handleSubmit.bind(l(n)),n.handleExpire=n.handleExpire.bind(l(n)),n.handleError=n.handleError.bind(l(n)),n.handleOpen=n.handleOpen.bind(l(n)),n.handleClose=n.handleClose.bind(l(n)),n.handleChallengeExpired=n.handleChallengeExpired.bind(l(n)),n.ref=d.createRef(),n.apiScriptRequested=!1,n.sentryHub=null,n.captchaId="",n.state={isApiReady:!1,isRemoved:!1,elementId:t.id},n}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this,t=j(N(this.props.scriptLocation));(this._hcaptcha=t.window.hcaptcha||void 0,void 0!==this._hcaptcha)?this.setState({isApiReady:!0},function(){e.renderCaptcha()}):this.loadCaptcha()},n.componentWillUnmount=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),e.remove(t))},n.shouldComponentUpdate=function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved},n.componentDidUpdate=function(e){var t=this;["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(function(n){return e[n]===t.props[n]})||this.removeCaptcha(function(){t.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var e=this.props,t=e.apihost,n=e.assethost,r=e.endpoint,a=e.host,i=e.imghost,o=e.languageOverride,s=e.reCaptchaCompat,c=e.reportapi,l=e.sentry,u=e.custom,d=e.loadAsync,p=e.scriptLocation,m=e.scriptSource,f=e.secureApi,v=e.cleanup;(function(){return w(this,arguments,function*(e={}){let t=function(e=!0){var t,n,r,a,i,o,s;let c,l,u,d,p;if(!e)return D();k.init({dsn:"https://[email protected]/6",release:"2.1.0",environment:"production"});let m=k.scope;return m.setTag("source",x),m.setTag("url",document.URL),m.setContext("os",{UA:navigator.userAgent}),m.setContext("browser",S({},(-1!==(c=navigator.userAgent).indexOf("Firefox")?(l="Firefox",u=null==(n=c.match(/Firefox\/([\d.]+)/))?void 0:n[1]):-1!==c.indexOf("Edg")?(l="Microsoft Edge",u=null==(r=c.match(/Edg\/([\d.]+)/))?void 0:r[1]):-1!==c.indexOf("Chrome")&&-1!==c.indexOf("Safari")?(l="Chrome",u=null==(a=c.match(/Chrome\/([\d.]+)/))?void 0:a[1]):-1!==c.indexOf("Safari")&&-1===c.indexOf("Chrome")?(l="Safari",u=null==(i=c.match(/Version\/([\d.]+)/))?void 0:i[1]):-1!==c.indexOf("Opera")||-1!==c.indexOf("OPR")?(l="Opera",u=null==(o=c.match(/(Opera|OPR)\/([\d.]+)/))?void 0:o[2]):-1!==c.indexOf("MSIE")||-1!==c.indexOf("Trident")?(l="Internet Explorer",u=null==(s=c.match(/(MSIE |rv:)([\d.]+)/))?void 0:s[2]):(l="Unknown",u="Unknown"),{name:l,version:u}))),m.setContext("device",h(S({},{model:p=-1!==(d=navigator.userAgent).indexOf("Win")?"Windows":-1!==d.indexOf("Mac")?"Mac":-1!==d.indexOf("Linux")?"Linux":-1!==d.indexOf("Android")?"Android":-1!==d.indexOf("like Mac")||-1!==d.indexOf("iPhone")||-1!==d.indexOf("iPad")?"iOS":"Unknown",family:p,device:/Mobile|iPhone|iPod|Android/i.test(d)?"Mobile":/Tablet|iPad/i.test(d)?"Tablet":"Desktop"}),g({screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:(null==(t=screen.orientation)?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))),D(m)}(e.sentry);return yield function e(t,n,r=0){return w(this,null,function*(){let a=r<2?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield function(e={cleanup:!1},t){try{t.addBreadcrumb({category:x,message:"hCaptcha loader params",data:e});let n=P(e.scriptLocation),r=A(n),a=M.find(({scope:e})=>e===r.window);if(a)return t.addBreadcrumb({category:x,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((n,i)=>w(this,null,function*(){try{var o;r.window[E]=()=>{t.addBreadcrumb({category:x,message:"hCaptcha script called onload function"}),n(r.window.hcaptcha)};let i=(o={custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl},Object.entries(o).filter(([,e])=>e||!1===e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`).join("&"));yield function({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:a="https://js.hcaptcha.com",cleanup:i=!1,secureApi:o=!1,scriptSource:s=""}={},c){let l=P(e),u=A(l);return new Promise((e,d)=>{let p=u.document.createElement("script");p.id="hCaptcha-script",s?p.src=`${s}?onload=${E}`:o?p.src=`${a}/1/secure-api.js?onload=${E}`:p.src=`${a}/1/api.js?onload=${E}`,p.crossOrigin=r,p.async=n;let h=(e,t)=>{try{!o&&i&&l.removeChild(p),t(e)}catch(e){d(e)}};p.onload=t=>h(t,e),p.onerror=e=>{c&&c(p.src),h(e,d)},p.src+=""!==t?`&${t}`:"",l.appendChild(p)})}(S({query:i},e),e=>{t.captureRequest({url:e,method:"GET"})}),t.addBreadcrumb({category:x,message:"hCaptcha loaded",data:a})}catch(n){t.addBreadcrumb({category:x,message:"hCaptcha failed to load"});let e=M.findIndex(e=>e.scope===r.window);-1!==e&&M.splice(e,1),i(Error(b))}}));return M.push({promise:i,scope:r.window}),i}catch(e){return t.captureException(e),Promise.reject(Error(b))}}(t,n)}catch(i){return n.addBreadcrumb({category:x,message:a}),r>=2?(n.captureException(i),Promise.reject(i)):e(t,n,r+=1)}})}(e,t)})})({render:"explicit",apihost:t,assethost:n,endpoint:r,hl:o,host:a,imghost:i,recaptchacompat:!1===s?"off":null,reportapi:c,sentry:l,custom:u,loadAsync:d,scriptLocation:p,scriptSource:m,secureApi:f,cleanup:void 0===v||v}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(e){var t=this,n=this.props.onReady,r=this.state.isApiReady,a=this.captchaId;
6if(r&&!a){var i=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),o=this._hcaptcha.render(this.ref.current,i);this.captchaId=o,this.setState({isRemoved:!1},function(){e&&e(),n&&n(),t._onReady&&t._onReady(o)})}},n.resetCaptcha=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&e.reset(t)},n.removeCaptcha=function(e){var t=this,n=this._hcaptcha,r=this.captchaId;this.isReady()&&this.setState({isRemoved:!0},function(){t.captchaId="",n.remove(r),e&&e()})},n.handleOnLoad=function(){var e=this;this.setState({isApiReady:!0},function(){var t=j(N(e.props.scriptLocation));e._hcaptcha=t.window.hcaptcha,e.renderCaptcha(function(){var t=e.props.onLoad;t&&t()})})},n.handleSubmit=function(e){var t=this.props.onVerify,n=this.state.isRemoved,r=this._hcaptcha,a=this.captchaId;
6if(void 0!==r&&!n){var i=r.getResponse(a),o=r.getRespKey(a);t&&t(i,o)}},n.handleExpire=function(){var e=this.props.onExpire,t=this._hcaptcha,n=this.captchaId;this.isReady()&&(t.reset(n),e&&e())},n.handleError=function(e){var t=this.props.onError,n=this._hcaptcha,r=this.captchaId;this.isReady()&&n.reset(r),t&&t(e)},n.isReady=function(){var e=this.state,t=e.isApiReady,n=e.isRemoved;return t&&!n},n.handleOpen=function(){this.isReady()&&this.props.onOpen&&this.props.onOpen()},n.handleClose=function(){this.isReady()&&this.props.onClose&&this.props.onClose()},n.handleChallengeExpired=function(){this.isReady()&&this.props.onChalExpired&&this.props.onChalExpired()},n.execute=function(e){var t=this;void 0===e&&(e=null),e="object"==typeof e?e:null;try{var n=this._hcaptcha,r=this.captchaId;if(!this.isReady()){var a,i=new Promise(function(n,r){t._onReady=function(a){try{var i=t._hcaptcha;e&&e.async?i.execute(a,e).then(n).catch(r):n(i.execute(a,e))}catch(e){r(e)}}});return null!=(a=e)&&a.async?i:null}return n.execute(r,e)}catch(t){if(e&&e.async)return Promise.reject(t);return null}},n.close=function(){var e=this._hcaptcha,t=this.captchaId;if(this.isReady())return e.close(t)},n.setData=function(e){var t=this._hcaptcha,n=this.captchaId;this.isReady()&&(e&&"object"!=typeof e&&(e=null),t.setData(n,e))},n.getResponse=function(){return this._hcaptcha.getResponse(this.captchaId)},n.getRespKey=function(){return this._hcaptcha.getRespKey(this.captchaId)},n.render=function(){var e=this.state.elementId;return d.createElement("div",{ref:this.ref,id:e})},t}(d.Component),U=e.i(810789),F=e.i(463984);let B=window;function K(e){let{state:t,length:n}=B?.history||{},{hash:r,host:a,hostname:i,href:o,origin:s,pathname:c,port:l,protocol:u,search:d}=B?.location||{};return{trigger:e,state:t,length:n,hash:r,host:a,hostname:i,href:o,origin:s,pathname:c,port:l,protocol:u,search:d}}var W=e.i(459381),q=e.i(429131),V=e.i(902224),$=e.i(725516),Y=e.i(539594);let z="generation-turnstile-container",H=(0,a.observer)(e=>{let{wrapperClassName:n}=e,{session:r}=(0,q.useStores)(),a=2===r.generationCaptchaVersion,i=(0,d.useRef)(null),o=(0,d.useRef)(null),[s,c]=(0,d.useState)(!1),l=(0,d.useRef)(Promise.resolve(null)),u=(0,d.useRef)(null),p=(0,F.usePathname)(),h=function(){var e;let[t,n]=(0,d.useState)(null);return e=()=>{n(K("load"))},(0,d.useEffect)(()=>{e()},[]),(0,d.useEffect)(()=>{if(B){let e=()=>n(K("popstate")),t=()=>n(K("hashchange"));return B.addEventListener("popstate",e,{passive:!0}),B.addEventListener("hashchange",t,{passive:!0}),()=>{B.removeEventListener("popstate",e),B.removeEventListener("hashchange",t)}}},[]),t}(),g=!h?.hostname?.includes("localhost"),m=r.userId??"",f=(0,d.useCallback)(()=>{Y.eventLogger.logWebPageEvent({userId:m,element:"hcaptcha_challenge",eventType:Y.PageEventType.VIEW,pageUrl:p})},[p,m]),v=(0,d.useCallback)(()=>{Y.eventLogger.logWebPageEvent({userId:m,element:"hcaptcha_challenge_closed",eventType:Y.PageEventType.VIEW,pageUrl:p})},[p,m]),_=(0,d.useCallback)(e=>{U.captureException(`HCaptcha error: "${e}"`)},[]),S=(0,d.useCallback)(()=>{Y.eventLogger.logWebPageEvent({userId:m,element:"hcaptcha_challenge_expired",eventType:Y.PageEventType.VIEW,pageUrl:p})},[p,m]),y=(0,d.useCallback)(()=>{r.onCaptchaReady()},[r]);if((0,d.useEffect)(()=>{if(!a)return r.captchaVerification=async()=>{if(!i.current)return null;let e=await i.current.execute({async:!0});return e?.response||null},()=>{r.captchaVerification=null};let e=(e,t,n,a,i=!1)=>{(0,W.reportTurnstileFailure)(e,{reason:t,blocked:n,isPaid:!!r.isSubscriber,userId:r.userId??"",clerkId:r.clerkId??void 0,flow:(0,W.captchaFlow)(),interactive:i,extra:a})},t=()=>{let t=async()=>{let t=window.turnstile;if(!t)return e("Turnstile verification requested but window.turnstile is missing","script_missing",!0),null;if(!document.getElementById(z))return e("Turnstile verification requested but container div is not mounted","container_missing",!0),null;if(o.current)try{t.remove(o.current)}catch{}return new Promise(n=>{let a=!1,i=0,s=!1,l=!1,d=(t,r,o)=>{window.clearTimeout(i),i=window.setTimeout(()=>{a||(a=!0,c(!1),e(o,r,!0,void 0,l),n(null))},t)};d(3e4,"no_callback_timeout","Turnstile generation widget produced no callback within 30s");let p=e=>{a||(a=!0,window.clearTimeout(i),c(!1),e&&(0,W.emitTurnstileMetric)({outcome:"token",reason:"ok",is_paid:!!r.isSubscriber,flow:(0,W.captchaFlow)(),interactive:l}),n(e))};u.current=()=>{a||(a=!0,window.clearTimeout(i),c(!1),e("Turnstile verification cancelled by unmount or provider switch","cancelled_unmount",!0,void 0,l),n(null))};let h=(t,n,r,i)=>{a||e(t,n,r,i,l)},g=e=>{Y.eventLogger.logWebPageEvent({userId:r.userId??"",element:e,eventType:Y.PageEventType.VIEW,pageUrl:window.location.pathname})};try{let e=t.render(`#${z}`,{sitekey:$.CLOUDFLARE_TURNSTILE_SITE_KEY_GEN,execution:"execute",appearance:"interaction-only",callback:e=>p(e),"error-callback":e=>{h("Turnstile generation widget error","widget_error",!1,{errorCode:e??"unknown"}),a||d(s?12e4:3e4,"error_no_recovery","Turnstile widget did not recover after error")},"expired-callback":()=>{h("Turnstile generation token expired before submission","token_expired",!0),p(null)},"timeout-callback":()=>{h("Turnstile interactive challenge timed out; widget reset for retry","interactive_timeout_reset",!1)},"unsupported-callback":()=>{h("Turnstile unsupported in this browser","unsupported_browser",!0),p(null)},"before-interactive-callback":()=>{a||(s=!0,l=!0,c(!0),d(12e4,"interactive_abandoned","Turnstile interactive challenge abandoned without completion"),g("turnstile_challenge"))},"after-interactive-callback":()=>{s=!1,c(!1),a||(d(3e4,"no_token_after_interactive","Turnstile produced no token after interactive challenge completed"),g("turnstile_challenge_closed"))}});o.current=e,t.execute(e)}catch(t){e("Turnstile widget render threw","render_exception",!0,{error:t instanceof Error?t.message:String(t)}),p(null)}})};r.captchaVerification=()=>{let e=l.current.then(t);return l.current=e,e},r.onCaptchaReady()};if(window.turnstile)return t(),()=>{u.current?.(),r.captchaVerification=null};let n=document.createElement("script");return n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.defer=!0,n.onload=t,n.onerror=()=>{e("Turnstile challenge script failed to load","script_load_failed",!1),r.captchaVerification=async()=>(e("Turnstile verification requested after script failed to load","script_load_failed",!0),null),r.onCaptchaReady()},document.head.appendChild(n),()=>{n.onload=null,u.current?.(),r.captchaVerification=null}},[a,r]),a)return(0,t.jsx)("div",{className:s?"fixed inset-0 z-[1000] flex items-center justify-center bg-black/70":"pointer-events-none fixed -z-50 opacity-0",children:(0,t.jsx)("div",{id:z})});if(!g&&!V.FORCE_ENABLE_CAPTCHA)return null;let w="prod";return(0,t.jsx)("div",{className:n,children:(0,t.jsx)(G,{sitekey:"d65453de-3f1a-4aac-9366-a0f06e52b2ce",onLoad:y,onOpen:f,onClose:v,onError:_,onCh
6alExpired:S,size:"invisible",ref:i,sentry:!1,scriptSource:`https://hcaptcha-endpoint-${w}.suno.com/1/api.js`,endpoint:`https://hcaptcha-endpoint-${w}.suno.com`,assethost:`https://hcaptcha-assets-${w}.suno.com`,imghost:`https://hcaptcha-imgs-${w}.suno.com`,reportapi:`https://hcaptcha-reportapi-${w}.suno.com`,render:"explicit"})})}),J={position:"relative",zIndex:$.SUPER_MODAL_Z_INDEX+100},Q=(0,a.observer)(()=>{let e=(0,o.useGateValue)("lazy-load-hcaptcha"),{session:n}=(0,q.useStores)(),r=(0,c.useIsClient)(),a=n.eagerTurnstileMountEnabled,i=n.generationCaptchaVersion===V.TURNSTILE_GENERATION_CAPTCHA_VERSION,l=a&&i;l&&(0,s.preconnect)("https://challenges.cloudflare.com");let u=!e||n.captchaMountRequested||l;if(!r||!u)return null;let d=(0,t.jsx)(H,{wrapperClassName:"pointer-events-none fixed -z-50 opacity-0"});return i?(0,s.createPortal)((0,t.jsx)("div",{style:J,children:d}),document.body):d});var X=e.i(828744),Z=e.i(804138);e.i(481045);var ee=e.i(536952),et=e.i(334959),en=e.i(248949),er=e.i(350671);async function ea(e){let t=await (0,en.resolveTextOnDemand)({instance:e,namespace:"auth",resolve:e=>e("auth.logInFailed")});er.toastManager.add({timeout:5e3,title:t,type:"error"})}var ei=e.i(838038),eo=e.i(213267),es=e.i(533307),ec=e.i(365943);e.i(613335);var el=e.i(277565),eu=e.i(305223),ed=e.i(42305),ep=e.i(131818);let eh=["/auth/birthday"],eg=!1,em=["/song/"];function ef(){let{i18n:e}=(0,ee.useTranslation)("common"),{isSignedIn:t,isLoaded:n}=(0,eo.useAuth)(),r=(0,es.useClerk)(),a=(0,F.usePathname)(),{isModalOpen:i}=(0,ei.useModalContext)(),{willAutoShowLoggedOutModal:o,shouldHoldCompetingPrompts:s,promptOutOfWay:c}=(0,X.useAppSellAudience)(),l=(0,d.useCallback)(async t=>{(0,el.default)({actionName:"GoogleOneTapCredentialReceived",context:{select_by:t.select_by}});try{let n=await fetch((0,ec.getClerkApiUrl)("/v1/client/sign_ins"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},credentials:"include",body:new URLSearchParams({strategy:"google_one_tap",token:t.credential})}),a=await n.json();if(!n.ok){let t=a?.errors?.[0]?.code;if("needs_birthday"===t){(0,el.default)({actionName:"GoogleOneTapSignInNeedsBirthday"});let t=a?.errors?.[0]?.meta,n=t?.partial_token,r=t?.backend;if(!n||!r){(0,el.default)({actionName:"GoogleOneTapSignInFailed",context:{reason:"api_error",error:"missing_birthday_meta"}}),await ea(e);return}let i=new URLSearchParams({partial_token:n,backend:r,redirect_url:window.location.pathname+window.location.search});window.location.href=`/auth/birthday?${i.toString()}`;return}(0,el.default)({actionName:"GoogleOneTapSignInFailed",context:{reason:"api_error",status:n.status,error:t??"unknown"}}),await ea(e);return}let i=a?.client?.sessions?.[0]?.id??a?.client?.last_active_session_id;if(!i){(0,el.default)({actionName:"GoogleOneTapSignInFailed",context:{reason:"no_session"}}),await ea(e);return}await r.setActive({session:i}),(0,el.default)({actionName:"GoogleOneTapSignInSuccess"}),(0,eu.markPendingCreateIntentCookie)($.PageRoutes.Create);let o=new URLSearchParams({[$.REDIRECTED_FROM_PARAM]:$.REDIRECTED_FROM_VALUES.SIGNIN,[$.REFERRER_PARAM]:window.location.pathname});window.location.href=`${$.PageRoutes.Create}?${o}`}catch(t){(0,el.default)({actionName:"GoogleOneTapSignInFailed",context:{reason:"network_error",error:String(t)}}),await ea(e)}},[r,e]),u=function({pathname:e,isMobileBrowser:t,shouldHoldCompetingPrompts:n,willAutoShowLoggedOutModal:r,promptOutOfWay:a,signInModalOpen:i}){let o=t&&em.some(t=>e.startsWith(t));return eh.includes(e)||o||n||r&&!a||i}({pathname:a,isMobileBrowser:(0,ed.isMobileBrowser)(),shouldHoldCompetingPrompts:s,willAutoShowLoggedOutModal:o,promptOutOfWay:c,signInModalOpen:i(et.ModalTypes.SIGN_IN_MODAL)});return(0,d.useEffect)(()=>{(0,ep.loadGsiScript)()},[]),(0,d.useEffect)(()=>{(u||t)&&(window.google?.accounts?.id&&window.google.accounts.id.cancel(),eg=!1)},[u,t]),(0,d.useEffect)(()=>{if(!n||t||eg||u)return;eg=!0;let e=!0;return(0,ep.loadGsiScript)().then(()=>{if(!e||!window.google?.accounts?.id){eg=!1;return}try{window.google.accounts.id.initialize({client_id:"864619725951-na3uleaalbekeilaalb3ak9qdpuoddeo.apps.googleusercontent.com",callback:l,auto_select:!0,cancel_on_tap_outside:!1,itp_supp
6ort:!0,use_fedcm_for_prompt:!0})}catch(e){(0,el.default)({actionName:"GoogleOneTapInitFailed",context:{reason:"init_threw",error:String(e)}});return}try{window.google.accounts.id.prompt(e=>{e.isSkippedMoment()?(0,el.default)({actionName:"GoogleOneTapSkipped"}):e.isDismissedMoment()&&(0,el.default)({actionName:"GoogleOneTapDismissed"})})}catch(e){(0,el.default)({actionName:"GoogleOneTapInitFailed",context:{reason:"prompt_threw",error:String(e)}})}}),()=>{e=!1,window.google?.accounts?.id&&window.google.accounts.id.cancel()}},[n,t,u,l]),null}var ev=e.i(851052),e_=e.i(127479),eS=e.i(964977),ey=e.i(79076),ew=e.i(991844),eE=e.i(7284);e.i(179395);var eb=e.i(73605),ex=e.i(274918);e.i(696800);var eA=e.i(714791);let eP=({title:e,onChoose:n,onClose:r})=>{let{t:a}=(0,ee.useTranslation)(["account","common"]),i=(0,d.useId)(),[o,s]=(0,d.useState)(!1),c=async e=>{s(!0),await n(e)||s(!1)};return(0,t.jsxs)(ew.Toast.Content,{"aria-describedby":i,className:(0,eE.default)("mx-4 flex w-[calc(100%-2rem)] flex-col gap-3 rounded-3xl border border-border-secondary-glass p-4 md:w-[26rem]","bg-background-glass-thick shadow-glass-highlight backdrop-blur-2xl"),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-sm leading-5 font-medium tracking-tight text-foreground-primary",children:e}),(0,t.jsx)(eb.Button,{variant:ex.ButtonVariant.Inherit,size:ex.ButtonSize.Mini,shape:ex.ButtonShape.Pill,icon:eA.CloseIcon,onClick:()=>r?.(),"aria-label":a("cta.notNow",{ns:"common"})})]}),(0,t.jsxs)("div",{id:i,className:"flex flex-col gap-2 text-xs leading-4 tracking-tight text-foreground-tertiary-glass",children:[(0,t.jsx)("p",{children:a("accountSettings.dataSharingPromptBody")}),(0,t.jsx)("p",{children:a("accountSettings.dataSharingPromptOptional")})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)(eb.Button,{variant:ex.ButtonVariant.Tertiary,size:ex.ButtonSize.Small,shape:ex.ButtonShape.Pill,disabled:o,onClick:()=>void c("denied"),children:a("accountSettings.dataSharingPromptDeny")}),(0,t.jsx)(eb.Button,{variant:ex.ButtonVariant.Aura,size:ex.ButtonSize.Small,shape:ex.ButtonShape.Pill,disabled:o,onClick:()=>void c("granted"),children:a("accountSettings.dataSharingPromptAllow")})]})]})};var eC=e.i(274869),eO=e.i(744805),eT=e.i(379694);let eL=["/onboarding","/checkout","/account"],eR=eT.THIRTY_DAYS_MS;function eI(e){return`data-sharing-prompt-snoozed:${e}`}function ek(){return function(e){if(!e)return{answered:!1,targetingDenied:!1};let t=e.split("; ");if(!t.some(e=>e.startsWith("OptanonAlertBoxClosed=")))return{answered:!1,targetingDenied:!1};let n=t.find(e=>e.startsWith("OptanonConsent="));if(!n)return{answered:!0,targetingDenied:!0};try{let e=decodeURIComponent(n.split("=").slice(1).join("=")),t=e.match(/groups=([^&]*)/)?.[1]??"";return{answered:!0,targetingDenied:!t.includes(`${eO.ConsentGroup.Targeting}:1`)}}catch{return{answered:!0,targetingDenied:!0}}}("u"<typeof document?void 0:document.cookie)}let eD=(0,a.observer)(()=>(!function(){let{session:e}=(0,q.useStores)(),t=(0,o.useGateValue)("web-data-sharing-settings-toggle"),n=(0,F.usePathname)(),r=(0,ev.useQueryClient)(),a=(0,eS.useAppI18n)(),[i,s]=(0,d.useState)(ek),{shouldHoldCompetingPrompts:c,willAutoShowLoggedInModal:l,promptOutOfWay:u}=(0,X.useAppSellAudience)(),p=c||l&&!u,h=(0,d.useRef)(null),g=(0,d.useRef)(!1);(0,d.useEffect)(()=>{let e=()=>s(ek());return window.addEventListener("OneTrustConsentUpdated",e),()=>window.removeEventListener("OneTrustConsentUpdated",e)},[]);let m=e.userId,f=(0,eC.useDataSharingVerdict)(e=>e.verdict),v=f?.requires_prompt??!1,_=f?.region;(0,d.useEffect)(()=>{var e;if(g.current||!m||!(!(e={isGateEnabled:t,userId:m,verdict:f,appSellInTheWay:p,cookieBanner:i,isSnoozed:!(0,eT.hasTimedStorageKeyExpired)(eI(m)),pathname:n}).isGateEnabled?{show:!1,reason:"gate_off"}:!e.userId?{show:!1,reason:"signed_out"}:!e.verdict?{show:!1,reason:"no_verdict"}:!e.verdict.requires_prompt?{show:!1,reason:"prompt_not_required"}:e.appSellInTheWay?{show:!1,reason:"app_sell_prompt"}:!e.cookieBanner.answered?{show:!1,reason:"cookie_banner_unanswered"}:e.cookieBanner.targetingDenied?{show:!1,reason:"cookie_targeting_denied"}:e.isSnoozed?{show:!1,reason:"snoozed"}:e.pathname&&eL.some(t=>e.pathname.startsWith(t))?{show:!1,reason:"excluded_route"}:{show:!0}).show)return;let o=async e=>{(0,el.default)({actionName:"DataSharingPromptAnswered",context:{surface:"web-toast",choice:e}});let{data:t,error:n}=await (0,ey.getInstance)().PUT("/api/privacy/data-sharing-consent",{body:{state:e,surface:"web"}});return n||!t?((0,el.default)({actionName:"DataSharingConsentUpdateFailed",context:{attempted_state:e,error_message:n instanceof Error?n.message:"Unknown error"}}),(0,en.resolveTextOnDemand)({instance:a,namespace:"account",resolve:e=>e("accountSettings.dataSharingUpdateError")}).then(e=>{er.toastManager.add({title:e,type:"error",timeout:5e3})}),!1):((0,eC.setDataSharingVerdict)(t),r.setQueryData(e_.dataSharingConsentQueryKey,t),(0,el.default)({actionName:"DataSharingConsentUpdateSucceeded",context:{new_state:t.state,revision:t.revision}}),h.current?.close(),!0)},s=setTimeout(()=>{g.current=!0,(0,en.resolveTextOnDemand)({instance:a,namespace:"account",resolve:e=>e("accountSettings.dataSharingPromptTitle")}).then(e=>{(0,el.default)({actionName:"DataSharingPromptShown",context:{surface:"web-toast",region:_??void 0}}),h.current=er.toastManager.custom({component:eP,componentProps:{title:e,onChoose:o},timeout:0,position:"bottom",onUserDismiss:()=>{(0,eT.setTimedStorageKey)(eI(m),eR),(0,el.default)({actionName:"DataSharingPromptDismissed",context:{surface:"web-toast",snooze_days:Math.round(eR/eT.ONE_DAY_MS)}})}})})},3e3);return()=>clearTimeout(s)},[t,m,v,_,p,i,n,a,r])}(),null)),eM=(0,i.default)(()=>e.A(36177),{loadableGenerated:{modules:[419574]},ssr:!1}),ej=(0,a.observer)(()=>((0,X.useTrackAppSellMobileWebActivity)(),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Q,{}),(0,t.jsx)(Z.default,{}),(0,t.jsx)(ef,{}),(0,t.jsx)(eM,{}),(0,t.jsx)(eD,{})]})));e.s(["SharedLayoutComponents",0,ej],823422)},533307,e=>{"use strict";var t=e.i(554907),n=e.i(574550),r=e.i(488099),a=e.i(442357),i=e.i(165919),o=e.i(365943),s=e.i(206274);let c=["__session","__client","__client_uat","suno_session_recoverable"];e.s(["useClerk",0,function(){let e=(0,n.useAuthContext)(),l=(0,a.useSetActive)({throwOnError:!0}),u=(0,t.useCallback)(async t=>{(0,i.markExpectedLogout)();let n=performance.now(),a=e.signOut;try{a?await a():await fetch((0,o.getClerkApiUrl)("/v1/client"),{method:"DELETE",credentials:"include"}),(0,r.recordAuthMetric)("suno_auth.sign_in",{outcome:"success",durationMs:Math.round(performance.now()-n),reason:"sign_out"})}catch(e){if((0,r.recordAuthMetric)("suno_auth.sign_in",{outcome:"failure",durationMs:Math.round(performance.now()-n),reason:e instanceof Error?e.name:"exception"}),a)throw e}finally{!function(){if("u"<typeof document)return;let e=window.location.hostname,t=e.replace(/^\./,"").split("."),n=new Set([""]);for(let e=0;e<t.length-1;e++)n.add(t.slice(e).join(".")),n.add("."+t.slice(e).join("."));for(let t of(n.add(e),c))for(let e of n){let n=e?`; domain=${e}`:"";(0,s.writeDocumentCookie)(`${t}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/${n}`)}}(),a||e.refresh()}t?.redirectUrl&&window.location.assign(t.redirectUrl)},[e]);return(0,t.useMemo)(()=>{let t=e.userId?{id:e.userId,primaryEmailAddress:e.email?{emailAddress:e.email}:null,emailAddresses:e.email?[{emailAddress:e.email}]:[]}:null,n=e.sessionId?{id:e.sessionId,user:t??{id:e.userId??""}}:null;return{user:t,session:n,signOut:u,setActive:l}},[e.userId,e.email,e.sessionId,u,l])}])},165919,e=>{"use strict";var t=e.i(554907),n=e.i(488099);let r=0;e.s(["markExpectedLogout",0,function(){r=Date.now()+15e3},"useInvoluntaryLogoutMetric",0,function({authProvider:e,isLoaded:a,isSignedIn:i,serverIsSignedIn:o}){let s=(0,t.useRef)(null);(0,t.useEffect)(()=>{let t;if(!a)return;
6let c=null===s.current?"server_client_mismatch":"client_transition",l=s.current??o;s.current=i,l&&!i&&(t=r>0&&Date.now()<=r,r=0,t||(0,n.recordAuthMetric)("suno_auth.involuntary_logout",{outcome:"failure",authProvider:e,reason:c}))},[e,a,i,o])}])},131818,e=>{"use strict";var t=e.i(277565);let n=null;function r(){return window.google?.accounts?.id?Promise.resolve():n||(n=new Promise(e=>{let t=document.createElement("script");t.src="https://accounts.google.com/gsi/client",t.async=!0,t.onload=()=>e(),t.onerror=()=>{n=null,e()},document.head.appendChild(t)}))}async function a(){let e="u">typeof navigator&&navigator.credentials?.preventSilentAccess?navigator.credentials.preventSilentAccess().catch(e=>{(0,t.default)({actionName:"GoogleOneTapDisableAutoSelectFailed",context:{reason:"fedcm_prevent_silent_access",error:String(e)}})}):Promise.resolve(),n=r().then(()=>{window.google?.accounts?.id?.disableAutoSelect()}).catch(e=>{(0,t.default)({actionName:"GoogleOneTapDisableAutoSelectFailed",context:{reason:"legacy_disable_auto_select",error:String(e)}})});await Promise.all([e,n])}e.s(["disableGoogleAutoSelect",0,a,"loadGsiScript",0,r])}]); 7 8//# sourceMappingURL=1yhgnpq685uuy.js.map 9//# debugId=e163487e-22c1-5e39-a297-6151fa4bbdcc
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.