(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";function checkInjection(){var e=$("#inject-once");return e?e.value++:(e=document.createElement("input"),e.value=1,document.head.appendChild(e),e.setAttribute("id","inject-once")),console.log("check injection:"+e.value),e.value}function $(e,t){return(t||document).querySelector(e)}var _message=require(4),_test=require(3);checkInjection(),(0,_message.registerMsgHandler)(_test.MSG_EVENT_INJECTION_TEST_INJECTION_CHECK,function(e,t){(0,_message.sendMessageAsync)(_test.MSG_EVENT_INJECTION_TEST_INJECTION_CHECK,{count:checkInjection()})}),(0,_message.registerMsgHandler)(_test.MSG_EVENT_INJECTION_TEST_INJECTION_RELOAD,function(){window.location.reload(!0)});


},{"3":3,"4":4}],2:[function(require,module,exports){
"use strict";function defer(){var e=void 0,r=void 0,n=new Promise(function(n,o){e=n,r=o});return{resolve:function(r){e(r)},reject:function(e){r(e)},promise:n}}exports.defer=defer;


},{}],3:[function(require,module,exports){
"use strict";var MSG_EVENT_INJECTION_TEST_START=exports.MSG_EVENT_INJECTION_TEST_START="t-inject-start",MSG_EVENT_INJECTION_TEST_INJECTION_CHECK=exports.MSG_EVENT_INJECTION_TEST_INJECTION_CHECK="t-inject-check",MSG_EVENT_INJECTION_TEST_INJECTION_MULTIPLE_TIME=exports.MSG_EVENT_INJECTION_TEST_INJECTION_MULTIPLE_TIME="t-inject-multiple",MSG_EVENT_INJECTION_TEST_INJECTION_RELOAD=exports.MSG_EVENT_INJECTION_TEST_INJECTION_RELOAD="t-inject-reload",MSG_EVENT_TEST_RESET_DATA=exports.MSG_EVENT_TEST_RESET_DATA="reset-data",MSG_EVENT_FLASH_RECORD_TIP_QUERY_TAB_MESSAGES=exports.MSG_EVENT_FLASH_RECORD_TIP_QUERY_TAB_MESSAGES="tab-msg",MSG_EVENT_SEND_MSG_WITH_PROGRESS=exports.MSG_EVENT_SEND_MSG_WITH_PROGRESS="send-msg-with-progress";


},{}],4:[function(require,module,exports){
"use strict";function sendMessageAsync(e,r){var t=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=t.noReply,o=t.extId,s={type:e,data:r,sync:!1,noReply:n,d:"req"};if(n)return sendMsg(o,s),Promise.resolve();var c=guid(),d=(0,_defer.defer)();return s.guid=c,deferCache[c]=d,sendMsg(o,s),d.promise["catch"](noop)}function initPort(){deferCache=Object.create(null);try{extPort=chrome.runtime.connect({name:"page:connect"}),extPort.onMessage.addListener(onMsg),extPort.onDisconnect.addListener(function(){disposePort(),setTimeout(initPort,0)})}catch(e){console.log(e)}}function disposePort(){for(var e in deferCache){var r=deferCache[e];r&&r.reject&&r.reject("disconnect")}deferCache=Object.create(null),extPort=null}function onMsg(e){var r=e.guid,t=e.d,n=deferCache[r];if("postTab"===t){var o=bkMsgHandlers[e.type];o&&o(e.data)}else n&&"res"===t&&(e.success?n.resolve(e.data):n.reject(e.error),delete deferCache[r])}function registerMsgHandler(e,r){"function"==typeof r&&(bkMsgHandlers[e]=r)}function sendMsg(e,r){if(e&&r)throw Error("not support external");r&&(extPort?extPort.postMessage(r):chrome.runtime.sendMessage(r))}function noop(){}function guid(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+Date.now()}exports.sendMessageAsync=sendMessageAsync,exports.registerMsgHandler=registerMsgHandler;var _defer=require(2),deferCache=void 0,bkMsgHandlers=Object.create(null),extPort=void 0;"object"==typeof chrome&&chrome.runtime&&chrome.runtime.onMessage&&chrome.runtime.onMessage.addListener(onMsg),window.addEventListener("unload",function(){extPort.disconnect(),disposePort()}),initPort();


},{"2":2}]},{},[1]);
