PageSourceSearch

https://sodda.ai/_next/static/chunks/3npgfm5in6087.js

js sodda.ai collected 2026-10-05 13:32:23 UTC 16,973 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,914838,e=>{"use strict";let t=null;e.s(["getAuthBridge",0,function(){return t},"setAuthBridge",0,function(e){t=e}])},293019,24082,e=>{"use strict";var t=e.i(918437),r=e.i(289341);let n=/^\d{1,20}$/;var i=e.i(628682);let a="soddaai:bot_id",o="bot_id",s=RegExp(`(?:^|;\\s*)${o}=(\\d{1,20})(?:;|$)`),u=`path=/; SameSite=Lax${"u">typeof location&&"https:"===location.protocol?"; Secure":""}`;function l(e){try{if((document.cookie.match(s)?.[1]??null)===e)return;document.cookie=e?`${o}=${e}; ${u}`:`${o}=; Max-Age=0; ${u}`}catch{}}function c(){let e=new URLSearchParams(window.location.search),t=e.get("bot_id")??e.get("tgWebAppStartParam")??(0,i.getWebApp)()?.initDataUnsafe?.start_param??null;if(t&&n.test(t)){try{window.sessionStorage.setItem(a,t)}catch{}return l(t),t}let r=function(){try{return window.sessionStorage.getItem(a)}catch{return null}}();return l(r),r}function f(e){if(!function(e){if(e.startsWith("/"))return e.startsWith("/api/v1/");try{let r=new URL(e);return(function(){let e=[];for(let r of[window.location.origin,t.env.NEXT_PUBLIC_API_BASE_URL,t.env.NEXT_PUBLIC_SLIDES_API_BASE_URL])if(r)try{e.push(new URL(r).origin)}catch{}return e})().includes(r.origin)&&r.pathname.startsWith("/api/v1/")}catch{return!1}}(e)||/[?&]bot_id=/.test(e))return e;let r=c();return r?`${e}${e.includes("?")?"&":"?"}bot_id=${r}`:e}e.s(["getBotId",0,c,"withBotId",0,f],24082);let d="cross_origin_browser_request";e.s(["createApiClient",0,function(e,n){async function i(a,o={}){n||function(e){let n;try{n=new URL(e,window.location.href)}catch{throw new r.ApiError({status:400,message:"Browser API request URL is invalid",data:{code:d}})}let i="";try{i=new URL(t.env.NEXT_PUBLIC_API_BASE_URL).origin}catch{i=""}if(n.origin!==window.location.origin&&n.origin!==i)throw new r.ApiError({status:400,message:"Cross-origin browser API requests are not allowed",data:{code:d}})}(a);let{headers:s={},requireAuth:u=!0,...l}=o,c={...s};if(u){let t=await e();t&&(c.Authorization=`Bearer ${t}`)}let p=n?a:f(a);return(0,r.baseFetch)(p,{...l,headers:c,requireAuth:!1},n)}return{get:(e,t)=>i(e,{...t,method:"GET"}),post:(e,t,r)=>i(e,{...r,method:"POST",body:t,isFormData:"u">typeof FormData&&t instanceof FormData}),put:(e,t,r)=>i(e,{...r,method:"PUT",body:t,isFormData:"u">typeof FormData&&t instanceof FormData}),patch:(e,t,r)=>i(e,{...r,method:"PATCH",body:t,isFormData:"u">typeof FormData&&t instanceof FormData}),delete:(e,t)=>i(e,{...t,method:"DELETE"})}}],293019)},289341,e=>{"use strict";var t=e.i(124622),r=e.i(918437),n=e.i(356938);class i extends Error{status;data;path;method;detail;code;constructor(e){super(e.message),this.name="ApiError",this.status=e.status,this.data=e.data,this.path=e.path,this.method=e.method;const r={data:e.data};this.detail=(0,t.readErrorDetail)(r),this.code=(0,t.readErrorCode)(r)}}class a extends i{issues;constructor(e){super(e),this.name="ApiSchemaError",this.issues=e.issues}}function o(e,t,r){let i=e.safeParse(t);if(i.success)return i.data;let o=function(e){if(0===e.length)return"unknown validation failure";let t=e.slice(0,3).map(e=>{let t=e.path.map(e=>String(e)).join(".");return`${t.length>0?t:"<root>"}: ${e.message}`}).join("; "),r=e.length-3;return r>0?`${t} (+${r} more)`:t}(i.error.issues);throw n.logger.error(`[api] schema mismatch ${r.method} ${r.path} — ${o}`,i.error.issues),new a({status:502,message:`Response does not match the expected schema (${o})`,data:t,path:r.path,method:r.method,issues:i.error.issues})}async function s(e,t){if(204===e.status)return;let r=e.headers.get("content-type");if(r?.includes("application/json"))return await e.json();let n=await e.text();if(t.expectsJson&&n.length>0)throw new i({status:e.status,message:`Expected JSON response but received content-type "${r??"unknown"}"`,data:n,path:t.path,method:t.method});return n}async function u(e,n={},a=!1){var l;let c,f,d,{method:p="GET",headers:h={},body:g,signal:m,timeoutMs:y=15e3,isFormData:w=!1,cache:A=a?"force-cache":"no-store",schema:b,...x}=n,_=function(e,t){if(e.startsWith("http"))return e;if(t){let t=(0,r.getServerApiBaseUrl)().replace(/\/$/,"");return`${t}${e}`}if(!e.startsWith("/api/v1/"))return`${window.location.origin}${e}`;let n=r.env.NEXT_PUBLIC_API_BASE_URL.replace(/\/$/,"");return`${n}${e}`}(e,a);y>0&&"u">typeof setTimeout&&(c=new AbortController,f=setTimeout(()=>{c?.abort()},y));let k={Accept:"application/json",...h},v=(k.Accept??k.accept??"").includes("application/json"),{body:T,contentType:S}=(l=w||g instanceof FormData,null==g?{body:void 0}:g instanceof FormData||l||"string"==typeof g||g instanceof Blob||g instanceof ArrayBuffer?{body:g}:{body:JSON.stringify(g),contentType:"application/json"});S&&!k["Content-Type"]&&(k["Content-Type"]=S),d=m&&c?"function"==typeof AbortSignal.any?AbortSignal.any([m,c.signal]):m:m??c?.signal;try{let e=await fetch(_,{method:p,headers:k,body:T,signal:d,cache:A,...x});if(!e.ok){let r,n=e.headers.get("content-type");try{r=n?.includes("application/json")?await e.json():await e.text()}catch{r=e.statusText}throw new i({status:e.status,message:(0,t.errorMessageFromBody)(r,e.statusText),data:r,path:_,method:p})}let r=await s(e,{expectsJson:v,path:_,method:p}),n=b?o(b,r,{path:_,method:p}):r;return f&&clearTimeout(f),n}catch(e){if(f&&clearTimeout(f),e instanceof Error&&"AbortError"===e.name){if(m?.aborted)throw e;throw new i({status:408,message:"Request timeout",data:null,path:_,method:p})}if(e&&"object"==typeof e&&"status"in e)throw e;throw new i({status:0,message:e instanceof Error?e.message:"Unknown error occurred",data:e,path:_,method:p})}}
1e.s(["ApiError",0,i,"baseFetch",0,u,"parseWithSchema",0,o])},717767,353733,e=>{"use strict";let t;var r=e.i(293019);e.i(289341);var n=e.i(914838);let i="auth-tokens";function a(){let e=null;try{let t=localStorage.getItem(i);if(t){let r=JSON.parse(t);"object"==typeof r&&null!==r&&"access_token"in r&&"refresh_token"in r&&"string"==typeof r.access_token&&r.access_token.length>0&&"string"==typeof r.refresh_token&&r.refresh_token.length>0&&(e={access_token:r.access_token,refresh_token:r.refresh_token})}}catch{}finally{try{localStorage.removeItem(i)}catch{e=null}let t="Thu, 01 Jan 1970 00:00:00 GMT",r="https:"===window.location.protocol?"; Secure":"";try{document.cookie=`access_token=; path=/; expires=${t}${r}`,document.cookie=`refresh_token=; path=/; expires=${t}${r}`}catch{}}return e}let o=null,s=null;async function u(e){if(!o)return null;if(s?.sessionKey===e)return s.promise;let t=o,r=(async()=>{try{return await t()}catch{return null}})(),n={sessionKey:e,promise:r};s=n;let i=()=>{s===n&&(s=null)};return r.then(i,i),r}function l(){return(0,n.getAuthBridge)()?.getSessionCacheKey()??null}function c(e){return null!==e&&l()===e}async function f(){void 0===t&&await (0,n.getAuthBridge)()?.whenBootSettled?.()}function d(e,t){return async(...r)=>{let n=r[t],i=n?.requireAuth!==!1;i&&await f();let a=i?l():null;try{return await e(...r)}catch(t){if(!i||!("object"==typeof t&&null!==t&&"status"in t)||401!==t.status||!o||!c(a)||!await u(a)||!c(a))throw t;return await e(...r)}}}let p=(0,r.createApiClient)(function(){return t},!1),h={get:d(p.get,1),post:d(p.post,2),put:d(p.put,2),patch:d(p.patch,2),delete:d(p.delete,1)};e.s(["browserApi",0,h,"clearAuthTokens",0,function(){t=void 0,a()},"consumeLegacyAuthTokens",0,a,"setAuthAccessToken",0,function(e){t=e},"setTokenRefresher",0,function(e){o=e}],353733),e.s(["browserClient",0,h],717767)},124622,384561,e=>{"use strict";let t=e=>({success:!0,data:e}),r=(e,t)=>({success:!1,error:{issues:[{path:e,message:t}]}}),n=e=>({success:!1,error:{issues:e}});function i(e){return{_parse:e,safeParse:t=>e(t,[])}}let a=e=>"_parse"in e?e:i(t=>e.safeParse(t)),o=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function s(e={}){return i((n,i)=>"string"!=typeof n?r(i,"expected string"):void 0!==e.min&&n.length<e.min?r(i,`expected at least ${e.min} characters`):void 0!==e.max&&n.length>e.max?r(i,`expected at most ${e.max} characters`):e.regex&&!e.regex.test(n)?r(i,"invalid format"):t(n))}function u(e={}){return i((n,i)=>"number"==typeof n&&Number.isFinite(n)?e.int&&!Number.isInteger(n)?r(i,"expected integer"):void 0!==e.min&&n<e.min?r(i,`expected >= ${e.min}`):void 0!==e.max&&n>e.max?r(i,`expected <= ${e.max}`):t(n):r(i,"expected number"))}function l(){return i(e=>t(e))}function c(e){let r=a(e);return i((e,n)=>void 0===e?t(void 0):r._parse(e,n))}function f(e){let r=a(e);return i((e,n)=>null===e?t(null):r._parse(e,n))}function d(e,o={}){let s=a(e);return i((e,i)=>{if(!Array.isArray(e))return r(i,"expected array");if(void 0!==o.min&&e.length<o.min)return r(i,`expected at least ${o.min} items`);if(void 0!==o.max&&e.length>o.max)return r(i,`expected at most ${o.max} items`);let a=[],u=[];return e.forEach((e,t)=>{let r=s._parse(e,[...i,t]);r.success?a.push(r.data):u.push(...r.error.issues)}),u.length>0?n(u):t(a)})}function p(e,s){let u=a(e),l=a(s);return i((e,i)=>{if(!o(e))return r(i,"expected object");let a={},s=[];for(let[t,r]of Object.entries(e)){let e=u._parse(t,[...i,t]);if(!e.success){s.push(...e.error.issues);continue}let n=l._parse(r,[...i,t]);n.success?a[t]=n.data:s.push(...n.error.issues)}return s.length>0?n(s):t(a)})}function h(e){let r=e.map(a);return i((e,i)=>{let a=[];for(let n of r){let r=n._parse(e,i);if(r.success)return t(r.data);a.push(...r.error.issues)}return n(a)})}function g(e,s){let u=Object.entries(e).map(([e,t])=>[e,a(t)]),l=new Set(Object.keys(e));return i((e,i)=>{if(!o(e))return r(i,"expected object");let a="passthrough"===s?{...e}:{},c=[];for(let[t,r]of u){let n=r._parse(e[t],[...i,t]);if(!n.success){c.push(...n.error.issues);continue}(void 0!==n.data||t in e)&&(a[t]=n.data)}if("strict"===s)for(let t of Object.keys(e))l.has(t)||c.push({path:[...i,t],message:"unrecognized key"});return c.length>0?n(c):t(a)})}function m(e){return g(e,"strip")}e.s(["array",0,d,"boolean",0,function(){return i((e,n)=>"boolean"==typeof e?t(e):r(n,"expected boolean"))},"catchValue",0,function(e,r){let n=a(e);return i((e,i)=>{let a=n._parse(e,i);return a.success?a:t(r)})},"enumOf",0,function(e){return i((n,i)=>"string"==typeof n&&e.includes(n)?t(n):r(i,`expected one of ${e.join(" | ")}`))},"literal",0,function(e){return i((n,i)=>n===e?t(e):r(i,`expected ${JSON.stringify(e)}`))},"looseObject",0,function(e){return g(e,"passthrough")},"nullable",0,f,"nullish",0,function(e){return c(f(e))},"number",0,u,"object",0,m,"optional",0,c,"record",0,p,"refine",0,function(e,t,n="invalid value"){let o=a(e);return i((e,i)=>{let a=o._parse(e,i);return a.success&&!t(a.data)?r(i,n):a})},"strictObject",0,function(e){return g(e,"strict")},"string",0,s,"transform",0,function(e,r){let n=a(e);return i((e,i)=>{let a=n._parse(e,i);return a.success?t(r(a.data)):a})},"union",0,h,"unknown",0,l],384561);let y=m({code:s(),message:c(s())}),w=m({message:c(s()),msg:c(s())}),A=m({field:c(s()),loc:c(d(h([s(),u()]))),code:c(s()),type:c(s()),message:c(s()),msg:c(s()),ctx:c(p(s(),l()))}),b=new Set(["body","query","path","header","cookie"]);function x(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _(e){if("string"!=typeof e)return null;let t=e.trim();return t.length>0?t:null}function k(e){if("string"==typeof e){let t=_(e);return t?{field:null,code:null,message:t,ctx:{}}:null}let t=A.safeParse(e);if(!t.success)return null;let r=t.data,n=_(r.field)??function(e){if(!e)return null;let t=e.filter(e=>"string"==typeof e&&e.length>0),r=t[0];if(void 0===r)return null;let n=b.has(r)?t.slice(1):t;return n.length>0?n.join("."):null}(r.loc),i=_(r.code)??_(r.type),a=_(r.message)??_(r.msg);return null===n&&null===i&&null===a?null:{field:n,code:i,message:a,ctx:function(e){let t={};if(!e)return t;for(let[r,n]of Object.entries(e))"string"==typeof n?t[r]=n:("number"==typeof n||"boolean"==typeof n)&&(t[r]=String(n));return t}(r.ctx)}}function v(e){let t=function(e){if(!x(e))return null;if("text"===e.kind&&"string"==typeof e.text)return{kind:"text",text:e.text};
1if("coded"===e.kind&&"string"==typeof e.code&&x(e.context))return{kind:"coded",code:e.code,message:"string"==typeof e.message?e.message:null,context:e.context};if("fields"===e.kind&&Array.isArray(e.issues)){let t=e.issues.map(k).filter(e=>null!==e);return t.length>0?{kind:"fields",issues:t}:null}return null}(e);if(t)return t;let r="string"==typeof e?_(e):null;if(r)return{kind:"text",text:r};if("string"==typeof e)return null;if(Array.isArray(e)){let t=e.map(k).filter(e=>null!==e);return t.length>0?{kind:"fields",issues:t}:null}if(x(e)){let t=y.safeParse(e),r=t.success?_(t.data.code):null;if(r)return{kind:"coded",code:r,message:t.success?_(t.data.message):null,context:function(e){let t={};for(let[r,n]of Object.entries(e))"code"!==r&&"message"!==r&&(t[r]=n);return t}(e)};let n=w.safeParse(e),i=n.success?_(n.data.message)??_(n.data.msg):null;if(i)return{kind:"text",text:i}}return null}function T(e){if(!x(e))return;let t=e.data;return x(t)&&void 0!==t.detail?t.detail:e.detail}function S(e){return v(T(e))}function $(e){if(!e)return null;if("text"===e.kind)return e.text;if("coded"===e.kind)return e.message;let t=e.issues.map(e=>e.message?e.field?`${e.field}: ${e.message}`:e.message:null).filter(e=>null!==e);return t.length>0?t.join("; "):null}let E=/^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function B(e){return E.test(e.trim())}e.s(["detailToText",0,$,"errorMessageFromBody",0,function(e,t){if("string"==typeof e)return _(e)??t;let r=$(v(T(e)));if(r)return r;if(x(e)&&"string"==typeof e.message){let t=_(e.message);if(t)return t}return t},"isMachineToken",0,B,"parseErrorDetail",0,v,"readErrorCode",0,function(e){let t=S(e);if(t?.kind==="coded")return t.code;if(!x(e))return null;let r="string"==typeof e.code?_(e.code):null;if(r)return r;let n=e.data;return x(n)&&"string"==typeof n.code?_(n.code):null},"readErrorDetail",0,S,"readRawDetail",0,T,"toDisplayText",0,function(e){let t="string"==typeof e?_(e):null;if(t)return B(t)?null:t;if(!x(e))return null;let r="string"==typeof e.user_message?_(e.user_message):null;if(r)return r;let n=$(v(e));return n?B(n)?null:n:null}],124622)},69295,e=>{"use strict";e.s(["hasTelegramLaunchSignal",()=>a]);var t=e.i(628682);let r=["tgWebAppData","tgWebAppPlatform"],n=["tgWebAppData","tgWebAppStartParam"];function i(e,t){return t.some(t=>{let r=e(t);return"string"==typeof r&&""!==r})}function a(){if((0,t.getWebApp)())return(0,t.isInTelegramEnv)()||(0,t.isTelegramMiniApp)();let e=new URLSearchParams(window.location.hash.replace(/^#/,""));if(i(t=>e.get(t),r))return!0;let a=new URLSearchParams(window.location.search);if(i(e=>a.get(e),n))return!0;let o=function(){try{let e=window.sessionStorage.getItem("__telegram__initParams");if(!e)return null;let t=JSON.parse(e);if("object"!=typeof t||null===t||Array.isArray(t))return null;return t}catch{return null}}();return null!==o&&i(e=>o[e],r)}},628682,e=>{"use strict";e.s(["getRawInitData",()=>n,"getTelegramPlatform",()=>a,"getTelegramSafeAreaInsets",()=>p,"getWebApp",()=>r,"hapticImpact",()=>l,"hapticNotify",()=>c,"hideBackButton",()=>m,"isInTelegramEnv",()=>o,"isTelegramMiniApp",()=>i,"onTelegramSafeAreaChanged",()=>h,"readyAndExpand",()=>f,"shouldDeliverToTelegram",()=>s,"showBackButton",()=>g,"whenWebAppReady",()=>b]);var t=e.i(69295);function r(){return window.Telegram?.WebApp??null}function n(){let e=r();return e&&"string"==typeof e.initData&&e.initData.length>0?e.initData:null}function i(){return null!==n()}function a(){return r()?.platform??null}function o(){let e=a();return null!==e&&"unknown"!==e}function s(){return o()}function u(e){let t=r();try{return t?.isVersionAtLeast?.(e)??!1}catch{return!1}}function l(e="light"){let t=r();if(t&&u("6.1"))try{t.HapticFeedback.impactOccurred(e)}catch{}}function c(e){let t=r();if(t&&u("6.1"))try{t.HapticFeedback.notificationOccurred(e)}catch{}}function f(){let e=r();e&&(e.ready(),e.expand())}let d={top:0,right:0,bottom:0,left:0};function p(){let e=r(),t=e?.safeAreaInset??d,n=e?.contentSafeAreaInset??d;return{top:(t.top??0)+(n.top??0),right:(t.right??0)+(n.right??0),bottom:(t.bottom??0)+(n.bottom??0),left:(t.left??0)+(n.left??0)}}function h(e){let t=r();if(!t)return()=>{};let n=["safeAreaChanged","contentSafeAreaChanged","fullscreenChanged","viewportChanged"];
1return n.forEach(r=>t.onEvent(r,e)),()=>n.forEach(r=>t.offEvent(r,e))}function g(e){let t=r();return t&&u("6.1")?(t.BackButton.onClick(e),t.BackButton.show(),()=>{t.BackButton.offClick(e),t.BackButton.hide()}):()=>{}}function m(){u("6.1")&&r()?.BackButton.hide()}let y=new Set,w=null;function A(){if(w=null,0===y.size)return;let e=r();if(e){let t=Array.from(y);y.clear(),t.forEach(({resolve:t})=>t(e));return}let t=Date.now();y.forEach(e=>{t<e.deadline||(y.delete(e),e.resolve(null))}),y.size>0&&(w=setTimeout(A,60))}function b(e=2500){let n=r();if(n)return Promise.resolve(n);if(!(0,t.hasTelegramLaunchSignal)()||e<=0)return Promise.resolve(null);let i=new Promise(t=>{y.add({deadline:Date.now()+e,resolve:t})});return w||(w=setTimeout(A,60)),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.