!function(e){function webpackJsonpCallback(t){for(var r,o,i=t[0],s=t[1],c=0,u=[];c1){if("number"===typeof(r=extend({path:"/"},api.defaults,r)).expires){var i=new Date;i.setMilliseconds(i.getMilliseconds()+864e5*r.expires),r.expires=i}r.expires=r.expires?r.expires.toUTCString():"";try{o=JSON.stringify(n),/^[\{\[]/.test(o)&&(n=o)}catch(h){}n=e.write?e.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var a="";for(var s in r)r[s]&&(a+="; "+s,!0!==r[s]&&(a+="="+r[s]));return document.cookie=t+"="+n+a}t||(o={});for(var c=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,f=0;fe?exec():!0!==t&&(o=setTimeout(r?function clear(){o=void 0}:exec,void 0===r?e-s:e))}}},function(e){e.exports={WIDGET_ROOT:"localhost:6969",WIDGET_ROOT_QA:"js.driftqa.com",ENV:"LOCAL"}},function(e){e.exports={WIDGET_ROOT:"js.driftt.com",WIDGET_ROOT_QA:"js.driftqa.com",PROJECT_NAMESPACE:"DRIFT_CONDUCTOR",ENV:"PRODUCTION"}},function(e,n,r){(function(r){var o;!function(){var i="undefined"!=typeof window&&window===this?this:"undefined"!=typeof r&&null!=r?r:this,a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};function l(){l=function l(){},i.Symbol||(i.Symbol=m)}var s=0;function m(e){return"jscomp_symbol_"+(e||"")+s++}function p(){l();var e=i.Symbol.iterator;e||(e=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&a(Array.prototype,e,{configurable:!0,writable:!0,value:function value(){return q(this)}}),p=function p(){}}function q(e){var t=0;return function r(e){return p(),(e={next:e})[i.Symbol.iterator]=function(){return this},e}(function(){return tt||(clearTimeout(e.j),e.j=setTimeout(function(){var t=performance.timing.navigationStart,n=B(e.g,e.b);t=(window.a&&window.a.A?1e3*window.a.A().C-t:0)||performance.timing.domContentLoadedEventEnd-t;if(e.u)var r=e.u;else performance.timing.domContentLoadedEventEnd?r=(r=performance.timing).domContentLoadedEventEnd-r.navigationStart:r=null;var o=performance.now();null===r&&G(e,Math.max(n+5e3,o+1e3));var i=e.a;5e3>o-n?n=null:n=5e3>o-(n=i.length?i[i.length-1].end:t)?null:Math.max(n,r),n&&(e.s(n),clearTimeout(e.j),e.i=!1,e.c&&e.c.disconnect(),e.h&&e.h.disconnect()),G(e,performance.now()+1e3)},t-performance.now()),e.v=t)}C.prototype.getFirstConsistentlyInteractive=function(){var e=this;return new Promise(function(t){e.s=t,"complete"==document.readyState?F(e):window.addEventListener("load",function(){F(e)})})},C.prototype.m=function(e){this.f.set(e,performance.now())},C.prototype.l=function(e){this.f.delete(e)},C.prototype.B=function(){G(this,performance.now()+5e3)},i.Object.defineProperties(C.prototype,{g:{configurable:!0,enumerable:!0,get:function get(){return[].concat(u(this.f.values()))}}});var d={getFirstConsistentlyInteractive:function getFirstConsistentlyInteractive(e){return e=e||{},"PerformanceLongTaskTiming"in window?new C(e).getFirstConsistentlyInteractive():Promise.resolve(null)}};e.exports?e.exports=d:void 0===(o=function(){return d}.apply(n,[]))||(e.exports=o)}()}).call(this,r(6))},function(e,t,n){e.exports=n(24)},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function wrap(e,t,n,r){var o=t&&t.prototype instanceof Generator?t:Generator,i=Object.create(o.prototype),a=new Context(r||[]);return i._invoke=function makeInvokeMethod(e,t,n){var r=c;return function invoke(o,i){if(r===f)throw new Error("Generator is already running");if(r===l){if("throw"===o)throw i;return doneResult()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=maybeInvokeDelegate(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=l,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var p=tryCatch(e,t,n);if("normal"===p.type){if(r=n.done?l:u,p.arg===d)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(r=l,n.method="throw",n.arg=p.arg)}}}(e,n,a),i}function tryCatch(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}e.wrap=wrap;var c="suspendedStart",u="suspendedYield",f="executing",l="completed",d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};p[i]=function(){return this};var h=Object.getPrototypeOf,m=h&&h(h(values([])));m&&m!==n&&r.call(m,i)&&(p=m);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function AsyncIterator(e,t){var n;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new t(function(n,a){!function invoke(n,o,i,a){var s=tryCatch(e[n],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"===typeof u&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){invoke("next",e,i,a)},function(e){invoke("throw",e,i,a)}):t.resolve(u).then(function(e){c.value=e,i(c)},function(e){return invoke("throw",e,i,a)})}a(s.arg)}(o,i,n,a)})}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,maybeInvokeDelegate(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=tryCatch(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var n=e[i];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),d}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;resetTryEntry(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,n,r){return this.delegate={iterator:values(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){(function(t){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return{}.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(e,n,r){"use strict";function isRegex(e){return"[object RegExp]"==={}.toString.call(e)}r.r(n),r.d(n,"Promise",function(){return l}),r.d(n,"TYPES",function(){return C}),r.d(n,"ProxyWindow",function(){return I}),r.d(n,"setup",function(){return setup}),r.d(n,"destroy",function(){return destroy}),r.d(n,"serializeMessage",function(){return setup_serializeMessage}),r.d(n,"deserializeMessage",function(){return setup_deserializeMessage}),r.d(n,"createProxyWindow",function(){return createProxyWindow}),r.d(n,"toProxyWindow",function(){return setup_toProxyWindow}),r.d(n,"on",function(){return on_on}),r.d(n,"once",function(){return on_once}),r.d(n,"send",function(){return T}),r.d(n,"markWindowKnown",function(){return markWindowKnown}),r.d(n,"cleanUpWindow",function(){return cleanUpWindow}),r.d(n,"bridge",function(){});var o="Call was rejected by callee.\r\n";function getActualProtocol(e){return void 0===e&&(e=window),e.location.protocol}function getProtocol(e){if(void 0===e&&(e=window),e.mockDomain){var t=e.mockDomain.split("//")[0];if(t)return t}return getActualProtocol(e)}function isAboutProtocol(e){return void 0===e&&(e=window),"about:"===getProtocol(e)}function getParent(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(t){}}function getOpener(e){if(void 0===e&&(e=window),e&&!getParent(e))try{return e.opener}catch(t){}}function canReadFromWindow(e){try{return!0}catch(t){}return!1}function getActualDomain(e){void 0===e&&(e=window);var t=e.location;if(!t)throw new Error("Can not read window location");var n=getActualProtocol(e);if(!n)throw new Error("Can not read window protocol");if("file:"===n)return"file://";if("about:"===n){var r=getParent(e);return r&&canReadFromWindow()?getActualDomain(r):"about://"}var o=t.host;if(!o)throw new Error("Can not read window host");return n+"//"+o}function getDomain(e){void 0===e&&(e=window);var t=getActualDomain(e);return t&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:t}function isSameDomain(e){if(!function(e){try{if(e===window)return!0}catch(n){}try{var t=Object.getOwnPropertyDescriptor(e,"location");if(t&&!1===t.enumerable)return!1}catch(n){}try{if(isAboutProtocol(e)&&canReadFromWindow())return!0}catch(n){}try{if(function(e){return void 0===e&&(e=window),"mock:"===getProtocol(e)}(e)&&canReadFromWindow())return!0}catch(n){}try{if(getActualDomain(e)===getActualDomain(window))return!0}catch(n){}return!1}(e))return!1;try{if(e===window)return!0;if(isAboutProtocol(e)&&canReadFromWindow())return!0;if(getDomain(window)===getDomain(e))return!0}catch(t){}return!1}function assertSameDomain(e){if(!isSameDomain(e))throw new Error("Expected window to be same domain");return e}function isAncestorParent(e,t){if(!e||!t)return!1;var n=getParent(t);return n?n===e:-1!==function(e){var t=[];try{for(;e.parent!==e;)t.push(e.parent),e=e.parent}catch(n){}return t}(t).indexOf(e)}function getFrames(e){var t,n,r=[];try{t=e.frames}catch(c){t=e}try{n=t.length}catch(c){}if(0===n)return r;if(n){for(var o=0;o>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,t={};return Object.freeze(t),e.set(t,"__testvalue__"),"__testvalue__"===e.get(t)}catch(n){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var e=CrossDomainSafeWeakMap.prototype;return e._cleanupClosedWindows=function(){for(var e=this.weakmap,t=this.keys,n=0;n=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var n=e&&e.stack,r=e&&e.message;if(n&&r)return-1!==n.indexOf(r)?n:r+"\n"+n;if(n)return n;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+stringifyError(o,t+1)}}function stringify(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function util_isRegex(e){return"[object RegExp]"==={}.toString.call(e)}function util_getOrSet(e,t,n){if(e.hasOwnProperty(t))return e[t];var r=n();return e[t]=r,r}function getBody(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function isDocumentReady(){return Boolean(document.body)&&"complete"===document.readyState}function isDocumentInteractive(){return Boolean(document.body)&&"interactive"===document.readyState}memoize.clear=function(){m=h},memoize(function(e){if(Object.values)return Object.values(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}),Error,memoize(function(){return new l(function(e){if(isDocumentReady()||isDocumentInteractive())return e();var t=setInterval(function(){if(isDocumentReady()||isDocumentInteractive())return clearInterval(t),e()},10)})});var g="undefined"!=typeof document?document.currentScript:null,w=memoize(function(){if(g)return g;if(g=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),t=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),n=t&&t[1];if(!n)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r { ... }":"<"+typeof e+">"}).join(", ");var t}(r.args)+") failed\n\n"+e.stack),e})}).then(function(e){return{result:e,id:o,name:i}})})});var c=n.__id__||uniqueID();e=I.unwrap(e);var u=n.__name__||n.name||r;return"string"==typeof u&&"function"==typeof u.indexOf&&0===u.indexOf("anonymous::")&&(u=u.replace("anonymous::",r+"::")),I.isProxyWindow(e)?(addMethod(c,n,u,e,t),e.awaitWindow().then(function(e){addMethod(c,n,u,e,t)})):addMethod(c,n,u,e,t),serializeType("cross_domain_function",{id:c,name:u})}function serializeMessage(e,t,n,r){var o,i=r.on,a=r.send;return function(e,t){void 0===t&&(t=S);var n=JSON.stringify(e,function(e){var n=this[e];if(isSerializedType(this))return n;var r=determineType(n);if(!r)return n;var o=t[r]||x[r];return o?o(n,e):n});return void 0===n?"undefined":n}(n,((o={}).promise=function(n,r){return function(e,t,n,r,o){return serializeType("cross_domain_zalgo_promise",{then:function_serializeFunction(e,t,function(e,t){return n.then(e,t)},r,{on:o.on,send:o.send})})}(e,t,n,r,{on:i,send:a})},o.function=function(n,r){return function_serializeFunction(e,t,n,r,{on:i,send:a})},o.object=function(e){return isWindow(e)||I.isProxyWindow(e)?serializeType("cross_domain_window",I.serialize(e,{send:a})):e},o))}function deserializeMessage(e,t,n,r){var o,i=r.send;return function(e,t){if(void 0===t&&(t=O),"undefined"!==e)return JSON.parse(e,function(e,n){if(isSerializedType(this))return n;var r,o;if(isSerializedType(n)?(r=n.__type__,o=n.__val__):(r=determineType(n),o=n),!r)return o;var i=t[r]||A[r];return i?i(o,e):o})}(n,((o={}).cross_domain_zalgo_promise=function(e){return new l(e.then)},o.cross_domain_function=function(n){return function(e,t,n,r){var o=n.id,i=n.name,a=r.send,s=function getDeserializedFunction(n){function crossDomainFunctionWrapper(){var r=arguments;return I.toProxyWindow(e,{send:a}).awaitWindow().then(function(e){var s=lookupMethod(e,o);if(s&&s.val!==crossDomainFunctionWrapper)return s.val.apply({source:window,origin:getDomain()},r);var c=[].slice.call(r);return n.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:c},{domain:t,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:c},{domain:t,fireAndForget:!1}).then(function(e){return e.data.result})}).catch(function(e){throw e})}return void 0===n&&(n={}),crossDomainFunctionWrapper.__name__=i,crossDomainFunctionWrapper.__origin__=t,crossDomainFunctionWrapper.__source__=e,crossDomainFunctionWrapper.__id__=o,crossDomainFunctionWrapper.origin=t,crossDomainFunctionWrapper},c=s();return c.fireAndForget=s({fireAndForget:!0}),c}(e,t,n,{send:i})},o.cross_domain_window=function(e){return I.deserialize(e,{send:i})},o))}var k={};function send_sendMessage(e,t,n,r){var o=r.on,i=r.send;return l.try(function(){var r=windowStore().getOrSet(e,function(){return{}});return r.buffer=r.buffer||[],r.buffer.push(n),r.flush=r.flush||l.flush().then(function(){if(isWindowClosed(e))throw new Error("Window is closed");var n,a=serializeMessage(e,t,((n={}).__post_robot_10_0_46__=r.buffer||[],n),{on:o,send:i});delete r.buffer;for(var s=Object.keys(k),c=[],u=0;u=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return base64ToBytes(e).length;default:if(r)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),r=!0}}function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function bidirectionalIndexOf(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=Buffer.from(t,r)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,n,r,o);if("number"===typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):arrayIndexOf(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function read(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,l=0;lo&&(r=o):r=o;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function base64Slice(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function utf8Slice(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:f>223?3:f>191?2:1;if(o+d<=n)switch(d){case 1:f<128&&(l=f);break;case 2:128===(192&(i=e[o+1]))&&(u=(31&f)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128===(192&i)&&128===(192&s)&&(u=(15&f)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],c=e[o+3],128===(192&i)&&128===(192&s)&&128===(192&c)&&(u=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&c)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=d}return function decodeCodePointsArray(e){var t=e.length;if(t<=a)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,n);case"utf8":case"utf-8":return utf8Slice(this,t,n);case"ascii":return asciiSlice(this,t,n);case"latin1":case"binary":return latin1Slice(this,t,n);case"base64":return base64Slice(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},Buffer.prototype.compare=function compare(e,t,n,r,o){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),u=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return hexWrite(this,e,t,n);case"utf8":case"utf-8":return utf8Write(this,e,t,n);case"ascii":return asciiWrite(this,e,t,n);case"latin1":case"binary":return latin1Write(this,e,t,n);case"base64":return base64Write(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var a=4096;function asciiSlice(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,n,r,o,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function objectWriteUInt32(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function checkIEEE754(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function writeFloat(e,t,n,r,i){return i||checkIEEE754(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function writeDouble(e,t,n,r,i){return i||checkIEEE754(e,0,n,8),o.write(e,t,n,r,52,8),n+8}Buffer.prototype.slice=function slice(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},Buffer.prototype.readUInt8=function readUInt8(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function readIntLE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},Buffer.prototype.readIntBE=function readIntBE(e,t,n){e|=0,t|=0,n||checkOffset(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function readInt8(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){t||checkOffset(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt16BE=function readInt16BE(e,t){t||checkOffset(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function readFloatLE(e,t){return t||checkOffset(e,4,this.length),o.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return t||checkOffset(e,4,this.length),o.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return t||checkOffset(e,8,this.length),o.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return t||checkOffset(e,8,this.length),o.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,n,r){(e=+e,t|=0,n|=0,r)||checkInt(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},Buffer.prototype.writeUInt8=function writeUInt8(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function writeIntLE(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);checkInt(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},Buffer.prototype.writeIntBE=function writeIntBE(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);checkInt(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},Buffer.prototype.writeInt8=function writeInt8(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,n){return e=+e,t|=0,n||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,n){return writeFloat(this,e,t,!0,n)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,n){return writeFloat(this,e,t,!1,n)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,n){return writeDouble(this,e,t,!0,n)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,n){return writeDouble(this,e,t,!1,n)},Buffer.prototype.copy=function copy(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function base64ToBytes(e){return r.toByteArray(function base64clean(e){if((e=function stringtrim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(s,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function blitBuffer(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(6))},function(e,t,n){"use strict";t.byteLength=function byteLength(e){var t=getLens(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function toByteArray(e){for(var t,n=getLens(e),r=n[0],a=n[1],s=new i(function _byteLength(e,t,n){return 3*(t+n)/4-n}(0,r,a)),c=0,u=a>0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function fromByteArray(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function encodeChunk(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,f=-7,l=n?o-1:0,d=n?-1:1,p=e[t+l];for(l+=d,i=p&(1<<-f)-1,p>>=-f,f+=s;f>0;i=256*i+e[t+l],l+=d,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,f=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*c-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(7);e.exports=function(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}},function(e,t,n){var r=n(20);"string"===typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(22)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(21)(!1)).push([e.i,".drift-conductor-item iframe,\n.drift-frame-controller {\n display: block;\n min-width: 0;\n max-width: none;\n min-height: 0;\n max-height: none;\n}\n\n.drift-conductor-item iframe {\n color-scheme: light only;\n border: none !important;\n background: transparent !important;\n width: 100% !important;\n height: 100% !important;\n max-width: 100% !important;\n}\n\n.drift-conductor-item.with-transition {\n -webkit-transition: opacity .5s ease, -webkit-transform .5s ease;\n transition: opacity .5s ease, -webkit-transform .5s ease;\n -o-transition: opacity .5s ease, -o-transform .5s ease;\n -moz-transition: opacity .5s ease, transform .5s ease, -moz-transform .5s ease;\n transition: opacity .5s ease, transform .5s ease;\n transition: opacity .5s ease, transform .5s ease, -webkit-transform .5s ease, -moz-transform .5s ease, -o-transform .5s ease;\n}\n\n.drift-frame-chat.with-transition.drift-frame-chat__takeover {\n -webkit-transition: opacity .5s ease;\n -o-transition: opacity .5s ease;\n -moz-transition: opacity .5s ease;\n transition: opacity .5s ease;\n}\n\n.drift-conductor-item.with-height-transition {\n -webkit-transition: max-height .5s ease, opacity .5s ease, -webkit-transform .5s ease;\n transition: max-height .5s ease, opacity .5s ease, -webkit-transform .5s ease;\n -o-transition: max-height .5s ease, opacity .5s ease, -o-transform .5s ease;\n -moz-transition: max-height .5s ease, opacity .5s ease, transform .5s ease, -moz-transform .5s ease;\n transition: max-height .5s ease, opacity .5s ease, transform .5s ease;\n transition: max-height .5s ease, opacity .5s ease, transform .5s ease, -webkit-transform .5s ease, -moz-transform .5s ease, -o-transform .5s ease;\n}\n\n.drift-conductor-item {\n -webkit-transform: translateZ(0);\n -moz-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n.drift-frame-controller {\n bottom: 24px;\n}\n\n.drift-frame-controller-align-left {\n left: 24px;\n}\n\n.drift-frame-controller-align-right {\n right: 24px;\n}\n\n.drift-frame-chat:not(iframe) {\n bottom: -webkit-calc(12px + 52px + 24px);\n bottom: -moz-calc(12px + 52px + 24px);\n bottom: calc(12px + 52px + 24px); /* vertical margin x 2 + widget icon size*/\n width: 100%;\n height: 100%;\n min-width: 320px;\n opacity: 0;\n visibility: hidden;\n\n -webkit-transform: translateY(88px);\n\n -moz-transform: translateY(88px);\n\n -ms-transform: translateY(88px);\n\n -o-transform: translateY(88px);\n\n transform: translateY(88px);\n}\n\n.drift-frame-chat:not(iframe).drift-chat-open {\n opacity: 1;\n visibility: visible;\n -webkit-transform: translateY(0px);\n -moz-transform: translateY(0px);\n -ms-transform: translateY(0px);\n -o-transform: translateY(0px);\n transform: translateY(0px);\n}\n\n.drift-frame-chat.drift-frame-chat__takeover:not(iframe):not(.drift-frame--mobile) {\n min-width: 600px;\n}\n\n.drift-frame-chat-align-left {\n left: 12px;\n}\n\n.drift-frame-chat-align-right {\n right: 12px;\n}\n\n.drift-frame-takeover,\n.drift-frame-landingPage,\n.drift-frame-chat__takeover {\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n min-height: 100%;\n min-width: 100%;\n}\n\n.drift-frame-chat__takeover.hide-frame {\n visibility: hidden;\n}\n\n.drift-frame-emailCapture {\n bottom: 0;\n height: -webkit-calc(100% + 30px);\n height: -moz-calc(100% + 30px);\n height: calc(100% + 30px);\n}\n\n.drift-frame-emailCapture-align-left {\n left: 0;\n}\n\n.drift-frame-emailCapture-align-right {\n right: 0;\n}\n\n.drift-frame-slider {\n bottom: 18px;\n height: -webkit-calc(100% + 20px);\n height: -moz-calc(100% + 20px);\n height: calc(100% + 20px);\n}\n\n.drift-frame-slider-align-left {\n left: 96px;\n}\n\n.drift-frame-slider-align-right {\n right: 96px;\n}\n\n.drift-frame--mobile.drift-frame-slider-align-left {\n left: 68px;\n}\n\n.drift-frame--mobile.drift-frame-slider-align-right {\n right: 68px;\n}\n\n.drift-widget-content-box {\n background: rgba(0,0,0,.5);\n width: 100%;\n height: 100%;\n\n position: fixed;\n z-index: 2147483647;\n top: 0;\n left: 0;\n}\n\n.drift-widget-content-box > * {\n margin: 0 auto;\n position: relative;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n -o-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n max-height: 80%;\n\n}\n\n/* Site Concierge Classes */\n.drift-frame-chat__sc-loaded:not(.drift-chat-open),\n.drift-frame-controller__sc-loaded {\n max-height: 0px !important;\n visibility: hidden !important;\n}\n\n.drift-frame-chat__sc-loaded {\n bottom: 0px !important;\n}\n\n@media\n(max-height: 685px),\n(min-width: 369px) and (max-width: 380px),\n(max-width: 367px),\n\n(min-device-width: 320px)\nand (max-device-width: 480px)\nand (-webkit-min-device-pixel-ratio: 2)\nand (orientation: portrait)\n\n{\n .drift-frame--mobile.drift-frame-chat.drift-chat-open {\n bottom: 0 !important;\n right: 0;\n left: 0;\n z-index: 2147483647 !important;\n }\n\n .drift-frame--mobile.drift-frame-controller {\n bottom: 0;\n }\n\n .drift-frame--mobile.drift-frame-controller.drift-frame-controller-align-left {\n left: 0;\n }\n\n .drift-frame--mobile.drift-frame-controller.drift-frame-controller-align-right {\n right: 0;\n }\n\n\n .drift-frame--mobile.drift-frame-controller.drift-chat-open {\n display: none;\n }\n\n .drift-frame--mobile.drift-frame-slider {\n bottom: 0;\n max-width: 320px;\n }\n\n .drift-frame--mobile iframe.drift-frame-chat {\n width: 1px !important;\n min-width: 100%;\n\n height: 1px !important;\n min-height: 100%;\n }\n\n html.drift-widget-parent--chat-open,\n html.drift-widget-parent--chat-open > body {\n height: 100vh !important;\n margin: 0 !important;\n min-height: 0 !important;\n overflow: hidden !important;\n position: static !important;\n }\n}\n\n@media only screen and (orientation: landscape) {\n .drift-frame--mobile.drift-frame-controller.drift-chat-open {\n display: none;\n }\n\n .drift-frame--mobile.drift-frame-controller {\n bottom: 0;\n }\n\n .drift-frame--mobile.drift-frame-controller-align-right {\n right: 0;\n }\n\n .drift-frame--mobile.drift-frame-controller-align-left {\n left: 0;\n }\n}\n\n.drift-frame-chat.widget--xs.drift-chat-open {\n bottom: 0 !important;\n right: 0 !important;\n left: 0 !important;\n}\n\n.drift-frame-controller.widget--xs.drift-chat-open {\n display: none;\n}\n\n",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function toString(){return this.map(function(t){var n=function cssWithMappingToString(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var o=function toComment(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"===typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&c.splice(t,1)}function createStyleElement(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function getNonce(){0;return n.nc}();r&&(e.attrs.nonce=r)}return addAttrs(t,e.attrs),insertStyleElement(e,t),t}function addAttrs(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function addStyle(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i="function"===typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var c=s++;n=a||(a=createStyleElement(t)),r=applyToSingletonTag.bind(null,n,c,!1),o=applyToSingletonTag.bind(null,n,c,!0)}else e.sourceMap&&"function"===typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof URL.revokeObjectURL&&"function"===typeof Blob&&"function"===typeof btoa?(n=function createLinkElement(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",addAttrs(t,e.attrs),insertStyleElement(e,t),t}(t),r=function updateLink(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=u(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){removeStyleElement(n),n.href&&URL.revokeObjectURL(n.href)}):(n=createStyleElement(t),r=function applyToTag(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){removeStyleElement(n)});return r(e),function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!==typeof DEBUG&&DEBUG&&"object"!==typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"===typeof t.attrs?t.attrs:{},t.singleton||"boolean"===typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=listToStyles(e,t);return addStylesToDom(n,t),function update(e){for(var o=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&"[object Array]"===Object.prototype.toString.call(e)};function _isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}var b=_curry1(function empty(e){return null!=e&&"function"===typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"===typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"===typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"===typeof e.constructor.empty?e.constructor.empty():_(e)?[]:_isString(e)?"":_isObject(e)?{}:y(e)?function(){return arguments}():void 0});function _arrayFromIterator(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function _includesWith(e,t,n){for(var r=0,o=n.length;r=0;)_has(t=S[n],e)&&!O(r,t)&&(r[r.length]=t),n-=1;return r}):_curry1(function keys(e){return Object(e)!==e?[]:Object.keys(e)}),k=_curry1(function type(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function _uniqContentEquals(e,t,n,r){var o=_arrayFromIterator(e);function eq(e,t){return _equals(e,t,n.slice(),r.slice())}return!_includesWith(function(e,t){return!_includesWith(eq,t,e)},_arrayFromIterator(t),o)}function _equals(e,t,n,r){if(E(e,t))return!0;var o=k(e);if(o!==k(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===function _functionName(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!E(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!E(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&_uniqContentEquals(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&_uniqContentEquals(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=I(e);if(a.length!==I(t).length)return!1;var s=n.concat([e]),c=r.concat([t]);for(i=a.length-1;i>=0;){var u=a[i];if(!_has(u,t)||!_equals(t[u],e[u],s,c))return!1;i-=1}return!0}var T=_curry2(function equals(e,t){return _equals(e,t,[],[])}),C=_curry1(function isEmpty(e){return null!=e&&T(e,b(e))});function _dispatchable(e,t,n){return function(){if(0===arguments.length)return n();var r=Array.prototype.slice.call(arguments,0),o=r.pop();if(!_(o)){for(var i=0;i0?(this.n-=1,e):this.xf["@@transducer/step"](e,t)},XDrop}(),L=_curry2(function _xdrop(e,t){return new D(e,t)});function _checkForMethod(e,t){return function(){var n=arguments.length;if(0===n)return t();var r=arguments[n-1];return _(r)||"function"!==typeof r[e]?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var F=_curry3(_checkForMethod("slice",function slice(e,t,n){return Array.prototype.slice.call(n,e,t)})),B=_curry2(_dispatchable(["drop"],L,function drop(e,t){return F(Math.max(0,e),1/0,t)})),W=_curry2(function takeLast(e,t){return B(e>=0?t.length-e:0,t)}),M=_curry2(function(e,t){return T(W(e.length,t),e)});const N={EMAIL_CAPTURE:"emailCapture",SLIDER:"slider",TAKEOVER:"takeover",CONTROLLER:"controller",CHAT:"chat",LANDING_PAGE:"landingPage"},j={"drift-frame-emailCapture":N.EMAIL_CAPTURE,"drift-frame-chat":N.CHAT,"drift-frame-controller":N.CONTROLLER,"drift-frame-slider":N.SLIDER,"drift-frame-takeover":N.TAKEOVER},U="right",z="left",G="US",q="EU",H={emailCapture:"Drift Widget Chat Email Capture",slider:"Drift Widget Message Preview",takeover:"Drift Takeover Modal",controller:"Drift Widget Chat Controller",chat:"Drift Widget Chat Window",landingPage:"Drift Landing Page"},$="u";var Y=function getOrCreateFramesMap(){var e={};return window._driftFrames?window._driftFrames:(window._driftFrames=e,e)}(),V=n(5);function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var X=function(){function XAny(e,t){this.xf=t,this.f=e,this.any=!1}return XAny.prototype["@@transducer/init"]=P,XAny.prototype["@@transducer/result"]=function(e){return this.any||(e=this.xf["@@transducer/step"](e,!1)),this.xf["@@transducer/result"](e)},XAny.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.any=!0,e=_reduced(this.xf["@@transducer/step"](e,!0))),e},XAny}(),Z=_curry2(_dispatchable(["any"],_curry2(function _xany(e,t){return new X(e,t)}),function any(e,t){for(var n=0;n-1),K=[],Q=function listen(e){var t=e.topic,n=e.handler;try{var r=he(),o=Object(V.on)(t,{domain:r},function handlerFunctionWrapper(e,t){return function handlerWrapper(n){var r=Z(function(e){var t;return(null===e||void 0===e?void 0:null===(t=e.$frame)||void 0===t?void 0:t.contentWindow)===n.source},Object.values(Y));if(n.source===window||r)return J&&console.debug("".concat(f.PROJECT_NAMESPACE,":LISTEN: ").concat(e,"::"),n),t.apply(this,arguments);ae({data:["message from untrusted frame",n]})}}(t,n));K.push(o)}catch(i){"PRODUCTION"!==f.ENV&&console.warn(i)}},ee=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e){var t,n,r,o,a,s,c,u;return i.a.wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(t=e.name,n=e.message,r=e.topic,o=e.waitForResponse,a=void 0===o||o,Y[t]){i.next=4;break}return ce(new Error("Failed to find frame ".concat(t," to broadcast message to topic ").concat(r))),i.abrupt("return");case 4:if(s=Y[t].$frame){i.next=8;break}return ce(new Error("Failed to grab frame element for frame ".concat(t," to broadcast message to topic ").concat(r))),i.abrupt("return");case 8:return c=_objectSpread2({_meta:{id:ie(),source:"drift_widget"}},n),i.prev=9,ae({data:["SEND: ".concat(t," | ").concat(c._meta.id),c]}),i.next=13,Object(V.send)(s.contentWindow,r,c,{timeout:2e4,window:s.contentWindow,domain:he(),fireAndForget:!a});case 13:return u=i.sent,ae({data:["RESPONSE: ".concat(t," | ").concat(c._meta.id),u]}),i.abrupt("return",u);case 18:i.prev=18,i.t0=i.catch(9),ae({type:"warn",data:["Error sending message",i.t0]}),ae({type:"warn",data:["Original message",n]});case 22:case"end":return i.stop()}},_callee,null,[[9,18]])}));return function broadcast(t){return e.apply(this,arguments)}}(),te=!!(g("",["location","search"],window).indexOf("driftEnableLog")>-1),ne="PRODUCTION"!==f.ENV||te,re="PRODUCTION"!==f.ENV||te,oe=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e){return i.a.wrap(function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){try{setTimeout(function(){t("")},e)}catch(r){n(new Error("Pause timeout failed"))}}));case 1:case"end":return t.stop()}},_callee)}));return function pause(t){return e.apply(this,arguments)}}(),ie=function uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},ae=function log(e){var t,n=e.type,r=void 0===n?"log":n,o=e.data;o=Array.isArray(o)?o:[o],ne&&(t=console)[r].apply(t,["".concat(f.PROJECT_NAMESPACE,"::")].concat(_toConsumableArray(o)))},se=function warn(e){ae({type:"warn",data:e})},ce=function error(e,t){var error=e instanceof Error?e:new Error(e);!function errorHandler(e){if(re)throw e;ae({type:"warn",data:[e.message]}),function sendErrorToController(e){Y[N.CONTROLLER]&&window.drift.controllerReady&&ee({name:"controller",topic:"log-conductor-error",message:{message:e.message}})}(error)}(error)},ue=function apiWarning(){for(var e,t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]&&arguments[0];return void 0===Ce&&(Ce=Re(e)||Le(e)),Ce},Re=function isAndroid(){var e,t,n,r,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return/Android/i.test(null===(e=navigator)||void 0===e?void 0:e.userAgent)&&(o||(null===(t=navigator)||void 0===t?void 0:null===(n=t.userAgent)||void 0===n?void 0:null===(r=n.toLowerCase())||void 0===r?void 0:r.indexOf("mobile"))>=0)},De=function isIPad(){var e,t;return/iPad/i.test(null===(e=navigator)||void 0===e?void 0:e.userAgent)||!/iPhone|iphone/i.test(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&navigator.maxTouchPoints>1},Le=function isIOS(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return/iPhone|iPod/i.test(null===(e=navigator)||void 0===e?void 0:e.userAgent)||t&&De()},Fe=function isInternetExplorerBrowser(){return/(MSIE (9|10))|(rv:11.0)/i.test(navigator.userAgent)},Be=null,We=null,Me=560,Ne=512,je=640,Ue=function getTargetedBreakpointByBrowser(){return We||(We=function isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}()?Ne:function isSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}()?je:Me),We},ze=function isXSScreenSize(){var e=Ue();return function getCurrentWidth(){var e,t,n;return window.drift_iframe_mode?null===(t=window.drift_iframe_window_context)||void 0===t?void 0:null===(n=t.window)||void 0===n?void 0:n.innerWidth:window.innerWidth>0?window.innerWidth:null===(e=window.screen)||void 0===e?void 0:e.width}()<=e},Ge=function isNewBreakPoint(){var e=!1,t=ze();return t!==Be&&(e=!0),Be=t,e},qe=function getFrameStyles(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:U,i=Pe(),a={width:t,"max-width":"none",position:"fixed",zIndex:"2147483647"};if(r?a["max-height"]=n:a.height=n,"controller"===e&&(a.bottom=i?Ae:"24px"),"slider"===e){var s=ze()?"-20":"20";a.bottom=i?"0":"18px",a.height="calc(100% + ".concat(s,"px)"),i&&(a.maxWidth="335px")}return"emailCapture"===e&&(a.bottom=Ae,a.height="calc(100% + 30px)"),"takeover"!==e&&"chat__takeover"!==e||(a.left=Ae,a.top=Ae,a.bottom=ke,a.right=ke,a.width=Se,a.height=Se,a["max-height"]=Se),"chat"===e&&(a.bottom="88px",a.opacity=Ae,a.visibility="hidden",a["min-width"]="320px",a.height=Se,a.width=Se,o===U?a.right="12px":o===z&&(a.left="12px")),a},He=function setDivStyle(e,t,n,r,o,i){!function applyStylesToDiv(e,t){Object.keys(t).forEach(function(n){"height"!==n&&"width"!==n||Fe()?e.style[n]=t[n]:e.style.setProperty(n,t[n],"important")})}(e,qe(o,t,n,r,i))},$e=function setDivAlignment(e,t,n){var r=Pe(),o=r?"0":"24px",i=r?"0":"24px";"slider"===t&&(o=r?"68px":"92px",i=r?"68px":"92px"),"emailCapture"===t&&(o="0",i="0"),"left"===n?e.style.left=o:"right"===n&&(e.style.right=i)};const Ye={...{API_READY:"drift::apiReady",READY:"drift::ready"},...{EMAIL_CAPTURED:"drift::emailCapture",PHONE_NUMBER_CAPTURED:"drift::phoneCapture"},...{CONVERSATION_STARTED:"drift::startConversation",CONVERSATION_SELECTED:"drift::conversation:selected",CONVERSATION_BUTTON_CLICKED:"drift::conversation:buttonClicked",CONVERSATION_INTERACTED:"drift::conversation:firstInteraction",CONVERSATION_PLAYBOOK_CLICKED:"drift::conversation:playbookClicked",CONVERSATION_PLAYBOOK_FIRED:"drift::conversation:playbookFired",CONVERSATION_PLAYBOOK_DISMISSED:"drift::conversation:playbookDismissed"},...{MEETING_REQUESTED:"drift::scheduling:requestMeeting",MEETING_BOOKED:"drift::scheduling:meetingBooked"},...{WELCOME_MESSAGE_OPENED:"drift::welcomeMessage:open",WELCOME_MESSAGE_CLOSED:"drift::welcomeMessage:close",AWAY_MESSAGE_OPENED:"drift::awayMessage:open",AWAY_MESSAGE_CLOSED:"drift::awayMessage:close"},...{MESSAGE_RECEIVED:"drift::message",MESSAGE_SENT:"drift::message:sent"},...{CAMPAIGN_CLICKED:"drift::campaign:click",CAMPAIGN_SUBMITTED:"drift::campaign:submit",CAMPAIGN_OPENED:"drift::campaign:open",CAMPAIGN_DISMISSED:"drift::campaign:dismiss"},...{SLIDER_CLOSED:"drift::sliderMessage:close"},...{CHAT_OPENED:"drift::chatOpen",CHAT_CLOSED:"drift::chatClose"},...{SIDEBAR_OPENED:"drift::sidebarOpen",SIDEBAR_CLOSED:"drift::sidebarClose"},...{USER_ATTRIBUTES_UPDATED:"drift::user:attributesUpdated"},...{IFRAME_RESIZED:"drift::iframeResize"},...{GDPR_CLICKED:"drift::gdprClicked",GDPR_REQUESTED:"drift::gdprRequested"},...{BOOTSTRAP_FAILED:"drift::bootstrapFailed"}},Ve=["app","collectFormData","commitFormData","connectForm","goToConversation","goToNewConversation","goToConversationList","hideAwayMessage","hideChat","hidePreview","hideWelcomeMessage","off","on","openChat","toggleChat","scheduleMeeting","setUserAttributes","showAwayMessage","showWelcomeMessage","showWelcomeOrAwayMessage","stageFormData","startInteraction","startVideoGreeting","toggleChat","toggleChatTakeoverModal","exitCohabitation"],Xe=["hide","show"],Ze=["toggleChatTakeoverModal"],Je=["init","load","reset","debug","on","off","unload","identify","show","hide","config","setContext"],Ke=["init","load","track","reset","debug","ping","page","on","off","show","hide","identify","config","unload","setContext","evaluateCampaignTargeting","toggleHoursAndTargeting","unfollow","waitForUserJwt","setUserJwt"].concat(Ve),Qe={ALL_FRAMES_READY:"drift::allFramesReady",CLEAR_EVENT_Q:"drift::_clearEventQ",CHAT_READY:"drift::chatReady",CONTROLLER_READY:"drift::controllerReady",LANDINGPAGE_READY:"drift::landingPageReady",DEBUG_INIT:"drift::debug:init"},et=[Ye.READY,Ye.API_READY,Qe.CONTROLLER_READY,Qe.LANDINGPAGE_READY,Qe.CHAT_READY,Qe.CLEAR_EVENT_Q,Qe.ALL_FRAMES_READY];function _indexOf(e,t,n){var r,o;if("function"===typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(r=1/t;n=0}var tt=_curry2(_includes);!function(){if("function"===typeof window.CustomEvent)return!1;var e={bubbles:!1,cancelable:!1,detail:void 0};function CustomEvent(t,n){n=n?_objectSpread2(_objectSpread2({},e),n):e;var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r}CustomEvent.prototype=window.Event.prototype,window.CustomEvent=CustomEvent}();var nt,rt=function createEvent(e,t){if(!window.drift.ready&&!tt(e,et)&&e!==Ye.BOOTSTRAP_FAILED)window.drift.iq.push({name:e,payload:t});else{var n=new CustomEvent(e,{detail:t||{}});document.dispatchEvent(n)}},ot=function isInIframeMode(){return!!window.drift_iframe_mode},it=function getIframeWindowContext(){return de(window.drift_iframe_window_context)?window:window.drift_iframe_window_context},at=new function IframeModeResizeManager(){var e=this;_classCallCheck(this,IframeModeResizeManager),this._lastOffsetApplied=void 0,this._sendResizeEventForTakeover=function(t){var n=Y[N.TAKEOVER],r=Y[N.CONTROLLER];$e(r.$div,N.CONTROLLER,t),r.$div.style.bottom=e._lastOffsetApplied.vertical?e._lastOffsetApplied.vertical:"12px",r.$div.style[t]=e._lastOffsetApplied.horizontal?e._lastOffsetApplied.horizontal:"12px";var o=e._getIframeWrappedStyles(n,t);rt(Ye.IFRAME_RESIZED,{styles:o})},this.checkAndApplyOffsets=function(t,n){var r,o,i;if(ot()&&ze()&&(null===Y||void 0===Y?void 0:null===(r=Y.chat)||void 0===r?void 0:null===(o=r.$div)||void 0===o?void 0:null===(i=o.classList)||void 0===i?void 0:i.contains("drift-chat-open")))return t.bottom=0,void(t[n]=0);e._lastOffsetApplied.vertical&&(t.bottom=e._lastOffsetApplied.vertical),e._lastOffsetApplied.horizontal&&(t[n]=e._lastOffsetApplied.horizontal)},this._sendResizeEventForEmailCapture=function(t){var n=Y[N.EMAIL_CAPTURE],r=e._getIframeWrappedStyles(n,t);e.checkAndApplyOffsets(r,t),rt(Ye.IFRAME_RESIZED,{styles:r})},this._sendResizeEventForSlider=function(t){var n=Y[N.CONTROLLER],r=Y[N.SLIDER],o=e._getIframeWrappedStyles(r,t);r.$div.style.bottom=Ae,n.$div.style.bottom=Ae,e.checkAndApplyOffsets(o,t),rt(Ye.IFRAME_RESIZED,{styles:o})},this._sendResizeEventForChat=function(t){var n=Y[N.CHAT],r=Y[N.CONTROLLER];if(n&&r){var o=e._getIframeWrappedChatStyles(n.$div,r.$div,t);e.checkAndApplyOffsets(o,t),rt(Ye.IFRAME_RESIZED,{styles:o})}},this._getIframeWrappedChatStyles=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U,r=Pe(),o={width:function getWidthStyle(){var n=parseFloat(e.style.width),o=parseFloat(e.style.maxHeight),i=parseFloat(t.style.width);return 0===i?"0px":0===o?"".concat(i,"px"):r?"100%":"".concat(Math.max(n,i),"px")}(),height:"98%",bottom:"24px",left:n===U?ke:"24px",right:n===U?"24px":ke,top:ke,position:"fixed",border:"none","z-index":"2147483647","max-height":function getHeightStyle(){var n=parseFloat(e.style.maxHeight),o=parseFloat(e.style.maxHeight),i=parseFloat(t.style.height);return 0===i?"0px":0===o?"".concat(i,"px"):r?Se:"".concat(n+i,"px")}()};return r&&(o.left=n===U?ke:Ae,o.right=n===U?Ae:ke,o.bottom=Ae),e.style.bottom="64px",n===U?(e.style.right="-12px",t.style.right=Ae):(e.style.left="-12px",t.style.left=Ae),t.style.bottom=Ae,o},this._getIframeWrappedStyles=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U;if(e.name===N.TAKEOVER)return _objectSpread2(_objectSpread2({},qe(N.TAKEOVER)),{},{border:"none"});if(e.name===N.EMAIL_CAPTURE){var n=_objectSpread2(_objectSpread2({},qe(N.EMAIL_CAPTURE)),{},{bottom:e.$div.style.bottom,width:e.$div.style.width,height:e.$div.style.height,border:"none","max-height":e.$div.style.maxHeight});return t===U?n.right="0":n.left="0",n}if(e.name===N.SLIDER){var r=parseFloat(e.$div.style.width)+76,o=parseFloat(e.$div.style.maxHeight)+24;return _objectSpread2(_objectSpread2({},qe(N.SLIDER)),{},{width:"".concat(r,"px"),top:ke,bottom:"24px",left:t===U?ke:"24px",right:t===U?"24px":ke,"max-height":"".concat(o,"px"),"z-index":"2147483647",border:"none"})}},this.applyOffset=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"vertical",r=arguments.length>2?arguments[2]:void 0;if(ot()){var o=it(),i="vertical"===n?{window:o.window.innerHeight,chat:o.window.innerHeight-374}:{window:o.window.innerWidth,chat:o.window.innerWidth-Ee},a=i.window-i.chat,s="".concat(t>a?a:t,"px");rt(Ye.IFRAME_RESIZED,{styles:_defineProperty({},r,s)}),e._lastOffsetApplied[n]=s}},this.handleFrameResize=function(){if(ot()){var t=Y[N.CONTROLLER],n=Te(t);return Y[N.TAKEOVER]?e._sendResizeEventForTakeover(n):Y[N.EMAIL_CAPTURE]?e._sendResizeEventForEmailCapture(n):Y[N.SLIDER]?e._sendResizeEventForSlider(n):e._sendResizeEventForChat(n)}},this._lastOffsetApplied={horizontal:null,vertical:null}},st=_curry1(function values(e){for(var t=I(e),n=t.length,r=[],o=0;oa,p=a-be-12;if(ze())o=a;else if(d)o=Math.min(p,t);else if(!u&&l||d){o=a-(s<=380?0:90)}else o=f;return o}};!function(e){e.SHOW="show",e.HIDE="hide",e.NONE="none"}(nt||(nt={}));var dt=[N.EMAIL_CAPTURE,N.SLIDER,N.TAKEOVER],pt=function onFrameDimensionsChanged(){at.handleFrameResize()},ht=function killFrame(e){var t=e.name;Y[t]||ae({type:"log",data:["No Frame with this name exists ".concat(t)]});var n=document.querySelector(".drift-frame-".concat(t));n&&n.parentNode&&n.parentNode.removeChild(n),delete Y[t],pt()},mt=function killAnnouncementFrames(){dt.forEach(function(e){return ht({name:e})})},gt=function killAllFrames(){Object.keys(Y).forEach(function(e){ht({name:e})}),function clearListeners(){K.map(function(e){return e.cancel()})}()},wt=function hideFrameFromScreenReaders(e){var t=e.name,n=Y[t];if(n){var r=n.$div,o=n.$frame;r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),o.setAttribute("tabindex","-1")}},vt=function showFrameToScreenReaders(e){var t=e.name,n=Y[t];if(n){var r=n.$div,o=n.$frame;r.removeAttribute("aria-hidden"),r.removeAttribute("tabindex"),o.removeAttribute("aria-hidden"),o.removeAttribute("tabindex")}},yt=function generateFrame(e){var t=e.name,n=e.height,r=void 0===n?"none":n,o=e.width,i=void 0===o?"":o,a=e.path,s=void 0===a?"":a,c=e.max,u=void 0===c||c,f=e.alignment,l=void 0===f?U:f,d=e.insertBefore,p=void 0===d?"":d,h=e.insertInside,m=void 0===h?"":h,g=e.verticalOffset,w=e.horizontalOffset;if(!Y[t]){var v=document.createElement("iframe");if(!v)return ce(new Error("Unable to create new iframe element on the DOM")),null;v.setAttribute("class","".concat("drift-frame","-").concat(t)),v.setAttribute("scrolling","no"),v.setAttribute("title",H[t]),v.setAttribute("allow","autoplay; encrypted-media; fullscreen;"),v.setAttribute("frameborder","0"),null!=window.drift_iframe_sandbox&&window.drift_iframe_sandbox.length>0&&v.setAttribute("sandbox",window.drift_iframe_sandbox),function setFrameStyle(e){var t=Pe();e.style.background="transparent",e.style.width=t?"1px":Se,e.style.maxWidth=Se,e.style.height=t?"1px":Se,e.style.border="none",t&&(e.style.minWidth=Se,e.style.minHeight=Se)}(v);var y=he(),_="";t!==N.EMAIL_CAPTURE&&t!==N.SLIDER&&t!==N.TAKEOVER||(_="?isXSScreenSize="+ze()),v.src="".concat(y,"/").concat(s).concat(_);var b=Vt({name:t,frame:v,height:r,width:i,insertInside:m,insertBefore:p,alignment:l,max:u});return Y[t]={$frame:v,$div:b,name:t},g&&Et({offset:g}),w&&bt({offset:w}),pt(),b}se(["A frame with this name has already been generated."])},_t=function setOffsetForFrames(e){var t=e.offset,n=e.type,r=e.affectedStyle,o=e.maxOffset,i=e.maxPreviewSizeDefault,a=e.nonMobileResponsiveSize,s=e.windowSize,c=e.customOffset,u=void 0===c?{}:c,f=Pe(),l=f?["controller","slider","emailCapture"]:["controller","slider","chat","emailCapture"];"string"===typeof t&&(t=t.replace("px",""),t=parseFloat(t),isNaN(t))?se(["Unable to apply ".concat(n," offset - invalid input ").concat(t)]):ot()?at.applyOffset(t,n,r):st(Y).forEach(function(e){var c=e.$div,d=e.name,p=t,h=ut(function(e){return e===d},l);if(h){var m=function calcBounds(e){var t=s-(f?o-be:a||e)-be,n=p>t;return u&&u[h]&&(p+=u[h],t+=u[h]),{isOffsetBeyondBounds:n,maxAvailableOffset:t}}(i),g=m.isOffsetBeyondBounds,w=m.maxAvailableOffset,v=function calcSize(e,t,n,r){return"".concat(e?Math.max(t,n):r,"px")}(g,Number(c.style[r].replace("px","")),w,p);"vertical"===n&&(window.drift.offset=Number(v.replace("px",""))),c.style[r]=v}})},bt=function setHorizontalOffsetForFrames(e){var t=e.offset,n=Te(Y.controller);_t({offset:t,type:"horizontal",maxOffset:330,maxPreviewSizeDefault:Ee,nonMobileResponsiveSize:lt(Y.chat,Ee),windowSize:document.documentElement.clientWidth,affectedStyle:n,customOffset:{chat:-12,slider:be}})},Et=function setVerticalOffsetForFrames(e){var t=e.offset,n=!de(document.documentElement.clientHeight)&&document.documentElement.clientHeight<700?374:602;_t({offset:t,type:"vertical",maxOffset:260,maxPreviewSizeDefault:n,nonMobileResponsiveSize:lt(Y.chat,n),windowSize:document.documentElement.clientHeight,affectedStyle:"bottom",customOffset:{chat:be+-12}})},xt=function alignFrames(e){var t=e.alignment,n=void 0===t?U:t,r=Pe()?["controller","slider"]:["controller","slider","chat"];st(Y).forEach(function(e){var t=e.$div,o=e.name;-1!==r.indexOf(o)&&(t.classList.remove("".concat("drift-frame","-").concat(o,"-align-right")),t.classList.remove("".concat("drift-frame","-").concat(o,"-align-left")),t.classList.add("".concat("drift-frame","-").concat(o,"-align-").concat(n)))})},St=function getFrameHeight(e){var t=e.name;return Y[t]||ce(new Error("Attempting to get height on an unmounted frame: ".concat(t))),Y[t].$div.style.height},At=le(function(e){return function setFrameDimensions(e){var t=e.height,n=e.width,r=e.name;Y[r]||ce(new Error("Attempting to set dimensions on an unmounted frame: ".concat(r)));var o=Y[r],i=o.$div,a=o.$frame,s=i.style.height,c=i.style.width;s===t&&c===n||(i.style.height=t,a.style.height=t,i.style.width=n,a.style.width=n,pt())}({height:e.height,width:e.width,name:e.name})},100),Ot=function toggleClassByCondition(e,t,n){t?e.classList.add(n):e.classList.contains(n)&&e.classList.remove(n)},It=function setFrameHeight(e){var t,n,r,o,i=e.height,a=e.name,s=e.transition,c=void 0!==s&&s,u=e.transitionHeight,f=void 0===u||u,l=e.max,d=void 0===l||l,p=e.intent,h=void 0===p?nt.NONE:p;Y[a]||ce(new Error("Attempting to set height on an unmounted frame: ".concat(a)));var m=Y[a].$div,g=d?m.style.maxHeight:m.style.height,w=h===nt.SHOW&&g!==Ae;if(g!==i&&!w){var v=c&&f&&g!==Ae&&i!==Ae;Ot(m,c,"with-transition"),Ot(m,v,"with-height-transition");var y=null===(t=Ft())||void 0===t?void 0:t.innerHeight,_="".concat(null!==(n=null===(r=Ft())||void 0===r?void 0:null===(o=r.visualViewport)||void 0===o?void 0:o.height)&&void 0!==n?n:y,"px"),b=i===_||i===y||"100%"===i;a===N.CONTROLLER&&(i=function getAndPersistHeight(e,t,n){return e.dataset.prevHeight&&(t=e.dataset.prevHeight,delete e.dataset.prevHeight),t===Ae&&(e.dataset.prevHeight=n),t}(m,i,g)),d?(a===N.CHAT&&(Ct(kt),m.style.setProperty("height",Pe()||ze()?Le()?Oe:_:"calc(100% - 75px)","important")),m.style.setProperty("max-height",i,"important"),b&&Pe(!1)&&!Le()&&Tt(kt)):m.style.setProperty("height",i,"important"),pt()}},kt=function mobileDetection(){var e,t,n,r,o=null===(e=Ft())||void 0===e?void 0:e.innerHeight,i=null!==(t=null===(n=Ft())||void 0===n?void 0:null===(r=n.visualViewport)||void 0===r?void 0:r.height)&&void 0!==t?t:o;o!==i&&It({height:"".concat(i,"px"),name:N.CHAT,transition:!0}),o===i&&It({height:o+"px",name:N.CHAT,transition:!0})},Tt=function OskDetectionOn(e){window.addEventListener("resize",e),window.addEventListener("orientationchange",e)},Ct=function OskDetectionOff(e){window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)},Pt=function setFrameWidth(e){var t=e.width,n=e.name,r=e.transition,o=void 0!==r&&r;Y[n]||ce(new Error("Attempting to set width on an unmounted frame: ".concat(n)));var i=Y[n],a=i.$div,s=i.$frame;if(a.style.width!==t)return Ot(a,o,"with-transition"),a.style.setProperty("width",t,"important"),s.style.setProperty("width",t,"important"),a.style.width},Rt=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e){var t,n,r,o,a,s,c,u,f,l,d;return i.a.wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return t=e.className,n=void 0===t?"":t,r=e.height,o=e.max,a=e.name,s=e.transition,c=void 0!==s&&s,u=e.width,Y[a]||ce(new Error("Attempting to set width and height on an unmounted frame: ".concat(a))),f=Y[a],l=f.$div,d=f.$frame,n&&l.classList.add(n),Ot(l,c,"with-transition"),r&&(o?l.style.maxHeight=r:l.style.height=r),u&&(l.style.width=u,d.style.width=u),pt(),i.abrupt("return",l);case 9:case"end":return i.stop()}},_callee)}));return function setFrameWidthAndHeight(t){return e.apply(this,arguments)}}(),Dt=function isChatFrameOpen(){var e,t,n;return null===Y||void 0===Y?void 0:null===(e=Y.chat)||void 0===e?void 0:null===(t=e.$div)||void 0===t?void 0:null===(n=t.classList)||void 0===n?void 0:n.contains("drift-chat-open")},Lt=function setResponsiveChatHeight(e){var t=e||{},n=t.name,r=void 0===n?"chat":n,o=t.defaultHeight,i=void 0===o?602:o,a=t.transition,s=void 0===a||a;if(!function isIframeModeAndChatClosed(e){return ot()&&"chat"===e&&!Dt()}(r)){var c=Pe()?Oe:"".concat(lt(Y.chat,i),"px");It({height:c,name:r,transition:s})}},Ft=function getWindow(){var e;return ot()&&(null===(e=it())||void 0===e?void 0:e.window)||window},Bt=function setResponsiveChatWidth(e){var t,n=e||{},r=n.name,o=void 0===r?"chat":r,i=n.defaultWidth,a=void 0===i?Ee:i,s=n.transition,c=void 0===s||s,u=Ft().innerWidth;t=Pe()?Ie:ze()?"".concat(u,"px"):"".concat(u<=380?u:a,"px"),Pt({width:t,name:o,transition:c}),pt()},Wt=function waitUntilInnerHeightSettles(){return new window.Promise(function(e){!function step(t,n){window.innerHeight!==n||t>=120?e():window.requestAnimationFrame(function(){return step(t+1,n)})}(0,window.innerHeight)})},Mt=function toggleResponsiveClassName(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=ze();function toggleClassName(e){e.classList[t?"add":"remove"]("widget--xs")}Pe()||(e?toggleClassName(e):st(Y).forEach(function(e){return toggleClassName(e.$div)}))},Nt=null,jt=function setResponsiveChatDimensions(){Bt(),Lt()},Ut=function startResponsiveSizeListeners(e){function broadcastReflowEvent(){Pe()||st(Y).forEach(function(t){var n,r=t.$div.id.replace("drift-frame-","");r&&r!==N.CONTROLLER&&(r!==N.CHAT||e)&&ee({name:r,message:{isXSScreenSize:ze(),clientInnerHeight:null===(n=Ft())||void 0===n?void 0:n.innerHeight},topic:"CONDUCTOR:reflowFrame",waitForResponse:!1})})}zt(),Nt=Object(ft.throttle)(200,!1,function createSizeChangeEventHandler(e){return _asyncToGenerator(i.a.mark(function _callee2(){return i.a.wrap(function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(!Le(!0)){t.next=3;break}return t.next=3,Wt();case 3:Dt&&(Bt({transition:!1}),Lt({transition:!1})),st(Y).forEach(function(e){var t=e.$div.id.replace("drift-frame-","");if([N.EMAIL_CAPTURE,N.SLIDER].includes(t)){var n,r=Ft().innerWidth,o=xe[t.toUpperCase()];if(Pe())o=Se;else if(ze()){var i=t===N.SLIDER?"20px":"0";o="".concat(r,"px"),n="calc(100% - ".concat(i,")")}o&&Rt({name:t,height:n,width:o,transition:!1,max:!0})}}),Ge()&&(Mt(),e());case 6:case"end":return t.stop()}},_callee2)}))}(broadcastReflowEvent)),Le(!0)?window.addEventListener("orientationchange",Nt):window.addEventListener("resize",Nt),Mt(),broadcastReflowEvent()},zt=function stopResponsiveSizeListeners(){Nt&&(window.removeEventListener("orientationchange",Nt),window.removeEventListener("resize",Nt),Nt=null)},Gt=function toggleHasChat(){st(Y).forEach(function(e){return e.$div.classList.add("drift-has-chat")})},qt=function toggleChatOpen(e,t){t&&(Pe()||ze())&&document.getElementsByTagName("html")[0].classList[e?"add":"remove"]("drift-widget-parent--chat-open");st(Y).forEach(function(t){var n,r=t.$div,o=null!==(n=j[r.id])&&void 0!==n?n:null;!function toggleStylesOnChatOpen(e,t){var n,r=Pe(),o=null!==(n=j[e.id])&&void 0!==n?n:null,i=o===N.CHAT,a=o===N.CONTROLLER;t?i?(e.style.opacity="1",e.style.visibility="visible",r&&(e.style.bottom=Ae,e.style.right=Ae,e.style.left=Ae)):r&&a&&(e.style.display="none"):i?(e.style.opacity="0",e.style.visibility="hidden"):r&&a&&(e.style.display="block")}(r,e),o===N.CHAT&&function showOrHideFromScreenReaders(e,t){if(e)t?vt({name:e}):wt({name:e})}(N.CHAT,e),e?r.classList.add("drift-chat-open"):r.classList.remove("drift-chat-open")})},Ht=function destroyContentBox(){var e=document.querySelector(".drift-widget-content-box");e&&document.body&&document.body.removeChild(e)},$t=function generateContentBox(e){var t=e.type,n=void 0===t?"image":t,r=e.media;Ht();var o=document.createElement({image:"img"}[n]);o.setAttribute("src",r);var i=document.createElement("div");return i.onclick=function(){Ht()},i.setAttribute("class","drift-widget-content-box drift-widget-content-box-".concat(n)),i.appendChild(o),document.body&&document.body.appendChild(i),i},Yt=function(){var e=_asyncToGenerator(i.a.mark(function _callee3(e){var t,n,r,o,a;return i.a.wrap(function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:return t=e.classNamesToRemove,n=void 0===t?[]:t,r=e.waitMS,o=void 0===r?500:r,Y.chat||ce(new Error("Attempting to remove classes on an unmounted frame: chat")),(a=Y.chat.$div).classList.add("hide-frame"),i.next=6,oe(o);case 6:return n.concat("hide-frame").forEach(function(e){return a.classList.remove(e)}),i.abrupt("return",a);case 8:case"end":return i.stop()}},_callee3)}));return function removeChatTakeover(t){return e.apply(this,arguments)}}(),Vt=function generateParentDivElement(e){var t,n=e.name,r=e.frame,o=e.insertInside,i=void 0===o?"":o,a=e.height,s=e.width,c=e.max,u=e.alignment,f=e.insertBefore;return!C(i)&&Zt(i)?((t=document.getElementById(i)).appendChild(r),t):((t=function getOrCreateFrameContainer(e,t){var n,r=document.getElementsByClassName("drift-conductor-item ".concat("drift-frame","-").concat(e));return r.length?function removeAllChildrenFromElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(n=r[0]):((n=document.createElement("div")).setAttribute("id","".concat("drift-frame","-").concat(e)),n.setAttribute("class","drift-conductor-item ".concat("drift-frame","-").concat(e," ").concat("drift-frame","-").concat(e,"-align-").concat(t)),$e(n,e,t)),Pe()&&n.classList.add("".concat("drift-frame","--mobile")),n}(n,u)).appendChild(r),He(t,s,a,c,n,u),Xt(t,f),t)},Xt=function addDivToParentPage(e,t){t&&Y[t]?document.body.insertBefore(e,Y[t].$div):document.body&&document.body.appendChild(e)},Zt=function domElementExistsById(e){return!!document.getElementById(e)};const Jt=["SESSION_ID","SESSION_STARTED","ALWAYS_SEND_IDS","SESSION_CAMPAIGNS","NOTIFICATION_PLAYED"];function _identity(e){return e}var Kt=_curry1(_identity);function hasOrAdd(e,t,n){var r,o=typeof e;switch(o){case"string":case"number":return 0===e&&1/e===-1/0?!!n._items["-0"]||(t&&(n._items["-0"]=!0),!1):null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?e in n._items[o]||(t&&(n._items[o][e]=!0),!1):(t&&(n._items[o]={},n._items[o][e]=!0),!1);case"boolean":if(o in n._items){var i=e?1:0;return!!n._items[o][i]||(t&&(n._items[o][i]=!0),!1)}return t&&(n._items[o]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?!!_includes(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1);case"undefined":return!!n._items[o]||(t&&(n._items[o]=!0),!1);case"object":if(null===e)return!!n._items.null||(t&&(n._items.null=!0),!1);default:return(o=Object.prototype.toString.call(e))in n._items?!!_includes(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1)}}var Qt=function(){function _Set(){this._nativeSet="function"===typeof Set?new Set:null,this._items={}}return _Set.prototype.add=function(e){return!hasOrAdd(e,!0,this)},_Set.prototype.has=function(e){return hasOrAdd(e,!1,this)},_Set}(),en=_curry2(function uniqBy(e,t){for(var n,r,o=new Qt,i=[],a=0;a=arguments.length)?s=t[a]:(s=arguments[o],o+=1),r[a]=s,_isPlaceholder(s)||(i-=1),a+=1}return i<=0?n.apply(this,r):_arity(i,_curryN(e,r,n))}}(e,[],t))}),nn=_curry1(function flip(e){return tn(e.length,function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)})});var rn=_curry1(function isArrayLike(e){return!!_(e)||!!e&&("object"===typeof e&&(!_isString(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}),on=function(){function XWrap(e){this.f=e}return XWrap.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},XWrap.prototype["@@transducer/result"]=function(e){return e},XWrap.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},XWrap}();var an=_curry2(function bind(e,t){return _arity(e.length,function(){return e.apply(t,arguments)})});function _iterableReduce(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function _methodReduce(e,t,n,r){return e["@@transducer/result"](n[r](an(e["@@transducer/step"],e),t))}var sn="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator";function _reduce(e,t,n){if("function"===typeof e&&(e=function _xwrap(e){return new on(e)}(e)),rn(n))return function _arrayReduce(e,t,n){for(var r=0,o=n.length;r0&&void 0!==u[0]?u[0]:{},t={},In.forEach(function(e){var n=_e.a.get(e);n&&(t[e]=n)}),i.next=5,Tn(e.demandbaseToken);case 5:return(n=i.sent)&&(t.demandbase=n),e.pardotId&&(r="".concat("visitor_id").concat(e.pardotId),(o=_e.a.get(r))&&(t.visitor_id=o)),a=_e.a.get(),s={},c=I(a)||[],Cn(function(e){e.toString().startsWith("visitor_id")&&!e.toString().endsWith("-hash")&&(s[e]=a[e])},c),t.PARDOT_ALL_COOKIES=s,i.abrupt("return",t);case 14:case"end":return i.stop()}},_callee)}));return function getIntegrationData(){return e.apply(this,arguments)}}(),Dn=function setDriftCookie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="https:"===window.location.protocol,o=n;return ot()&&r&&(o.sameSite="none"),o.secure=r,_e.a.set(e,t,o)},Ln=_e.a.getJSON,Fn=_e.a.remove,Bn=function getHostnameCookieDomain(){var e=window.location.hostname.match(/([\w-]{3,})\.[a-z]+$/gi);return e&&e.length>0?".".concat(e[0]):""},Wn={MARKETO:"MARKETO",HUBSPOT:"HUBSPOT",PARDOT:"PARDOT",ELOQUA:"ELOQUA",BASIC:"BASIC"},Mn="FastlaneLogger - ",Nn=function fastlaneLog(e){var t=e.type,n=e.data;ae({type:t,data:[Mn].concat(_toConsumableArray(n))})},jn=function isValidForm(e){return e&&e instanceof HTMLFormElement&&e.elements?!$n(e).some(function(e){return"password"===e.type})||(ue("Will not connect to form with password fields."),!1):(ue("Will not connect to form because form has no fields."),!1)},Un=function getFormValuesByName(e){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).validate&&!jn(e))return null;var t=$n(e),n={};return t.filter(function isValidFormElement(e){var t=e.name&&""!==e.name.trim(),n=e.value&&""!==e.value.trim(),r="radio"!==e.type&&"checkbox"!==e.type||!!e.checked;return t&&n&&r}).forEach(function(e){n[e.name]=e.value}),n},zn=function getCollectFormDataValue(e){if(!e)return null;if("string"===typeof e){var t=document.querySelector(e);if(t&&"FORM"===t.tagName)return Un(t,{validate:!0})}else if(e.tagName){var n="FORM"===e.tagName?e:e.querySelector("form");if(jn(n)&&"FORM"===n.tagName)return Un(n,{validate:!0})}else if("object"===typeof e)return e;return null},Gn=function collectFormData(e,t){var n=zn(e);n?window.drift.ready?(Nn({data:["collectFormData",n,t]}),ee({name:"controller",topic:"trigger-api-event",message:{method:"collectFormData",args:[n,t]}})):window.drift.q.push(["collectFormData",e,t]):ue("collectFormData: Could not find form nor object with value:",e)},qn=function stageFormData(e){Nn({data:["stageFormData",e]});var t=zn(e);t?Dn("drift_staged_form_data",t,{domain:Bn()}):ue("stageFormData: Could not find form nor object with value:",e)},Hn=function commitFormData(e){Nn({data:["commitFormData",e]});var t=Ln("drift_staged_form_data");t&&(Gn(t,e),Fn("drift_staged_form_data",{domain:Bn()}))},$n=function toFormElementsArray(e){for(var t=[],n=0;n0)||s){i.next=11;break}if(s=e()){i.next=8;break}return i.next=8,oe(a);case 8:r--,i.next=3;break;case 11:return i.abrupt("return",s);case 12:case"end":return i.stop()}},_callee)}));return function executeWithRetry(t,n){return e.apply(this,arguments)}}(),Zn="fastlaneTestMode",Jn=function isValidFastlaneTestModeSettings(e){return"object"===typeof e&&"string"===typeof(null===e||void 0===e?void 0:e.formId)&&""!==e.formId.trim()&&"string"===typeof(null===e||void 0===e?void 0:e.formType)&&Object.values(Wn).includes(e.formType)},Kn=function broadcastFLTestModeEvent(e){var t=e.event,n=e.settings,r=e.formSubmissionData;ae({type:"log",data:[Zn,t,n].concat(_toConsumableArray(r?[r]:[]))}),window.parent.postMessage(_objectSpread2(_objectSpread2({event:t,type:Zn},n),r&&{formSubmissionData:r}),"*")},Qn=function toFormData(e){var t=new FormData;for(var n in e)t.append(n,e[n].toString());return t},er=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e,t,n){var r,o,a;return i.a.wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return r=(n||{}).noCors,o=Qn(t),i.prev=2,a={method:"POST",body:o,credentials:"include"},r&&(a.mode="no-cors"),i.next=7,fetch(e,a);case 7:i.next=13;break;case 9:return i.prev=9,i.t0=i.catch(2),fe("Form data submission error: ".concat(i.t0.message)),i.abrupt("return",!1);case 13:return i.abrupt("return",!0);case 14:case"end":return i.stop()}},_callee,null,[[2,9]])}));return function submitData(t,n,r){return e.apply(this,arguments)}}(),tr=function disableFormElements(e){var t=Yn(e.getElementsByTagName("button")),n=Yn(e.getElementsByTagName("input"));[].concat(_toConsumableArray(t),_toConsumableArray(n)).forEach(function(e){return e.setAttribute("disabled","true")})},nr=function connectPlainForm(e,t,n){Nn({data:["Plain form connect triggered",{params:t}]}),jn(e)&&e.addEventListener("submit",function(){var r=_asyncToGenerator(i.a.mark(function _callee2(r){var o,a;return i.a.wrap(function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(Nn({data:["Plain form onSubmit triggered",{event:r,params:t}]}),o=Un(r.target)){i.next=5;break}return ue("Will not submit form because it has no fields."),i.abrupt("return");case 5:if(!t.stageData){i.next=8;break}return qn(o),i.abrupt("return");case 8:if(r.preventDefault(),!t.testMode){i.next=14;break}return Kn({event:"onSubmit",settings:t.testMode,formSubmissionData:o}),Kn({event:"onSuccess",settings:t.testMode,formSubmissionData:o}),setTimeout(function(){Kn({event:"takeover",settings:t.testMode,formSubmissionData:o})},2e3),i.abrupt("return");case 14:if(a=r.target.action,tr(e),i.t0=a,!i.t0){i.next=21;break}return i.next=20,er(a,o,n);case 20:i.t0=!i.sent;case 21:if(!i.t0){i.next=23;break}return i.abrupt("return");case 23:Gn(o,_objectSpread2({},t));case 24:case"end":return i.stop()}},_callee2)}));return function(e){return r.apply(this,arguments)}}())},rr=function getHubspotFormAPI(){var e,t,n;return(null===(e=window)||void 0===e?void 0:e.HubSpotForms)||(null===(t=window)||void 0===t?void 0:null===(n=t.hubspot)||void 0===n?void 0:n.form.api)},or=function hasHubspotForms(){return!!rr()},ir=function findHubspotForm(e){if(e)return function getHubspotFormById(e){var t,n=e.split("_")[1];return null===(t=rr())||void 0===t?void 0:t.getForm(n)}(e)},ar=function connectHubspotForm(e,t){var n,r=Object.assign({},t);Nn({data:["Connect Hubspot form triggered",{params:r}]}),e.onFormSubmit(function(e){Nn({data:["Hubspot form onFormSubmit triggered",{event:e,params:r}]});var t=function getFormElement(e){return!w(e)&&!e.elements&&e[0]&&e[0].elements?e[0]:e}(e),o=Un(t);r.testMode&&Kn({event:"onSubmit",settings:r.testMode}),o&&(n=o)}),e.onFormSubmitted(function(){if(Nn({data:["Hubspot form onFormSubmitted triggered",{params:r}]}),r.testMode)return Kn({event:"onSuccess",settings:r.testMode,formSubmissionData:n}),void setTimeout(function(){Kn({event:"takeover",settings:r.testMode,formSubmissionData:n})},2e3);r.stageData?qn(n):Gn(n,_objectSpread2({},r))})},sr=function hasMarketoForms(){return!!window.MktoForms2},cr=function isMarketoForm(e){return!!e.getFormElem},ur=function findMarketoForm(e){if(e){var t=window.MktoForms2.getForm(e.split("_")[1]);if(t)return t}else{var n=window.MktoForms2.allForms();if(n&&n.length)return n[0]}},fr=function connectMarketoForm(e,t){Nn({data:["Marketo form connect triggered",{params:t}]});var n=t||{},r=Object.assign({},n);t.testMode&&e.onSubmit(function(){Kn({event:"onSubmit",settings:t.testMode})}),t.stageData?e.onSubmit(function(){qn(e.vals())}):e.onSuccess(function(e,n){return Nn({data:["Marketo form onSuccess triggered",{data:e,followupUrl:n,params:t}]}),t.testMode?(Kn({event:"onSuccess",settings:t.testMode,formSubmissionData:e}),setTimeout(function(){Kn({event:"takeover",settings:t.testMode,formSubmissionData:e})},2e3),!1):(Gn(e,_objectSpread2({followupUrl:n},r)),!1)})},lr=function selectForm(e){var t=e.formSelector,n=e.formType;if(Nn({data:["Attempting to find form",{formSelector:t,formType:n}]}),!n){if(sr()){var r=ur(t);if(r)return r}if(or()){var o=ir(t);if(o)return o}if(de(t))return document.querySelector("form");try{return document.querySelector(t)}catch(i){return ue("Unable to select form because of browser error:",i&&i.message),null}}switch(n){case Wn.MARKETO:return ur(t);case Wn.HUBSPOT:return ir(t);case Wn.ELOQUA:return ue('Form type "'.concat(n,'" is not yet supported.')),null;case Wn.PARDOT:case Wn.BASIC:try{return document.querySelector(t)}catch(i){return ue("Unable to select form because of browser error:",i&&i.message),null}default:return document.querySelector("form")}},dr=function deriveFormType(e){return sr()&&ur(e)?Wn.MARKETO:or()&&ir(e)?Wn.HUBSPOT:function findBasicForm(e){var t=document.querySelector(e);return jn(t)}(e)?Wn.BASIC:null},pr=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e){var t,n,r,o,a,s;return i.a.wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return Nn({data:["Connect FL form triggered",{params:e}]}),n=(t=e||{}).formSelector,r=t.formType,(o=t.testMode)&&Kn({event:"start",settings:o}),i.next=5,Xn(function(){return lr({formSelector:n,formType:r})},{delay:3e3});case 5:if(a=i.sent,Nn({data:["Form found",{formSelector:n,formType:r,form:a}]}),a&&o&&Kn({event:"formFound",settings:o}),!de(a)){i.next=11;break}return fe("Could not find form: ".concat(n?' "'.concat(n,'"'):"",".")),i.abrupt("return");case 11:s=null!==r&&void 0!==r?r:dr(n),i.t0=s,i.next=i.t0===Wn.HUBSPOT?15:i.t0===Wn.MARKETO?17:i.t0===Wn.PARDOT?21:i.t0===Wn.BASIC?21:23;break;case 15:return ar(a,e),i.abrupt("return");case 17:if(!sr()||!cr(a)){i.next=20;break}return fr(a,e),i.abrupt("return");case 20:return i.abrupt("break",25);case 21:case 23:return nr(a,e),i.abrupt("return");case 25:case"end":return i.stop()}},_callee)}));return function connectFLForm(t){return e.apply(this,arguments)}}(),hr=function(){var e=_asyncToGenerator(i.a.mark(function _callee(e){var t,n;return i.a.wrap(function _callee$(r){for(;;)switch(r.prev=r.next){case 0:try{t=document.createElement("template"),n=e.trim(),t.innerHTML=n,document.head&&document.head.appendChild(t.content.firstChild)}catch(o){ae({type:"warn",data:["error installing drift engage verification tag",o]})}case 1:case"end":return r.stop()}},_callee)}));return function attachDriftEngageVerification(t){return e.apply(this,arguments)}}(),mr=function(){var e=_asyncToGenerator(i.a.mark(function _callee2(e){var t,n;return i.a.wrap(function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:try{t="https://lift-ai-js.marketlinc.com/".concat(e,"/deployment.js"),(n=document.createElement("script")).type="text/javascript",n.id="ml_snippet_script_id",n.src=t+"?"+Math.floor(1e9*Math.random()),document.getElementsByTagName("head")[0].appendChild(n)}catch(o){ae({type:"warn",data:["error installing drift engage",o]})}case 1:case"end":return r.stop()}},_callee2)}));return function attachDriftEngage(t){return e.apply(this,arguments)}}();var gr=function(){function XMap(e,t){this.xf=t,this.f=e}return XMap.prototype["@@transducer/init"]=P,XMap.prototype["@@transducer/result"]=R,XMap.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},XMap}(),wr=_curry2(_dispatchable(["fantasy-land/map","map"],_curry2(function _xmap(e,t){return new gr(e,t)}),function map(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return tn(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return _reduce(function(n,r){return n[r]=e(t[r]),n},{},I(t));default:return function _map(e,t){for(var n=0,r=t.length,o=Array(r);n0)for(var n=0;n-1&&t.push(e[n].split("?")[1].split("&")[0].split("=")[1]);return t}(function getScriptsByTagName(){var e=document.getElementsByTagName("script");return wr(function(e){return e.src},_toConsumableArray(e))}());return t.length>0?t.some(function(t){return t===e})?e:t[0]:null}var br=function hasUniversalAnalyticsGA(){return null!==_r()},Er=function hasLegacyGa(){return!!function getLegacyGa(){return window._gaq}()},xr=function hasGtag(e){return!!function getGtag(e){if(window.gtag)return window.gtag;if(window.dataLayer){var t=configCorrectID(e);return w(t)?null:(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag||null)}return null}(e)},Sr=function getNamespacedHitType(e,t){var n=function getTrackerName(e){var t=_r();if(t&&t.getAll){var n=t.getAll(),r=ut(function(t){return t.get("trackingId")===e},n);if(r)return r.get("name");if(n.length>0&&n[0].get)return n[0].get("name")}return null}(e);return n?"".concat(n,".").concat(t):n},Ar=function sendUAEvent(e,t,n){_r()(Sr(e,"send"),"event",{eventCategory:"Drift Widget",eventAction:vr[t].action,eventLabel:yr(t,n),nonInteraction:vr[t].nonInteraction})},Or=function GAPassThrough(e,t,n){var r=n?n.trim().toUpperCase():"",o=br(),i=xr(r),a=Er();(o||a||i)&&("UA"===r.substring(0,2)&&br()?Ar(r,e,t):i?function sendGA4Event(e,t,n){var r={event_category:"Drift Widget",event_label:yr(t,n),non_interaction:vr[t].nonInteraction};e&&(r.send_to=e),window.gtag("event",vr[t].action,r)}(r,e,t):br()?Ar(r,e,t):a&&function sendLegacyEvent(e,t){window._gaq.push(["_trackEvent","Drift Widget",vr[e].action,yr(e,t),void 0,vr[e].nonInteraction])}(e,t))},Ir=function(){!function attachListeners(e){var t=e.trackingName,n=e.enabledEventMappings,r=void 0===n?{}:n,o=e.individualEventsEnabled,i=void 0!==o&&o;Object.keys(vr).forEach(function attachListener(e){i&&!r[e]||window.drift&&window.drift("on",e,function(n){return Or(e,n,t)})})}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},kr=function(){var e=_asyncToGenerator(i.a.mark(function _callee2(){var e,t,n,r,o,a,s;return i.a.wrap(function _callee2$(c){for(;;)switch(c.prev=c.next){case 0:if(e="hsUTKVisitor",t=window._hsq){c.next=4;break}return c.abrupt("return",null);case 4:t.push(function(){var t=_asyncToGenerator(i.a.mark(function _callee(t){var n;return i.a.wrap(function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}return r.abrupt("return",null);case 2:if(n=g(null,["utk","visitor"],t)){r.next=5;break}return r.abrupt("return",null);case 5:n&&Dn(e,n);case 6:case"end":return r.stop()}},_callee)}));return function(e){return t.apply(this,arguments)}}()),n=Date.now(),r=150,o=!1;case 8:if(o){c.next=19;break}return c.next=11,_e.a.get(e);case 11:if(a=c.sent,s=Date.now()-n,!a){c.next=16;break}return _e.a.remove(e),c.abrupt("return",a);case 16:s>r&&(o=!0),c.next=8;break;case 19:return c.abrupt("return",null);case 20:case"end":return c.stop()}},_callee2)}));return function tryGetHubspotIdentity(){return e.apply(this,arguments)}}();function _defineProperties(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,o=null!==(e=null===(t=document)||void 0===t?void 0:null===(n=t.body)||void 0===n?void 0:n.querySelector(r))&&void 0!==e?e:null;if(o){var i=["script"];do{for(var a,s,c,u,f=null!==(s=null===(c=document)||void 0===c?void 0:null===(u=c.body)||void 0===u?void 0:u.childNodes)&&void 0!==s?s:[],l=0,d=f.length;l0&&void 0!==arguments[0]?arguments[0]:{},n={};t.eventProperties&&t.eventProperties.length&&t.eventProperties.forEach(function(t){return n[t]=e[t]}),me(t.handler)&&t.handler(n)},window.drift_event_listeners[t.id]=n,r.abrupt("return",document.addEventListener(t.event,n));case 6:case"end":return r.stop()}},_callee19)}));return function addHostEventListener(t){return e.apply(this,arguments)}}(),"remove-host-event-listener":function(){var e=_asyncToGenerator(i.a.mark(function _callee20(e){var t;return i.a.wrap(function _callee20$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,document.removeEventListener(t.event,window.drift_event_listeners[t.id]),delete window.drift_event_listeners[t.id];case 3:case"end":return n.stop()}},_callee20)}));return function removeHostEventListener(t){return e.apply(this,arguments)}}(),"play-host-notification":function(){var e=_asyncToGenerator(i.a.mark(function _callee21(e){var t;return i.a.wrap(function _callee21$(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data,n.abrupt("return",On(t));case 2:case"end":return n.stop()}},_callee21)}));return function playHostNotification(t){return e.apply(this,arguments)}}(),"update-frame-vertical-offset":function(){var e=_asyncToGenerator(i.a.mark(function _callee22(e){var t;return i.a.wrap(function _callee22$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,Et(t);case 2:case"end":return n.stop()}},_callee22)}));return function updateFrameVerticalOffset(t){return e.apply(this,arguments)}}(),"update-frame-horizontal-offset":function(){var e=_asyncToGenerator(i.a.mark(function _callee23(e){var t;return i.a.wrap(function _callee23$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,bt(t);case 2:case"end":return n.stop()}},_callee23)}));return function updateFrameHorizontalOffset(t){return e.apply(this,arguments)}}(),"destroy-drift":function(){var e=_asyncToGenerator(i.a.mark(function _callee24(){return i.a.wrap(function _callee24$(e){for(;;)switch(e.prev=e.next){case 0:gt(),window.drift=void 0;case 2:case"end":return e.stop()}},_callee24)}));return function destroyDrift(){return e.apply(this,arguments)}}(),"plugin-action-dispatch":function(){var e=_asyncToGenerator(i.a.mark(function _callee25(e){var t;return i.a.wrap(function _callee25$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"chat",message:t,topic:"CONDUCTOR:action-from-plugin"});case 2:case"end":return n.stop()}},_callee25)}));return function pluginActionDispatch(t){return e.apply(this,arguments)}}(),"takeover:state-snap-shot":function(){var e=_asyncToGenerator(i.a.mark(function _callee26(e){var t;return i.a.wrap(function _callee26$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"takeover",message:{state:t.state},topic:"CONDUCTOR:state-snap-shot"});case 2:case"end":return n.stop()}},_callee26)}));return function takeoverStateSnapShot(t){return e.apply(this,arguments)}}(),"emailCapture:state-snap-shot":function(){var e=_asyncToGenerator(i.a.mark(function _callee27(e){var t;return i.a.wrap(function _callee27$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"emailCapture",message:{state:t.state},topic:"CONDUCTOR:state-snap-shot"});case 2:case"end":return n.stop()}},_callee27)}));return function emailCaptureStateSnapShot(t){return e.apply(this,arguments)}}(),"slider:state-snap-shot":function(){var e=_asyncToGenerator(i.a.mark(function _callee28(e){var t;return i.a.wrap(function _callee28$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"slider",message:{state:t.state},topic:"CONDUCTOR:state-snap-shot"});case 2:case"end":return n.stop()}},_callee28)}));return function sliderStateSnapShot(t){return e.apply(this,arguments)}}(),"request-state-snap-shot":function(){var e=_asyncToGenerator(i.a.mark(function _callee29(e){var t;return i.a.wrap(function _callee29$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"controller",message:{name:t.name},topic:"CONDUCTOR:request-state-from-controller"});case 2:case"end":return n.stop()}},_callee29)}));return function requestStateSnapShot(t){return e.apply(this,arguments)}}(),"controller:action-dispatch":function(){var e=_asyncToGenerator(i.a.mark(function _callee30(e){var t;return i.a.wrap(function _callee30$(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.data,window.drift_display_mode!==we.LANDING_PAGE){n.next=4;break}return ee({name:N.LANDING_PAGE,message:{action:t.action},topic:"CONDUCTOR:action-from-controller"}),n.abrupt("return");case 4:ee({name:N.CHAT,message:{action:t.action},topic:"CONDUCTOR:action-from-controller"});case 5:case"end":return n.stop()}},_callee30)}));return function controllerActionDispatch(t){return e.apply(this,arguments)}}(),"chat:focus-change":function(){var e=_asyncToGenerator(i.a.mark(function _callee31(e){return i.a.wrap(function _callee31$(t){for(;;)switch(t.prev=t.next){case 0:e.data,Lt();case 2:case"end":return t.stop()}},_callee31)}));return function chatFocusChange(t){return e.apply(this,arguments)}}(),"chat:action-dispatch":function(){var e=_asyncToGenerator(i.a.mark(function _callee32(e){var t;return i.a.wrap(function _callee32$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"controller",message:{action:t.action},topic:"CONDUCTOR:action-from-chat"});case 2:case"end":return n.stop()}},_callee32)}));return function chatActionDispatch(t){return e.apply(this,arguments)}}(),"reset-controller-size":function(){var e=_asyncToGenerator(i.a.mark(function _callee33(){return i.a.wrap(function _callee33$(e){for(;;)switch(e.prev=e.next){case 0:Pt({width:"".concat(be,"px"),name:"controller"}),It({height:"".concat(be,"px"),name:"controller",max:!1});case 2:case"end":return e.stop()}},_callee33)}));return function resetControllerSize(){return e.apply(this,arguments)}}(),"reset-page-view":function resetPageView(){window.drift_page_view_started=(new Date).getTime()/1e3},"page-notification-update":function pageNotificationUpdate(e){var t=e.data;Tr.update(t.totalUnreadMessages,{pageTitleNotificationMsg:t.pageTitleNotificationMsg})},"get-frame-height":function(){var e=_asyncToGenerator(i.a.mark(function _callee34(e){var t;return i.a.wrap(function _callee34$(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data,n.abrupt("return",St(t));case 2:case"end":return n.stop()}},_callee34)}));return function getFrameHeight(t){return e.apply(this,arguments)}}(),"set-frame-width":function(){var e=_asyncToGenerator(i.a.mark(function _callee35(e){var t;return i.a.wrap(function _callee35$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,Pt(t);case 2:case"end":return n.stop()}},_callee35)}));return function setFrameWidth(t){return e.apply(this,arguments)}}(),"set-frame-dimensions":function(){var e=_asyncToGenerator(i.a.mark(function _callee36(e){var t;return i.a.wrap(function _callee36$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,At(t);case 2:case"end":return n.stop()}},_callee36)}));return function setFrameDimensions(t){return e.apply(this,arguments)}}(),"set-frame-height":function(){var e=_asyncToGenerator(i.a.mark(function _callee37(e){var t;return i.a.wrap(function _callee37$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,It(t);case 2:case"end":return n.stop()}},_callee37)}));return function setFrameHeight(t){return e.apply(this,arguments)}}(),"set-frame-width-and-height":function(){var e=_asyncToGenerator(i.a.mark(function _callee38(e){var t;return i.a.wrap(function _callee38$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,Rt(t);case 2:case"end":return n.stop()}},_callee38)}));return function setFrameWidthAndHeight(t){return e.apply(this,arguments)}}(),"align-frames":function(){var e=_asyncToGenerator(i.a.mark(function _callee39(e){var t;return i.a.wrap(function _callee39$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,xt(t);case 2:case"end":return n.stop()}},_callee39)}));return function alignFrames(t){return e.apply(this,arguments)}}(),"focus-frame":function focusFrame(e){var t=e.data;t.name===N.CONTROLLER?ee({name:"controller",message:{},topic:"CONDUCTOR:focusWidgetIcon"}):function focusFrame(e){var t=e.name;Y[t]||ce(new Error("Attempting to get height on an unmounted frame: ".concat(t))),Y[t].$frame.focus()}(t)},"toggle-widget-controller":function(){var e=_asyncToGenerator(i.a.mark(function _callee40(e){var t,n,r,o;return i.a.wrap(function _callee40$(i){for(;;)switch(i.prev=i.next){case 0:if(t=e.data,n=t.chatOpen,r=t.hasActiveConversation,o=t.isChatTakeover,zt(),r&&Gt(),qt(n,r),!o){i.next=7;break}return i.abrupt("return");case 7:Ut(n),n?r?jt():Bt():It({name:"chat",height:Ae});case 9:case"end":return i.stop()}},_callee40)}));return function toggleWidgetController(t){return e.apply(this,arguments)}}(),"remove-chat-takeover":function(){var e=_asyncToGenerator(i.a.mark(function _callee41(e){var t;return i.a.wrap(function _callee41$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,Yt(t);case 2:case"end":return n.stop()}},_callee41)}));return function removeChatTakeover(t){return e.apply(this,arguments)}}(),"slider:showDetails":function sliderShowDetails(){ee({name:"slider",message:{},topic:"CONDUCTOR:showSliderDetails"}),ee({name:"controller",message:{},topic:"CONDUCTOR:disableWidgetIcon"})},"slider:dismiss":function sliderDismiss(){var e;(null===(e=window._driftFrames)||void 0===e?void 0:e.slider)&&ee({name:"slider",message:{},topic:"slider:dismiss"})},"remove-active-campaign":function(){var e=_asyncToGenerator(i.a.mark(function _callee42(e){var t;return i.a.wrap(function _callee42$(n){for(;;)switch(n.prev=n.next){case 0:t=e.data,ee({name:"controller",message:{name:t.name},topic:"CONDUCTOR:remove-active-campaign"});case 2:case"end":return n.stop()}},_callee42)}));return function removeActiveCampaign(t){return e.apply(this,arguments)}}(),"send-usage-metric-event":function(){var e=_asyncToGenerator(i.a.mark(function _callee43(e){var t;return i.a.wrap(function _callee43$(n){for(;;)switch(n.prev=n.next){case 0:return t=e.data,n.next=3,ee({name:"controller",message:t,topic:"CONDUCTOR:send-usage-metric-event"});case 3:case"end":return n.stop()}},_callee43)}));return function sendUsageMetricEvent(t){return e.apply(this,arguments)}}(),"set-responsive-frame-width":function(){var e=_asyncToGenerator(i.a.mark(function _callee44(e){var t,n,r;return i.a.wrap(function _callee44$(o){for(;;)switch(o.prev=o.next){case 0:t=e.data,n=t.name,r=t.defaultWidth,Bt({name:n,defaultWidth:r});case 3:case"end":return o.stop()}},_callee44)}));return function setResponsiveFrameWidth(t){return e.apply(this,arguments)}}(),"drift-api:open-chat":function driftApiOpenChat(){window.drift("openChat")},"drift-api:schedule-meeting":function driftApiScheduleMeeting(e){var t=e.data;window.drift("scheduleMeeting",t.scheduleMeetingWith,t.options)},"redirect-to-url":function redirectToUrl(e){var t=e.data;(de(t.url)||0===t.url.trim().indexOf("javascript:"))&&se(["cannot redirect - invalid redirect url specified"]),window.location.href=t.url},"attach-form-listener-to-dom":function(){var e=_asyncToGenerator(i.a.mark(function _callee45(e){var t,n,r;return i.a.wrap(function _callee45$(o){for(;;)switch(o.prev=o.next){case 0:if(t=e.data,!Jn(t.fastlaneTestModeSettings)){o.next=5;break}return o.next=4,pr({testMode:t.fastlaneTestModeSettings,formSelector:"#".concat(t.fastlaneTestModeSettings.formId),formType:t.fastlaneTestModeSettings.formType});case 4:return o.abrupt("return");case 5:if(!t||!t.fastLaneCampaigns){o.next=20;break}n=0;case 7:if(!(n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wr=le(function(){var e;De()&&(null===(e=window.drift)||void 0===e?void 0:e.ready)&&Dt()&&ee({name:"chat",topic:"parent-scroll",message:{},waitForResponse:!1})},200),Mr=[{event:"popstate",handler:le(function onPopState(){ee({name:"controller",topic:"host-hash-change",message:{hash:window.location.hash}})},200,!0)},{event:"message",handler:function onPostMessage(e){if(!de(e.data)&&!de(e.data.target))switch(e.data.target){case"drift.stageFormData":var t=e.data.formData;return void qn(t);case"drift.commitFormData":return void Hn(e.data);case"drift.collectFormData":var n=e.data,r=n.formData,o=_objectWithoutProperties(n,["formData"]);return void Gn(r,o);case"drift.parentScroll":Wr()}}},{event:"scroll",handler:le(Wr,1e3)}],Nr=function setupFrameListeners(){Object.keys(Br).forEach(function(e){Q({topic:e,handler:Br[e]})})},jr=function setupHostListeners(){Mr.forEach(function(e){var t=e.event,n=e.handler;("scroll"!==t||De())&&("popstate"!==t||!Fe()&&!function isLegacyEdgeBrowser(){return/Edge\/\d./i.test(navigator.userAgent)}()?window.addEventListener(t,n):function detectHashChangeOnMicrosoftLegacyBrowser(e){var t=null;window.setInterval(function detectHashChange(){t!==window.location.hash&&(t=window.location.hash,e())},100)}(n))})};function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!==typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ur=function IframeFactoryBase(e){var t=this,n=e.frameInstructions,r=e.frameCreationOptions;_classCallCheck(this,IframeFactoryBase),this._readyFrames=[],this._readyFrameListeners={},this._frameInstructions=[],this._frameCreationOptions={},this.initialize=function(){t.initializeIframes(),t.attachReadyEvents()},this.unload=function(){t._frameInstructions=[],t._readyFrames=[],Object.keys(t._readyFrameListeners).forEach(function(e){var n=t._readyFrameListeners[e];document.removeEventListener(e,n)})},this.generatePathForFrame=function(e,n){var r={};switch(e){case N.CONTROLLER:r=_defineProperty({embedId:t._frameCreationOptions.embedId,eId:t._frameCreationOptions.embedId,region:t.assignRegionForFrame(),forceShow:t._frameCreationOptions.forceShow,skipCampaigns:t._frameCreationOptions.skipCampaigns,sessionId:t._frameCreationOptions.sessionId,sessionStarted:window.drift_session_started,campaignRefreshToken:t._frameCreationOptions.campaignRefreshToken,hideController:window.drift_display_mode!==we.CHAT,pageLoadStartTime:g(void 0,["performance","timing","responseEnd"],window),mode:g(we.CHAT,["drift_display_mode"],window),driftEnableLog:t._frameCreationOptions.frameDebugEnabled||!1,loadStrategy:window.drift_init_options?window.drift_init_options.loadType:null,secureIframe:ot()||!1,interactionId:t._frameCreationOptions.interactionId},$,encodeURIComponent(document.location.href));break;case N.LANDING_PAGE:case N.CHAT:r={region:t.assignRegionForFrame(),driftEnableLog:t._frameCreationOptions.frameDebugEnabled||!1,pageLoadStartTime:g(void 0,["performance","timing","responseEnd"],window)}}return t.attachQueryParamsToFrame(n,r)},this.attachReadyEvents=function(){t._frameInstructions.forEach(function(e){return t.attachReadyEventForFrame(e.name)})},this.setFrameReady=function(e){window.drift["".concat(e,"Ready")]=!0,-1===t._readyFrames.indexOf(e)&&t._readyFrames.push(e)},this.initializeIframes=function(){!function generateFrames(e){e.map(yt)}(t._frameInstructions.map(function(e){var n=e.name===N.CONTROLLER?"core":"core/".concat(e.name);return _objectSpread2(_objectSpread2({},e),{},{path:t.generatePathForFrame(e.name,n)})}))},this.assignRegionForFrame=function(){return M("-eu",t._frameCreationOptions.embedId.toLowerCase())?q:G},this.attachReadyEventForFrame=function(e){var n="".concat(e.toUpperCase(),"_READY");var r=function onPrivateReadyHandlerFn(){this.setFrameReady(e),this._frameInstructions.length!==this._readyFrames.length||window.drift.allFramesReady||rt(Qe.ALL_FRAMES_READY)}.bind(t);document.addEventListener(Qe[n],r),t._readyFrameListeners["".concat(Qe[n])]=r},this.attachQueryParamsToFrame=function(e,t){for(var n="?d=1",r=0;r-1)},Yr=_curry2(function is(e,t){return null!=t&&t.constructor===e||t instanceof e}),Vr=function(){function XFindIndex(e,t){this.xf=t,this.f=e,this.idx=-1,this.found=!1}return XFindIndex.prototype["@@transducer/init"]=P,XFindIndex.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,-1)),this.xf["@@transducer/result"](e)},XFindIndex.prototype["@@transducer/step"]=function(e,t){return this.idx+=1,this.f(t)&&(this.found=!0,e=_reduced(this.xf["@@transducer/step"](e,this.idx))),e},XFindIndex}(),Xr=_curry2(_dispatchable([],_curry2(function _xfindIndex(e,t){return new Vr(e,t)}),function findIndex(e,t){for(var n=0,r=t.length;n>>1].startTime0;){var n=e._queue.shift();e.processCommand(n)}ae({data:["new app ".concat(t.name," registered")]})}},unregister:function unregister(t){e._apps[t.name]?(delete e._apps[t.name],window.drift.isCohabiting=!1,window.drift.api.exitCohabitation(),t.handler()):se(["app is not registered"])},open:function open(e){"user"===e.initiatedBy&&(window.drift.hideChat(),window.drift.api.hidePreview())},"render-conversation-preview":function renderConversationPreview(t){e._isSiteConciergeRegistered()&&window.driftV2.renderConversationPreview(t)},"send-total-unread-messages-count":function sendTotalUnreadMessagesCount(t){e._isSiteConciergeRegistered()&&window.driftV2.totalUnreadMessagesCount(t)},"open-chat":function openChat(){e._isSiteConciergeRegistered()&&window.driftV2.navigateToPage({path:"/chat-legacy"})},"should-display-legacy-chat":function shouldDisplayLegacyChat(t){e._isSiteConciergeRegistered()&&window.driftV2.displayLegacyChatIcon(t)},"close-chat":function closeChat(){e._isSiteConciergeRegistered()&&window.driftV2.navigateToPage({path:"/"})}},this.processCommand=function(t){if(de(t)||!t.name)return!1;e._getInLine(t),e.commandHandlers[t.event]&&e.commandHandlers[t.event](t)},this._apps={},this._queue=[]},_o=function(){var e=_asyncToGenerator(i.a.mark(function _callee3(e){return i.a.wrap(function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:yo.processCommand(e);case 1:case"end":return t.stop()}},_callee3)}));return function app(t){return e.apply(this,arguments)}}(),bo=function config(e){w(e.iframeMode)||(window.drift_iframe_mode=e.iframeMode),w(e.iframeSandbox)||(window.drift_iframe_sandbox=e.iframeSandbox),window.drift.controllerReady?ee({name:"controller",topic:"trigger-api-event",message:{method:"config",args:[e]}}):window.drift.q.push(["config",e])},Eo=function asyncApiMethod(e){return function(){e.apply(void 0,arguments)}}(function(){var e=_asyncToGenerator(i.a.mark(function _callee4(e,t){var n,r,o;return i.a.wrap(function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:if(wo(e,t)){i.next=2;break}return i.abrupt("return");case 2:if(!(n="ready"===e)||!window.drift.ready){i.next=10;break}return i.next=6,go();case 6:return r=i.sent,window.drift.q.shift(),t(window.drift.api,r),i.abrupt("return");case 10:o=function eventListener(e){var r=!!e&&!C(e.detail)?e.detail:window.drift.api;n?t(window.drift.api,e.detail):t(r)},vo[e]||(vo[e]=[]),vo[e].push({eventHandler:t,eventListener:o}),document.addEventListener("drift::".concat(e),o);case 14:case"end":return i.stop()}},_callee4)}));return function(t,n){return e.apply(this,arguments)}}()),xo=function off(e,t){if(wo(e,t)&&vo[e]){var n=vo[e],r=Xr(function(e){return e.eventHandler===t},n);r>=0&&(document.removeEventListener("drift::".concat(e),n[r].eventListener),n.splice(r,1))}},So=function page(e){window.drift.ready&&window.drift.hasInitialized?ee({name:"controller",topic:"trigger-api-event",message:{method:"page",args:[e]}}):ae({type:"log",data:["Page event was sent before ready event was fired, dropping event"]})},Ao=function identify(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"string"===typeof e?e&&"undefined"!==e.toString()?"string"===typeof e&&e.length>191?console.warn("DRIFT-API - drift.identify userId must be less than 191 characters but instead we got ".concat(e.length," characters.")):window.drift.controllerReady?(t&&t.hasProvidedIdentity||(ko(e),Co(t),n&&n.userJwt&&To(n.userJwt)),window.drift.ready?Oo(e,t):Io(e,t,n)):window.drift.q.push(["identify",e,t,n]):console.warn("DRIFT-API - drift.identify userId cannot be undefined"):console.warn("DRIFT-API - drift.identify userId must be string but instead we got ".concat(typeof e,"."))},Oo=function _broadcastIdentifyEvent(e,t){ee({name:N.CONTROLLER,topic:"trigger-api-event",message:{method:"identify",args:[e,t]}})},Io=function _broadcastIdentityProvided(e,t,n){ee({name:N.CONTROLLER,topic:"identity-provided",message:{externalId:e,attributes:t,options:n}})},ko=function _broadcastIdentifyProvidedId(e){ee({name:"controller",topic:"identity-provided-id",message:{externalId:e}})},To=function _broadcastIdentifyProvidedJwt(e){ee({name:"controller",topic:"identity-provided-jwt",message:{userJwt:e}})},Co=function _broadcastIdentifyProvidedEmail(e){e&&e.email&&ee({name:"controller",topic:"identity-provided-email",message:{email:e.email}})},Po=function show(){!function _broadcastShowEvent(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&ee({name:"controller",topic:"show-widget-on-ready",message:{}}),ee({name:"controller",topic:"trigger-api-event",message:{method:"show",args:[]}})}(!window.drift.ready)},Ro=function throttledAPICall(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e4;return Object(ft.throttle)(t,!0,e)}(function(){window.drift.ready=!1,ee({name:"controller",topic:"trigger-api-event",message:{method:"reset",args:[]}})}),Do=function hide(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!function _broadcastHideEvent(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&ee({name:"controller",topic:"hide-widget-on-ready",message:{}}),ee({name:"controller",topic:"trigger-api-event",message:{method:"hide",args:[e]}})}(!window.drift.ready)},Lo=function setContext(e){Bo(e),function setIframeWindowContext(e){window.drift_iframe_window_context=e}(e)},Fo=function getWindowPropertyFromPathOrDefault(e,t,n){var r=g(window[t],["window",t],e);return de(r)?n:r},Bo=function resizeOnContextResize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{window:{}},t=it(),n=Fo(e,"innerHeight",window.innerHeight),r=Fo(e,"innerWidth",window.innerWidth),o=Fo(t,"innerHeight",window.innerHeight);(Fo(t,"innerWidth",window.innerWidth)!==r||o!==n)&&(Bt(),Lt(),de(window.drift.offset)||Et(window.drift.offset))},Wo=function(){var e=_asyncToGenerator(i.a.mark(function _callee5(){var e;return i.a.wrap(function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ee({name:"controller",topic:"get-cookie-domains",message:{}});case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}},_callee5)}));return function getCookieDomains(){return e.apply(this,arguments)}}(),Mo=function(){var e=_asyncToGenerator(i.a.mark(function _callee6(){var e;return i.a.wrap(function _callee6$(t){for(;;)switch(t.prev=t.next){case 0:if(window.drift.hasInitialized){t.next=3;break}return ae({data:["drift.unload: drift is not yet loaded"]}),t.abrupt("return");case 3:return t.next=5,Wo();case 5:e=t.sent,window.drift_frameFactory.unload(),ei(),gt(),Pn(null===e||void 0===e?void 0:e.data),mn(),hn(),window.drift.embedId=void 0,window.drift.hasInitialized=!1;case 14:case"end":return t.stop()}},_callee6)}));return function _unload(){return e.apply(this,arguments)}}(),No=function unload(){Mo()},jo=function areConnectFormParamsValid(e){if(!e)return!0;var t=!1,n=function error(){for(var e=arguments.length,n=new Array(e),r=0;r0&&n("Invalid params:",s.join(",")),!t},Uo=function connectForm(e){jo(e)&&pr(e)};window.__DRIFT_ENV__="PRODUCTION",window.__DRIFT_BUILD_ID__="20250320185837-d1a7291",window.__DRIFT_BRANCH__="master";var zo=document.currentScript,Go=function generateAutoLoadFromLegacySnippet(){var e=null,t=function tryGetEmbedIdFromLegacyUrl(e){var t=/include\/[^]+\/(.+).js/.exec(e);return t&&t[1]?t[1]:null};if(zo&&zo.src&&(e=t(zo.src)),!e){var n=document.getElementsByTagName("script");Array.from(n).forEach(function(n){var r=n.getAttribute("src");if(r&&function srcIsLegacy(e){return e.includes("js.driftt")||e.includes("js.drifttqa")||e.includes("js.driftqa.com/include")}(r)){var o=(e=t(r)).split(":");2===o.length&&(e=o[0])}})}return e?[["init",e]]:[]},qo=function(){var e=_asyncToGenerator(i.a.mark(function _callee(){var e,t,n;return i.a.wrap(function _callee$(r){for(;;)switch(r.prev=r.next){case 0:e=window.drift&&window.drift.q?window.drift.q:[],(!(!window.drift||!window.drift.methods)||!(!window.driftt||!window.driftt.methods))&&(t=window.drift||window.driftt,n=Go(),e=[].concat(_toConsumableArray(n),_toConsumableArray(t)),window.drift=void 0,window.driftt=void 0),window.drift=function(){(window.drift.q=window.drift.q||[]).push(arguments),rt(Qe.CLEAR_EVENT_Q)},window.drift.q=e,window.drift.iq=[];case 6:case"end":return r.stop()}},_callee)}));return function createWindowObject(){return e.apply(this,arguments)}}(),Ho=Lr(function methodIdentity(e){return Kt(e)},function(e){return function(){for(var t=-1!==Je.indexOf(e),n=arguments.length,r=new Array(n),o=0;o=0||t[e]||(t[e]=$o(e))})},Vo=function attachAPI(){window.drift.api=window.drift.api||{},window.drift.api.sidebar={open:$o("openChat"),close:$o("hideChat"),toggle:$o("toggleChat")},Yo(Ve,window.drift.api),window.drift.api.widget={},Yo(Xe,window.drift.api.widget),window.drift.load=$o("init"),Yo(Ke,window.drift)},Xo=function handleQ(){var e=function isPreApiReadyMethod(e){return"init"===e||"on"===e||"off"===e},t=!!window.drift&&!!window.drift.q,n=t?function partitionSort(e,t){var n=[],r=[];return e.forEach(function(e,o,i){return(t(e,o,i)?n:r).push(e)}),[].concat(n,r)}(window.drift.q,function(t){return e(t[0])}):[];window.drift.q=_toConsumableArray(n),t&&n.forEach(function(t){var n=_toConsumableArray(t),r=n.shift();if(window.drift.apiReady||e(r)){if("api"===r)return void function resolveApiMethodPath(e){var t,n=[];e.forEach(function(e){"string"===typeof e?n.push(e):"object"===typeof e&&(t=e)});var r=m(n,window.drift.api);r&&"function"===typeof r?r(t):console.warn("Drift API - unable to find Drift API method for path ".concat(n.join(".")))}(n);var o=$o(r);o&&o.apply(void 0,_toConsumableArray(n)),window.drift.q.shift()}})},Zo=function handleIQ(){de(window.drift.iq)||window.drift.iq.forEach(function(e){rt(e.name,e.payload)})},Jo=function setApiReady(){window.drift.apiReady=!0,window.drift.allFramesReady&&Xo()},Ko=function(){var e=_asyncToGenerator(i.a.mark(function _callee2(){return i.a.wrap(function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:if(window.drift.ready=!0,window.drift.allFramesReady||!window.drift.apiReady){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,Xo();case 5:Zo();case 6:case"end":return e.stop()}},_callee2)}));return function setWidgetReady(){return e.apply(this,arguments)}}(),Qo=function setInitReady(){ee({name:"controller",topic:"init-ready",message:{},waitForResponse:!1}),window.drift.allFramesReady=!0,window.drift.apiReady&&Xo()},ei=function resetFramesReady(){window.drift.allFramesReady=!1,Object.values(N).forEach(function(e){window.drift["".concat(e,"Ready")]=!1})},ti=function handleInitDebug(e){ee({name:"controller",topic:"debug-init",message:{},waitForResponse:!1})},ni=function attachEvents(){document.addEventListener(Qe.CLEAR_EVENT_Q,Xo),document.addEventListener(Ye.API_READY,Jo),document.addEventListener(Ye.READY,Ko),document.addEventListener(Qe.ALL_FRAMES_READY,Qo),document.addEventListener(Qe.DEBUG_INIT,ti)},ri=function isHeadlessBrowser(){try{var e=/headless/i.test(navigator.userAgent);return!(/headless=true/i.test(document.location.search)||/liftai/i.test(navigator.userAgent))&&e}catch(t){return!1}};!function polyfillKickoff(e){try{[1].includes(1)&&e()}catch(t){Promise.all([n.e(1).then(n.t.bind(null,383,7)),n.e(2).then(n.t.bind(null,384,7))]).then(function(){e()}).catch(function(e){return console.error("Error importing polyfills",e)})}}(function(){var e=_asyncToGenerator(i.a.mark(function _callee3(){return i.a.wrap(function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:if(!ri()){e.next=3;break}return console.debug("Drift: Skipping Widget since Headless Browser was detected."),e.abrupt("return");case 3:return e.next=5,qo();case 5:return e.next=7,Vo();case 7:if(!window.drift_invoked){e.next=9;break}return e.abrupt("return");case 9:window.drift_invoked=!0,Xo(),ni();case 12:case"end":return e.stop()}},_callee3)}));return function kickOff(){return e.apply(this,arguments)}}())}]);