1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2240,3189],{49632:(t,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/self-exclusion/cancellation",function(){return n(53313)}])},53313:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__N_SSG:()=>_,default:()=>x});var a=n(54595),r=n(72240),o=n.n(r),s=n(52089),i=n(60012);function c(t){let{content:e,nextStep:n}=t;return(0,a.jsx)(s.UC,{content:e,children:(0,a.jsx)(s.eM,{reverse:!0,fullWidth:!0,children:(0,a.jsx)(s.jn,{onClick:n,children:"Proceed"})})})}var l=n(41247),p=n(14461),u=n(86482),f=n(52099),d=n(83408),h=n(40907),m=n(8478),y=n(26640),w=n(18218),S=n(25688),v=n(739),b=n(44746);function g(t){let{content:e,nextStep:n}=t,[r,o]=(0,h.useState)({}),[i,c]=(0,h.useState)(!1),[g,_]=(0,h.useState)(!1),[x,k]=(0,h.useState)(!1),[C,j]=(0,h.useState)(),{awsRum:E}=(0,y.DE)(),{addTransientNotification:O,removeAllTransientNotifications:T,addPersistentNotification:N}=(0,y.E$)(),{riApi:R}=(0,y.d4)(),{getAccessToken:A}=(0,y.U)(),{updateUser:P}=(0,b.Jd)(),{i18n:L}=(0,y.Ym)(),H=d.C.riPortal.selfExclusion.checkboxConfirmation,M={name:"cancellationConfirmation",options:[{value:"confirmed",name:(0,a.jsxs)(a.Fragment,{children:[H.statementBeforeAct,(0,a.jsx)(l.E,{as:"em",fontStyle:"italic",display:"inline",children:H.actName}),H.statementAfterAct]})}]},B=(0,m.mN)({defaultValues:{cancellationConfirmation:!1},mode:"onChange"}),K=!0===(0,m.FH)({control:B.control,name:"cancellationConfirmation"}),U=async t=>{try{c(!0);let e=await A(),a=await R.cancellationRequest({groupId:t},e);a.registration_status.self_exclusion_status===S.R5.CANCELLATION_PENDING&&k(!0),P(a),N({status:"success",description:L.success.cancellation.requestReceived}),n()}catch(t){E.recordError(t),T(),O({status:"error",description:L.errors.cancellation.cancellationRequest})}finally{c(!1)}},W=async()=>{try{if(!w.$J.some(t=>r.file.type.endsWith(t)))throw new w.hD(`File must be one of${w.$J.map(t=>` .${t}`).toString()}`);_(!0);let t=await A(),e=await R.cancellationFileGroup(t);o({...r,progress:0}),j(e);let n=new FormData;n.append("file",r.file);let a=new XMLHttpRequest;a.open("POST",`${v.A.ixup.apiUrl}/file/v1/file-uploads/${e}`),a.setRequestHeader("Authorization",e),a.upload.onprogress=t=>{let e=Math.trunc(t.loaded/t.total*100);o({...r,progress:e})},a.onload=()=>{let t=a.status;201===t?(k(!0),T(),O({status:"success",description:L.success.cancellation.statDecReceived})):O({status:"error",description:L.errors.genericLong}),o({...r,progress:void 0,uploaded:201===t})},a.onerror=()=>{O({status:"error",description:L.errors.cancellation.statDecUpload}),o({...r,progress:void 0})},a.send(n)}catch(t){E.recordError(t),t instanceof w.hD?O({status:"error",description:t.message}):O({status:"error",description:L.errors.cancellation.statDecUpload})}finally{_(!1)}};return(0,a.jsx)(m.Op,{...B,children:(0,a.jsxs)(s.UC,{content:e,children:[(0,a.jsx)(p.T,{children:(0,a.jsx)(u.jq,{variant:"outline",borderRadius:4,children:(0,a.jsx)(u.BF,{children:(0,a.jsx)(s.nc,{index:0,userFile:r,customLoadFile:(t,e)=>{o({file:e})},clearBtnOpts:{clearBtnOverride:W,clearBtnText:"Upload",clearBtnOnOff:g}})})})}),(0,a.jsx)(p.T,{align:"stretch",gap:3,mt:4,w:"full",minW:0,children:(0,a.jsx)(f.a,{w:"full",minW:0,css:{'& [data-part="root"]':{alignItems:"flex-start"},'& [data-part="control"]':{marginTop:"2px"},'& [data-part="label"]':{fontWeight:"normal"},'& [data-part="label"] *':{fontWeight:"normal"}},"data-testid":"cancellation-confirmation",children:(0,a.jsx)(s.tS,{accessor:"cancellationConfirmation",refGroup:M,wrapOptionLabels:!0})})}),(0,a.jsx)(s.eM,{reverse:!0,fullWidth:!0,children:(0,a.jsx)(s.jn,{onClick:()=>{C&&U(C)},loading:i,disabled:!r.uploaded||!x||!K,children:"Submit"})})]})})}var _=!0;let x=(0,s.rJ)(function(t){let{stepsContent:e,nextStep:n}=t,{statusCheckComplete:r}=(0,b.Jd)();return r?(0,a.jsxs)(o(),{onStepChange:()=>{window.scrollTo(0,0)},children:[(0,a.jsx)(c,{content:e.downloadPageContent,nextStep:n}),(0,a.jsx)(g,{content:e.submissionPageContent,nextStep:n}),(0,a.jsx)(s.UC,{content:e.finalPageContent,children:(0,a.jsx)(s.eM,{children:(0,a.jsx)(i.q,{})})})]}):(0,a.jsx)(s.WL,{})})},60012:(t,e,n)=>{"use strict";n.d(e,{q:()=>o});var a=n(54595),r=n(52089);let o=t=>(0,a.jsxs)(r.jn,{variant:"outline",href:"/dashboard/",...t,children:["Back to my account page"," "]})},72240:function(t,e,n){!function(t,e){"use strict";var n="default"in e?e.default:e;function a(t){return(a="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})(t)}function r(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}
1function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){var n,a=(e=void 0===e?{}:e).insertAt;t&&"u">typeof document&&(n=document.head||document.getElementsByTagName("head")[0],(e=document.createElement("style")).type="text/css","top"===a&&n.firstChild?n.insertBefore(e,n.firstChild):n.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)))}var p="rsw_1z";l("/**\n * Snippets from animate.css\n * Credit goes to https://github.com/daneden\n * github.com/daneden/animate.css\n*/\n.rsw_1z {\n -webkit-animation-duration: .8192s;\n animation-duration: .8192s;\n -webkit-animation-fill-mode: backwards;\n animation-fill-mode: backwards;\n}\n\n/** fadeInRight */\n@-webkit-keyframes rsw_1M {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: none;\n transform: none;\n }\n}\n\n@keyframes rsw_1M {\n from {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: none;\n transform: none;\n }\n}\n\n.rsw_1M {\n -webkit-animation-name: rsw_1M;\n animation-name: rsw_1M;\n}\n\n/** fadeInLeft */\n@-webkit-keyframes rsw_19 {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: none;\n transform: none;\n }\n}\n\n@keyframes rsw_19 {\n from {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n\n to {\n opacity: 1;\n -webkit-transform: none;\n transform: none;\n }\n}\n\n.rsw_19 {\n -webkit-animation-name: rsw_19;\n animation-name: rsw_19;\n}\n\n/** fadeOutRight */\n@-webkit-keyframes rsw_3C {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n\n@keyframes rsw_3C {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n}\n\n.rsw_3C {\n -webkit-animation-name: rsw_3C;\n animation-name: rsw_3C;\n}\n\n/** fadeOutLeft */\n@-webkit-keyframes rsw_1u {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n\n@keyframes rsw_1u {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n}\n\n.rsw_1u {\n -webkit-animation-name: rsw_1u;\n animation-name: rsw_1u;\n}\n"),l("/** Step Wizard */\n.rsw_2Y {\n position: relative;\n}\n\n.rsw_2f {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 0;\n}\n\n.rsw_3G {\n opacity: 1;\n pointer-events: inherit;\n position: relative;\n z-index: 1;\n}\n");var u=function(){var t=e.PureComponent;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");m.prototype=Object.create(t&&t.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),t&&i(m,t);var l,u,d,h=(l=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=s(m);return t=l?Reflect.construct(e,arguments,t=s(this).constructor):e.apply(this,arguments),e=this,t&&("object"==typeof t||"function"==typeof t)?t:c(e)});function m(t){var e;return function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,m),o(c(e=h.call(this,t)),"initialState",function(){var t={activeStep:0,classes:{},hashKeys:{},namedSteps:{}},n="object"===("u"<typeof window?"undefined":a(window))?e.getHash():"",r=e.getSteps();r.forEach(function(e,n){t.hashKeys[n]=e.props&&e.props.hashKey||"step".concat(n+1),t.hashKeys[t.hashKeys[n]]=n,t.namedSteps[n]=e.props&&e.props.stepName||"step".concat(n+1),t.namedSteps[t.namedSteps[n]]=n});var o=e.props.initialStep-1;return o&&r[o]&&(t.activeStep=o),e.props.isHashEnabled&&n&&void 0!==t.hashKeys[n]&&(t.activeStep=t.hashKeys[n]),e.props.transitions&&(t.classes[t.activeStep]=e.props.transitions.intro||""),t}),o(c(e),"getHash",function(){return decodeURI(window.location.hash).replace(/^#/,"")}),o(c(e),"getTransitions",function(){return e.props.transitions||{enterRight:"".concat(p," ").concat("rsw_1M"),enterLeft:"".concat(p," ").concat("rsw_19"),exitRight:"".concat(p," ").concat("rsw_3C"),exitLeft:"".concat(p," ").concat("rsw_1u")}}),o(c(e),"onHashChange",function(){e.setActiveStep(e.state.hashKeys[e.getHash()]||0)}),o(c(e),"isInvalidStep",function(t){return t<0||t>=e.totalSteps}),o(c(e),"setActiveStep",function(t){var n,a,r=e.state.activeStep;r!==t&&(e.isInvalidStep(t)||(n=e.state.classes,a=e.getTransitions(),r<t?(n[r]=a.exitLeft,n[t]=a.enterRight):(n[r]=a.exitRight,n[t]=a.enterLeft),e.setState({activeStep:t,classes:n},function(){e.onStepChange({previousStep:r+1,activeStep:t+1})})))}),o(c(e),"onStepChange",function(t){e.props.onStepChange(t),e.props.isHashEnabled&&e.updateHash(e.state.activeStep)}),o(c(e),"getSteps",function(){return n.Children.toArray(e.props.children)}),o(c(e),"firstStep",function(){return e.goToStep(1)}),o(c(e),"lastStep",function(){return e.goToStep(e.totalSteps)}),o(c(e),"nextStep",function(){return e.setActiveStep(e.state.activeStep+1)}),o(c(e),"previousStep",function(){return e.setActiveStep(e.state.activeStep-1)}),o(c(e),"goToStep",function(t){e.props.isHashEnabled&&"string"==typeof t&&void 0!==e.state.hashKeys[t]?e.setActiveStep(e.state.hashKeys[t]):e.setActiveStep(t-1)}),o(c(e),"goToNamedStep",function(t){"string"==typeof t&&void 0!==e.state.namedSteps[t]?e.setActiveStep(e.state.namedSteps[t]):console.error('Cannot find step with
1name "'.concat(t,'"'))}),o(c(e),"updateHash",function(t){window.location.hash=e.state.hashKeys[t]}),o(c(e),"isReactComponent",function(t){return"function"==typeof(t=t.type)||"object"===a(t)}),e.state=e.initialState(),e}return u=[{key:"componentDidMount",value:function(){this.props.isHashEnabled&&window.addEventListener("hashchange",this.onHashChange),this.props.instance(this)}},{key:"componentWillUnmount",value:function(){this.props.isHashEnabled&&window.removeEventListener("hashchange",this.onHashChange)}},{key:"currentStep",get:function(){return this.state.activeStep+1}},{key:"totalSteps",get:function(){return this.getSteps().length}},{key:"render",value:function(){var t=this,e={currentStep:this.currentStep,totalSteps:this.totalSteps,nextStep:this.nextStep,previousStep:this.previousStep,goToStep:this.goToStep,goToNamedStep:this.goToNamedStep,firstStep:this.firstStep,lastStep:this.lastStep},a=this.state.classes,r=n.Children.map(this.getSteps(),function(r,o){return r?(e.isActive=o===t.state.activeStep,e.transitions=a[o],!t.props.isLazyMount||t.props.isLazyMount&&e.isActive?n.createElement(f,e,t.isReactComponent(r)?n.cloneElement(r,e):r):null):null});return n.createElement("div",{className:this.props.className},this.props.nav&&n.cloneElement(this.props.nav,e),n.createElement("div",{className:"rsw_2Y"},r))}}],r(m.prototype,u),d&&r(m,d),m}();u.defaultProps={children:[],className:null,initialStep:1,instance:function(){},isHashEnabled:!1,isLazyMount:!1,nav:null,onStepChange:function(){},transitions:void 0};var f=function(t){var e=t.children,a=t.isActive,t=t.transitions;return n.createElement("div",{className:"".concat("rsw_2f"," ").concat(t," ").concat(a?"rsw_3G":"").trim()},e)};f.defaultProps={children:[],isActive:!1,transitions:""},t.Step=f,t.default=u,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(40907))}},t=>{t.O(0,[636,6593,8792],()=>t(t.s=49632)),_N_E=t.O()}]);
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.