PageSourceSearch

https://cwm.1001hobbies.com/js/na/na/u/77497d112f.js

js 1001hobbies.com collected 2026-10-09 18:15:05 UTC 17,542 bytes, 39 lines download raw bytes

1/*
2 v1.19.1712227741
3 @preserve TRK_HOST        : 'cwm.1001hobbies.com'
4 @preserve TRK_FIRST_PARTY : '1'
5*/
6'use strict';(function(e,r){var t=e.console&&e.console.log?e.console:{log:function(){}};if(e.hasOwnProperty("KWKUniJS"))return t.log("KWKUniJS still loaded"),!1;var w=!1;var p="cwm.1001hobbies.com";var x="";var u="1";var y="C0003";var v=!1;var m={gdpr:null,gdpr_kwk:null,gdpr_consent:null};var z={};var A=function(){};A.prototype={encode:e.encodeURIComponent||e.escape,isDefined:function(a){return void 0!==a&&null!==a},isFunction:function(a){return"function"===typeof a},isString:function(a){return"string"===
7typeof a},isObject:function(a){return null!==a&&"object"===typeof a},isNumber:function(a){return"number"===typeof a||!isNaN(a)&&"string"===typeof a&&0<a.length},isArray:function(a){return a.constructor===Array},printCurrentDate:function(){return(new Date).toLocaleString()},stringify:function(a){if(!this.isObject(a)||null===a)return"";if(this.isObject(e.JSON)&&this.isFunction(e.JSON.stringify))return e.JSON.stringify(a);var b=[];var c="";for(b in a){var d=a[b];this.isString(d)?d='"'+d+'"':this.isObject(d)&&
8null!==d&&(d=this.stringify(d));c+='"'+b+'":'+d}return"{"+c+"}"},fetchParamFromURI:function(a,b=null){b||(b=e.location.href);a=a.replace(/[\[\]]/g,"\\$&");return(a=(new RegExp("[?&]"+a+"(=([^&#?]*)|&|#|$)")).exec(b))?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null},fetchProtocol:function(){var a;var b=e.location.protocol;if("https:"!==b){var c=RegExp("/^(http:|https:)cwm.1001hobbies.com/script.js$/");var d=e.document.getElementsByTagName("script");for(a=0;a<d.length;a++)if(b=c.exec(d[a].src),
9this.isObject(b))return b[1]}return"https:"},isRemote:function(){var a;var b=RegExp("^(http|https)://cwm.1001hobbies.com/v/js/na/na/u/([\\w\\d]{10}).js$");var c=e.document.getElementsByTagName("script");for(a=0;a<c.length;a++)if(b.test(c[a].src))return!0;return!1},sendRequest:function(a,b,c,d,f,n,l){try{var g=e.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");"GET"===a.toUpperCase()&&0<c.length&&(b+="?"+c);g.open(a,b,!0);this.tools.isObject(d)&&Object.keys(d).map(function(h){g[h]=
10d[h]});g.onreadystatechange=function(){3<g.readyState&&(200===parseInt(g.status)||204===parseInt(g.status)?f(g):n(g))};"POST"===a.toUpperCase()&&g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.setRequestHeader("X-Requested-With","XMLHttpRequest");g.setRequestHeader("X-KWKunijs-Version",(this.tools.isRemote()?"r":"")+"v1.19.1712227741");l&&g.setRequestHeader("X-KWKunijs-Debug",1);g.send(c)}catch(h){return t.log(h),!1}return g},createPixel:function(a){a+=(a.split("?")[1]?"&":
11"?")+"kwkujs=1&kwkujsv="+(this.tools.isRemote()?"r":"")+encodeURIComponent("v1.19.1712227741");var b=e.document.createElement("img");b.setAttribute("src",a);b.setAttribute("width","1px");b.setAttribute("height","1px");e.document.body.appendChild(b);this.debug('trkpix "'+a+'" appended to DOM')},documentReady:function(a){"loading"!=r.readyState?a():r.addEventListener?r.addEventListener("DOMContentLoaded",a):a()}};"function"!==typeof Array.prototype.push&&(Array.prototype.push=function(a){this[this.length]=
12a;return this.length});var B=function(){};B.prototype={setCookie:function(a,b,c=60){isNaN(c)&&(c="30");if(!this.tools.isDefined(a)||!this.tools.isDefined(b)||isNaN(c))return!1;var d=new Date;d.setTime(d.getTime()+864E5*c);e.document.cookie=a+"="+b+"; SameSite=None; Secure; expires="+d.toUTCString()+"; path=/";this.debug('store cookie : "'+a+"="+b+"; expires="+d.toUTCString()+'; path=/"');return!0},getCookie:function(a){var b=e.document.cookie.split(";");var c=a+"=";for(a=0;a<b.length;a++){var d=b[a];
13var f=d.indexOf(c);if(-1!==f)return d.substring(f+c.length)}return null},isLSReady:function(){try{return e.localStorage.setItem("__storage_test__","__storage_test__"),e.localStorage.removeItem("__storage_test__"),!0}catch(a){return a instanceof DOMException&&(22===a.code||1014===a.code||"QuotaExceededError"===a.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.name)&&e.localStorage&&0!==e.localStorage.length}},setLSData:function(a,b,c=60){isNaN(c)&&(c="30");var d=(new Date).getTime();c=(new Date(d+864E5*c)).getTime();
14try{return e.localStorage.setItem(a,b),e.localStorage.setItem(a+"t",c),this.debug("store "+a+"="+b+" and "+a+"t="+c+" in localstorage"),!0}catch(f){this.debug("unable to access localstorage",f)}}
14,getLSData:function(a){if(this.isLSReady())return[e.localStorage.getItem(a),parseInt(e.localStorage.getItem(a+"t"))]}};var C=function(){};C.prototype={tools:new A,storage:new B,cmpWait:e.hasOwnProperty("KWKcmpWait")&&0<e.KWKcmpWait?parseInt(e.KWKcmpWait):1E3,isEnvDebug:function(){"undefined"===typeof this.KWKDebug&&
15(this.KWKDebugLevel=parseInt(this.storage.getCookie("kwkdebug")),this.KWKDebug=0<Math.abs(this.KWKDebugLevel));return this.KWKDebug},debugDoAction:function(){return!this.isEnvDebug()||this.isEnvDebug()&&-1!==this.KWKDebugLevel},debug:function(a,b){this.isEnvDebug()&&(t.log("KWK-UNIJS-DEBUG v1.19.1712227741 l"+this.KWKDebugLevel+" - "+this.tools.printCurrentDate()+" : "+a),this.tools.isDefined(b)&&t.log(b))},buildTrkUrl:function(a){var b=this.tools.fetchProtocol();a=this.tools.isDefined(a.event)&&
160<a.event.length?"":x;return b+"//"+p+"/"+a},buildTrkMandatoryArgs:function(a){var b;var c="";var d=this.tools.isDefined(a.event)?["event"]:["mclic"];if(0<d.length){if(!this.tools.isArray(d))return this.debug("unable to build conv url, missing mandatory args"),!1;for(b=0;b<d.length;b++){if(!a.hasOwnProperty(d[b])||!this.tools.isDefined(a[d[b]]))return this.debug('unable to build conv url : mandatory arg "'+d[b]+'" is missing'),!1;c+=(""===c?"":"&")+(1==u&&"mclic"===d[b]?"":d[b]+"=")+a[d[b]];delete a[d[b]]}}else for(b=
170;b<a.length;b++)c+=(""===c?"":"&")+a[b]+"="+a[b];this.isEnvDebug()&&(c+=(""===c?"":"&")+"__nadebug=1");return c},buildTrkUnivParam:function(a){var b=this.getUniv();return this.tools.isDefined(b)&&0<b.length?(""===a?"":"&")+"kwkuniv="+b:""},buildPtagUrl:function(a,b){return this.tools.fetchProtocol()+"//cwm.1001hobbies.com/u/"+a%41+"/p"+a+(this.tools.isDefined(b)?b:"")+".js"},watch:function(){this.isEnvDebug()&&this.debug("uniJS "+(this.tools.isRemote()?"r":"")+"v1.19.1712227741");this.debug("start watching for kwkuniv");
18var a=this.tools.fetchParamFromURI("kwkuniv");this.tools.isDefined(a)?(this.debug('kwkuniv catched with value "'+a+'" from "'+e.location.href+'"'),this.debugDoAction()&&(this.storage.setCookie.call(this,"kwku",a)&&this.debug("kwkuniv stored in cookie kwku"),this.storage.setLSData.call(this,"kwkuls",a)&&this.debug("kwkuniv stored in localstorage kwkuls"))):this.debug("no kwkuniv catched");this.tools.isDefined(e.kwkgtm)&&this.gtmCall(e.kwkgtm)},gtmCall:function(a){w=!0;this.debug("gtmCall with following params: ",
19a);u=this.tools.isDefined(a.trkdomain)&&a.trkdomain!==p;p=this.tools.isDefined(a.trkdomain)?a.trkdomain:p;x=u?"":x;var b=this.tools.isDefined(a.trktype)?a.trktype:"conv";var c=this.tools.isDefined(a.progid)?a.progid:0;var d=this.tools.isDefined(a.mclic)&&0<a.mclic.length||"clicktime"===b&&0<c;var f=this.tools.isDefined(a.ptag)&&a.ptag;delete a.trkdomain;delete a.trktype;delete a.progid;d&&("dclick"===b?this.dclick(a):"clicktime"===b?this.clicktime(c):this.conversion(a));f&&0<c&&this.injectPtag([c])},
20doTrk:function(a){var b=1==u,c=parseInt(this.storage.getCookie("kwkcmpwait"));0<c&&(this.cmpWait=1E3*c);this.tools.documentReady(function(){this.iabCmpReady()?this.IABConsentCheck.call(this):this.axeptioCmpReady()?this.AxeptioConsentCheck.call(this):this.onetrustNonIabCmpReady()?this.OnetrustConsentCheck.call(this):(this.debug("no compatible CMP detected so far."),0<this.cmpWait&&(this.debug("Wait "+this.cmpWait+"ms before final CMP check."),setTimeout(function(){this.iabCmpReady()?this.IABConsentCheck.call(this):
21this.axeptioCmpReady()?this.AxeptioConsentCheck.call(this):this.onetrustNonIabCmpReady()?this.OnetrustConsentCheck.call(this):this.debug("no compatible CMP detected after "+this.cmpWait+"ms waiting delay.")}.bind(this),this.cmpWait)));var d=function(){b?this.fetchKwkCookies(a,m):a(m)};0<this.cmpWait&&!v?e.setTimeout(d.bind(this),this.cmpWait+200):d.call(this)}.bind(this))},conversion:function(a){var b;a.hasOwnProperty("onetrustKwankoCategoryId")&&"string"===typeof a.onetrustKwankoCategoryId&&(y=a.onetrustKwankoCategoryId,
22delete a.onetrustKwankoCategoryId);var c={};Object.keys(a).map(function(h){"undefined"===typeof a[h]||"undefined"===a[h]||null==a[h]||"string"===typeof a[h]&&0==a[h].length?(b=e.hasOwnProperty("KWKDefaults")&&e.KWKDefaults.hasOwnProperty(h)?e.KWKDefaults[h]:z.hasOwnProperty(h)?z[h]:void 0,"undefined"!==typeof b&&(c[h.toLowerCase()]=encodeURIComponent(b))):c[h.toLowerCase()]=a[h]});var d=w||this.tools.isDefined(c.altid)&&0<c.altid.length;var f=this.buildTrkUrl.call(this,a);var n=function(h){var k=
23this.buildTrkMandatoryArgs.call(this,h);if(!1===k)return!1;Object.keys(h).map(function(q){this.tools.isArray(h[q])?h[q].forEach(function(D){k+=(""===k?"":"&")+q+"[]="+D}):k+=(""===k?"":"&")+q+"="+h[q]}.bind(this));w&&this.tools.isDefined(h.kwkuniv)||(k+=this.buildTrkUnivParam.call(this,k));return k}.call(this,c);if(!f||!n)return this.debug('FAILED to build conv url "'+f+'" and/or args "'+n+'"'),!1;var l=f+"?"+n;var g=function(h){this.tools.isObject(h)&&0<Object.keys(h).length&&h.constructor===Object&&
24Object.keys(h).forEach(k=>{"undefined"===typeof h[k]||null==h[k]||"string"===typeof h[k]&&0==h[k].length||(n+=(""===n?"":"&")+k+"="+h[k],l+=(""===l?"":"&")+k+"="+h[k])});this.debugDoAction()&&(d?(this.tools.createPixel.call(this,l),this.debug("trk conversion forced with pixel")):(this.debug((this.debugDoAction()?"trigger ":"should trigger ")+'conversion call on "'+l+'"'),this.tools.sendRequest.call(this,"POST",f,n+(0<n.length?"&":"")+"kwkujs=2",{withCredentials:!0},function(k){k.status&&200===parseInt(k.status)?
25this.debug("trk conversion call returned OK"):k.status&&204===parseInt(k.status)?this.debug("trk conversion call returned NOK"):(this.debug("unexpected return status for trk conversion call using xhr",k),this.tools.createPixel.call(this,l),this.debug("trk conversion with pixel fallback"))}.bind(this),function(k){this.debug("trk conversion call failed using xhr",k);this.tools.createPixel.call(this,l);this.debug("trk conversion with pixel fallback")}.bind(this),this.isEnvDebug())))}.bind(this);this.doTrk(g);
26return!0},clicktime:function(a){var b=this.tools.fetchProtocol()+"//cwm.1001hobbies.com/na/na/res/trk/script-ct.js";if(this.debugDoAction()){var c=function(d){d=e.document.createElement("script");d.setAttribute("src",b);d.setAttribute("type","text/javascript");d.onload=function(){new __trknanact(a);this.debug("ctime call fired for p"+a)}.bind(this);e.document.getElementsByTagName("body")[0].appendChild(d)}.bind(this);this.doTrk(c);return!0}this.debug('SHOULD append ctime url "'+b+'" to DOM for p'+
27a+' and trigger call "__trknanact('+a+')"')},dclick:function(a){var b={};Object.keys(a).map(function(l){"undefined"!==typeof a[l]&&0!=a[l].length&&(b[l.toLowerCase()]=a[l])});var c=this.buildTrkUrl.call(this,b);var d=this.buildTrkMandatoryArgs.call(this,b);if(!1===d)return!1;d+=this.buildTrkUnivParam.call(this,d);if(!c||!d)return this.debug('FAILED to build dclick url "'+c+'" and/or dclick args "'+d+'"'),!1;c+="?"+d;var f=c+"?"+d;var n=function(l){this.tools.isObject(l)&&0<Object.keys(l).length&&
28l.constructor===Object&&Object.keys(l).forEach(g=>{d+=(""===d?"":"&")+g+"="+l[g];f+=(""===f?"":"&")+g+"="+l[g]});this.tools.isDefined(b.redir)&&0<b.redir.length?(this.debug('Dclick asked with redir to "'+b.redir+'"'),d+="&redir="+encodeURIComponent(b.redir),f+="&redir="+encodeURIComponent(b.redir),this.debug('Final redir url is "'+f+'"'),this.debugDoAction()?e.location.replace(f):this.debug('SHOULD fire dclick redirection to trk url "'+f+'"')):this.debugDoAction()?this.tools.sendRequest.call(this,
29"POST",c,d+(0<d.length?"&":"")+"kwkujs=2",{withCredentials:!0},function(g){g.status&&200===parseInt(g.status)?this.debug("trk dclick call returned OK"):g.status&&204===parseInt(g.status)?this.debug("trk dclick call returned NOK"):(this.debug("unexpected return status for dclick call using xhr",g),this.tools.createPixel.call(this,f),this.debug("trk dclick with pixel fallback"))}.bind(this),function(g){this.debug("trk dclick call failed using xhr",g);this.tools.createPixel.call(this,f);this.debug("trk dclick with pixel fallback")}.bind(this),
30this.isEnvDebug()):this.debug('SHOULD fire dclick url "'+f+'" or add it as pixel in the current page.')}.bind(this);this.doTrk(n);return!0},ptag:function(a){this.tools.isDefined(a)&&this.tools.isDefined(Object.keys(a))&&0<Object.keys(a).length&&(this.debug("set following args in window.ptag_params :",a),e.ptag_params=a);var b=function(c){c=this.tools.isString(c)?JSON.parse(c):c;this.tools.isArray(c)&&0!=c.length?this.debug(c.length+" progs loaded from setup : "+c):(c=["74267"],this.debug("init prog list from default prog 74267"));
31this.injectPtag.call(this,c)}.bind(this);fetch(this.buildPtagUrl.call(this,"74267","u")).then(c=>c.json()).then(c=>{b(c)});return!0},injectPtag:function(a){var b;for(b=0;b<a.length;b++){var c=this.buildPtagUrl.call(this,a[b]);if(!this.tools.isDefined(c)||0===c.length){this.debug("Unable to build PTag url for p"+a[b]);break}if(this.debugDoAction()){var d=e.document.createElement("script");d.src=c;e.document.body.appendChild(d);this.debug('Ptag url "'+c+'" appended to DOM')}else this.debug('SHOULD append Ptag url "'+
32c+'" to current page.')}},fetchKwkCookies:function(a,b){var c=function(d,f,n){var l=new Date;
32Object.keys(d).forEach(function(g){var h=void 0!==d[g][0]&&null!==d[g][0]?d[g][0]:"";var k=void 0!==d[g][1]&&null!==d[g][1]?parseInt(d[g][1]):"30";l.setTime(l.getTime()+864E5*k);e.document.cookie=g+"="+h+";expires="+l.toGMTString()+";path=/;domain="+p.substring(p.indexOf(".",0))});f.call(this,n)};this.tools.sendRequest.call(this,"POST",this.tools.fetchProtocol()+"//action.metaffiliation.com/kwkc.php","",{withCredentials:!0},
33function(d){d.status&&200===parseInt(d.status)?(d=JSON.parse(d.response),this.tools.isObject(d)&&(c.call(this,d,a,b),this.debug("kwk cookies successfully fetched"))):(this.debug("xhr call returned error status code",d),a.call(this,b))}.bind(this),function(d){this.debug("unable to fetch trk cookie using xhr",d);a.call(this,b)}.bind(this),this.isEnvDebug());return!0},IABConsentCheck:function(){try{__tcfapi("addEventListener",2,function(a,b){b?(this.debug("IAB cmp callback successfully triggered with status "+
34a.eventStatus+" and Kwanko consent "+("undefined"!==typeof a.vendor.consents&&a.vendor.consents[702]?a.vendor.consents[702]:"na")),2==this.KWKDebugLevel&&this.debug("Dumping IAB tcData object :",a),m.gdpr="undefined"===typeof a.gdprApplies?"2":a.gdprApplies?"1":"0",m.gdpr_kwk="undefined"===typeof a.vendor.consents||"undefined"===typeof a.vendor.consents[702]?"2":a.vendor.consents[702]?"1":"0",m.gdpr_consent="string"===typeof a.tcString&&0<a.tcString.length?"iabtcfv2_"+a.tcString:"",v=!0,this.debug("GDPR params loaded from IAB cmp: ",
35m),__tcfapi("removeEventListener",2,c=>{},a.listenerId)):b||this.debug("tcf API failed to fetch consent")}.bind(this))}catch(a){this.debug("exception catched from CMP provider, unable to fetch consent",a)}},AxeptioConsentCheck:function(){try{e._axcb=e._axcb||[],e._axcb.push(function(a){a.on("cookies:complete",function(b){this.debug("Axeptio cmp callback successfully triggered.");2==this.KWKDebugLevel&&this.debug("Dumping Axeptio SDK object :",b);if("object"===typeof b&&b.hasOwnProperty("kwanko")){var c=
36{id:a.settings.clientId,tsnow:Date.now(),publishedAt:a.config.publishedAt,vendors:b};m.gdpr="1";m.gdpr_kwk=!0===b.kwanko?"1":!1===b.kwanko?"0":"2";m.gdpr_consent="axeptio_"+btoa(JSON.stringify(c));v=!0;this.debug("GDPR params loaded from Axeptio cmp : ",m)}}.bind(this),{replay:!0,once:!0})}.bind(this))}catch(a){this.debug("exception catched from Axeptio CMP, unable to fetch consent",a)}},OnetrustConsentCheck:function(){try{var a="string"==typeof e.OnetrustActiveGroups?OnetrustActiveGroups.split(",").map(f=>
37"string"==typeof f?f.trim():f).filter(f=>f):[];var b=y.split(",").filter(f=>f)||[];var c=r.cookie.match("(^|;)\\s*OptanonConsent\\s*=\\s*([^;]+)")?.pop()||"";var d=b.filter(f=>a.includes(f)).length==b.length&&0<b.length?"1":"0";this.debug("Onetrust non IAB cmp callback successfully triggered.");m.gdpr="1";m.gdpr_kwk=d;m.gdpr_consent=0<c.length?"onetrust_"+btoa(c):"onetrust_"+btoa(Date.now()+"_"+a.join("_"));v=!0;2==this.KWKDebugLevel&&(this.debug("Dumping Onetrust categories consent :"+a.join(",")),
38this.debug("Dumping Onetrust expected categories consent :"+b.join(",")),this.debug("Dumping Onetrust consent string fetched from OptanonConsent cookie :"+c));this.debug("GDPR params loaded from Onetrust non IAB cmp : "+JSON.stringify(m))}catch(f){this.debug("exception catched from OneTrust CMP, unable to fetch consent",f)}},getUniv:function(){var a=this.storage.getCookie("kwku");if(!this.tools.isDefined(a)||0>=a.length)a=this.storage.getLSData("kwkulskwkuniv")[0];return a},iabCmpReady:function(){return"function"===
39typeof e.__tcfapi},axeptioCmpReady:function(){return"object"===typeof e.axeptioSDK},onetrustNonIabCmpReady:function(){return"object"===typeof e.OneTrust&&"undefined"===typeof e.__tcfapi},cmpDetected:function(){return this.iabCmpReady()?"IAB cmp detected !":this.axeptioCmpReady()?"Axeptio cmp detected !":this.onetrustNonIabCmpReady()?"OneTrust non IAB cmp detected !":"no cmp detected."}};e.KWKUniJS=new C;e.KWKUniJS.watch()})(window,document);

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.