function create_script_chunk_rms_accumulator(N){const l={'ScDbd':function(p,M){return p*M;},'WPQgU':function(p,M){return p!==M;},'vRiJE':function(p,M){return p<=M;},'WnUUc':function(p,M){return p+M;},'rovwi':function(p,M){return p>M;},'wcwDi':function(p,M){return p<M;},'OJiyi':function(p,M){return p+M;},'KGYJr':function(p,M){return p/M;},'LbvhM':function(p,M){return p+M;},'HnQxk':function(p,M){return p-M;},'KIOXg':function(p,M){return p===M;},'MHZAq':function(p,M){return p%M;},'LxkgA':function(p,M){return p/M;},'YpfNA':function(p,M){return p+M;},'hTbYq':function(p,M){return p/M;},'AgxpJ':'chunk\x20RMS\x20'+'accumulati'+'on\x20failed:','YDOsQ':function(p,M){return p(M);},'YRFmT':function(p,M,O,P){return p(M,O,P);},'WvrvE':function(p,M){return p>M;},'VLWkH':function(p,M){return p/M;},'nrkQL':function(p,M){return p>M;},'GCOMm':function(p,M){return p-M;},'qxXwU':function(p,M){return p(M);}},L={'RMS_x':[],'RMS_y':[],'carry':new Float32Array(-0x24a2+0x959*-0x4+0x4a06),'carryStartSeconds':0x0,'sampleRate':null,'windowSamples':null,'chain':Promise['resolve'](),'failed':![]},y=async(p,M,O)=>{if(L['sampleRate']===null)L['sampleRate']=M,L['windowSamp'+'les']=Math['max'](-0x2567+-0x1089+0x35f1,Math['round'](l['ScDbd'](N,M)));else l['WPQgU'](M,L['sampleRate'])&&(console['warn']('chunk\x20RMS:'+'\x20sample\x20ra'+'te\x20changed'+'\x20'+L['sampleRate']+'\x20->\x20'+M+(';\x20restitch'+'ing\x20withou'+'t\x20carry.')),L['sampleRate']=M,L['windowSamp'+'les']=Math['max'](0x577*0x1+-0x81a+-0xd*-0x34,Math['round'](l['ScDbd'](N,M))),L['carry']=new Float32Array(-0xdef*-0x2+0x1717*-0x1+-0x4c7));const P=L['windowSamp'+'les'];let t,R;L['carry']['length']?(t=new Float32Array(L['carry']['length']+p['length']),t['set'](L['carry'],0x1042*0x1+0x1*0x2293+-0x32d5),t['set'](p,L['carry']['length']),R=O-L['carry']['length']/M):(t=p,R=O);let Q=-0x2*0x664+-0x13bc+0x2084;for(;l['vRiJE'](Q+P,t['length']);Q+=P){let H=-Infinity;for(let Y=Q;Y<l['WnUUc'](Q,P);Y++){if(l['rovwi'](t[Y],H))H=t[Y];}let a=l['ScDbd'](0x1*0x9d6+-0x3d*0x38+-0x33*-0x12,Math['log10'](Math['abs'](H)));if(!Number['isFinite'](a)||l['wcwDi'](a,-(-0xfb+-0x155f*-0x1+-0x1400)))a=-(-0x7*-0x14e+0xb*0x20f+-0x5*0x647);const c=l['OJiyi'](R,l['KGYJr'](l['LbvhM'](Q,P/(0x2df+0x3c7+-0x6a4)),M));if(L['RMS_x']['length']&&c<=L['RMS_x'][l['HnQxk'](L['RMS_x']['length'],-0x1ba7+0x17*-0x12c+0x369c)])continue;L['RMS_x']['push'](c),L['RMS_y']['push'](a);if(l['rovwi'](Q,0x7df+0x116e+-0x194d)&&l['KIOXg'](l['MHZAq'](l['LxkgA'](Q,P),-0x23d9+0x5*0x73+-0x2*-0x189d),0x5*-0x335+-0x1066+0x206f))await new Promise(C=>setTimeout(C,-0x2203+0x1*-0x1e6b+0x406e));}L['carry']=t['slice'](Q),L['carryStart'+'Seconds']=l['YpfNA'](R,l['hTbYq'](Q,M));};return{'addChunkFile'(p,M){const O={'gfBsA':function(P,t){return l['YDOsQ'](P,t);},'vqiRd':function(P,t,R,Q){return l['YRFmT'](P,t,R,Q);}};return L['chain']=L['chain']['then'](async()=>{if(L['failed'])return;const P=await O['gfBsA'](getAudioFloatArray,p);await O['vqiRd'](y,P['channelDat'+'a'][0x2d6+0x1de7*-0x1+0xa9*0x29],P['sampleRate'],M);})['catch'](P=>{console['error'](l['AgxpJ'],P),L['failed']=!![];}),L['chain'];},'snapshot'(){return{'RMS_x':L['RMS_x']['slice'](),'RMS_y':L['RMS_y']['slice']()};},async 'finalize'(){await L['chain'];if(L['failed'])return null;if(L['carry']['length']&&L['sampleRate']){let p=-Infinity;for(let P=0x133f+-0x6cc+-0xc73;l['wcwDi'](P,L['carry']['length']);P++){if(l['WvrvE'](L['carry'][P],p))p=L['carry'][P];}let M=l['ScDbd'](0x1d56+0x5*-0x23d+-0x1*0x1211,Math['log10'](Math['abs'](p)));if(!Number['isFinite'](M)||l['wcwDi'](M,-(-0x2b9*0x6+-0x5*-0x2c7+-0x1*-0x2d7)))M=-(0x23d5+0x189b*0x1+-0xe*0x44a);const O=L['carryStart'+'Seconds']+l['VLWkH'](L['carry']['length'],(-0x1647*-0x1+0x1d8e+-0x1*0x33d3)*L['sampleRate']);(!L['RMS_x']['length']||l['nrkQL'](O,L['RMS_x'][l['GCOMm'](L['RMS_x']['length'],0x806*0x3+-0x2546*0x1+0xa1*0x15)]))&&(L['RMS_x']['push'](O),L['RMS_y']['push'](M)),L['carry']=new Float32Array(-0x25f*0x1+-0x13b2+0x15*0x10d);}return{'RMS_x':L['RMS_x'],'RMS_y':l['qxXwU'](sanitize_script_rms_db_values,L['RMS_y'])};}};}