1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[848],{79935:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/corporateAuth/bpcl/wellness-programs/wellness-programs-test",function(){return s(37732)}])},37732:function(e,t,s){"use strict";s.r(t);var n=s(34051),i=s.n(n),l=s(85893),r=s(67294),a=s(65973),o=s.n(a),c=s(11163),u=s.n(c),d=s(9473),p=s(67923),m=s(1349),_=s(22920),f=s(83769);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=new Array(t);s<t;s++)n[s]=e[s];return n}function h(e,t,s,n,i,l,r){try{var a=e[l](r),o=a.value}catch(c){return void s(c)}a.done?t(o):Promise.resolve(o).then(n,i)}function g(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function x(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},n=Object.keys(s);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(s).filter((function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable})))),n.forEach((function(t){g(e,t,s[t])}))}return e}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(s);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.default=function(){var e=(0,d.v9)((function(e){return e.selfHelp.selfHelpAssessment})),t=(0,d.I0)(),s=(0,r.useState)(0),n=s[0],a=s[1],c=(0,r.useState)(""),v=c[0],g=c[1],b=(0,r.useState)(),j=b[0],w=b[1],S=(0,r.useState)([]),A=S[0],T=S[1],N=(0,r.useState)([]),I=N[0],H=N[1],C=(0,r.useState)(!1),O=C[0],q=C[1],k=(0,r.useState)(!1),E=k[0],U=k[1],Z=(0,r.useState)([]),B=Z[0],P=Z[1],z=(0,r.useState)([]),W=z[0],R=z[1],F=(0,r.useState)(""),Q=F[0],G=F[1],D=(0,r.useState)(""),L=D[0],V=D[1],X=(0,r.useState)([]),M=X[0],K=(X[1],(0,r.useState)(!1)),Y=K[0],J=K[1],$=(0,r.useState)(""),ee=$[0],te=$[1],se=(0,r.useState)(""),ne=se[0],ie=se[1],le=A[n];(0,r.useEffect)((function(){var e;!0===(null===le||void 0===le?void 0:le.isRedirect)&&(G((null===le||void 0===le?void 0:le.isRedirect)?null===le||void 0===le?void 0:le.redirectUrl.imageUrl:""),V((null===le||void 0===le?void 0:le.isRedirect)?null===le||void 0===le?void 0:le.redirectUrl.websiteUrl:""),te((null===le||void 0===le?void 0:le.isRedirect)?null===le||void 0===le||null===(e=le.redirectUrl)||void 0===e?void 0:e.text:""))}),[le]),(0,r.useEffect)((function(){""===Q&&""===L||U(!0)}),[Q,L]);window.innerWidth;var re=function(e,t){if(B.includes(t)){var s=y(B).filter((function(e){return t!==e}));P(s)}else{var n=y(B);n.push(t),P(n)}},ae=function(){var e,s=(e=i().mark((function e(s){var n,l,r,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t(p.Gg.actions.setLoading()),e.next=4,m.Z.getSelfHelp({data:s,reset:!1});case 4:200===(n=e.sent).status&&(t(f.fz.selfHelpProgram(n.data)),J(!0)),t(p.Gg.actions.disableLoading()),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),t(p.Gg.actions.disableLoading()),_.Am.error("".concat((null===(l=e.t0.response)||void 0===l?void 0:l.data)?null===(r=e.t0.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.message:"Something went wrong!!"));case 14:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var t=this,s=arguments;return new Promise((function(n,i){var l=e.apply(t,s);function r(e){h(l,n,i,r,a,"next",e)}function a(e){h(l,n,i,r,a,"throw",e)}r(void 0)}))});return function(e){return s.apply(this,arguments)}}();(0,r.useEffect)((function(){var e=u().query,t=(e.data,e.assesmentId),s=window.performance.getEntriesByType("navigation"),n=s.length&&"reload"===s[0].type;M.push(n),M.length>1&&ae(t)}),[u().query]),(0,r.useEffect)((function(){var t=u().query,s=t.data,n=t.assesmentId;g(n);var i=parseInt(s);w(i+1);var l=null===e||void 0===e?void 0:e.assessmentType[i];l&&(ie(null===l||void 0===l?void 0:l.backgroundImage),T(l.assessmentData))}),[]);return(0,r.useEffect)((function(){var e=u().query.assesmentId;
1Y&&u().push({pathname:"/corporateAuth/bpcl/wellness-programs/wellness-programs-progress",query:{data:e,reset:!1}})}),[Y]),(0,l.jsx)(r.Fragment,{children:(0,l.jsxs)("section",{className:o().quize_card,children:[(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)("div",{className:o().button_wrap,children:(0,l.jsx)("button",{style:{width:130,marginBottom:10},className:"comman-button",onClick:function(){u().push({pathname:"/corporateAuth/bpcl/wellness-programs/wellness-programs-progress",query:{data:v,reset:!1}})},children:"Back"})}),(0,l.jsxs)("div",{className:o().quize_main,style:{backgroundImage:"linear-gradient(\n to right, rgba(225, 220, 220, 0.5), rgba(30, 28, 28, 0.5)\n ),url(".concat(ne,")"),backgroundPosition:"center"},children:[(0,l.jsxs)("p",{className:o().subheading,children:[(0,l.jsxs)("span",{children:["moduleCompleted"!==(null===le||void 0===le?void 0:le.assessmentType)?"".concat(n+1,"."):""," "]}),(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:null===le||void 0===le?void 0:le.question}}),("multipleWithInput"===(null===le||void 0===le?void 0:le.assessmentType)||"multiple"===(null===le||void 0===le?void 0:le.assessmentType))&&(0,l.jsx)("span",{style:{fontSize:"small",fontStyle:"italic"},children:"(Multiple Choice)"}),"single"===(null===le||void 0===le?void 0:le.assessmentType)&&(0,l.jsx)("span",{style:{fontSize:"small",fontStyle:"italic"},children:"(Pick One)"})]}),O&&(0,l.jsx)("span",{className:o().error_star,children:"Kindly Select the Answer or Fill the text"}),(0,l.jsx)("div",{className:o().quize_card_list,children:(0,l.jsxs)("div",{className:o().option_container,children:[(0,l.jsx)("div",{className:o().list_card,style:"readingWithVideo"===(null===le||void 0===le?void 0:le.assessmentType)?{justifyContent:"center",width:"100%"}:void 0,children:null===le||void 0===le?void 0:le.options.map((function(e,t){return"multipleWithInput"===le.assessmentType?(0,l.jsxs)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))?"".concat(o().list," ").concat(o().active," "):o().list," "),onClick:function(){re(0,e.text)},children:[(0,l.jsx)("span",{}),(0,l.jsx)("h3",{children:e.text})]},t):"single"===le.assessmentType?(0,l.jsxs)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))?"".concat(o().list," ").concat(o().active," "):o().list," "),onClick:function(){!function(e){if(!B.includes(e)){var t=y(B);t[0]=e,P(t)}}(e.text)},children:[(0,l.jsx)("span",{}),(0,l.jsx)("h3",{children:e.text})]},t):"reading"===le.assessmentType?(0,l.jsxs)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))?"".concat(o().list," ").concat(o().active," "):"".concat(o().list," ").concat(o().readingOptions," ").concat(o().onHover," ")," "),style:{width:"48%"},children:[e.imageUrl&&(0,l.jsx)("img",{src:e.imageUrl,alt:e.additionalText,style:{height:"80px",width:"80px",borderRadius:"100%"}}),(0,l.jsx)("h3",{children:e.additionalText})]},t):"multiple"===le.assessmentType?(0,l.jsxs)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))?"".concat(o().list," ").concat(o().active," "):o().list," "),onClick:function(){re(0,e.text)},children:[(0,l.jsx)("span",{}),(0,l.jsx)("h3",{children:e.text})]},t):"snapShot"===le.assessmentType?(0,l.jsxs)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))&&"".concat(o().snapShot," ")," "),onClick:function(){re(0,e.text)},children:[(0,l.jsx)("img",{src:e.imageUrl,style:{height:"100%"},className:o().desktopImage}),(0,l.jsx)("img",{src:e.mobileImageUrl,style:{height:"100%"},className:o().mobileImage})]},t):"readingWithInput"===le.assessmentType?(0,l.jsx)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))?"".concat(o().list," ").concat(o().active," "):"".concat(o().list," ").concat(o().readingOptions," ").concat(o().onHover," ")," "),style:{width:"48%"},children:(0,l.jsx)("h3",{children:e.additionalText})},t):"readingWithVideo"===le.assessmentType?(0,l.jsx)("div",{className:"".concat((null===B||void 0===B?void 0:B.includes(e.text))&&"".concat(o().snapShot," ")," "),children:(0,l.jsx)("video",{controls:!0,autoPlay:!0,width:"100%",children:(0,l.jsx)("source",{src:e.imageUrl,type:"video/mp4"})})},t):void 0}))}),(0,l.jsx)("div",{className:o().inputContainer,children:("multipleWithInput"===(null===le||void 0===le?void 0:le.assessmentType)||"input"===(null===le||void 0===le?void 0:le.assessmentType)||"readingWithInput"===(null===le||void 0===le?void 0:le.assessmentType))&&Array.from({length:null===le||void 0===le?void 0:le.numberOfInputBox}).map((function(e,t){return(0,l.jsx)("textarea",{placeholder:"Share your thoughts here...",value:W[t]||"",onChange:function(e){!function(e,t){var s=y(W);s[e]=t,R(s)}(t,null===e||void 0===e?void 0:e.target.value)},rows:5},t)}))}),(0,l.jsx)("div",{className:o().btn_container,children:(0,l.jsxs)("button",{className:o().contBntInsu,type:"submit",onClick:function(){!function(s,i,l){if(window.innerWidth<=768&&(document.documentElement.scrollTop=40,document.body.scrollTop=40),B.length>0&&"single"===le.assessmentType||B.length>0&&"multiple"===le.assessmentType||B.length>0&&"multipleWithInput"===le.assessmentType||"input"===le.assessmentType&&("multipleWithInput"===le.assessmentType||"multiple"===le.assessmentType||"single"===le.assessmentType||W.length===l&&"input"===le.assessmentType)||"reading"===s||"snapShot"===s||"moduleCompleted"===s||"readingWithVideo"===s||"readingWithInput"===le.assessmentType&&W.length){var r,o;"moduleCompleted"===(null===le||void 0===le?void 0:le.assessmentType)&&(null===le||void 0===le||null===(r=le.redirectUrl)||void 0===r?void 0:r.websiteUrl)&&window.open("".concat(null===le||void 0===le||null===(o=le.redirectUrl)||void 0===o?void 0:o.websiteUrl)),q(!1);var c,d,p,m=B;if(y(W).length>0){m[m.length]=W;var _=y((c=x({},le)).answer);_.push(m),c.answer=_}else{var h=y((c=x({},le)).answer).concat(m);c.answer=h}if(e){var g=y(e.assessmentType),b=g.findIndex((function(e){return e.assessmentNo===j}));-1!==b&&(g[b]=x({},g[b],{isSaved:n===A.length-1,assessmentData:g[b].assessmentData.map((function(e){return e._id===c._id?c:e}))}),d=x({},e,{assessmentType:g}))}t(f.fz.selfHelpProgram(d)),n<(null===A||void 0===A?void 0:A.length)-1&&a(n+1);var w=y(d.assessmentType).findIndex((function(e){return e.assessmentNo===j+1}));if(n===A.length-1&&-1!==w){var S=y(d.assessmentType);-1!==w&&(S[w]=x({},S[w],{isLocked:!1}),p=x({},d,{assessmentType:S})),t(f.fz.selfHelpProgram(p)),u().push({pathname:"/corporateAuth/bpcl/wellness-
1programs/wellness-programs-progress",query:{data:v}})}else n===A.length-1&&u().push({pathname:"/corporateAuth/bpcl/wellness-programs/wellness-programs-progress",query:{data:v}});var T=I;T[i]=i,H(T),P([]),R([]),q(!1)}else q(!O)}(le.assessmentType,n,null===le||void 0===le?void 0:le.numberOfInputBox)},children:[" ","moduleCompleted"!==(null===le||void 0===le?void 0:le.assessmentType)?"Next":"Proceed"]})})]})})]}),(0,l.jsxs)("div",{className:o().points,children:[(0,l.jsx)("div",{className:o().progesstext,children:(0,l.jsx)("p",{children:"Progress"})}),(0,l.jsx)("div",{className:o().numbers,children:(0,l.jsx)("ul",{children:null===A||void 0===A?void 0:A.map((function(e,t){var s="";return I.length>0&&I.includes(t)&&(s=o().activeQuestion),(0,l.jsx)("li",{className:s,children:t+1},t)}))})})]})]}),E&&(0,l.jsx)("section",{className:"popup",style:{position:"fixed"},children:(0,l.jsx)("div",{className:"container",children:(0,l.jsxs)("div",{className:"containerPopUp",children:[(0,l.jsxs)("div",{className:"popupHeader",children:[(0,l.jsx)("p",{className:o().article_name,children:"Please Go Through Below Article/Video To Gain More Insights"}),(0,l.jsx)("span",{onClick:function(){U(!E)}}),(0,l.jsx)("br",{})]}),(0,l.jsxs)("div",{className:"popupDetailContainer",children:[(0,l.jsx)("p",{className:o().article_name,children:ee}),(0,l.jsx)("div",{children:(0,l.jsx)("img",{src:Q,alt:"Article"})}),(0,l.jsx)("div",{className:"popButtonView",children:(0,l.jsx)("a",{href:L,target:"_blank",children:(0,l.jsx)("button",{className:"popsubmitbtn",onClick:function(){U(!E)},style:{width:"100%"},children:"View"})})})]})]})})})]})})}},1349:function(e,t,s){"use strict";var n=s(58437),i="selfHelp/",l={getAllAssessments:function(){var e="".concat(i,"getAllAssessment");return n.Z.get(e)},getAssessment:function(e){var t="".concat(i,"getAssessment");return n.Z.post(t,e)},submitAssessment:function(e){var t="".concat(i,"submitAssessment");return n.Z.post(t,e)},getAssessmentResult:function(e){var t="".concat(i,"getAssessmentResult?resultId=").concat(e);return n.Z.get(t)},getAllSelfHelp:function(){var e="".concat(i,"getAllSelfHelp");return n.Z.get(e)},getSelfHelpDetail:function(e){var t="".concat(i,"getSelfHelp");return n.Z.post(t,e)},getSelfHelp:function(e){var t=e.data,s=e.reset,l="".concat(i,"getSelfHelp?id=").concat(t,"&reset=").concat(s);return n.Z.get(l)},getSelfHelpSaved:function(e){var t="".concat(i,"getSelfHelpRecord?resultId=").concat(e);return n.Z.get(t)},getAllCorporateAssessments:function(){var e="".concat(i,"getAllCorporateAssessment");return n.Z.get(e)},getnewSelfHelp:function(){var e="".concat(i,"newSelfHelp");return n.Z.get(e)},newSubmitSelfHelp:function(e){var t="".concat(i,"newSubmitSelfHelp");return n.Z.post(t,e)},selfHelpAssessmentRecordExists:function(e){var t="".concat(i,"selfHelpRecordExists?id=").concat(e);return n.Z.get(t)},getBurnoutAssesment:function(){var e="".concat(i,"getBurnoutAssessment");return n.Z.get(e)},submitBurnout:function(e){var t="".concat(i,"submitBurnoutAssessment");return n.Z.post(t,e)},selfHelpCardGenerate:function(e){var t="".concat(i,"selfHelpCardGenerate?selfHelpId=").concat(e);return n.Z.get(t)},getBurnoutAssesmentForUsers:function(){var e="".concat(i,"getBurnOutAssessmentForUsers");return n.Z.get(e)},submitBurnoutForUsers:function(e){var t="".concat(i,"submitBurnoutForUsers");return n.Z.post(t,e)},paidAssessment:function(e){var t="".concat(i,"paidAssessmentDeduction");return n.Z.post(t,e)}};t.Z=l},65973:function(e){e.exports={quize_card:"self_help_test_quize_card__YE0fp",quize_main:"self_help_test_quize_main__rn0nD",quize_card_list:"self_help_test_quize_card_list__LRteU",list_card:"self_help_test_list_card___8Oe4",option_container:"self_help_test_option_container__1Q6mE",inputContainer:"self_help_test_inputContainer__MJuQ8",list:"self_help_test_list__3AVBk",active:"self_help_test_active__90rBC",points:"self_help_test_points__K2otx",progesstext:"self_help_test_progesstext__vEwa6",activeQuestion:"self_help_test_activeQuestion__HOKKY",numbers:"self_help_test_numbers__tw7q7",quize_image:"self_help_test_quize_image__OXEEX",selft_btn:"self_help_test_selft_btn__fPAsu",progressbar:"self_help_test_progressbar__4LTsZ",protag:"self_help_test_protag__403uz",textSelfSen:"self_help_test_textSelfSen__HF2_H",inputField:"self_help_test_inputField___sqeg",contBntInsu:"self_help_test_contBntInsu__ZO5Uq",btn_container:"self_help_test_btn_container__ygqQc",error_star:"self_help_test_error_star__m3QEE",subheading:"self_help_test_subheading__NJ8XY",selectedAnswer:"self_help_test_selectedAnswer__Gnipo",mobileBtn:"self_help_test_mobileBtn__R60hA",article_name:"self_help_test_article_name__FCqOn",snapShot:"self_help_test_snapShot__OQ9se",desktopImage:"self_help_test_desktopImage__Cq9mO",mobileImage:"self_help_test_mobileImage__QZRGs",readingOptions:"self_help_test_readingOptions__uWLhs",onHover:"self_help_test_onHover__yQtd7",value_ofprogress:"self_help_test_value_ofprogress__2AqOy",text_massage:"self_help_test_text_massage__XcU3_"}}},function(e){e.O(0,[9774,2888,179],(function(){return t=79935,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.