Free javascript Hosting


fb-entry-point.js

Uploaded on Mar 23 2022 06:30 by djardi.messaoud

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=14)}([function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){t.exports=n(7)},function(t,e){function n(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}},function(t,e,n){var r=n(8),o=n(9),i=n(10),a=n(12);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||a()}},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(13))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=m(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function d(){}function p(){}var _={};c(_,o,(function(){return this}));var h=Object.getPrototypeOf,g=h&&h(h(x([])));g&&g!==e&&n.call(g,o)&&(_=g);var v=p.prototype=f.prototype=Object.create(_);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function m(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,m(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return d.prototype=p,c(v,"constructor",p),c(p,"constructor",d),d.displayName=c(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},y(b.prototype),c(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(v),c(v,a,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(t,e,n){var r=n(11);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"encodeDataRef",(function(){return Kt}));var r=n(1),o=n.n(r),i=n(2),a=n.n(i),c=n(4),s="object"==typeof self&&self&&self.Object===Object&&self,u=c.a||s||Function("return this")(),l=u.Symbol,f=Object.prototype,d=f.hasOwnProperty,p=f.toString,_=l?l.toStringTag:void 0;var h=function(t){var e=d.call(t,_),n=t[_];try{t[_]=void 0;var r=!0}catch(t){}var o=p.call(t);return r&&(e?t[_]=n:delete t[_]),o},g=Object.prototype.toString;var v=function(t){return g.call(t)},y=l?l.toStringTag:void 0;var b=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":y&&y in Object(t)?h(t):v(t)};var m=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var w,E=function(t){if(!m(t))return!1;var e=b(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},S=u["__core-js_shared__"],x=(w=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"";var I=function(t){return!!x&&x in t},O=Function.prototype.toString;var L=function(t){if(null!=t){try{return O.call(t)}catch(t){}try{return t+""}catch(t){}}return""},T=/^\[object .+?Constructor\]$/,M=Function.prototype,j=Object.prototype,k=M.toString,A=j.hasOwnProperty,N=RegExp("^"+k.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var P=function(t){return!(!m(t)||I(t))&&(E(t)?N:T).test(L(t))};var R=function(t,e){return null==t?void 0:t[e]};var C=function(t,e){var n=R(t,e);return P(n)?n:void 0},G=C(Object,"create");var z=function(){this.__data__=G?G(null):{},this.size=0};var F=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},B=Object.prototype.hasOwnProperty;var D=function(t){var e=this.__data__;if(G){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return B.call(e,t)?e[t]:void 0},U=Object.prototype.hasOwnProperty;var H=function(t){var e=this.__data__;return G?void 0!==e[t]:U.call(e,t)};var q=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=G&&void 0===e?"__lodash_hash_undefined__":e,this};function K(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}K.prototype.clear=z,K.prototype.delete=F,K.prototype.get=D,K.prototype.has=H,K.prototype.set=q;var $=K;var V=function(){this.__data__=[],this.size=0};var J=function(t,e){return t===e||t!=t&&e!=e};var Q=function(t,e){for(var n=t.length;n--;)if(J(t[n][0],e))return n;return-1},W=Array.prototype.splice;var Y=function(t){var e=this.__data__,n=Q(e,t);return!(n<0)&&(n==e.length-1?e.pop():W.call(e,n,1),--this.size,!0)};var Z=function(t){var e=this.__data__,n=Q(e,t);return n<0?void 0:e[n][1]};var X=function(t){return Q(this.__data__,t)>-1};var tt=function(t,e){var n=this.__data__,r=Q(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function et(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}et.prototype.clear=V,et.prototype.delete=Y,et.prototype.get=Z,et.prototype.has=X,et.prototype.set=tt;var nt=et,rt=C(u,"Map");var ot=function(){this.size=0,this.__data__={hash:new $,map:new(rt||nt),string:new $}};var it=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var at=function(t,e){var n=t.__data__;return it(e)?n["string"==typeof e?"string":"hash"]:n.map};var ct=function(t){var e=at(this,t).delete(t);return this.size-=e?1:0,e};var st=function(t){return at(this,t).get(t)};var ut=function(t){return at(this,t).has(t)};var lt=function(t,e){var n=at(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ft(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ft.prototype.clear=ot,ft.prototype.delete=ct,ft.prototype.get=st,ft.prototype.has=ut,ft.prototype.set=lt;var dt=ft;function pt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(pt.Cache||dt),n}pt.Cache=dt;var _t=pt,ht=n(3),gt=n.n(ht),vt=function(t,e){Object.entries(e).forEach((function(e){var n=gt()(e,2),r=n[0],o=n[1];o&&t.setAttribute(r,o)}))},yt="//connect.facebook.net/en_US/sdk/xfbml.customerchat.js";window.cfIsFbSdkInited=window.cfIsFbSdkInited||!1;var bt,mt=function(t){window.FB.init({appId:t,autoLogAppEvents:!0,xfbml:!1,version:"v12.0"}),window.cfIsFbSdkInited=!0},wt=_t((function(t,e){return new Promise((function(n,r){var o=function(){setTimeout((function(){n(!0)}))};if(window.cfIsFbSdkInited)o();else{var i,a=Object.getOwnPropertyDescriptor(window,"fbAsyncInit");if(a&&!a.writable)i=window.setInterval((function(){window.FB&&(mt(t),clearInterval(i),o())}),100);else{var c=window.fbAsyncInit;window.fbAsyncInit=function(){c&&c(),mt(t),o()}}setTimeout((function(){window.FB&&!window.cfIsFbSdkInited?(mt(t),o()):r(new Error("error fb sdk initialize")),clearInterval(i)}),7e3),setTimeout((function(){!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt;if(!document.getElementById("facebook-jssdk")){var e=document.createElement("script");vt(e,{id:"facebook-jssdk",src:t,crossorigin:"anonymous",async:"async",defer:"async"}),document.body.append(e)}}(e)}))}}))})),Et=/\*/g,St=function(t){return t.map((function(t){return"^".concat(t.replace(Et,".*"),"$")})).some((function(t){return RegExp(t).test(window.location.pathname)}))};!function(t){t.ALL="ALL",t.DESKTOP="DESKTOP",t.MOBILE="MOBILE"}(bt||(bt={}));var xt,It=function(t){var e=t.pages_blacklist,n=t.pages_whitelist,r=t.supported_devices;if(r&&r!==bt.ALL){var o=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());if(o&&r===bt.DESKTOP||!o&&r===bt.MOBILE)return!1}return!(n&&n.length&&!St(n))&&!(e&&e.length&&St(e))},Ot=fetch,Lt=n(5),Tt=n.n(Lt),Mt=n(6),jt=n.n(Mt),kt=n(0),At=n.n(kt),Nt=function(){function t(e){Tt()(this,t),At()(this,"storage",void 0),this.storage=e}return jt()(t,[{key:"get",value:function(t){try{var e=this.storage.getItem(t);return null!==e?JSON.parse(e):void 0}catch(t){return void 0}}},{key:"getRaw",value:function(t){return this.storage.getItem(t)}},{key:"set",value:function(t,e){this.storage.setItem(t,JSON.stringify(e))}},{key:"setRaw",value:function(t,e){this.storage.setItem(t,e)}},{key:"has",value:function(t){return null!==this.storage.getItem(t)}},{key:"remove",value:function(t){this.storage.removeItem(t)}}]),t}();!function(t){t.LOG_LEVEL_CONSOLE="LOG_LEVEL_CONSOLE",t.CF_ENV="CF_ENV",t.WL_DOMAIN_MOCK="WL_DOMAIN_MOCK",t.LANDING_DOMAIN_MOCK="LANDING_DOMAIN_MOCK",t.token="token",t.authed="authed",t.ref="__cf_url_ref",t.visualization="cf-visualization",t.thirdPartyAnalytics="third-party-analytics",t.savedUserId="user-id-saved",t.userIdBeforeLogout="_cf__user_id_before_logout",t.isDebug="cf-debug",t.isLocalMonitoring="cf-local-monitoring",t.flowBuilderDebug="__cf_flow_builder_debug",t.botsListBannerIndex="_cf__botsListBannerIndex",t.botsReachedLimitDismissed="_cf__bots_reached_limit_dismissed",t.fbAdsShowCampaignCategory="_cf__fb_show_campaign_category",t.fbPluginsCopyState="_cf__fb_plugins_copy_state",t.fbAdAccountId="_cf__fb_ad_account_id",t.lastUsedFacebookShopCatalogue="_cf__last_used_facebook_shop_catalog",t.verificationEmailSentAt="_cf__verification_email_sent_at",t.wizardActiveStep="_cf__wizard_active_step",t.introQuestionsData="_cf__intro_questions_data",t.introQuestionsFormData="_cf__intro_questions_form_data",t.skipIntroQuestions="_cf_skip_intro_questions",t.introQuestionsBotSessionId="_cf__intro_questions_bot_session_id",t.showFlowBuilderOnMobile="_cf__show_flow_builder_on_mobile",t.fastI18Nrefresh="_cf__fast_i18n_refresh",t.hideChromeAlert="_cf_hide_chrome_alert",t.gestureNavigationType="__cf_flow_builder_gesture_navigation_type",t.syncFbRender="cf-fb-sync-render",t.disableIntercom="__cf_disable_intercom",t.sendToMessengerInJsonClicked="_cf_send-to-messenger_in_json_clicked",t.monetizationProWarringShowed="_cf_monetization_pro_warring_showed",t.qrTooltipShowed1="qr_tool_tip_showed_1",t.qrTooltipShowed2="qr_tool_tip_showed_2",t.updateBlocks="updateBlocks",t.testTemplate="_cf__test_template",t.forceCanvas="_cf_force_canvas",t.detailedPricingDates="_cf_detailed_pricing_dates",t.firstSessionStep="_cf_first_session_step",t.loginInboundGetParams="_cf_login_inbound_get_params"}(xt||(xt={}));var Pt,Rt,Ct,Gt,zt=new Nt(window.localStorage),Ft=function(t,e,n){Ot("".concat(e,"/entry_points/").concat(t,"/seen").concat(n?"?unique=true":""),{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}})},Bt=function(t,e){var n="".concat("__cf_uniq_seen_event_ls_key","_").concat(t);zt.getRaw(n)||(zt.setRaw(n,"true"),Ft(t,e,!0)),Ft(t,e)},Dt=[{id:"",title:"Send to Messenger"},{id:"GET_THIS_IN_MESSENGER",title:"Get this in Messenger"},{id:"RECEIVE_THIS_IN_MESSENGER",title:"Receive this in Messenger"},{id:"SEND_THIS_TO_ME",title:"Send this to me"},{id:"GET_CUSTOMER_ASSISTANCE",title:"Get customer assistance"},{id:"GET_CUSTOMER_SERVICE",title:"Get customer service"},{id:"GET_SUPPORT",title:"Get support"},{id:"LET_US_CHAT",title:"Let us chat"},{id:"SEND_ME_MESSAGES",title:"Send me messages"},{id:"ALERT_ME_IN_MESSENGER",title:"Alert me in Messenger"},{id:"SEND_ME_UPDATES",title:"Send me updates"},{id:"MESSAGE_ME",title:"Message me"},{id:"LET_ME_KNOW",title:"Let me know"},{id:"KEEP_ME_UPDATED",title:"Keep me updated"},{id:"TELL_ME_MORE",title:"Tell me more"},{id:"SUBSCRIBE_IN_MESSENGER",title:"Subscribe in Messenger"},{id:"SUBSCRIBE_TO_UPDATES",title:"Subscribe to updates"},{id:"GET_MESSAGES",title:"Get messages"},{id:"SUBSCRIBE",title:"Subscribe"},{id:"GET_STARTED_IN_MESSENGER",title:"Get started in Messenger"},{id:"LEARN_MORE_IN_MESSENGER",title:"Learn more in Messenger"},{id:"GET_STARTED",title:"Get Started"}];!function(t){t.large="large",t.standard="standard",t.xlarge="xlarge"}(Ct||(Ct={})),function(t){t.blue="blue",t.white="white"}(Gt||(Gt={}));var Ut=(Pt={},At()(Pt,Gt.blue,{background:{fill:"rgb(13,126,255)",stroke:"rgb(13,126, 255)"},text:{fill:"rgb(255,255,255)"}}),At()(Pt,Gt.white,{background:{fill:"rgb(255,255,255)",stroke:"rgb(227,227,227)"},text:{fill:"rgb(13,126,255)"}}),Pt),Ht=(Rt={},At()(Rt,Ct.standard,{padding:"3px 6px 3px 6px",fontSize:11,lineHeight:1.28,iconSize:12,iconMargin:4,iconTopMargin:-4,borderRadius:3,lineTop:29}),At()(Rt,Ct.large,{padding:"6px 8px 5px 8px",fontSize:13,lineHeight:1.28,iconSize:15,iconMargin:4,iconTopMargin:-3,borderRadius:4,lineTop:33}),At()(Rt,Ct.xlarge,{padding:"8px 10px 7px",fontSize:15,lineHeight:1.28,iconSize:19,iconTopMargin:-2,iconMargin:5,borderRadius:5,lineTop:36}),Rt),qt=function(t){var e=t.entryPointId,n=t.baseUrl,r=t.config,o=t.pluginEl,i=t.page_id,a=t.appId,c=t.dataRef,s=t.boxEl;window.FB.Event.subscribe("send_to_messenger",(function(t){"rendered"===t.event&&Bt(e,n)}));var u=r.size,l=r.color,f=r.cta_text;vt(o,{size:u,color:l,cta_text:f,class:"fb-send-to-messenger",page_id:i,messenger_app_id:a,"data-ref":c}),s.style.position="relative",s.style.display="inline-block",s.style.lineHeight="1px",o.style.position="absolute",o.style.zIndex="2",o.style.left="0",o.style.top="0",s.append(function(t){var e=t.entryPointId,n=t.pageId,r=t.buttonColor,o=t.buttonSize,i=t.buttonText,a=t.messengerRef,c=Ut[r],s=c.background,u=c.text,l=Ht[o],f=l.padding,d=l.fontSize,p=l.lineHeight,_=l.iconSize,h=l.iconMargin,g=l.iconTopMargin,v=l.borderRadius,y="display:block;text-decoration:none;box-sizing: border-box; font-family: Helvetica, Arial, sans-serif;cursor:pointer;color:".concat(u.fill,";padding:").concat(f,";font-size:").concat(d,"px;line-height:").concat(p,";background-color: ").concat(s.fill,";border: 1px solid ").concat(s.stroke,";border-radius:").concat(v,"px;display:inline-flex;"),b="display:inline-flex; width: ".concat(_,"px; height: ").concat(_,"px;margin-right: ").concat(h,"px;margin-top:").concat(g,"px"),m=(Dt.find((function(t){return t.id===i}))||Dt[0]).title,w=a||encodeURIComponent(JSON.stringify({epid:e})),E="https://m.me/".concat(n,"?ref=").concat(w),S=document.createElement("div");return S.style.zIndex="0",S.style.position="absolute",S.style.top="0px",S.style.left="0px",S.innerHTML='\n\t\t<a\n\t\t\tstyle="'.concat(y,'"\n\t\t\thref=').concat(E,'\n\t\t\ttarget="_messenger"\n\t\t>\n\t\t\t<div style="').concat(b,'">').concat('<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.9998 20.2874C17.0136 20.2874 21.8887 15.7708 21.8887 10.1992C21.8887 4.62762 17.0136 0.110962 10.9998 0.110962C4.98598 0.110962 0.11084 4.62762 0.11084 10.1992C0.11084 13.3065 1.62724 16.0858 4.01184 17.9363V21.8889L7.8422 19.8567C8.8416 20.1368 9.9017 20.2874 10.9998 20.2874ZM9.90415 7.44148L4.01282 13.6063L9.2947 10.7223L12.2201 13.5646L18.0708 7.43976L12.7076 10.3638L9.90415 7.44148Z" fill="currentColor"/>\n</svg>','</div>\n\t\t\t<span style="').concat("letter-spacing: 0px; white-space:nowrap;",'">').concat(m,"</span>\n\t\t</a>\n\t"),S}({entryPointId:e,pageId:i,buttonColor:l,buttonSize:u,buttonText:f}))},Kt=function(t){return"b64:".concat(btoa(t))},$t=function(t,e,n,r){var o=t.page_id,i=t.app_id,a=t.plugin_id,c=t.config,s=document.createElement("div"),u=document.createElement("div"),l=Kt(JSON.stringify({epid:n}));s.append(u),"entry_point/send_to_messenger"===a&&qt({entryPointId:n,baseUrl:r,config:c,pluginEl:u,page_id:o,appId:i,dataRef:l,boxEl:s}),"entry_point/customer_chat"===a&&function(t){var e=t.entryPointId,n=t.baseUrl,r=t.config,o=t.pluginEl,i=t.page_id,a=t.dataRef;window.FB.Event.subscribe("customerchat.load",(function(){Bt(e,n)}));var c=r.theme_color,s=r.logged_in_greeting,u=r.logged_out_greeting,l=r.greeting_dialog_display,f=r.greeting_dialog_delay,d=r.guest_block_id;vt(o,{theme_color:c,logged_in_greeting:s,logged_out_greeting:u,greeting_dialog_display:l,greeting_dialog_delay:f,page_id:i,allow_guests:d?"true":"false",class:"fb-customerchat",ref:a})}({entryPointId:n,baseUrl:r,config:c,pluginEl:u,page_id:o,appId:i,dataRef:l,boxEl:s}),(null==e?void 0:e.closest("head"))?document.body.append(s):e.after(s),setTimeout((function(){window.FB&&window.FB.XFBML.parse(s)}))},Vt=function(){var t=a()(o.a.mark((function t(e,n,r,i){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(It(e.config)){t.next=2;break}return t.abrupt("return");case 2:if(window.FB){t.next=5;break}return t.next=5,wt(e.app_id);case 5:$t(e,n,r,i);case 6:case"end":return t.stop()}}),t)})));return function(e,n,r,o){return t.apply(this,arguments)}}();!function(){var t=document.currentScript;if(t){var e=null==t?void 0:t.id,n=new URL(t.src).origin,r=((null==t?void 0:t.dataset)||{}).baseUrl,o=void 0===r?"".concat(n,"/api"):r;e&&fetch("".concat(o,"/entry_points/").concat(e),{mode:"cors",headers:{"Content-Type":"application/json"}}).then((function(t){if(t.ok||t.status>=400&&t.status<500)return t.json();throw new Error("".concat(t.status," ").concat(t.statusText))})).then((function(n){var r=n.errors,i=n.result;(null==r?void 0:r[0])?console.warn("".concat(null==r?void 0:r[0],".").concat((null==i?void 0:i.flow_id)?"\nGo to https://dashboard.chatfuel.com/bot/".concat(i.bot_id,"/flows/").concat(i.flow_id," to fix it."):"")):Vt(i,t,e,o)}))}}()}]);

Back to list