; ; ;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="93ce1bf7025d478387390e0f3d14f2a3";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/195/4f4db7aa44dd4703a8009e14fe3e1dfb.jpg/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 Q='
  • User Avatar

    @1

  • ';var R='
  • @1

  • ';var S='

    @1

    ';var T='
    ';var U='
  • @1
  • ';var V='
    ';var W='
  • @1
  • ';var X='
    ご利用ありがとうございます。
    よろしければ、今後の改善のため、オペレータに対する評価をお願いいたします。
    '; ;;var Z=[];var ab=11;var ac=30;var ad= 0;var ae='';var af= -1;function ag(a){var b=document.createElement('template');b.innerHTML=a;if(b.content)return b.content;else return b.firstElementChild;}function ah(a,b,c,d,e,f){if(!b){aC(ag(R.replace(/@1/g,a.replace(/\r?\n/g,'
    '))));aE(1);}if(F)clearTimeout(F);xhr=new XMLHttpRequest();xhr.onreadystatechange=at;xhr.onerror=av;xhr.ontimeout=av;xhr.open('POST','https://rebot.resola.ai/api/web');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(aw(a,c,d,e,f));}function ai(a,b){if(!a.match(/^https?:\/\//i))a='//'+a;window.open(a,b);}function aj(){xhr_page=new XMLHttpRequest();xhr_page.onreadystatechange=ap;xhr_page.open('POST','https://rebot.resola.ai/api/web/93ce1bf7025d478387390e0f3d14f2a3/move_page');xhr_page.setRequestHeader('Content-Type','application/json');var a={s:ae,title:x.title,url:location.href};if(Object.keys(K).length>0)a.ext=K;xhr_page.send(JSON.stringify(a));}function ak(a,b){if(ad!=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 al(a){var b='258'!='-1';if(!b)return;E=new XMLHttpRequest();E.onreadystatechange=ao;E.open('POST','https://rebot.resola.ai/api/web/93ce1bf7025d478387390e0f3d14f2a3/chat_logs');E.setRequestHeader('Content-Type','application/json');E.send(JSON.stringify({s:a}));}function am(a,b,c,d,e,f){xhr_state=new XMLHttpRequest();xhr_state.open('POST','https://rebot.resola.ai/api/web/93ce1bf7025d478387390e0f3d14f2a3/auto_message');xhr_state.setRequestHeader('Content-Type','application/json');xhr_state.send(JSON.stringify({s:a,state:b,response:c,reply:d,node:e,scenario_response:f}));}function an(a){xhr_state=new XMLHttpRequest();xhr_state.open('POST','https://rebot.resola.ai/api/web/93ce1bf7025d478387390e0f3d14f2a3/satisfaction_survey');xhr_state.setRequestHeader('Content-Type','application/json');xhr_state.send(JSON.stringify(a));}function ao(){switch(E.readyState){case 4:if(((200<=E.status&&E.status<300)||(E.status==304))&&E.responseText){var a=JSON.parse(E.responseText);ae=a.s;q=a.logs;if(a.is_rtchat)aJ();aU(a.is_rtchat);var c=2*365*24*60*60;x.cookie=aR(b+'='+ae+';max-age='+c+';path=/;');if(q.length>0&&af<0){l=true;if(H>0)aB();q.forEach(function(a){ar(a);});var d=q[q.length-1];if((d.type==='bot'||d.type==='admin_user'||d.type==='end_user')&&d.buttons)au(d); ;var e=aS('r_window');if(e==='on')synalio.toggle(0);else if(t.length>0)aT(); ;setTimeout(function(){ ;synalio.resize(u.offsetHeight); ;aE(1);},300);}else{ ;var f={'event_type':'page_start','event_data':{'unique_id':k,'user_id':ae}};ak(f,function(){ ;});}aj(); ;if(H==0){} ;H=0;}break;}}function ap(){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);ae=a.s; ;if(a.reserve)F=setTimeout(function(){var b={'event_type':'chat_opened','event_data':{'unique_id':k,'user_id':ae}};ak(b);aq(a.reserve,ae);},a.reserve.time*1000); ;}break;}}function aq(a,b){ay(); ;az(); ;for(var d=0;d');if(a.type==='end_user')aC(ag(R.replace(/@1/g,msg)));else if(a.type==='bot')if(b){aC(ag(W.replace(/@1/g,a.text).replace(/@2/g,'input')));Z.push('input');}else aC(ag(Q.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;aC(ag(Q.replace(/@2/g,c).replace(/@3/g,d).replace(/@1/g,msg)));if(!a.is_read)t.push(a.msg_id);}}function as(a){var b={};var c=a.elements;for(var d=0;d=2){aC(ag(W.replace('@1',b.replace(g[0],'')).replace(/@2/g,g[1])));Z.push(g[1]);}else aC(ag(Q.replace(/@2/g,r).replace(/@3/g,s).replace(/@1/g,b)));if(e==d.length)aE(1);d.shift();f=0;}if(d.length==0){au(c);synalio.onCompleteWriteMessage(JSON.parse(xhr.responseText));return;}setTimeout(function(){l();},a);}}break;}}function au(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?T:S;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));}aC(ag(U.replace(/@1/g,c.join(''))));b=c.length;}else if(!a.no_button){var l=S.replace(/@1/g,J).replace(/@2/g,J).replace(/@3/g,'');if(Z.length==0){b++;aC(ag(U.replace(/@1/g,l)));}} ;}function av(){var a="
  • 送信に失敗しました。
    ネットワーク接続をご確認いただくか、お時間おいて再度お試しください。
  • ";aC(ag(a));}function aw(a,b,c,d,e){if(!ae)ae=new Date().getTime().toString(16)+Math.floor(1000*Math.random()).toString(16);var f=[];var g=null;f.push("appid="+k);f.push("content="+encodeURIComponent(a));f.push("mode=web");f.push("s="+ae);if(ad==1)f.push("demo=1");if(b)f.push("button=1");if(c)f.push("init=1");if(d)f.push("image="+d);if(d)f.push("mime_type="+e);if(Object.keys(K).length>0)f.push("ext="+JSON.stringify(K));if(af!="")f.push("scenario_id="+af);for(var h=0;h0)while(b.length>0)a.removeChild(b[0]);}function az(){do{var a=Z.shift();if(a!=undefined)aA(a);}while(a!=undefined);}function aA(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>ac)b.removeChild(b.children[0]);}function aD(a){ay();var b=w.getElementsByClassName('synalio-chat-footer')[0];b.appendChild(a);}function aE(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 aF=function(a){a.preventDefault();};function aG(a){if(a===true)x.body.setAttribute('style',"position:fixed;overflow:hidden;width:100%;");else x.body.setAttribute("style","");}function aH(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 aI(a,b){return a.lastIndexOf(b,0)===0;}function aJ(){if(p&&p.readyState==WebSocket.OPEN)return;var a="https:"==x.location.protocol?"wss":"ws";var b="//rebot.resola.ai";if(aI(b,"http"))p=new WebSocket("//rebot.resola.ai/chat/enduser/".replace(/https?/g,a)+k+"/"+ae);else p=new WebSocket(a+"://rebot.resola.ai/chat/enduser/"+k+"/"+ae);p.onmessage=aL;p.onopen=aM;p.onclose=aN;} ;function aL(a){var b=JSON.parse(a.data);if(b.disconnect){ ; ; ;if(b.is_finish_rtchat_link==1)ah("finish_rtchat",true,true,true);else{au({buttons:[{'label':'メニューへ戻る','msg':'メニューに戻る'}]});aE(1);}aU(false);}else{l=true;var c=b.sender_image?b.sender_image:s;aC(ag(Q.replace(/@2/g,b.sender).replace(/@3/g,c).replace(/@1/g,b.text.replace(/\r?\n/g,'
    '))));aE(1);t.push(b.msg_id);if(x.hasFocus())aP();aT();aU(true);}G.forEach(function(a){clearTimeout(a);});}function aM(){console.log('WS connected');if(H>0)al(ae);aP();}function aN(){H++;if(H<50)setTimeout(function(){aJ();},(H-1)*5000);}function aO(a){var b=typeof document.createElement('input').checkValidity=='function';if(b)for(var c=0;c0){var a=w.getElementById('synalio-chat-window-notice-badge');a.innerHTML=t.length;a.style.display='block';} ;}function aU(a){if(a){w.getElementById('synalio-chat-footer-rtchat').style.display='block'; ;w.getElementById('synalio-chat-footer-container').style.display='block'; ;}else{w.getElementById('synalio-chat-footer-rtchat').style.display='none'; ;w.getElementById('synalio-chat-footer-container').style.display='none'; ;} ;synalio.resize(u.offsetHeight); ;}function aV(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;}smoothScr={iterr:20,tm:null,step:null,lastScrollTop:null,stopShow:function(){clearTimeout(this.tm);this.iterr=30;},anim:function(a,b,c){var d=(a.offsetTop-c.offsetHeight-b.scrollTop)/5.0;b.scrollTop+=d;if(this.iterr>1)this.iterr-=1;else this.itter=0;if(this.lastScrollTop!=b.scrollTop&&d>1&&b.scrollTop'; ;ah('画像受信',true,false,false,b,c);aC(ag(R.replace(/@1/g,d)));},onPressGoHome:function(){ah(J,false,true);},onCompleteWriteMessage:function(a){},onCompleteToggle:function(a){},onCompleteLoad:function(){},resize:function aW(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);}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||!c.checkValidity())return aO(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;ah(f,true);az();}ay();return false;},onFocusEvent:function(){aP();},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';an(c);return false;},onTeijinImageClieck:function(a){ ;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);