"use strict";(function(){"use strict";var r=require("./operators");var e={cmcc:"移动",cernet:"教育",cnii:"电信",cnc:"联通",other:"其他"};exports.getOperatorByIp=t;exports.getSegmentByIpMask=n;exports.isPrivateNetwork=i;exports.getOperatorText=u;function t(e){if(!e){return"other"}var t=e.split(".")[0];var i;var u;var a;var o;var f;var s;var v,p,c,l;for(v=0,p=r.length;v<p;v++){i=r[v];u=i.operat;a=i.ipMask;for(c=0,l=a.length;c<l;c++){i=a[c];o=i[0];f=i[1];s=o.indexOf(t);if(s>-1&&s<4&&o===n(e,f)){return u}}}return"other"}function n(r,e){if(!r||!e){return""}var t=r.split(".");var n=e.split(".");var i=[];var u;for(u=t.length;u--;){i[u]=+t[u]&+n[u]}return i.join(".")}function i(r){var e=r.split(".")[0];var t=r.split(".")[1];if(e==undefined||t==undefined){return false}e=Number(e);t=Number(t);if(e==10){return true}if(e==172&&t>=16&&t<=31){return true}if(e==192&&t==168){return true}return false}function u(r){return e[r]||"其他"}})();