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(letoofY(t))!q.call(r,o)&&(e||o!=="default")&&N(r,o,{get:()=>t[o],enumerable:!(s=J(t,o))||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);varse={};H(se,{parse:()=>ae,set_utils:()=>Z});var$;functionZ(r){$=r}functionU(r){returnnewTextDecoder().decode(r)}functionP(r){returnnewTextDecoder("latin1").decode(r)}functionL(r,t,e){if(r<0){letb=L(-r,t,e);returnb.w="-"+b.w,b}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{letb=+(t.match(/%(\d+)/)||[])[1]||8,v=0;r<1&&++v,r<.1&&++v,r<.01&&++v,r<.001&&++v;letD=r.toExponential(),E=D.indexOf("e")==-1?0:+D.slice(D.indexOf("e")+1),g=b-2-E;g<0&&(g=0);varo=t.match(/%\d+\.(\d+)/);o&&+o[1]&&(g=+o[1]),s.w=(Math.round(r*10**g)/10**g).toFixed(g).replace(/^([-]?)0\./,"$1."),s.w=s.w.slice(0,b+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}functionh(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}functionT(r){returnr.raw[r.ptr++]}functionK(r){lett=r.raw[r.ptr++];returnt=t<128?t:t-256,t>100?null:t}varee=["117","118","119","120","121"],te=[102,103,104,105,108,110,111,112,113,114,115];functionre(r){lett="Not a DTA file",e={ptr:0,raw:r,dv:B(r)},s=118,o=!0,b=0,v=0,D=0,E=0,g="",C="",M=[],O=[],W=[];if(!n(e,"<stata_dta>"))throwt;{if(!n(e,"<header>"))throwt;{if(!n(e,"<release>"))throwt;leta=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,"</release>"))throwt;if(ee.indexOf(a)==-1)throw`Unsupported DTA ${a} file`;s=+a}{if(!n(e,"<byteorder>"))throwt;leta=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,"</byteorder>"))throwt;switch(a){case"MSF":o=!1;break;case"LSF":o=!0;break;default:throw`Unsupported byteorder ${a}`}}if(!n(e,"<K>")||(b=s===119||s>=121?h(e,o):F(e,o),!n(e,"</K>")))throwt;{if(!n(e,"<N>"))throwt;if(s==117)v=D=h(e,o);else{leta=h(e,o),l=h(e,o);v=o?(D=a)+(E=l)*Math.pow(2,32):(D=l)+(E=a)*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;leta=s>=118?2:1,l=a==1?T(e):F(e,o);if(l>0&&(g=U(e.raw.slice(e.ptr,e.ptr+a))),e.ptr+=l,!n(e,"</label>"))throwt}{if(!n(e,"<timestamp>"))throwt;leta=T(e);if(C=P(e.raw.slice(e.ptr,e.ptr+a)),e.ptr+=a,!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<b;++w){leta=F(e,o);if(M.push(a),a>=1&&a<=2045)f+=a;elseswitch(a){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 ${a}`}}if(!n(e,"</variable_types>"))throwt}{if(!n(e,"<varnames>"))throwt;leta=s>=118?129:33;for(letl=0;l<b;++l){leti=U(e.raw.slice(e.ptr,e.ptr+a));e.ptr+=a,O.push(i.replace(/\x00[\s\S]*/,""))}if(!n(e,"</varnames>"))throwt}if(!n(e,"<sortlist>")||(e.ptr+=(2*b+2)*(s==119||s==121?2:1),!n(e,"</sortlist>")))