���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/alphpwcp/public_html/us/alphachat/design/defaulttheme/js/widgetv2/835.17d2b69b4aa52ddd9245.js
���ѧ٧ѧ�
"use strict";(self.webpackChunkLHCReactAPP=self.webpackChunkLHCReactAPP||[]).push([[835],{9835:function(t,e,a){a.r(e);var i,n=a(4467),r=a(3029),s=a(2901),o=a(6822),h=a(3954),p=a(5361),c=a(6540),l=a(1225),d=a(1708),g=(a(3044),a(6524)),f=a(5580),u=a(7912),m=a(2812),w=a(5802),_=a(2374);function v(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function I(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?v(Object(a),!0).forEach((function(e){(0,n.A)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var y=(0,l.Ng)((function(t){return{chatwidget:t.chatwidget}}))(i=function(t){function e(t){var a,i,n,s;return(0,r.A)(this,e),i=this,n=e,s=[t],n=(0,h.A)(n),(a=(0,o.A)(i,b()?Reflect.construct(n,s||[],(0,h.A)(i).constructor):n.apply(i,s))).state={},a.initOfflineFormCall(),a.handleSubmit=a.handleSubmit.bind(a),a.handleContentChange=a.handleContentChange.bind(a),a.handleContentChangeCustom=a.handleContentChangeCustom.bind(a),a.goToChat=a.goToChat.bind(a),a}return(0,p.A)(e,t),(0,s.A)(e,[{key:"initOfflineFormCall",value:function(t){this.props.dispatch((0,f._y)({department:this.props.chatwidget.get("department"),theme:this.props.chatwidget.get("theme"),mode:this.props.chatwidget.get("mode"),bot_id:this.props.chatwidget.get("bot_id"),trigger_id:this.props.chatwidget.get("trigger_id"),online:0,dep_default:t||this.props.chatwidget.get("departmentDefault")||0,chat_id:this.props.chatwidget.hasIn(["chatData","id"])?this.props.chatwidget.getIn(["chatData","id"]):null,chat_hash:this.props.chatwidget.hasIn(["chatData","hash"])?this.props.chatwidget.getIn(["chatData","hash"]):null}))}},{key:"handleSubmit",value:function(t){var e=this.state,a=!1,i=new FormData;void 0!==e.File&&(a=!0,i.append("File",e.File,e.File.name)),e.jsvar=this.props.chatwidget.get("jsVars"),e.vars_encrypted=this.props.chatwidget.get("vars_encrypted"),e["captcha_"+this.props.chatwidget.getIn(["captcha","hash"])]=this.props.chatwidget.getIn(["captcha","ts"]),e.tscaptcha=this.props.chatwidget.getIn(["captcha","ts"]),e.user_timezone=u.q.getTimeZone(),e.URLRefer="";try{var n=window.parent.location!==window.parent.parent.location;if(void 0===window.lhcChat||"popup"!=window.lhcChat.mode&&"embed"!=window.lhcChat.mode||null===window.opener&&window.parent.opener,n)e.URLRefer=parent.location.href.substring(parent.location.protocol.length);else{var r=null;r=null!==window.opener?window.opener:window.parent,e.URLRefer=r.location.href.substring(r.location.protocol.length)}}catch(t){try{e.URLRefer=String(window.document.location)}catch(t){}}"blank"==e.URLRefer&&(e.URLRefer=""),e.r=this.props.chatwidget.get("ses_ref"),""!=this.props.chatwidget.get("operator")&&(e.operator=this.props.chatwidget.get("operator")),null!==this.props.chatwidget.get("priority")&&(e.priority=this.props.chatwidget.get("priority"));var s=u.q.getCustomFieldsSubmit(this.props.chatwidget.getIn(["customData","fields"]));null!==s&&(e=I(I({},e),s));var o={department:this.props.chatwidget.get("department"),theme:this.props.chatwidget.get("theme"),mode:this.props.chatwidget.get("mode"),vid:this.props.chatwidget.get("vid"),fields:e};this.props.chatwidget.hasIn(["chatData","id"])&&this.props.chatwidget.hasIn(["chatData","hash"])&&(o.chat_id=this.props.chatwidget.getIn(["chatData","id"]),o.chat_hash=this.props.chatwidget.getIn(["chatData","hash"])),a&&i.append("document",JSON.stringify(o)),this.props.dispatch((0,f.Kb)(a?i:o)),t.preventDefault()}},{key:"handleContentChange",value:function(t){var e=this,a=this.state;a[t.id]=t.value,this.setState(a),"DepartamentID"==t.id&&this.props.chatwidget.getIn(["offlineData","department","departments"]).size>0&&this.props.chatwidget.getIn(["offlineData","department","departments"]).map((function(a){a.get("value")==t.value&&(1==a.get("online")&&(e.props.dispatch({type:"dep_default",data:t.value}),e.props.dispatch({type:"onlineStatus",data:!0})),e.props.chatwidget.getIn(["onlineData","dep_forms"])!=t.value&&e.initOfflineFormCall(t.value))}))}},{key:"componentDidMount",value:function(){u.q.prefillFields(this)}},{key:"handleContentChangeCustom",value:function(t){this.props.dispatch({type:"CUSTOM_FIELDS_ITEM",data:{id:t.field.get("index"),value:t.value}})}},{key:"goToChat",value:function(){this.props.dispatch({type:"attr_set",attr:["isOfflineMode"],data:!1})}},{key:"componentDidUpdate",value:function(t,e,a){if(document.getElementById("id-container-fluid")){var i=0;document.getElementById("widget-header-content")&&(i=document.getElementById("widget-header-content").offsetHeight),u.q.sendMessageParent("widgetHeight",[{height:document.getElementById("id-container-fluid").offsetHeight+i+10}])}}},{key:"render",value:function(){var t=this,e=this.props.t;if(!0===this.props.chatwidget.getIn(["offlineData","fetched"])&&!0===this.props.chatwidget.getIn(["offlineData","disabled"]))return c.createElement("div",{className:"alert alert-danger m-2",role:"alert"},e("start_chat.cant_start_a_chat"));if(!1===this.props.chatwidget.getIn(["offlineData","fetched"]))return null;if(this.props.chatwidget.getIn(["chat_ui","disabled"]))return c.createElement(w.A,{closeText:e("button.close"),full_height:!0,close:function(e){return t.props.dispatch((0,f.fJ)(!0))},as_html:!0,text:this.props.chatwidget.getIn(["chat_ui","disabled"])});if(this.props.chatwidget.getIn(["offlineData","fields"]).size>0)var a=this.props.chatwidget.getIn(["offlineData","fields"]).map((function(e){return c.createElement(d.A,{chatUI:t.props.chatwidget.get("chat_ui"),validationError:t.props.chatwidget.hasIn(["validationErrors",e.get("identifier")])?t.props.chatwidget.getIn(["validationErrors",e.get("identifier")]):null,isInvalid:t.props.chatwidget.hasIn(["validationErrors",e.get("identifier")]),attrPrefill:{attr_prefill_admin:t.props.chatwidget.get("attr_prefill_admin"),attr_prefill:t.props.chatwidget.get("attr_prefill")},defaultValueField:t.state[e.get("name")]||e.get("value"),onChangeContent:t.handleContentChange,field:e})}));else a="";if(this.props.chatwidget.getIn(["customData","fields"]).size>0)var i=this.props.chatwidget.getIn(["customData","fields"]).map((function(e){return c.createElement(d.A,{chatUI:t.props.chatwidget.get("chat_ui"),key:e.get("identifier"),validationError:t.props.chatwidget.hasIn(["validationErrors",e.get("identifier")])?t.props.chatwidget.getIn(["validationErrors",e.get("identifier")]):null,isInvalid:t.props.chatwidget.hasIn(["validationErrors",e.get("identifier")]),defaultValueField:e.get("value"),onChangeContent:t.handleContentChangeCustom,field:e})}));else i="";return 0==this.props.chatwidget.get("processStatusOffline")||1==this.props.chatwidget.get("processStatusOffline")?c.createElement("div",{id:"id-container-fluid"},this.props.chatwidget.get("leave_message")&&(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])||this.props.chatwidget.hasIn(["chat_ui","operator_profile"])&&""!=this.props.chatwidget.getIn(["chat_ui","operator_profile"]))&&c.createElement("div",{className:"py-2 px-3 offline-intro-operator",dangerouslySetInnerHTML:{__html:(this.props.chatwidget.hasIn(["chat_ui","pre_chat_html"])?this.props.chatwidget.getIn(["chat_ui","pre_chat_html"]):"")+(this.props.chatwidget.hasIn(["chat_ui","operator_profile"])?this.props.chatwidget.getIn(["chat_ui","operator_profile"]):"")}}),this.props.chatwidget.get("leave_message")&&this.props.chatwidget.hasIn(["chat_ui","offline_intro"])&&""!=this.props.chatwidget.getIn(["chat_ui","offline_intro"])&&c.createElement("p",{className:"pb-1 mb-0 pt-2 px-3 fw-bold offline-intro",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","offline_intro"])}}),!this.props.chatwidget.get("leave_message")&&c.createElement("p",{className:"pb-1 mb-0 pt-2 px-3 fw-bold offline-intro"},this.props.chatwidget.getIn(["chat_ui","chat_unavailable"])),this.props.chatwidget.get("leave_message")&&c.createElement("div",{className:"container-fluid"},c.createElement(_.A,{errors:this.props.chatwidget.get("validationErrors")}),c.createElement("form",{onSubmit:this.handleSubmit,className:"offline-form"},c.createElement("div",{className:"row pt-2"},a,i,this.props.chatwidget.hasIn(["offlineData","department"])&&c.createElement(m.A,{defaultValueField:this.state.DepartamentID,setDefaultValue:this.props.chatwidget.get("departmentDefault"),onChangeContent:this.handleContentChange,isInvalid:this.props.chatwidget.hasIn(["validationErrors","department"]),departments:this.props.chatwidget.getIn(["offlineData","department"])})),(!this.props.chatwidget.hasIn(["chat_ui","hstr_btn"])||""!==i||""!==a)&&c.createElement("div",{className:"row"},c.createElement("div",{className:"col-12 pb-2"},c.createElement("button",{type:"submit",disabled:1==this.props.chatwidget.get("processStatusOffline"),className:"btn btn-secondary btn-sm"},1==this.props.chatwidget.get("processStatusOffline")&&c.createElement("i",{className:"material-icons"},""),this.props.chatwidget.getIn(["chat_ui","custom_start_button"])||e("start_chat.leave_a_message")),!0!==this.props.chatwidget.get("isChatting")&&!0===this.props.chatwidget.get("isOnline")&&!0===this.props.chatwidget.get("isOfflineMode")&&c.createElement("button",{type:"button",onClick:this.goToChat,className:"float-end btn btn-sm btn-link text-muted"},"« ",e("button.back_to_chat"))))))):2==this.props.chatwidget.get("processStatusOffline")?c.createElement("div",{id:"id-container-fluid"},this.props.chatwidget.hasIn(["chat_ui","operator_profile"])&&""!=this.props.chatwidget.getIn(["chat_ui","operator_profile"])&&c.createElement("div",{className:"py-2 px-3 offline-intro-operator",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","operator_profile"])}}),this.props.chatwidget.hasIn(["chat_ui","offline_intro"])&&""!=this.props.chatwidget.getIn(["chat_ui","offline_intro"])&&c.createElement("p",{className:"pb-1 mb-0 pt-2 px-3 fw-bold offline-intro offline-intro-filled",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","offline_intro"])}}),c.createElement("div",{className:"container-fluid"},c.createElement("div",{className:"row"},c.createElement("div",{className:"col-12"},c.createElement("p",{className:"pt-2",dangerouslySetInnerHTML:{__html:this.props.chatwidget.getIn(["chat_ui","thank_feedback"])||e("start_chat.thank_you_for_feedback")}}))))):void 0}}])}(c.Component))||i;e.default=(0,g.C)()(y)}}]); //# sourceMappingURL=835.17d2b69b4aa52ddd9245.js.map
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�