1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[1505],{58406:(t,i,s)=>{"use strict";s.r(i),s.d(i,{default:()=>l});var o=s(96156),n=s(12737);const r=s(38302).default,a=s(14863).ZP;class l extends r{constructor(t){super(t),(0,o.Z)(this,"customerProfile",null),(0,o.Z)(this,"wishiChat",null);const e=document.querySelector(".side-panel-styling-advisor");this.isCustomerLogged="true"===e.dataset.customerAuth;n.Z.emit("loader:start",{element:t}),this.isCustomerLogged?this.getProfileInfo(this,e):(n.Z.emit("loader:end",{element:t}),t.textContent=t.dataset.textstart)}async getProfileInfo(t,i){const s=await a(i.dataset.url,{method:"GET",type:"json"}),o=await s.json();o?(t.customerProfile=o.profile,t.initWishi(t)):console.error("[Error get profile info]",e)}initWishi(t){const e=t.customerProfile.id,i={firstName:t.customerProfile.firstName,lastName:t.customerProfile.lastName,email:t.customerProfile.email,birthday:t.formattingDateForWishi(t.customerProfile.birthday),phone:t.customerProfile.phone,gender:t.customerProfile.gender},s={element:document.getElementById("wishi-root"),partnerUserId:e,clientInfo:i,cartItems:[],orderHistoryItems:[]};t.clientChatPluginFn(s)}clientChatPluginFn(t){if(window.wishiChat=window.ClientChatPlugin(t),!window.wishiChat)return console.error("WISHI SDK WAS NOT INITIALIZED BECAUSE: ",window.wishiChat),this.element.textContent=this.element.dataset.textdone,void n.Z.emit("loader:end",{element:this.element});const e=setInterval((()=>{window.wishiChat.getUserSessionStatus()&&(window.wishiStatus=window.wishiChat.getUserSessionStatus(),window.wishiStatus&&window.wishiStatus.then((t=>{t&&("quiz"!==t.session_status?this.element.textContent=this.element.dataset.textdone:this.element.textContent=this.element.dataset.textstart,n.Z.emit("loader:end",{element:this.element}),clearInterval(e))})))}),500)}formattingDateForWishi(t){const e=t.slice(0,10).split("-"),i=e[2],s=e[1],o=e[0];return"".concat(i,"-").concat(s,"-").concat(o)}}}}]);
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.