WTF! My '03 M45 will not start

I have driven short trips all week and tonight, I reached for the handle and notice that the alarm has been disengaged. I try to start it and nothing,. No lights or gauges. I put a charger on the battery and try the jump start feature and I all I get is a "rat-a-tat-tat" sound. I let it quick charge for an hour and still I get "rat-a-tat-tat".
Any suggestions before towing to the dealership?Can I replace the battery without having to go the dealer?If so, any issues that I should anticipate with the vehicle settings or smart key functions?