varDTA=(()=>{varN=Object.defineProperty;varJ=Object.getOwnPropertyDescriptor;varY=Object.getOwnPropertyNames;varq=Object.prototype.hasOwnProperty;varz=r=>N(r,"__esModule",{value:!0});varH=(r,t)=>{for(vareint)N(r,e,{get:t[e],enumerable:!0})},Q=(r,t,e,s)=>{if(t&&typeoft=="object"||typeoft=="function")for(letaofY(t))!q.call(r,a)&&(e||a!=="default")&&N(r,a,{get:()=>t[a],enumerable:!(s=J(t,a))||s.enumerable});returnr};varX=(r=>(t,e)=>r&&r.get(t)||(e=Q(z({}),t,1),r&&r.set(t,e),e))(typeofWeakMap!="undefined"?newWeakMap:0);varne={};H(ne,{parse:()=>se,set_utils:()=>ee,version:()=>Z});varZ="0.0.2",$;functionee(r){$=r}functionU(r){returnnewTextDecoder().decode(r)}functionP(r){returnnewTextDecoder("latin1").decode(r)}functionL(r,t,e){if(r<0){leth=L(-r,t,e);returnh.w="-"+h.w,h}lets={t:"n",v:r};switch(e){case251:case98:case65530:t="%8.0g";break;case252:case105:case65529:t="%8.0g";break;case253:case108:case65528:t="%12.0g";break;case254:case102:case65527:t="%9.0g";break;case255:case100:case65526:t="%10.0g";break;default:throwe}try{leth=+(t.match(/%(\d+)/)||[])[1]||8,v=0;r<1&&++v,r<.1&&++v,r<.01&&++v,r<.001&&++v;letD=r.toExponential(),T=D.indexOf("e")==-1?0:+D.slice(D.indexOf("e")+1),y=h-2-T;y<0&&(y=0);vara=t.match(/%\d+\.(\d+)/);a&&+a[1]&&(y=+a[1]),s.w=(Math.round(r*10**y)/10**y).toFixed(y).replace(/^([-]?)0\./,"$1."),s.w=s.w.slice(0,h+v),s.w.indexOf(".")>-1&&(s.w=s.w.replace(/0+$/,"")),s.w=s.w.replace(/\.$/,""),s.w==""&&(s.w="0")}catch{}returns}functionB(r){returnnewDataView(r.buffer,r.byteOffset,r.byteLength)}functionn(r,t){returnU(r.raw.slice(r.ptr,r.ptr+t.length))!=t?!1:(r.ptr+=t.length,!0)}functionV(r,t){r.ptr+=8;lete=r.dv.getFloat64(r.ptr-8,t);returne>8988e304?null:e}functionG(r,t){r.ptr+=4;lete=r.dv.getFloat32(r.ptr-4,t);returne>1701e35?null:e}functionb(r,t){returnr.ptr+=4,r.dv.getUint32(r.ptr-4,t)}functionI(r,t){r.ptr+=4;lete=r.dv.getInt32(r.ptr-4,t);returne>2147483620?null:e}functionF(r,t){returnr.ptr+=2,r.dv.getUint16(r.ptr-2,t)}functionj(r,t){r.ptr+=2;lete=r.dv.getInt16(r.ptr-2,t);returne>32740?null:e}functionW(r){returnr.raw[r.ptr++]}functionK(r){lett=r.raw[r.ptr++];returnt=t<128?t:t-256,t>100?null:t}varte=["117","118","119","120","121"],re=[102,103,104,105,108,110,111,112,113,114,115];functionae(r){lett="Not a DTA file",e={ptr:0,raw:r,dv:B(r)},s=118,a=!0,h=0,v=0,D=0,T=0,y="",C="",M=[],O=[],E=[];if(!n(e,"<stata_dta>"))throwt;{if(!n(e,"<header>"))throwt;{if(!n(e,"<release>"))throwt;leto=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,"</release>"))throwt;if(te.indexOf(o)==-1)throw`Unsupported DTA ${o} file`;s=+o}{if(!n(e,"<byteorder>"))throwt;leto=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,"</byteorder>"))throwt;switch(o){case"MSF":a=!1;break;case"LSF":a=!0;break;default:throw`Unsupported byteorder ${o}`}}if(!n(e,"<K>")||(h=s===119||s>=121?b(e,a):F(e,a),!n(e,"</K>")))throwt;{if(!n(e,"<N>"))throwt;if(s==117)v=D=b(e,a);else{leto=b(e,a),l=b(e,a);v=a?(D=o)+(T=l)*Math.pow(2,32):(D=l)+(T=o)*Math.pow(2,32)}if(v>1e6&&console.error("More than 1 million observations -- extra rows will be dropped"),!n(e,"</N>"))throwt}{if(!n(e,"<label>"))throwt;leto=s>=118?2:1,l=o==1?W(e):F(e,a);if(l>0&&(y=U(e.raw.slice(e.ptr,e.ptr+o))),e.ptr+=l,!n(e,"</label>"))throwt}{if(!n(e,"<timestamp>"))throwt;leto=W(e);if(C=P(e.raw.slice(e.ptr,e.ptr+o)),e.ptr+=o,!n(e,"</timestamp>"))throwt}if(!n(e,"</header>"))throwt}if(!n(e,"<map>")||(e.ptr+=8*14,!n(e,"</map>")))throwt;letf=0;{if(!n(e,"<variable_types>"))throwt;for(varw=0;w<h;++w){leto=F(e,a);if(M.push(o),o>=1&&o<=2045)f+=o;elseswitch(o){case32768:f+=8;break;case65525:f+=0;break;case65526:f+=8;break;case65527:f+=4;break;case65528:f+=4;break;case65529:f+=2;break;case65530:f+=1;break;default:throw`Unsupported field type ${o}`}}if(!n(e,"</variable_types>"))throwt}{if(!n(e,"<varnames>"))throwt;leto=s>=118?129:33;for(letl=0;l<h;++l){leti=U(e.raw.slice(e.ptr,e.ptr+o));e.ptr+=o,O.push(i.replace(/\x00[\s\S]*/,""))}if(!n(e,"</varnames>"))throwt}if(!n(e,"<sortlist>")||(e.ptr+=(2*h+2)*(s==119||s==121?