diff --git a/dpma/bundle.json b/dpma/bundle.json index e360ad1..ac6134c 100644 --- a/dpma/bundle.json +++ b/dpma/bundle.json @@ -1 +1,4 @@ -{"timestamp":1553210830203,"code":"!function(s){var t={};function n(i){if(t[i])return t[i].exports;var e=t[i]={i:i,l:!1,exports:{}};return s[i].call(e.exports,e,e.exports,n),e.l=!0,e.exports}n.m=s,n.c=t,n.d=function(s,t,i){n.o(s,t)||Object.defineProperty(s,t,{enumerable:!0,get:i})},n.r=function(s){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(s,\"__esModule\",{value:!0})},n.t=function(s,t){if(1&t&&(s=n(s)),8&t)return s;if(4&t&&\"object\"==typeof s&&s&&s.__esModule)return s;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,\"default\",{enumerable:!0,value:s}),2&t&&\"string\"!=typeof s)for(var e in s)n.d(i,e,function(t){return s[t]}.bind(null,e));return i},n.n=function(s){var t=s&&s.__esModule?function(){return s.default}:function(){return s};return n.d(t,\"a\",t),t},n.o=function(s,t){return Object.prototype.hasOwnProperty.call(s,t)},n.p=\"\",n(n.s=1)}([function(module,exports){const Injector=window.Injector=window.Injector||(()=>{let exports=null,exportPromise=new Promise(s=>{window.__injectCall=(t=>{exports=t,s(t)})}),appender=`;__injectCall({${[\"Module\",\"cp5\",\"Runtime\",\"Browser\",\"ASM_CONSTS\"].map(s=>'r: typeof r !== \"undefined\" && r'.replace(/r/g,s)).join(\",\")}})`,replaced=[],replacedWith=[],replace=(s,t)=>{let{name:n}=t;replaced.push(s[n]),replacedWith.push(t),s[\"_\"+n]=s[n],s[n]=t};return replace(Function.prototype,function(){let s=replacedWith.indexOf(this);return this._toString.call(-1===s?this:replaced[s])}),replace(document,function getElementById(id){if(\"textInput\"!==id)return this._getElementById(id);throw this.getElementById=this._getElementById,fetch(document.querySelector('script[src*=\"build_\"]').src).then(s=>s.text()).then(s=>s.replace(/}\\)\\)\\(window\\)\\s*$/,s=>appender+s)).then(eval),new Error(\"Disabling default source\")}),{get exports(){if(!exports)throw new Error(\"Exports are not yet ready!\");return exports},maybeExports:()=>exports,getExports:()=>exportPromise,replace:replace}})();module.exports=Injector},function(s,t,n){const i=n(0),e=n(2),c=n(3),l=n(4),o=\"yes\"===localStorage[\"actually know javascript\"],m=class{constructor(s){this.parent=[s,...s.parent]}render(s,t,n){console.warn(\"Component missing render function!\",this)}renderAbsolute(s,t,n,i,e){s.clip(t,n,i,e),this.render(s,i,e),s.pop()}},h=class extends m{constructor(s,t=!1,n=!1){super(s),this.horizontal=t,this.resizable=n,this.children=[],this.size=0}render(s,t,n){let i=this.children.filter(s=>!s.hidden);if(this.horizontal){if(this.resize(t),this.resizable&&i.length>=2){let t=i[0].size;for(let e=1;e=2){let n=i[0].size;for(let e=1;e{let n=l(68136).$vector[t],i=n?n[56].f32:null;return{x:s[40].f32,y:s[72].f32,id:65536*s.$[56].u32+s.$[54].u16,size:i}}),v=w.map(s=>s.id).reduce((s,t)=>s>t?s:t,-1);for(let{x:t,y:n,id:i,size:e}of w){s.fill(p===i?\"#36cf3e\":v===i?\"#3636cf\":\"#36363e\");let l=c.max(2,c.min(400,e)*this.camera.zoom);s.circle(t*this.camera.zoom,n*this.camera.zoom,l),s.text(`(${c.round(t)}, ${c.round(n)})`,t*this.camera.zoom+2+l,n*this.camera.zoom)}0===e.leaderX&&0===e.leaderY||(s.fill(\"#ff3202\"),s.circle(e.leaderX*this.camera.zoom,e.leaderY*this.camera.zoom,2),s.text(`(${e.leaderX.toFixed(4)}, ${e.leaderY.toFixed(4)})`,e.leaderX*this.camera.zoom+5,e.leaderY*this.camera.zoom-12)),s.pop()}},w=class extends r{constructor(s){super(s)}queryHeight(){return 16*l(68220).$vector.length}renderSection(s,t,n,i,e){s.fill(\"#f7f7f7\"),s.rect(0,i,t,e-i),s.font(12);let[o]=l(68208).$vector,m=o?65536*o[444].u32+o[442].u16:0,h=l(68220).$vector.map((s,t)=>{let n=l(68136).$vector[t],i=n?n[56].f32:null;return{i:t,x:s[40].f32,y:s[72].f32,id:65536*s.$[56].u32+s.$[54].u16,size:i}}),r=h.map(s=>s.id).reduce((s,t)=>s>t?s:t,-1);for(let{i:t,x:n,y:i,id:e,size:l}of h)s.fill(m===e?\"#36cf3e\":r===e?\"#3636cf\":\"#36363e\"),s.text(`${t} - ${e} - (${c.round(n)}, ${c.round(i)}) - ${l}`,10,8+16*t)}},v=class extends m{constructor(s,t=0){super(s),window.onresize=(()=>{}),0===t?(window.canvas.style.top=\"0\",window.canvas.style.left=\"0\",window.canvas.style.right=\"auto\",window.canvas.style.bottom=\"auto\",window.canvas.style.width=\"auto\",window.canvas.style.height=\"auto\"):window.canvas.style.display=\"none\",this.mode=t,this.disabled=!1,this.mc=e.mc()}renderAbsolute(s,t,n,e,m){if(s.mouse(this.mc,t,n,e,m),window.input)if(this.mc.owned){if(s.cursor(window.canvas.style.cursor),input.mouse(this.mc.x-t,this.mc.y-n),this.mc.left?input.keyDown(1):input.keyUp(1),this.mc.right?input.keyDown(3):input.keyUp(3),o&&0!==this.mc.scroll){let[s]=l(68208).$vector;if(s){let t=c.pow(.85,this.mc.scroll);s[44].f32*=t,this.mc.scroll=0}}}else input.keyUp(1),input.keyUp(3);let h=window.canvas;if(1===this.mode&&s.image(h,t,n,e,m),h.width===e&&h.height===m||(h.width=e,h.height=m),0===this.mode)window.canvas.style.top=n+\"px\",window.canvas.style.left=t+\"px\";else if(2===this.mode){h.width===e&&h.height===m||(h.width=e,h.height=m);const{Browser:c}=i.exports;this.disabled?c.mainLoop.runner():c.mainLoop.runner&&(c.mainLoop.pause(),c.mainLoop.currentlyRunningMainloop--,c.mainLoop.scheduler=(()=>{}),c.mainLoop.runner(),this.disabled=!0),s.image(h,t,n,e,m)}}},a=class extends h{constructor(){super({parent:[]},!0,!0),this.mc=e.mc(),this.canvas=this.createCanvas(),this.diepCanvas=this.createChild(v),this.controller=this.createChild(h,!1,!0),this.controller.createChild(p),this.controller.createChild(w),this.controller.createChild(u),this.controller.resizeChildren([3,1,1]),this.resizeChildren([3,1]),this.loop(),this.canvas.canvas.addEventListener(\"mousemove\",s=>{this.loop(!0)},!1)}createCanvas(){let s=document.body.appendChild(document.createElement(\"canvas\"));return s.style.position=\"absolute\",s.style.left=\"0\",s.style.right=\"0\",s.style.top=\"0\",s.style.bottom=\"0\",s.style.height=\"100%\",s.style.width=\"100%\",new e(s)}loop(s=!1){this.canvas.reset(window.innerWidth,window.innerHeight),this.render(this.canvas,window.innerWidth,window.innerHeight),this.canvas.mouse(this.mc,0,0,window.innerWidth,window.innerHeight),this.mc.owned&&this.canvas.cursor(\"default\"),s||requestAnimationFrame(()=>this.loop())}};console.log(\"[DPMA] Injecting...\"),i.getExports().then(()=>{console.log(\"[DPMA] Starting!\"),window.dpma=new a})},function(s,t){s.exports=class{static mc(){return{left:!1,right:!1,x:0,y:0,dx:0,dy:0,scroll:0,owned:!1}}constructor(s){this.canvas=s,this.ctx=s.getContext(\"2d\"),this.oldFontName=\"sans-serif\",this.mc=null,this.mcDefault={},this.mouseAt={x:0,y:0,left:!1,right:!1},this.translates=[{x:0,y:0}];let t=this.mouseAt,n=n=>{let{left:i,top:e}=s.getBoundingClientRect();t.x=n.clientX-i,t.y=n.clientY-e,this.mc&&(this.mc.dx+=n.movementX,this.mc.dy+=n.movementY)};s.addEventListener(\"click\",s=>{s.preventDefault()},!1),s.addEventListener(\"dragstart\",s=>{s.preventDefault()},!1),s.addEventListener(\"contextmenu\",s=>{s.preventDefault()},!1),s.addEventListener(\"mousedown\",s=>{s.preventDefault(),n(s),0===s.button?t.left=!0:2===s.button&&(t.right=!0)},!1),s.addEventListener(\"mousemove\",s=>{n(s)},!1),s.addEventListener(\"mouseup\",s=>{n(s),0===s.button?t.left=!1:2===s.button&&(t.right=!1)},!1),s.addEventListener(\"mousewheel\",s=>{this.mc&&(this.mc.scroll+=s.wheelDelta/-120||s.detail||0)},!1)}clip(s,t,n,i){let e=this.translates[this.translates.length-1];this.translates.push({x:s+e.x,y:t+e.y}),this.ctx.save(),this.ctx.translate(s,t),this.ctx.beginPath(),this.ctx.rect(0,0,n,i),this.ctx.clip()}translate(s,t){let n=this.translates[this.translates.length-1];this.translates.push({x:s+n.x,y:t+n.y}),this.ctx.save(),this.ctx.translate(s,t)}pop(){this.ctx.restore(),this.translates.pop()}mouse(s,t,n,i,e,c=null){let l=this.translates[this.translates.length-1];if(t+=l.x,n+=l.y,this.mc&&this.mc!==s)return;let o=this.mouseAt.x>=t&&this.mouseAt.x=n&&this.mouseAt.ys>=t?(s+t)/2:n>=t?t:n<=s?s:n),s.exports=n},function(s,t,n){const i=n(0);let e=({ptr:s},t)=>{let{Module:{HEAPU8:n,HEAPU16:e,HEAPU32:c,HEAPU64:o,HEAPF32:m,HEAPF64:h}}=i.exports;switch(t){case\"u8\":return n[s];case\"u16\":return e[s>>1];case\"u32\":return c[s>>2];case\"u64\":return o[s>>3];case\"f32\":return m[s>>2];case\"f64\":return h[s>>3];case\"vector\":let i=[];for(let t=c[s>>2];t>2)];t+=4)i.push(l(t));return i;case\"$vector\":let r=[];for(let t=c[s>>2];t>2)];t+=4)r.push(l(c[t>>2]));return r;case\"$\":return l(c[s>>2])}let r=parseInt(t,10);if(!Number.isNaN(r))return l(s+r)},c=({ptr:s},t,n)=>{let{Module:{HEAPU8:e,HEAPU16:c,HEAPU32:l,HEAPU64:o,HEAPF32:m,HEAPF64:h}}=i.exports;switch(t){case\"u8\":return e[s]=n;case\"u16\":return c[s>>1]=n;case\"u32\":return l[s>>2]=n;case\"u64\":return o[s>>3]=n;case\"f32\":return m[s>>2]=n;case\"f64\":return h[s>>3]=n}},l=s=>new Proxy({ptr:s},{get:e,set:c});s.exports=l}]);"} \ No newline at end of file +{ + "timestamp": 1234567891011121314, + "code": "!function(){console.log('[DPMA] Injecting...');if(window.Injector)return;const Injector=window.Injector=(()=>{let exports=null;const exportPromise=new Promise(r=>{window.__injectCall=t=>{exports=t,r(t)}});const appender=`;__injectCall({${[\"Module\",\"cp5\",\"Runtime\",\"Browser\",\"ASM_CONSTS\"].map(s=>`r: typeof ${s}!==\\\"undefined\\\"&&${s}`).join(\",\")}})`;function findGameScript(){const scripts=[...document.scripts].filter(s=>s.src&&!s.src.includes('adinplay')&&!s.src.includes('crazygames'));return scripts.find(s=>/index-|build_|main\\./.test(s.src))||scripts[scripts.length-1]||null}function inject(){const script=findGameScript();if(!script){setTimeout(inject,100);return}fetch(script.src).then(r=>r.text()).then(code=>{const patched=code.replace(/}\\)\\)\\(window\\)\\s*$/,m=>appender+m);console.log('[DPMA] Patching game script...');eval(patched)}).catch(e=>console.error('[DPMA] Injection failed:',e))}const originalGet=document.getElementById.bind(document);document.getElementById=function(id){if(id==='textInput'){document.getElementById=originalGet;inject();return originalGet(id);}return originalGet(id)};return{get exports(){if(!exports)throw new Error('Exports not ready yet');return exports},maybeExports:()=>exports,getExports:()=>exportPromise}})();Injector.getExports().then(()=>console.log('[DPMA] Ready!'))}();" +}