; ; ;var synalio=(function(){var a="1.12";var b="_rslgvry"; ; ;var g="left: auto;right: 0px;"; ; ;var c="z-index: 999999998;position:fixed; bottom: 0px;border: 0px;background: none;"+g;var i="height: 550px;";var e="height:52px;";var f="width:420px;"; ;var j;var k="4975b680348e40feab34ba50c4e478c1";var l=false;var m=false;var n=1;var o= 30;var p;var q=[];var r="カスタマーサポート";var s="https://s3-ap-northeast-1.amazonaws.com/rebot-line-resized/37/1e51347917024408bb4e567790711c3d.png/origin";var t=[];var u;var v;var w;var x;var y;var z;var A;var B;var C;var D=1;var E;var F;var G=[];var H=0;var I="";var J="メニューに戻る";var K={};var L="None";var M=(L!=='None')?JSON.parse(L.replace(/'/g,'"')):[];var N;var O="チェックを入れてください"; ; ; ;var S='
  • User Avatar

    @1

  • ';var T='
  • @1

  • ';var U='

    @1

    ';var V='
    ';var W='
  • @1
  • ';var X='
    ';var Y='
  • @1
  • ';var Z='
    ご利用ありがとうございます。
    よろしければ、今後の改善のため、オペレータに対する評価をお願いいたします。
    '; ;;var ac=[];var ad=11;var ae=30;var af= 0;var ag='';var ah= -1;function ai(a){var b=document.createElement('template');b.innerHTML=a;if(b.content)return b.content;else return b.firstElementChild;}function aj(a,b,c,d,e,f,g){if(!b){aE(ai(T.replace(/@1/g,a.replace(/\r?\n/g,'
    '))));aG(1);}if(F)clearTimeout(F);xhr=new XMLHttpRequest();xhr.onerror=ax;xhr.ontimeout=ax;xhr.open('POST','https://rebot.resola.ai/api/web');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(ay(a,c,d,e,f,g));xhr.onreadystatechange=av;}function ak(a,b){if(!a.match(/^https?:\/\//i))a='//'+a;window.open(a,b);}function al(){xhr_page=new XMLHttpRequest();xhr_page.onreadystatechange=ar;xhr_page.open('POST','https://rebot.resola.ai/api/web/4975b680348e40feab34ba50c4e478c1/move_page');xhr_page.setRequestHeader('Content-Type','application/json');var a={s:ag,title:x.title,url:location.href};if(bd()==1)a.demo=1;if(Object.keys(K).length>0)a.ext=K;xhr_page.send(JSON.stringify(a));}function am(a,b){if(bd()!=1){var c=new XMLHttpRequest();if(b)c.onreadystatechange=function(){if(c.readyState===4&&c.status===200)b();};c.open('POST','https://rebot.resola.ai/analytics/event');c.setRequestHeader('Content-Type','application/json');c.send(JSON.stringify(a));}}function an(a){var b='268'!='-1';if(!b)return;E=new XMLHttpRequest();E.onreadystatechange=aq;E.open('POST','https://rebot.resola.ai/api/web/4975b680348e40feab34ba50c4e478c1/chat_logs');E.setRequestHeader('Content-Type','application/json');E.send(JSON.stringify({s:a}));}function ao(a,b,c,d,e,f){xhr_state=new XMLHttpRequest();xhr_state.open('POST','https://rebot.resola.ai/api/web/4975b680348e40feab34ba50c4e478c1/auto_message');xhr_state.setRequestHeader('Content-Type','application/json');var g={s:a,state:b,response:c,reply:d,node:e,scenario_response:f};if(bd()==1)g.demo=1;xhr_state.send(JSON.stringify(g));}function ap(a){xhr_state=new XMLHttpRequest();xhr_state.open('POST','https://rebot.resola.ai/api/web/4975b680348e40feab34ba50c4e478c1/satisfaction_survey');xhr_state.setRequestHeader('Content-Type','application/json');xhr_state.send(JSON.stringify(a));}function aq(){switch(E.readyState){case 4:if(((200<=E.status&&E.status<300)||(E.status==304))&&E.responseText){var a=JSON.parse(E.responseText);ag=a.s;q=a.logs;if(a.is_rtchat)aN();aZ(a.is_rtchat); ;var c=2*365*24*60*60;x.cookie=aW(b+'='+ag+';max-age='+c+';path=/;'); ;if(q.length>0&&ah<0){l=true;if(H>0)aD();q.forEach(function(a){at(a);});var d=q[q.length-1];if((d.type==='bot'||d.type==='admin_user'||d.type==='end_user')&&d.buttons)aw(d); ;var e=aX('r_window');if(e==='on')synalio.toggle(0);else if(t.length>0)aY(); ;setTimeout(function(){ ;synalio.resize(u.offsetHeight); ;aG(1);},300);}else{ ;var f={'event_type':'page_start','event_data':{'unique_id':k,'user_id':ag}};am(f,function(){ ;});}al(); ;if(H==0){} ;H=0;}break;}}function ar(){switch(xhr_page.readyState){case 4:if(((200<=xhr_page.status&&xhr_page.status<300)||(xhr_page.status==304))&&xhr_page.responseText){var a=JSON.parse(xhr_page.responseText);ag=a.s; ;if(a.reserve)F=setTimeout(function(){var b={'event_type':'chat_opened','event_data':{'unique_id':k,'user_id':ag}};am(b);as(a.reserve,ag);},a.reserve.time*1000); ;}break;}}function as(a,b){aA(); ;aB(); ;for(var d=0;d');if(a.type==='end_user')aE(ai(T.replace(/@1/g,msg)));else if(a.type==='bot')if(b){aE(ai(Y.replace(/@1/g,a.text).replace(/@2/g,'input')));ac.push('input');}else aE(ai(S.replace(/@2/g,r).replace(/@3/g,s).replace(/@1/g,msg)));else if(a.type==='admin_user'){var c=a.sender?a.sender:r;var d=a.sender_image?a.sender_image:s;aE(ai(S.replace(/@2/g,c).replace(/@3/g,d).replace(/@1/g,msg)));if(!a.is_read)t.push(a.msg_id);}}function au(a){var b={};var c=a.elements;for(var d=0;d=2){aE(ai(Y.replace('@1',b.replace(g[0],'')).replace(/@2/g,g[1])));ac.push(g[1]);}else aE(ai(S.replace(/@2/g,r).replace(/@3/g,s).replace(/@1/g,b)));if(e==d.length)aG(1);d.shift();f=0;}if(d.length==0){aw(c);synalio.onCompleteWriteMessage(JSON.parse(xhr.responseText));return;}setTimeout(function(){l();},a);}}break;}}function aw(a){var b=0;if(a.buttons&&a.buttons.length>0){var c=[];var d=a.reply_deco||[];var e=0;for(var f=0;fe)g=d[e];e++;var h=a.buttons[f].img?a.buttons[f].img:a.buttons[f].label.replace(/"/g,'"');var i=a.buttons[f].img?V:U;var j=a.buttons[f].url?a.buttons[f].url:a.buttons[f].msg.replace(/"/g,'"');var k=a.buttons[f].url&&a.buttons[f].url_target?a.buttons[f].url_target:'';c.push(i.replace(/@1/g,h).replace(/@2/g,j).replace(/@3/g,g).replace(/@4/g,k));}aE(ai(W.replace(/@1/g,c.join(''))));b=c.length;}else if(!a.no_button){var l=U.replace(/@1/g,J).replace(/@2/g,J).replace(/@3/g,'');if(ac.length==0){b++;aE(ai(W.replace(/@1/g,l)));}} ;}function ax(){var a="
  • 送信に失敗しました。
    ネットワーク接続をご確認いただくか、お時間おいて再度お試しください。
  • ";aE(ai(a));}function ay(a,b,c,d,e,f){if(!ag)ag=new Date().getTime().toString(16)+Math.floor(1000*Math.random()).toString(16);var g=[];var h=null;g.push("appid="+k);g.push("content="+encodeURIComponent(a));g.push("mode=web");g.push("s="+ag);if(bd()==1)g.push("demo=1");if(b)g.push("button=1");if(c)g.push("init=1");if(d)g.push("image="+d);if(d)g.push("mime_type="+e);if(Object.keys(K).length>0)g.push("ext="+JSON.stringify(K));if(ah!="")g.push("scenario_id="+ah);for(var i=0;i0)while(b.length>0)a.removeChild(b[0]);}function aB(){do{var a=ac.shift();if(a!=undefined)aC(a);}while(a!=undefined);}function aC(a){var b=w.getElementsByName(a);for(var c=0;c0){var c=loader[0].parentNode.parentNode;c.parentNode.removeChild(c);}b.appendChild(a);if(b.childElementCount>ae)b.removeChild(b.children[0]);}function aF(a){aA();var b=w.getElementsByClassName('synalio-chat-footer')[0];b.appendChild(a);}function aG(a){var b=w.getElementsByClassName("chat-message-body");if(b.length-a>=0){var c=b[b.length-a];var d=w.getElementsByClassName("synalio-chat-header")[0];var e=w.getElementsByClassName("synalio-chat-body")[0];smoothScr.stopShow();smoothScr.anim(c,e,d);}}var aH=function(a){a.preventDefault();};function aI(a){if(a===true)x.body.setAttribute('style',"position:fixed;overflow:hidden;width:100%;");else x.body.setAttribute("style","");}function aJ(a){if(a.target.scrollHeight>=a.target.offsetHeight)if(a.target.scrollHeight<2*o)a.target.style.height=a.target.scrollHeight+"px";else a.target.style.height=2*o+"px";else{var b;for(var e=0;e<=10;e++){b=Number(a.target.style.height.split("px")[0]);a.target.style.height=b-o+"px";if(a.target.scrollHeight>a.target.offsetHeight){if(a.target.scrollHeight>o)a.target.style.height=a.target.scrollHeight+"px";else a.target.style.height=o+"px";break;}}} ;synalio.resize(u.offsetHeight); ;}function aK(a){var b=w.getElementsByClassName('synalio-chat-window')[0];if(b.style.display=='none')return;var c=parseInt('550px');if(a.innerHeight'))));aG(1);t.push(b.msg_id);if(x.hasFocus())aU();aY();aZ(true);}G.forEach(function(a){clearTimeout(a);});}function aQ(){console.log('WS connected');if(H>0)an(ag);aU();}function aR(){H++;if(H<50)setTimeout(function(){aN();},(H-1)*5000);}function aS(a){var b=null;var c=0;for(i=0;i0){var a=w.getElementById('synalio-chat-window-notice-badge');a.innerHTML=t.length;a.style.display='block';} ;}function aZ(a){if(a){w.getElementById('synalio-chat-footer-rtchat').style.display='block';w.getElementById('home-icon').className+=' synalio-home-disable'; ;}else{w.getElementById('synalio-chat-footer-rtchat').style.display='none';var b=w.getElementById('home-icon');b.className=b.className.replace('synalio-home-disable',''); ;} ;}function bc(a){if(a!==undefined&&a!=null){var b='http://';var c='https://';var d=a.replace(/\[.+\]/g,'');if((d.length>b.length&&d.substr(0,b.length)==b)||(d.length>c.length&&d.substr(0,c.length)==c))return true;}return false;}function bd(){var a=af;var b=x.getElementById('synalio-demo');if(b)try{a=parseInt(b.value);}catch(c){console.log(c);}return a;}smoothScr={iterr:20,tm:null,step:null,lastScrollTop:null,stopShow:function(){clearTimeout(this.tm);this.iterr=30;},anim:function(a,b,c){var d=c.offsetHeight;var e=window.navigator.userAgent;var f=e.indexOf('Trident/');var g=0;if(f>0){var h=e.indexOf('rv:');g=parseInt(e.substring(h+3,e.indexOf('.',h)),10);}if(f>0&&g==11&&window.parent)d=0;var i=(a.offsetTop-d-b.scrollTop)/5.0;b.scrollTop+=i;if(this.iterr>1)this.iterr-=1;else this.itter=0;if(this.lastScrollTop!=b.scrollTop&&i>1&&b.scrollTop'; ;aj('画像受信',true,false,false,b,c);aE(ai(T.replace(/@1/g,d)));},onPressGoHome:function(){if(!aM())aj(J,true,true,null,null,null,{'home':1});},onCompleteWriteMessage:function(a){},onCompleteToggle:function(a){},onCompleteLoad:function(){},resize:function bf(a){A.style.height=(a-z.offsetHeight-B.offsetHeight)+"px";},onFormChanged:function(a){if(!a||a.nodeName!=="FORM")return;var b,c,d=[],e={},f={},g={};for(b=a.elements.length-1;b>=0;b=b-1){if(a.elements[b].name==="")continue;if(a.elements[b].nodeName=='INPUT'){var h=a.elements[b].getAttribute('type');if(h=='checkbox'){if(!(a.elements[b].name in e))e[a.elements[b].name]=[];if(a.elements[b].checked)e[a.elements[b].name].push(a.elements[b].value);if(N){N.setCustomValidity('');N=null;}}else if(h=='radio'){if(!(a.elements[b].name in g))g[a.elements[b].name]='';if(a.elements[b].checked)g[a.elements[b].name]=a.elements[b].value;}else d.push(a.elements[b].name+"="+a.elements[b].value);}else if(a.elements[b].nodeName=='TEXTAREA')d.push(a.elements[b].name+"="+a.elements[b].value);else if(a.elements[b].nodeName=='SELECT'){if(a.elements[b].type=='select-one')d.push(a.elements[b].name+"="+a.elements[b].value);else if(a.elements[b].type=='select-multiple'){if(!(a.elements[b].name in f))f[a.elements[b].name]=[];for(c=a.elements[b].options.length-1;c>=0;c=c-1)if(a.elements[b].options[c].selected)f[a.elements[b].name].push(a.elements[b].value);}}else if(a.elements[b].nodeName=='BUTTON'){var h=a.elements[b].getAttribute('type');if(h=='button')d.push(a.elements[b].name+"="+a.elements[b].value);}}for(var i in e)d.push("checkbox_"+i+"="+JSON.stringify(e[i]));for(var j in f)d.push("selectbox_"+j+"="+JSON.stringify(f[j]));for(var k in g)d.push(k+"="+g[k]);var l=d.join("&");w.getElementById(a.getAttribute('name')+'-form-data').value=l;},onSubmitForm:function(a){var b=a.getAttribute("form-name");var c=w.getElementById(b);if(!c||!aS(c)||!c.checkValidity())return aT(c);var d=a.getAttribute("form-data-id");var e=w.getElementById(d).value;if(!e||e===''){synalio.onFormChanged(c);e=w.getElementById(d).value;}if(e){var f='##form:'+b+'##'+e;aj(f,true);aB();}aA();return false;},onFocusEvent:function(){aU();},showCSForm:function(){var a=w.getElementsByClassName("cs-rating");for(var b=0;b0)g[g.length-1].style.display='none';var h=w.getElementsByClassName("cs-rating-done");if(h.length>0)h[h.length-1].style.display='block';if(bd()==1)c.demo=1;ap(c);return false;},onTeijinImageClieck:function(a,b){ ;return; ;},isExceedFileSizeTeijin:function(a,b){ ;return false; ;},isTeijinUpload:function(){ ;return;},addExtVal:function(a,b){K[a]=b;}};})();var synalioWindow=window.parent?window.parent:window;if(document.readyState=='complete')synalio.onLoadEvent();else synalioWindow.addEventListener('load',synalio.onLoadEvent,true);synalioWindow.addEventListener('focus',synalio.onFocusEvent);