PageSourceSearch

https://www.upsound.ai/_next/static/chunks/715-d3cedb77dae7b5ed.js

js upsound.ai collected 2026-10-05 13:11:52 UTC 12,496 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bbc7b18e-0fcb-4db8-871c-6a62f09424f3",e._sentryDebugIdIdentifier="sentry-dbid-bbc7b18e-0fcb-4db8-871c-6a62f09424f3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[715],{51834:(e,t,n)=>{n.d(t,{Cf:()=>f,Es:()=>x,HM:()=>d,L3:()=>h,c7:()=>p,lG:()=>o,rr:()=>b,zM:()=>c});var a=n(95155),s=n(12115),l=n(88341),r=n(64269),i=n(31719);let o=l.bL,c=l.l9,u=l.ZL,d=l.bm,m=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)(l.hJ,{ref:t,className:(0,r.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...s})});m.displayName=l.hJ.displayName;let f=s.forwardRef((e,t)=>{let{className:n,children:s,overlayClassName:o,hideClose:c=!1,...d}=e;return(0,a.jsxs)(u,{children:[(0,a.jsx)(m,{className:o}),(0,a.jsxs)(l.UC,{ref:t,className:(0,r.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n),...d,children:[s,!c&&(0,a.jsxs)(l.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(i.MKb,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=l.UC.displayName;let p=e=>{let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...n})};p.displayName="DialogHeader";let x=e=>{let{className:t,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...n})};x.displayName="DialogFooter";let h=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)(l.hE,{ref:t,className:(0,r.cn)("text-lg font-semibold leading-none tracking-tight",n),...s})});h.displayName=l.hE.displayName;let b=s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)(l.VY,{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",n),...s})});b.displayName=l.VY.displayName},63066:(e,t,n)=>{n.d(t,{KY:()=>w,Lj:()=>l.Lj,Sq:()=>j,nL:()=>g,pt:()=>f,y6:()=>b,yL:()=>h});var a=n(12115),s=n(47623),l=n(60055),r=n(53455),i=n(99776),o=n(80549),c=n(88342),u=n(42540),d=n(10708),m=n(97386);class f extends Error{constructor(){super("Ответ относится к предыдущему аккаунту"),this.name="StaleAccountClaimError"}}async function p(){return(await c.apiClient.get("/api/v1/community-bonus/status")).data}function x(e){let t=(0,a.useRef)(null);return null!=e&&(t.current=e),t.current}function h(){let{enabled:e=!0,accountKey:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=x(t);return(0,r.I)({queryKey:(0,l.AG)(n),queryFn:p,enabled:e,staleTime:6e4,refetchOnWindowFocus:!0,retry:1})}function b(){let e=(0,i.jE)();return(0,o.n)({mutationFn:async()=>{let e=(0,u.X5)(),t=await c.apiClient.post("/api/v1/community-bonus/claim");if(!(0,u.r9)(e))throw new f;return t.data},onSuccess:t=>{("granted"===t.outcome||"already_claimed"===t.outcome)&&(0,d.O3)(),e.invalidateQueries({queryKey:l.Lj})}})}function y(e){return e?"".concat("upsound:community-bonus:dismissed-until",":").concat(e):null}function g(e){return{isDismissed:(0,a.useCallback)(()=>{let t=y(e);if(!t)return!1;try{let e=window.localStorage.getItem(t);if(!e)return!1;let n=Number(e);if(!Number.isFinite(n))return!1;if(Date.now()>=n)return window.localStorage.removeItem(t),!1;return!0}catch(e){return!1}},[e]),dismiss:(0,a.useCallback)(()=>{let t=y(e);if(t)try{window.localStorage.setItem(t,String(Date.now()+2592e5))}catch(e){}},[e])}}function w(){return(0,o.n)({mutationFn:async()=>{var e;let t=(0,u.X5)(),n=await c.apiClient.post("/api/v1/community-bonus/claim-link");if(!(0,u.r9)(t))throw new f;return null!=(e=n.data.claim_url)?e:null}})}function j(){let{enabled:e=!0,accountKey:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.jE)(),o=x(t);return(0,a.useEffect)(()=>{let e=null,t=()=>{e&&clearTimeout(e),e=setTimeout(()=>{n.invalidateQueries({queryKey:l.s4})},1500)};return window.addEventListener(d.Lz,t),()=>{e&&clearTimeout(e),window.removeEventListener(d.Lz,t)}},[n]),(0,r.I)({queryKey:(0,l.on)(o),queryFn:async()=>{let e=await m.y1.getSiteTokenBalance();return(0,s.CO)(e)},enabled:e,staleTime:6e4,retry:1})}},65516:(e,t,n)=>{n.d(t,{W:()=>l});var a=n(95155),s=n(64269);function l(e){let{size:t=88,className:n}=e;return(0,a.jsxs)("div",{className:(0,s.cn)("cosmic-spark",n),style:{width:t,height:t},"aria-hidden":!0,children:[(0,a.jsx)("span",{className:"cosmic-spark-glow"}),(0,a.jsxs)("svg",{viewBox:"0 0 120 120",fill:"currentColor",className:"cosmic-spark-scene",children:[(0,a.jsx)("circle",{className:"cosmic-spark-star",cx:"20",cy:"32",r:"1.6"}),(0,a.jsx)("circle",{className:"cosmic-spark-star",cx:"100",cy:"40",r:"1.2",style:{animationDelay:"0.7s"}}),(0,a.jsx)("circle",{className:"cosmic-spark-star",cx:"94",cy:"94",r:"1.4",style:{animationDelay:"1.3s"}}),(0,a.jsx)("circle",{className:"cosmic-spark-star",cx:"28",cy:"92",r:"1",style:{animationDelay:"1.9s"}}),(0,a.jsx)("path",{className:"cosmic-spark-mini",d:"M96 18 C96 26 97 29 106 30 C97 31 96 34 96 42 C96 34 95 31 86 30 C95 29 96 26 96 18 Z"}),(0,a.jsx)("path",{className:"cosmic-spark-core",d:"M60 8 C60 38 66 54 112 60 C66 66 60 82 60 112 C60 82 54 66 8 60 C54 54 60 38 60 8 Z"})]})]})}},80715:(e,t,n)=>{n.d(t,{p:()=>p});
1var a=n(95155),s=n(12115),l=n(99776),r=n(35299),i=n(18085),o=n(51834),c=n(65516),u=n(59741),d=n(60055),m=n(10708),f=n(63066);function p(e){var t;let{open:n,onOpenChange:p,reason:x,accountKey:h=null,onForceClose:b}=e,y=(0,s.useRef)(null),g=(0,l.jE)(),{data:w,isLoading:j}=(0,f.yL)({enabled:n,accountKey:h}),v=(0,f.y6)(),N=(0,f.KY)(),[k,C]=(0,s.useState)(null),_=!!(null==w?void 0:w.already_claimed),L=null!==k||_,E=null!==k&&k>0?k:null,[D,I]=(0,s.useState)(null),[S,z]=(0,s.useState)(null);(0,s.useEffect)(()=>{n||(C(null),I(null),z(null))},[n]);let T=(0,s.useCallback)(()=>{if(b)return void b();p(!1)},[b,p]),A=(0,d.xs)(w),F=(0,s.useRef)(void 0);(0,s.useEffect)(()=>{if(!(0,d.qY)(F.current,h)){null!=h&&(F.current=h);return}F.current=h,C(null),I(null),z(null),T()},[h,T]),(0,s.useEffect)(()=>{if(!n||"undefined"==typeof document)return;let e=()=>{"visible"===document.visibilityState&&(g.invalidateQueries({queryKey:f.Lj}),(0,m.O3)())};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[n,g]);let q=null!=(t=null==w?void 0:w.tokens)?t:0,K=async()=>{I(null),z(null);let e=window.open("","_blank");try{let t=await N.mutateAsync();if(!t){null==e||e.close(),I(d.CL.check_failed);return}if(e){e.opener=null,e.location.href=t;return}z(t)}catch(t){if(null==e||e.close(),t instanceof f.pt)return;I(d.CL.check_failed)}},W=async()=>{I(null);try{var e;let t=await v.mutateAsync();if("already_claimed"===t.outcome)return void C(0);if("granted"===t.outcome)return void C("number"==typeof t.granted_tokens&&t.granted_tokens>0?t.granted_tokens:0);I(null!=(e=d.CL[t.outcome])?e:d.CL.check_failed)}catch(e){if(e instanceof f.pt)return;I(d.CL.check_failed)}};return(0,a.jsx)(o.lG,{open:n,onOpenChange:p,children:(0,a.jsxs)(o.Cf,{ref:y,onInteractOutside:e=>{e.preventDefault(),T()},onEscapeKeyDown:e=>{e.preventDefault(),T()},onOpenAutoFocus:e=>{var t;e.preventDefault(),null==(t=y.current)||t.focus()},tabIndex:-1,overlayClassName:"bg-black/70 backdrop-blur-[16px]",className:"w-[min(calc(100vw-28px),480px)] max-w-none gap-0 overflow-hidden !rounded-[32px] border border-white/[0.12] p-0 text-white focus:outline-none focus-visible:outline-none [&>button]:right-6 [&>button]:top-6 [&>button]:flex [&>button]:h-8 [&>button]:w-8 [&>button]:items-center [&>button]:justify-center [&>button]:rounded-full [&>button]:border-0 [&>button]:bg-transparent [&>button]:p-0 [&>button]:text-white/40 [&>button]:opacity-100 [&>button]:ring-0 [&>button]:ring-offset-0 [&>button]:transition [&>button]:hover:bg-transparent [&>button]:hover:text-white/84 [&>button]:focus:ring-0 [&>button]:focus:ring-offset-0 [&>button]:focus-visible:ring-0 [&>button]:focus-visible:ring-offset-0 [&>button_svg]:h-5 [&>
1button_svg]:w-5",children:[(0,a.jsx)(u.W,{targetRef:y,strength:72,bezel:26,blur:24}),(0,a.jsx)(o.L3,{className:"sr-only",children:L?"Токены начислены":"Токены за вступление в сообщество"}),(0,a.jsx)(o.rr,{className:"sr-only",children:"Разовая награда за вступление в Telegram-сообщество UpSound AI."}),(0,a.jsxs)("div",{className:"flex flex-col px-6 pb-6 pt-7 md:px-7",children:[(0,a.jsx)(c.W,{size:64,className:"-ml-1.5 text-white"}),L?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"mt-4 text-[20px] font-semibold tracking-tight text-white/92",children:null!==E?"Начислили ".concat((0,m.Nz)(E)):"Токены уже начислены"}),(0,a.jsx)("p",{className:"mt-2 text-[13px] leading-[1.45] text-white/56",children:"Спасибо, что вы с нами. В чате рассказываем о новом и собираем идеи: за внедрённую идею дарим токены и подписки."}),(0,a.jsx)("button",{type:"button",className:"btn-primary mt-6 w-full",onClick:()=>p(!1),children:"Продолжить работу"})]}):(0,a.jsxs)(a.Fragment,{children:[x?(0,a.jsx)("div",{className:"ds-micro mt-4",children:d.Vz[x]}):null,(0,a.jsx)("h2",{className:"text-[20px] font-semibold tracking-tight text-white/92 ".concat(x?"mt-1.5":"mt-4"),children:q>0?"".concat((0,m.Nz)(q)," за вступление в сообщество"):"Токены за вступление в сообщество"}),(0,a.jsx)("p",{className:"mt-2 text-[13px] leading-[1.45] text-white/56",children:"Вступите в наш чат в Telegram — начислим бонусные токены. Там рассказываем о новом и дарим токены за идеи, которые внедряем."}),j?(0,a.jsxs)("div",{className:"mt-6 flex items-center gap-2 text-[13px] text-white/48",children:[(0,a.jsx)(r.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}),"Загружаем условия"]}):(0,a.jsx)("div",{className:"mt-6 flex flex-col gap-2",children:A&&w?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("a",{className:"btn-secondary flex w-full items-center justify-center gap-2",href:w.chat_url,target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(i.A,{className:"h-4 w-4",strokeWidth:1.5}),"Открыть сообщество"]}),(0,a.jsxs)("button",{type:"button",className:"btn-primary w-full",onClick:W,disabled:v.isPending,children:[v.isPending?(0,a.jsx)(r.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}):null,"Я вступил, проверить"]})]}):(null==w?void 0:w.can_continue_in_bot)?(0,a.jsxs)("button",{type:"button",className:"btn-primary flex w-full items-center justify-center gap-2",onClick:K,disabled:N.isPending,children:[N.isPending?(0,a.jsx)(r.A,{className:"h-4 w-4 animate-spin",strokeWidth:1.5}):(0,a.jsx)(i.A,{className:"h-4 w-4",strokeWidth:1.5}),"Продолжить в Telegram"]}):(0,a.jsx)("p",{role:"status",className:"text-[13px] leading-[1.45] text-white/56",children:d.CL.check_failed})}),S?(0,a.jsxs)("p",{role:"status",className:"mt-4 text-[13px] leading-[1.45] text-white/56",children:["Браузер не дал открыть Telegram."," ",(0,a.jsx)("a",{className:"underline decoration-white/30 underline-offset-2 transition-colors hover:decoration-white/60",href:S,target:"_blank",rel:"noopener noreferrer",children:"Открыть вручную"})]}):null,D?(0,a.jsx)("p",{role:"status",className:"mt-4 text-[13px] leading-[1.45] text-white/56",children:D}):null]})]})]})})}}}]);

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.