1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="26412613-4559-c681-cd8e-57a95ce24e3e")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,290641,e=>{"use strict";var t=e.i(848277),r=e.i(330668),n=e.i(784103);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,n.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));i.displayName="Card";let a=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,n.cn)("flex flex-col space-y-1.5 px-6 pb-0 pt-2 lg:p-6",e),...r}));a.displayName="CardHeader";let s=r.forwardRef(({className:e,children:r,...i},a)=>(0,t.jsx)("h3",{ref:a,className:(0,n.cn)("text-lg font-semibold leading-none tracking-tight lg:text-2xl",e),...i,children:r}));s.displayName="CardTitle";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("p",{ref:i,className:(0,n.cn)("text-sm text-muted-foreground",e),...r}));o.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,n.cn)("px-6 pb-2 pt-0 lg:p-6",e),...r}));l.displayName="CardContent",r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,n.cn)("flex items-center p-6 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",0,i,"CardContent",0,l,"CardDescription",0,o,"CardHeader",0,a,"CardTitle",0,s])},866453,e=>{"use strict";var t=e.i(848277),r=e.i(330668),n=e.i(26145),i=e.i(181500),a=e.i(709166),s=e.i(907950),o=e.i(304746),l=e.i(945661),c=e.i(611432),u="Switch",[d,f]=(0,a.createContextScope)(u),[p,m]=d(u),h=r.forwardRef((e,a)=>{let{__scopeSwitch:o,name:l,checked:d,defaultChecked:f,required:m,disabled:h,value:g="on",onCheckedChange:y,form:b,...w}=e,[k,S]=r.useState(null),C=(0,i.useComposedRefs)(a,e=>S(e)),j=r.useRef(!1),N=!k||b||!!k.closest("form"),[P,T]=(0,s.useControllableState)({prop:d,defaultProp:f??!1,onChange:y,caller:u});return(0,t.jsxs)(p,{scope:o,checked:P,disabled:h,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":P,"aria-required":m,"data-state":x(P),"data-disabled":h?"":void 0,disabled:h,value:g,...w,ref:C,onClick:(0,n.composeEventHandlers)(e.onClick,e=>{T(e=>!e),N&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})}),N&&(0,t.jsx)(v,{control:k,bubbles:!j.current,name:l,value:g,checked:P,required:m,disabled:h,form:b,style:{transform:"translateX(-100%)"}})]})});h.displayName=u;var g="SwitchThumb",y=r.forwardRef((e,r)=>{let{__scopeSwitch:n,...i}=e,a=m(g,n);return(0,t.jsx)(c.Primitive.span,{"data-state":x(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r})});y.displayName=g;var v=r.forwardRef(({__scopeSwitch:e,control:n,checked:a,bubbles:s=!0,...c},u)=>{let d=r.useRef(null),f=(0,i.useComposedRefs)(d,u),p=(0,o.usePrevious)(a),m=(0,l.useSize)(n);return r.useEffect(()=>{let e=d.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(p!==a&&t){let r=new Event("click",{bubbles:s});t.call(e,a),e.dispatchEvent(r)}},[p,a,s]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...c,tabIndex:-1,ref:f,style:{...c.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function x(e){return e?"checked":"unchecked"}v.displayName="SwitchBubbleInput";var b=e.i(784103);let w=r.forwardRef(({className:e,thumbClassName:r,...n},i)=>(0,t.jsx)(h,{className:(0,b.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...n,ref:i,children:(0,t.jsx)(y,{className:(0,b.cn)("pointer-events-none my-auto ml-1 block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",r)}
2)}));w.displayName=h.displayName,e.s(["Switch",0,w],866453)},186444,e=>{"use strict";var t=e.i(848277),r=e.i(860240),n=e.i(816506),i=e.i(330668),a=e.i(957602),s=e.i(64222);e.s(["default",0,({href:e,children:o,className:l,ariaLabel:c=""})=>{let{user:u}=(0,r.default)(s.udioApiInstance),{openAuthModal:d}=(0,a.useAuthModal)(),f=(0,i.useCallback)(()=>{u?.id||d(!1,e)},[u?.id,e]);return(0,t.jsx)(n.default,{href:u?e:"#",className:l,onClick:f,"aria-label":c,children:o})}])},176539,e=>{"use strict";var t=e.i(848277),r=e.i(330668),n=e.i(99736),i=e.i(415986),a=e.i(30612),s=e.i(784103);function o(e){document.cookie=`sidebar:state=${e}; path=/; max-age=604800`}let l=r.default.createContext(null),c=r.default.forwardRef(({defaultOpen:e=!0,open:i,onOpenChange:c,className:u,style:d,children:f,allowExpand:p=!0,...m},h)=>{let g=!(0,a.default)().isMediumDevice,y=(0,r.useRef)(null);null===y.current&&(y.current=(({defaultOpen:e,isMobile:t,allowExpand:r})=>(0,n.createStore)((n,i)=>({state:e?"expanded":"collapsed",open:e,openMobile:!1,isMobile:t,allowExpand:r,setOpen:(e,t=!0)=>{n({open:e,state:e?"expanded":"collapsed"}),t&&o(e)},setOpenMobile:e=>{n({openMobile:e})},toggleSidebar:()=>{let{isMobile:e,open:t,openMobile:r}=i();if(e)n({openMobile:!r});else{let e=!t;n({open:e,state:e?"expanded":"collapsed"}),o(e)}}})))({defaultOpen:i??e,isMobile:g,allowExpand:p})),(0,r.useEffect)(()=>{y.current?.setState({isMobile:g})},[g]),(0,r.useEffect)(()=>{y.current?.setState({allowExpand:p})},[p]),(0,r.useEffect)(()=>{void 0!==i&&y.current?.setState({open:i,state:i?"expanded":"collapsed"})},[i]),(0,r.useEffect)(()=>{if(c)return y.current?.subscribe((e,t)=>{e.open!==t.open&&c(e.open)})},[c]),(0,r.useEffect)(()=>{if(!p)return;let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y.current?.getState().toggleSidebar())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p]);let v=(0,r.useMemo)(()=>({"--sidebar-width":"11.5rem","--sidebar-width-icon":"5rem",...d}),[d]);return(0,t.jsx)(l.Provider,{value:y.current,children:(0,t.jsx)("div",{style:v,className:(0,s.cn)("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full",u),ref:h,...m,children:f})})});c.displayName="SidebarProvider",e.s(["SidebarProvider",0,c,"useSidebar",0,function(e){let t=r.default.useContext(l);if(!t)throw Error("useSidebar must be used within a SidebarProvider.");return(0,i.useStore)(t,e??(e=>e))}])},208728,e=>{e.q("/_next/static/media/logo-white-U.0a_8gip39x4_m.svg")},392173,356093,e=>{"use strict";let t=(0,e.i(235884).default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["default",0,t],356093),e.s(["ChevronLeft",0,t],392173)},379752,e=>{"use strict";var t=e.i(591489),r=e.i(746592),n=e.i(338722),i=e.i(457044),a=e.i(330668),s=e.i(64222);let o=i.TOP_TAGS.slice(0,25).map(e=>({label:e,value:e}));e.s(["default",0,({partialTag:e,currentTags:i})=>{let l=(0,r.useQueryClient)(),{partialTag:c,currentTags:u}=(0,a.useMemo)(()=>({partialTag:e?.trim()??"",currentTags:i?.map(e=>e.trim()).filter(e=>e.length>0).slice().sort()??[]}),[e,i]);return{...(0,t.useQuery)({enabled:!!e?.length||!!i?.length,queryKey:n.tagPredictionKeys.forPartialAndCurrentTags(c,u),queryFn:async({queryKey:e})=>{let[t,r,n]=e,i=await s.apiInstance.post("/api/searchtags",{partialTag:r,currentTags:n});return{predictions:i.data.predictions.length>0?i.data.predictions:o,completions:i.data.completions}},refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,gcTime:6e5,placeholderData:e=>e||{predictions:o,completions:[]}}),resetTags:()=>{l.setQueryData(n.tagPredictionKeys.forPartialAndCurrentTags(c,u),{predictions:o,completions:[]})}}}])},376770,e=>{"use strict";e.s(["parsePrompt",0,function(e,t){let r=t||e.length,n=[],i=null,a=0,s=0,o="",l=0,c=(e,t)=>{let o=",;.".includes(e),l=e.length;!o&&(n.push(e.trim().toLowerCase()),t<=r&&t+l>=r&&(i=e.trim().toLowerCase(),a=t,s=l))};for(let t=0;t<=e.length;t++){let r=e[t]||"";",;.".includes(r)||t===e.length?(""!==o&&(c(o,l-o.length),o=""),r&&c(r,l)):o+=r,l++}return{parts:n,cursorPart:i,cursorPartPos:a,cursorPartLen:s}}])},226821,e=>{"use strict";var t=e.i(848277),r=e.i(392173),n=e.i(123207),i=e.i(603333),a=e.i(816506),s=e.i(330668),o=e.i(799649),l=e.i(269184),c=e.i(784103);let u=7/12,d=({gradientColor:e,show:i,onClick:a,leftOrRight:s,variant:l="default"})=>i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,
2c.cn)(["pointer-events-none absolute hidden h-[40px] w-[200px] bg-gradient-to-l from-transparent md:block","transition-opacity duration-500","opacity-100",e?`to-[${e}]`:"to-black","right"===s?"right-0":"left-0"])}),(0,t.jsx)("div",{className:(0,c.cn)(["absolute top-2 bg-gradient-to-l from-transparent","transition-opacity duration-500","opacity-100",e?`to-[${e}]`:"to-black","right"===s?"right-0":"left-0","session"===l&&"top-0"]),children:(0,t.jsxs)(o.Badge,{className:(0,c.cn)("mr-2 hidden cursor-pointer bg-gray-light py-0 text-foreground md:inline-flex md:hover:bg-black","session"===l&&"mr-0 flex size-[25px] items-center justify-center bg-session-gray-5 px-0 text-session-black transition-colors md:hover:bg-session-gray-3"),onMouseDown:e=>{e.preventDefault(),a()},children:["left"===s&&(0,t.jsx)(r.ChevronLeft,{className:"w-4"}),"right"===s&&(0,t.jsx)(n.ChevronRight,{className:"w-4"})]})})]}):null;e.s(["default",0,({tagType:e,tagList:r,addSuggestedTags:n,isAnchor:f=!1,gradientColor:p="#0f0f0f",tagClassName:m,variant:h="default"})=>{let g=(0,s.useRef)(null),[y,v]=(0,s.useState)(!1),[x,b]=(0,s.useState)(!0),w=(0,s.useCallback)(()=>{if(g.current){let{scrollWidth:e,clientWidth:t}=g.current;g.current.scrollLeft=Math.min(g.current.scrollLeft+t*u,e-t)}},[]),k=(0,s.useCallback)(()=>{g.current&&(g.current.scrollLeft=Math.max(g.current.scrollLeft-g.current.clientWidth*u,0))},[]);if((0,s.useEffect)(()=>{let e=()=>{if(!g.current)return;let{scrollLeft:e,scrollWidth:t,clientWidth:r}=g.current;0===e?v(!1):v(!0),e+r===t?b(!1):b(!0)},t=g.current;return t?.addEventListener("scroll",e),()=>t?.removeEventListener("scroll",e)},[]),!r)return null;let S=Array.from(new Map(r.map(e=>[e.value,e])).values());return(0,t.jsxs)("div",{className:"relative flex w-full grow items-center",children:[(0,t.jsx)(d,{leftOrRight:"left",gradientColor:p,show:y,onClick:k,variant:h}),(0,t.jsx)("div",{className:(0,c.cn)("max-w-full pt-2","session"===h&&"pt-0"),children:(0,t.jsx)("ul",{ref:g,"aria-label":"Suggested tags",className:"scrollbar-hide flex overflow-x-auto scroll-smooth whitespace-nowrap rounded-[28px]",style:{scrollbarWidth:"none"},children:S.map((r,s)=>(0,t.jsx)("li",{children:f?(0,t.jsxs)(a.default,{className:(0,c.cn)("mr-2 cursor-pointer px-1 text-muted-foreground underline md:hover:text-foreground",m),onMouseDown:t=>{t.preventDefault(),n([r.value]),(0,l.trackEvent)("Prediction"===e?"Tag Prediction Anchor Click":"Tag Completion Anchor Click",{tag:r.value})},href:`/tags/${encodeURIComponent(r.value)}`,children:[r.label,s!==S.length-1&&", "]},r.value):(0,t.jsx)(o.Badge,{role:"button","aria-label":"Add tag to prompt: "+r.label,className:(0,c.cn)("cursor-pointer select-none p-3 text-muted-foreground md:px-2.5 md:py-1","session"===h?"mr-1 border border-session-gray-6 bg-session-black px-1 pl-1 text-[10px] uppercase text-session-gray-5 hover:bg-session-gray-3 md:pl-1.5 md:pr-2":"mr-2 bg-[#FFFFFF]/5 md:bg-gray-light md:hover:bg-black",m),onMouseDown:t=>{t.preventDefault(),n([r.value]),(0,l.trackEvent)("Prediction"===e?"Tag Prediction Click":"Tag Completion Click",{tag:r.value})},children:"session"===h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Plus,{className:"mr-0.5 size-3"}),(0,t.jsx)("span",{children:r.label})]}):r.label},r.value)},r.value))})}),(0,t.jsx)(d,{leftOrRight:"right",gradientColor:p,show:x,onClick:w,variant:h})]})}])},745972,e=>{"use strict";var t=e.i(848277),r=e.i(359575),n=e.i(334270),i=e.i(92505);e.s(["default",0,({allowClose:e})=>{let{showOptions:a,setShowOptions:s}=(0,n.usePromptState)((0,r.useShallow)(e=>({showOptions:e.showOptions,setShowOptions:e.setShowOptions}))),o=()=>{e&&s(!1)};return(0,i.default)("Escape",o),(0,t.jsx)(t.Fragment,{children:a?(0,t.jsx)("div",{role:"presentation",className:"fixed left-0 top-0 z-[-1000] h-screen w-screen bg-black/30",onClick:o,onKeyDown:e=>"Escape"===e.key&&o()}):null})}])},71254,e=>{"use strict";var t=e.i(848277),r=e.i(673511),n=e.i(487635),i=e.i(957602),a=e.i(784103);e.s(["default",0,({audioXHover:e,setAudioXHover:s,audioFile:o,resetAll:l,positionClassName:c,label:u})=>{let{openWaveformPreviewModal:d,setWaveformPreviewModalFile:f,setWaveformPreviewModalSongTitle:p}=(0,i.useWaveformPreviewModal)();return(0,t.jsxs)("div",{className:(0,a.cn)("absolute left-1 flex h-9 w-[135px] cursor-pointer flex-row items-center rounded-sm bg-background p-2",c,e?"bg-red-900":" hover:bg-[#FFFFFF]/20"),children:[u&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:u}),(0,t.jsxs)("div",{"aria-label":"Preview audio file",className:"flex w-[125px] flex-row items-center space-x-2 truncate pr-2 text-sm text-white",onClick:()=>{d(),f(o.file),p(o.file.name)},children:[(0,t.jsx)(r.Play,{fill:"white",className:"size-3"}),(0,t.jsx)("span",{children:o.file.name})]}),(0,t.jsx)(n.X,{"aria-label":"Remove audio file",stroke:"white",className:"size-4 cursor-pointer transition-transform",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlur:()=>s(!1),onClick:l})]})}])},660954,285275,e=>{"use strict";let t=(0,e.i(235884).default)("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);
2e.s(["default",0,t],285275),e.s(["Mic",0,t],660954)},177257,e=>{"use strict";var t=e.i(848277),r=e.i(330668),n=e.i(54976),i=e.i(196234),a=e.i(800216),s=e.i(660954),o=e.i(657107),l=e.i(673511),c=e.i(784103);let u=r.default.lazy(async()=>{let{LiveAudioVisualizer:t}=await e.A(687879);return{default:t}}),d=({onRecordingComplete:e,recorderControls:n,showVisualizer:i=!1,classes:d})=>{let{startRecording:f,stopRecording:p,togglePauseResume:m,recordingBlob:h,isRecording:g,isPaused:y,recordingTime:v,mediaRecorder:x}=n,[b,w]=(0,r.useState)(!1),k=(e=!0)=>{w(e),p()};return(0,r.useEffect)(()=>{b&&null!=h&&null!=e&&e(h)},[h]),(0,t.jsxs)("div",{className:`audio-recorder flex size-10 items-center justify-center ${g?"recording":""} ${d?.AudioRecorderClass??""}`,"data-testid":"audio_recorder",children:[(0,t.jsx)(s.Mic,{stroke:"white",size:25,className:(0,c.cn)(["audio-recorder-mic h-5 w-5",d?.AudioRecorderStartSaveClass,g?"ml-2":"absolute"]),onClick:g?()=>k(!1):f,"data-testid":"ar_mic","data-title":g?"Save recording":"Start recording"}),(0,t.jsxs)("span",{className:`audio-recorder-timer ${!g?"display-none":"text-white"} ${d?.AudioRecorderTimerClass??""}`,"data-testid":"ar_timer",children:[Math.floor(v/60),":",String(v%60).padStart(2,"0")]}),i?(0,t.jsx)("span",{className:`audio-recorder-visualizer ${!g?"display-none":""}`,children:x&&(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)(t.Fragment,{}),children:(0,t.jsx)(u,{mediaRecorder:x,barWidth:2,gap:2,width:140,height:30,fftSize:512,maxDecibels:-10,minDecibels:-80,smoothingTimeConstant:.4})})}):(0,t.jsxs)("span",{className:`audio-recorder-status ${!g?"display-none":""} ${d?.AudioRecorderStatusClass??""}`,children:[(0,t.jsx)("span",{className:"audio-recorder-status-dot"}),"Recording"]}),y?(0,t.jsx)(l.Play,{stroke:"white",fill:"white",className:`audio-recorder-options ${!g?"display-none":""} ${d?.AudioRecorderPauseResumeClass??""}`,onClick:m,"data-title":"Resume recording","data-testid":"ar_play"}):(0,t.jsx)(o.Pause,{stroke:"white",fill:"white",className:`audio-recorder-options ${!g?"display-none":""} ${d?.AudioRecorderPauseResumeClass??""}`,onClick:m,"data-title":"Pause recording","data-testid":"ar_pause"}),(0,t.jsx)(a.Check,{stroke:"white",className:`audio-recorder-options ${!g?"display-none":""} ${d?.AudioRecorderDiscardClass??""}`,onClick:()=>k(!1),"data-title":"Save Recording","data-testid":"ar_save"})]})};var f=e.i(171205);let p=({recorderControls:e,onRecordingComplete:a})=>{let[s,o]=r.default.useState(null);return(0,t.jsxs)("div",{children:[s?(0,t.jsxs)("div",{className:"flex flex-row items-center",children:[(0,t.jsx)("audio",{controls:!0,src:s}),(0,t.jsx)(f.Button,{variant:"default",className:"ml-2 flex flex-row items-center space-x-2 border border-[#fff]/10 px-4",onClick:()=>{e.setRecordingBlob(void 0),o(null)},children:(0,t.jsx)("div",{className:"text-sm ",children:"Retry"})})]}):(0,t.jsx)(d,{recorderControls:e,onRecordingComplete:e=>{o(URL.createObjectURL(e)),a?.(e)},showVisualizer:!0,audioTrackConstraints:{noiseSuppression:!0,echoCancellation:!0,sampleRate:48e3,autoGainControl:!0},onNotAllowedOrFound:e=>n.toast.error(JSON.stringify(e),i.DEFAULT_TOAST_OPTIONS),mediaRecorderOptions:{audioBitsPerSecond:128e3}}),(0,t.jsx)("br",{})]})};var m=e.i(334270);e.s(["default",0,({recorderControls:e,onRecordingComplete:r})=>{let{setShowRecording:n,setUploadConfirmationOpen:i,setUploadConfirmationType:a}=(0,m.usePromptState)();return(0,t.jsxs)("div",{className:"absolute z-10 flex size-full flex-col items-center justify-center bg-gray-medium text-muted-foreground transition-all duration-300 ease-in",children:[(0,t.jsx)(p,{recorderControls:e,onRecordingComplete:r}),(0,t.jsx)("div",{className:"",children:"Try playing an instrument, drumming, or singing along with accompaniment."}),(0,t.jsx)("div",{children:"Just talking or singing alone may lead to poor results."}),(0,t.jsxs)("div",{className:"mt-10 flex flex-row space-x-2",children:[(0,t.jsx)(f.Button,{variant:"ghost",onClick:()=>{e.isRecording&&e.stopRecording(),n(!1)},className:"flex flex-row items-center space-x-2 border border-[#fff]/10 bg-create-background/50 px-4 hover:bg-create-background/10",children:(0,t.jsx)("div",{className:"text-sm text-white",children:"Cancel"})}),(0,t.jsx)(f.Button,{variant:"default",disabled:!e.recordingBlob,onClick:()=>{e.isRecording&&e.stopRecording(),i(!0),a("recording")},className:"flex flex-row items-center space-x-2 bg-brand-accent px-4 hover:bg-brand-accent/50",children:(0,t.jsx)("div",{className:"text-sm text-white",children:"Use Recording"})})]})]})}],177257)},393068,249570,e=>{"use strict";let t=(0,e.i(235884).default)("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}
2],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);e.s(["default",0,t],249570),e.s(["Library",0,t],393068)},808872,205077,e=>{"use strict";let t=(0,e.i(235884).default)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);e.s(["default",0,t],205077),e.s(["Volume2",0,t],808872)},372330,997421,e=>{"use strict";let t=(0,e.i(235884).default)("Music2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);e.s(["default",0,t],997421),e.s(["Music2",0,t],372330)},370725,936322,e=>{"use strict";let t=(0,e.i(235884).default)("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);e.s(["default",0,t],936322),e.s(["SkipForward",0,t],370725)},298617,307348,e=>{"use strict";let t=(0,e.i(235884).default)("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);e.s(["default",0,t],307348),e.s(["Shuffle",0,t],298617)},950443,e=>{"use strict";var t=e.i(848277),r=e.i(696086),n=e.i(330668),i=e.i(30612);let a=(0,n.createContext)({pathname:"",isMobileCreate:!1,isMobileVoices:!1});e.s(["LocationProvider",0,({children:e})=>{let s=(0,r.usePathname)(),{isMediumDevice:o}=(0,i.default)(),l=(0,n.useMemo)(()=>({pathname:s,isMobileCreate:"/create"===s&&!o,isMobileVoices:"/playground"===s&&!o}),[s,o]);return(0,t.jsx)(a.Provider,{value:l,children:e})},"useLocation",0,()=>(0,n.useContext)(a)])},110014,623786,e=>{"use strict";var t=e.i(848277),r=e.i(330668);let n=e=>{let t=(0,r.useRef)(null),n=(0,r.useRef)(e),i=(0,r.useRef)("u"<typeof document||"visible"===document.visibilityState);(0,r.useEffect)(()=>{n.current=e},[e]),(0,r.useEffect)(()=>{let e=!0,r=()=>{null!==t.current&&(cancelAnimationFrame(t.current),t.current=null)},a=()=>{e&&i.current&&null===t.current&&(t.current=requestAnimationFrame(()=>{t.current=null,i.current&&n.current(),a()}))},s=()=>{i.current="u"<typeof document||"visible"===document.visibilityState,i.current?a():r()};return"u">typeof document&&document.addEventListener("visibilitychange",s),a(),()=>{e=!1,"u">typeof document&&document.removeEventListener("visibilitychange",s),r()}},[])};e.s(["useAnimationCallback",0,n],623786);var i=e.i(30612),a=e.i(784103);e.s(["default",0,({seeker:e,onChange:s,value:o=0,min:l="0",max:c="1",step:u="0.001",className:d,onDragStart:f,onDragEnd:p,variant:m="default",bufferedPercentage:h=0})=>{let g=()=>"function"==typeof o?o():o,{isMediumDevice:y}=(0,i.default)(),v=(0,r.useRef)(!1),x=(0,r.useRef)(g()),b=(e,t)=>{e.value=t.toString(),e.style.setProperty("--value",t.toString()),e.style.setProperty("--min",l.toString()),e.style.setProperty("--max",c.toString()),e.style.setProperty("--buffered-percentage",h.toString())};return(0,r.useEffect)(()=>{let t=e.current;if(!t)return;let r=e=>{if(e.preventDefault(),e.stopPropagation(),!v.current)return;let r=e.touches[0],n=t.getBoundingClientRect(),i=Math.min(Math.max((r.clientX-n.left)/n.width,0),1);Math.abs(i-x.current)>.001&&(x.current=i,t.value=i.toString(),b(t,i),s())},n=e=>{e.preventDefault(),v.current=!0,f?.()},i=e=>{e.preventDefault(),v.current=!1,p?.()};return t.addEventListener("touchmove",r,{passive:!1}),t.addEventListener("touchstart",n,{passive:!1}),t.addEventListener("touchend",i,{passive:!1}),t.addEventListener("touchcancel",i,{passive:!1}),()=>{t.removeEventListener("touchmove",r),t.removeEventListener("touchstart",n),t.removeEventListener("touchend",i),t.removeEventListener("touchcancel",i)}},[e,s,f,p]),n(()=>{let t=e.current;t&&!v.current&&b(t,g())}),(0,t.jsx)("input",{className:(0,a.cn)("w-full touch-none select-none rounded-lg",(()=>{switch(m){case"player":return y?"player-range-slider":"mobile-range-slider";case"volume":return"volume-range-slider";case"sessionGlobalVolume":return"session-global-volume-range-slider";
2case"minimal":return"minimal-range-slider";default:return y?"range-slider":"mobile-range-slider"}})(),d),type:"range",ref:e,value:g(),min:l,max:c,step:u,onChange:e=>{v.current||(b(e.currentTarget,e.currentTarget.value),s())}})}],110014)},696893,e=>{"use strict";var t=e.i(848277),r=e.i(480380),n=e.i(677546),i=e.i(171205),a=e.i(170280),s=e.i(784103);e.s(["default",0,({track:e,trackContext:o=[e],playlistId:l,size:c=36,variant:u="default",className:d="",onClick:f,iconFill:p="black"})=>{let{activeTrack:m,isPlaying:h,showLoading:g,playTrackOrPause:y}=(0,a.useAudioPlayer)();return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"duration-200 ease-in-out hover:scale-110",children:m?.id===e.id&&g?(0,t.jsx)(i.Button,{"aria-label":"Loading",className:(0,s.cn)("rounded-full p-2",d),onClick:()=>f?f():y(e,o,l)(),variant:u,size:"custom",children:(0,t.jsx)(r.Loader2,{size:c,className:"animate-spin"})}):h&&m?.id===e.id?(0,t.jsx)(i.Button,{"aria-label":"Pause",className:(0,s.cn)("rounded-full p-2",d),onClick:()=>f?f():y(e,o,l)(),variant:u,size:"custom",children:(0,t.jsx)(n.BiPause,{size:c,fill:p})}):(0,t.jsx)(i.Button,{"aria-label":"Play",className:(0,s.cn)("rounded-full p-2",d),onClick:()=>f?f():y(e,o,l)(),variant:u,size:"custom",children:(0,t.jsx)(n.BiPlay,{size:c,className:"translate-x-[2px]",fill:p})})})})}])},351299,e=>{"use strict";let t=(0,e.i(235884).default)("Expand",[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]);e.s(["default",0,t])},515131,e=>{"use strict";var t=e.i(351299);e.s(["Expand",()=>t.default])},316097,e=>{"use strict";let t=(0,e.i(235884).default)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",0,t])},974114,e=>{"use strict";var t=e.i(316097);e.s(["ExternalLink",()=>t.default])},987259,416049,e=>{"use strict";var t=e.i(848277),r=e.i(334606),n=e.i(330668),i=e.i(171205),a=e.i(203528);e.s(["default",0,({track:e,onClick:s})=>{let{openTrackActionsDrawer:o}=(0,a.useTrackActions)(),l=(0,n.useRef)(null);return(0,t.jsx)(t.Fragment,{children:e&&(0,t.jsx)(i.Button,{ref:l,title:`Open track actions for ${e.title}`,variant:"ghost-mobile",onClick:()=>{s?.(),o(e,l)},children:(0,t.jsx)(r.MoreHorizontal,{})})})}],987259);var s=e.i(515131);e.s(["default",0,({track:e,onClick:r})=>{let{viewLyrics:i}=(0,a.useTrackActions)(),o=(0,n.useRef)(null);return(0,t.jsxs)("div",{ref:o,onClick:()=>{r?.(),i(e,o)},className:"border-white/opacity-10 relative h-[186px] overflow-hidden rounded-lg border bg-stone-950 p-4 md:h-auto md:border-none md:bg-none md:p-0",children:[(0,t.jsx)("div",{className:"absolute left-0 top-0 size-full rounded-lg bg-gradient-to-b from-transparent to-stone-950/70 md:bg-none"}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("h1",{className:"mb-4 text-lg font-bold lg:text-xl",children:"Lyrics"}),(0,t.jsx)(s.Expand,{className:"md:hidden"})]}),(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-base text-brand-gray-light lg:text-lg",children:e.lyrics?.replace(". ","\n").replace(/(\s*\n\s*){3,}/g,"\n \n")})]})}],416049)},952443,553699,e=>{"use strict";let t=(0,e.i(235884).default)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["default",0,t],553699),e.s(["ArrowRight",0,t],952443)},580496,e=>{"use strict";let t=(0,e.i(235884).default)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);e.s(["default",0,t])},304618,e=>{"use strict";let t=(0,e.i(235884).default)("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);e.s(["default",0,t])},719874,e=>{"use strict";let t=(0,e.i(235884).default)("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);e.s(["default",0,t])},134201,e=>{"use strict";let t=(0,e.i(235884).default)("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);e.s(["default",0,t])},530791,213433,e=>{"use strict";let t=(0,e.i(235884).default)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);e.s(["default",0,t],213433),e.s(["RefreshCcw",0,t],530791)},533189,871359,e=>{"use strict";let t=(0,e.i(235884).default)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t],871359),e.s(["ArrowLeft",0,t],533189)},786285,e=>{"use strict";var t=e.i(848277),r=e.i(330668);function n(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function i(e,t){let r=Object.keys(e),a=Object.keys(t);return r.length===a.length&&JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{let a=e[r],s=t[r];return"function"==typeof a?`${a}`==`${s}`:n(a)&&n(s)?i(a,s):a===s})}function a(e){return e.concat().sort((e,t)=>
2e.name>t.name?1:-1).map(e=>e.options)}function s(e){return"number"==typeof e}function o(e){return"string"==typeof e}function l(e){return"boolean"==typeof e}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}function u(e){return Math.abs(e)}function d(e){return Math.sign(e)}function f(e){return g(e).map(Number)}function p(e){return e[m(e)]}function m(e){return Math.max(0,e.length-1)}function h(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function g(e){return Object.keys(e)}function y(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function v(){let e=[],t={add:function(r,n,i,a={passive:!0}){let s;return"addEventListener"in r?(r.addEventListener(n,i,a),s=()=>r.removeEventListener(n,i,a)):(r.addListener(i),s=()=>r.removeListener(i)),e.push(s),t},clear:function(){e=e.filter(e=>e())}};return t}function x(e=0,t=0){let r=u(e-t);function n(r){return r<e||r>t}return{length:r,max:t,min:e,constrain:function(r){return n(r)?r<e?e:t:r},reachedAny:n,reachedMax:function(e){return e>t},reachedMin:function(t){return t<e},removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function b(e){let t=e;function r(e){return s(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function w(e,t){let r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style,i=null,a=!1;return{clear:function(){!a&&(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(a)return;let s=Math.round(100*e.direction(t))/100;s!==i&&(n.transform=r(s),i=s)},toggleActive:function(e){a=!e}}}let k={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function S(e,t,r){let n,i,a,C,j,N,P,T,E=e.ownerDocument,O=E.defaultView,I=function(e){function t(e,t){return function e(t,r){return[t,r].reduce((t,r)=>(g(r).forEach(n=>{let i=t[n],a=r[n],s=c(i)&&c(a);t[n]=s?e(i,a):a}),t),{})}(e,t||{})}return{mergeOptions:t,optionsAtMedia:function(r){let n=r.breakpoints||{},i=g(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,i)},optionsMediaQueries:function(t){return t.map(e=>g(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}}}(O),A=(T=[],{init:function(e,t){return(T=t.filter(({options:e})=>!1!==I.optionsAtMedia(e).active)).forEach(t=>t.init(e,I)),t.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){T=T.filter(e=>e.destroy())}}),M=v(),L=(i={},a={init:function(e){n=e},emit:function(e){return(i[e]||[]).forEach(t=>t(n,e)),a},off:function(e,t){return i[e]=(i[e]||[]).filter(e=>e!==t),a},on:function(e,t){return i[e]=(i[e]||[]).concat([t]),a},clear:function(){i={}}}),{mergeOptions:D,optionsAtMedia:R,optionsMediaQueries:F}=I,{on:_,off:z,emit:U}=L,B=!1,V=D(k,S.globalOptions),q=D(V),K=[];function $(t,r){B||(q=R(V=D(V,t)),K=r||K,function(){let{container:t,slides:r}=q;N=(o(t)?e.querySelector(t):t)||e.children[0];let n=o(r)?N.querySelectorAll(r):r;P=[].slice.call(n||N.children)}(),C=function t(r){let n=function(e,t,r,n,i,a,c){var k,S;let C,j,N,P,T,E,O,I,A,M,L,D,R,F,{align:_,axis:z,direction:U,startIndex:B,loop:V,duration:q,dragFree:K,dragThreshold:$,inViewThreshold:H,slidesToScroll:Q,skipSnaps:W,containScroll:G,watchResize:X,watchSlides:J,watchDrag:Z,watchFocus:Y}=a,ee={measure:function(e){let{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:i}=e;return{top:t,right:r+n,bottom:t+i,left:r,width:n,height:i}}},et=ee.measure(t),er=r.map(ee.measure),en=(j="rtl"===U,P=(N="y"===z)||!j?1:-1,T=N?"top":j?"right":"left",E=N?"bottom":j?"left":"right",{scroll:N?"y":"x",cross:N?"x":"y",startEdge:T,endEdge:E,measureSize:function(e){let{height:t,width:r}=e;return N?t:r},direction:function(e){return e*P}}
2),ei=en.measureSize(et),ea={measure:function(e){return e/100*ei}},es=(k=_,S=ei,C={start:function(){return 0},center:function(e){return(S-e)/2},end:function(e){return S-e}},{measure:function(e,t){return o(k)?C[k](e):k(S,e,t)}}),eo=!V&&!!G,{slideSizes:el,slideSizesWithGaps:ec,startGap:eu,endGap:ed}=function(e,t,r,n,i,a){let{measureSize:s,startEdge:o,endEdge:l}=e,c=r[0]&&i,d=function(){if(!c)return 0;let e=r[0];return u(t[o]-e[o])}(),f=c?parseFloat(a.getComputedStyle(p(n)).getPropertyValue(`margin-${l}`)):0,h=r.map(s),g=r.map((e,t,r)=>{let n=t===m(r);return t?n?h[t]+f:r[t+1][o]-e[o]:h[t]+d}).map(u);return{slideSizes:h,slideSizesWithGaps:g,startGap:d,endGap:f}}(en,et,er,r,V||!!G,i),ef=function(e,t,r,n,i,a,o,l){let{startEdge:c,endEdge:d,direction:h}=e,g=s(r);return{groupSlides:function(e){return g?f(e).filter(e=>e%r==0).map(t=>e.slice(t,t+r)):e.length?f(e).reduce((r,s,f)=>{let g=p(r)||0,y=s===m(e),v=i[c]-a[g][c],x=i[c]-a[s][d],b=n||0!==g?0:h(o),w=u(x-(!n&&y?h(l):0)-(v+b));return f&&w>t+2&&r.push(s),y&&r.push(e.length),r},[]).map((t,r,n)=>{let i=Math.max(n[r-1]||0);return e.slice(i,t)}):[]}}}(en,ei,Q,V,et,er,eu,ed),{snaps:ep,snapsAligned:em}=function(e,t,r,n,i){let{startEdge:a,endEdge:s}=e,{groupSlides:o}=i,l=o(n).map(e=>p(e)[s]-e[0][a]).map(u).map(t.measure),c=n.map(e=>r[a]-e[a]).map(e=>-u(e)),d=o(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(en,es,et,er,ef),eh=-p(ep)+p(ec),{snapsContained:eg,scrollContainLimit:ey}=function(e,t,r,n){let i,a,s=x(-t+e,0),o=r.map((e,t)=>{let{min:n,max:i}=s,a=s.constrain(e),o=t===m(r);return t?o||function(e,t){return 1>=u(e-t)}(n,a)?n:function(e,t){return 1>=u(e-t)}(i,a)?i:a:i}).map(e=>parseFloat(e.toFixed(3))),l=(i=o[0],a=p(o),x(o.lastIndexOf(i),o.indexOf(a)+1));return{snapsContained:function(){if(t<=e+2)return[s.max];if("keepSnaps"===n)return o;let{min:r,max:i}=l;return o.slice(r,i)}(),scrollContainLimit:l}}(ei,eh,em,G),ev=eo?eg:em,{limit:ex}=(O=ev[0],{limit:x(V?O-eh:p(ev),O)}),eb=function e(t,r,n){let{constrain:i}=x(0,t),a=t+1,s=o(r);function o(e){return n?u((a+e)%a):i(e)}function l(){return e(t,s,n)}let c={get:function(){return s},set:function(e){return s=o(e),c},add:function(e){return l().set(s+e)},clone:l};return c}(m(ev),B,V),ew=eb.clone(),ek=f(r),eS=function(e,t,r,n){let i=v(),a=1e3/60,s=null,o=0,l=0;function c(e){if(!l)return;s||(s=e,r(),r());let i=e-s;for(s=e,o+=i;o>=a;)r(),o-=a;n(o/a),l&&(l=t.requestAnimationFrame(c))}function u(){t.cancelAnimationFrame(l),s=null,o=0,l=0}return{init:function(){i.add(e,"visibilitychange",()=>{e.hidden&&(s=null,o=0)})},destroy:function(){u(),i.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:u,update:r,render:n}}(n,i,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(eF),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:i,scrollLooper:a,slideLooper:s,dragHandler:o,animation:l,eventHandler:c,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!o.pointerDown();g&&l.stop();let y=r.get()*f+i.get()*(1-f);n.set(y),d&&(a.loop(e.direction()),s.loop()),t.to(n.get()),g&&c.emit("settle"),h||c.emit("scroll")})(eF,e)),eC=ev[eb.get()],ej=b(eC),eN=b(eC),eP=b(eC),eT=b(eC),eE=function(e,t,r,n,i){let a=0,s=0,o=i,l=.68,c=e.get(),f=0;function p(e){return o=e,h}function m(e){return l=e,h}let h={direction:function(){return s},duration:function(){return o},velocity:function(){return a},seek:function(){let t=n.get()-e.get(),i=0;return o?(r.set(e),a+=t/o,a*=l,c+=a,e.add(a),i=c-f):(a=0,r.set(n),e.set(n),i=t),s=d(i),f=c,h},settled:function(){return .001>u(n.get()-t.get())},useBaseFriction:function(){return m(.68)},useBaseDuration:function(){return p(i)},useFriction:m,useDuration:p};return h}(ej,eP,eN,eT,q),eO=function(e,t,r,n,i){let{reachedAny:a,removeOffset:s,constrain:o}=n;function l(e){return e.concat().sort((e,t)=>u(e)-u(t))[0]}function c(t,n){let i=[t,t+r,t-r];if(!e)return t;if(!n)return l(i);let a=i.filter(e=>d(e)===n);return a.length?l(a):p(i)-r}return{byDistance:function(r,n){let l=i.get()+r,{index:d,distance:f}=function(r){let n=e?s(r):o(r),{index:i}=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>
2u(e.diff)-u(t.diff))[0];return{index:i,distance:n}}(l),p=!e&&a(l);if(!n||p)return{index:d,distance:r};let m=r+c(t[d]-f,0);return{index:d,distance:m}},byIndex:function(e,r){let n=c(t[e]-i.get(),r);return{index:e,distance:n}},shortcut:c}}(V,ev,eh,ex,eT),eI=function(e,t,r,n,i,a,s){function o(i){let o=i.distance,l=i.index!==t.get();a.add(o),o&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(i.index),s.emit("select"))}return{distance:function(e,t){o(i.byDistance(e,t))},index:function(e,r){let n=t.clone().set(e);o(i.byIndex(n.get(),r))}}}(eS,eb,ew,eE,eO,eT,c),eA=function(e){let{max:t,length:r}=e;return{get:function(e){return r?-((e-t)/r):0}}}(ex),eM=v(),eL=(A={},M=null,L=null,D=!1,{init:function(){I=new IntersectionObserver(e=>{D||(e.forEach(e=>{A[r.indexOf(e.target)]=e}),M=null,L=null,c.emit("slidesInView"))},{root:t.parentElement,threshold:H}),r.forEach(e=>I.observe(e))},destroy:function(){I&&I.disconnect(),D=!0},get:function(e=!0){if(e&&M)return M;if(!e&&L)return L;let t=g(A).reduce((t,r)=>{let n=parseInt(r),{isIntersecting:i}=A[n];return(e&&i||!e&&!i)&&t.push(n),t},[]);return e&&(M=t),e||(L=t),t}}),{slideRegistry:eD}=function(e,t,r,n,i,a){let s,{groupSlides:o}=i,{min:l,max:c}=n;return{slideRegistry:(s=o(a),1===r.length?[a]:e&&"keepSnaps"!==t?s.slice(l,c).map((e,t,r)=>{let n=t===m(r);return t?n?h(m(a)-p(r)[0]+1,p(r)[0]):e:h(p(r[0])+1)}):s)}}(eo,G,ev,ey,ef,ek),eR=function(e,t,r,n,i,a,o,c){let u={passive:!0,capture:!0},d=0;function f(e){"Tab"===e.code&&(d=new Date().getTime())}return{init:function(p){c&&(a.add(document,"keydown",f,!1),t.forEach((t,f)=>{a.add(t,"focus",t=>{(l(c)||c(p,t))&&function(t){if(new Date().getTime()-d>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;let a=r.findIndex(e=>e.includes(t));s(a)&&(i.useDuration(0),n.index(a,0),o.emit("slideFocus"))}(f)},u)}))}}}(e,r,eD,eI,eE,eM,c,Y),eF={ownerDocument:n,ownerWindow:i,eventHandler:c,containerRect:et,slideRects:er,animation:eS,axis:en,dragHandler:function(e,t,r,n,i,a,s,o,c,f,p,m,h,g,b,w,k,S){let{cross:C,direction:j}=e,N=["INPUT","SELECT","TEXTAREA"],P={passive:!1},T=v(),E=v(),O=x(50,225).constrain(g.measure(20)),I={mouse:300,touch:400},A={mouse:500,touch:600},M=b?43:25,L=!1,D=0,R=0,F=!1,_=!1,z=!1,U=!1;function B(e){if(!y(e,n)&&e.touches.length>=2)return V(e);let t=a.readPoint(e),r=a.readPoint(e,C),s=u(t-D),l=u(r-R);if(!_&&!U&&(!e.cancelable||!(_=s>l)))return V(e);let c=a.pointerMove(e);s>w&&(z=!0),f.useFriction(.3).useDuration(.75),o.start(),i.add(j(c)),e.preventDefault()}function V(e){var t;let r,n,i=p.byDistance(0,!1).index!==m.get(),s=a.pointerUp(e)*(b?A:I)[U?"mouse":"touch"],o=(t=j(s),r=m.add(-1*d(t)),n=p.byDistance(t,!b).distance,b||u(t)<O?n:k&&i?.5*n:p.byIndex(r.get(),0).distance),l=function(e,t){var r,n;if(0===e||0===t||u(e)<=u(t))return 0;let i=(r=u(e),n=u(t),u(r-n));return u(i/e)}(s,o);_=!1,F=!1,E.clear(),f.useDuration(M-10*l).useFriction(.68+l/50),c.distance(o,!b),U=!1,h.emit("pointerUp")}function q(e){z&&(e.stopPropagation(),e.preventDefault(),z=!1)}return{init:function(e){S&&T.add(t,"dragstart",e=>e.preventDefault(),P).add(t,"touchmove",()=>void 0,P).add(t,"touchend",()=>void 0).add(t,"touchstart",o).add(t,"mousedown",o).add(t,"touchcancel",V).add(t,"contextmenu",V).add(t,"click",q,!0);function o(o){(l(S)||S(e,o))&&function(e){let o,l=y(e,n);if((U=l,z=b&&l&&!e.buttons&&L,L=u(i.get()-s.get())>=2,!l||0===e.button)&&(o=e.target.nodeName||"",!N.includes(o))){let n;F=!0,a.pointerDown(e),f.useFriction(0).useDuration(0),i.set(s),n=U?r:t,E.add(n,"touchmove",B,P).add(n,"touchend",V).add(n,"mousemove",B,P).add(n,"mouseup",V),D=a.readPoint(e),R=a.readPoint(e,C),h.emit("pointerDown")}}(o)}},destroy:function(){T.clear(),E.clear()},pointerDown:function(){return F}}}(en,e,n,i,eT,function(e,t){let r,n;function i(e){return e.timeStamp}function a(r,n){let i=n||e.scroll,a=`client${"x"===i?"X":"Y"}`;return(y(r,t)?r:r.touches[0])[a]}return{pointerDown:function(e){return r=e,n=e,a(e)},pointerMove:function(e){let t=a(e)-a(n),s=i(e)-i(r)>170;return n=e,s&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;let t=a(n)-a(r),s=i(e)-i(r),o=i(e)-i(n)>170,l=t/s;return s&&!o&&u(l)>.1?l:0},readPoint:a}}(en,i),ej,eS,eI,eE,eO,eb,c,ea,K,$,W,Z),eventStore:eM,percentOfView:ea,index:eb,indexPrevious:ew,limit:ex,location:ej,offsetLocation:eP,previousLocation:eN,options:a,resizeHandler:function(e,t,r,n,i,a,s){let o,c,d=[e].concat(n),f=[],p=!1;function m(e){return i.measureSize(s.measure(e))}return{init:function(i){a&&(c=m(e),f=n.map(m),o=new ResizeObserver(r=>{(l(a)||a(i,r))&&function(r){for(let a of r){if(p)return;let r=a.target===e,s=n.indexOf(a.target),o=r?c:f[s];if(u(m(r?e:n[s])-o)>=.5){i.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>
2{d.forEach(e=>o.observe(e))}))},destroy:function(){p=!0,o&&o.disconnect()}}}(t,c,i,r,en,X,ee),scrollBody:eE,scrollBounds:function(e,t,r,n,i){let a=i.measure(10),s=i.measure(50),o=x(.1,.99),l=!1;function c(){return!l&&!!e.reachedAny(r.get())&&!!e.reachedAny(t.get())}return{shouldConstrain:c,constrain:function(i){if(!c())return;let l=e.reachedMin(t.get())?"min":"max",d=u(e[l]-t.get()),f=r.get()-t.get(),p=o.constrain(d/s);r.subtract(f*p),!i&&u(f)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}(ex,eP,eT,eE,ea),scrollLooper:function(e,t,r,n){let{reachedMin:i,reachedMax:a}=x(t.min+.1,t.max+.1);return{loop:function(t){if(!(1===t?a(r.get()):-1===t&&i(r.get())))return;let s=-1*t*e;n.forEach(e=>e.add(s))}}}(eh,ex,eP,[ej,eP,eN,eT]),scrollProgress:eA,scrollSnapList:ev.map(eA.get),scrollSnaps:ev,scrollTarget:eO,scrollTo:eI,slideLooper:function(e,t,r,n,i,a,s,o,l){let c=f(i),u=f(i).reverse(),d=h(m(u,s[0]),r,!1).concat(h(m(c,t-s[0]-1),-r,!0));function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,r)=>p(e,t)>0?e.concat([r]):e,[])}function h(i,s,c){let u=a.map((e,r)=>({start:e-n[r]+.5+s,end:e+t-.5+s}));return i.map(t=>{let n=c?0:-r,i=c?r:0,a=u[t][c?"end":"start"];return{index:t,loopPoint:a,slideLocation:b(-1),translate:w(e,l[t]),target:()=>o.get()>a?n:i}})}return{canLoop:function(){return d.every(({index:e})=>.1>=p(c.filter(t=>t!==e),t))},clear:function(){d.forEach(e=>e.translate.clear())},loop:function(){d.forEach(e=>{let{target:t,translate:r,slideLocation:n}=e,i=t();i!==n.get()&&(r.to(i),n.set(i))})},loopPoints:d}}(en,ei,eh,el,ec,ep,ev,eP,r),slideFocus:eR,slidesHandler:(F=!1,{init:function(e){J&&(R=new MutationObserver(t=>{!F&&(l(J)||J(e,t))&&function(t){for(let r of t)if("childList"===r.type){e.reInit(),c.emit("slidesChanged");break}}(t)})).observe(t,{childList:!0})},destroy:function(){R&&R.disconnect(),F=!0}}),slidesInView:eL,slideIndexes:ek,slideRegistry:eD,slidesToScroll:ef,target:eT,translate:w(en,t)};return eF}(e,N,P,E,O,r,L);return r.loop&&!n.slideLooper.canLoop()?t(Object.assign({},r,{loop:!1})):n}(q),F([V,...K.map(({options:e})=>e)]).forEach(e=>M.add(e,"change",H)),q.active&&(C.translate.to(C.location.get()),C.animation.init(),C.slidesInView.init(),C.slideFocus.init(X),C.eventHandler.init(X),C.resizeHandler.init(X),C.slidesHandler.init(X),C.options.loop&&C.slideLooper.loop(),N.offsetParent&&P.length&&C.dragHandler.init(X),j=A.init(X,K)))}function H(e,t){let r=G();Q(),$(D({startIndex:r},e),t),L.emit("reInit")}function Q(){C.dragHandler.destroy(),C.eventStore.clear(),C.translate.clear(),C.slideLooper.clear(),C.resizeHandler.destroy(),C.slidesHandler.destroy(),C.slidesInView.destroy(),C.animation.destroy(),A.destroy(),M.clear()}function W(e,t,r){q.active&&!B&&(C.scrollBody.useBaseFriction().useDuration(!0===t?0:q.duration),C.scrollTo.index(e,r||0))}function G(){return C.index.get()}let X={canScrollNext:function(){return C.index.add(1).get()!==G()},canScrollPrev:function(){return C.index.add(-1).get()!==G()},containerNode:function(){return N},internalEngine:function(){return C},destroy:function(){B||(B=!0,M.clear(),Q(),L.emit("destroy"),L.clear())},off:z,on:_,emit:U,plugins:function(){return j},previousScrollSnap:function(){return C.indexPrevious.get()},reInit:H,rootNode:function(){return e},scrollNext:function(e){W(C.index.add(1).get(),e,-1)},scrollPrev:function(e){W(C.index.add(-1).get(),e,1)},scrollProgress:function(){return C.scrollProgress.get(C.offsetLocation.get())},scrollSnapList:function(){return C.scrollSnapList},scrollTo:W,selectedScrollSnap:G,slideNodes:function(){return P},slidesInView:function(){return C.slidesInView.get()},slidesNotInView:function(){return C.slidesInView.get(!1)}};return $(t,r),setTimeout(()=>L.emit("init"),0),X}function C(e={},t=[]){let n=(0,r.useRef)(e),s=(0,r.useRef)(t),[o,l]=(0,r.useState)(),[c,u]=(0,r.useState)(),d=(0,r.useCallback)(()=>{o&&o.reInit(n.current,s.current)},[o]);return(0,r.useEffect)(()=>{i(n.current,e)||(n.current=e,d())},[e,d]),(0,r.useEffect)(()=>{!function(e,t){if(e.length!==t.length)return!1;let r=a(e),n=a(t);return r.every((e,t)=>i(e,n[t]))}(s.current,t)&&(s.current=t,d())},[t,d]),(0,r.useEffect)(()=>
2{if("u">typeof window&&window.document&&window.document.createElement&&c){S.globalOptions=C.globalOptions;let e=S(c,n.current,s.current);return l(e),()=>e.destroy()}l(void 0)},[c,l]),[u,o]}S.globalOptions=void 0,C.globalOptions=void 0;var j=e.i(533189),N=e.i(952443),P=e.i(171205),T=e.i(784103);let E=r.createContext(null);function O(){let e=r.useContext(E);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let I=r.forwardRef(({orientation:e="horizontal",opts:n,setApi:i,plugins:a,className:s,children:o,...l},c)=>{let[u,d]=C({...n,axis:"horizontal"===e?"x":"y"},a),[f,p]=r.useState(!1),[m,h]=r.useState(!1),g=r.useCallback(e=>{e&&(p(e.canScrollPrev()),h(e.canScrollNext()))},[]),y=r.useCallback(()=>{d?.scrollPrev()},[d]),v=r.useCallback(()=>{d?.scrollNext()},[d]),x=r.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),y()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[y,v]);return r.useEffect(()=>{d&&i&&i(d)},[d,i]),r.useEffect(()=>{if(d)return g(d),d.on("reInit",g),d.on("select",g),()=>{d.off("select",g)}},[d,g]),(0,t.jsx)(E.Provider,{value:{carouselRef:u,api:d,opts:n,orientation:e,scrollPrev:y,scrollNext:v,canScrollPrev:f,canScrollNext:m},children:(0,t.jsx)("div",{ref:c,onKeyDownCapture:x,className:(0,T.cn)("relative",s),role:"region","aria-roledescription":"carousel",...l,children:o})})});I.displayName="Carousel";let A=r.forwardRef(({className:e,...r},n)=>{let{carouselRef:i,orientation:a}=O();return(0,t.jsx)("div",{ref:i,className:"overflow-hidden",children:(0,t.jsx)("div",{ref:n,className:(0,T.cn)("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",e),...r})})});A.displayName="CarouselContent";let M=r.forwardRef(({className:e,...r},n)=>{let{orientation:i}=O();return(0,t.jsx)("div",{ref:n,role:"group","aria-roledescription":"slide",className:(0,T.cn)("min-w-0 shrink-0 grow-0 basis-full pr-2","horizontal"===i?"pl-4":"pt-4",e),...r})});M.displayName="CarouselItem";let L=r.forwardRef(({className:e,variant:r="outline",size:n="icon",...i},a)=>{let{orientation:s,scrollPrev:o,canScrollPrev:l}=O();return(0,t.jsxs)(P.Button,{ref:a,variant:r,size:n,className:(0,T.cn)("absolute h-10 w-10 rounded-full","horizontal"===s?"right-0 top-0 flex -translate-x-[3rem] -translate-y-8":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l?"opacity-100":"hidden",e),disabled:!l,onClick:o,...i,children:[(0,t.jsx)(j.ArrowLeft,{className:"size-6"}),(0,t.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});L.displayName="CarouselPrevious";let D=r.forwardRef(({className:e,variant:r="outline",size:n="icon",...i},a)=>{let{orientation:s,scrollNext:o,canScrollNext:l}=O();return(0,t.jsxs)(P.Button,{ref:a,variant:r,size:n,className:(0,T.cn)("absolute h-10 w-10 rounded-full","horizontal"===s?"right-0 top-0 flex -translate-y-8":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l?"opacity-100":"hidden",e),disabled:!l,onClick:o,...i,children:[(0,t.jsx)(N.ArrowRight,{className:"size-6"}),(0,t.jsx)("span",{className:"sr-only",children:"Next slide"})]})});D.displayName="CarouselNext",e.s(["Carousel",0,I,"CarouselContent",0,A,"CarouselItem",0,M,"CarouselNext",0,D,"CarouselPrevious",0,L,"useCarousel",0,O],786285)},396520,e=>{"use strict";var t=e.i(848277),r=e.i(302202),n=e.i(618071),i=e.i(330668),a=e.i(269184),s=e.i(784103);let o=i.forwardRef(({className:e,trackingEvent:n,getTrackingData:o,onValueChange:l,...c},u)=>{let d=(0,i.useRef)(!1);return(0,t.jsx)(r.Root,{className:(0,s.cn)("grid gap-2",e),...c,ref:u,onPointerDown:()=>d.current=!0,onPointerUp:()=>{setTimeout(()=>{d.current=!1},1e3)},onValueChange:e=>{n&&d.current&&e!==c.value&&(0,a.trackEvent)(n,o?.(e)??{value:e}),l?.(e)}})});o.displayName=r.Root.displayName;let l=i.forwardRef(({className:e,...i},a)=>(0,t.jsx)(r.Item,{ref:a,className:(0,s.cn)("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...i,children:(0,t.jsx)(r.Indicator,{className:"flex items-center justify-center",children:(0,t.jsx)(n.Circle,{className:"size-2.5 fill-current text-current"})})}));l.displayName=r.Item.displayName,e.s(["RadioGroup",0,o,"RadioGroupItem",0,l])},282746,(e,t,r)=>{t.exports=["WebView","(iPhone|iPod|iPad)(?!.*Safari)","Android.*(;\\s+wv|Version/\\d.\\d\\s+Chrome/\\d+(\\.0){3})","Linux; U; Android"]},208713,(e,t,r)=>{var n=RegExp("("+e.r(282746).join("|")+")","ig");t.exports=function(e){return!!e.match(n)}},284036,e=>{"use strict";var t=e.i(848277),r=e.i(799649),n=e.i(196234),i=e.i(784103),a=e.i(816506);let s=()=>(0,t.jsxs)("div",{className:"absolute bottom-3 px-5 text-center text-xs text-white md:px-2 lg:px-8",children:["By continuing, you acknowledge that you (i) agree to the"," ",(0,t.jsx)(a.default,{href:"/terms-of-service",className:"underline",children:"Terms of Service"})," ","and (ii) have read and understood our"," ",(0,t.jsx)(a.default,{href:"/privacy-policy",className:"underline",children:"Privacy Policy"}),"."]});var o=e.i(588455),l=e.i(208713),c=e.i(442588),u=e.i(54976),d=e.i(171205),f=e.i(831239);let p=({buttonLabel:e,copyText:r,className:n})=>{let a=(0,f.useClipboard)();return(0,t.jsx)(d.Button,{className:(0,i.cn)(a.copied?"bg-green-300 hover:bg-green-400 ":"bg-gray-200 hover:bg-green-500","text-black",n),variant:"outline",onClick:()=>a.copy(r),children:a.copied?"Copied":e})};var m=e.i(792897),h=e.i(957602),g=e.i(825238),y=e.i(269184);e.i(639057);var v=e.i(6289),x=e.i(330668),b=e.i(972671),w=e.i(64222),k=e.i(519182);let S=b.z.string().email("Invalid email address"),C=({redirect:e,lastUsedMethod:r,enableCaptcha:a=!0})=>{let s=(0,g.supabaseClientComponentClient)(),o=(0,x.useRef)(null),[l,c]=(0,x.useState)(!1),[f,p]=(0,x.useState)(""),[m,C]=(0,x.useState)(!1),[j,N]=(0,x.useState)(!1),P=(0,h.useAuthModal)(e=>e.setAwaitingEmail),T=(0,i.constructUrl)(`/login/confirm?redirect=${encodeURIComponent((0,i.constructUrl)(e))}`),E=async e=>{let t;e.preventDefault(),c(!0);try{S.parse(f)}catch(e){if(e instanceof b.z.ZodError){u.toast.error(e.issues[0].message,{...n.DEFAULT_TOAST_OPTIONS}),c(!1);return}}try{let e=await w.apiInstance.post("/api/auth/validate-email",{email:f});if(e.data.verdict?.toLowerCase()==="invalid"){u.toast.error(e.data.error??"Please use a valid email address.",{...n.DEFAULT_TOAST_OPTIONS}),c(!1);return}}catch(e){if(e.response?.status===422){let t=e.response.data;if("string"==typeof t.verdict&&"invalid"===t.verdict.toLowerCase()){u.toast.error(t.error??"Please use a valid email address.",{...n.DEFAULT_TOAST_OPTIONS}),c(!1);return}}else{console.error("Email validation error",e),u.toast.error("Email validation failed. Please try again.",{...n.DEFAULT_TOAST_OPTIONS}),c(!1);return}}if(a)try{let e=await o.current?.execute({async:!0});t=e?.response}catch(e){console.error("Captcha error",e),u.toast.error("Captcha verification failed. Please try again.",{...n.DEFAULT_TOAST_OPTIONS}),c(!1);return}let r=await s.auth.signInWithOtp({email:f,options:{emailRedirectTo:T,shouldCreateUser:!0,captchaToken:t}});o.current?.resetCaptcha();let{error:i}=r;i?u.toast.error(i.message,{...n.DEFAULT_TOAST_OPTIONS}):(localStorage.setItem("lastLoginMethod","Email"),localStorage.setItem("lastLoginDate",new Date().toISOString()),u.toast.success("Sign in via the link sent to your email.",{...n.DEFAULT_TOAST_OPTIONS,duration:5e3}),P(!0)),C(!0),(0,y.trackEvent)("Sign In",{type:"MagicLink"}),setTimeout(()=>{c(!1),C(!1),N(!0)},5e3)};return(0,t.jsxs)("form",{onSubmit:E,children:[(0,t.jsx)(v.default,{ref:o,sitekey:"2945592b-1928-43a9-8473-7e7fed3d752e",size:"invisible",theme:"dark"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(k.Input,{type:"email",placeholder:"Enter your email","aria-label":"Email address",value:f,onChange:e=>p(e.target.value),className:(0,i.cn)("Email"===r&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black")}),(0,t.jsx)(d.Button,{type:"submit",className:"w-full",disabled:l||m,children:m?"Email sent":l?"Sending...":j?"Re
2send email":"Continue with email"})]})]})};var j=e.i(581850),N=e.i(880391),P=e.i(844401),T=e.i(178789);let E=b.z.string().regex(/^\+[1-9]\d{1,14}$/,"Invalid phone number format."),O=x.default.forwardRef(({value:e,onChange:r,...n},i)=>(0,t.jsx)(k.Input,{...n,ref:i,value:(e=>{if(!e)return"";try{let t=(0,N.parsePhoneNumber)(e);if(t)return t.formatNational().trim()}catch(e){console.log("Error parsing phone number:",e)}return e})(e),onChange:t=>{let n=t.target.value;try{let t=(0,N.parsePhoneNumber)(e||""),i=t?.country;if(i&&n){let e=(0,N.parsePhoneNumber)(n,i);if(e)return void r(e.number)}}catch(e){console.log("Error reconstructing phone number:",e)}r(n)},maxLength:15,placeholder:"Enter phone number","aria-label":"Phone number",className:"ml-1 rounded-md px-3 py-2 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500"})),I=({redirect:e})=>{let r=(0,g.supabaseClientComponentClient)(),a=(0,x.useRef)(null),[s,o]=(0,x.useState)(!1),[l,c]=(0,x.useState)(""),[f,p]=(0,x.useState)(""),[m,h]=(0,x.useState)(!1),[S,C]=(0,x.useState)(30);(0,x.useEffect)(()=>{let e;return S>0&&(e=setInterval(()=>{C(e=>e-1)},1e3)),()=>{clearInterval(e)}},[S]);let I=async e=>{let t;if(e.preventDefault(),o(!0),C(30),!(0,N.isValidPhoneNumber)(l)){u.toast.error("Invalid phone number",{...n.DEFAULT_TOAST_OPTIONS}),o(!1);return}try{E.parse(l)}catch(e){if(e instanceof b.z.ZodError){u.toast.error(e.issues[0].message,{...n.DEFAULT_TOAST_OPTIONS}),o(!1);return}}try{let e=await a.current?.execute({async:!0});t=e?.response}catch(e){console.error("Captcha error",e),u.toast.error("Captcha verification failed. Please try again.",{...n.DEFAULT_TOAST_OPTIONS}),o(!1);return}let{error:i}=await r.auth.signInWithOtp({phone:l,options:{shouldCreateUser:!0,captchaToken:t}});a.current?.resetCaptcha(),i?u.toast.error(i.message,{...n.DEFAULT_TOAST_OPTIONS}):(localStorage.setItem("lastLoginMethod","Phone"),localStorage.setItem("lastLoginDate",new Date().toISOString()),u.toast.success("OTP sent to your phone number.",{...n.DEFAULT_TOAST_OPTIONS,duration:5e3}),h(!0),C(30),(0,y.trackEvent)("Sign In",{type:"Phone"})),o(!1)},A=async t=>{t.preventDefault(),o(!0);try{await w.udioApiInstance.verifyPhone(l,f),u.toast.success("Successfully signed in! Redirecting...",{...n.DEFAULT_TOAST_OPTIONS}),window.location.href=e??"/create"}catch(e){e instanceof T.AxiosError?u.toast.error(e.message,{...n.DEFAULT_TOAST_OPTIONS}):u.toast.error("Failed to verify OTP",{...n.DEFAULT_TOAST_OPTIONS}),o(!1)}};return(0,t.jsxs)("form",{onSubmit:m?A:I,children:[(0,t.jsx)(v.default,{ref:a,sitekey:"2945592b-1928-43a9-8473-7e7fed3d752e",size:"invisible",theme:"dark"}),(0,t.jsxs)("div",{className:"space-y-4",children:[m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-6 flex w-full justify-between",children:(0,t.jsx)(j.default,{value:f,onChange:p,numInputs:6,renderInput:(e,r)=>(0,t.jsx)(k.Input,{...e,inputMode:"numeric",pattern:"[0-9]*","aria-label":`Verification code digit ${r+1}`,className:"mx-0.5 h-10 min-w-0 flex-1 rounded-md border border-input bg-background text-center text-base sm:mx-1 sm:h-12 sm:text-lg"}),inputStyle:"w-20",containerStyle:"flex justify-between w-full",shouldAutoFocus:!0})}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)(d.Button,{type:"button",variant:"link",className:"text-sm text-muted-foreground",onClick:I,disabled:S>0,children:S>0?`Resend code in ${S}s`:"Resend verification code"})})]}):(0,t.jsx)("div",{className:(0,i.cn)("rounded-md bg-background"),children:(0,t.jsx)(N.default,{defaultCountry:"US",value:l,onChange:e=>{c(e??"")},disabled:m,className:"w-full",countryCallingCodeEditable:!1,focusInputOnCountrySelection:!1,inputComponent:O,countrySelectComponent:P.default})}),(0,t.jsx)(d.Button,{type:"submit",className:"w-full",disabled:s||m&&6!==f.length,children:m?s?"Verifying...":"Verify":s?"Sending...":"Continue with phone"})]})]})},A=({redirect:e,signUp:r,lastUsedMethod:a})=>{let s=(0,g.supabaseClientComponentClient)(),f=(0,h.useAuthModal)(e=>e.setAwaitingEmail),v=(0,i.constructUrl)(`/auth/callback?redirect=${encodeURIComponent(e)}`),x=r?"Sign up":"Sign in",b=(0,o.useFeatureIsOn)("magic-link-enabled"),w=(0,o.useFeatureIsOn)("phone-login-enabled"),k=async()=>
2{if((0,l.default)(window.navigator.userAgent)){u.toast.warning("Please open Udio in your native browser (Safari, Chrome, etc.) to sign in.\n\nGoogle does not support this browser.",{...n.DEFAULT_TOAST_OPTIONS,duration:2e4,action:(0,t.jsx)(p,{className:"ml-3",copyText:window.location.href,buttonLabel:"Copy Link"})}),(0,y.trackEvent)("Browser Block",{type:"Google"});return}await s.auth.signInWithOAuth({provider:"google",options:{redirectTo:v}}),localStorage.setItem("lastLoginMethod","Google"),localStorage.setItem("lastLoginDate",new Date().toISOString()),f(!1),(0,y.trackEvent)("Sign In",{type:"Google"})},S=async()=>{await s.auth.signInWithOAuth({provider:"discord",options:{redirectTo:v}}),localStorage.setItem("lastLoginMethod","Discord"),localStorage.setItem("lastLoginDate",new Date().toISOString()),f(!1),(0,y.trackEvent)("Sign In",{type:"Discord"})},j=async()=>{await s.auth.signInWithOAuth({provider:"apple",options:{redirectTo:v}}),localStorage.setItem("lastLoginMethod","Apple"),localStorage.setItem("lastLoginDate",new Date().toISOString()),f(!1),(0,y.trackEvent)("Sign In",{type:"Apple"})},N=async()=>{await s.auth.signInWithOAuth({provider:"twitter",options:{redirectTo:v}}),localStorage.setItem("lastLoginMethod","Twitter"),localStorage.setItem("lastLoginDate",new Date().toISOString()),f(!1),(0,y.trackEvent)("Sign In",{type:"Twitter"})};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-center text-muted-foreground",children:["Continue with ",a]}),(0,t.jsxs)("div",{className:"flex flex-row items-center space-x-4",children:[(0,t.jsx)(d.Button,{onClick:k,"aria-label":`${x} with Google`,className:(0,i.cn)("flex w-full justify-center","Google"===a&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black"),children:(0,t.jsx)(c.default,{src:"/logos/Google.svg",alt:"Google Logo",width:24,height:24})}),(0,t.jsx)(d.Button,{onClick:S,"aria-label":`${x} with Discord`,className:(0,i.cn)("flex w-full justify-center","Discord"===a&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black"),children:(0,t.jsx)(c.default,{src:"/logos/Discord.svg",alt:"Discord Logo",width:24,height:24})}),(0,t.jsx)(d.Button,{onClick:N,"aria-label":`${x} with Twitter`,className:(0,i.cn)("flex w-full justify-center","Twitter"===a&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black"),children:(0,t.jsx)(c.default,{src:"/logos/X.svg",alt:"Twitter Logo",width:24,height:24})}),(0,t.jsx)(d.Button,{onClick:j,"aria-label":`${x} with Apple`,className:(0,i.cn)("flex w-full justify-center","Apple"===a&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black"),children:(0,t.jsx)(c.default,{src:"/logos/Apple.svg",alt:"Apple Logo",width:24,height:24})})]}),(b||w)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"my-4 flex justify-center text-white",children:"- or -"}),w&&b?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(m.Tabs,{defaultValue:"email",className:"w-full sm:min-w-[350px]",children:[(0,t.jsxs)(m.TabsList,{className:(0,i.cn)("grid w-full grid-cols-2",("Phone"===a||"Email"===a)&&"ring-2 ring-brand-accent ring-offset-2 ring-offset-black"),children:[(0,t.jsx)(m.TabsTrigger,{value:"email",children:"Email"}),(0,t.jsx)(m.TabsTrigger,{value:"phone",children:"Phone"})]}),(0,t.jsx)(m.TabsContent,{value:"email",children:(0,t.jsx)(C,{redirect:e,lastUsedMethod:a})}),(0,t.jsx)(m.TabsContent,{value:"phone",children:(0,t.jsx)(I,{redirect:e})})]})}):(0,t.jsx)(C,{redirect:e,lastUsedMethod:a})]})]})},M=({method:e,date:n})=>{let i=new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return(0,t.jsxs)(r.Badge,{variant:"outline",className:"mb-4 bg-brand-accent/20 text-brand-accent",children:["Last seen: ",e," on ",i]})};e.s(["default",0,({redirect:e,signUp:r,className:a,innerClassName:o})=>{let l=localStorage.getItem("lastLoginMethod"),c=localStorage.getItem("lastLoginDate");return(0,t.jsxs)("div",{className:(0,i.cn)(["flex w-full flex-col items-center justify-center px-4 pb-10 pt-0 lg:px-20",a]),children:[(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsxs)("div",{className:(0,i.cn)(["mb-12 rounded-md p-2",o]),children:[(0,t.jsx)(A,{redirect:e??n.HOME_URL,signUp:r,lastUsedMethod:l}),(0,t.jsx)("div",{className:"m-auto mt-4 flex justify-center",children:l&&c&&(0,t.jsx)(M,{method:l,date:c})})]})}),(0,t.jsx)(s,{})]})}],284036)},841024,e=>{"use strict";var t=e.i(841385),r=e.i(240995);e.s(["convertPreferencesType",0,e=>{let n=e.generationSettings?.lyrics_type??(0,r.convertLyricsType)(e.generationSettings?.lyricsType??"infer");return{...t.preferencesDefaults,...e,generationSettings:{...t.preferencesDefaults.generationSettings,...e.generationSettings??{},lyrics_type:n,context_length:e.generationSettings?.context_length??e.generationSettings?.audio_conditioning_length_seconds}}}])},965581,e=>{"use strict";var t=e.i(330668);e.s(["useDebouncedState",0,function(e,r,n={leading:!1}){let[i,a]=(0,t.useState)(e),s=(0,t.useRef)(null),o=(0,t.useRef)(!0),l=()=>window.clearTimeout(s.current);return(0,t.useEffect)(()=>l,[]),[i,(0,t.useCallback)(e=>{l(),o.current&&n.leading?a(e):s.current=window.setTimeout(()=>{o.current=!0,a(e)},r),o.current=!1},[n.leading])]}])},172517,e=>{"use strict";let t=(0,e.i(235884).default)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);e.s(["default",0,t])},501415,e=>{"use strict";let t=(0,e.i(235884).default)("Disc3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]]);e.s(["default",0,t])},651925,e=>{"use strict";let t=(0,e.i(235884).default)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",0,t])},137509,e=>{"use strict";var t=e.i(242117),r=e.i(338722);e.s(["default",0,(e,{id:n,initialData:i,legacySongIdList:a,searchQuery:s,limit:o})=>(0,t.useInfiniteQuery)({enabled:!!n,queryKey:r.playlistKeys.tracks(n,s.searchTerm),queryFn:async({pageParam:t})=>{if(!n)return{data:[],cursor:t,nextCursor:void 0,prevCursor:void 0};let{response:r,legacySongs:l}=await e.getPlaylistSongsById(n,{legacySongIdList:a,searchQuery:s,pageParam:t,initialData:i,limit:o});return{data:[...l,...r.data],cursor:t,...o>0?{nextCursor:r.data.length>=o?t+o:void 0,prevCursor:t>0?Math.max(t-o,0):void 0}:{nextCursor:void 0,prevCursor:void 0}}},initialPageParam:0,getNextPageParam:e=>e.nextCursor,getPreviousPageParam:e=>e.prevCursor,...i&&{initialData:()=>({pages:[{data:i,cursor:0,nextCursor:void 0,prevCursor:void 0}],pageParams:[0]})},refetchOnWindowFocus:!1})])},289593,e=>{"use strict";var t=e.i(591489),r=e.i(338722);e.s(["default",0,(e,{id:n,initialData:i})=>(0,t.useQuery)({enabled:!!n,queryKey:r.playlistKeys.single(n),queryFn:async()=>
2{if(n)return await e.getPlaylistById(n)},initialData:()=>i,refetchOnWindowFocus:!1})])},700388,e=>{"use strict";var t=e.i(542854),r=e.i(165130),n=e.i(870446),i=e.i(446471),a=e.i(54976),s=e.i(972671),o=e.i(196234),l=e.i(64222);let c=new n.RegExpMatcher({...n.englishDataset.build(),...n.englishRecommendedTransformers}),u=s.z.object({playlistNameValue:s.z.string().min(2,{message:"Playlist name must be at least 2 characters."}).refine(e=>""!==e.trim(),{message:"Playlist name cannot be just spaces."}).refine(e=>!c.hasMatch(e),{message:"Playlist name cannot contain obscene language."})});e.s(["useEditPlaylistForm",0,e=>{let n=(0,i.useForm)({resolver:(0,t.zodResolver)(u),defaultValues:{playlistNameValue:e?.name??""}}),{renamePlaylistMutation:s}=(0,r.default)(l.udioApiInstance);return{form:n,onSubmit:t=>{let r=s.mutateAsync({playlistId:e?.id??"",name:t.playlistNameValue});a.toast.promise(r,{loading:"Saving playlist...",success:"Playlist updated successfully!",error:"Error updating playlist name",duration:o.DEFAULT_TOAST_DURATION_MS,dismissible:!0})}}}])},694059,e=>{"use strict";var t=e.i(242117),r=e.i(725205),n=e.i(330668),i=e.i(338722);e.s(["default",0,(e,{currentUserId:a,connectionQuery:s,searchTerm:o,order:l,limit:c,userIds:u=[],initialPageParam:d=0,initialData:f})=>{let{fetchNextPage:p,fetchPreviousPage:m,hasNextPage:h,hasPreviousPage:g,isFetchingNextPage:y,isFetchingPreviousPage:v,data:x,...b}=(0,t.useInfiniteQuery)({queryKey:i.userSearchKeys.forSearchTerm(o,s,a,u),queryFn:async({pageParam:t})=>{if(!s&&o.length&&o.trim().length<r.MIN_SEARCH_QUERY_LENGTH)return{data:[],cursor:t,nextCursor:void 0,prevCursor:void 0};let n=(await e.getAxiosInstance().post("/api/users/search",{connectionQuery:s,searchTerm:o,order:l,pageParam:t,pageSize:c,userIds:u})).data.data,i=n.length<c,d=n;if(a&&0!==n.length&&s?.type==="following"){let t=n.map(e=>e.id),r=new Set((await e.getAxiosInstance().post("/api/users/search",{userIds:t,connectionQuery:{type:"followers",userId:a}})).data.data.map(e=>e.id));d=n.map(e=>({...e,isFollowingBack:r.has(e.id)}))}return{data:d,cursor:t,...c>0?{nextCursor:i?void 0:t+c,prevCursor:t>0?Math.max(t-c,0):void 0}:{nextCursor:void 0,prevCursor:void 0}}},initialPageParam:d,getNextPageParam:e=>e.nextCursor,getPreviousPageParam:e=>e.prevCursor,...f&&{initialData:()=>({pages:[{data:f,cursor:0,nextCursor:void 0,prevCursor:void 0}],pageParams:[0]})},refetchOnWindowFocus:!1});return{results:(0,n.useMemo)(()=>x?.pages.flatMap(e=>e.data)??[],[x]),fetchNextPage:p,fetchPreviousPage:m,hasNextPage:h,hasPreviousPage:g,isFetchingNextPage:y,isFetchingPreviousPage:v,...b}}])},990112,e=>{"use strict";var t=e.i(461305),r=e.i(746592),n=e.i(478251),i=e.i(338722),a=e.i(860240);e.s(["default",0,(e,{onProgress:s,onFinish:o})=>{let l=(0,r.useQueryClient)(),{user:c}=(0,a.default)(e);return(0,t.useMutation)({mutationFn:async({formData:t})=>{let r=e.updateUserImage({formData:t});return s(r),r.then(e=>{if(200!==e.status)throw new n.ApiError(e.statusText,{status:e.status});return e.data})},mutationKey:["uploadUserImage"],onSuccess:async()=>{await l.invalidateQueries({queryKey:i.userProfileKeys.forProfile(c?.id)}),o?.()},onError:()=>{o?.()}})}])},515149,(e,t,r)=>{t.exports=e.r(577878)},866900,e=>{"use strict";var t=e.i(461305),r=e.i(746592),n=e.i(338722),i=e.i(860240),a=e.i(258331);e.s(["default",0,e=>{let s=(0,r.useQueryClient)(),{user:o}=(0,i.default)(e),l=(0,a.useAnalytics)();return(0,t.useMutation)({mutationFn:async({attributesToUpdate:t})=>{if(o){let r=await e.updateUserProfile(t);return l.captureEvent({name:"Update Profile",userId:o.id,attributes:t}),r}},mutationKey:["updateProfile"],onSettled:async()=>{await s.invalidateQueries({queryKey:n.userProfileKeys.forProfile(o?.id)})}})}])},604347,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.regionAPIs=void 0,r.regionAPIs=new Map([["us","https://api-iam.intercom.io"],["eu","https://api-iam.eu.intercom.io"],["ap","https://api-iam.au.intercom.io"]])},23493,(e,t,r)=>{"use strict";var n=e.e&&e.e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})};
2Object.defineProperty(r,"__esModule",{value:!0}),r.ref=r.init=void 0;let i="_intercom_npm_loader",a=function(){a.loaderQueue(arguments)};a.q=[],a.loaderQueue=function(e){a.q.push(e)};let s=function(){var e,t,r=document;if(!r.getElementById(i)){var n=r.createElement("script");n.type="text/javascript",n.async=!0,n.id=i,n.src="https://widget.intercom.io/widget/"+(null==(e=window.intercomSettings)?void 0:e.app_id);var a=r.getElementsByTagName("script")[0];null==(t=a.parentNode)||t.insertBefore(n,a)}},o=()=>"complete"===document.readyState||"interactive"===document.readyState;r.init=()=>n(void 0,void 0,void 0,function*(){var e=window,t=e.Intercom;e.intercomSettings&&(e.intercomSettings.installation_type="npm-package"),"function"==typeof t?(t("reattach_activator"),t("update",e.intercomSettings)):(e.Intercom=a,o()?s():(document.addEventListener("readystatechange",function(){o()&&s()}),e.attachEvent?e.attachEvent("onload",s):e.addEventListener("load",s,!1)))}),r.ref=void 0},969096,(e,t,r)=>{"use strict";var n=e.e&&e.e.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(r,"__esModule",{value:!0}),r.onUserEmailSupplied=r.showConversation=r.showTicket=r.startChecklist=r.startSurvey=r.showNews=r.showArticle=r.startTour=r.getVisitorId=r.trackEvent=r.onUnreadCountChange=r.onShow=r.onHide=r.showNewMessage=r.showMessages=r.showSpace=r.show=r.hide=r.update=r.shutdown=r.boot=r.Intercom=void 0;let i=e.r(604347),a=e.r(23493),s=(e,...t)=>{window.Intercom?window.Intercom(e,...t):console.warn("Please ensure Intercom is setup and running on client-side!")};r.Intercom=e=>{if("object"!=typeof e)return void console.warn("Intercom initialiser called with invalid parameters.");let{region:t="us"}=e,r=n(e,["region"]);"u">typeof window&&!a.ref&&(window.intercomSettings=Object.assign(Object.assign({},r),{api_base:i.regionAPIs.get(t)}),(0,a.init)())},r.default=r.Intercom,r.boot=e=>s("boot",e),r.shutdown=()=>s("shutdown"),r.update=e=>s("update",e),r.hide=()=>s("hide"),r.show=()=>s("show"),r.showSpace=e=>s("showSpace",e),r.showMessages=()=>s("showMessages"),r.showNewMessage=e=>s("showNewMessage",e),r.onHide=e=>s("onHide",e),r.onShow=e=>s("onShow",e),r.onUnreadCountChange=e=>s("onUnreadCountChange",e),r.trackEvent=(...e)=>s("trackEvent",...e),r.getVisitorId=()=>s("getVisitorId"),r.startTour=e=>s("startTour",e),r.showArticle=e=>s("showArticle",e),r.showNews=e=>s("showNews",e),r.startSurvey=e=>s("startSurvey",e),r.startChecklist=e=>s("startChecklist",e),r.showTicket=e=>s("showTicket",e),r.showConversation=e=>s("showConversation",e),r.onUserEmailSupplied=e=>s("onUserEmailSupplied",e)},522344,e=>{"use strict";let t,r;var n,i=e.i(497380),a=e.i(417973);class s{get childNodes(){throw Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,r){let n=this.clone();return t.addDescendants(n,e),n}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}}var o=e.i(330668);e.i(13486),e.i(769941);var l=e.i(715236);e.i(630689),e.i(401021);let c=(0,o.createContext)(!1);"function"==typeof o.default.useSyncExternalStore&&o.default.useSyncExternalStore;let u=(0,o.createContext)(null);var d=e.i(370511);let f=(0,o.createContext)({});class p extends s{filter(e,t){let r=t.getItem(this.prevKey);if(r&&"separator"!==r.type){let r=this.clone();return t.addDescendants(r,e),r}return null}}p.type="separator";let m=(n=function(e,t){var r;let n,s;[e,t]=(0,i.useContextProps)(e,t,f);let{elementType:l,orientation:c,style:u,className:p,slot:m,...h}=e,g=l||"hr";"hr"===g&&"vertical"===c&&(g="div");let y=i.dom[g],{separatorProps:v}=(r={...h,elementType:l,orientation:c},s=(0,a.filterDOMProps)(r,{labelable:!0}),("vertical"===r.orientation&&(n="vertical"),"hr"!==r.elementType)?{separatorProps:{...s,role:"separator","aria-orientation":n}}:{separatorProps:s}),x=(0,a.filterDOMProps)(e,{global:!0});return o.default.createElement(y,{render:e.render,...(0,d.mergeProps)(x,v),style:u,className:null!=p?p:"react-aria-Separator",ref:t,slot:m||void 0})}
2,t=({node:e})=>n(e.props,e.props.ref,e),(r=(0,o.forwardRef)((e,r)=>{let i=(0,o.useContext)(l.FocusableContext);if(!(0,o.useContext)(c)){if(n.length>=3)throw Error(n.name+" cannot be rendered outside a collection.");return n(e,r)}return function(e,t,r,n,i){var a,l;"string"==typeof e&&(a=e,(l=class extends s{}).type=a,e=l);let c=(0,o.useCallback)(a=>{null==a||a.setProps(t,r,e,n,i)},[t,r,n,i,e]),d=(0,o.useContext)(u);if(d){let a=d.ownerDocument.nodesByProps.get(t);return a||((a=d.ownerDocument.createElement(e.type)).setProps(t,r,e,n,i),d.appendChild(a),d.ownerDocument.updateCollection(),d.ownerDocument.nodesByProps.set(t,a)),null}return o.default.createElement(e.type,{ref:c},null)}(p,e,r,"children"in e?e.children:null,e=>o.default.createElement(l.FocusableContext.Provider,{value:i},o.default.createElement(t,{node:e})))})).displayName=n.name,r);e.s(["Separator",0,m],522344)},777992,e=>{e.v(e=>Promise.resolve().then(()=>e(170280)))},755315,e=>{e.v(t=>Promise.all(["static/chunks/02i2fybwz3l8d.js"].map(t=>e.l(t))).then(()=>t(124689)))},229602,e=>{e.v(t=>Promise.all(["static/chunks/168vun5qz1.n..js"].map(t=>e.l(t))).then(()=>t(162649)))},687879,e=>{e.v(t=>Promise.all(["static/chunks/0zc-g.o0jokyj.js"].map(t=>e.l(t))).then(()=>t(989307)))}]); 3 4//# debugId=26412613-4559-c681-cd8e-57a95ce24e3e 5//# sourceMappingURL=0y8~iemcm4s_x.js.map
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.