!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DisableDevtool=e():n.DisableDevtool=e()}(this,(function(){return function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){"use strict";function o(n){return-1!==navigator.userAgent.toLocaleLowerCase().indexOf(n)}t.r(e);var r=function(){try{return window.self!==window.top}catch(n){return!0}}(),i=o("qqbrowser"),u=o("firefox"),c=o("macintosh"),a=o("edge")&&!o("chrome")||o("trident")||o("msie"),f=o("crios");var l=window.console||{log:function(){}},d=a?function(){return l.log.apply(l,arguments)}:l.log,v=a?function(){return l.clear()}:l.clear;var s=!1;var w,p={};for(var m in D)p[D[m]]=!1;function y(n){p[n]=!0}function b(n){p[n]=!1}function h(){for(var n in p)if(p[n])return s=!0,!0;return s=!1,!1}function g(){var n=function(){if(T(window.devicePixelRatio))return window.devicePixelRatio;var n=window.screen;if(T(n))return!1;if(n.deviceXDPI&&n.logicalXDPI)return n.deviceXDPI/n.logicalXDPI;return!1}();if(!1===n)return!0;var e=D.SIZE,t=window.outerWidth-window.innerWidth*n>200,o=window.outerHeight-window.innerHeight*n>300;return t||o?(S(e),!1):(b(e),!0)}function T(n){return null!=n}function E(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var D={UNKONW:-1,REG_TO_STRING:0,DEFINE_ID:1,SIZE:2,DATE_TO_STRING:3,FUNC_TO_STRING:4,DEBUGGER:5},I=(E(w={},D.REG_TO_STRING,(function(){var n=i,e=u;if(n||e){var t=D.REG_TO_STRING,o=0,r=/./;d(r),r.toString=function(){if(n){var r=(new Date).getTime();o&&r-o<100?S(t):o=r}else e&&S(t);return""},j(t,(function(){d(r)}))}})),E(w,D.DEFINE_ID,(function(){var n=D.DEFINE_ID,e=document.createElement("div");e.__defineGetter__("id",(function(){S(n)})),Object.defineProperty(e,"id",{get:function(){S(n)}}),j(n,(function(){d(e)}))})),E(w,D.SIZE,(function(){r?console.warn("SizeDetector is disabled in IFrame"):(g(),window.addEventListener("resize",(function(){setTimeout(g,100)}),!0))})),E(w,D.DATE_TO_STRING,(function(n){if(!n){var e=D.DATE_TO_STRING,t=0,o=new Date;o.toString=function(){return t++,""};j(e,(function(){t=0,d(o),v(),t>=2&&S(e)}))}})),E(w,D.FUNC_TO_STRING,(function(n){if(!n){var e=D.FUNC_TO_STRING,t=0,o=function(){};o.toString=function(){return t++,""};j(e,(function(){t=0,d(o),v(),t>=2&&S(e)}))}})),E(w,D.DEBUGGER,(function(n){if(n){var e=D.DEBUGGER;j(e,(function(){var n=Date.now();Date.now()-n>100&&S(e)}))}})),w);function O(){var n=function(n){var e="all"===C.detectors?Object.keys(I):C.detectors;n&&e.push(D.DEBUGGER),e.forEach((function(e){I[e]&&I[e](n)}))};f?new Promise((function(n){var e=0,t=new RegExp;t.toString=function(){return e++,""},d(t),setTimeout((function(){n(3===e)}),100)})).then((function(e){n(e)})):n(!1)}function S(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D.UNKONW;console.warn("You ar not allow to use DEVTOOL! 【type = ".concat(n,"】")),C.clearIntervalWhenDevOpenTrigger&&k(),A(),C.ondevtoolopen(n,L),y(n)}function _(){if("function"==typeof C.ondevtoolclose){var n=s;!h()&&n&&C.ondevtoolclose()}}var R=null,G=null,N=[],x=0;function P(){var n,e,t,o,r,i,u=!1,c=function(){u=!0},a=function(){u=!1};n=c,e=a,t=window.alert,o=window.confirm,r=window.prompt,i=function(t){return function(){n&&n(),t.apply(void 0,arguments),e&&e()}},window.alert=i(t),window.confirm=i(o),window.prompt=i(r),function(n,e){var t,o,r;void 0!==document.hidden?(t="hidden",r="visibilitychange",o="visibilityState"):void 0!==document.mozHidden?(t="mozHidden",r="mozvisibilitychange",o="mozVisibilityState"):void 0!==document.msHidden?(t="msHidden",r="msvisibilitychange",o="msVisibilityState"):void 0!==document.webkitHidden&&(t="webkitHidden",r="webkitvisibilitychange",o="webkitVisibilityState");var i=function(){document[o]===t?e():n()};document.removeEventListener(r,i,!1),document.addEventListener(r,i,!1)}(a,c),R=window.setInterval((function(){u||(N.forEach((function(n){var e=n.type,t=n.handle;b(e),t(x++)})),v(),_())}),C.interval),G=setTimeout((function(){/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())&&k()}),C.stopIntervalTime)}function j(n,e){N.push({type:n,handle:e})}function k(){window.clearInterval(R)}function A(){window.clearTimeout(G)}function L(){if(k(),C.url)window.location.href=C.url;else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(n){console.log(n)}setTimeout((function(){window.location.href="https://tackchen.gitee.io/404.html?h=".concat(encodeURIComponent(location.host))}),500)}}function U(n){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var C={md5:"",ondevtoolopen:L,ondevtoolclose:null,url:"",tkName:"ddtk",interval:200,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:"all"},K=["detectors","ondevtoolclose"];function W(){"function"==typeof C.ondevtoolclose&&!0===C.clearIntervalWhenDevOpenTrigger&&(C.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function H(n,e,t,o,r,i){return B((u=B(B(e,n),B(o,i)))<<(c=r)|u>>>32-c,t);var u,c}function F(n,e,t,o,r,i,u){return H(e&t|~e&o,n,e,r,i,u)}function V(n,e,t,o,r,i,u){return H(e&o|t&~o,n,e,r,i,u)}function z(n,e,t,o,r,i,u){return H(e^t^o,n,e,r,i,u)}function M(n,e,t,o,r,i,u){return H(t^(e|~o),n,e,r,i,u)}function B(n,e){var t=(65535&n)+(65535&e);return(n>>16)+(e>>16)+(t>>16)<<16|65535&t}var X=function(n){return function(n){for(var e="0123456789abcdef",t="",o=0;o<4*n.length;o++)t+=e.charAt(n[o>>2]>>o%4*8+4&15)+e.charAt(n[o>>2]>>o%4*8&15);return t}(function(n,e){n[e>>5]|=128<>>9<<4)]=e;for(var t=1732584193,o=-271733879,r=-1732584194,i=271733878,u=0;u>5]|=(255&n.charCodeAt(t/8))<0&&void 0!==arguments[0]?arguments[0]:{};for(var e in C)void 0===n[e]||U(C[e])!==U(n[e])&&-1===K.indexOf(e)||(C[e]=n[e]);W()}(n),function(){if(C.md5){var n=function(n){var e=window.location.search;if(""!==e){var t=new RegExp("(^|&)"+n+"=([^&]*)(&|$)","i"),o=e.substr(1).match(t);if(null!=o)return unescape(o[2])}return""}(C.tkName);if(X(n)===C.md5)return!0}return!1}())||(P(),e=73,t=85,o=83,r=123,i=c?function(n,t){return n.metaKey&&n.altKey&&t===e}:function(n,t){return n.ctrlKey&&n.shiftKey&&t===e},u=c?function(n,e){return n.metaKey&&n.altKey&&e===t||n.metaKey&&e===o}:function(n,e){return n.ctrlKey&&(e===o||e===t)},window.addEventListener("keydown",(function(n){var e=(n=n||window.event).keyCode||n.which;if(e===r||i(n,e)||u(n,e))return n.returnValue=!1,n.preventDefault(),!1}),!0),C.disableMenu&&window.addEventListener("contextmenu",(function(n){return(n=n||window.event).returnValue=!1,n.preventDefault(),!1}),!0),O())}q.md5=X,q.version="0.2.1",q.DETECTOR_TYPE=D,q.isDevToolOpened=h,function(){if("undefined"!=typeof document){var n=document.querySelector("[disable-devtool-auto]");if(n){var e={};["md5","url","tk-name","interval","disable-menu","detectors"].forEach((function(t){var o=n.getAttribute(t);null!==o&&("interval"===t?o=parseInt(o):"disable-menu"===t?o="false"!==o:"detector"===t&&"all"!==o&&(o=o.split(" ")),e[function(n){if(-1===n.indexOf("-"))return n;var e=!1;return n.split("").map((function(n){return"-"===n?(e=!0,""):e?(e=!1,n.toUpperCase()):n})).join("")}(t)]=o)})),q(e)}}}();e.default=q}]).default}));