function mockNetwork(){if(!global["__minium_%(interface)s_network_mocked"]){var a=function(b,c){if(global.babelHelpers["typeof"](b)!==global.babelHelpers["typeof"](c))return!1;switch(global.babelHelpers["typeof"](b)){case"string":var d=new RegExp(b);return!!d.exec(c);case"number":return b===c;case"object":if(b instanceof Array){if(b.length!=c.length)return!1;for(var e=0;e<b.length;e++)if(!a(b[e],c[e]))return!1;return!0}for(var f in b)if("success"!=f&&"fail"!=f&&"complete"!=f&&"_miniMockType"!=f){if(void 0===c[f])return!1;if(!a(b[f],c[f]))return!1}return!0}return!1};Object.defineProperty(global,"__minium_%(interface)s_network_mocked",{value:!0,writable:!1}),global["__minium_%(interface)s_network_mock_rule"]||(global["__minium_%(interface)s_network_mock_rule"]=[]),global["__minium_%(interface)sTask"]=function(){"use strict";function a(b,c,d){var e=this;global.babelHelpers.classCallCheck(this,a),this.success=b,this.fail=c,this.callback=d,this.chunkCallback=[],this.headersReceivedCallback=[],this.progressUpdateCallback=[],this.fd=setTimeout(function(){e.headersReceivedCallback.forEach(function(a){e.success&&a({header:e.success.header})}),e.chunkCallback.forEach(function(a){e.success&&a(e.success.data)}),e.progressUpdateCallback.forEach(function(a){e.success&&a({progress:100,totalBytesWritten:100,totalBytesExpectedToWrite:100})}),d(e.success||e.fail)})}return global.babelHelpers.createClass(a,[{key:"abort",value:function abort(){clearTimeout(this.fd)}},{key:"offChunkReceived",value:function offChunkReceived(a){var b=this.chunkCallback.indexOf(a);-1!==b&&this.chunkCallback.splice(b,1)}},{key:"offHeadersReceived",value:function offHeadersReceived(a){var b=this.headersReceivedCallback.indexOf(a);-1!==b&&this.headersReceivedCallback.splice(b,1)}},{key:"onChunkReceived",value:function onChunkReceived(a){this.chunkCallback.push(a)}},{key:"onHeadersReceived",value:function onHeadersReceived(a){this.headersReceivedCallback.push(a)}},{key:"onProgressUpdate",value:function onProgressUpdate(a){this.progressUpdateCallback.push(a)}}]),a}();var b=wx["%(interface)s"];Object.defineProperty(wx,"%(interface)s",{configurable:!0,get:function get(){return function(c){for(var d,e=0;e<global["__minium_%(interface)s_network_mock_rule"].length;e++)if(d=global["__minium_%(interface)s_network_mock_rule"][e],a(d,c)){if(1===d._miniMockType){var f=global["__minium_%(interface)s_network_mock_rule"].splice(e,1),g=global.babelHelpers.slicedToArray(f,1);d=g[0]}if(console.log("@@@@rule match",d),c.__miniumMocked=!0,d.success)return new global["__minium_%(interface)sTask"](d.success,void 0,function(a){c.success&&c.success(a),c.complete&&c.complete(a)});if(d.fail)return new global["__minium_%(interface)sTask"](void 0,d.fail,function(a){c.fail&&c.fail(a),c.complete&&c.complete(a)});if(1===d._miniMockType)return}return b(c)}}})}}