PageSourceSearch

https://vacancies.mfat.govt.nz/platform/js/j2w/min/j2w.core.min.js?h=275f70e9

js mfat.govt.nz collected 2026-09-24 08:25:59 UTC 5,189 bytes, 11 lines download raw bytes

1var j2w=function(){var e={},d=!1,g,k,h={};return{applyID:null,applyInProgress:!1,xhrAborted:!1,xhrRequest:"",init:function(a){d?a=!1:(e=a,g=a.passwordRegEx,k=a.emailRegEx,a=d=!0);return a},Args:{collect:function(){function a(a){for(var c in a)if(!b.hasOwnProperty(c)||"string"===typeof b[c]&&0==b[c].trim().length)b[c]=a[c]}var b={},c=["SAB","SSB","Apply"],l,f;for(l in c)f=c[l],window.j2w.hasOwnProperty(f)&&(f=window.j2w[f].Args.get(),a(f));f="Args";a(j2w.Args.get());f="URL";a(j2w.Util.getQueryStringAsObject());
2return b},get:function(a,b){b||(b=e);var c;c=b;c=a&&c?c.hasOwnProperty(a)?c[a]:void 0:c;return c}},Navigation:{setReturnURL:function(a,b){$.ajax({type:"GET",url:"/services/navigation/setredirect/",data:{url:a},dataType:"json",complete:function(a){"function"===typeof b&&b()}})}},File:{readFileAsBinary:function(a){var b=$.Deferred(),c=new FileReader;c.onload=function(){if(c.readAsBinaryString)b.resolve(c.result);else{for(var a="",f=new Uint8Array(c.result),e=f.byteLength,d=0;d<e;d++)a+=String.fromCharCode(f[d]);
3b.resolve(a)}};c.readAsBinaryString?c.readAsBinaryString(a):c.readAsArrayBuffer(a);return b.promise()}},Text:{base64EncodeText:function(a){return btoa(a)}},RE:{getEmailRegex:function(){return k},getPasswordRegex:function(){return g}},Validation:{containsInvalidPassword:function(a){return RegExp("[\\u007F-\\uFFFF\\s]").exec(a)},isEmailOverlyLenient:function(a){return/.+@[a-zA-Z.\-_0-9]+[.][a-zA-Z]+/.test(a)},isEmailNoWhitespace:function(a){return(new RegExp(k)).test(a)},isInteger:function(a){return/^\d+$/.test(a)&&
4!isNaN(parseFloat(a))&&isFinite(a)},isPassword:function(a){return(new RegExp(g)).test(a)},isStringWithContent:function(a){return"string"===typeof a&&a.trim().length}},Search:{addClearEventListener:function(a){function b(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var c=b()+b();h[c]=a;return c},removeClearEventListener:function(a){h[a]=void 0},emitClearEvent:function(){for(var a in h)try{h[a]()}catch(b){}}},Util:{eventPreventer:function(a){a&&"object"===typeof a.target&&
5a.target&&a.preventDefault()},firstEditableElementInContainer:function(a){return $(a).find("input:visible").filter("[type=text],[type=email],[type=tel],[type=password]").first()},getParameterByName:function(a,b){var c=RegExp("[?&]"+a+"=([^&]*)").exec(window.location.search),c=c&&decodeURIComponent(c[1].replace(/\+/g," "));return null===c&&void 0!=b?b:c},getParameterByNameEmptyString:function(a){return this.getParameterByName(a,"")},getQueryStringAsObject:function(){var a={};window.location.search.replace(RegExp("([^?=&]+)(=([^&]*))?",
6"g"),function(b,c,d,f){a[c]=f});return a},hasjQuery:function(){return"function"===typeof jQuery?!0:!1},logout:function(a){if(1===j2w.Args.get("siteTypeId")){var b=j2w.Args.get("ssoUrl")+"/career?company="+j2w.Args.get("ssoCompanyId")+"&login_ns=logout&loginFlowRequired=true";$.ajax({url:b,dataType:"jsonp",error:function(a){},success:function(a){}})}j2w.Util.logoutCall(a)},logoutCall:function(a){var b=Math.floor(999999999*Math.random());$.ajax({type:"GET",url:"/services/security/logout",data:{logoutToken:b},
7dataType:"json",error:function(a){},success:function(c){"function"===typeof a&&a(c)}})},needToSwitchToSSL:function(){return-1===("https:"===document.location.protocol?1:-1)&&!0===j2w.Args.get("useSSL")},networkMap:function(a){switch(a){case "li":return"linkedin";case "xi":return"xing";case "sk":return"seek";case "gp":return"googleplus";case "tw":return"twitter";default:return""}},recoverFromAjaxError:function(a,b,c){a&&a.statusText&&"abort"!==a.statusText&&(window.j2w.applyInProgress=!1,"string"===
8typeof b&&b.length?alert(b.unescapeHTML()):404==a.status?(alert(jsStr.pageexpiredmessage.unescapeHTML()),window.location.reload()):alert(jsStr.tcsorrygenericerror.unescapeHTML()));"function"===typeof c&&c()},removeQueryStringParameter:function(a,b){b||(b=window.location.href);var c=b.split("#"),d=new RegExp("([?&])"+a+"=.*?(&|#|$)","ig");c[0].match(d)&&(b=c[0].replace(d,"$1"),b=b.replace(/([?&])$/,""),"undefined"!==typeof c[1]&&null!==c[1]&&(b+="#"+c[1]));return b},resetPassword:function(a,b){$.ajax({type:"POST",
9url:"/services/security/getpassword",data:{email:a},dataType:"json",error:function(a){},success:function(a){"function"===typeof b&&b(a)}})},truncateWithEllipsis:function(a,b,c){a="undefined"===typeof a?"":a;b="undefined"===typeof b?25:b;c="undefined"===typeof c?"\u2026":c;return a.length>b?a.substring(0,b).trim()+c:a},getCheckCookie:function(){try{document.cookie="cookietest=1";var a=-1!=document.cookie.indexOf("cookietest=");document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";return a}catch(b){return!1}}}}}();
10$.extend({redirectPost:function(e,d){var g=$("<form></form>");g.attr("method","post");g.attr("action",e);$.each(d,function(d,e){var a=$("<input></input>");a.attr("type","hidden");a.attr("name",d);a.attr("value",e);g.append(a)});$(g).appendTo("body").submit()}});String.prototype.unescapeHTML=function(){return j2w.Util.hasjQuery()?$("<div>"+this+"</div>").html():this.toString()};
11String.prototype.format=function(){for(var e=this,d=arguments.length;d--;)e=e.replace(new RegExp("\\{"+d+"\\}","gm"),arguments[d]);return e};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.