PageSourceSearch

https://sodda.ai/_next/static/chunks/1oo1aim4g0zdr.js

js sodda.ai collected 2026-10-05 13:32:40 UTC 14,426 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,376922,e=>{"use strict";var t=e.i(939299),r=e.i(744555),i=e.i(132186),s=e.i(754891),n=e.i(833461),a=e.i(490698),o=class extends s.Subscribable{#e;#t=void 0;#r;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onSubscribe(){1===this.listeners.size&&this.#r&&(this.#r.addObserver(this),this.#s())}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#s(),this.#n()}mutate(e,t){return this.#i=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#s(){let e=this.#r?.state??(0,a.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){n.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};e.s(["useMutation",0,function(e,s){let a=(0,t.useQueryClient)(s),[u]=r.useState(()=>new o(a,e));r.useEffect(()=>{u.setOptions(e)},[u,e]);let l=r.useSyncExternalStore(r.useCallback(e=>u.subscribe(n.notifyManager.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c=r.useCallback((...e)=>{u.mutate(e[0],e[1]).catch(i.noop)},[u]);if(l.error&&(0,i.shouldThrowError)(u.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}],376922)},138740,e=>{"use strict";var t=e.i(470698),r=e.i(744555),i=e.i(939299);e.i(987892);var s=e.i(152472),n=e.i(946758);e.i(147857);var a=e.i(222969),o=e.i(664309),u=e.i(914838),l=e.i(757072),c=e.i(864669),h=e.i(84089),d=e.i(628682),y=e.i(69295);e.i(549751);var p=e.i(768912),f=e.i(356938);let g=/^[A-Za-z0-9-]{16,128}$/u;async function m(e){if(!e||!g.test(e))return null;let t=globalThis.crypto?.subtle;if(!t)return null;try{let r=await t.digest("SHA-256",new TextEncoder().encode(e));return Array.from(new Uint8Array(r),e=>e.toString(16).padStart(2,"0")).join("")}catch{return null}}let w="locale-auto-applied";e.s(["UserHydrationProvider",0,function({children:e,initialWriterProfileSeed:g=null}){let b=(0,r.useRef)(!1),S=(0,r.useRef)(g),P=(0,r.useRef)(g),v=(0,r.useRef)(0),A=(0,i.useQueryClient)(),C=(0,a.useAuthSessionCacheKey)(),K=(0,a.useAuthStore)(e=>e.isAuthenticated),q=(0,a.useAuthStore)(e=>e.hasAttempted);return(0,o.useSessionManager)(),(0,r.useEffect)(()=>{P.current!==g&&(P.current=g,S.current=g)},[g]),(0,r.useEffect)(()=>{b.current||(b.current=!0,(0,c.clearLegacyGeneratorDrafts)(),s.useUserStore.getState().hydrateFromCookies(),(0,h.setPersonalProfileBridge)({getProfilePersonal:()=>A.getQueryData(l.queryKeys.user.writerProfile())??{},isProfileLoaded:()=>void 0!==A.getQueryData(l.queryKeys.user.writerProfile()),persistProfilePersonal:e=>{A.setQueryData(l.queryKeys.user.writerProfile(),t=>({...t,...e})),n.userApi.updateWriterProfile(e).catch(e=>{f.logger.warn("[personal-defaults] writer-profile sync failed:",e)})}}),(async()=>
1{if(a.useAuthStore.getState().isAuthenticated)return;let e=(0,y.hasTelegramLaunchSignal)();e&&a.useAuthStore.setState({miniAppLoginPending:!0});let t=a.useAuthStore.getState().initializeAuth();try{let r=null;e&&(await (0,d.whenWebAppReady)(),(0,d.readyAndExpand)(),(r=(0,d.getRawInitData)())||a.useAuthStore.setState({miniAppLoginPending:!1})),await t,!a.useAuthStore.getState().isAuthenticated&&r&&await a.useAuthStore.getState().loginWithMiniApp(r).catch(e=>(f.logger.error(e),!1))}finally{a.useAuthStore.getState().miniAppLoginPending&&a.useAuthStore.setState({miniAppLoginPending:!1})}})())},[A]),(0,r.useEffect)(()=>{let e=!1,t=++v.current,r=l.queryKeys.user.writerProfile(),i=()=>{A.removeQueries({queryKey:r,exact:!0})},o=()=>{let t=a.useAuthStore.getState();return!e&&t.isAuthenticated&&null!==C&&(0,u.getAuthBridge)()?.getSessionCacheKey()===C};return s.useUserStore.getState().hydrateFromCookies(),(0,c.clearLegacyGeneratorDrafts)(),(async()=>{if(!q||!K||!C){i(),q&&(S.current=null);return}let e=await m(C);if(!o())return;let s=S.current;if(S.current=null,e&&s?.ownerFingerprint===e){A.setQueryData(r,s.profile),o()&&(0,h.notifyPersonalProfileChanged)();return}i();let a=l.queryKeys.user.writerProfileBootstrap(e??"unverifiable",t);try{let e=await A.fetchQuery({queryKey:a,queryFn:()=>n.userApi.getWriterProfile(),staleTime:1/0});if(!o())return;A.setQueryData(r,e),o()&&(0,h.notifyPersonalProfileChanged)()}catch{}finally{A.removeQueries({queryKey:a,exact:!0})}})(),()=>{e=!0}},[q,g,K,A,C]),(0,r.useEffect)(()=>{if(!(0,d.isInTelegramEnv)()||window.sessionStorage.getItem(w))return;let e=p.routing.locales,t=()=>{let t=a.useAuthStore.getState().user?.interface_lang;if(!t||!e.includes(t))return!1;let r=window.location.pathname.split("/"),i=r[1]??"";return!!e.includes(i)&&(window.sessionStorage.setItem(w,"1"),i!==t&&(r[1]=t,window.location.replace(r.join("/")+window.location.search)),!0)};if(t())return;let r=a.useAuthStore.subscribe(e=>{e.user?.interface_lang&&t()&&r()});return()=>r()},[]),(0,r.useEffect)(()=>{let e=e=>{a.useAuthStore.getState().handleStorageSync(e.key,e.newValue)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,t.jsx)(t.Fragment,{children:e})}],138740)},145406,e=>{"use strict";e.i(116897);var t=e.i(247874);e.s(["PricingBoot",0,function(){return(0,t.usePricing)(),null}])},229088,e=>{"use strict";var t=e.i(744555),r=e.i(902935),i=e.i(628682),s=e.i(816108),n=e.i(468769),a=e.i(59939),o=e.i(993093);e.s(["TelegramBackButton",0,function(){let e=(0,r.usePathname)(),u=(0,o.useUpNavigation)(),l=(0,t.useRef)(u);return(0,t.useEffect)(()=>{l.current=u},[u]),(0,t.useEffect)(()=>{let t,r=!1;return(0,i.whenWebAppReady)().then(()=>{if(r)return;let o=(0,n.stripLocaleFromPathname)(e??"/");o===a.DASHBOARD_PATH||""===o?(0,i.hideBackButton)():t=(0,i.showBackButton)(()=>{(0,s.runTelegramBackIntent)()||l.current(a.DASHBOARD_PATH)})}),()=>{r=!0,t?.()}},[e]),null}])},450031,e=>{"use strict";var t=e.i(744555),r=e.i(628682);e.s(["TelegramSafeArea",0,function(){return(0,t.useEffect)(()=>{let e,t=document.documentElement,i=()=>{let e=(0,r.getTelegramSafeAreaInsets)();for(let[r,i]of[["top",e.top],["bottom",e.bottom],["left",e.left],["right",e.right]]){let e=`--tg-inset-${r}`,s=`${i}px`,n=t.style.getPropertyValue(e);n!==s&&(""!==n||0!==i)&&t.style.setProperty(e,s)}},s=!1;return(0,r.whenWebAppReady)().then(()=>{s||(i(),e=(0,r.onTelegramSafeAreaChanged)(i))}),()=>{s=!0,e?.()}},[]),null}])},140327,e=>{"use strict";var t=e.i(470698),r=e.i(99651),i=e.i(744555);e.i(624576);var s=e.i(421244),n=e.i(561769);let a=(0,r.default)(()=>e.A(785192).then(e=>e.Toaster),{loadableGenerated:{modules:[871610]},ssr:!1}),o=!1;e.s(["ToastProvider",0,function({children:e}){let{theme:r}=(0,s.useTheme)(),u=function(){let[e,t]=(0,i.useState)(()=>o);return(0,i.useEffect)(()=>{if(e)return;let r=()=>{o=!0,t(!0)},i=window.requestIdleCallback;if("function"==typeof i){let e=i(r,{timeout:1500});return()=>window.cancelIdleCallback(e)}let s=window.setTimeout(r,200);return()=>window.clearTimeout(s)},[e]),e}();return(0,t.jsxs)(t.Fragment,{children:[e,(0,t.jsx)(n.ErrorBoundary,{fallback:null,children:u?(0,t.jsx)(a,{position:"top-right",theme:r,richColors:!0,closeButton:!0}):null})]})}])},987892,152472,946758,886390,e=>{"use strict";var t=e.i(202979),r=e.i(998970);function i(){try{window.localStorage.removeItem("user-storage")}catch{}(0,r.removeCookie)("user_id")}let s=(0,t.create)()(()=>({hydrateFromCookies:i}
1));e.s(["useUserStore",0,s],152472);var n=e.i(717767),a=e.i(289341),o=e.i(384561);let u=(0,o.looseObject)({plan:(0,o.string)(),period:(0,o.string)(),price_som:(0,o.number)(),quota:(0,o.number)(),duration_days:(0,o.number)(),label:(0,o.optional)((0,o.string)()),description:(0,o.optional)((0,o.string)()),sort_order:(0,o.optional)((0,o.number)())}),l=(0,o.array)(u),c=(0,o.looseObject)({slug:(0,o.string)(),enabled:(0,o.boolean)()}),h=(0,o.looseObject)({success:(0,o.boolean)(),cashback_percent:(0,o.optional)((0,o.number)()),methods:(0,o.array)(c)}),d={async getProfile(){let e=await n.browserClient.get("/api/v1/users/me");if(!e||!e.data)throw Error("Invalid API response format");return e.data},async updateLanguage(e){await n.browserClient.patch("/api/v1/users/me",{interface_lang:e})},async updateContentLanguage(e){await n.browserClient.patch("/api/v1/users/me",{content_language:e})},async getWriterProfile(){let e=await n.browserClient.get("/api/v1/users/me/writer-profile");if(!e||!e.data)throw Error("Invalid API response format");return e.data},async updateWriterProfile(e){await n.browserClient.patch("/api/v1/users/me/writer-profile",e)},updateProfile:e=>n.browserClient.patch("/api/v1/users/me",e),getProfileById:e=>d.getProfile(),getSubscriptionActive:()=>n.browserClient.get("/api/v1/subscriptions/active"),getTransactions(e){let t=new URLSearchParams;e?.page&&t.set("page",String(e.page)),e?.limit&&t.set("limit",String(e.limit)),e?.kind&&t.set("kind",e.kind);let r=t.toString();return n.browserClient.get(`/api/v1/users/me/transactions${r?`?${r}`:""}`)},async getSubscriptionPlans(e){let t=await n.browserClient.get(`/api/v1/subscriptions/plans?interface_lang=${encodeURIComponent(e)}`);return{plans:(0,a.parseWithSchema)(l,t?.data?.plans,{method:"GET",path:"/api/v1/subscriptions/plans"})}},createPaymentOrder:e=>n.browserClient.post("/api/v1/payments/orders",e,{timeoutMs:2e4}),async getPaymentOrder(e){let t=await n.browserClient.get(`/api/v1/payments/orders/${encodeURIComponent(e)}`);
1if(!t||!t.data)throw Error("Invalid API response format");return t.data},buySubscription:e=>n.browserClient.post("/api/v1/subscriptions/buy",e),getPaymentMethods:()=>n.browserClient.get("/api/v1/payments/methods").then(e=>e.methods),getPaymentConfig:async()=>n.browserClient.get("/api/v1/payments/config",{schema:h})};e.s(["userApi",0,d],946758);var y=e.i(376922),p=e.i(840885),f=e.i(939299),g=e.i(914838),m=e.i(757072),w=e.i(356938),b=e.i(84089);class S extends Error{constructor(){super("The authenticated session changed during the mutation"),this.name="StaleSessionMutationError"}}function P(e){return(0,g.getAuthBridge)()?.getSessionCacheKey()===e}async function v(e,t){if(!P(e))throw new S;try{await t()}catch(t){if(!P(e))throw new S;throw t}if(!P(e))throw new S}e.s(["usePaymentConfig",0,function(){return(0,p.useQuery)({queryKey:m.queryKeys.payments.config(),queryFn:()=>d.getPaymentConfig(),staleTime:3e5})},"usePaymentMethods",0,function(){return(0,p.useQuery)({queryKey:m.queryKeys.payments.methods(),queryFn:()=>d.getPaymentMethods(),staleTime:3e5})},"useSubscriptionPlans",0,function(e){return(0,p.useQuery)({queryKey:m.queryKeys.subscription.plans(e),queryFn:()=>d.getSubscriptionPlans(e)})},"useUpdateLanguage",0,function(){let e=(0,f.useQueryClient)();return(0,y.useMutation)({mutationFn:({locale:e,ownerSessionKey:t})=>v(t,()=>d.updateLanguage(e)),onMutate:async({locale:t,ownerSessionKey:r})=>{if(!P(r)||(await e.cancelQueries({queryKey:m.queryKeys.user.profile()}),!P(r)))return{ownerSessionKey:r,previous:void 0,patched:!1};let i=e.getQueryData(m.queryKeys.user.profile());return e.setQueryData(m.queryKeys.user.profile(),e=>e?{...e,interface_lang:t}:e),{ownerSessionKey:r,previous:i,patched:!0}},onError:(t,r,i)=>{!(t instanceof S)&&(i?.patched&&i.previous&&P(i.ownerSessionKey)&&e.setQueryData(m.queryKeys.user.profile(),i.previous),i&&P(i.ownerSessionKey)&&w.logger.warn("[language] persisting the UI language failed:",t))},onSettled:(t,r,{ownerSessionKey:i})=>{P(i)&&e.invalidateQueries({queryKey:m.queryKeys.user.profile()})}})},"useUpdateWriterProfile",0,function(){let e=(0,f.useQueryClient)();return(0,y.useMutation)({mutationFn:({fields:e,ownerSessionKey:t})=>v(t,()=>d.updateWriterProfile(e)),onSuccess:(t,{fields:r,ownerSessionKey:i})=>{P(i)&&(e.setQueryData(m.queryKeys.user.writerProfile(),e=>({...e,...r})),(0,b.notifyPersonalProfileChanged)())}})},"useUserProfile",0,function(e,t=!0){return(0,p.useQuery)({queryKey:m.queryKeys.user.profile(),queryFn:d.getProfile,enabled:t})},"useWalletTransactions",0,function(e,t=!0){return(0,p.useQuery)({queryKey:m.queryKeys.user.transactions(e),queryFn:()=>d.getTransactions(e),enabled:t})},"useWriterProfile",0,function(e=!0){return(0,p.useQuery)({queryKey:m.queryKeys.user.writerProfile(),queryFn:()=>d.getWriterProfile(),enabled:e,staleTime:1/0})}],886390),e.s([],987892)},864669,e=>{"use strict";let t=["article_draft","coursework_draft","crossword_draft","essay_draft","flashcard_draft","infographic_draft","lesson-plan-draft","listening_draft","mustaqil_ish_draft","referat_draft","slide_draft","sortball_draft","test_draft","thesis_draft"];e.s(["clearLegacyGeneratorDrafts",0,function(e){let r;try{r=window.localStorage}catch{return}for(let i of e?[...t,e]:t)try{r.removeItem(i)}catch{}}])},816108,e=>{"use strict";let t=null;e.s(["runTelegramBackIntent",0,function(){return!!t&&(t(),!0)},"setTelegramBackIntent",0,function(e){t=e}])},624576,e=>{"use strict";e.i(421244),e.s([])},561769,e=>{"use strict";var t=e.i(744555),r=e.i(356938);class i extends t.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){r.logger.error("[error-boundary]",e,t.componentStack??""),this.props.onError?.(e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}e.s(["ErrorBoundary",0,i])}]);

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.