MCPcopy Index your code
hub / github.com/google/magika / V

Function V

tests_data/basic/javascript/code.js:9–10  ·  view source on GitHub ↗
(a,b,c)

Source from the content-addressed store, hash-verified

7function aa(a){function b(k){for(;d<a.length;){var m=a.charAt(d++),l=v[m];if(null!=l)return l;if(!/^[\s\xa0]*$/.test(m))throw Error("Unknown base64 encoding at char: "+m);}return k}r=r||u();v=v||q();for(var c="",d=0;;){var e=b(-1),f=b(0),h=b(64),g=b(64);if(64===g&&-1===e)return c;c+=String.fromCharCode(e<<2|f>>4);64!=h&&(c+=String.fromCharCode(f<<4&240|h>>2),64!=g&&(c+=String.fromCharCode(h<<6&192|g)))}};var w={},y=function(a){w.TAGGING=w.TAGGING||[];w.TAGGING[a]=!0};var ba=Array.isArray,ca=function(a,b){if(a&&ba(a))for(var c=0;c<a.length;c++)if(a[c]&&b(a[c]))return a[c]},z=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},A=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};var B=function(a){this.j=a};B.prototype.toString=function(){return this.j.toString()};var C=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;new B("about:invalid#zClosurez");new B("about:blank");var D=function(){this.i=""};D.prototype.toString=function(){return this.i.toString()};new D;var E=function(){this.h=""};E.prototype.toString=function(){return this.h.toString()};new E;var F=function(){this.g=n.trustedTypes&&n.trustedTypes.emptyHTML||""};F.prototype.toString=function(){return this.g.toString()};new F;var G=window,H=window.history,I=document,J=navigator,K=function(){var a={},b=G.google_tag_data;G.google_tag_data=void 0===b?a:b;return G.google_tag_data},L=function(a,b){I.addEventListener?I.addEventListener(a,b,!1):I.attachEvent&&I.attachEvent("on"+a,b)};var da=function(a){var b=M();b.pending||(b.pending=[]);ca(b.pending,function(c){return c.target.ctid===a.ctid&&c.target.isDestination===a.isDestination})||b.pending.push({target:a,onLoad:void 0})},ea=function(){this.container={};this.destination={};this.canonical={};this.pending=[]},M=function(){var a=K(),b=a.tidr;b||(b=new ea,a.tidr=b);return b};var N=/:[0-9]+$/,Q=function(a,b){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=O(a.protocol)||O(G.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:G.location.port)||("http"===a.protocol?80:"https"===a.protocol?443:"")):"host"===b&&(a.hostname=(a.hostname||G.location.hostname).replace(N,"").toLowerCase());return P(a,b)},P=function(a,b,c){var d=O(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":c="";a&&a.href&&(c=a.href.indexOf("#"),
8c=0>c?a.href:a.href.substr(0,c));a=c;break;case "protocol":a=d;break;case "host":a=a.hostname.replace(N,"").toLowerCase();c&&(c=/^www\d*\./.exec(a))&&c[0]&&(a=a.substr(c[0].length));break;case "port":a=String(Number(a.port)||("http"===d?80:"https"===d?443:""));break;case "path":a.pathname||a.hostname||y(1);a="/"===a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");0<=[].indexOf(a[a.length-1])&&(a[a.length-1]="");a=a.join("/");break;case "query":a=a.search.replace("?","");break;case "extension":a=
9a.pathname.split(".");a=1<a.length?a[a.length-1]:"";a=a.split("/")[0];break;case "fragment":a=a.hash.replace("#","");break;default:a=a&&a.href}return a},O=function(a){return a?a.replace(":","").toLowerCase():""},R=function(a){var b=I.createElement("a");a&&(b.href=a);var c=b.pathname;"/"!==c[0]&&(a||y(1),c="/"+c);a=b.hostname.replace(N,"");return{href:b.href,protocol:b.protocol,host:b.host,hostname:a,pathname:c,search:b.search,hash:b.hash,port:b.port}};var S;var U=function(){var a=fa,b=ha,c=T(),d=function(h){a(h.target||h.srcElement||{})},e=function(h){b(h.target||h.srcElement||{})};if(!c.init){L("mousedown",d);L("keyup",d);L("submit",e);var f=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){b(this);f.call(this)};c.init=!0}},ia=function(a,b,c,d,e){a={callback:a,domains:b,fragment:2===c,placement:c,forms:d,sameHost:e};T().decorators.push(a)},V=function(a,b,c){for(var d=T().decorators,e={},f=0;f<d.length;++f){var h=d[f],g;if(g=
10!c||h.forms)a:{g=h.domains;var k=a,m=!!h.sameHost;if(g&&(m||k!==I.location.hostname))for(var l=0;l<g.length;l++)if(g[l]instanceof RegExp){if(g[l].test(k)){g=!0;break a}}else if(0<=k.indexOf(g[l])||m&&0<=g[l].indexOf(k)){g=!0;break a}g=!1}g&&(g=h.placement,void 0==g&&(g=h.fragment?2:1),g===b&&z(e,h.callback()))}return e};function T(){var a=K(),b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var ja=/(.*?)\*(.*?)\*(.*)/,ka=/([^?#]+)(\?[^#]*)?(#.*)?/;function W(a){return new RegExp("(.*?)(^|&)"+a+"=([^&]*)&?(.*)")}
11var X=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()){b.push(c);var e=b,f=e.push;d=String(d);r=r||u();v=v||q();for(var h=[],g=0;g<d.length;g+=3){var k=g+1<d.length,m=g+2<d.length,l=d.charCodeAt(g),t=k?d.charCodeAt(g+1):0,x=m?d.charCodeAt(g+2):0,ra=l>>2;l=(l&3)<<4|t>>4;t=(t&15)<<2|x>>6;x&=63;m||(x=64,k||(t=64));h.push(r[ra],r[l],r[t],r[x])}f.call(e,h.join(""))}}a=b.join("*");return["1",la(a),a].join("*")};
12function la(a,b){a=[J.userAgent,(new Date).getTimezoneOffset(),J.userLanguage||J.language,Math.floor((new Date(Date.now())).getTime()/60/1E3)-(void 0===b?0:b),a].join("*");if(!(b=S)){b=Array(256);for(var c=0;256>c;c++){for(var d=c,e=0;8>e;e++)d=d&1?d>>>1^3988292384:d>>>1;b[c]=d}}S=b;b=4294967295;for(c=0;c<a.length;c++)b=b>>>8^S[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)}
13function ma(a){return function(b){var c=R(G.location.href),d=c.search.replace("?","");a:{var e=d.split("&");for(var f=0;f<e.length;f++){var h=e[f].split("=");if("_gl"===decodeURIComponent(h[0]).replace(/\+/g," ")){e=h.slice(1).join("=");break a}}e=void 0}b.query=na(e||"")||{};e=Q(c,"fragment");f=e.match(W("_gl"));b.fragment=na(f&&f[3]||"")||{};a&&oa(c,d,e)}}function pa(a,b){if(a=W(a).exec(b)){var c=a[2],d=a[4];b=a[1];d&&(b=b+c+d)}return b}

Callers 1

qaFunction · 0.85

Calls 2

TFunction · 0.85
zFunction · 0.85

Tested by

no test coverage detected