PageSourceSearch

https://www.huelvainformacion.es/huelvainformacion/1195.h-a630afd2f36e50b4cb46.js

js huelvainformacion.es collected 2026-10-01 10:15:52 UTC 6,528 bytes, 10 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1195],{1195:(function(z,d,i){i.r(d),i.d(d,{default:function(){return O}});var g=function(){var t=this,e=t._self._c;return e("div",[e("span",{staticClass:"avatar"},[e("nx-icon",{attrs:{icon:"user_alt"}})],1),t._v(" "),e("h1",{staticClass:"B-650-700-500-N B-750-700-500-N--md"},[t.currentUser&&t.currentUser.type===2&&!t.authSuccessFreeze?e("span",[t._v("Ya est\xE1s suscrito")]):e("span",[t._v("Suscripci\xF3n digital")]),t._v(" a "),e("br"),t._v(t._s(t.siteName)+`
2  `)]),t._v(" "),!t.isReady||t.authSuccessFreeze?e("div",{staticClass:"mt-6"},[e("div",{staticClass:"loading-message"},[e("span",{staticClass:"loader"}),t._v(" "),e("p",{staticClass:"mt-4 A-500-300-700-N A-525-300-700-N--md"},[t._v(`
3        `+t._s(t.authSuccessFreeze?"Actualizando tu cuenta...":"Verificando estado...")+`
4      `)])])]):t.currentUser&&t.currentUser.type===2?e("div",[t._m(0)]):t.currentUser||t.isAuthenticating?e("div",{staticClass:"mt-6"},[t.loadingStripe||t.isAuthenticating?e("div",{staticClass:"loading-message"},[e("span",{staticClass:"loader"}),t._v(" "),e("p",{staticClass:"mt-4 A-500-300-700-N A-525-300-700-N--md"},[t._v(`
5        `+t._s(t.isAuthenticating?"Validando usuario...":"Cargando pasarela de pago...")+`
6      `)])]):t._e(),t._v(" "),e("div",{class:{hidden:t.loadingStripe||t.isAuthenticating},attrs:{id:"checkout"}}),t._v(" "),t.errorMessage?e("div",{staticClass:"error-message A-500-300-700-N A-525-300-700-N--md"},[t._v(t._s(t.errorMessage))]):t._e()]):e("div",[e("div",{staticClass:"suscription-closed"},[e("p",{staticClass:"A-500-300-700-N A-525-300-700-N--md"},[t._v("Debes estar registrado para poder suscribirte")]),t._v(" "),e("nx-button",{attrs:{text:"Iniciar sesi\xF3n",custom:""},on:{click:t.goToLogin}}),t._v(" "),e("p",{staticClass:"aux"},[t._v(`
7        \xBFA\xFAn no tienes cuenta?
8        `),e("nx-button",{attrs:{text:"Reg\xEDstrate ahora",aux:""},on:{click:t.goToRegister}})],1)],1)])])},v=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"suscription-closed"},[t("p",{staticClass:"A-500-300-700-N A-525-300-700-N--md"},[s._v(`
9        Revisa y ajusta tu plan cuando lo necesites
10      `)]),s._v(" "),t("p",{staticClass:"aux"},[t("a",{staticClass:"bbnx-btn",attrs:{custom:"",href:"/suscripcion/perfil/"}},[s._v("Gestionar mi suscripci\xF3n")])])])}],o=i(7382),m=i(4737),S=i(4206),y=i.n(S),_=i(1650),P=Object.defineProperty,x=Object.defineProperties,A=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,p=(s,t,e)=>t in s?P(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,c=(s,t)=>{for(var e in t||(t={}))C.call(t,e)&&p(s,e,t[e]);if(h)for(var e of h(t))N.call(t,e)&&p(s,e,t[e]);return s},w=(s,t)=>x(s,A(t)),n=(s,t,e)=>new Promise((r,f)=>{var R=a=>{try{u(e.next(a))}catch(l){f(l)}},k=a=>{try{u(e.throw(a))}catch(l){f(l)}},u=a=>a.done?r(a.value):Promise.resolve(a.value).then(R,k);u((e=e.apply(s,t)).next())}),F={name:"nx-suscription",components:{NxIcon:_.Z,NxButton:m.Z},props:{stripePublicKey:{type:String,default:"pk_test_51RoNmnKsLVbDOgBvsJXJuu6q8dTFh5ioH3o5puvMkycxxvfVNFxH7a92Ouew4YvB3RGO4BQ6cClGUxa21IeslScL00XHYbjWc7"},siteName:{type:String,default:"Diario de Sevilla"}},data(){return{stripe:null,checkout:null,loadingStripe:!1,isAuthenticating:!1,authSuccessFreeze:!1,errorMessage:null,stripeLoadingPromise:null,isReady:!1,initTimeout:null}},computed:w(c(c(c({},(0,o.Se)(["site"])),(0,o.Se)("user",["currentUser"])),(0,o.Se)(["loginUrl"])),{currentProductId(){const s=window.location.search;return new URLSearchParams(s).get("prodId")}}),watch:{currentUser:{immediate:!0,handler(s,t){return n(this,null,function*(){if(!t&&s&&this.isAuthenticating&&(this.authSuccessFreeze=!0,this.isAuthenticating=!1,setTimeout(()=>{this.authSuccessFreeze=!1,this.isReady=!0},3e3)),s&&s.id&&(clearTimeout(this.initTimeout),this.isReady=!0),s&&!this.authSuccessFreeze){if(this.isAuthenticating=!1,s.type===2){this.loadingStripe=!1;return}this.loadingStripe=!0,this.$nextTick(()=>n(this,null,function*(){try{yield this.stripeLoadingPromise,yield this.initializeStripeCheckout()}catch(e){this.loadingStripe=!1}}))}else!s&&t!==void 0&&(this.isAuthenticating=!1,this.checkout&&(this.checkout.destroy(),this.checkout=null),this.errorMessage=null)})}}},mounted(){return n(this,null,function*(){this.initTimeout=setTimeout(()=>{this.currentUser||(this.isReady=!0)},2500),this.loadingStripe=!0,this.stripeLoadingPromise=new Promise((s,t)=>n(this,null,function*(){if(typeof window.Stripe=="undefined")try{yield this.loadStripeScript("https://js.stripe.com/v3/")}catch(e){t(e);return}typeof window.Stripe!="undefined"?(this.stripe=window.Stripe(this.stripePublicKey),s()):t(new Error("No stripe"))}));try{yield this.stripeLoadingPromise}catch(s){}!this.currentUser&&!this.isAuthenticating&&(this.loadingStripe=!1)})},beforeDestroy(){clearTimeout(this.initTimeout)},methods:{goToLogin(){this.isAuthenticating=!0;var s={screenSet:"Default-RegistrationLogin",onHide:()=>{setTimeout(()=>{!this.currentUser&&!this.authSuccessFreeze&&(this.isAuthenticating=!1)},2e3)}};gigya.accounts.showScreenSet(s)},goToRegister(){this.isAuthenticating=!0;var s={screenSet:"Default-RegistrationLogin",startScreen:"gigya-register-screen",onHide:()=>{setTimeout(()=>{!this.currentUser&&!this.authSuccessFreeze&&(this.isAuthenticating=!1)},2e3)}};gigya.accounts.showScreenSet(s)},loadStripeScript(s){return new Promise((t,e)=>{const r=document.createElement("script");r.src=s,r.async=!0,r.onload=t,r.onerror=e,document.head.appendChild(r)})},initializeStripeCheckout(){return n(this,null,function*(){if(this.currentUser.type===2)return this.loadingStripe=!1,!1;if(!this.stripe||!this.currentUser||!this.currentUser.id||!this.currentProductId){this.loadingStripe=!1,this.currentProductId||window.location.replace("/suscripcion/");return}this.loadingStripe=!0,this.errorMessage=null;try{const s=yield y().post("/api/front/stripe/checkoutSession",{productId:this.currentProductId}),{clientSecret:t}=s.data;if(!t)throw new Error("No se recibi\xF3 clientSecret de la API.");this.checkout&&this.checkout.destroy(),this.checkout=yield this.stripe.initEmbeddedCheckout({clientSecret:t}),this.checkout.mount("#checkout")}catch(s){console.error("Error",s),this.errorMessage="Error al cargar el formulario de pago.",this.loadingStripe=!1}finally{setTimeout(()=>{this.errorMessage||(this.loadingStripe=!1)},2e3)}})}}},T=F,U=i(810),b=(0,U.Z)(T,g,v,!1,null,null,null),O=b.exports})}]);

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.