1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[33],{1061:function(e,t,r){"use strict";var n=r(1),a=r(461),o=r(8),i=r.n(o),s=r(106),u=r.n(s),l=r(1260),c=r(140),m=r(92),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var d=function(e,t,r,n,a,o){var i=e.getIn,s=o.arrayInsert,u=o.arrayMove,l=o.arrayPop,c=o.arrayPush,m=o.arrayRemove,d=o.arrayRemoveAll,f=o.arrayShift,y=o.arraySplice,b=o.arraySwap,h=o.arrayUnshift,v=o.asyncError,g=o.dirty,E=o.length,w=o.pristine,x=o.submitError,k=(o.state,o.submitFailed),O=o.submitting,S=o.syncError,C=o.syncWarning,F=o.value,T=o.props,_=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(o,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","length","pristine","submitError","state","submitFailed","submitting","syncError","syncWarning","value","props"]),j=S||v||x,A=C,R=n?t.replace(n+".",""):t,I=p({fields:{_isFieldArray:!0,forEach:function(e){return(F||[]).forEach((function(t,r){return e(R+"["+r+"]",r,I.fields)}))},get:a,getAll:function(){return F},insert:s,length:E,map:function(e){return(F||[]).map((function(t,r){return e(R+"["+r+"]",r,I.fields)}))},move:u,name:t,pop:function(){return l(),i(F,String(E-1))},push:c,reduce:function(e,t){return(F||[]).reduce((function(t,r,n){return e(t,R+"["+n+"]",n,I.fields)}),t)},remove:m,removeAll:d,shift:function(){return f(),i(F,"0")},splice:y,swap:b,unshift:h},meta:{dirty:g,error:j,form:r,warning:A,invalid:!!j,pristine:w,submitting:O,submitFailed:k,valid:!j}},T,_);return I},f=r(84),y=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var v=["_reduxForm","value"],g=function(e){var t=e.deepEqual,r=e.getIn,a=e.size,o=function(a){function o(){var e,t,n;b(this,o);for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];return t=n=h(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(i))),n.saveRef=function(e){n.ref=e},n.getValue=function(e){return n.props.value&&r(n.props.value,String(e))},h(n,t)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),y(o,[{key:"shouldComponentUpdate",value:function(e){var r=this,n=this.props.value,a=e.value;if(n&&a){var o=a.every((function(e){return~n.indexOf(e)})),i=a.some((function(e,t){return e!==n[t]}));if(n.length!==a.length||o&&i||e.rerenderOnEveryChange&&n.some((function(e,r){return!t(e,a[r])})))return!0}var s=Object.keys(e),u=Object.keys(this.props);return!!(this.props.children||e.children||s.length!==u.length||s.some((function(n){return!~v.indexOf(n)&&!t(r.props[n],e[n])})))}},{key:"getRenderedComponent",value:function(){return this.ref}},{key:"render",value:function(){var t=this.props,r=t.component,a=t.withRef,o=t.name,i=t._reduxForm,s=(t.validate,t.warn,t.rerenderOnEveryChange,function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(t,["component","withRef","name","_reduxForm","validate","warn","rerenderOnEveryChange"])),u=d(e,o,i.form,i.sectionPrefix,this.getValue,s);return a&&(u.ref=this.saveRef),n.createElement(r,u)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),o}(n.Component);return o.propTypes={component:i.a.oneOfType([i.a.func,i.a.string,i.a.node]).isRequired,props:i.a.object,rerenderOnEveryChange:i.a.bool},o.defaultProps={rerenderOnEveryChange:!1},o.contextTypes={_reduxForm:i.a.object},Object(c.connect)((function(e,n){var o=n.name,i=n._reduxForm,s=i.initialValues,u=(0,i.getFormState)(e),l=r(u,"initial."+o)||s&&r(s,o),c=r(u,"values."+o),m=r(u,"submitting"),p=function(e,t){return f.a.getIn(e,t+"._error")}(r(u,"syncErrors"),o),d=function(e,t){return r(e,t+"._warning")}(r(u,"syncWarnings"),o),y=t(c,l);return{asyncError:r(u,"asyncErrors."+o+"._error"),dirty:!y,pristine:y,state:r(u,"fields."+o),submitError:r(u,"submitErrors."+o+"._error"),submitFailed:r(u,"submitFailed"),submitting:m,syncError:p,syncWarning:d,value:c,length:a(c)}}),(function(e,t){var r=t.name,n=t._reduxForm,a=n.arrayInsert,o=n.arrayMove,i=n.arrayPop,s=n.arrayPush,u=n.arrayRemove,c=n.arrayRemoveAll,p=n.arrayShift,d=n.arraySplice,f=n.arraySwap,y=n.arrayUnshift;return Object(l.a)({arrayInsert:a,arrayMove:o,arrayPop:i,arrayPush:s,arrayRemove:u,arrayRemoveAll:c,arrayShift:p,arraySplice:d,arraySwap:f,arrayUnshift:y},(function(t){return Object(m.bindActionCreators)(t.bind(null,r),e)}))}),void 0,{withRef:!0})(o)},E=r(297),w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function k(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=function(e){return Array.isArray(e)?e:[e]},S=function(e,t){return e&&function(){for(var r=O(e),n=0;n<r.length;n++){var a=r[n].apply(r,arguments);if(a)return k({},t,a)}}},C=function(e){var t=g(e),r=function(e){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.saveRef=function(e){n.ref=e},!t._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),x(r,[{key:"componentDidMount",value:function(){var e=this;this.context._reduxForm.register(this.name,"FieldArray",(function(){return S(e.props.validate,"_error")}),(function(){return S(e.props.warn,"_warning")}))}},{key:"componentWillReceiveProps",value:function(e,t){var r=Object(E.a)(this.context,this.props.name),n=Object(E.a)(t,e.name);r!==n&&(this.context._reduxForm.unregister(r),this.context._reduxForm.register(n,"FieldArray"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return u()(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.ref&&this.ref.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return Object(n.createElement)(t,w({},this.props,{name:this.name,_reduxForm:this.context._reduxForm,ref:this.saveRef}))}},{key:"name",get:function(){return Object(E.a)(this.context,this.props.name)}},{key:"dirty",get:function(){return!this.ref||this.ref.getWrappedInstance().dirty}},{key:"pristine",get:function(){return!(!this.ref||!this.ref.getWrappedInstance().pristine)}},{key:"value",get:function(){return this.ref?this.ref.getWrappedInstance().value:void 0}}]),r}(n.Component);return r.propTypes={name:i.a.string.isRequired,component:i.a.oneOfType([i.a.func,i.a.string,i.a.node]).isRequired,props:i.a.object,validate:i.a.oneOfType([i.a.func,i.a.arrayOf(i.a.func)]),warn:i.a.oneOfType([i.a.func,i.a.arrayOf(i.a.func)]),withRef:i.a.bool},r.contextTypes={_reduxForm:i.a.object},Object(a.polyfill)(r),r};t.a=C(f.a)},1062:function(e,t,r){"use strict";var n=r(1),a=r.n(n),o=r(461),i=r(8),s=r.n(i),u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var l=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));if(!r._reduxForm)throw new Error("Form must be inside a component decorated with reduxForm()");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
1(t,e),u(t,[{key:"componentWillMount",value:function(){this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit)}},{key:"render",value:function(){return a.a.createElement("form",this.props)}}]),t}(n.Component);l.propTypes={onSubmit:s.a.func.isRequired},l.contextTypes={_reduxForm:s.a.object},Object(o.polyfill)(l),t.a=l},1370:function(e,t,r){"use strict";var n=r(1),a=r.n(n),o=r(177),i=r(1062),s=r(1061),u=r(1088),l=r(47),c=r(1021),m=r(132),p=r(163),d=r(14),f=r(2289),y=r(2249);const b=e=>{let{entityToAdd:t,allowAddMultiple:r,fields:n,numberDisabled:i,saveUserInfoType:s}=e;return a.a.createElement("div",null,a.a.createElement(l.k,{style:{maxHeight:"50vh",overflow:"auto"}},n.map((e,r)=>a.a.createElement(a.a.Fragment,null,a.a.createElement(l.k.Row,{style:{paddingTop:"0em"},key:r},a.a.createElement(l.k.Column,{computer:n.length>1?"7":"8"},a.a.createElement(o.a,{component:p.a,fluid:!0,name:e+".name",type:"text",size:"mini"})),a.a.createElement(l.k.Column,{computer:"7",style:{paddingRight:"0"}},a.a.createElement(o.a,{component:p.a,fluid:!0,disabled:i,name:e+".mobile",type:"text",size:"mini"})),n.length>1&&a.a.createElement(l.k.Column,{computer:"1"},a.a.createElement(l.n,{color:"grey",link:!0,name:"close",onClick:()=>n.remove(r)}))),a.a.createElement(l.k.Row,{columns:2,style:{margin:"0",padding:"0"}},a.a.createElement(l.k.Column,null,a.a.createElement("div",{style:{fontSize:"0.9em",opacity:"0.6",display:"block",marginBottom:"8px"}},t," ",d.a.t("components.custom.nameNumberForm.email","Email"),1===s||2===s?" *":""),a.a.createElement(o.a,{component:p.a,fluid:!0,name:e+".email",type:"text",size:"mini"})))))),r&&a.a.createElement(l.k,{onClick:()=>n.push(),style:{cursor:"pointer"}},a.a.createElement(l.k.Row,{centered:!0,verticalAlign:"middle"},a.a.createElement(l.k.Column,{width:"1"},a.a.createElement(l.n,{link:!0,name:"plus circle",size:"large"})),a.a.createElement(l.k.Column,{width:"5"},a.a.createElement(m.a,{fontSize:".9em"}," ",d.a.t("components.custom.nameNumberForm.another","Add Another")," ",t," ")))))};t.a=Object(u.a)({validate:(e,t)=>{const r=new RegExp(/^[a-zA-Z 0-9]+$/),{defaultLanguage:n}=t,a={};if(e.members&&e.members.length){const o=[];if(isNaN(t.saveUserInfoType)&&!t.addEmail)e.members.forEach((e,i)=>{const s={};e&&e.name&&!r.test(e.name)&&"en"==(null===n||void 0===n?void 0:n.toLowerCase())&&(s.name=d.a.t("components.custom.nameNumberForm.validation.text2",'Special characters are not allowed eg. "*,&,-^"'),o[i]=s),e&&e.name||(s.name=d.a.t("components.custom.nameNumberForm.validation.text3","Name is required"),o[i]=s),e&&/^[6789]\d{9}$/.test(e.mobile)||(s.mobile=d.a.t("components.custom.nameNumberForm.validation.text4","Must be a 10 digit mobile number"),o[i]=s),e&&(0===t.saveUserInfoType||e.email)||(s.email=d.a.t("components.custom.nameNumberForm.validation.text5","Email is required"),o[i]=s),o.length&&(a.members=o)});else{const i=new RegExp(t.mobileRegex);switch(t.saveUserInfoType){case 0:e.members.forEach((e,t)=>{const s={};e&&e.name&&!r.test(e.name)&&"en"==(null===n||void 0===n?void 0:n.toLowerCase())&&(s.name=d.a.t("components.custom.nameNumberForm.validation.text6",'Special characters are not allowed eg. "*,&,-^"'),o[t]=s),e&&e.name||(s.name=d.a.t("components.custom.nameNumberForm.validation.text7","Name is required"),o[t]=s),e&&i.test(e.mobile)||(s.mobile=d.a.t("components.custom.nameNumberForm.validation.text8","Invalid Mobile Number"),o[t]=s),o.length&&(a.members=o)});break;case 1:e.members.forEach((e,i)=>{const s={};e&&e.name&&!r.test(e.name)&&"en"==(null===n||void 0===n?void 0:n.toLowerCase())&&(s.name=d.a.t("components.custom.nameNumberForm.validation.text9",'Special characters are not allowed eg. "*,&,-^"'),o[i]=s),e&&e.name||(s.name=d.a.t("components.custom.nameNumberForm.validation.text10","Name is required"),o[i]=s),e&&(0===t.saveUserInfoType||e.email)||(s.email=d.a.t("components.custom.nameNumberForm.validation.text11","Email is required"),o[i]=s),o.length&&(a.members=o)});break;case 2:e.members.forEach((e,s)=>{const u={};e&&e.name&&!r.test(e.name)&&"en"==(null===n||void 0===n?void 0:n.toLowerCase())&&(u.n
1ame=d.a.t("components.custom.nameNumberForm.validation.text12",'Special characters are not allowed eg. "*,&,-^"'),o[s]=u),e&&e.name||(u.name=d.a.t("components.custom.nameNumberForm.validation.text13","Name is required"),o[s]=u),e&&i.test(e.mobile)||(u.mobile=d.a.t("components.custom.nameNumberForm.validation.text14","Invalid Mobile Number"),o[s]=u),e&&(0===t.saveUserInfoType||e.email)||(u.email=d.a.t("components.custom.nameNumberForm.validation.text15","Email is required"),o[s]=u),o.length&&(a.members=o)})}}}else a.members={_error:d.a.t("components.custom.nameNumberForm.validation.text1","At least one student must be entered")};return a},initialValues:{members:[{name:"",mobile:""}]},enableReinitialize:!0})(Object(f.a)((function(e){const{open:t,onClose:r,handleSubmit:n,invalid:o,submitting:u,modalHeader:p,allowAddMultiple:f,entityToAdd:h,buttonText:v,numberDisabled:g,addEmail:E,saveUserInfoType:w,canAddInternationalStudent:x,form:k,history:O}=e,{t:S}=Object(y.a)();return a.a.createElement(c.a,{size:"tiny",open:t,onClose:r},a.a.createElement(l.u.Header,{style:{borderRadius:"4px 4px 0px 0px"}},p),a.a.createElement(l.u.Content,{style:{marginBottom:"0",padding:"21px",height:"250px"}},"addCareTaker"===k?a.a.createElement("div",{style:{padding:"16px",backgroundColor:"rgba(0, 154, 224, 0.12)",borderRadius:"4px",marginBottom:"10px",textAlign:"center",fontSize:"12px"}},a.a.createElement("div",{style:{color:"black"}},S("Caretaker.incase1","In case you want to assign multiple roles to the same care taker you can do it from the settings section")),a.a.createElement("div",{style:{color:"#009AE0",cursor:"pointer",margin:"5px 0",textDecoration:"underline"},onClick:()=>O.push("/settings")},S("Caretaker.goToSettings","Go to Settings")," \u2192")):null,a.a.createElement(l.k,null,a.a.createElement(l.k.Row,null,a.a.createElement(l.k.Column,{computer:"8"},a.a.createElement(m.a,{fontSize:".9em",style:{color:"rgba(0, 0, 0, 0.87);"}},h," ",d.a.t("components.custom.nameNumberForm.name","Name *"))),a.a.createElement(l.k.Column,{computer:"8"},a.a.createElement(m.a,{fontSize:".9em",style:{color:"rgba(0, 0, 0, 0.87);"}},d.a.t("components.custom.nameNumberForm.mobile","Mobile Number")," ",0===w||2===w?" *":"")))),a.a.createElement(i.a,{onSubmit:n},a.a.createElement(s.a,{name:"members",component:b,numberDisabled:g,allowAddMultiple:f,entityToAdd:h,addEmail:E,saveUserInfoType:w,canAddInternationalStudent:x}))),a.a.createElement(l.u.Actions,{style:{height:"70px"}},a.a.createElement(l.k.Row,null,a.a.createElement(l.b,{disabled:u||o,loading:u,primary:!0,floated:"right",style:{marginLeft:"auto"},onClick:n},v||d.a.t("components.custom.nameNumberForm.add","Add")))))})))},2702:function(e,t,r){"use strict";var n=r(1),a=r.n(n),o=r(140),i=r(5),s=r(368),u=r(1370),l=r(151),c=r(2780);class m extends a.a.Component{constructor(e){super(e),this.onSubmit=this.onSubmit.bind(this),this.handleSuccess=this.handleSuccess.bind(this),this.onClose=this.onClose.bind(this)}onSubmit(e){const{url:t,countryISO:r}=this.props,n=t||"/v2/fees/caretakers",a=e.members.map(e=>({name:e.name,contact:{mobile:e.mobile,countryCode:r||"91",...e.email?{email:e.email}:{}}}));return new Promise((e,t)=>{this.props.makeApiCall(n,"POST",a[0],this.handleSuccess(e,a),()=>t())})}onClose(){this.props.reset("addCareTaker"),this.props.onClose()}handleSuccess(e){const{t:t}=this.props;return()=>{this.props.reset("addCareTaker"),i.toastr.success(t("containers.payments.careTaker.addCareTakerModal.toastr.success","Success"),t("containers.payments.careTaker.addCareTakerModal.toastr.careTakerAddedSuccessfully","Care Taker added successfully.")),e(),this.props.onClose(),this.props.fetchData()}}render(){const{t:e}=this.props;return a.a.createElement(u.a,{entityToAdd:e("NameNumberForm.careTaker","Care Taker"),open:this.props.open,modalHeader:e("NameNumberForm.addCareTaker","Add CareTaker"),form:"addCareTaker",onClose:this.onClose,onSubmit:this.onSubmit,addEmail:this.props.isInternational,saveUserInfoType:this.props.saveUserInfoType,canAddInternationalStudent:this.props.canAddInternationalStudent,defaultLanguage:this.props.defaultLanguage})}}t.a=Object(o.connect)(e=>{var t,r,n,a,o,i,s,u,l,c;return{countryISO:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(r=t.organization)||void 0===r?void 0:r.countryISO,isInternational:null===e||void 0===e||null===(n=e.persistedData)||void 0===n||null===(a=n.organization)||void 0===a?void 0:a.isInternational,saveUserInfoType:null===e||void 0===e||null===(o=e.persistedData)||void 0===o||null===(i=o.organization)||void 0===i?void 0:i.saveUserInfoType,canAddInternationalStudent:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(u=s.organization)||void 0===u?void 0:u.canAddInternationalStudent,defaultLanguage:null===e||void 0===e||null===(l=e.persistedData)||void 0===l||null===(c=l.organization)||void 0===c?void 0:c.defaultLanguage}},{makeApiCall:l.b,reset:s.g})(Object(c.a)()(m))},368:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}
1)),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return c}));var n=r(1215),a=(r(50),n.a.arrayInsert),o=(n.a.arrayMove,n.a.arrayPop,n.a.arrayPush),i=n.a.arrayRemove,s=(n.a.arrayRemoveAll,n.a.arrayShift,n.a.arraySplice,n.a.arraySwap,n.a.arrayUnshift,n.a.autofill,n.a.blur,n.a.change),u=(n.a.clearAsyncError,n.a.clearFields,n.a.clearSubmitErrors,n.a.destroy),l=(n.a.focus,n.a.initialize),c=(n.a.registerField,n.a.reset);n.a.resetSection,n.a.setSubmitFailed,n.a.setSubmitSucceeded,n.a.startAsyncValidation,n.a.startSubmit,n.a.stopAsyncValidation,n.a.stopSubmit,n.a.submit,n.a.touch,n.a.unregisterField,n.a.untouch,n.a.updateSyncWarnings}}]);
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.