1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4892],{4892:(b,p,d)=>{d.r(p),d.d(p,{OAiPageModule:()=>T});var g=d(177),h=d(4341),a=d(7125),u=d(786),m=d(467),c=d(8902),f=d(7586),e=d(4020),v=d(7007),_=d(3366);function C(s,r){1&s&&(e.j41(0,"div",27),e.nrm(1,"ion-spinner",28),e.k0s())}function M(s,r){if(1&s){const l=e.RV6();e.j41(0,"div",33)(1,"div",34),e.nrm(2,"img",35),e.k0s(),e.j41(3,"div",36)(4,"div",37)(5,"ion-label")(6,"pre",38),e.EFF(7),e.k0s()()(),e.j41(8,"div",39)(9,"ion-icon",40),e.bIt("click",function(){e.eBV(l);const i=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.sendToMyEmail(i))}),e.k0s()()()()}if(2&s){const l=e.XpG().$implicit;e.R7$(7),e.JRh(l.message)}}function y(s,r){if(1&s&&(e.j41(0,"div",41)(1,"div",36)(2,"div",37)(3,"ion-label"),e.EFF(4),e.k0s()()()()),2&s){const l=e.XpG().$implicit;e.R7$(4),e.JRh(l.message)}}function O(s,r){if(1&s&&(e.j41(0,"span"),e.DNE(1,M,10,1,"div",31)(2,y,5,1,"div",32),e.k0s()),2&s){const l=r.$implicit,t=e.XpG(2);e.R7$(),e.Y8G("ngIf",l.sender_id!=t.uid),e.R7$(),e.Y8G("ngIf",l.sender_id==t.uid)}}function I(s,r){if(1&s&&(e.j41(0,"div",29),e.DNE(1,O,3,2,"span",30),e.k0s()),2&s){const l=e.XpG();e.R7$(),e.Y8G("ngForOf",l.messageList)}}
1function P(s,r){1&s&&(e.j41(0,"div",42),e.nrm(1,"ion-spinner",43),e.k0s())}const A=[{path:"",component:(()=>{var s;class r{constructor(t,i,n){this.util=t,this.api=i,this.route=n,this.recognizedText=null,this.receiverId="",this.receiverName="",this.uid="",this.roomId="",this.apiCalled=!1,this.date=f().format("YYYY-MM-DD"),this.message="",this.messageList=[],this.yourMessage=!1,this.route.queryParams.subscribe(o=>{console.log(o)}),this.receiverId=1,this.receiverName=localStorage.getItem("first_name"),this.uid=localStorage.getItem("uid"),console.log("DDDDD>"+this.receiverId,this.receiverName,this.uid),this.getChatRooms()}onDateChange(){console.log("DDDDD> "+this.date),this.getChatList()}filterItemsByDate(){return console.log("DDDDD> "+this.date),this.messageList.filter(t=>t.created_at=this.date)}onSearchChange(t){this.messageList=this.filterItems(t.detail.value)}filterItems(t){return this.messageList.filter(i=>i.message.toLowerCase().indexOf(t.toLowerCase())>-1)}startListening(){var t=this;return(0,m.A)(function*(){const i=yield c.o.checkPermissions();console.log("hasPermission :",i),i||(yield c.o.requestPermissions()),c.o.start({language:"en-US",maxResults:1,prompt:"Say something...",partialResults:!0,popup:!0}),c.o.addListener("partialResults",n=>{console.log("Partial:",n.matches),t.recognizedText=n.matches[0]}),c.o.addListener("listeningState",n=>{console.log("Final:",n.matches),t.recognizedText=n.matches[0]})})()}stopListening(){return(0,m.A)(function*(){yield c.o.stop()})()}getChatRooms(){const t={sender_id:this.uid,receiver_id:this.receiverId};this.apiCalled=!1,this.api.post_private("v1/oai/getOAiChatRooms",t).then(i=>{if(console.log(i),i&&i.status&&200==i.status){const n=i.data,o=i.data2;n&&null!=n&&n.id?(this.apiCalled=!0,this.roomId=n.id,this.getChatList(),this.interval=setInterval(()=>{console.log("calling in interval"),this.getChatList()},12e3)):o&&null!=o&&o.id?(this.apiCalled=!0,this.roomId=o.id,this.getChatList(),this.interval=setInterval(()=>{console.log("calling in interval"),this.getChatList()},12e3)):(this.apiCalled=!0,this.util.errorToast("Something went wrong","danger"))}},i=>{console.log(i),this.createChatRooms()}).catch(i=>{console.log(i),this.createChatRooms()})}createChatRooms(){this.api.post_private("v1/oai/createOAiChatRooms",{sender_id:this.uid,receiver_id:this.receiverId,status:1}).then(i=>{console.log(i),i&&i.status&&200==i.status&&i.data?(this.roomId=i.data.id,this.getChatList(),this.interval=setInterval(()=>{console.log("calling in interval"),this.getChatList()},12e3)):this.apiCalled=!0},i=>{console.log(i),this.apiCalled=!0,this.util.apiErrorHandler(i)}).catch(i=>{console.log(i),this.apiCalled=!0,this.util.apiErrorHandler(i)})}getChatList(t){this.api.post_private("v1/oai/getOAiById",{room_id:this.roomId,date:this.date}).then(i=>{console.log(i),t&&t.target.complete(),this.apiCalled=!0,i&&i.status&&200==i.status&&(this.messageList=i.data)},i=>{console.log(i),t&&t.target.complete(),this.apiCalled=!0,this.util.apiErrorHandler(i)}).catch(i=>{console.log(i),t&&t.target.complete(),this.apiCalled=!0,this.util.apiErrorHandler(i)})}ngOnInit(){}ionViewWillLeave(){console.log("will leave"),clearInterval(this.interval)}ionViewDidLeave(){console.log("did leave"),clearInterval(this.interval)}onBack(){this.util.onBack()}sendToMyEmail(t){if(console.log(this.message),!t.id||""==t.id)return!1;this.message="";const n={uid:this.uid,chat_msg_id:t.id};this.myContent.scrollToBottom(300),this.yourMessage=!1,this.api.post_private("v1/sendmail/sendMessageToEmail",n).then(o=>{console.log(o)},o=>{console.log(o),this.yourMessage=!0,this.util.apiErrorHandler(o)}).catch(o=>{console.log(o),this.yourMessage=!0,this.util.apiErrorHandler(o)})}sendMessage(){if(console.log(this.message),!this.message||""==this.message)return!1;const t=this.message;this.message="";const i={room_id:this.roomId,sender_id:this.uid,message:t,message_type:0,reported:0,status:1,created_at:this.date};this.myContent.scrollToBottom(300),this.yourMessage=!1,this.api.post_private("v1/oai/sendOAiMessage",i).then(n=>{console.log(n),this.yourMessage=!0,n&&200==n.status?this.getChatList():this.yourMessage=!0},n=>{console.log(n),this.yourMessage=!0,this.util.apiErrorHandler(n)}).catch(n=>{console.log(n),this.yourMessage=!0,this.util.apiErrorHandler(n)})}}return(s=r).\u0275fac=function(t){return new(t||s)(e.rXU(v.a),e.rXU(_.G),e.rXU(u.nX))},s.\u0275cmp=e.VBU({type:s,selectors:[["app-oai"]],viewQuery:function(t,i){if(1&t&&e.GBs(a.W9,5,a.W9),2&t){let n;e.mGM(n=e.lsd())&&(i.myContent=n.first)}},standalone:!1,decls:40,vars:11,consts:[[1,"ion-no-border",2,"margin-top","70px"],["color","primary","mode","ios"],["slot","start"],[3,"click"],["slot","icon-only","name","chevron-back","color","light"],[1,"sidebar-page-container","blog-details","sec-pad"],[1,"single-post-inner"],[1,"auto-container"],[1,"post-content","centred"],[1,"category"],[2,"text-decoration","none"],[1,"contact-div"],[1,"main_content_div"],[1,"form_div"],[1,"flex_ip"],["type","date","showCancelButton","
1never",2,"line-height","35px",3,"ngModelChange","change","ngModel"],["mode","ios","showCancelButton","never",3,"ionChange","placeholder","debounce"],["class","loader",4,"ngIf"],["slot","fixed","pullFactor","0.8","pullMin","60","pullMax","120",3,"ionRefresh"],["class","main_content_div_chat",4,"ngIf"],["threshold","25%","position","bottom",3,"ionInfinite","disabled"],["loadingSpinner","bubbles",3,"loadingText"],["style","display: flex;flex-direction: row-reverse;padding: 20px;",4,"ngIf"],[1,"footer_div"],["type","text",3,"ngModelChange","keyup.enter","ngModel","placeholder"],[1,"chat_div",3,"click"],["name","navigate"],[1,"loader"],["name","circular"],[1,"main_content_div_chat"],[4,"ngFor","ngForOf"],["class","left_div",4,"ngIf"],["class","right_div",4,"ngIf"],[1,"left_div"],[2,"display","block","clear","both"],["src","assets/images/oai.gif",2,"max-width","75px"],[1,"inner_div"],[1,"msg_div"],[2,"white-space","pre-wrap"],[2,"display","inline,inline-block","padding","20px"],["name","mail-outline","title","This is a send email to your register email!",3,"click"],[1,"right_div"],[2,"display","flex","flex-direction","row-reverse","padding","20px"],["name","dots"]],template:function(t,i){1&t&&(e.j41(0,"ion-header",0)(1,"ion-toolbar",1)(2,"ion-buttons",2)(3,"ion-button",3),e.bIt("click",function(){return i.onBack()}),e.nrm(4,"ion-icon",4),e.k0s()(),e.j41(5,"ion-title"),e.EFF(6),e.k0s()()(),e.j41(7,"ion-content")(8,"section",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"a",10),e.EFF(14,"Chat with Ai "),e.k0s()(),e.j41(15,"ion-row")(16,"ion-col")(17,"div",11)(18,"div",12)(19,"div",13)(20,"div",14)(21,"ion-input",15),e.mxI("ngModelChange",function(o){return e.DH7(i.date,o)||(i.date=o),o}),e.bIt("change",function(){return i.onDateChange()}),e.k0s()()()()()(),e.j41(22,"ion-col")(23,"div",11)(24,"div",12)(25,"div",13)(26,"div",14)(27,"ion-input",16),e.bIt("ionChange",function(o){return i.onSearchChange(o)}),e.k0s()()()()()()()()()(),e.DNE(28,C,2,0,"div",17),e.j41(29,"ion-refresher",18),e.bIt("ionRefresh",function(o){return i.getChatList(o)}),e.nrm(30,"ion-refresher-content"),e.k0s(),e.DNE(31,I,2,1,"div",19),e.j41(32,"ion-infinite-scroll",20),e.bIt("ionInfinite",function(o){return i.getChatList(o)}),e.nrm(33,"ion-infinite-scroll-content",21),e.k0s(),e.DNE(34,P,2,0,"div",22),e.k0s()(),e.j41(35,"ion-footer")(36,"div",23)(37,"ion-input",24),e.mxI("ngModelChange",function(o){return e.DH7(i.message,o)||(i.message=o),o}),e.bIt("keyup.enter",function(){return i.sendMessage()}),e.k0s(),e.j41(38,"div",25),e.bIt("click",function(){return i.sendMessage()}),e.nrm(39,"ion-icon",26),e.k0s()()()),2&t&&(e.R7$(6),e.SpI(" ",i.receiverName," "),e.R7$(15),e.R50("ngModel",i.date),e.R7$(6),e.Y8G("placeholder",i.util.translate("Search..."))("debounce",250),e.R7$(),e.Y8G("ngIf",0==i.apiCalled),e.R7$(3),e.Y8G("ngIf",1==i.apiCalled),e.R7$(),e.Y8G("disabled",!0),e.R7$(),e.Y8G("loadingText",i.util.translate("fetching chats")),e.R7$(),e.Y8G("ngIf",!i.yourMessage&&0==i.apiCalled),e.R7$(3),e.R50("ngModel",i.message),e.Y8G("placeholder",i.util.translate("Type Here..")))},dependencies:[g.Sq,g.bT,h.BC,h.vS,a.Jm,a.QW,a.hU,a.W9,a.M0,a.eU,a.iq,a.Ax,a.Hp,a.$w,a.he,a.To,a.Ki,a.ln,a.w2,a.BC,a.ai,a.Gw],styles:["ion-footer[_ngcontent-%COMP%]{background-color:#fff}ion-footer[_ngcontent-%COMP%] .footer_div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:10px 20px}ion-footer[_ngcontent-%COMP%] ion-input[_ngcontent-%COMP%]{border-radius:25px;border:1px solid lightgray;--padding-start: 8px;color:#000!important}ion-footer[_ngcontent-%COMP%] .chat_div[_ngcontent-%COMP%]{border-radius:50%;box-shadow:0 3px 6px #0003;height:35px;width:35px;position:relative;margin-left:10px}ion-footer[_ngcontent-%COMP%] .chat_div[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary);position:absolute;left:50%;top:50%;transform:translate(-55%,-45%);font-size:22px}"]}),r})()}];let R=(()=>{var s;class r{}return(s=r).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[u.iI.forChild(A),u.iI]}),r})(),T=(()=>{var s;class r{}return(s=r).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[g.MD,h.YN,a.bv,R]}),r})()}}]);
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.