varDTA=(()=>{varO=Object.defineProperty;varI=Object.getOwnPropertyDescriptor;varK=Object.getOwnPropertyNames;varJ=Object.prototype.hasOwnProperty;varj=r=>O(r,"__esModule",{value:!0});varq=(r,t)=>{for(varsint)O(r,s,{get:t[s],enumerable:!0})},z=(r,t,s,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letcofK(t))!J.call(r,c)&&(s||c!=="default")&&O(r,c,{get:()=>t[c],enumerable:!(e=I(t,c))||e.enumerable});returnr};varH=(r=>(t,s)=>r&&r.get(t)||(s=z(j({}),t,1),r&&r.set(t,s),s))(typeofWeakMap!="undefined"?newWeakMap:0);varre={};q(re,{parse:()=>te,set_utils:()=>Q});varx;functionQ(r){x=r}functionW(r){returnnewDataView(r.buffer,r.byteOffset,r.byteLength)}functioni(r,t){returnr.str.slice(r.ptr,r.ptr+t.length)!=t?!1:(r.ptr+=t.length,!0)}functionX(r,t){lets=r.str.indexOf(t,r.ptr);if(s==-1)thrownewError(`Expected ${t} after offset ${r.ptr}`);r.ptr=s+t.length}functionu(r,t){lets=r.str.indexOf(t,r.ptr);if(s==-1)thrownewError(`Expected ${t} after offset ${r.ptr}`);lete=r.raw.slice(r.ptr,s),c={ptr:0,raw:e,str:r.str.slice(r.ptr,s),dv:W(e)};returnr.ptr=s+t.length,c}functionL(r,t){r.ptr+=8;lets=r.dv.getFloat64(r.ptr-8,t);returns>8988e304?null:s}functionR(r,t){r.ptr+=4;lets=r.dv.getFloat32(r.ptr-4,t);returns>1701e35?null:s}function_(r,t){returnr.ptr+=4,r.dv.getUint32(r.ptr-4,t)}functionV(r,t){r.ptr+=4;lets=r.dv.getInt32(r.ptr-4,t);returns>2147483620?null:s}functionP(r,t){returnr.ptr+=2,r.dv.getUint16(r.ptr-2,t)}functionC(r,t){r.ptr+=2;lets=r.dv.getInt16(r.ptr-2,t);returns>32740?null:s}function$(r){returnr.raw[r.ptr++]}functionG(r){lett=r.raw[r.ptr++];returnt=t<128?t:t-256,t>100?null:t}varY=["117","118","119","120","121"];functionZ(r){lett="Not a DTA file",s=newTextDecoder("latin1").decode(r),e={ptr:0,raw:r,str:s,dv:W(r)},c=118,n=!0,g=0,U=0,D=0,S=0,M="",A="",T=[],f=[],w=[];if(!i(e,"<stata_dta>"))throwt;{if(!i(e,"<header>"))throwt;{if(!i(e,"<release>"))throwt;leto=u(e,"</release>");if(Y.indexOf(o.str)==-1)throw`Unsupported DTA ${o.str} file`;c=+o.str}{if(!i(e,"<byteorder>"))throwt;leto=u(e,"</byteorder>");switch(o.str){case"MSF":n=!1;break;case"LSF":n=!0;break;default:throw`Unsupported byteorder ${o.str}`}}{if(!i(e,"<K>"))throwt;leto=u(e,"</K>");g=P(o,n)}{if(!i(e,"<N>"))throwt;leto=u(e,"</N>");if(c==117)U=D=_(o,n);else{leta=_(o,n),l=_(o,n);U=n?(D=a)+(S=l)*Math.pow(2,32):(D=l)+(S=a)*Math.pow(2,32)}U>1e6&&console.error("More than 1 million observations -- extra rows will be dropped")}{if(!i(e,"<label>"))throwt;leto=u(e,"</label>"),a=c>=118?2:1,l=a==1?$(o):P(o,n);if(l+a!=o.str.length)throw`Expected string length ${l} but actual length was ${o.str.length-a}`;l>0&&(M=newTextDecoder().decode(o.raw.slice(a)))}{if(!i(e,"<timestamp>"))throwt;leto=u(e,"</timestamp>"),a=$(o);if(a+1!=o.str.length)throw`Expected string length ${a} but actual length was ${o.str.length-1}`;a>0&&(A=o.str.slice(1))}if(!i(e,"</header>"))throwt}{if(!i(e,"<map>"))throwt;X(e,"</map>")}letd=0;{if(!i(e,"<variable_types>"))throwt;leto=u(e,"</variable_types>");if(o.raw.length!=2*g)throw`Expected variable_types length ${g*2}, found ${o.raw.length}`;for(;o.ptr<o.raw.length;){leta=P(o,n);if(T.push(a),a>=1&&a<=2045)d+=a;elseswitch(a){case32768:d+=8;break;case65525:d+=0;break;case65526:d+=8;break;case65527:d+=4;break;case65528:d+=4;break;case65529:d+=2;break;case65530:d+=1;break;default:throw`Unsupported field type ${a}`}}}{if(!i(e,"<varnames>"))throwt;leto=u(e,"</varnames>"),a=c>=118?129:33;if(o.raw.length!=a*g)throw`Expected variable_types length ${g*a}, found ${o.raw.length}`;for(;o.ptr<o.raw.length;){letl=newTextDecoder().decode(o.raw.slice(o.ptr,o.ptr+a));o.ptr+=a,f.push(l.replace(/\x00[\s\S]*/,""))}}{if(!i(e,"<sortlist>"))throwt;leto=u(e,"</sortlist>");if(o.raw.length!=(2*g+2)*(c==119||c==121?2:1))throw`Expected sortlist length ${g*2+2}, found ${o.raw.length}`}{if(!i(e,"<formats>"))throwt;leto=u(e,"</formats>"),a=c>=118?57:49;if(o.raw.length!=a*g)throw`Expected formats length ${g*a}, found ${o.raw.length}`;for(;o.ptr<o.raw.length;){letl=newTextDecoder().decode(o.raw.slice(o.ptr,o.