PageSourceSearch

https://falando.app/_next/static/chunks/2066.0587732824642375.js

js falando.app collected 2026-09-24 14:10:15 UTC 30,268 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="146c4d7a-7aae-467a-95b7-caff6038745a",e._sentryDebugIdIdentifier="sentry-dbid-146c4d7a-7aae-467a-95b7-caff6038745a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2066,11948,12858,32475,43672,44805,46004,67020,67186,89567,89652],{2111:(e,t,r)=>{let n;function a(e){n=e}function i(){return n}r.d(t,{K:()=>i,u:()=>a})},7837:(e,t,r)=>{r.d(t,{Pq:()=>a,_l:()=>i,d0:()=>n});let n=24;function a(e){return Array.from(e).length>n}function i(e){let t=Array.from(e);return t.length>n?t.slice(0,n-1).join("").trimEnd()+"…":e}},12107:(e,t,r)=>{r.d(t,{Y:()=>n});async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15e3,r=arguments.length>2?arguments[2]:void 0,n=new AbortController,a=()=>n.abort(new DOMException("Request cancelled","AbortError"));r?.aborted?a():r?.addEventListener("abort",a,{once:!0});let i=setTimeout(()=>n.abort(new DOMException("Request timed out","TimeoutError")),t),o=()=>{},u=new Promise((e,t)=>{o=()=>t(n.signal.reason),n.signal.aborted?o():n.signal.addEventListener("abort",o,{once:!0})});try{return await Promise.race([n.signal.aborted?u:e(n.signal),u])}finally{clearTimeout(i),r?.removeEventListener("abort",a),n.signal.removeEventListener("abort",o)}}},12510:(e,t,r)=>{r.d(t,{h:()=>a});var n=r(91993);class a extends Error{kind;status;code;userMessageKey;constructor(e){super(e.message),this.name="ApiError",this.kind=e.kind,this.status=e.status,this.code=e.code,this.userMessageKey=(0,n.do)(e.kind)}get retryable(){return(0,n.r3)(this.kind)}}},14239:(e,t,r)=>{r.d(t,{U:()=>h});var n=r(63118),a=r(58102),i=r(84566);class o{constructor(){throw Error("WebSocket is unavailable in this runtime (e.g. iOS Lockdown Mode); Supabase realtime is disabled.")}}var u=r(82289);let l=JSON.parse('{"O":"falando.app","J":"polango.app"}'),s={falando:{name:"Falando",host:l.O,origin:`https://${l.O}`,deploymentAliases:["falando-patrykgrabowski.vercel.app"],language:"pt-BR",native:{appId:"app.falando",userAgent:"FalandoApp",cookie:"falando_native"},features:{reviews:!0,quickPractice:!0,mistakesPractice:!0,verbConjugation:!0,idiomsTrainer:!0,realTalk:!0,celpeBras:!0,youtube:!0,bringYourOwnContent:!0,blog:!0},environment:{url:"NEXT_PUBLIC_SUPABASE_URL",anonKey:"NEXT_PUBLIC_SUPABASE_ANON_KEY",serviceKey:"SUPABASE_SERVICE_ROLE_KEY"}},polango:{name:"Polango",host:l.J,origin:`https://${l.J}`,deploymentAliases:[],language:"pl",native:{appId:"app.polango",userAgent:"PolangoApp",cookie:"polango_native"},features:{reviews:!0,quickPractice:!0,mistakesPractice:!0,verbConjugation:!1,idiomsTrainer:!0,realTalk:!0,celpeBras:!1,youtube:!0,bringYourOwnContent:!0,blog:!0},environment:{url:"NEXT_PUBLIC_POLANGO_SUPABASE_URL",anonKey:"NEXT_PUBLIC_POLANGO_SUPABASE_ANON_KEY",serviceKey:"POLANGO_SUPABASE_SERVICE_ROLE_KEY"}}},c=Object.keys(s);function d(e){if(!Object.prototype.hasOwnProperty.call(s,e))throw Error(`Unknown product: ${e}`);return s[e]}var p=r(82402);let f=new Map;function h(){return function(e){let{url:t,anonKey:r}=function(e,t){let r=function(e,t){let r=d(e).environment,n=t[r.url];if(!n)throw Error(`Missing Supabase configuration for ${e}: ${r.url} is required`);let a=function(e,t){try{let e=new URL(t),r=["localhost","127.0.0.1","[::1]"].includes(e.hostname);if(e.username||e.password||e.search||e.hash||"/"!==e.pathname||"https:"!==e.protocol&&!("http:"===e.protocol&&r))throw Error();return e.origin}catch{throw Error(`Invalid Supabase URL for ${e}`)}}(e,n);for(let r of c)if(r!==e&&function(e){if(!e)return null;try{return new URL(e).origin}catch{return null}}(t[d(r).environment.url])===a)throw Error("Products must use different Supabase projects");return a}(e,t),n=d(e).environment.anonKey,a=t[n];if(!a)throw Error(`Missing Supabase configuration for ${e}: ${n} is required`);return{url:r,anonKey:a}}(e,{NEXT_PUBLIC_SUPABASE_URL:"https://ydgcqtcholscrspngsox.supabase.co",NEXT_PUBLIC_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlkZ2NxdGNob2xzY3JzcG5nc294Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTQ0MzA2MDYsImV4cCI6MjA3MDAwNjYwNn0.c93lnnTMfCfkLkeuQrY-qLi5XyoK14plH7nE9TWV5CY",NEXT_PUBLIC_POLANGO_SUPABASE_URL:p.env.NEXT_PUBLIC_POLANGO_SUPABASE_URL,NEXT_PUBLIC_POLANGO_SUPABASE_ANON_KEY:p.env.NEXT_PUBLIC_POLANGO_SUPABASE_ANON_KEY}),l=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return d(e),JSON.stringify(["product",e,...r])}(e,t,r),s=f.get(l);if(s)return s;let h=(0,u.k)(t,r,{isSingleton:!1,cookies:a.k9,global:{fetch:n.D0},auth:{lock:function(){if(void 0!==globalThis.navigator&&"function"==typeof globalThis.navigator.locks?.request)return i.JS}()},realtime:{transport:function(){try{if("u">typeof WebSocket)return WebSocket}catch{}return o}()}});return f.set(l,h),h}("falando")}},17241:(e,t,r)=>{r.d(t,{R0:()=>f,T9:()=>w,XK:()=>v,hx:()=>y,r9:()=>g,tA:()=>c,vA:()=>d,x4:()=>E,xl:()=>b});var n=r(76949),a=r(31832);function i(e){let t=globalThis?.Capacitor,r=t&&"object"==typeof t?t.Plugins:void 0;return r?.[e]}function o(){return i("Subscriptions")}function u(){return i("FalandoBilling")}async function l(e){let t=u();if(!t?.getPurchases)return[];try{return(await t.getPurchases({productType:e})).purchases??[]}catch(t){return console.warn(`[nativeBilling] getPurchases({ productType: '${e}' }) threw:`,t),[]}}let s=new Set([3,4,-2]);function c(e){let t=e||"";if("Purchase canceled by user"===t)return"user_cancelled";let r=t.match(/\(code=(-?\d+)\)/),n=r?Number(r[1]):null;return 1===n?"user_cancelled":7===n?"already_owned":null!==n&&s.has(n)?"unavailable":"other"}
1class d extends Error{constructor(e){super(e||"Google Play billing is unavailable on this device"),this.name="AndroidBillingUnavailableError"}}async function p(e){if(!(0,n.t)()||!e)return null;let t=o();if(!t?.getProductDetails)return null;try{let r=await t.getProductDetails({productIdentifier:e});if(0!==r.responseCode||!r.data?.price)return console.warn(`[nativeBilling] getProductDetails for "${e}" returned code=${r.responseCode}: ${r.responseMessage}`),null;return{productId:e,priceString:r.data.price}}catch(e){return console.warn("[nativeBilling] getAndroidProductDetails threw:",e),null}}async function f(e){if(!(0,n.t)()||!e)return null;if(u()?.getPurchases){let t=(await l("subs")).find(t=>(t.productIds??[]).includes(e)&&!!t.purchaseToken);return t?.purchaseToken??null}let t=o();if(!t?.getLatestTransaction)return null;try{let r=await t.getLatestTransaction({productIdentifier:e});if(0!==r.responseCode||!r.data?.purchaseToken)return null;return r.data.purchaseToken}catch(e){return console.warn("[nativeBilling] getLatestAndroidPurchaseToken threw:",e),null}}async function h(e){if(!(0,n.t)())return{error:"Not running on native Android"};let t=o();return t?m(t,e):{error:"No billing plugin detected in this build."}}async function m(e,t){return new Promise(async r=>{let n=!1,a=null,i=null,o=null,u=null,l=e=>{n||(n=!0,i&&clearTimeout(i),o&&clearTimeout(o),u&&clearInterval(u),Promise.resolve(a?.remove()).catch(()=>{}),r(e))},s=async()=>{try{let r=await e.getLatestTransaction({productIdentifier:t});if(0===r.responseCode&&r.data?.purchaseToken)return l({purchaseToken:r.data.purchaseToken,productId:t,raw:r}),!0}catch{}return!1};i=setTimeout(()=>l({error:"Purchase timed out (5 minutes)"}),3e5);try{a=await e.addListener("ANDROID-PURCHASE-RESPONSE",async e=>{e?.fired&&await s()});let r=await e.purchaseProduct({productIdentifier:t});if(0!==r.responseCode){await s()||l({error:`purchaseProduct failed (code=${r.responseCode}: ${r.responseMessage})`});return}o=setTimeout(()=>{u=setInterval(()=>{s()},3e3)},8e3)}catch(e){l({error:e instanceof Error?e.message:"Squareetlabs purchase setup failed"})}})}async function g(){if(!(0,n.t)())return{monthly:!1,annual:!1,lifetime:!1,subscriptionReplacement:!1};let e=u();if(e?.getCapabilities)try{let t=await e.getCapabilities();return{monthly:!!t.subscriptions&&!!(0,a.Jk)("monthly"),annual:!!t.annual&&!!(0,a.Jk)("annual"),lifetime:!!t.lifetime&&!!(0,a.Jk)("lifetime"),subscriptionReplacement:!!t.subscriptionReplacement&&!!(0,a.Jk)("annual")}}catch(e){console.warn("[nativeBilling] getCapabilities threw, falling back to legacy tier:",e)}return{monthly:!!o()&&!!(0,a.WX)(),annual:!1,lifetime:!1,subscriptionReplacement:!1}}async function w(e,t){if(!(0,n.t)())return{error:"Not running on native Android"};let r=u();if(r?.purchaseSubscription){let n=(0,a.Jk)(e);if(!n)return{error:`Google Play product for plan "${e}" is not configured`};try{let e=await r.purchaseSubscription({productId:n.productId,...n.basePlanId?{basePlanId:n.basePlanId}:{},...t?.oldPurchaseToken?{oldPurchaseToken:t.oldPurchaseToken}:{}});return{purchaseToken:e.purchaseToken,productId:e.productId,pending:!0===e.pending,raw:e}}catch(e){return{error:e instanceof Error?e.message:"Play subscription purchase failed"}}}if(t?.oldPurchaseToken)return{error:"This app version cannot switch plans — update the app"};if("monthly"!==e)return{error:"This app version cannot purchase the annual plan — update the app"};let i=(0,a.WX)();return i?h(i):{error:"Legacy Google Play monthly product is not configured"}}async function y(){if(!(0,n.t)())return{error:"Not running on native Android"};let e=(0,a.Jk)("lifetime");if(!e)return{error:"Google Play lifetime product is not configured"};let t=u();if(!t?.purchaseOneTime)return{error:"This app version cannot purchase lifetime — update the app"};try{let r=await t.purchaseOneTime({productId:e.productId});return{purchaseToken:r.purchaseToken,productId:r.productId,pending:!0===r.pending,raw:r}}catch(e){return{error:e instanceof Error?e.message:"Play lifetime purchase failed"}}}async function b(){let e={monthly:null,annualTotal:null,annualPerMonth:null,lifetime:null,savingsPercent:null};if(!(0,n.t)())return e;let t=(0,a.Jk)("monthly"),r=(0,a.Jk)("annual"),i=(0,a.Jk)("lifetime"),o=u();if(o?.getProducts)try{let n=[],a=r?.productId??t?.productId??null;if(a&&n.push({productId:a,type:"subs"}),i&&n.push({productId:i.productId,type:"inapp"}),0===n.length)return e;let u=await o.getProducts({products:n}),l={...e},s=null,c=null;for(let e of u.products??[]){if("inapp"===e.type&&i&&e.productId===i.productId){l.lifetime=e.formattedPrice??null;continue}for(let n of e.basePlans??[])t?.basePlanId&&n.basePlanId===t.basePlanId?(l.monthly=n.formattedPrice,s=n.priceAmountMicros):r?.basePlanId&&n.basePlanId===r.basePlanId?(l.annualTotal=n.formattedPrice,c=n.priceAmountMicros,l.annualPerMonth=function(e,t){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e/1e6)}catch{return null}}(n.priceAmountMicros/12,n.currencyCode)):t?.basePlanId||l.monthly||(l.monthly=n.formattedPrice,s=n.priceAmountMicros)}return s&&c&&s>0&&(l.savingsPercent=Math.max(0,Math.round((1-c/(12*s))*100))),l}catch(t){return console.warn("[nativeBilling] getAndroidPlanPrices threw:",t),e}if(t){let r=await p(t.productId);return{...e,monthly:r?.priceString??null}}return e}async function v(){if(!(0,n.t)())return null;let e=(0,a.Jk)("lifetime");if(!e)return null;let t=(await l("inapp")).find(t=>(t.productIds??[]).includes(e.productId)&&!!t.purchaseToken);return t?{purchaseToken:t.purchaseToken,productId:e.productId}:null}
1async function E(){if(!(0,n.t)())return null;let e=(await l("subs")).find(e=>!!e.purchaseToken);return e?{purchaseToken:e.purchaseToken,productId:(e.productIds??[])[0]??null}:null}},19233:(e,t,r)=>{r.r(t),r.d(t,{AndroidPurchaseRecovery:()=>d});var n=r(12115),a=r(82222),i=r(46004),o=r(76949),u=r(17241),l=r(31832),s=r(76638),c=r(53584);function d(){let e=(0,c.useSupabaseAuthStore)(e=>e.user?.id),t=(0,a.useRouter)();return(0,n.useEffect)(()=>{if(!e||!(0,o.t)())return;let r=!1,n=!1,a=[],d=()=>!r&&c.useSupabaseAuthStore.getState().user?.id===e,p=function(e){let t=new Set,r=null;async function n(){let r=new Set([(0,l.WX)(),(0,l.Jk)("monthly")?.productId,(0,l.Jk)("annual")?.productId]),n=[];for(let t of r){if(!e())return!1;if(!t)continue;let r=await (0,u.R0)(t);r&&n.push({purchaseToken:r,productId:t,productType:"subs"})}if(!e())return!1;let a=await (0,u.XK)();a?.productId&&n.push({purchaseToken:a.purchaseToken,productId:a.productId,productType:"inapp"});let i=!1;for(let r of n){if(!e())return!1;if(t.has(r.purchaseToken))continue;let n=await fetch("/api/google-play/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,sourceFeature:(0,s.Ag)()})}),a=await n.json();if(!n.ok||!a.ok)throw Error(`Android purchase recovery failed (${n.status})`);"active"===a.status&&(t.add(r.purchaseToken),i=!0)}return i&&e()&&(0,s.Ti)(),i}return()=>(r||(r=n().finally(()=>{r=null})),r)}(d),f=async()=>{if(d()&&!n&&"hidden"!==document.visibilityState&&navigator.onLine){n=!0;try{await p()&&d()&&(await c.useSupabaseAuthStore.getState().refreshUserProfile({silent:!0}),d()&&t.refresh())}catch(e){console.error("Android purchase recovery failed:",e)}finally{n=!1}}},h=()=>{if(a.splice(0).forEach(clearTimeout),f(),(0,s.Gj)())for(let e of[15e3,6e4])a.push(setTimeout(()=>void f(),e))},m=()=>{"visible"===document.visibilityState&&h()},g=i.App.addListener("appStateChange",e=>{let{isActive:t}=e;t&&h()});return document.addEventListener("visibilitychange",m),window.addEventListener("online",h),h(),()=>{r=!0,a.forEach(clearTimeout),document.removeEventListener("visibilitychange",m),window.removeEventListener("online",h),g.then(e=>e.remove()).catch(e=>console.error("Billing listener cleanup failed:",e))}},[e,t]),null}},31832:(e,t,r)=>{r.d(t,{Jk:()=>h,PD:()=>p,WX:()=>f,kq:()=>d,pt:()=>m,tS:()=>a});var n=r(82402);function a(e){return"monthly"===e||"annual"===e||"lifetime"===e}class i extends Error{constructor(e){super(e),this.name="MissingPlanConfigError"}}let o={monthly:"NEXT_PUBLIC_PADDLE_PRICE_ID_MONTHLY",annual:"NEXT_PUBLIC_PADDLE_PRICE_ID_ANNUAL",lifetime:"NEXT_PUBLIC_PADDLE_PRICE_ID_LIFETIME"},u=["NEXT_PUBLIC_PADDLE_PRODUCT_ID","NEXT_PUBLIC_PADDLE_PRICE_ID"];function l(e){return e&&e.length>0?e:null}function s(){return l("falando_premium_monthly")}function c(){return l("falando_premium_monthly")}function d(e){switch(e){case"monthly":return l(n.env.NEXT_PUBLIC_PADDLE_PRICE_ID_MONTHLY)??l("pri_01ksfzkjwggbmccrs72v8y1mqh")??l(n.env.NEXT_PUBLIC_PADDLE_PRICE_ID);case"annual":return l("pri_01kwhvbe3xe60e3v05qhzvzw9r");case"lifetime":return l("pri_01kwhy47yywp6e6e4nmqgqrcj0")}}function p(e){let t=d(e);if(t)return t;if("monthly"===e)throw new i(`Paddle price ID for plan "monthly" is not configured — set one of ${o.monthly}, ${u.join(", ")}`);throw new i(`Paddle price ID for plan "${e}" is not configured — set ${o[e]}`)}function f(){return c()}function h(e){switch(e){case"monthly":{let e=s(),t=l("monthly");if(e&&t)return{productId:e,basePlanId:t,productType:"subs"};let r=c();if(r)return{productId:r,basePlanId:null,productType:"subs"};return null}case"annual":{let e=s(),t=l("annual");if(e&&t)return{productId:e,basePlanId:t,productType:"subs"};return null}case"lifetime":{let e=l("premium_lifetime");if(e)return{productId:e,basePlanId:null,productType:"inapp"};return null}}}function m(e){switch(e){case"monthly":{let e=l("app.falando.premium.monthly");return e?{productId:e,productType:"subs"}:null}case"annual":{let e=l("app.falando.premium.annual");return e?{productId:e,productType:"subs"}:null}case"lifetime":{let e=l("app.falando.premium.lifetime");return e?{productId:e,productType:"inapp"}:null}}}},32475:(e,t,r)=>{r.r(t),r.d(t,{supabase:()=>n});let n=(0,r(14239).U)()},37411:(e,t,r)=>{async function n(e){return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",
1new TextEncoder().encode(e)))).map(e=>e.toString(16).padStart(2,"0")).join("")}async function a(){let e=crypto.randomUUID();return{raw:e,hashed:await n(e)}}r.d(t,{y:()=>a})},43672:(e,t,r)=>{r.r(t),r.d(t,{ApiError:()=>n.h,apiFetch:()=>f,reportClientError:()=>w});var n=r(12510),a=r(2111),i=r(12107),o=r(7724),u=r(57189),l=r(22265),s=r(91993),c=r(63118);function d(e){return"server"===e||"db_down"===e||"unknown"===e}function p(e,t){return e&&"object"==typeof e?{message:"string"==typeof e.error&&e.error||"string"==typeof e.message&&e.message||t,code:"string"==typeof e.code?e.code:void 0}:"string"==typeof e&&e.trim()?{message:e.slice(0,300)}:{message:t}}async function f(e){let t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!1===navigator.onLine||!(0,c.getNetworkStatus)().online||!1===(0,c.getNetworkStatus)().serverReachable){let{readOfflineApi:t}=await Promise.all([r.e(93263),r.e(62059)]).then(r.bind(r,93263)),n=await t(e,a);if(n)return n.data}let{timeoutMs:o=15e3,...f}=a,h=f;try{(0,l.x)()&&(h=await (0,u.prepareAIRequest)(e,f))}catch(e){if(e instanceof u.AIConsentDeclinedError)throw new n.h({kind:"validation",message:e.message,status:428,code:"AI_CONSENT_REQUIRED"});throw e}let{signal:m,headers:g,...y}=h,b=new Headers(g);b.has("Accept")||b.set("Accept","application/json");let v=null,E=!1;try{t=await (0,i.Y)(async t=>{let r=await fetch(e,{...y,headers:b,signal:t}),n=(r.headers.get("content-type")??"").includes("application/json");try{v=n?await r.json():await r.text()}catch(e){if(t.aborted)throw t.reason;if(e instanceof TypeError)throw e;E=n}return r},o,m)}catch(r){let e=r instanceof DOMException&&"TimeoutError"===r.name?"timeout":(0,s.xO)(r);m?.aborted||"network"!==e&&"db_down"!==e&&"server"!==e&&"timeout"!==e||(0,c.Jz)();let t=new n.h({kind:e,message:r instanceof Error?r.message:"Request failed"});throw d(e)&&w({kind:e,message:t.message,source:"client"}),t}if(t.ok){if(E)throw new n.h({kind:"network",message:"Malformed response body",status:t.status});let e=v;if(e&&"object"==typeof e&&!1===e.success){let{message:r,code:a}=p(v,"Request failed"),i=(0,s.nW)({status:t.status,code:a,body:e});throw("db_down"===i||"server"===i)&&(0,c.Jz)(),new n.h({kind:i,message:r,status:t.status,code:a})}(0,c.Qy)();var P=v;return P&&"object"==typeof P&&!0===P.success&&"data"in P?P.data:P}let{message:k,code:I}=p(v,`Request failed (${t.status})`),S=(0,s.nW)({status:t.status,code:I,body:v});("db_down"===S||"server"===S)&&(0,c.Jz)();let A=new n.h({kind:S,message:k,status:t.status,code:I});throw d(S)&&w({kind:S,message:k,code:I,source:"client",statusCode:t.status}),A}let h=new Map,m=Date.now(),g=0;function w(e){try{let t=Date.now();if(t-m>6e4&&(m=t,g=0),g>=20)return;let r=e.path??window.location?.pathname??"unknown",n=`${e.kind??"unknown"}|${e.message}|${r}`,i=h.get(n);if(i&&t-i<3e4)return;if(h.set(n,t),h.size>100)for(let[e,r]of h)t-r>3e4&&h.delete(e);g++;let u=JSON.stringify({message:String(e.message).slice(0,2e3),kind:e.kind?String(e.kind).slice(0,64):void 0,source:e.source??"client",code:e.code?String(e.code).slice(0,200):void 0,path:String(r).slice(0,500),componentStack:e.componentStack?String(e.componentStack).slice(0,4e3):void 0,stack:e.stack?String(e.stack).slice(0,4e3):void 0,statusCode:e.statusCode,critical:!0===e.critical||"render"===e.source||void 0,surface:(0,o.EK)()?"capacitor":"web",version:"1.129.0",release:"dc2902631221720ebedded5e011e82a9aa7c211e",appSessionId:(0,a.K)()});fetch("/api/internal/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:u,keepalive:!0}).catch(()=>{})}catch{}}},46004:(e,t,r)=>{r.r(t),r.d(t,{App:()=>n});let n=(0,r(72338).registerPlugin)("App",{web:()=>r.e(566).then(r.bind(r,566)).then(e=>new e.AppWeb)})},51336:(e,t,r)=>{function n(e){try{let t="string"==typeof e?.message?e.message.toLowerCase():"",r=(e?.code||"").toString().toLowerCase(),n="number"==typeof e?.status?e.status:void 0;if(t.includes("timeout")||t.includes("timed out")||t.includes("failed to fetch")||t.includes("fetch failed")||t.includes("load failed")||t.includes("network")||"ecnnreset"===r||"econnreset"===r||"etimedout"===r||"number"==typeof n&&n>=500||["500","502","503","504"].includes(r))return!0}catch{}return!1}async function a(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300;for(let i=0;i<=r;i++)try{return await e()}catch(e){if(t=e,!n(e)||i===r)throw e;await function(e){return new Promise(t=>setTimeout(t,e))}(a*Math.pow(2,i))}throw t}async function i(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e4;try{return await Promise.race([Promise.resolve(e),new Promise((e,n
1)=>{t=setTimeout(()=>n(Error("Request timeout")),r)})])}finally{void 0!==t&&clearTimeout(t)}}async function o(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12e3;try{return await Promise.race([Promise.resolve(e),new Promise((e,n)=>{t=setTimeout(()=>n(Error("Authentication request timeout - please check your connection")),r)})])}catch(e){throw e instanceof Error&&e.message.includes("timeout"),e}finally{void 0!==t&&clearTimeout(t)}}async function u(e,t){let r=t?.timeoutMs??3e4;return a(()=>i(e(),r),t?.retries??2)}async function l(e,t){let r=t?.timeoutMs??12e3;return a(()=>o(e(),r),t?.retries??1)}r.d(t,{Nj:()=>u,bD:()=>a,bV:()=>n,jl:()=>l,wj:()=>i})},57189:(e,t,r)=>{r.d(t,{AIConsentDeclinedError:()=>b,BM:()=>c,DH:()=>g,RQ:()=>E,TC:()=>d,Yq:()=>y,hasAISharingConsent:()=>m,prepareAIRequest:()=>v,zG:()=>w});var n=r(22265),a=r(72307);let i="falando.aiSharing.v1.",o=new Set,u=new Set,l=new Set,s=null,c=e=>(l.add(e),()=>{l.delete(e)}),d=()=>s,p=()=>{l.forEach(e=>e())};async function f(){let{useSupabaseAuthStore:e}=await Promise.all([r.e(25730),r.e(34916),r.e(93263),r.e(53584),r.e(84334),r.e(5072)]).then(r.bind(r,53584));return e.getState().user?.id??"guest"}function h(e){if(u.has(e))return!1;try{let t=localStorage.getItem(i+e);if(null!==t)return t===a.pg}catch{}return o.has(e)}async function m(){return!(0,n.x)()||h(await f())}function g(e){let t=s;s=null,t?.resolve(e),p()}async function w(){let e=await f();o.delete(e),u.add(e);try{localStorage.setItem(i+e,"denied")}catch{}s?.scope===e&&g(!1),p()}async function y(e){let t,r;if(e?.aborted)return!1;if(!(0,n.x)())return!0;let l=await f();if(e?.aborted)return!1;if(h(l))return!0;if(s&&s.scope!==l&&g(!1),!s){let e,t=new Promise(t=>{e=t});s={scope:l,resolve:e,promise:t,waiters:0},p()}let c=s;c.waiters+=1;let d=new Promise(e=>{t=e}),m=()=>{t(!1)};e?.addEventListener("abort",m,{once:!0}),e?.aborted&&m();try{r=await Promise.race([c.promise,d])}finally{e?.removeEventListener("abort",m),c.waiters-=1,0===c.waiters&&s===c&&g(!1)}if(!r||e?.aborted||await f()!==l)return!1;o.add(l),u.delete(l);try{localStorage.setItem(i+l,a.pg)}catch{}return p(),!0}class b extends Error{constructor(){super("AI sharing permission is required."),this.name="AIConsentDeclinedError"}}async function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,n.x)())return t;let r="u">typeof Request&&e instanceof Request?e:null,i=new URL(r?.url??String(e),window.location.origin);if(i.origin!==window.location.origin||!(0,a.WP)(i.pathname,t.method??r?.method??"GET"))return t;let o=t.signal??r?.signal,u=await y(o);if(o?.aborted)throw new DOMException("AI request cancelled","AbortError");if(!u)throw new b;let l=new Headers(t.headers??r?.headers);return l.set(a.M6,a.pg),{...t,headers:l}}async function E(e,t){if(!(0,n.x)())return fetch(e,t);try{return await fetch(e,await v(e,t))}catch(e){if(!(e instanceof b))throw e;return new Response(JSON.stringify({success:!1,error:e.message,code:"AI_CONSENT_REQUIRED"}),{status:428,headers:{"Content-Type":"application/json"}})}}},58102:(e,t,r)=>{r.d(t,{L$:()=>o,SH:()=>i,k9:()=>u});var n=r(71413);let a="falando_remember_session";function i(){return!!("u"<typeof document)||"0"!==(0,n.vU)(document.cookie).find(e=>e.name===a)?.value}function o(e){if(document.cookie=(0,n.Gb)(a,e?"1":"0",{path:"/",sameSite:"lax",secure:"https:"===window.location.protocol,...e?{maxAge:31536e3}:{}}),(0,n.vU)(document.cookie).find(e=>e.name===a)?.value!==(e?"1":"0"))throw Error("Could not save sign-in preference")}let u={getAll:()=>"u"<typeof document?[]:(0,n.vU)(document.cookie).map(e=>{let{name:t,value:r}=e;return{name:t,value:r??""}}),setAll(e){if("u"<typeof document)return;let t=i();for(let{name:r,value:a,options:i}of e)document.cookie=(0,n.Gb)(r,a,function(e,t,r,n){if(n||!t||0===r.maxAge||!/^sb-.+-auth-token(?:\.\d+)?$/.test(e))return r;let a={...r};return delete a.maxAge,delete a.expires,a}(r,a,i,t))}}},63118:(e,t,r)=>{r.d(t,{D0:()=>v,Jz:()=>b,Qy:()=>h,getNetworkStatus:()=>m,pG:()=>S,rP:()=>g});let n={online:!0,since:Date.now(),source:"initial",serverReachable:!0,serverSince:Date.now()},a=new Set,i=!1,o=null,u=!1,l=!1,s=0,c=0;function d(){for(let e of a)try{e(n)}catch(e){console.warn("network-status listener threw:",e)}}function p(e){e.online&&(c=0),(e.online!==n.online||e.source!==n.source)&&(n={...n,online:e.online,since:Date.now(),source:e.source},d(),k())}function f(e){e!==n.serverReachable&&(n={...n,serverReachable:e,serverSince:Date.now()},d(),k())}function h(){f(!0)}function m(){return!i&&"u">typeof document&&(!1===navigator.onLine||document.querySelector('meta[name="falando-offline"]'))?{...n,online:!1,serverReachable:!1}:n}function g(e){return a.add(e),()=>{a.delete(e)}}async function w(){try{let[e,t]=await Promise.all([Promise.resolve().then(r.bind(r,72338)),r.e(99159).then(r.bind(r,99159))]);if(!e.Capacitor.isNativePlatform())return;let n=await t.Network.getStatus();p({online:n.connected,source:"capacitor"}),await t.Network.addListener("networkStatusChange",e=>{p({online:e.connected,source:"capacitor"})})}catch(e){}}async function y(){if(l)return;l=!0,s=Date.now();let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{let t=await fetch("/api/health",{method:"HEAD",cache:"no-store",signal:e.signal});c=0,t.ok?f(!0):f(!1),n.online||p({online:!0,source:"health-check"})}catch{c+=1,f(!1);let e="u">typeof navigator&&!1===navigator.onLine;n.online&&(e||c>=2)&&p({online:!1,source:"health-check"})}finally{clearTimeout(t),l=!1,P()}}function b(){l||Date.now()-s<6e4||y()}function v(e,t){return fetch(e,t).catch(e=>{var r,n;throw r=e,n=t?.signal,n?.aborted||r instanceof Error&&"AbortError"===r.name||b(),e})}function E(){return"u"<typeof document||"visible"===document.visibilityState}function P(){u&&!o&&(o=setTimeout(()=>{o=null,y()},n.online&&n.serverReachable?3e5:6e4))}function k(){u&&(o&&(clearTimeout(o),o=null),P())}function I(){E()?(y(),u=!0,P()):(u=!1,o&&(clearTimeout(o),o=null))}function S(){if(i)return;i=!0;let e=!!document.querySelector('meta[name="falando-offline"]');p({online:navigator.onLine&&!e,source:"browser"}),e&&(f(!1),y()),window.addEventListener("online",()=>p({online:!0,source:"browser"})),window.addEventListener("offline",()=>p({online:!1,source:"browser"})),w(),"u">typeof document&&document.addEventListener("visibilitychange",I),E()&&(u=!0,P())}},76638:(e,t,r)=>{r.d(t,{Ag:()=>l,Gj:()=>o,Ti:()=>u,tF:()=>i});let n="falando:billing:pendingPurchaseSource";function a(){try{return window.localStorage}catch{return null}}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),r=a();if(r&&e)try{r.setItem(n,JSON.stringify({feature:e,at:t}))}catch{}}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=a();if(!t)return null;try{let r=t.getItem(n);if(!r)return null;let a=JSON.parse(r),i="string"==typeof a.feature?a.feature.trim():"",o="number"==typeof a.at&&Number.isFinite(a.at)?a.at:null;if(!i||null===o||e-o>6048e5)return null;return i}catch{return null}}function u(){let e=a();if(e)try{e.removeItem(n)}catch{}}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();return o(e)??"restore"}},92285:(e,t,r)=>{r.d(t,{M_:()=>n,O:()=>h,R:()=>d,W4:()=>s,aj:()=>a,gh:()=>i,hE:()=>p,p:()=>f,q4:()=>c,vi:()=>l});let n={correctAnswer:10,incorrectAnswer:0,streakBonus:5,grammarPointMastered:25,dailyGoalMet:25,weeklyGoalBasePerDay:30,perfectReview:20,conjugationCorrect:1,vocabularyMastered:5,listeningMastered:6,idiomMeaningCorrect:1,idiomSentenceCorrect:3};function a(e,t){return t?`${e}_manual`:e}let i={white:{requiredExp:0,maxStripes:4},blue:{requiredExp:12e3,maxStripes:4},purple:{requiredExp:36e3,maxStripes:4},brown:{requiredExp:72e3,maxStripes:4},black:{requiredExp:144e3,maxStripes:6},coral:{requiredExp:288e3,maxStripes:6},red:{requiredExp:576e3,maxStripes:6}},o=["white","blue","purple","brown","black","coral","red"];function u(e){return 10*o.indexOf(e.rank)+e.stripe}function l(e){let t,r=Math.max(0,Math.trunc(e)),n="white";for(let e=o.length-1;e>=0;
1e-=1){let t=o[e];if(r>=i[t].requiredExp){n=t;break}}let a=o.indexOf(n),u=i[n],l=o[a+1];if(l){let e=(i[l].requiredExp-u.requiredExp)/(u.maxStripes+1);t=Math.min(u.maxStripes,Math.floor((r-u.requiredExp)/e))}else t=u.maxStripes;return{rank:n,stripe:t,experience:0,requiredExperience:u.requiredExp}}let s=(e,t)=>{if(!e)return{type:"stripe",expNeeded:0};let r=e.rank,n=e.stripe,a=t||e.experience,o=i[r],u=o.maxStripes;if(n<u){let e=c(r);if(e){let t=i[e].requiredExp,r=o.requiredExp,l=r+(t-r)/(u+1)*(n+1);return a>=l?{type:"stripe",expNeeded:0}:{type:"stripe",expNeeded:l-a}}}let l=c(r);if(l){let e=i[l].requiredExp;if(!(a>=e))return{type:"rank",expNeeded:e-a}}return{type:"rank",expNeeded:0}},c=e=>{let t=o.indexOf(e);return t<o.length-1?o[t+1]:null},d={white:{bg:"bg-white border-gray-300 text-gray-700",ring:"ring-gray-300",hex:"#e5e7eb"},blue:{bg:"bg-blue-500 text-white",ring:"ring-blue-500",hex:"#3b82f6"},purple:{bg:"bg-purple-500 text-white",ring:"ring-purple-500",hex:"#a855f7"},brown:{bg:"bg-amber-700 text-white",ring:"ring-amber-700",hex:"#b45309"},black:{bg:"bg-gray-900 text-white",ring:"ring-gray-900",hex:"#111827"},coral:{bg:"bg-[#FF6F61] text-white",ring:"ring-[#FF6F61]",hex:"#FF6F61"},red:{bg:"bg-red-600 text-white",ring:"ring-red-600",hex:"#dc2626"}},p=e=>d[e]?.bg??"bg-gray-300 text-gray-700",f=e=>{switch(e){case"white":default:return"Faixa Branca";case"blue":return"Faixa Azul";case"purple":return"Faixa Roxa";case"brown":return"Faixa Marrom";case"black":return"Faixa Preta";case"coral":return"Faixa Coral";case"red":return"Faixa Vermelha"}},h=(e,t,r)=>{let n=l(Math.max(0,Math.trunc((r??0)+t)));if(!e)return{newBelt:n,promoted:!1};let a=u(e),o=u(n);return o>a?{newBelt:n,promoted:!0,promotionType:n.rank===e.rank?"stripe":"rank"}:{newBelt:o===a?n:{...e,experience:0,requiredExperience:i[e.rank].requiredExp},promoted:!1}}}}]);

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.