<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(self.webpackChunkplatform=self.webpackChunkplatform||[]).push([[19712],{19712:function(e){!function(t){function r(e){this.code=e,this.getControlNumber=function(){for(var e,t=[1,2,3,4,5,6,7,8,9,1],r=[3,4,5,6,7,8,9,1,2,3],a=0,n=0;n&lt;10;n++)a+=this.code.charAt(n)*t[n];if(e=a%11,a=0,10===e){for(n=0;n&lt;10;n++)a+=this.code.charAt(n)*r[n];10==(e=a%11)&amp;&amp;(e=0)}return e},this.validate=function(){if(11!==this.code.length)return!1;if(this.getControlNumber(e)!==parseInt(this.code.charAt(10)))return!1;var t=Number(this.code.substr(1,2)),r=Number(this.code.substr(3,2)),a=Number(this.code.substr(5,2)),n=this.getBirthday();return t===n.getFullYear()%100&amp;&amp;n.getMonth()+1===r&amp;&amp;a===n.getDate()},this.getGender=function(){var e="";switch(this.code.charAt(0)){case"1":case"3":case"5":e="male";break;case"2":case"4":case"6":e="female";break;default:e="unknown"}return e},this.getAge=function(){return Math.floor(((new Date).getTime()-this.getBirthday().getTime())/864e5/365.25)},this.getBirthday=function(){var e=parseInt(this.code.substring(1,3)),t=parseInt(this.code.substring(3,5).replace(/^0/,""))-1,r=this.code.substring(5,7).replace(/^0/,""),a=this.code.charAt(0);return new Date(e+="1"===a||"2"===a?1800:"3"===a||"4"===a?1900:"5"===a||"6"===a?2e3:2100,t,r)}}function a(e){throw new Error(e)}r.generate=function(e){var t,n,o,h=(e=e||{}).gender||(0===Math.round(Math.random())?"male":"female"),i="",s=["00","01","02","22","27","37","42","47","49","52","57","60","65","70","95"];if("female"!==h&amp;&amp;"male"!==h)throw new a('gender param accepts only "male" or "female" values.');if(t=e.birthYear?e.birthYear:Math.round(100*Math.random()+1900+((new Date).getFullYear()-2e3)),n=e.birthMonth?e.birthMonth:Math.floor(12*Math.random())+1,e.birthDay)o=e.birthDay;else{var u=new Date(t,n,0).getDate();o=Math.floor(Math.random()*u)+1}return"male"===h&amp;&amp;t&gt;=1800&amp;&amp;t&lt;=1899?i+="1":"female"===h&amp;&amp;t&gt;=1800&amp;&amp;t&lt;=1899?i+="2":"male"===h&amp;&amp;t&gt;=1900&amp;&amp;t&lt;=1999?i+="3":"female"===h&amp;&amp;t&gt;=1900&amp;&amp;t&lt;=1999?i+="4":"male"===h&amp;&amp;t&gt;=2e3?i+="5":"female"===h&amp;&amp;t&gt;=2e3&amp;&amp;(i+="6"),i+=parseInt(t,0).toString().substring(2,4),i+=1===n.toString().length?"0"+n:n,i+=1===o.toString().length?"0"+o:o,i+=s[Math.floor(Math.random()*s.length)],(i+=Math.floor(10*Math.random()))+new r(i).getControlNumber()},e.exports?e.exports=r:t.Isikukood=r}(this)}}]);</pre></body></html>