{"version":3,"sources":["../../src/lib/worker.ts"],"names":["Worker","JestWorker","getNodeOptionsWithoutInspect","RESTARTED","Symbol","cleanupWorkers","worker","curWorker","_workerPool","_workers","_child","kill","constructor","workerPath","options","timeout","onRestart","farmOptions","restartPromise","resolveRestartPromise","activeTasks","_worker","undefined","createWorker","forkOptions","env","process","NODE_OPTIONS","replace","trim","Promise","resolve","enableWorkerThreads","on","code","signal","console","error","getStdout","pipe","stdout","getStderr","stderr","onHanging","end","then","hangingTimer","onActivity","clearTimeout","setTimeout","method","exposedMethods","startsWith","args","attempts","result","race","bind","Error","close"],"mappings":"AACA,SAASA,UAAUC,UAAU,QAAQ,iCAAgC;AACrE,SAASC,4BAA4B,QAAQ,sBAAqB;AAGlE,MAAMC,YAAYC,OAAO;AAEzB,MAAMC,iBAAiB,CAACC;QACG;IAAzB,KAAK,MAAMC,aAAc,EAAA,sBAAA,AAACD,OAAeE,WAAW,qBAA3B,oBAA6BC,QAAQ,KAAI,EAAE,CAE/D;YACHF;SAAAA,oBAAAA,UAAUG,MAAM,qBAAhBH,kBAAkBI,IAAI,CAAC;IACzB;AACF;AAEA,OAAO,MAAMX;IAGXY,YACEC,UAAkB,EAClBC,OAKC,CACD;QACA,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,aAAa,GAAGH;QAE7C,IAAII;QACJ,IAAIC;QACJ,IAAIC,cAAc;QAElB,IAAI,CAACC,OAAO,GAAGC;QAEf,MAAMC,eAAe;gBAMRN;YALX,IAAI,CAACI,OAAO,GAAG,IAAIpB,WAAWY,YAAY;gBACxC,GAAGI,WAAW;gBACdO,aAAa;oBACX,GAAGP,YAAYO,WAAW;oBAC1BC,KAAK;wBACH,GAAKR,EAAAA,2BAAAA,YAAYO,WAAW,qBAAvBP,yBAAyBQ,GAAG,KAAI,CAAC,CAAC;wBACvC,GAAGC,QAAQD,GAAG;wBACd,4CAA4C;wBAC5C,qBAAqB;wBACrBE,cAAczB,+BACX0B,OAAO,CAAC,iCAA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