PageSourceSearch

https://www.acn.cat/_next/static/chunks/pages/unsubscribe/[token]-54544ae5b366e5d4.js

js acn.cat collected 2026-10-02 06:52:39 UTC 4,773 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3165],{62144:function(e,r,n){"use strict";var t=n(30266),s=n(809),c=n.n(s),u=n(67294),a=n(57115),i=n(90931),o=n(72122);r.Z=function(){var e=(0,u.useState)(!1),r=e[0],n=e[1],s=(0,u.useState)(void 0),b=s[0],p=s[1],l=function(){var e=(0,t.Z)(c().mark((function e(r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r instanceof a.Z?p(r):p(new a.Z(null,"",r.message||"Error desconegut"));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();return{requestUnsubscribe:function(){var e=(0,t.Z)(c().mark((function e(){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),p(void 0),e.prev=2,e.next=5,fetch("".concat("/acn-portalservice/rest","/").concat(o.b.REQUEST_UNSUBSCRIBE),{method:"POST",headers:{Accept:"application/json"},credentials:"include"});case 5:if((r=e.sent).ok){e.next=9;break}return e.next=9,(0,i.Z)(r);case 9:return e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(2),e.next=16,l(e.t0);case 16:return e.abrupt("return",!1);case 17:return e.prev=17,n(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[2,12,17,20]])})));return function(){return e.apply(this,arguments)}}(),unsubscribe:function(){var e=(0,t.Z)(c().mark((function e(r){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),p(void 0),e.prev=2,e.next=5,fetch("".concat("/acn-portalservice/rest","/").concat(o.b.UNSUBSCRIBE),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({token:r})});case 5:if((t=e.sent).ok){e.next=9;break}return e.next=9,(0,i.Z)(t);case 9:return e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(2),e.next=16,l(e.t0);case 16:return e.abrupt("return",!1);case 17:return e.prev=17,n(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[2,12,17,20]])})));return function(r){return e.apply(this,arguments)}}(),isUnsubscribing:r,unsubscribeError:b}}},75318:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return x}});var t=n(30266),s=n(809),c=n.n(s),u=n(67294),a=n(9008),i=n(11163),o=n(62144),b=n(39954),p=n(83914),l=n.n(p),f=n(85893);function x(){var e=(0,i.useRouter)(),r=e.query.token,n=(0,o.Z)(),s=n.unsubscribe,p=n.isUnsubscribing,x=n.unsubscribeError,d=(0,b.Z)().logout,h=(0,u.useState)("loading"),v=h[0],_=h[1],k=(0,u.useRef)(!0),m=(0,u.useRef)(!1);(0,u.useEffect)((function(){return function(){k.current=!1}}),[]);var w=(0,u.useCallback)((function(e){k.current&&_(e)}),[]),N=(0,u.useCallback)((0,t.Z)(c().mark((function r(){return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,d();case 3:return r.prev=3,r.next=6,new Promise((function(e){return setTimeout(e,1e4)}));case 6:return e.replace("/"),r.finish(3);case 8:case"end":return r.stop()}}),r,null,[[0,,3,8]])}))),[d,e]),g=(0,u.useCallback)(function(){var e=(0,t.Z)(c().mark((function e(r){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w("loading"),e.prev=1,e.next=4,s(r);case 4:if(n=e.sent,k.current){e.next=7;break}return e.abrupt("return");case 7:if(!n){e.next=14;break}return w("success"),e.next=12,N();case 12:e.next=15;break;case 14:w("error");case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),k.current&&w("error");case 20:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(r){return e.apply(this,arguments)}}(),[s,w,N]);(0,u.useEffect)((function(){r&&"string"===typeof r&&(m.current||(m.current=!0,g(r)))}),[r,g]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(a.default,{children:[(0,f.jsx)("title",{children:"ACN - Baixa confirmada"}),(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,f.jsx)("main",{className:l().unsubscribeContainer,children:"loading"===v||p?(0,f.jsx)("p",{className:l().text,children:"Processant la teva sol\xb7licitud de baixa..."}):"success"===v?(0,f.jsx)("p",{className:l().text,children:"La teva sol\xb7licitud per donar-te de baixa ha estat processada."}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("p",{className:l().text,children:"No hem pogut processar la teva baixa."}),x&&(0,f.jsx)("p",{className:l().error,role:"alert",children:x.description})]})})]})}},12498:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/unsub
1scribe/[token]",function(){return n(75318)}])},83914:function(e){e.exports={unsubscribeContainer:"unsubscribe_unsubscribeContainer__fmPoW",text:"unsubscribe_text__uvGpH",checkboxLabel:"unsubscribe_checkboxLabel__Qlms8",checkbox:"unsubscribe_checkbox__QZ_Ij",unsubscribeButton:"unsubscribe_unsubscribeButton__Ngg76",error:"unsubscribe_error__bc0tG"}}},function(e){e.O(0,[9774,2888,179],(function(){return r=12498,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.