/* NX-429-GUARD r41k: দৈনিক-কোটা-শেষ-হলে অ্যাপ-যেন-ভেঙে-না-পড়ে */
(function(){
function nx429(){
var FS=window.FirebaseService;
if(!FS||FS.__nx429) return;
if(typeof FS.getAll!=='function'||typeof FS.add!=='function') return;
FS.__nx429=true;
var cd=0, hits=0; try{ window.__nx429Until=function(){ return cd; }; }catch(e){}
function q(e){ var m=String((e&&e.message)||(e&&e.code)||e||''); return /429|resource-exhausted|quota/i.test(m); }
function cache(c){ try{ return FS._cacheGet?FS._cacheGet.call(FS,c):null; }catch(e){ return null; } }
function busyToast(){ try{ if(window.UI&&UI.toast) UI.toast('Cloud is busy right now (daily quota). Saved data is being shown - please save again after a while.','warning'); }catch(e){} }
['getAll','getById'].forEach(function(mn){
var orig=FS[mn]; if(typeof orig!=='function') return;
FS[mn]=function(c,o){ o=o||{};
if(Date.now()2?300000:120000); busyToast();
return cache(c)||[];
});
};
});
['add','update','remove','set','batchWrite'].forEach(function(mn){
var orig=FS[mn]; if(typeof orig!=='function') return;
FS[mn]=function(){
var args=arguments, self=this;
if(Date.now()