Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.141.32.252
(window.webpackJsonp=window.webpackJsonp||[]).push([[80,307],{1190:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(68),o=n(100),i=n(101),s=n(103),c=n(102),u=n(104),l=n(2),h=n.n(l),f=n(1377),p=n(1374),d=n(1343),v=n(272),m=n(1335),g=n(1337),y=n(275),w=n.n(y),b=n(941),E=n(344),k=n(267),O=n(105),S=n(273);function C(){C=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),s=new U(r||[]);return a(i,"_invoke",{value:L(e,n,s)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",m={};function g(){}function y(){}function w(){}var b={};u(b,i,function(){return this});var E=Object.getPrototypeOf,k=E&&E(E(_([])));k&&k!==n&&r.call(k,i)&&(b=k);var O=w.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function n(a,o,i,s){var c=h(e[a],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,i,s)},function(e){n("throw",e,i,s)}):t.resolve(l).then(function(e){u.value=e,i(u)},function(e){return n("throw",e,i,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t(function(t,a){n(e,r,t,a)})}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=f;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var c=D(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===f)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=d;var u=h(t,n,r);if("normal"===u.type){if(a=r.done?v:p,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=v,r.method="throw",r.arg=u.arg)}}}function D(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function U(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(O,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,c,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},S(x.prototype),u(x.prototype,s,function(){return this}),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(l(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},S(O),u(O,c,"Generator"),u(O,i,function(){return this}),u(O,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,U.prototype={constructor:U,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;T(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}var x=function(e){function t(e){var n;return Object(o.a)(this,t),(n=Object(s.a)(this,Object(c.a)(t).call(this,e))).componentDidMount=function(){void 0!==n.props.match.params.mobileno&&n.loadData()},n.loadData=Object(a.a)(C().mark(function e(){return C().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.props.getUserDetails(n.props.match.params.mobileno);case 2:return e.next=4,n.setState({shwDet:!0,fmobileno:n.props.match.params.mobileno});case 4:case"end":return e.stop()}},e)})),n.handleSubmit=Object(a.a)(C().mark(function e(){var t;return C().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={header:"Error",content:"Please enter valid Mobile No."},!(n.state.fmobileno.length<10)){e.next=7;break}return e.next=4,n.props.showError(t);case 4:e.t0=e.sent,e.next=15;break;case 7:return e.next=9,n.props.getUserDetails(n.state.fmobileno);case 9:return e.next=11,n.props.getUserType("CreateUser");case 11:return e.next=13,n.props.fetchUnivs();case 13:n.setState({disabled:!0}),e.t0=""!=n.props.userDetails?n.setState({shwDet:!0}):""==n.props.userDetails.fname?alert(n.props.userDetails.fname):n.setState({shwDet:!1});case 15:e.t0;case 16:case"end":return e.stop()}},e)})),n.handleChangedate=function(){var e=Object(a.a)(C().mark(function e(t){return C().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.setState({fdob:t.target.value},function(){return n.props.changeUserDetails("fdob",n.state.fdob)});case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),n.handleChange=function(){var e=Object(a.a)(C().mark(function e(t,a){var o,i;return C().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=a.name,i=a.value,"fmobileno"==o?n.setState(Object(r.a)({},o,i)):n.props.changeUserDetails(o,i);case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),n.handleMultiple=function(e,t){var r=t.name,a=t.value,o="";a.map(function(e,t){return t<a.length&&""!=e?o="".concat(e,"*").concat(o):null}),n.props.changeUserDetails(r,o)},n.changeCheckBox=function(){n.state.sendSms?n.setState({sendSms:!1}):n.setState({sendSms:!0})},n.handleCreate=Object(a.a)(C().mark(function e(){var t,r;return C().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.props.userDetails,n.state.shwDet||(r={header:"Error",content:"No Details to Update."}),""==t.fname&&(r={header:"Error",content:"Please enter Degree Despcription."}),""!=t.fmobileno&&""!=t.femail||(r={header:"Error",content:"Contact Number or Email cannot be empty."}),""==t.priusertype&&(r={header:"Error",content:"Please enter Primary User Type."}),"undefined"!=typeof r){e.next=11;break}return e.next=8,n.props.saveUserDetails(n.state.sendSms);case 8:n.setState({shwDet:!1}),e.next=13;break;case 11:return e.next=13,n.props.showError(r);case 13:case"end":return e.stop()}},e)})),n.handleCancel=function(){n.setState({shwDet:!1,disabled:!1,fmobileno:""})},n.viewCreateUser=function(){n.props.viewCreateUser()},n.state={fdob:"",shwDet:!1,fmobileno:"",sendSms:!1},n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props.userTypeList,t=this.props.userDetails,n=this.props.user,r=e.filter(function(e,t){return e.FUSERTYPE>n.fcurtype}).map(function(e,t){return{key:t,value:e.FUSERTYPE,text:"".concat(e.FUSERTYPE," - ").concat(e.FTYPEDESC)}}),a=e.filter(function(e,r){return e.FUSERTYPE!=t.priusertype&&e.FUSERTYPE>n.fcurtype}).map(function(e,t){return{key:t,value:e.FUSERTYPE,text:"".concat(e.FUSERTYPE," - ").concat(e.FTYPEDESC)}});if(null!=t.addiusertype)var o=t.addiusertype.split("*");o=void 0==o?[]:o;var i=Object(S.i)(),s=this.props.univs.map(function(e,t){return{key:t,value:e.funivcode,text:"".concat(e.funivcode," - ").concat(e.funivname)}});return h.a.createElement(h.a.Fragment,null,h.a.createElement(f.a,{fluid:!0},h.a.createElement(f.a.Content,null,h.a.createElement(f.a.Header,{style:{display:"flex"}},h.a.createElement(p.a,{as:"h3"},"Create User"),h.a.createElement("div",{className:"ml-auto"},h.a.createElement(b.a,{to:{pathname:"/viewUsers/"}},h.a.createElement(d.a,{basic:!0,color:"green",content:"View",icon:"eye"})),h.a.createElement(d.a,{basic:!0,color:"blue",content:"Create / Update",onClick:this.handleCreate,icon:"upload"}),h.a.createElement(d.a,{basic:!0,color:"black",icon:"ban",onClick:this.handleCancel,content:"Cancel"}),h.a.createElement(b.a,{to:"/dashboard"},h.a.createElement(d.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),h.a.createElement(v.a,null),h.a.createElement(f.a.Description,{style:{overflowY:"auto",height:"".concat(i,"px"),width:"100%"}},h.a.createElement(m.a,null,h.a.createElement(m.a.Field,{width:4},h.a.createElement(m.a.Input,{id:"fmobileno",label:"Enter Contact No.",placeholder:"Contact No.",name:"fmobileno",value:this.state.fmobileno,readOnly:this.state.disabled,onChange:this.handleChange})),h.a.createElement(d.a,{content:"Submit",color:"blue",onClick:this.handleSubmit})),h.a.createElement(v.a,null),this.state.shwDet&&h.a.createElement(m.a,null,h.a.createElement(m.a.Group,null,h.a.createElement(m.a.Field,{width:8},h.a.createElement(m.a.Input,{type:"text",placeholder:"Name",label:"User Name",name:"fname",value:t.fname,onChange:this.handleChange})),h.a.createElement(m.a.Field,{width:2},h.a.createElement("label",null,"Date of Birth"),h.a.createElement(w.a,{type:"text",placeholder:"DOB",name:"fdob",mask:"ed/nm/zyyy",formatChars:{n:"[0-1]",m:"[0-9]",e:"[0-3]",d:"[0-9]",z:"[1-2]",y:"[0-9]"},value:t.fdob,onChange:this.handleChangedate}))),h.a.createElement(m.a.Group,null,h.a.createElement(m.a.Field,{width:4},h.a.createElement(m.a.Input,{id:"fmobileno",name:"fmobileno",maxLength:"10",minLength:"10",value:t.fmobileno,onChange:this.handleChange,label:"Contact No.",placeholder:"Contact No.",readOnly:!0})),h.a.createElement(m.a.Field,{width:6},h.a.createElement(m.a.Input,{id:"femail",name:"femail",value:t.femail,onChange:this.handleChange,label:"Email ID",placeholder:"abc@xyz.com"}))),h.a.createElement(m.a.Group,{inline:!0,width:4},h.a.createElement("label",null,"Gender"),h.a.createElement(m.a.Radio,{label:"Male",value:"M",name:"fsex",onChange:this.handleChange,checked:"M"==t.fsex}),h.a.createElement(m.a.Radio,{label:"Female",value:"F",name:"fsex",checked:"F"==t.fsex,onChange:this.handleChange}),h.a.createElement("label",null,"Active Status"),h.a.createElement(m.a.Radio,{label:"Active",value:"T",name:"factive",onChange:this.handleChange,checked:"T"==t.factive}),h.a.createElement(m.a.Radio,{label:"Inactive",value:"F",name:"factive",checked:"F"==t.factive,onChange:this.handleChange})),h.a.createElement(m.a.Field,{width:10},h.a.createElement("label",null,"Select University"),h.a.createElement(g.a,{placeholder:"Universities",search:!0,selection:!0,id:"funivcode",name:"funivcode",value:t.funivcode,onChange:this.handleChange,options:s})),h.a.createElement(m.a.Field,{width:10},h.a.createElement("label",null,"Primary User Type"),h.a.createElement(g.a,{placeholder:"Primary User Type",search:!0,selection:!0,id:"priusertype",name:"priusertype",value:t.priusertype,options:r,onChange:this.handleChange})),h.a.createElement(m.a.Field,{width:10},h.a.createElement("label",null,"Additional User Type"),h.a.createElement(g.a,{placeholder:"Additional User Type",search:!0,selection:!0,multiple:!0,id:"addiusertype",name:"addiusertype",value:o,onChange:this.handleMultiple,options:a})),h.a.createElement(m.a.Field,{width:10},h.a.createElement("label",null,"Send login credentials to this user by SMS. "),h.a.createElement("input",{type:"checkbox",checked:this.state.sendSms,onClick:this.changeCheckBox,tabindex:"0",class:"hidden"})))))))}}]),t}(l.Component);t.default=Object(O.b)(function(e){return{userTypeList:e.userTypeList,userDetails:e.userDetails,user:e.user,univs:e.univs,users:e.viewCreateUser}},{fetchUnivs:k.o,getUserType:E.d,getUserDetails:E.c,changeUserDetails:E.a,saveUserDetails:E.e,showError:k.A,viewCreateUser:E.g})(x)},272:function(e,t,n){"use strict";var r=n(270),a=n.n(r),o=n(268),i=n.n(o),s=n(2),c=n.n(s),u=n(349),l=n(613),h=n(611),f=n(269);function p(e){var t=e.children,n=e.className,r=e.clearing,o=e.content,s=e.fitted,d=e.hidden,v=e.horizontal,m=e.inverted,g=e.section,y=e.vertical,w=i()("ui",Object(u.a)(r,"clearing"),Object(u.a)(s,"fitted"),Object(u.a)(d,"hidden"),Object(u.a)(v,"horizontal"),Object(u.a)(m,"inverted"),Object(u.a)(g,"section"),Object(u.a)(y,"vertical"),"divider",n),b=Object(l.a)(p,e),E=Object(h.a)(p,e);return c.a.createElement(E,a()({},b,{className:w}),f.a.isNil(t)?o:t)}p.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],p.propTypes={},t.a=p},275:function(e,t,n){e.exports=n(276)},276:function(e,t,n){"use strict";var r,a=(r=n(2))&&"object"==typeof r&&"default"in r?r.default:r,o=n(106);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var a=n[r],o=Object.getOwnPropertyDescriptor(t,a);o&&o.configurable&&void 0===e[a]&&Object.defineProperty(e,a,o)}}(e.prototype.constructor=e,t)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=function(e,t,n,r,a,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,s],l=0;(c=new Error(t.replace(/%s/g,function(){return u[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}};function l(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else{var r=e.createTextRange();r.collapse(!0),r.moveStart("character",t),r.moveEnd("character",n-t),r.select()}}var h={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},f="_";function p(e,t,n){var r="",a="",o=null,i=[];if(void 0===t&&(t=f),null==n&&(n=h),!e||"string"!=typeof e)return{maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var s=!1;return e.split("").forEach(function(e){s=!s&&"\\"===e||(s||!n[e]?(i.push(r.length),r.length===i.length-1&&(a+=e)):o=r.length+1,r+=e,!1)}),{maskChar:t,formatChars:n,prefix:a,mask:r,lastEditablePosition:o,permanents:i}}function d(e,t){return-1!==e.permanents.indexOf(t)}function v(e,t,n){var r=e.mask,a=e.formatChars;if(!n)return!1;if(d(e,t))return r[t]===n;var o=a[r[t]];return new RegExp(o).test(n)}function m(e,t){return t.split("").every(function(t,n){return d(e,n)||!v(e,n,t)})}function g(e,t){var n=e.maskChar,r=e.prefix;if(!n){for(;t.length>r.length&&d(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,o=t.length;o>=r.length;o--){var i=t[o];if(!d(e,o)&&v(e,o,i)){a=o+1;break}}return a}function y(e,t){return g(e,t)===e.mask.length}function w(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=b(e,"",t,0)).length<a.length&&(t=a);t.length<r.length&&d(e,t.length);)t+=r[t.length];return t}if(t)return b(e,w(e,""),t,0);for(var o=0;o<r.length;o++)d(e,o)?t+=r[o]:t+=n;return t}function b(e,t,n,r){var a=e.mask,o=e.maskChar,i=e.prefix,s=n.split(""),c=y(e,t);return!o&&r>t.length&&(t+=a.slice(t.length,r)),s.every(function(n){for(;l=n,d(e,u=r)&&l!==a[u];){if(r>=t.length&&(t+=a[r]),s=n,o&&d(e,r)&&s===o)return!0;if(++r>=a.length)return!1}var s,u,l;return!v(e,r,n)&&n!==o||(r<t.length?t=o||c||r<i.length?t.slice(0,r)+n+t.slice(r+1):(t=t.slice(0,r)+n+t.slice(r),w(e,t)):o||(t+=n),++r<a.length)}),t}function E(e,t){for(var n=e.mask,r=t;r<n.length;++r)if(!d(e,r))return r;return null}function k(e){return e||0===e?e+"":""}function O(e,t,n,r,a){var o=e.mask,i=e.prefix,s=e.lastEditablePosition,c=t,u="",l=0,h=0,f=Math.min(a.start,n.start);return n.end>a.start?h=(l=function(e,t,n,r){var a=e.mask,o=e.maskChar,i=n.split(""),s=r;return i.every(function(t){for(;i=t,d(e,n=r)&&i!==a[n];)if(++r>=a.length)return!1;var n,i;return(v(e,r,t)||t===o)&&r++,r<a.length}),r-s}(e,0,u=c.slice(a.start,n.end),f))?a.length:0:c.length<r.length&&(h=r.length-c.length),c=r,h&&(1!==h||a.length||(f=a.start===n.start?E(e,n.start):function(e,t){for(var n=t;0<=n;--n)if(!d(e,n))return n;return null}(e,n.start)),c=function(e,t,n,r){var a=n+r,o=e.maskChar,i=e.mask,s=e.prefix,c=t.split("");if(o)return c.map(function(t,r){return r<n||a<=r?t:d(e,r)?i[r]:o}).join("");for(var u=a;u<c.length;u++)d(e,u)&&(c[u]="");return n=Math.max(s.length,n),c.splice(n,a-n),t=c.join(""),w(e,t)}(e,c,f,h)),c=b(e,c,u,f),(f+=l)>=o.length?f=o.length:f<i.length&&!l?f=i.length:f>=i.length&&f<s&&l&&(f=E(e,f)),u||(u=null),{value:c=w(e,c),enteredString:u,selection:{start:f,end:f}}}function S(e){return"function"==typeof e}function C(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function x(e){return(C()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function L(e){(C()||clearTimeout)(e)}var D=function(e){function t(t){var n=e.call(this,t)||this;n.focused=!1,n.mounted=!1,n.previousSelection=null,n.selectionDeferId=null,n.saveSelectionLoopDeferId=null,n.saveSelectionLoop=function(){n.previousSelection=n.getSelection(),n.saveSelectionLoopDeferId=x(n.saveSelectionLoop)},n.runSaveSelectionLoop=function(){null===n.saveSelectionLoopDeferId&&n.saveSelectionLoop()},n.stopSaveSelectionLoop=function(){null!==n.saveSelectionLoopDeferId&&(L(n.saveSelectionLoopDeferId),n.saveSelectionLoopDeferId=null,n.previousSelection=null)},n.getInputDOMNode=function(){if(!n.mounted)return null;var e=o.findDOMNode(c(c(n))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},n.getInputValue=function(){var e=n.getInputDOMNode();return e?e.value:null},n.setInputValue=function(e){var t=n.getInputDOMNode();t&&(n.value=e,t.value=e)},n.setCursorToEnd=function(){var e=g(n.maskOptions,n.value),t=E(n.maskOptions,e);null!==t&&n.setCursorPosition(t)},n.setSelection=function(e,t,r){void 0===r&&(r={});var a=n.getInputDOMNode(),o=n.isFocused();a&&o&&(r.deferred||l(a,e,t),null!==n.selectionDeferId&&L(n.selectionDeferId),n.selectionDeferId=x(function(){n.selectionDeferId=null,l(a,e,t)}),n.previousSelection={start:e,end:t,length:Math.abs(t-e)})},n.getSelection=function(){return function(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else{var r=document.selection.createRange();r.parentElement()===e&&(t=-r.moveStart("character",-e.value.length),n=-r.moveEnd("character",-e.value.length))}return{start:t,end:n,length:n-t}}(n.getInputDOMNode())},n.getCursorPosition=function(){return n.getSelection().start},n.setCursorPosition=function(e){n.setSelection(e,e)},n.isFocused=function(){return n.focused},n.getBeforeMaskedValueChangeConfig=function(){var e=n.maskOptions,t=e.mask,r=e.maskChar,a=e.permanents,o=e.formatChars;return{mask:t,maskChar:r,permanents:a,alwaysShowMask:!!n.props.alwaysShowMask,formatChars:o}},n.isInputAutofilled=function(e,t,r,a){var o=n.getInputDOMNode();try{if(o.matches(":-webkit-autofill"))return!0}catch(u){}return!n.focused||a.end<r.length&&t.end===e.length},n.onChange=function(e){var t=c(c(n)).beforePasteState,r=c(c(n)).previousSelection,a=n.props.beforeMaskedValueChange,o=n.getInputValue(),i=n.value,s=n.getSelection();n.isInputAutofilled(o,s,i,r)&&(i=w(n.maskOptions,""),r={start:0,end:0,length:0}),t&&(r=t.selection,i=t.value,s={start:r.start+o.length,end:r.start+o.length,length:0},o=i.slice(0,r.start)+o+i.slice(r.end),n.beforePasteState=null);var u=O(n.maskOptions,o,s,i,r),l=u.enteredString,h=u.selection,f=u.value;if(S(a)){var p=a({value:f,selection:h},{value:i,selection:r},l,n.getBeforeMaskedValueChangeConfig());f=p.value,h=p.selection}n.setInputValue(f),S(n.props.onChange)&&n.props.onChange(e),n.isWindowsPhoneBrowser?n.setSelection(h.start,h.end,{deferred:!0}):n.setSelection(h.start,h.end)},n.onFocus=function(e){var t=n.props.beforeMaskedValueChange,r=n.maskOptions,a=r.mask,o=r.prefix;if(n.focused=!0,n.mounted=!0,a){if(n.value)g(n.maskOptions,n.value)<n.maskOptions.mask.length&&n.setCursorToEnd();else{var i=w(n.maskOptions,o),s=w(n.maskOptions,i),c=g(n.maskOptions,s),u=E(n.maskOptions,c),l={start:u,end:u};if(S(t)){var h=t({value:s,selection:l},{value:n.value,selection:null},null,n.getBeforeMaskedValueChangeConfig());s=h.value,l=h.selection}var f=s!==n.getInputValue();f&&n.setInputValue(s),f&&S(n.props.onChange)&&n.props.onChange(e),n.setSelection(l.start,l.end)}n.runSaveSelectionLoop()}S(n.props.onFocus)&&n.props.onFocus(e)},n.onBlur=function(e){var t=n.props.beforeMaskedValueChange,r=n.maskOptions.mask;if(n.stopSaveSelectionLoop(),n.focused=!1,r&&!n.props.alwaysShowMask&&m(n.maskOptions,n.value)){var a="";S(t)&&(a=t({value:a,selection:null},{value:n.value,selection:n.previousSelection},null,n.getBeforeMaskedValueChangeConfig()).value);var o=a!==n.getInputValue();o&&n.setInputValue(a),o&&S(n.props.onChange)&&n.props.onChange(e)}S(n.props.onBlur)&&n.props.onBlur(e)},n.onMouseDown=function(e){if(!n.focused&&document.addEventListener){n.mouseDownX=e.clientX,n.mouseDownY=e.clientY,n.mouseDownTime=(new Date).getTime();document.addEventListener("mouseup",function e(t){if(document.removeEventListener("mouseup",e),n.focused){var r=Math.abs(t.clientX-n.mouseDownX),a=Math.abs(t.clientY-n.mouseDownY),o=Math.max(r,a),i=(new Date).getTime()-n.mouseDownTime;(o<=10&&i<=200||o<=5&&i<=300)&&n.setCursorToEnd()}})}S(n.props.onMouseDown)&&n.props.onMouseDown(e)},n.onPaste=function(e){S(n.props.onPaste)&&n.props.onPaste(e),e.defaultPrevented||(n.beforePasteState={value:n.getInputValue(),selection:n.getSelection()},n.setInputValue(""))},n.handleRef=function(e){null==n.props.children&&S(n.props.inputRef)&&n.props.inputRef(e)};var r=t.mask,a=t.maskChar,i=t.formatChars,s=t.alwaysShowMask,u=t.beforeMaskedValueChange,h=t.defaultValue,f=t.value;n.maskOptions=p(r,a,i),null==h&&(h=""),null==f&&(f=h);var d=k(f);if(n.maskOptions.mask&&(s||d)&&(d=w(n.maskOptions,d),S(u))){var v=t.value;null==t.value&&(v=h),d=u({value:d,selection:null},{value:v=k(v),selection:null},null,n.getBeforeMaskedValueChangeConfig()).value}return n.value=d,n}s(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=function(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},n.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,r=t.alwaysShowMask,a=t.mask,o=t.maskChar,i=t.formatChars,s=this.maskOptions,c=r||this.isFocused(),u=null!=this.props.value,l=u?k(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=p(a,o,i),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(l=this.getInputValue()),(f||this.maskOptions.mask&&(l||c))&&(l=w(this.maskOptions,l)),f){var d=g(this.maskOptions,l);(null===h||d<h)&&(h=y(this.maskOptions,l)?d:E(this.maskOptions,d))}!this.maskOptions.mask||!m(this.maskOptions,l)||c||u&&this.props.value||(l="");var v={start:h,end:h};if(S(n)){var b=n({value:l,selection:v},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());l=b.value,v=b.selection}this.value=l;var O=this.getInputValue()!==this.value;O?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var C=!1;null!=v.start&&null!=v.end&&(C=!e||e.start!==v.start||e.end!==v.end),(C||O)&&this.setSelection(v.start,v.end)}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&L(this.selectionDeferId),this.stopSaveSelectionLoop()},n.render=function(){var e,t=this.props,n=(t.mask,t.alwaysShowMask,t.maskChar,t.formatChars,t.inputRef,t.beforeMaskedValueChange,t.children),r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){S(n)||u(!1);var o=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],s=i({},r);o.forEach(function(e){return delete s[e]}),e=n(s),o.filter(function(t){return null!=e.props[t]&&e.props[t]!==r[t]}).length&&u(!1)}else e=a.createElement("input",i({ref:this.handleRef},r));var c={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(r.disabled||r.readOnly||(c.onChange=this.onChange,c.onPaste=this.onPaste,c.onMouseDown=this.onMouseDown),null!=r.value&&(c.value=this.value)),e=a.cloneElement(e,c)},t}(a.Component);e.exports=D},344:function(e,t,n){"use strict";n.d(t,"c",function(){return s}),n.d(t,"a",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return h}),n.d(t,"g",function(){return f}),n.d(t,"b",function(){return p});var r=n(68),a=n(271),o=n(267);function i(){i=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new U(r||[]);return a(i,"_invoke",{value:L(e,n,s)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function y(){}function w(){}function b(){}var E={};l(E,s,function(){return this});var k=Object.getPrototypeOf,O=k&&k(k(_([])));O&&O!==n&&r.call(O,s)&&(E=O);var S=b.prototype=y.prototype=Object.create(E);function C(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function n(a,o,i,s){var c=f(e[a],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,i,s)},function(e){n("throw",e,i,s)}):t.resolve(l).then(function(e){u.value=e,i(u)},function(e){return n("throw",e,i,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t(function(t,a){n(e,r,t,a)})}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=p;return function(o,i){if(a===v)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var c=D(s,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var u=f(t,n,r);if("normal"===u.type){if(a=r.done?m:d,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(a=m,r.method="throw",r.arg=u.arg)}}}function D(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function U(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return w.prototype=b,a(S,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(x.prototype),l(x.prototype,c,function(){return this}),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(h(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},C(S),l(S,u,"Generator"),l(S,s,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,U.prototype={constructor:U,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;T(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}var s=function(e){return function(){var t=Object(r.a)(i().mark(function t(n,r){var s,c,u,l;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=r(),n({type:"SET_LOADER"}),t.next=4,a.a.get("/app.php",{params:{a:"getUserDetails",univcode:s.univ.funivcode,fmobileno:e,fusertype:s.user.fcurtype,fcurtype:s.user.fcurtype}});case 4:c=t.sent,n({type:"UNSET_LOADER"}),"object"!==typeof c.data?(u={header:"Error",content:"Something went wrong"},n(Object(o.A)(u))):-1===c.data.error_code?n({type:"NEW_USER_DETAILS",payload:e}):1===c.data.error_code?(l={header:"Error",content:c.data.data.msg},n(Object(o.A)(l))):n({type:"USER_DETAILS",payload:c.data});case 7:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()},c=function(e,t){return{type:"CHANGE_USER_DETAILS",payload:{name:e,value:t}}},u=function(e){return function(){var t=Object(r.a)(i().mark(function t(n,r){var s,c,u,l;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=r(),t.next=3,a.a.get("/app.php",{params:{a:"getUserType",type:e,univcode:s.univ.funivcode}});case 3:"object"!==typeof(c=t.sent).data?(u={header:"Error",content:"Something went wrong"},n(Object(o.A)(u))):-1===c.data.error_code?(l={header:"Error",content:c.data.data.msg},n(Object(o.A)(l))):n({type:"USER_TYPE_LIST",payload:c.data});case 5:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()},l=function(){return function(){var e=Object(r.a)(i().mark(function e(t,n){var r,s,c,u,l;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n(),e.next=3,a.a.post("/app.php?a=saveUserDetails",{data:r.userDetails});case 3:"object"!==typeof(s=e.sent).data?(c={header:"Error",content:"Something went wrong"},t(Object(o.A)(c))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},t(Object(o.A)(u))):(l={header:"Success",content:s.data.data.msg},t(Object(o.A)(l)));case 5:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},h=function(){return function(){var e=Object(r.a)(i().mark(function e(t,n){var r,s,c,u,l;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n(),t({type:"SET_LOADER"}),e.next=4,a.a.post("/app.php?a=saveUserTypeList",{data:r.userTypeList});case 4:s=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof s.data?(c={header:"Error",content:"Something went wrong"},t(Object(o.A)(c))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},t(Object(o.A)(u))):(l={header:"Success",content:s.data.data.msg},t(Object(o.A)(l)));case 7:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},f=function(){return function(){var e=Object(r.a)(i().mark(function e(t,n){var r,s,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n(),t({type:"SET_LOADER"}),e.next=4,a.a.get("/app.php",{params:{a:"viewCreateUser",univcode:r.univ.funivcode}});case 4:s=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof s.data?(c={header:"Error",content:"Something went wrong"},t(Object(o.A)(c))):-1===s.data.error_code?t({type:"CLEAR_CREATE_USER",payload:s.data}):t({type:"VIEW_CREATE_USER",payload:s.data});case 7:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},p=function(e){return function(){var t=Object(r.a)(i().mark(function t(n,r){var s,c,u;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r(),n({type:"SET_LOADER"}),t.next=4,a.a.post("/app.php?a=deleteCreatedUser",{data:e});case 4:s=t.sent,n({type:"UNSET_LOADER"}),"object"!==typeof s.data?(c={header:"Error",content:"Something went wrong"},n(Object(o.A)(c))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},n(Object(o.A)(u))):{header:"Success",content:s.data.data.msg};case 7:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=80.62ba1c86.chunk.js.map
|