PageSourceSearch

https://www.jet2holidays.com/dist/feature-authentication.7519c77dab96d000b67d.js

js jet2holidays.com collected 2026-09-24 10:13:36 UTC 5,273 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkjet2holidays=self.webpackChunkjet2holidays||[]).push([[5516],{24894:(t,n,e)=>{e.d(n,{b:()=>a});var i=e(66195),o=e(87931),r=e(66447),a=new i.Ay.Store({state:{isAuthenticated:!1,msalInstance:null,loginApiUrl:"",forceTryLogin:!1,failedLogin:!1},getters:{hasMsalInstance:function(t){return null!==t.msalInstance}},mutations:{setLoginApiUrl:function(t,n){t.loginApiUrl=n},setMsalInstance:function(t,n){t.msalInstance=n},setForceTryLogin:function(t,n){t.forceTryLogin=n},setFailedLogin:function(t,n){t.failedLogin=n}},actions:{performSilentLogin:function(t){fetch("/client/scapi/authentication/session").then((function(n){n.json().then((function(n){n||fetch("/client/scapi/authentication/service-available").then((function(n){n.json().then((function(n){if(n)return t.state.msalInstance.ssoSilent({scopes:["openid","email"]}).then((function(n){if(null!=n&&n.account){var e="".concat(window.location.origin).concat(t.state.loginApiUrl,"?isSilent=true");window.location.replace(e)}})).then((function(){}),(function(t){a.dispatch("raiseLoginFailureBridgeEvent"),a.commit("setFailedLogin",!0)}))}))}))})).catch((function(t){}))}))},raiseLoginGtmEvent:function(){if(new URLSearchParams(window.location.search).get("myJet2Login")){fetch("/client/scapi/authentication/identification").then((function(t){t.json().then((function(t){o.A.publish({event:"myJet2Login",category:"Login",action:"Complete",label:"Complete",customerId:t.CustomerId,accountId:t.AccountId})}))}));var t=new URL(window.location.href);t.searchParams.delete("myJet2Login"),window.history.replaceState({},"",t.toString())}},raiseLoginFailureBridgeEvent:function(t){if(r.A.isMobileApp()){var n={autoLoginUrl:"".concat(window.location.origin).concat(t.state.loginApiUrl,"?isSilent=true"),successUrl:window.location.origin,errorUrl:"".concat(window.location.origin,"/sitecore/service/error.aspx?error=An+error+occured")};r.A.raisePostMessageEvent("silent_login_failed",n)}}}})},16549:(t,n,e)=>{e.r(n),e.d(n,{View:()=>l});var i=e(24894);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function r(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,c(i.key),i)}}function a(t,n,e){return n&&r(t.prototype,n),e&&r(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var n=function(t,n){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==o(n)?n:n+""}var l=a((function t(n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),i.b.dispatch("raiseLoginGtmEvent");var o,r=sessionStorage.getItem("lastCheckSessionAttempt"),a=new Date,c=window.location.origin;if(i.b.commit("setLoginApiUrl",e.loginUrl),!1===i.b.getters.hasMsalInstance){var l=new msal.PublicClientApplication({auth:{clientId:e.clientId,authority:e.baseUrl,knownAuthorities:[e.tenant],redirectUri:"".concat(c,"/silent")},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1}});i.b.commit("setMsalInstance",l)}if(i.b.state.forceTryLogin&&i.b.dispatch("performSilentLogin"),null!==r){var s=(o=new Date(r)).getMinutes();o.setMinutes(s+15)}(null===r||a>=o)&&(sessionStorage.setItem("lastCheckSessionAttempt",a.toISOString()),i.b.dispatch("performSilentLogin"))}))},58910:(t,n,e)=>{e.r(n),e.d(n,{ViewModel:()=>o});var i=e(24894),o={name:"SilentLoginLoader",data:function(){return{}},created:function(){i.b.getters.hasMsalInstance?i.b.dispatch("performSilentLogin"):i.b.commit("setForceTryLogin",!0)},computed:{isVisible:function(){return!i.b.state.failedLogin}}}},34463:(t,n,e)=>{e.r(n),e.d(n,{View:()=>u,ViewModel:()=>i.ViewModel});var i=e(58910),o=e(80887);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(){return a=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},a.apply(null,arguments)}function c(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}function l(t,n,e){return n&&c(t.prototype,n),e&&c(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var n=function(t,n){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,n||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}
1(t,"string");return"symbol"==r(n)?n:n+""}var u=l((function t(n,e){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),new o.Ay(a({el:n,propsData:e},i.ViewModel))}))}}]);

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.