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]="5c5ef175-2311-af72-2fea-c6d5d7884b01")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,719568,e=>{e.v({wrapper:"geo-redirect-banner-module__uLSAta__wrapper"})},146560,(e,t,n)=>{try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}!function(){"use strict";var e={};e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==e&&(e.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected][email protected]__@[email protected]_@playwri_60f37789bf2c73823c622653c0423689/node_modules/next/dist/compiled/web-vitals/");var n={};e.r(n),e.d(n,{CLSThresholds:function(){return P},FCPThresholds:function(){return j},FIDThresholds:function(){return ee},INPThresholds:function(){return D},LCPThresholds:function(){return K},TTFBThresholds:function(){return z},onCLS:function(){return k},onFCP:function(){return S},onFID:function(){return et},onINP:function(){return x},onLCP:function(){return q},onTTFB:function(){return H}});var r,a,o,s,i,l=-1,u=function(e){addEventListener("pageshow",function(t){t.persisted&&(l=t.timeStamp,e(t))},!0)},d=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=function(){var e=d();return e&&e.activationStart||0},y=function(e,t){var n=d(),r="navigate";return l>=0?r="back-forward-cache":n&&(document.prerendering||c()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:r}},f=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},g=function(e,t,n,r){var a,o;return function(s){var i;t.value>=0&&(s||r)&&((o=t.value-(a||0))||void 0===a)&&(a=t.value,t.delta=o,i=t.value,t.rating=i>n[1]?"poor":i>n[0]?"needs-improvement":"good",e(t))}},p=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},m=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},M=function(e){var t=!1;return function(){t||(e(),t=!0)}},h=-1,_=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},w=function(e){"hidden"===document.visibilityState&&h>-1&&(h="visibilitychange"===e.type?e.timeStamp:0,E())},v=function(){addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0)},E=function(){removeEventListener("visibilitychange",w,!0),removeEventListener("prerenderingchange",w,!0)},A=function(){return h<0&&(h=_(),v(),u(function(){setTimeout(function(){h=_(),v()},0)})),{get firstHiddenTime(){return h}}},b=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},j=[1800,3e3],S=function(e,t){t=t||{},b(function(){var n,r=A(),a=y("FCP"),o=f("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-c(),0),a.entries.push(e),n(!0)))})});o&&(n=g(e,a,j,t.reportAllChanges),u(function(r){n=g(e,a=y("FCP"),j,t.reportAllChanges),p(function(){a.value=performance.now()-r.timeStamp,n(!0)})}))})},P=[.1,.25],k=function(e,t){t=t||{},S(M(function(){var n,r=y("CLS",0),a=0,o=[],s=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];a&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e])}}),a>r.value&&(r.value=a,r.entries=o,n())},i=f("layout-shift",s);i&&(n=g(e,r,P,t.reportAllChanges),m(function(){s(i.takeRecords()),n(!0)}),u(function(){a=0,n=g(e,r=y("CLS",0),P,t.reportAllChanges),p(function(){return n()})}),setTimeout(n,0))}
2))},T=0,I=1/0,L=0,C=function(e){e.forEach(function(e){e.interactionId&&(I=Math.min(I,e.interactionId),T=(L=Math.max(L,e.interactionId))?(L-I)/7+1:0)})},O=function(){"interactionCount"in performance||r||(r=f("event",C,{type:"event",buffered:!0,durationThreshold:0}))},U=[],R=new Map,B=0,N=[],G=function(e){if(N.forEach(function(t){return t(e)}),e.interactionId||"first-input"===e.entryType){var t=U[U.length-1],n=R.get(e.interactionId);if(n||U.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};R.set(r.id,r),U.push(r)}U.sort(function(e,t){return t.latency-e.latency}),U.length>10&&U.splice(10).forEach(function(e){return R.delete(e.id)})}}},F=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=M(e),"hidden"===document.visibilityState?e():(n=t(e),m(e)),n},D=[200,500],x=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},b(function(){O();var n,a,o=y("INP"),s=function(e){F(function(){e.forEach(G);var t,n=(t=Math.min(U.length-1,Math.floor(((r?T:performance.interactionCount||0)-B)/50)),U[t]);n&&n.latency!==o.value&&(o.value=n.latency,o.entries=n.entries,a())})},i=f("event",s,{durationThreshold:null!=(n=t.durationThreshold)?n:40});a=g(e,o,D,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),m(function(){s(i.takeRecords()),a(!0)}),u(function(){B=0,U.length=0,R.clear(),a=g(e,o=y("INP"),D,t.reportAllChanges)}))}))},K=[2500,4e3],W={},q=function(e,t){t=t||{},b(function(){var n,r=A(),a=y("LCP"),o=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach(function(e){e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-c(),0),a.entries=[e],n())})},s=f("largest-contentful-paint",o);if(s){n=g(e,a,K,t.reportAllChanges);var i=M(function(){W[a.id]||(o(s.takeRecords()),s.disconnect(),W[a.id]=!0,n(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return F(i)},!0)}),m(i),u(function(r){n=g(e,a=y("LCP"),K,t.reportAllChanges),p(function(){a.value=performance.now()-r.timeStamp,W[a.id]=!0,n(!0)})})}})},z=[800,1800],V=function e(t){document.prerendering?b(function(){return e(t)}):"complete"!==document.readyState?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},H=function(e,t){t=t||{};var n=y("TTFB"),r=g(e,n,z,t.reportAllChanges);V(function(){var a=d();a&&(n.value=Math.max(a.responseStart-c(),0),n.entries=[a],r(!0),u(function(){(r=g(e,n=y("TTFB",0),z,t.reportAllChanges))(!0)}))})},X={passive:!0,capture:!0},$=new Date,J=function(e,t){a||(a=t,o=e,s=new Date,Q(removeEventListener),Y())},Y=function(){if(o>=0&&o<s-$){var e={entryType:"first-input",name:a.type,target:a.target,cancelable:a.cancelable,startTime:a.timeStamp,processingStart:a.timeStamp+o};i.forEach(function(t){t(e)}),i=[]}},Z=function(e){if(e.cancelable){var t,n,r,a=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){J(a,e),r()},n=function(){r()},r=function(){removeEventListener("pointerup",t,X),removeEventListener("pointercancel",n,X)},addEventListener("pointerup",t,X),addEventListener("pointercancel",n,X)):J(a,e)}},Q=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,Z,X)})},ee=[100,300],et=function(e,t){t=t||{},b(function(){var n,r=A(),s=y("FID"),l=function(e){e.startTime<r.firstHiddenTime&&(s.value=e.processingStart-e.startTime,s.entries.push(e),n(!0))},d=function(e){e.forEach(l)},c=f("first-input",d);n=g(e,s,ee,t.reportAllChanges),c&&(m(M(function(){d(c.takeRecords()),c.disconnect()})),u(function(){n=g(e,s=y("FID"),ee,t.reportAllChanges),i=[],o=-1,a=null,Q(addEventListener),i.push(l),Y()}))})};t.exports=n}()},163214,(e,t,n)=>{"use strict";try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useReportWebVitals",{enumerable:!0,get:function(){return s}});let a=e.r(533337),o=e.r(146560);function s(e){(0,a.useEffect)(()=>{(0,o.onCLS)(e),(0,o.onFID)(e),(0,o.onLCP)(e),(0,o.onINP)(e),(0,o.onFCP)(e),(0,o.onTTFB)(e)},[e])}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
2dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},905923,(e,t,n)=>{try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}t.exports=e.r(163214)},836042,953549,825530,368505,e=>{"use strict";var t,n,r,a=e.i(968946),o=e.i(219175),s=e.i(651442),i=e.i(533337);e.i(913646);var l=e.i(550017),u=e.i(280854),d=e.i(602259);try{var c=window;c._sentryModuleMetadata=c._sentryModuleMetadata||{},c._sentryModuleMetadata[(new c.Error).stack]=Object.assign({},c._sentryModuleMetadata[(new c.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}var y=((t={}).EMAIL="email",t.GOOGLE="google",t.APPLE="apple",t),f=((n={}).LOGIN="login",n.SIGN_UP="signUp",n);e.s(["AuthFlow",()=>f,"AuthMethod",()=>y],953549);var g=e.i(772738);try{var p=window;p._sentryModuleMetadata=p._sentryModuleMetadata||{},p._sentryModuleMetadata[(new p.Error).stack]=Object.assign({},p._sentryModuleMetadata[(new p.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}g.z.config({jitless:!0});let m=g.z.object({method:g.z.enum([y.EMAIL,y.GOOGLE,y.APPLE]),flow:g.z.enum([f.LOGIN,f.SIGN_UP]),acceptsDirectMarketing:g.z.boolean().optional(),acceptsPersonalizedMarketing:g.z.boolean().optional(),terminal:g.z.custom().optional(),itemFields:g.z.object({itemId:g.z.string().optional(),itemName:g.z.string().optional(),itemCategory:g.z.string().optional()}).optional()}),M="pending_authentication",h=()=>{try{sessionStorage.removeItem(M)}catch(e){console.error("Unable to clear pending authentication:",e)}},_=()=>{try{let e=sessionStorage.getItem(M);if(!e)return null;let t=m.safeParse(JSON.parse(e));if(t.success)return t.data;return null}catch(e){return console.error("Unable to parse pending authentication:",e),null}};e.s(["clearPendingAuthentication",0,h,"getPendingAuthentication",0,_,"savePendingAuthentication",0,e=>{try{sessionStorage.setItem(M,JSON.stringify(e))}catch(e){console.error("Unable to save pending authentication:",e)}}],825530);try{var w=window;w._sentryModuleMetadata=w._sentryModuleMetadata||{},w._sentryModuleMetadata[(new w.Error).stack]=Object.assign({},w._sentryModuleMetadata[(new w.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}try{var v=window;v._sentryModuleMetadata=v._sentryModuleMetadata||{},v._sentryModuleMetadata[(new v.Error).stack]=Object.assign({},v._sentryModuleMetadata[(new v.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}var E=((r={}).PENDING="pending",r.SUCCESS="success",r.FAILURE="failure",r.LOGGED_OUT="logged_out",r);e.s(["AuthValidationStatus",()=>E],368505);try{var A=window;A._sentryModuleMetadata=A._sentryModuleMetadata||{},A._sentryModuleMetadata[(new A.Error).stack]=Object.assign({},A._sentryModuleMetadata[(new A.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let b={user:null,authError:null,validationStatus:E.PENDING},j=(e,t)=>{switch(t.type){case"SET_USER":return{...e,user:t.payload};case"SET_AUTH_ERROR":return{...e,authError:t.payload};case"SET_VALIDATION_STATUS":return{...e,validationStatus:t.payload};case"UPDATE":return{...e,...t.payload};case"RESET":return b;default:return e}};var S=e.i(433014);try{var P=window;P._sentryModuleMetadata=P._sentryModuleMetadata||{},P._sentryModuleMetadata[(new P.Error).stack]=Object.assign({},P._sentryModuleMetadata[(new P.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}try{var k=window;k._sentryModuleMetadata=k._sentryModuleMetadata||{},k._sentryModuleMetadata[(new k.Error).stack]=Object.assign({},k._sentryModuleMetadata[(new k.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let T=(0,i.createContext)(void 0);e.s(["AuthProvider",0,({children:e})=>{let[t,n]=(0,i.useReducer)(j,b),r=(0,l.useLocale)(),c=(0,s.useTranslations)("AuthProvider"),y=e=>n({type:"SET_USER",payload:e}),g=e=>n({type:"SET_AUTH_ERROR",payload:e}),p=e=>n({type:"SET_VALIDATION_STATUS",payload:e}),m=e=>n({type:"UPDATE",payload:e}),M=e=>{m({user:e,authError:null,validationStatus:E.SUCCESS})},w=()=>{m({user:null,authError:null,validationStatus:E.LOGGED_OUT})},v=async(e,t,n,r)=>{await A(),m({user:null,authError:{source:e,message:((e,t,n,r)=>{if(r){switch(r.code){case"auth/account-exists-with-different-credential":return e("errors.login.accountExistsDifferentCredentials");case"auth/too-many-requests":return e("errors.tooManyRequests");case"auth/email-already-in-use":return e("errors.signUp.emailAlreadyInUse");case"auth/invalid-credential":if(t===f.SIGN_UP)return e("errors.signUp.invalidCredentials");if(t===f.LOGIN)return e("errors.login.invalidCredentials");break;case"auth/invalid-email":if(t===f.SIGN_UP)return e("errors.signUp.invalidEmail");if(t===f.LOGIN)return e("errors.login.invalidEmail");break;default:return e("errors.general")}return}return n?e("USER_NOT_FOUND"===n&&t===f.LOGIN?"errors.login.userNotFound":"INVALID_USER_STORE"===n&&t===f.LOGIN?"errors.login.invalidUserStore":"INVALID_EMAIL"===n&&t===f.SIGN_UP?"errors.signUp.invalidEmail":"INVALID_EMAIL"===n&&t===f.LOGIN?"errors.login.invalidEmail":"errors.general"):e("errors.general")})(c,t,r,n)},validationStatus:E.FAILURE})},A=async()=>{try{await S.signOut()}finally{w(),h()}}
2,P=async()=>{let e=_();try{let t=await S.getRedirectUser();if(!t)return v("sso",e?.flow,null,null);let n=await t.getIdToken();switch(e?.flow){case f.SIGN_UP:{let a=await (0,d.createStorytelUser)(r,n,e.acceptsDirectMarketing,e.acceptsPersonalizedMarketing,e.terminal,e.itemFields);if(a.status===o.CreateUserStatus.Success)return M(t);if("INVALID_EMAIL"===a.failReason){let e=await (0,u.loginStorytelUser)(n,r);return e.success?M(t):v("sso",f.LOGIN,null,e.failReason)}return v("sso",f.SIGN_UP,null,a.failReason)}case f.LOGIN:{let e=await (0,u.loginStorytelUser)(n,r);return e.success?M(t):v("sso",f.LOGIN,null,e.failReason)}default:return w()}}catch(t){return v("sso",e?.flow,t,null)}},k={setUser:y,setAuthError:g,setValidationStatus:p,updateAuth:m,resetAuth:()=>n({type:"RESET"}),signOut:A,loginWithEmail:async(e,t)=>{try{let{credentials:n,result:a}=await S.loginWithEmail(e,t,r);return a.success?M(n.user):v("submit",f.LOGIN,null,a.failReason)}catch(e){return v("submit",f.LOGIN,e,null)}},signUpWithEmail:async(e,t,n,a,s,i)=>{try{let{credentials:l,result:u}=await S.signUpWithEmail(e,t,r,n,a,s,i);return u.status===o.CreateUserStatus.Success?M(l.user):v("submit",f.SIGN_UP,null,u.failReason)}catch(e){return v("submit",f.SIGN_UP,e,null)}}
2,signInWithGoogle:async()=>{try{await S.signInWithGoogle()}catch(e){return v("sso",f.LOGIN,e,null)}},signInWithApple:async()=>{try{await S.signInWithApple()}catch(e){return v("sso",f.LOGIN,e,null)}}};(0,i.useEffect)(()=>{let e=async()=>{await P()};_()?e():p(E.LOGGED_OUT)},[]);let I=(0,i.useMemo)(()=>({state:t,actions:k}),[t]);return(0,a.jsx)(T.Provider,{value:I,children:e})},"useAuth",0,()=>{let e=(0,i.useContext)(T);if(!e)throw Error("useAuth must be used within AuthProvider");return e}],836042)},433014,e=>{"use strict";e.i(517327);var t=e.i(410913),n=e.i(819258),r=e.i(905359),a=e.i(803256),o=e.i(983508),s=e.i(641651),i=e.i(649033),l=e.i(205120),u=e.i(280854),d=e.i(602259);try{var c=window;c._sentryModuleMetadata=c._sentryModuleMetadata||{},c._sentryModuleMetadata[(new c.Error).stack]=Object.assign({},c._sentryModuleMetadata[(new c.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let y=new r.GoogleAuthProvider,f=new o.OAuthProvider("apple.com");f.addScope("email"),f.addScope("name");let g=async()=>{let e=(0,l.getFirebaseClient)();e&&await (0,n.signOut)(e)},p=async(e,t,n)=>{let r=(0,l.getFirebaseClient)();if(!r)throw Error("Firebase is not configured");let a=await (0,s.signInWithEmailAndPassword)(r,e,t),o=await a.user.getIdToken();return{credentials:a,result:await (0,u.loginStorytelUser)(o,n)}},m=async(e,n,r,a,o,s,i)=>{let u=(0,l.getFirebaseClient)();if(!u)throw Error("Firebase is not configured");let c=await (0,t.createUserWithEmailAndPassword)(u,e,n),y=await c.user.getIdToken();return{credentials:c,result:await (0,d.createStorytelUser)(r,y,a,o,s,i)}},M=async()=>{let e=(0,l.getFirebaseClient)();if(!e)throw Error("Firebase is not configured");await (0,i.signInWithRedirect)(e,y)},h=async()=>{let e=(0,l.getFirebaseClient)();if(!e)throw Error("Firebase is not configured");await (0,i.signInWithRedirect)(e,f)},_=async()=>{let e=(0,l.getFirebaseClient)();if(!e)return null;let t=await (0,a.getRedirectResult)(e);return t?.user??null};e.s(["getRedirectUser",0,_,"loginWithEmail",0,p,"signInWithApple",0,h,"signInWithGoogle",0,M,"signOut",0,g,"signUpWithEmail",0,m])},8867,e=>{"use strict";var t=e.i(354006),n=e.i(260844);try{var r=window;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let a=async()=>{try{let e=await fetch("/api/graphql/get-user",{headers:(0,n.addExperimentCookieHeaders)()});if(!e.ok)return{success:!0,res:null};let t=await e.json();return{success:!0,res:t}}catch(e){return console.warn("Failed to fetch user",e),{success:!1}}};e.s(["useUser",0,()=>{let{isLoading:e,isValidating:n,data:r}=(0,t.default)("/api/graphql/get-user",a);return{user:r?.success===!0?r.res:null,wasSuccess:r?.success||null,isLoading:e,isValidating:n}}])},830214,597092,e=>{"use strict";try{var t=window;t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[(new t.Error).stack]=Object.assign({},t._sentryModuleMetadata[(new t.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}e.s(["mergeMessages",0,function e(t,n){let r={...t};for(let a in n)n[a]&&"object"==typeof n[a]&&!Array.isArray(n[a])?r[a]=e(t[a]??{},n[a]):r[a]=n[a];return r}],830214);try{var n=window;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}e.s(["getTranslationLocaleWithFallback",0,e=>({es:"es-MX","es-CL":"es-MX","es-CO":"es-MX"})[e]??null],597092)},880427,e=>{"use strict";var t=e.i(702011);try{var n=window;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}e.s(["isGeoRedirectEnabled",0,e=>(0,t.getPublicConfig)().flagGeoRedirectLocales.includes(e),"isPayPerBookEnabled",0,e=>(0,t.getPublicConfig)().flagPPBLocales.includes(e)])},280854,602259,e=>{"use strict";var t=e.i(472967);try{var n=window;n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[(new n.Error).stack]=Object.assign({},n._sentryModuleMetadata[(new n.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let r=async(e,n)=>
2{try{let t=await fetch("/api/graphql/login",{method:"POST",body:JSON.stringify({locale:n}),headers:{"Content-Type":"application/json","x-gip-token":e}}),r=await t.json();if(!r?.success)return{success:!1,failReason:r.failReason};return{success:r.success,failReason:null}}catch(e){return t.logger.error({error:e},"Error logging in storytel user"),{success:!1,failReason:"Unknown error"}}};e.s(["loginStorytelUser",0,r],280854);var a=e.i(219175);try{var o=window;o._sentryModuleMetadata=o._sentryModuleMetadata||{},o._sentryModuleMetadata[(new o.Error).stack]=Object.assign({},o._sentryModuleMetadata[(new o.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let s=async(e,t,n,r,o,s)=>{let i={acceptsDirectMarketing:n,acceptsPersonalizedMarketing:r,locale:e,terminal:o,itemId:s?.itemId,itemName:s?.itemName,itemCategory:s?.itemCategory};try{let e=await fetch("/api/graphql/create-user",{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json","x-gip-token":t}});return await e.json()}catch(e){return{status:a.CreateUserStatus.Failed,failReason:"Unknown error"}}};e.s(["createStorytelUser",0,s],602259)},738297,e=>{"use strict";var t=e.i(968946),n=e.i(412724),r=e.i(596539),a=e.i(587069),o=e.i(307552),s=e.i(606595),i=e.i(550017);try{var l=window;l._sentryModuleMetadata=l._sentryModuleMetadata||{},l._sentryModuleMetadata[(new l.Error).stack]=Object.assign({},l._sentryModuleMetadata[(new l.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}function u({locale:e,...n}){if(!e)throw Error(void 0);return(0,t.jsx)(i.IntlProvider,{locale:e,...n})}var d=e.i(793614),c=e.i(603479),y=e.i(651442),f=e.i(533337),g=e.i(298318),p=e.i(880427),m=e.i(660685),M=e.i(719568);try{var h=window;h._sentryModuleMetadata=h._sentryModuleMetadata||{},h._sentryModuleMetadata[(new h.Error).stack]=Object.assign({},h._sentryModuleMetadata[(new h.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let _=({currentLocale:e,hasLocale:n})=>{let a=(0,y.useTranslations)("GeoRedirectBanner"),[o,s]=(0,f.useState)(null),[i,l]=(0,g.useLocalStorage)(g.LOCAL_STORAGE_KEYS.GEO_REDIRECT_DISMISSED,!1,2592e6),u=function(e,t){if(!e)return;let n=(0,r.getSafeLocaleFromLocale)(e);if(n&&n!==t)return n}(o,e),h=n&&!!u&&!i;(0,f.useEffect)(()=>{if(!n||i||function(){try{return globalThis.self!==globalThis.top}catch{return!0}}()||!(0,p.isGeoRedirectEnabled)(e))return;let t=new AbortController;return fetch("/api/geoip/",{signal:t.signal}).then(e=>e.json()).then(e=>{e.ipCountry&&s(e.ipCountry)}).catch(e=>{if("AbortError"===e.name)return}),()=>t.abort()},[e,n,i]);let _=(0,f.useRef)(null),w=(0,f.useRef)(!1);(0,f.useEffect)(()=>{h&&u&&!w.current&&(w.current=!0,(0,m.trackGeoBannerShownDL)(u))},[h,u]);let v=(0,f.useCallback)(()=>{l(!0)},[l]);if(!h||!o)return null;let E=function(e,t){try{return new Intl.DisplayNames([t],{type:"region"}).of(e.toUpperCase())??e.toUpperCase()}catch{return e.toUpperCase()}}(o,r.externalLocaleMap[e]??r.externalLocaleMap.default),A=(0,d.getDomain)(u),b=`${A}/${u}/`;return(0,t.jsx)("div",{ref:_,className:M.default.wrapper,children:(0,t.jsx)(c.AnnouncementBanner,{leadingText:a("leadingText",{country:E}),text:a("text",{country:E}),cta:{text:a("cta",{country:E}),href:b,trackingHandlers:[()=>(0,m.trackGeoBannerCtaClickedDL)(u)]},onClose:v})})};var w=e.i(905923);try{var v=window;v._sentryModuleMetadata=v._sentryModuleMetadata||{},v._sentryModuleMetadata[(new v.Error).stack]=Object.assign({},v._sentryModuleMetadata[(new v.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let E=new Set(["LCP","INP","FID","FCP","TTFB","CLS"]);try{var A=window;A._sentryModuleMetadata=A._sentryModuleMetadata||{},A._sentryModuleMetadata[(new A.Error).stack]=Object.assign({},A._sentryModuleMetadata[(new A.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}function b(){let e=(0,s.useRouter)(),t=(0,f.useRef)(e.pathname);t.current=e.pathname;let n=(0,f.useCallback)(e=>{!function(e,t){if(!E.has(e.name)||!(.1>Math.random())||"u"<typeof navigator||"function"!=typeof navigator.sendBeacon)return;let n=JSON.stringify({name:e.name,value:e.value,route:t});try{navigator.sendBeacon("/api/web-vitals",new Blob([n],{type:"application/json"}))}catch{}}(e,t.current)},[]);return(0,w.useReportWebVitals)(n),null}var j=e.i(836042),S=e.i(937570);try{var P=window;P._sentryModuleMetadata=P._sentryModuleMetadata||{},P._sentryModuleMetadata[(new P.Error).stack]=Object.assign({},P._sentryModuleMetadata[(new P.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let k=null,T=!1,I=!1,L=new Set,C=(e,t=!0)=>{for(let n of(k=e,T=t,L))n(k,T)};try{var O=window;O._sentryModuleMetadata=O._sentryModuleMetadata||{},O._sentryModuleMetadata[(new O.Error).stack]=Object.assign({},O._sentryModuleMetadata[(new O.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let U=!1;var R=e.i(8867);try{var B=window;B._sentryModuleMetadata=B._sentryModuleMetadata||{},B._sentryModuleMetadata[(new B.Error).stack]=Object.assign({},B._sentryModuleMetadata[(new B.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}var N=e.i(124544);try{var G=window;G._sentryModuleMetadata=G._sentryModuleMetadata||{},G._sentryModuleMetadata[(new G.Error).stack]=Object.assign({},G._sentryModuleMetadata[(new G.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let F="sentry_anonymous_id";try{var D=window;D._sentryModuleMetadata=D._sentryModuleMetadata||{},D._sentryModuleMetadata[(new D.Error).stack]=Object.assign({},D._sentryModuleMetadata[(new D.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let x=()=>((0,f.useEffect)(()=>{let e;(e=(()=>
2{if(void 0===globalThis.window)return null;try{let e=localStorage.getItem(F);return e||(e=crypto.randomUUID(),localStorage.setItem(F,e)),e}catch{return null}})())&&N.setUser({id:`anon-${e}`})},[]),null);var K=e.i(830214),W=e.i(597092);try{var q=window;q._sentryModuleMetadata=q._sentryModuleMetadata||{},q._sentryModuleMetadata[(new q.Error).stack]=Object.assign({},q._sentryModuleMetadata[(new q.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let z=async t=>{let n=(0,W.getTranslationLocaleWithFallback)(t)??r.TRANSLATION_SOURCE_LOCALE,[a,o]=await Promise.all([e.f({"./translations/ar-AE.json":{id:()=>586218,module:()=>e.A(586218)},"./translations/ar-EG.json":{id:()=>679295,module:()=>e.A(679295)},"./translations/ar-SA.json":{id:()=>919949,module:()=>e.A(919949)},"./translations/bg-BG.json":{id:()=>620373,module:()=>e.A(620373)},"./translations/da-DK.json":{id:()=>704485,module:()=>e.A(704485)},"./translations/de-DE.json":{id:()=>405449,module:()=>e.A(405449)},"./translations/en-001.json":{id:()=>440181,module:()=>e.A(440181)},"./translations/en-AU.json":{id:()=>375807,module:()=>e.A(375807)},"./translations/en-CA.json":{id:()=>81403,module:()=>e.A(81403)},"./translations/en-GB.json":{id:()=>208190,module:()=>e.A(208190)},"./translations/en-SG.json":{id:()=>67406,module:()=>e.A(67406)},"./translations/en-US.json":{id:()=>425751,module:()=>e.A(425751)},"./translations/en.json":{id:()=>429984,module:()=>e.A(429984)},"./translations/es-CL.json":{id:()=>410011,module:()=>e.A(410011)},"./translations/es-ES.json":{id:()=>95960,module:()=>e.A(95960)},"./translations/es-MX.json":{id:()=>85682,module:()=>e.A(85682)},"./translations/et-EE.json":{id:()=>694734,module:()=>e.A(694734)},"./translations/fi-FI.json":{id:()=>643355,module:()=>e.A(643355)},"./translations/fr-BE.json":{id:()=>780260,module:()=>e.A(780260)},"./translations/fr-FR.json":{id:()=>745446,module:()=>e.A(745446)},"./translations/he-IL.json":{id:()=>440221,module:()=>e.A(440221)},"./translations/id-ID.json":{id:()=>594480,module:()=>e.A(594480)},"./translations/is-IS.json":{id:()=>591299,module:()=>e.A(591299)},"./translations/it-IT.json":{id:()=>157498,module:()=>e.A(157498)},"./translations/ko-KR.json":{id:()=>636943,module:()=>e.A(636943)},"./translations/nl-BE.json":{id:()=>885275,module:()=>e.A(885275)},"./translations/nl-NL.json":{id:()=>277289,module:()=>e.A(277289)},"./translations/nn-NO.json":{id:()=>632797,module:()=>e.A(632797)},"./translations/pl-PL.json":{id:()=>885890,module:()=>e.A(885890)},"./translations/pt-BR.json":{id:()=>20939,module:()=>e.A(20939)},"./translations/sv-SE.json":{id:()=>8449,module:()=>e.A(8449)},"./translations/th-TH.json":{id:()=>890770,module:()=>e.A(890770)},"./translations/tr-TR.json":{id:()=>831910,module:()=>e.A(831910)}}).import(`./translations/${t}.json`).then(e=>e.default).catch(()=>({})),e.f({"./translations/ar-AE.json":{id:()=>586218,module:()=>e.A(586218)},"./translations/ar-EG.json":{id:()=>679295,module:()=>e.A(679295)},"./translations/ar-SA.json":{id:()=>919949,module:()=>e.A(919949)},"./translations/bg-BG.json":{id:()=>620373,module:()=>e.A(620373)},"./translations/da-DK.json":{id:()=>704485,module:()=>e.A(704485)},"./translations/de-DE.json":{id:()=>405449,module:()=>e.A(405449)},"./translations/en-001.json":{id:()=>440181,module:()=>e.A(440181)},"./translations/en-AU.json":{id:()=>375807,module:()=>e.A(375807)},"./translations/en-CA.json":{id:()=>81403,module:()=>e.A(81403)},"./translations/en-GB.json":{id:()=>208190,module:()=>e.A(208190)},"./translations/en-SG.json":{id:()=>67406,module:()=>e.A(67406)},"./translations/en-US.json":{id:()=>425751,module:()=>e.A(425751)},"./translations/en.json":{id:()=>429984,module:()=>e.A(429984)},"./translations/es-CL.json":{id:()=>410011,module:()=>e.A(410011)},"./translations/es-ES.json":{id:()=>95960,module:()=>e.A(95960)},"./translations/es-MX.json":{id:()=>85682,module:()=>e.A(85682)},"./translations/et-EE.json":{id:()=>694734,module:()=>e.A(694734)},"./translations/fi-FI.json":{id:()=>643355,module:()=>e.A(643355)},"./translations/fr-BE.json":{id:()=>780260,module:()=>e.A(780260)},"./translations/fr-FR.json":{id:()=>745446,module:()=>e.A(745446)},"./translations/he-IL.json":{id:()=>440221,module:()=>e.A(440221)},"./translations/id-ID.json":{id:()=>594480,module:()=>e.A(594480)},"./translations/is-IS.json":{id:()=>591299,module:()=>e.A(591299)}
2,"./translations/it-IT.json":{id:()=>157498,module:()=>e.A(157498)},"./translations/ko-KR.json":{id:()=>636943,module:()=>e.A(636943)},"./translations/nl-BE.json":{id:()=>885275,module:()=>e.A(885275)},"./translations/nl-NL.json":{id:()=>277289,module:()=>e.A(277289)},"./translations/nn-NO.json":{id:()=>632797,module:()=>e.A(632797)},"./translations/pl-PL.json":{id:()=>885890,module:()=>e.A(885890)},"./translations/pt-BR.json":{id:()=>20939,module:()=>e.A(20939)},"./translations/sv-SE.json":{id:()=>8449,module:()=>e.A(8449)},"./translations/th-TH.json":{id:()=>890770,module:()=>e.A(890770)},"./translations/tr-TR.json":{id:()=>831910,module:()=>e.A(831910)}}).import(`./translations/${n}.json`).then(e=>e.default)]);return(0,K.mergeMessages)(o,a)};var V=e.i(659673);try{var H=window;H._sentryModuleMetadata=H._sentryModuleMetadata||{},H._sentryModuleMetadata[(new H.Error).stack]=Object.assign({},H._sentryModuleMetadata[(new H.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}try{var X=window;X._sentryModuleMetadata=X._sentryModuleMetadata||{},X._sentryModuleMetadata[(new X.Error).stack]=Object.assign({},X._sentryModuleMetadata[(new X.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}let $=({Component:e,pageProps:o,router:s,translations:i})=>{let l=Intl.DateTimeFormat().resolvedOptions().timeZone,d=o?.common?.isPreview??!1,c=s.query.locale||"tv";(()=>{let[e,t]=(0,f.useState)(k),[n,r]=(0,f.useState)(T);return(0,f.useEffect)(()=>{let a=(e,n)=>{t(e),r(n)};return L.add(a),(()=>{if(I)return;I=!0;let e=()=>{if((0,S.isLocalEnvironment)()){let e={necessary:!0,statistics:!1,marketing:!1,preferences:!1};console.debug("â ï¸ Initial local consent state:",e),C(e,!0);return}let e=window.Cookiebot?.consent;e&&C({necessary:e.necessary,statistics:e.statistics,marketing:e.marketing,preferences:e.preferences},!0)},t=()=>document.getElementById("__next")??document.querySelector("main"),n=()=>{let n;(n=t())&&n.removeAttribute("inert"),e()};globalThis.addEventListener("CookiebotOnDialogDisplay",()=>{let e=document.getElementById("cookiebanner"),n=t();e&&n&&n.setAttribute("inert","")}),globalThis.addEventListener("CookiebotOnAccept",n),globalThis.addEventListener("CookiebotOnDecline",n),e(),(0,S.isLocalEnvironment)()&&(console.debug("ð§ Local consent debugging enabled"),console.debug("ð¡ Use globalThis.simulateConsentChange(stats, marketing, prefs) to trigger changes"),globalThis.simulateConsentChange=(e=!0,t=!0,n=!0)=>{(0,S.isLocalEnvironment)()?(console.debug("𧪠Simulating consent change:",{statistics:e,marketing:t,preferences:n}),C({necessary:!0,statistics:e,marketing:t,preferences:n},!0)):console.warn("simulateConsentChange only works in local environment")})})(),(k!==e||T!==n)&&(t(k),r(T)),()=>{L.delete(a)}},[]),{hasStatisticsConsent:e?.statistics??!1,hasMarketingConsent:e?.marketing??!1,canPersonalize:(e?.statistics&&e?.preferences)??!1,...(0,S.isLocalEnvironment)()&&{simulateConsentChange:globalThis.simulateConsentChange}}})(),(0,f.useEffect)(()=>{let e;if(U||void 0===globalThis.window)return;U=!0;let t=t=>{clearTimeout(e),e=setTimeout(()=>{t.clientY<20&&(0,m.trackExitIntentDL)()},1e3)};return globalThis.addEventListener("mousemove",t),()=>{globalThis.removeEventListener("mousemove",t),clearTimeout(e),U=!1}},[]),(({pathname:e})=>{let{user:t,isLoading:n,wasSuccess:r}=(0,R.useUser)(),a=t?.profile?.id??null,o=r?!!a:null;return(0,f.useEffect)(()=>{window!==window.top||n||(async()=>{(0,m.trackUserInfoReady)({isLoggedIn:o,user:t??null})})()},[e,t,n,r])})({pathname:s.asPath});let y=(0,t.jsx)(a.LocaleProvider,{locale:c,children:(0,t.jsx)(u,{locale:c,timeZone:l,messages:i,children:(0,t.jsxs)(j.AuthProvider,{children:[(0,t.jsx)(x,{}),(0,t.jsx)(b,{}),(0,t.jsx)(_,{currentLocale:c,hasLocale:!!s.query.locale}),(0,t.jsx)(e,{...o})]})})});return d?(0,t.jsx)(n.ContentfulLivePreviewProvider,{locale:r.externalLocaleMap[c],enableInspectorMode:!0,enableLiveUpdates:!0,debugMode:(0,S.isLocalEnvironment)(),children:y}):y};$.getInitialProps=async e=>{var t;let n,a,s,i=await o.default.getInitialProps(e),l=e.router.query.locale||"tv",u=(0,V.getServerCookie)(e.ctx.req?.headers.cookie??"","storytel_language")??void 0,d=(t=e.router.query.language,(s=(a=(n="str
2ing"==typeof t?t:void 0)&&(0,r.isValidLanguageForLocale)(l,n)?n:void 0)||(u&&(0,r.isValidLanguageForLocale)(l,u)?u:(0,r.getLanguageFromLocale)(l)??void 0))?(0,r.getExternalLocaleForLanguage)(l,s):r.externalLocaleMap[l]??r.externalLocaleMap.default),c=await z(d);return{...i,translations:c,externalLocale:d}};let J=(0,s.withRouter)($);e.s(["default",0,J],738297)},833964,(e,t,n)=>{let r="/_app";(window.__NEXT_P=window.__NEXT_P||[]).push([r,()=>e.r(738297)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([r])})},260844,e=>{"use strict";var t=e.i(659673),n=e.i(204973);try{var r=window;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}e.s(["addExperimentCookieHeaders",0,(e={})=>{let r=(0,n.getDocumentCookie)("storytel_user_id"),a=(0,n.getDocumentCookie)("storytel_bucket"),o=(0,t.parseServerCookieString)(e.Cookie||""),s=[];if(r&&!o.storytel_user_id&&s.push(`storytel_user_id=${r}`),a&&!o.storytel_bucket&&s.push(`storytel_bucket=${a}`),0===s.length)return e;let i=[e.Cookie,...s].filter(Boolean).join("; ");return{...e,Cookie:i}}])},410913,819258,905359,803256,983508,641651,649033,e=>{"use strict";var t=e.i(686188);e.s(["createUserWithEmailAndPassword",()=>t.ab],410913),e.s(["signOut",()=>t.D],819258),e.s(["GoogleAuthProvider",()=>t.Y],905359),e.s(["getRedirectResult",()=>t.k],803256),e.s(["OAuthProvider",()=>t._],983508),e.s(["signInWithEmailAndPassword",()=>t.ac],641651),e.s(["signInWithRedirect",()=>t.g],649033)},307552,(e,t,n)=>{try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}t.exports=e.r(880336)},880336,(e,t,n)=>{"use strict";try{var r="u">typeof window?window:e.g;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return u}});let a=e.r(380763),o=e.r(968946),s=a._(e.r(533337)),i=e.r(145682);async function l({Component:e,ctx:t}){return{pageProps:await (0,i.loadGetInitialProps)(e,t)}}class u extends s.default.Component{static{this.origGetInitialProps=l}static{this.getInitialProps=l}render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)}]); 3 4//# debugId=5c5ef175-2311-af72-2fea-c6d5d7884b01
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.