(function(){var e=function(){this.initialize.apply(this,arguments)};e.prototype={initialize:function(c){for(var a in c)this[a]=c[a];this.namespaceRoot=this.getNamespaceObject(c.NAMESPACE);for(a in c)switch(a){case "NAMESPACE":case "AUTHOR":case "VERSION":case "REQUIRES":continue;default:if(typeof this.namespaceRoot[a]=="undefined")this.namespaceRoot[a]=c[a]}this.namespaceRoot.info=c.NAMESPACE+", version: "+c.VERSION+", by "+c.AUTHOR},getNamespaceObject:function(c){c=c.split(".");for(var a=window,
b=0,d=c.length;b<d;b++){if(typeof a[c[b]]=="undefined")a[c[b]]={};a=a[c[b]];if(b==d-1)return a}}};e.Class=function(){var c={_listeners:{},extend:function(a){var b=function(){this.initialize.apply(this,arguments)};for(var d in this)b.prototype[d]=this[d];for(d in a)b.prototype[d]=a[d];for(d in c)b.prototype[d]=c[d];return b},addEventListener:function(a,b){if(typeof this._listeners[a]=="undefined")this._listeners[a]=[];this._listeners[a].push(b)},addEventListenerWithScope:function(a,b,d,h){var f=[];
f.push.apply(f,arguments);a=f.shift();if(typeof this._listeners[a]=="undefined")this._listeners[a]=[];b=f.shift();if(typeof b!="function")throw new Error("\u30ea\u30b9\u30ca\u95a2\u6570\u304c\u6b63\u3057\u304f\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093");d=f.shift();h=f.shift();if(typeof this._listeners[a]=="undefined")this._listeners[a]=[];this._listeners[a].push(function(){return b.apply(d,f)})},fire:function(){var a=[];a.push.apply(a,arguments);var b=a[0];if(typeof b=="string")b=
{type:b};if(!b.target)b.target=this;if(!b.type)throw new Error("Event object missing 'type' property.");if(this._listeners[b.type]instanceof Array){b=this._listeners[b.type];for(var d=0,h=b.length;d<h;d++)b[d].apply(this,a)}},removeEventListener:function(a,b){if(this._listeners[a]instanceof Array){a=this._listeners[a];for(var d=0;d<lenl;d++)if(a[d]===b){a.splice(d,1);break}}}};return function(){for(var a in c)this[a]=c[a];typeof this.initialize=="function"&&this.initialize.apply(this,arguments)}};
var g=e.Class();g.prototype={initialize:function(c){this.src=c.src||-1;if(!this.src)throw new Error("to load script, it must be requires `src` options in arguments");this.allowLoadWithSameUrl=c.allowLoadWithSameUrl||-1}};var i={NAMESPACE:"jp.atlantis.base",VERSION:1,AUTHOR:"ATLANTIS"};i.Module=e;i.ScriptLoader=g;new e(i);e=jp.atlantis.base.Module;g={NAMESPACE:"jp.atlantis.arecibo",VERSION:2.4,AUTHOR:"ATLANTIS"};g.tracker=e.Class();g.tracker.prototype={test:false,protocol:"http",type:"sp_conv",format:"js",
next_url:false,conf:{sp_conv:{host:"sp.conv.adlantis.jp",jsonendpoint:"/sp/conv",testOptions:{protocol:"http",host:"sp.www.adlantis.jp",jsonendpoint:"/ctt"}},sp_conv_ssl:{host:"sdlv.adlantis.jp",jsonendpoint:"/sp/conv",testOptions:{protocol:"http",host:"sp.www.adlantis.jp",jsonendpoint:"/ctt"}},pc_collect_uid:{host:"user-analysis.adlantis.jp",jsonendpoint:"/ad/collect_uid",testOptions:false}},initialize:function(c){for(var a in c)this[a]=c[a];if(this.type=="sp_conv"&&location.protocol=="https:"){this.type=
"sp_conv_ssl";this.protocol="https"}for(var b in this.conf[this.type])this[b]=this.conf[this.type][b];switch(this.type){case "sp_conv":case "sp_conv_ssl":if(navigator.userAgent.indexOf("iPhone")>0||navigator.userAgent.indexOf("Android")>0){window.SmartPhone=window.SmartPhone||(new jp.atlantis.alto.smartphone).detect();document.addEventListener("DOMContentLoaded",this.fnOnDOMContentLoaded(),true)}break;case "pc_collect_uid":switch(this.format){case "js":document.write('<script src="'+this.getURL()+
'" type="text/javascript"><\/script>');break;case "img":document.write('<img src="'+this.getURL()+'" alt="conversion_tracker" width="1" height="1" style="z-index:-9999;position:absolute;" />');break}break;default:break}},fnOnDOMContentLoaded:function(){SmartPhone.bindWithUserIdentifier(this.fnOnUUIDGet,this)},fnOnUUIDGet:function(){this.uuid=SmartPhone.uuid;callURL=this.getURL();if(this.debug&&this.debug=="alert")window.alert(callURL);else if(window.console&&this.debug&&this.debug=="console")console.log(callURL);
else this.debug&&this.debug=="prompt"&&window.prompt(decodeURIComponent("%E3%82%B3%E3%83%B3%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E9%80%81%E4%BF%A1%E5%85%88%E6%83%85%E5%A0%B1"),callURL);this.createScriptTag(callURL,this.next_url)},getURL:function(){if(this.test){for(var c in this.testOptions)this[c]=this.testOptions[c];this.tid=encodeURIComponent(this.tid)}c=this.getLinkSuffix();c.push(["output",this.format].join("="));return[this.protocol,"://",this.host,this.jsonendpoint,"?",c.join("&")].join("")},
getLinkSuffix:function(){if(this.type=="pc_collect_uid")var c=new Array(["img_id",this.tid].join("="));else{c=new Array(["tid",this.tid].join("="));c.push(["deviceClass",SmartPhone.deviceClass].join("="));c.push(["deviceFamily",SmartPhone.deviceFamily].join("="));c.push(["deviceOsVersion",SmartPhone.deviceOsVersion].join("="));c.push(["devicePixelRatio",SmartPhone.devicePixelRatio].join("="));c.push(["uuid",typeof this.uuid=="string"?this.uuid:""].join("="))}return c},createScriptTag:function(c,a){var b=
document.createElement("script");b.src=c;b.type="text/javascript";if(a){if(window.ActiveXObject)b.onreadystatechange=function(){if(b.readyState=="complete"||b.readyState=="loaded")window.location=a};else b.onload=function(){window.location=a};document.documentElement.appendChild(b);window.setTimeout(function(){window.location=a},3E3)}else document.documentElement.appendChild(b)}};new e(g)})();

