0xV3NOMx
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.17.76.163


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/80.dccdcec1.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[80],{1162:function(e,t,n){"use strict";n.r(t);var a=n(3),r=n(41),o=n.n(r),l=n(68),s=n(99),i=n(100),u=n(102),c=n(101),h=n(103),p=n(1),d=n.n(p),m=n(1139),f=n(1135),v=n(1106),g=n(272),C=n(1098),w=n(1100),E=n(273),b=n.n(E),k=n(858),y=n(269),O=n(266),S=n(104),I=n(270),D=function(e){function t(){var e,n;Object(s.a)(this,t);for(var r=arguments.length,i=new Array(r),h=0;h<r;h++)i[h]=arguments[h];return(n=Object(u.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(i)))).state={fdob:"",shwDet:!1,fregno:"",sendSms:!1},n.handleSubmit=Object(l.a)(o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={header:"Error",content:"Please enter Reg. No."},!(n.state.fregno.length<8)){e.next=7;break}return e.next=4,n.props.showError(t);case 4:e.t0=e.sent,e.next=11;break;case 7:return e.next=9,n.props.getCnvDet(n.state.fregno);case 9:n.setState({disabled:!0}),e.t0=""!=n.props.convoDet?n.setState({shwDet:!0}):""==n.props.convoDet.fname?alert(n.props.convoDet.fname):n.setState({shwDet:!1});case 11:e.t0;case 12:case"end":return e.stop()}},e)})),n.handleChangedate=function(){var e=Object(l.a)(o.a.mark(function e(t){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.setState({fdob:t.target.value},function(){return n.props.changeConvoDetails("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(l.a)(o.a.mark(function e(t,r){var l,s;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=r.name,s=r.value,"fregno"==l?n.setState(Object(a.a)({},l,s)):n.props.changeConvoDetails(l,s);case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),n.handleMultiple=function(e,t){var a=t.name,r=t.value,o="";r.map(function(e,t){return t<r.length&&""!=e?o="".concat(e,"*").concat(o):null}),n.props.changeConvoDetails(a,o)},n.changeCheckBox=function(){n.state.sendSms?n.setState({sendSms:!1}):n.setState({sendSms:!0})},n.handleSave=Object(l.a)(o.a.mark(function e(){var t;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.props.convoDet,n.state.shwDet||(t={header:"Error",content:"No Details to Update."}),"undefined"!=typeof t){e.next=8;break}return e.next=5,n.props.saveConvoDet(n.state.sendSms);case 5:n.setState({shwDet:!1}),e.next=10;break;case 8:return e.next=10,n.props.showError(t);case 10:case"end":return e.stop()}},e)})),n.handleCancel=function(){n.setState({shwDet:!1,disabled:!1,fregno:""})},n}return Object(h.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this.props.convoDet;console.log(e);this.props.user;var t=Object(I.i)();return d.a.createElement(d.a.Fragment,null,d.a.createElement(m.a,{fluid:!0},d.a.createElement(m.a.Content,null,d.a.createElement(m.a.Header,{style:{display:"flex"}},d.a.createElement(f.a,{as:"h3"},"Convocation Application Correction"),d.a.createElement("div",{className:"ml-auto"},d.a.createElement(v.a,{basic:!0,color:"blue",content:"Update",onClick:this.handleSave,icon:"upload"}),d.a.createElement(v.a,{basic:!0,color:"black",icon:"ban",onClick:this.handleCancel,content:"Cancel"}),d.a.createElement(k.a,{to:"/dashboard"},d.a.createElement(v.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),d.a.createElement(g.a,null),d.a.createElement(m.a.Description,{style:{overflowY:"auto",height:"".concat(t,"px"),width:"100%"}},d.a.createElement(C.a,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{id:"fregno",label:"Enter Register No.",placeholder:"Register No.",name:"fregno",value:this.state.fregno,readOnly:this.state.disabled,onChange:this.handleChange})),d.a.createElement(v.a,{content:"Submit",color:"blue",onClick:this.handleSubmit})),d.a.createElement(g.a,null),this.state.shwDet&&d.a.createElement(C.a,null,d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:8},d.a.createElement(C.a.Input,{type:"text",placeholder:"Name",label:"User Name",name:"fname",value:e.fname,readOnly:!0,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement("label",null,"Reg. No."),d.a.createElement(b.a,{type:"text",placeholder:"Reg. No.",name:"regno",value:e.regno,readOnly:!0,onChange:this.handleChangedate}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:10},d.a.createElement(C.a.Input,{type:"text",placeholder:"Degree",label:"Degree",name:"degree",value:e.degree,readOnly:!0,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:10},d.a.createElement(C.a.Input,{type:"text",placeholder:"College",label:"College",name:"collname",value:e.collname,readOnly:!0,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Application No.",label:"Application No.",name:"fappno",value:e.fappno,readOnly:!0,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Amount Paid",label:"Amount Paid",name:"famount",value:e.famount,readOnly:!0,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement("label",null,"Payment Type"),d.a.createElement(b.a,{type:"text",placeholder:"Payment Type",name:"fpaytype",readOnly:!0,value:e.fpaytype,onChange:this.handleChangedate}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Payment Date",label:"Payment Date",name:"fpaydate",value:e.fpaydate,readOnly:!0,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Payment ID",label:"Payment ID",name:"ftranid",value:e.ftranid,readOnly:!0,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement("label",null,"Date of Birth"),d.a.createElement(b.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:e.fdob,onChange:this.handleChangedate}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{id:"fmobile",name:"fmobile",maxLength:"10",minLength:"10",onChange:this.handleChange,label:"Contact No.",placeholder:"Contact No.",value:e.fmobile})),d.a.createElement(C.a.Field,{width:6},d.a.createElement(C.a.Input,{id:"femail",name:"femail",onChange:this.handleChange,label:"Email ID",value:e.femail,placeholder:"abc@xyz.com"}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:10},d.a.createElement(C.a.Input,{type:"text",placeholder:"Address 1",label:"Address 1",name:"postadd1",value:e.postadd1,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:10},d.a.createElement(C.a.Input,{type:"text",placeholder:"Address 2",label:"Address 2",name:"postadd2",value:e.postadd2,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"City",label:"City",name:"city",value:e.city,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"State",label:"State",name:"state",value:e.state,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement(C.a.Input,{type:"text",placeholder:"Pin code",label:"Pin Code",name:"pincode",value:e.pincode,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Contry",label:"Contry",name:"contry",value:e.contry,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:4},d.a.createElement(C.a.Input,{type:"text",placeholder:"Aadahr",label:"Aadahr",name:"aadahr",value:e.aadahr,onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement(C.a.Input,{type:"text",placeholder:"National",label:"National",name:"fnational",value:e.fnational,onChange:this.handleChange}))),d.a.createElement(C.a.Group,null,d.a.createElement(C.a.Field,{width:4},d.a.createElement("label",null,"Certificate Type"),d.a.createElement(w.a,{placeholder:"Certificate Type",name:"freccer",value:e.freccer,selection:!0,search:!0,options:[{value:"",text:"-Select-"},{value:"In Absentia",text:"In Absentia"},{value:"In Presence",text:"In Presence"}],onChange:this.handleChange})),d.a.createElement(C.a.Field,{width:2},d.a.createElement("label",null,"Category"),d.a.createElement(w.a,{placeholder:"Category",name:"fcatcode",value:e.fcatcode,selection:!0,search:!0,options:[{value:"",text:"-Select-"},{value:"GM",text:"GM"},{value:"IIA",text:"IIA"},{value:"IIB",text:"IIB"},{value:"IIIA",text:"IIIA"},{value:"IIIB",text:"IIIB"},{value:"SC",text:"SC"},{value:"ST",text:"ST"}],onChange:this.handleChange}))))))))}}]),t}(p.Component);t.default=Object(S.b)(function(e){return{convoDet:e.convoDet,user:e.user,univs:e.univs}},{getCnvDet:function(e){return function(){var t=Object(l.a)(o.a.mark(function t(n,a){var r,l,s,i,u;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=a(),n({type:"SET_LOADER"}),t.next=4,y.a.get("/app.php",{params:{a:"getCnvDet",univcode:r.univ.funivcode,fregno:e,fusertype:r.user.fusertype,fcurtype:r.user.fcurtype}});case 4:l=t.sent,n({type:"UNSET_LOADER"}),"object"!==typeof l.data?(s={header:"Error",content:"Something went wrong"},n(Object(O.w)(s))):-1===l.data.error_code?(i={header:"Error",content:l.data.data.msg},n(Object(O.w)(i))):1===l.data.error_code?(u={header:"Error",content:l.data.data.msg},n(Object(O.w)(u))):n({type:"CONVO_DETAILS",payload:l.data});case 7:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()},changeConvoDetails:function(e,t){return{type:"CHANGE_CONVO_DETAILS",payload:{name:e,value:t}}},saveConvoDet:function(){return function(){var e=Object(l.a)(o.a.mark(function e(t,n){var a,r,l,s,i;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=n(),e.next=3,y.a.post("/app.php?a=saveConvoDet&univcode="+a.univ.funivcode,{data:a.convoDet});case 3:"object"!==typeof(r=e.sent).data?(l={header:"Error",content:"Something went wrong"},t(Object(O.w)(l))):-1===r.data.error_code?(s={header:"Error",content:r.data.data.msg},t(Object(O.w)(s))):(i={header:"Success",content:r.data.data.msg},t(Object(O.w)(i)));case 5:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},showError:O.w})(D)},272:function(e,t,n){"use strict";var a=n(268),r=n.n(a),o=n(265),l=n.n(o),s=n(1),i=n.n(s),u=n(333),c=n(551),h=n(549),p=n(267);function d(e){var t=e.children,n=e.className,a=e.clearing,o=e.content,s=e.fitted,m=e.hidden,f=e.horizontal,v=e.inverted,g=e.section,C=e.vertical,w=l()("ui",Object(u.a)(a,"clearing"),Object(u.a)(s,"fitted"),Object(u.a)(m,"hidden"),Object(u.a)(f,"horizontal"),Object(u.a)(v,"inverted"),Object(u.a)(g,"section"),Object(u.a)(C,"vertical"),"divider",n),E=Object(c.a)(d,e),b=Object(h.a)(d,e);return i.a.createElement(b,r()({},E,{className:w}),p.a.isNil(t)?o:t)}d.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],d.propTypes={},t.a=d},273:function(e,t,n){e.exports=n(274)},274:function(e,t,n){"use strict";var a,r=(a=n(1))&&"object"==typeof a&&"default"in a?a.default:a,o=n(105);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var r=n[a],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}}(e.prototype.constructor=e,t)}function i(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,a,r,o,l,s){if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,r,o,l,s],c=0;(i=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw i.framesToPop=1,i}};function c(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else{var a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select()}}var h={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},p="_";function d(e,t,n){var a="",r="",o=null,l=[];if(void 0===t&&(t=p),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]?(l.push(a.length),a.length===l.length-1&&(r+=e)):o=a.length+1,a+=e,!1)}),{maskChar:t,formatChars:n,prefix:r,mask:a,lastEditablePosition:o,permanents:l}}function m(e,t){return-1!==e.permanents.indexOf(t)}function f(e,t,n){var a=e.mask,r=e.formatChars;if(!n)return!1;if(m(e,t))return a[t]===n;var o=r[a[t]];return new RegExp(o).test(n)}function v(e,t){return t.split("").every(function(t,n){return m(e,n)||!f(e,n,t)})}function g(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&m(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var r=a.length,o=t.length;o>=a.length;o--){var l=t[o];if(!m(e,o)&&f(e,o,l)){r=o+1;break}}return r}function C(e,t){return g(e,t)===e.mask.length}function w(e,t){var n=e.maskChar,a=e.mask,r=e.prefix;if(!n){for((t=E(e,"",t,0)).length<r.length&&(t=r);t.length<a.length&&m(e,t.length);)t+=a[t.length];return t}if(t)return E(e,w(e,""),t,0);for(var o=0;o<a.length;o++)m(e,o)?t+=a[o]:t+=n;return t}function E(e,t,n,a){var r=e.mask,o=e.maskChar,l=e.prefix,s=n.split(""),i=C(e,t);return!o&&a>t.length&&(t+=r.slice(t.length,a)),s.every(function(n){for(;c=n,m(e,u=a)&&c!==r[u];){if(a>=t.length&&(t+=r[a]),s=n,o&&m(e,a)&&s===o)return!0;if(++a>=r.length)return!1}var s,u,c;return!f(e,a,n)&&n!==o||(a<t.length?t=o||i||a<l.length?t.slice(0,a)+n+t.slice(a+1):(t=t.slice(0,a)+n+t.slice(a),w(e,t)):o||(t+=n),++a<r.length)}),t}function b(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!m(e,a))return a;return null}function k(e){return e||0===e?e+"":""}function y(e,t,n,a,r){var o=e.mask,l=e.prefix,s=e.lastEditablePosition,i=t,u="",c=0,h=0,p=Math.min(r.start,n.start);return n.end>r.start?h=(c=function(e,t,n,a){var r=e.mask,o=e.maskChar,l=n.split(""),s=a;return l.every(function(t){for(;l=t,m(e,n=a)&&l!==r[n];)if(++a>=r.length)return!1;var n,l;return(f(e,a,t)||t===o)&&a++,a<r.length}),a-s}(e,0,u=i.slice(r.start,n.end),p))?r.length:0:i.length<a.length&&(h=a.length-i.length),i=a,h&&(1!==h||r.length||(p=r.start===n.start?b(e,n.start):function(e,t){for(var n=t;0<=n;--n)if(!m(e,n))return n;return null}(e,n.start)),i=function(e,t,n,a){var r=n+a,o=e.maskChar,l=e.mask,s=e.prefix,i=t.split("");if(o)return i.map(function(t,a){return a<n||r<=a?t:m(e,a)?l[a]:o}).join("");for(var u=r;u<i.length;u++)m(e,u)&&(i[u]="");return n=Math.max(s.length,n),i.splice(n,r-n),t=i.join(""),w(e,t)}(e,i,p,h)),i=E(e,i,u,p),(p+=c)>=o.length?p=o.length:p<l.length&&!c?p=l.length:p>=l.length&&p<s&&c&&(p=b(e,p)),u||(u=null),{value:i=w(e,i),enteredString:u,selection:{start:p,end:p}}}function O(e){return"function"==typeof e}function S(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function I(e){return(S()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function D(e){(S()||clearTimeout)(e)}var x=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=I(n.saveSelectionLoop)},n.runSaveSelectionLoop=function(){null===n.saveSelectionLoopDeferId&&n.saveSelectionLoop()},n.stopSaveSelectionLoop=function(){null!==n.saveSelectionLoopDeferId&&(D(n.saveSelectionLoopDeferId),n.saveSelectionLoopDeferId=null,n.previousSelection=null)},n.getInputDOMNode=function(){if(!n.mounted)return null;var e=o.findDOMNode(i(i(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=b(n.maskOptions,e);null!==t&&n.setCursorPosition(t)},n.setSelection=function(e,t,a){void 0===a&&(a={});var r=n.getInputDOMNode(),o=n.isFocused();r&&o&&(a.deferred||c(r,e,t),null!==n.selectionDeferId&&D(n.selectionDeferId),n.selectionDeferId=I(function(){n.selectionDeferId=null,c(r,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 a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.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,a=e.maskChar,r=e.permanents,o=e.formatChars;return{mask:t,maskChar:a,permanents:r,alwaysShowMask:!!n.props.alwaysShowMask,formatChars:o}},n.isInputAutofilled=function(e,t,a,r){var o=n.getInputDOMNode();try{if(o.matches(":-webkit-autofill"))return!0}catch(u){}return!n.focused||r.end<a.length&&t.end===e.length},n.onChange=function(e){var t=i(i(n)).beforePasteState,a=i(i(n)).previousSelection,r=n.props.beforeMaskedValueChange,o=n.getInputValue(),l=n.value,s=n.getSelection();n.isInputAutofilled(o,s,l,a)&&(l=w(n.maskOptions,""),a={start:0,end:0,length:0}),t&&(a=t.selection,l=t.value,s={start:a.start+o.length,end:a.start+o.length,length:0},o=l.slice(0,a.start)+o+l.slice(a.end),n.beforePasteState=null);var u=y(n.maskOptions,o,s,l,a),c=u.enteredString,h=u.selection,p=u.value;if(O(r)){var d=r({value:p,selection:h},{value:l,selection:a},c,n.getBeforeMaskedValueChangeConfig());p=d.value,h=d.selection}n.setInputValue(p),O(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,a=n.maskOptions,r=a.mask,o=a.prefix;if(n.focused=!0,n.mounted=!0,r){if(n.value)g(n.maskOptions,n.value)<n.maskOptions.mask.length&&n.setCursorToEnd();else{var l=w(n.maskOptions,o),s=w(n.maskOptions,l),i=g(n.maskOptions,s),u=b(n.maskOptions,i),c={start:u,end:u};if(O(t)){var h=t({value:s,selection:c},{value:n.value,selection:null},null,n.getBeforeMaskedValueChangeConfig());s=h.value,c=h.selection}var p=s!==n.getInputValue();p&&n.setInputValue(s),p&&O(n.props.onChange)&&n.props.onChange(e),n.setSelection(c.start,c.end)}n.runSaveSelectionLoop()}O(n.props.onFocus)&&n.props.onFocus(e)},n.onBlur=function(e){var t=n.props.beforeMaskedValueChange,a=n.maskOptions.mask;if(n.stopSaveSelectionLoop(),n.focused=!1,a&&!n.props.alwaysShowMask&&v(n.maskOptions,n.value)){var r="";O(t)&&(r=t({value:r,selection:null},{value:n.value,selection:n.previousSelection},null,n.getBeforeMaskedValueChangeConfig()).value);var o=r!==n.getInputValue();o&&n.setInputValue(r),o&&O(n.props.onChange)&&n.props.onChange(e)}O(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 a=Math.abs(t.clientX-n.mouseDownX),r=Math.abs(t.clientY-n.mouseDownY),o=Math.max(a,r),l=(new Date).getTime()-n.mouseDownTime;(o<=10&&l<=200||o<=5&&l<=300)&&n.setCursorToEnd()}})}O(n.props.onMouseDown)&&n.props.onMouseDown(e)},n.onPaste=function(e){O(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&&O(n.props.inputRef)&&n.props.inputRef(e)};var a=t.mask,r=t.maskChar,l=t.formatChars,s=t.alwaysShowMask,u=t.beforeMaskedValueChange,h=t.defaultValue,p=t.value;n.maskOptions=d(a,r,l),null==h&&(h=""),null==p&&(p=h);var m=k(p);if(n.maskOptions.mask&&(s||m)&&(m=w(n.maskOptions,m),O(u))){var f=t.value;null==t.value&&(f=h),m=u({value:m,selection:null},{value:f=k(f),selection:null},null,n.getBeforeMaskedValueChangeConfig()).value}return n.value=m,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,a=t.alwaysShowMask,r=t.mask,o=t.maskChar,l=t.formatChars,s=this.maskOptions,i=a||this.isFocused(),u=null!=this.props.value,c=u?k(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=d(r,o,l),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var p=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(c=this.getInputValue()),(p||this.maskOptions.mask&&(c||i))&&(c=w(this.maskOptions,c)),p){var m=g(this.maskOptions,c);(null===h||m<h)&&(h=C(this.maskOptions,c)?m:b(this.maskOptions,m))}!this.maskOptions.mask||!v(this.maskOptions,c)||i||u&&this.props.value||(c="");var f={start:h,end:h};if(O(n)){var E=n({value:c,selection:f},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=E.value,f=E.selection}this.value=c;var y=this.getInputValue()!==this.value;y?(this.setInputValue(this.value),this.forceUpdate()):p&&this.forceUpdate();var S=!1;null!=f.start&&null!=f.end&&(S=!e||e.start!==f.start||e.end!==f.end),(S||y)&&this.setSelection(f.start,f.end)}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&D(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),a=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],0<=t.indexOf(n)||(r[n]=e[n]);return r}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){O(n)||u(!1);var o=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],s=l({},a);o.forEach(function(e){return delete s[e]}),e=n(s),o.filter(function(t){return null!=e.props[t]&&e.props[t]!==a[t]}).length&&u(!1)}else e=r.createElement("input",l({ref:this.handleRef},a));var i={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(i.onChange=this.onChange,i.onPaste=this.onPaste,i.onMouseDown=this.onMouseDown),null!=a.value&&(i.value=this.value)),e=r.cloneElement(e,i)},t}(r.Component);e.exports=x}}]);
//# sourceMappingURL=80.dccdcec1.chunk.js.map