@saasquatch/squatch-js 2.3.1-2 → 2.3.1-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.squatch=e():t.squatch=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=147)}([function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(51)("wks"),o=n(32),i=n(1).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return f})),n.d(e,"a",(function(){return p})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return h}));var r=n(38),o=n.n(r),i=n(20),s=n.n(i),u=n(59),c=n.n(u);function a(t,e){if(!f(t))return!1;var n=c()(t);return s()(e)?e.reduce((function(t,e){return t&&n.indexOf(e)>=0}),!0):t.hasOwnProperty(e)}function f(t){return"object"===o()(t)}function p(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((function(e){if(!a(t,n))throw new Error(e+" is required")})),!0}function l(t){if(!f(t))throw new Error("config must be an object");if(!a(t,"tenantAlias"))throw new Error("tenantAlias not provided");return{tenantAlias:t.tenantAlias,domain:a(t,"domain")&&t.domain||"https://app.referralsaasquatch.com",debug:a(t,"debug")&&t.debug||!1,npmCdn:a(t,"npmCdn")&&t.npmCdn||"https://fast.ssqt.io/npm"}}function h(t){if(!f(t))throw new Error("Widget properties must be an object");if(!p(t,"user"))throw new Error("Required properties missing.");return t}},function(t,e,n){var r=n(1),o=n(0),i=n(23),s=n(18),u=n(17),c=function(t,e,n){var a,f,p,l=t&c.F,h=t&c.G,d=t&c.S,y=t&c.P,v=t&c.B,m=t&c.W,b=h?o:o[e]||(o[e]={}),g=b.prototype,_=h?r:d?r[e]:(r[e]||{}).prototype;for(a in h&&(n=e),n)(f=!l&&_&&void 0!==_[a])&&u(b,a)||(p=f?_[a]:n[a],b[a]=h&&"function"!=typeof _[a]?n[a]:v&&f?i(p,r):m&&_[a]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((b.virtual||(b.virtual={}))[a]=p,t&c.R&&g&&!g[a]&&s(g,a,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(10);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(65);function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(t,o.key,o)}}t.exports=function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}},,,function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},,function(t,e,n){var r=n(5),o=n(69),i=n(45),s=Object.defineProperty;e.f=n(13)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(22)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return c}));var r=n(39),o=n.n(r),i=n(37);function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={Accept:"application/json","Content-Type":"application/json"};e&&(n["X-SaaSquatch-User-Token"]=e);var r=i.get(t).withCredentials().set(n);return a(r).then((function(t){return t.headers["content-type"]&&f(t.headers["content-type"].toLowerCase(),"application/json")?JSON.parse(t.text):t.text}),(function(t){var e=t.response;throw JSON.parse(e.text)}))}function u(t,e,n){var r={Accept:"application/json","Content-Type":"application/json"};return n&&(r["X-SaaSquatch-User-Token"]=n),a(i.post(t).send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function c(t,e,n){var r={Accept:"application/json","Content-Type":"application/json","X-SaaSquatch-Referrer":window?window.location.href:""};return n&&(r["X-SaaSquatch-User-Token"]=n),a(i.put(t).withCredentials().send(e).set(r)).then((function(t){var e=t.text;return e?JSON.parse(e):e}),(function(t){var e;try{e=JSON.parse(t.response.text)}catch(e){throw t||e}throw e}))}function a(t){return new o.a((function(e,n){t.on("error",n),t.end((function(t,r){t?n(t):e(r)}))}))}function f(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}},,function(t,e,n){t.exports=n(96)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(12),o=n(28);t.exports=n(13)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(102),o=n(48);t.exports=function(t){return r(o(t))}},function(t,e,n){t.exports=n(113)},,function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=!0},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r,o;
2
+ /*!
3
+ * JavaScript Cookie v2.2.1
4
+ * https://github.com/js-cookie/js-cookie
5
+ *
6
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
+ * Released under the MIT license
8
+ */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var s=window.Cookies,u=window.Cookies=i();u.noConflict=function(){return window.Cookies=s,u}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var u="";for(var c in i)i[c]&&(u+="; "+c,!0!==i[c]&&(u+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+u}}function s(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],s=0;s<i.length;s++){var u=i[s].split("="),c=u.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var a=e(u[0]);if(c=(r.read||r)(c,a)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[a]=c,t===a)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return s(t,!1)},o.getJSON=function(t){return s(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},,function(t,e,n){var r=n(72),o=n(52);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(12).f,o=n(17),i=n(2)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(48);t.exports=function(t){return Object(r(t))}},function(t,e,n){t.exports=n(99)},function(t,e,n){t.exports=n(108)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=n(127),s=n(128),u=n(129),c=n(83),a=n(130),f=n(132);function p(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var l=e=t.exports;e.Request=g,l.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&y(e,n,t[n]);return e.join("&")}function y(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){y(t,e,n)}));else if(c(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&y(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function v(t){for(var e,n,r={},o=t.split("&"),i=0,s=o.length;i<s;++i)-1===(n=(e=o[i]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function m(t){return/[/+]json($|[^-\w])/.test(t)}function b(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),s={},u=0,c=i.length;u<c;++u)-1!==(e=(n=i[u]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),o=h(n.slice(e+1)),s[r]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function g(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new b(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function _(t,e,n){var r=l("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}l.serializeObject=d,l.parseString=v,l.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},l.serialize={"application/x-www-form-urlencoded":d,"application/json":s},l.parse={"application/x-www-form-urlencoded":v,"application/json":JSON.parse},a(b.prototype),b.prototype._parseBody=function(t){var e=l.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&m(this.type)&&(e=l.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},b.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},l.Response=b,i(g.prototype),u(g.prototype),g.prototype.type=function(t){return this.set("Content-Type",l.types[t]||t),this},g.prototype.accept=function(t){return this.set("Accept",l.types[t]||t),this},g.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===r(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,o)},g.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},g.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},g.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},g.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},g.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},g.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},g.prototype.ca=g.prototype.agent,g.prototype.buffer=g.prototype.ca,g.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},g.prototype.pipe=g.prototype.write,g.prototype._isHost=function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},g.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||p,this._finalizeQueryString(),this._end()},g.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},g.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=l.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||l.serialize[o?o.split(";")[0]:""];!i&&m(o)&&(i=l.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&e.setRequestHeader(s,this.header[s]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},l.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){f.prototype[t.toLowerCase()]=function(e,n){var r=new l.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),f.prototype.del=f.prototype.delete,l.get=function(t,e,n){var r=l("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},l.head=function(t,e,n){var r=l("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},l.options=function(t,e,n){var r=l("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.del=_,l.delete=_,l.patch=function(t,e,n){var r=l("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.post=function(t,e,n){var r=l("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.put=function(t,e,n){var r=l("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){var r=n(35),o=n(36);function i(e){return t.exports=i="function"==typeof o&&"symbol"==typeof r?function(t){return typeof t}:function(t){return t&&"function"==typeof o&&t.constructor===o&&t!==o.prototype?"symbol":typeof t},i(e)}t.exports=i},function(t,e,n){t.exports=n(117)},,,,,function(t,e,n){var r=n(10),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(10);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";var r=n(100)(!0);n(70)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(5),o=n(85),i=n(52),s=n(50)("IE_PROTO"),u=function(){},c=function(){var t,e=n(44)("iframe"),r=i.length;for(e.style.display="none",n(73).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[s]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(51)("keys"),o=n(32);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(25)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){e.f=n(2)},function(t,e,n){var r=n(1),o=n(0),i=n(25),s=n(53),u=n(12).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(55),o=n(28),i=n(19),s=n(45),u=n(17),c=n(69),a=Object.getOwnPropertyDescriptor;e.f=n(13)?a:function(t,e){if(t=i(t),e=s(e,!0),c)try{return a(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r=n(24);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var r=n(16),o=n.n(r),i=n(6),s=n.n(i),u=n(7),c=n.n(u),a=n(14),f=n(3),p=n(29),l=n.n(p),h=function(){function t(e){s()(this,t);var n=e,r=Object(f.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn}return c()(t,[{key:"cookieUser",value:function(t){var e=t.widgetType,n=t.engagementMedium,r=void 0===n?"POPUP":n,i=t.jwt,s=t.user,u=encodeURIComponent(this.tenantAlias),c=d({widgetType:e,engagementMedium:r}),f="/api/v1/".concat(u,"/widget/user/cookie_user").concat(c),p=this.domain+f;return Object(a.c)(p,o()(s||{}),i)}},{key:"upsertUser",value:function(t){var e=t,n=Object(f.e)(e),r=n.widgetType,i=n.engagementMedium,s=void 0===i?"POPUP":i,u=n.jwt,c=n.user,p=encodeURIComponent(this.tenantAlias),h=encodeURIComponent(c.accountId),y=encodeURIComponent(c.id),v=d({widgetType:r,engagementMedium:s}),m="/api/v1/".concat(p,"/widget/account/").concat(h,"/user/").concat(y,"/upsert").concat(v),b=this.domain+m,g=l.a.get("_saasquatch");return g&&(c.cookies=g),Object(a.c)(b,o()(c),u)}},{key:"render",value:function(t){var e=t,n=Object(f.e)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,s=n.jwt,u=n.user,c=encodeURIComponent(this.tenantAlias),p=encodeURIComponent(u.accountId),l=encodeURIComponent(u.id),h=d({widgetType:r,engagementMedium:i}),y="/api/v1/".concat(c,"/widget/account/").concat(p,"/user/").concat(l,"/render").concat(h),v=this.domain+y;return Object(a.a)(v,s)}},{key:"invite",value:function(t){var e=t.emailList,n=void 0===e?[]:e,r=t.userId,i=t.accountId,s=t.tenantAlias,u=encodeURIComponent(s),c="/api/v1/".concat(u,"/mail/referralinvite"),f=this.domain+c,p={sendingAccountId:i,sendingUserId:r,recipients:n};return Object(a.b)(f,o()(p))}},{key:"squatchReferralCookie",value:function(){var t=encodeURIComponent(this.tenantAlias),e=l.a.get("_saasquatch"),n=e?"?cookies=".concat(encodeURIComponent(e)):"",r="".concat(this.domain,"/a/").concat(t,"/widgets/squatchcookiejson").concat(n);return Object(a.a)(r)}}]),t}();function d(t){var e=t.widgetType,n=t.engagementMedium;return(e?"?widgetType=".concat(encodeURIComponent(e)):"")+"".concat(e?"&":"?","engagementMedium=").concat(encodeURIComponent(n))}},function(t,e,n){t.exports=n(115)},function(t,e,n){var r=n(47),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){n(105);for(var r=n(1),o=n(18),i=n(26),s=n(2)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<u.length;c++){var a=u[c],f=r[a],p=f&&f.prototype;p&&!p[s]&&o(p,s,a),i[a]=i.Array}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(72),o=n(52).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(4),o=n(0),i=n(22);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",s)}},function(t,e,n){t.exports=n(97)},,,,function(t,e,n){t.exports=!n(13)&&!n(22)((function(){return 7!=Object.defineProperty(n(44)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var r=n(25),o=n(4),i=n(71),s=n(18),u=n(26),c=n(101),a=n(33),f=n(74),p=n(2)("iterator"),l=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,y,v,m){c(n,e,d);var b,g,_,w=function(t){if(!l&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",O="values"==y,T=!1,S=t.prototype,j=S[p]||S["@@iterator"]||y&&S[y],E=j||w(y),P=y?O?w("entries"):E:void 0,k="Array"==e&&S.entries||j;if(k&&(_=f(k.call(new t)))!==Object.prototype&&_.next&&(a(_,x,!0),r||"function"==typeof _[p]||s(_,p,h)),O&&j&&"values"!==j.name&&(T=!0,E=function(){return j.call(this)}),r&&!m||!l&&!T&&S[p]||s(S,p,E),u[e]=E,u[x]=h,y)if(b={values:O?E:w("values"),keys:v?E:w("keys"),entries:P},m)for(g in b)g in S||i(S,g,b[g]);else o(o.P+o.F*(l||T),e,b);return b}},function(t,e,n){t.exports=n(18)},function(t,e,n){var r=n(17),o=n(19),i=n(103)(!1),s=n(50)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,a=[];for(n in u)n!=s&&r(u,n)&&a.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(17),o=n(34),i=n(50)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(27);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e){},function(t,e,n){var r=n(27),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(77),o=n(2)("iterator"),i=n(26);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(5),o=n(24),i=n(2)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){var r,o,i,s=n(23),u=n(90),c=n(73),a=n(44),f=n(1),p=f.process,l=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,y=f.Dispatch,v=0,m={},b=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},g=function(t){b.call(t.data)};l&&h||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++v]=function(){u("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete m[t]},"process"==n(27)(p)?r=function(t){p.nextTick(s(b,t,1))}:y&&y.now?r=function(t){y.now(s(b,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=g,r=s(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",g,!1)):r="onreadystatechange"in a("script")?function(t){c.appendChild(a("script")).onreadystatechange=function(){c.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:l,clear:h}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(5),o=n(10),i=n(57);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===r(t)}},,function(t,e,n){var r=n(12),o=n(5),i=n(31);t.exports=n(13)?Object.defineProperties:function(t,e){o(t);for(var n,s=i(e),u=s.length,c=0;u>c;)r.f(t,n=s[c++],e[n]);return t}},function(t,e,n){"use strict";var r=n(1),o=n(17),i=n(13),s=n(4),u=n(71),c=n(109).KEY,a=n(22),f=n(51),p=n(33),l=n(32),h=n(2),d=n(53),y=n(54),v=n(110),m=n(75),b=n(5),g=n(10),_=n(34),w=n(19),x=n(45),O=n(28),T=n(49),S=n(87),j=n(56),E=n(62),P=n(12),k=n(31),C=j.f,A=P.f,R=S.f,L=r.Symbol,M=r.JSON,I=M&&M.stringify,q=h("_hidden"),D=h("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),H=f("symbols"),F=f("op-symbols"),J=Object.prototype,z="function"==typeof L&&!!E.f,X=r.QObject,B=!X||!X.prototype||!X.prototype.findChild,G=i&&a((function(){return 7!=T(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=C(J,e);r&&delete J[e],A(t,e,n),r&&t!==J&&A(J,e,r)}:A,W=function(t){var e=H[t]=T(L.prototype);return e._k=t,e},$=z&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},K=function(t,e,n){return t===J&&K(F,e,n),b(t),e=x(e,!0),b(n),o(H,e)?(n.enumerable?(o(t,q)&&t[q][e]&&(t[q][e]=!1),n=T(n,{enumerable:O(0,!1)})):(o(t,q)||A(t,q,O(1,{})),t[q][e]=!0),G(t,e,n)):A(t,e,n)},V=function(t,e){b(t);for(var n,r=v(e=w(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},Q=function(t){var e=U.call(this,t=x(t,!0));return!(this===J&&o(H,t)&&!o(F,t))&&(!(e||!o(this,t)||!o(H,t)||o(this,q)&&this[q][t])||e)},Y=function(t,e){if(t=w(t),e=x(e,!0),t!==J||!o(H,e)||o(F,e)){var n=C(t,e);return!n||!o(H,e)||o(t,q)&&t[q][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=R(w(t)),r=[],i=0;n.length>i;)o(H,e=n[i++])||e==q||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===J,r=R(n?F:w(t)),i=[],s=0;r.length>s;)!o(H,e=r[s++])||n&&!o(J,e)||i.push(H[e]);return i};z||(u((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(n){this===J&&e.call(F,n),o(this,q)&&o(this[q],t)&&(this[q][t]=!1),G(this,t,O(1,n))};return i&&B&&G(J,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",(function(){return this._k})),j.f=Y,P.f=K,n(63).f=S.f=Z,n(55).f=Q,E.f=tt,i&&!n(25)&&u(J,"propertyIsEnumerable",Q,!0),d.f=function(t){return W(h(t))}),s(s.G+s.W+s.F*!z,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=k(h.store),ot=0;rt.length>ot;)y(rt[ot++]);s(s.S+s.F*!z,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=L(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){B=!0},useSimple:function(){B=!1}}),s(s.S+s.F*!z,"Object",{create:function(t,e){return void 0===e?T(t):V(T(t),e)},defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=a((function(){E.f(1)}));s(s.S+s.F*it,"Object",{getOwnPropertySymbols:function(t){return E.f(_(t))}}),M&&s(s.S+s.F*(!z||a((function(){var t=L();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(g(e)||void 0!==t)&&!$(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$(e))return e}),r[1]=e,I.apply(M,r)}}),L.prototype[D]||n(18)(L.prototype,D,L.prototype.valueOf),p(L,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(t,e,n){var r=n(19),o=n(63).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(5);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(26),o=n(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(t){}return n}},,,,,function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){n(98);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(13),"Object",{defineProperty:n(12).f})},function(t,e,n){n(46),n(61),t.exports=n(53).f("iterator")},function(t,e,n){var r=n(47),o=n(48);t.exports=function(t){return function(e,n){var i,s,u=String(o(e)),c=r(n),a=u.length;return c<0||c>=a?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===a||(s=u.charCodeAt(c+1))<56320||s>57343?t?u.charAt(c):i:t?u.slice(c,c+2):s-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(49),o=n(28),i=n(33),s={};n(18)(s,n(2)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(s,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(27);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(19),o=n(60),i=n(104);t.exports=function(t){return function(e,n,s){var u,c=r(e),a=o(c.length),f=i(s,a);if(t&&n!=n){for(;a>f;)if((u=c[f++])!=u)return!0}else for(;a>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(47),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r=n(106),o=n(107),i=n(26),s=n(19);t.exports=n(70)(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(86),n(76),n(111),n(112),t.exports=n(0).Symbol},function(t,e,n){var r=n(32)("meta"),o=n(10),i=n(17),s=n(12).f,u=0,c=Object.isExtensible||function(){return!0},a=!n(22)((function(){return c(Object.preventExtensions({}))})),f=function(t){s(t,r,{value:{i:"O"+ ++u,w:{}}})},p=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return a&&p.NEED&&c(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(31),o=n(62),i=n(55);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var s,u=n(t),c=i.f,a=0;u.length>a;)c.call(t,s=u[a++])&&e.push(s);return e}},function(t,e,n){n(54)("asyncIterator")},function(t,e,n){n(54)("observable")},function(t,e,n){n(114),t.exports=n(0).Array.isArray},function(t,e,n){var r=n(4);r(r.S,"Array",{isArray:n(75)})},function(t,e,n){n(116),t.exports=n(0).Object.keys},function(t,e,n){var r=n(34),o=n(31);n(64)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){n(76),n(46),n(61),n(118),n(125),n(126),t.exports=n(0).Promise},function(t,e,n){"use strict";var r,o,i,s,u=n(25),c=n(1),a=n(23),f=n(77),p=n(4),l=n(10),h=n(24),d=n(119),y=n(120),v=n(79),m=n(80).set,b=n(121)(),g=n(57),_=n(81),w=n(122),x=n(82),O=c.TypeError,T=c.process,S=T&&T.versions,j=S&&S.v8||"",E=c.Promise,P="process"==f(T),k=function(){},C=o=g.f,A=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(k,k)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e&&0!==j.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),R=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;b((function(){for(var r=t._v,o=1==t._s,i=0,s=function(e){var n,i,s,u=o?e.ok:e.fail,c=e.resolve,a=e.reject,f=e.domain;try{u?(o||(2==t._h&&q(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),s=!0)),n===e.promise?a(O("Promise-chain cycle")):(i=R(n))?i.call(n,c,a):c(n)):a(r)}catch(t){f&&!s&&f.exit(),a(t)}};n.length>i;)s(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)}))}},M=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=I(t);if(i&&(e=_((function(){P?T.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=P||I(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},q=function(t){m.call(c,(function(){var e;P?T.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},D=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=R(t))?b((function(){var r={_w:n,_d:!1};try{e.call(t,a(U,r,1),a(D,r,1))}catch(t){D.call(r,t)}})):(n._v=t,n._s=1,L(n,!1))}catch(t){D.call({_w:n,_d:!1},t)}}};A||(E=function(t){d(this,E,"Promise","_h"),h(t),r.call(this);try{t(a(U,this,1),a(D,this,1))}catch(t){D.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(123)(E.prototype,{then:function(t,e){var n=C(v(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=P?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=a(U,t,1),this.reject=a(D,t,1)},g.f=C=function(t){return t===E||t===s?new i(t):o(t)}),p(p.G+p.W+p.F*!A,{Promise:E}),n(33)(E,"Promise"),n(124)("Promise"),s=n(0).Promise,p(p.S+p.F*!A,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),p(p.S+p.F*(u||!A),"Promise",{resolve:function(t){return x(u&&this===s?E:this,t)}}),p(p.S+p.F*!(A&&n(91)((function(t){E.all(t).catch(k)}))),"Promise",{all:function(t){var e=this,n=C(e),r=n.resolve,o=n.reject,i=_((function(){var n=[],i=0,s=1;y(t,!1,(function(t){var u=i++,c=!1;n.push(void 0),s++,e.resolve(t).then((function(t){c||(c=!0,n[u]=t,--s||r(n))}),o)})),--s||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=C(e),r=n.reject,o=_((function(){y(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(23),o=n(88),i=n(89),s=n(5),u=n(60),c=n(78),a={},f={};(e=t.exports=function(t,e,n,p,l){var h,d,y,v,m=l?function(){return t}:c(t),b=r(n,p,e?2:1),g=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=u(t.length);h>g;g++)if((v=e?b(s(d=t[g])[0],d[1]):b(t[g]))===a||v===f)return v}else for(y=m.call(t);!(d=y.next()).done;)if((v=o(y,b,d.value,e))===a||v===f)return v}).BREAK=a,e.RETURN=f},function(t,e,n){var r=n(1),o=n(80).set,i=r.MutationObserver||r.WebKitMutationObserver,s=r.process,u=r.Promise,c="process"==n(27)(s);t.exports=function(){var t,e,n,a=function(){var r,o;for(c&&(r=s.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){s.nextTick(a)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(a)}}else n=function(){o.call(r,a)};else{var p=!0,l=document.createTextNode("");new i(a).observe(l,{characterData:!0}),n=function(){l.data=p=!p}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){"use strict";var r=n(1),o=n(0),i=n(12),s=n(13),u=n(2)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];s&&e&&!e[u]&&i.f(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(4),o=n(0),i=n(1),s=n(79),u=n(82);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then((function(){return n}))}:t,n?function(n){return u(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(4),o=n(57),i=n(81);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=s,o.stableStringify=s;var n=[],r=[];function o(t,e,o){var i;for(!function t(e,o,i,s){var u;if("object"==typeof e&&null!==e){for(u=0;u<i.length;u++)if(i[u]===e){var c=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),n.push([s,o,e,c])):r.push([e,o]):(s[o]="[Circular]",n.push([s,o,e])))}if(i.push(e),Array.isArray(e))for(u=0;u<e.length;u++)t(e[u],u,i,e);else{var a=Object.keys(e);for(u=0;u<a.length;u++){var f=a[u];t(e[f],f,i,e)}}i.pop()}}(t,"",[],void 0),i=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,u(e),o);0!==n.length;){var s=n.pop();4===s.length?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function s(t,e,o){var s,c=function t(e,o,s,u){var c;if("object"==typeof e&&null!==e){for(c=0;c<s.length;c++)if(s[c]===e){var a=Object.getOwnPropertyDescriptor(u,o);return void(void 0!==a.get?a.configurable?(Object.defineProperty(u,o,{value:"[Circular]"}),n.push([u,o,e,a])):r.push([e,o]):(u[o]="[Circular]",n.push([u,o,e])))}if("function"==typeof e.toJSON)return;if(s.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,s,e);else{var f={},p=Object.keys(e).sort(i);for(c=0;c<p.length;c++){var l=p[c];t(e[l],l,s,e),f[l]=e[l]}if(void 0===u)return f;n.push([u,o,e]),u[o]=f}s.pop()}}(t,"",[],void 0)||t;for(s=0===r.length?JSON.stringify(c,e,o):JSON.stringify(c,u(e),o);0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return s}function u(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var o=0;o<r.length;o++){var i=r[o];if(i[1]===e&&i[0]===n){n="[Circular]",r.splice(o,1);break}}return t.call(this,e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(83);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&s.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,n){"use strict";var r=n(131);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){o.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),o.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,r(e.args))}))},t.exports=o},,,,,,,,,,,,,,,function(t,e,n){t.exports=n(58)}])}));
package/dist/squatch.d.ts CHANGED
@@ -85,9 +85,9 @@ export declare function submitEmail(fn: (target: any, widget: any, email: any) =
85
85
  * Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
86
86
  * This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
87
87
  * Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
88
-
88
+
89
89
  * It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
90
-
90
+
91
91
  *
92
92
  * @returns {void}
93
93
  *
@@ -147,14 +147,12 @@ function validateWidgetConfig(raw) {
147
147
  return raw;
148
148
  }
149
149
 
150
- const _log$7 = debug__default("squatch-js");
151
150
  /**
152
151
  *
153
152
  * The WidgetApi class is a wrapper around the Widget Endpoints of the SaaSquatch REST API.
154
153
  *
155
154
  */
156
155
 
157
-
158
156
  class WidgetApi {
159
157
  /**
160
158
  * Initialize a new {@link WidgetApi} instance.
@@ -249,14 +247,8 @@ class WidgetApi {
249
247
 
250
248
  const path = `/api/v1/${tenantAlias}/widget/account/${accountId}/user/${userId}/upsert${optionalParams}`;
251
249
  const url = this.domain + path;
252
-
253
- try {
254
- const cookies = Cookies.get("_saasquatch");
255
- if (cookies) user["cookies"] = cookies;
256
- } catch (e) {
257
- _log$7("Unable to retrieve cookie", e);
258
- }
259
-
250
+ const cookies = Cookies.get("_saasquatch");
251
+ if (cookies) user["cookies"] = cookies;
260
252
  return doPut(url, JSON.stringify(user), jwt);
261
253
  }
262
254
  /**
@@ -334,18 +326,10 @@ class WidgetApi {
334
326
 
335
327
  squatchReferralCookie() {
336
328
  const tenantAlias = encodeURIComponent(this.tenantAlias);
337
- let cookie = "";
338
329
 
339
- try {
340
- const _saasquatch = Cookies.get("_saasquatch");
341
-
342
- if (_saasquatch) {
343
- cookie = `?cookies=${encodeURIComponent(_saasquatch)}`;
344
- }
345
- } catch (e) {
346
- _log$7("Unable to retrieve cookie", e);
347
- }
330
+ const _saasquatch = Cookies.get("_saasquatch");
348
331
 
332
+ const cookie = _saasquatch ? `?cookies=${encodeURIComponent(_saasquatch)}` : ``;
349
333
  const url = `${this.domain}/a/${tenantAlias}/widgets/squatchcookiejson${cookie}`;
350
334
  return doGet(url);
351
335
  }
@@ -569,7 +553,7 @@ class Widget {
569
553
 
570
554
  let found = null;
571
555
 
572
- for (let i = 0; i < 50; i++) {
556
+ for (let i = 0; i < 5; i++) {
573
557
  found = search();
574
558
  if (found) break;
575
559
  await delay(100);
@@ -588,7 +572,6 @@ class Widget {
588
572
  lastName
589
573
  }, jwt) {
590
574
  const frameWindow = this.frame.contentWindow;
591
- console.log("context", this.context);
592
575
  const engagementMedium = this.context.engagementMedium || "POPUP";
593
576
 
594
577
  if (!frameWindow) {
@@ -726,7 +709,10 @@ class EmbedWidget extends Widget {
726
709
  }
727
710
 
728
711
  const frameDoc = contentWindow.document;
729
- this.frame.srcdoc = `${this.content}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`;
712
+ frameDoc.open();
713
+ frameDoc.write(this.content);
714
+ frameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
715
+ frameDoc.close();
730
716
  domready(frameDoc, async () => {
731
717
  const _sqh = contentWindow.squatch || contentWindow.widgetIdent;
732
718
 
@@ -752,7 +738,10 @@ class EmbedWidget extends Widget {
752
738
 
753
739
  this.frame.height = height;
754
740
  }
755
- });
741
+ }); // observe height right away
742
+
743
+ ro.observe(frameDoc.body); // observe any changes afterwards
744
+
756
745
  ro.observe(await this._findInnerContainer());
757
746
 
758
747
  this._loadEvent(_sqh);
@@ -818,8 +807,13 @@ class PopupWidget extends Widget {
818
807
  load() {
819
808
  this.popupdiv.appendChild(this.popupcontent);
820
809
  document.body.appendChild(this.popupdiv);
821
- this.popupcontent.appendChild(this.frame);
822
- this.frame.srcdoc = `${this.content}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`;
810
+ this.popupcontent.appendChild(this.frame); //@ts-ignore -- will occasionally throw a null pointer exception at runtime
811
+
812
+ const frameDoc = this.frame.contentWindow.document;
813
+ frameDoc.open();
814
+ frameDoc.write(this.content);
815
+ frameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
816
+ frameDoc.close();
823
817
 
824
818
  _log$4("Popup template loaded into iframe");
825
819
 
@@ -986,7 +980,10 @@ class CtaWidget extends PopupWidget {
986
980
  }
987
981
 
988
982
  const ctaFrameDoc = ctaFrameWindow.document;
989
- ctaFrame.srcdoc = `${ctaElement.innerHTML}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`; // Figure out size of CTA as well
983
+ ctaFrameDoc.open();
984
+ ctaFrameDoc.write(ctaElement.innerHTML);
985
+ ctaFrameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
986
+ ctaFrameDoc.close(); // Figure out size of CTA as well
990
987
 
991
988
  domready(ctaFrameDoc, () => {
992
989
  const ctaContainer = ctaFrameDoc.getElementsByClassName("cta-container")[0]; // @ts-ignore - Assume it's a stylable element, die otherwise
@@ -1464,7 +1461,7 @@ class EventsApi {
1464
1461
  * Track an event for a user
1465
1462
  *
1466
1463
  * @param params Parameters for request
1467
- * @param params.jwt the JSON Web Token (JWT) that is used to authenticate the user
1464
+ * @param options.jwt the JSON Web Token (JWT) that is used to authenticate the user
1468
1465
  *
1469
1466
  * @return An ID to confirm the event has been accepted for asynchronous processing
1470
1467
  */
@@ -2151,9 +2148,9 @@ function submitEmail(fn) {
2151
2148
  * Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
2152
2149
  * This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
2153
2150
  * Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
2154
-
2151
+
2155
2152
  * It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
2156
-
2153
+
2157
2154
  *
2158
2155
  * @returns {void}
2159
2156
  *
@@ -1 +1 @@
1
- {"version":3,"file":"squatch.esm.js","sources":["../node_modules/@ungap/url-search-params/esm/index.js"],"sourcesContent":["/*! (c) Andrea Giammarchi - ISC */\nvar self = this || /* istanbul ignore next */ {};\ntry {\n (function (URLSearchParams, plus) {\n if (\n new URLSearchParams('q=%2B').get('q') !== plus ||\n new URLSearchParams({q: plus}).get('q') !== plus ||\n new URLSearchParams([['q', plus]]).get('q') !== plus ||\n new URLSearchParams('q=\\n').toString() !== 'q=%0A' ||\n new URLSearchParams({q: ' &'}).toString() !== 'q=+%26' ||\n new URLSearchParams({q: '%zx'}).toString() !== 'q=%25zx'\n )\n throw URLSearchParams;\n self.URLSearchParams = URLSearchParams;\n }(URLSearchParams, '+'));\n} catch(URLSearchParams) {\n (function (Object, String, isArray) {'use strict';\n var create = Object.create;\n var defineProperty = Object.defineProperty;\n var find = /[!'\\(\\)~]|%20|%00/g;\n var findPercentSign = /%(?![0-9a-fA-F]{2})/g;\n var plus = /\\+/g;\n var replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n var proto = {\n append: function (key, value) {\n appendTo(this._ungap, key, value);\n },\n delete: function (key) {\n delete this._ungap[key];\n },\n get: function (key) {\n return this.has(key) ? this._ungap[key][0] : null;\n },\n getAll: function (key) {\n return this.has(key) ? this._ungap[key].slice(0) : [];\n },\n has: function (key) {\n return key in this._ungap;\n },\n set: function (key, value) {\n this._ungap[key] = [String(value)];\n },\n forEach: function (callback, thisArg) {\n var self = this;\n for (var key in self._ungap)\n self._ungap[key].forEach(invoke, key);\n function invoke(value) {\n callback.call(thisArg, value, String(key), self);\n }\n },\n toJSON: function () {\n return {};\n },\n toString: function () {\n var query = [];\n for (var key in this._ungap) {\n var encoded = encode(key);\n for (var\n i = 0,\n value = this._ungap[key];\n i < value.length; i++\n ) {\n query.push(encoded + '=' + encode(value[i]));\n }\n }\n return query.join('&');\n }\n };\n for (var key in proto)\n defineProperty(URLSearchParams.prototype, key, {\n configurable: true,\n writable: true,\n value: proto[key]\n });\n self.URLSearchParams = URLSearchParams;\n function URLSearchParams(query) {\n var dict = create(null);\n defineProperty(this, '_ungap', {value: dict});\n switch (true) {\n case !query:\n break;\n case typeof query === 'string':\n if (query.charAt(0) === '?') {\n query = query.slice(1);\n }\n for (var\n pairs = query.split('&'),\n i = 0,\n length = pairs.length; i < length; i++\n ) {\n var value = pairs[i];\n var index = value.indexOf('=');\n if (-1 < index) {\n appendTo(\n dict,\n decode(value.slice(0, index)),\n decode(value.slice(index + 1))\n );\n } else if (value.length){\n appendTo(\n dict,\n decode(value),\n ''\n );\n }\n }\n break;\n case isArray(query):\n for (var\n i = 0,\n length = query.length; i < length; i++\n ) {\n var value = query[i];\n appendTo(dict, value[0], value[1]);\n }\n break;\n case 'forEach' in query:\n query.forEach(addEach, dict);\n break;\n default:\n for (var key in query)\n appendTo(dict, key, query[key]);\n }\n }\n\n function addEach(value, key) {\n appendTo(this, key, value);\n }\n\n function appendTo(dict, key, value) {\n var res = isArray(value) ? value.join(',') : value;\n if (key in dict)\n dict[key].push(res);\n else\n dict[key] = [res];\n }\n\n function decode(str) {\n return decodeURIComponent(str.replace(findPercentSign, '%25').replace(plus, ' '));\n }\n\n function encode(str) {\n return encodeURIComponent(str).replace(find, replacer);\n }\n\n function replacer(match) {\n return replace[match];\n }\n\n }(Object, String, Array.isArray));\n}\n\n(function (URLSearchParamsProto) {\n\n var iterable = false;\n try { iterable = !!Symbol.iterator; } catch (o_O) {}\n\n /* istanbul ignore else */\n if (!('forEach' in URLSearchParamsProto)) {\n URLSearchParamsProto.forEach = function forEach(callback, thisArg) {\n var self = this;\n var names = Object.create(null);\n this.toString()\n .replace(/=[\\s\\S]*?(?:&|$)/g, '=')\n .split('=')\n .forEach(function (name) {\n if (!name.length || name in names)\n return;\n (names[name] = self.getAll(name)).forEach(function(value) {\n callback.call(thisArg, value, name, self);\n });\n });\n };\n }\n\n /* istanbul ignore else */\n if (!('keys' in URLSearchParamsProto)) {\n URLSearchParamsProto.keys = function keys() {\n return iterator(this, function(value, key) { this.push(key); });\n };\n }\n\n /* istanbul ignore else */\n if (!('values' in URLSearchParamsProto)) {\n URLSearchParamsProto.values = function values() {\n return iterator(this, function(value, key) { this.push(value); });\n };\n }\n\n /* istanbul ignore else */\n if (!('entries' in URLSearchParamsProto)) {\n URLSearchParamsProto.entries = function entries() {\n return iterator(this, function(value, key) { this.push([key, value]); });\n };\n }\n\n /* istanbul ignore else */\n if (iterable && !(Symbol.iterator in URLSearchParamsProto)) {\n URLSearchParamsProto[Symbol.iterator] = URLSearchParamsProto.entries;\n }\n\n /* istanbul ignore else */\n if (!('sort' in URLSearchParamsProto)) {\n URLSearchParamsProto.sort = function sort() {\n var\n entries = this.entries(),\n entry = entries.next(),\n done = entry.done,\n keys = [],\n values = Object.create(null),\n i, key, value\n ;\n while (!done) {\n value = entry.value;\n key = value[0];\n keys.push(key);\n if (!(key in values)) {\n values[key] = [];\n }\n values[key].push(value[1]);\n entry = entries.next();\n done = entry.done;\n }\n // not the champion in efficiency\n // but these two bits just do the job\n keys.sort();\n for (i = 0; i < keys.length; i++) {\n this.delete(keys[i]);\n }\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n this.append(key, values[key].shift());\n }\n };\n }\n\n function iterator(self, callback) {\n var items = [];\n self.forEach(callback, items);\n /* istanbul ignore next */\n return iterable ?\n items[Symbol.iterator]() :\n {\n next: function() {\n var value = items.shift();\n return {done: value === void 0, value: value};\n }\n };\n }\n\n /* istanbul ignore next */\n (function (Object) {\n var\n dP = Object.defineProperty,\n gOPD = Object.getOwnPropertyDescriptor,\n createSearchParamsPollute = function (search) {\n function append(name, value) {\n URLSearchParamsProto.append.call(this, name, value);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n function del(name) {\n URLSearchParamsProto.delete.call(this, name);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n function set(name, value) {\n URLSearchParamsProto.set.call(this, name, value);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n return function (sp, value) {\n sp.append = append;\n sp.delete = del;\n sp.set = set;\n return dP(sp, '_usp', {\n configurable: true,\n writable: true,\n value: value\n });\n };\n },\n createSearchParamsCreate = function (polluteSearchParams) {\n return function (obj, sp) {\n dP(\n obj, '_searchParams', {\n configurable: true,\n writable: true,\n value: polluteSearchParams(sp, obj)\n }\n );\n return sp;\n };\n },\n updateSearchParams = function (sp) {\n var append = sp.append;\n sp.append = URLSearchParamsProto.append;\n URLSearchParams.call(sp, sp._usp.search.slice(1));\n sp.append = append;\n },\n verifySearchParams = function (obj, Class) {\n if (!(obj instanceof Class)) throw new TypeError(\n \"'searchParams' accessed on an object that \" +\n \"does not implement interface \" + Class.name\n );\n },\n upgradeClass = function (Class) {\n var\n ClassProto = Class.prototype,\n searchParams = gOPD(ClassProto, 'searchParams'),\n href = gOPD(ClassProto, 'href'),\n search = gOPD(ClassProto, 'search'),\n createSearchParams\n ;\n if (!searchParams && search && search.set) {\n createSearchParams = createSearchParamsCreate(\n createSearchParamsPollute(search)\n );\n Object.defineProperties(\n ClassProto,\n {\n href: {\n get: function () {\n return href.get.call(this);\n },\n set: function (value) {\n var sp = this._searchParams;\n href.set.call(this, value);\n if (sp) updateSearchParams(sp);\n }\n },\n search: {\n get: function () {\n return search.get.call(this);\n },\n set: function (value) {\n var sp = this._searchParams;\n search.set.call(this, value);\n if (sp) updateSearchParams(sp);\n }\n },\n searchParams: {\n get: function () {\n verifySearchParams(this, Class);\n return this._searchParams || createSearchParams(\n this,\n new URLSearchParams(this.search.slice(1))\n );\n },\n set: function (sp) {\n verifySearchParams(this, Class);\n createSearchParams(this, sp);\n }\n }\n }\n );\n }\n }\n ;\n try {\n upgradeClass(HTMLAnchorElement);\n if (/^function|object$/.test(typeof URL) && URL.prototype)\n upgradeClass(URL);\n } catch (meh) {}\n }(Object));\n\n}(self.URLSearchParams.prototype, Object));\nexport default self.URLSearchParams;\n"],"names":["this"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AG,CAAC,IAAI,GAAG,CAAC,SAAS;AAC/D,QAAQ,YAAY,CAAC,GAAG,CAAC,CAAC;AAC1B,KAAK,CAAC,OAAO,GAAG,EAAE,EAAE;AACpB,GAAG,CAAC,MAAM,CAAC,EAAE;AACb;AACA,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,SAAiB,CAAC,EAAE;AAC3C,wBAAe,IAAI,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"squatch.esm.js","sources":["../node_modules/@ungap/url-search-params/esm/index.js"],"sourcesContent":["/*! (c) Andrea Giammarchi - ISC */\nvar self = this || /* istanbul ignore next */ {};\ntry {\n (function (URLSearchParams, plus) {\n if (\n new URLSearchParams('q=%2B').get('q') !== plus ||\n new URLSearchParams({q: plus}).get('q') !== plus ||\n new URLSearchParams([['q', plus]]).get('q') !== plus ||\n new URLSearchParams('q=\\n').toString() !== 'q=%0A' ||\n new URLSearchParams({q: ' &'}).toString() !== 'q=+%26' ||\n new URLSearchParams({q: '%zx'}).toString() !== 'q=%25zx'\n )\n throw URLSearchParams;\n self.URLSearchParams = URLSearchParams;\n }(URLSearchParams, '+'));\n} catch(URLSearchParams) {\n (function (Object, String, isArray) {'use strict';\n var create = Object.create;\n var defineProperty = Object.defineProperty;\n var find = /[!'\\(\\)~]|%20|%00/g;\n var findPercentSign = /%(?![0-9a-fA-F]{2})/g;\n var plus = /\\+/g;\n var replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n var proto = {\n append: function (key, value) {\n appendTo(this._ungap, key, value);\n },\n delete: function (key) {\n delete this._ungap[key];\n },\n get: function (key) {\n return this.has(key) ? this._ungap[key][0] : null;\n },\n getAll: function (key) {\n return this.has(key) ? this._ungap[key].slice(0) : [];\n },\n has: function (key) {\n return key in this._ungap;\n },\n set: function (key, value) {\n this._ungap[key] = [String(value)];\n },\n forEach: function (callback, thisArg) {\n var self = this;\n for (var key in self._ungap)\n self._ungap[key].forEach(invoke, key);\n function invoke(value) {\n callback.call(thisArg, value, String(key), self);\n }\n },\n toJSON: function () {\n return {};\n },\n toString: function () {\n var query = [];\n for (var key in this._ungap) {\n var encoded = encode(key);\n for (var\n i = 0,\n value = this._ungap[key];\n i < value.length; i++\n ) {\n query.push(encoded + '=' + encode(value[i]));\n }\n }\n return query.join('&');\n }\n };\n for (var key in proto)\n defineProperty(URLSearchParams.prototype, key, {\n configurable: true,\n writable: true,\n value: proto[key]\n });\n self.URLSearchParams = URLSearchParams;\n function URLSearchParams(query) {\n var dict = create(null);\n defineProperty(this, '_ungap', {value: dict});\n switch (true) {\n case !query:\n break;\n case typeof query === 'string':\n if (query.charAt(0) === '?') {\n query = query.slice(1);\n }\n for (var\n pairs = query.split('&'),\n i = 0,\n length = pairs.length; i < length; i++\n ) {\n var value = pairs[i];\n var index = value.indexOf('=');\n if (-1 < index) {\n appendTo(\n dict,\n decode(value.slice(0, index)),\n decode(value.slice(index + 1))\n );\n } else if (value.length){\n appendTo(\n dict,\n decode(value),\n ''\n );\n }\n }\n break;\n case isArray(query):\n for (var\n i = 0,\n length = query.length; i < length; i++\n ) {\n var value = query[i];\n appendTo(dict, value[0], value[1]);\n }\n break;\n case 'forEach' in query:\n query.forEach(addEach, dict);\n break;\n default:\n for (var key in query)\n appendTo(dict, key, query[key]);\n }\n }\n\n function addEach(value, key) {\n appendTo(this, key, value);\n }\n\n function appendTo(dict, key, value) {\n var res = isArray(value) ? value.join(',') : value;\n if (key in dict)\n dict[key].push(res);\n else\n dict[key] = [res];\n }\n\n function decode(str) {\n return decodeURIComponent(str.replace(findPercentSign, '%25').replace(plus, ' '));\n }\n\n function encode(str) {\n return encodeURIComponent(str).replace(find, replacer);\n }\n\n function replacer(match) {\n return replace[match];\n }\n\n }(Object, String, Array.isArray));\n}\n\n(function (URLSearchParamsProto) {\n\n var iterable = false;\n try { iterable = !!Symbol.iterator; } catch (o_O) {}\n\n /* istanbul ignore else */\n if (!('forEach' in URLSearchParamsProto)) {\n URLSearchParamsProto.forEach = function forEach(callback, thisArg) {\n var self = this;\n var names = Object.create(null);\n this.toString()\n .replace(/=[\\s\\S]*?(?:&|$)/g, '=')\n .split('=')\n .forEach(function (name) {\n if (!name.length || name in names)\n return;\n (names[name] = self.getAll(name)).forEach(function(value) {\n callback.call(thisArg, value, name, self);\n });\n });\n };\n }\n\n /* istanbul ignore else */\n if (!('keys' in URLSearchParamsProto)) {\n URLSearchParamsProto.keys = function keys() {\n return iterator(this, function(value, key) { this.push(key); });\n };\n }\n\n /* istanbul ignore else */\n if (!('values' in URLSearchParamsProto)) {\n URLSearchParamsProto.values = function values() {\n return iterator(this, function(value, key) { this.push(value); });\n };\n }\n\n /* istanbul ignore else */\n if (!('entries' in URLSearchParamsProto)) {\n URLSearchParamsProto.entries = function entries() {\n return iterator(this, function(value, key) { this.push([key, value]); });\n };\n }\n\n /* istanbul ignore else */\n if (iterable && !(Symbol.iterator in URLSearchParamsProto)) {\n URLSearchParamsProto[Symbol.iterator] = URLSearchParamsProto.entries;\n }\n\n /* istanbul ignore else */\n if (!('sort' in URLSearchParamsProto)) {\n URLSearchParamsProto.sort = function sort() {\n var\n entries = this.entries(),\n entry = entries.next(),\n done = entry.done,\n keys = [],\n values = Object.create(null),\n i, key, value\n ;\n while (!done) {\n value = entry.value;\n key = value[0];\n keys.push(key);\n if (!(key in values)) {\n values[key] = [];\n }\n values[key].push(value[1]);\n entry = entries.next();\n done = entry.done;\n }\n // not the champion in efficiency\n // but these two bits just do the job\n keys.sort();\n for (i = 0; i < keys.length; i++) {\n this.delete(keys[i]);\n }\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n this.append(key, values[key].shift());\n }\n };\n }\n\n function iterator(self, callback) {\n var items = [];\n self.forEach(callback, items);\n /* istanbul ignore next */\n return iterable ?\n items[Symbol.iterator]() :\n {\n next: function() {\n var value = items.shift();\n return {done: value === void 0, value: value};\n }\n };\n }\n\n /* istanbul ignore next */\n (function (Object) {\n var\n dP = Object.defineProperty,\n gOPD = Object.getOwnPropertyDescriptor,\n createSearchParamsPollute = function (search) {\n function append(name, value) {\n URLSearchParamsProto.append.call(this, name, value);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n function del(name) {\n URLSearchParamsProto.delete.call(this, name);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n function set(name, value) {\n URLSearchParamsProto.set.call(this, name, value);\n name = this.toString();\n search.set.call(this._usp, name ? ('?' + name) : '');\n }\n return function (sp, value) {\n sp.append = append;\n sp.delete = del;\n sp.set = set;\n return dP(sp, '_usp', {\n configurable: true,\n writable: true,\n value: value\n });\n };\n },\n createSearchParamsCreate = function (polluteSearchParams) {\n return function (obj, sp) {\n dP(\n obj, '_searchParams', {\n configurable: true,\n writable: true,\n value: polluteSearchParams(sp, obj)\n }\n );\n return sp;\n };\n },\n updateSearchParams = function (sp) {\n var append = sp.append;\n sp.append = URLSearchParamsProto.append;\n URLSearchParams.call(sp, sp._usp.search.slice(1));\n sp.append = append;\n },\n verifySearchParams = function (obj, Class) {\n if (!(obj instanceof Class)) throw new TypeError(\n \"'searchParams' accessed on an object that \" +\n \"does not implement interface \" + Class.name\n );\n },\n upgradeClass = function (Class) {\n var\n ClassProto = Class.prototype,\n searchParams = gOPD(ClassProto, 'searchParams'),\n href = gOPD(ClassProto, 'href'),\n search = gOPD(ClassProto, 'search'),\n createSearchParams\n ;\n if (!searchParams && search && search.set) {\n createSearchParams = createSearchParamsCreate(\n createSearchParamsPollute(search)\n );\n Object.defineProperties(\n ClassProto,\n {\n href: {\n get: function () {\n return href.get.call(this);\n },\n set: function (value) {\n var sp = this._searchParams;\n href.set.call(this, value);\n if (sp) updateSearchParams(sp);\n }\n },\n search: {\n get: function () {\n return search.get.call(this);\n },\n set: function (value) {\n var sp = this._searchParams;\n search.set.call(this, value);\n if (sp) updateSearchParams(sp);\n }\n },\n searchParams: {\n get: function () {\n verifySearchParams(this, Class);\n return this._searchParams || createSearchParams(\n this,\n new URLSearchParams(this.search.slice(1))\n );\n },\n set: function (sp) {\n verifySearchParams(this, Class);\n createSearchParams(this, sp);\n }\n }\n }\n );\n }\n }\n ;\n try {\n upgradeClass(HTMLAnchorElement);\n if (/^function|object$/.test(typeof URL) && URL.prototype)\n upgradeClass(URL);\n } catch (meh) {}\n }(Object));\n\n}(self.URLSearchParams.prototype, Object));\nexport default self.URLSearchParams;\n"],"names":["this"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 +174,12 @@ function validateWidgetConfig(raw) {
174
174
  return raw;
175
175
  }
176
176
 
177
- const _log$7 = debug__default['default']("squatch-js");
178
177
  /**
179
178
  *
180
179
  * The WidgetApi class is a wrapper around the Widget Endpoints of the SaaSquatch REST API.
181
180
  *
182
181
  */
183
182
 
184
-
185
183
  class WidgetApi {
186
184
  /**
187
185
  * Initialize a new {@link WidgetApi} instance.
@@ -276,14 +274,8 @@ class WidgetApi {
276
274
 
277
275
  const path = `/api/v1/${tenantAlias}/widget/account/${accountId}/user/${userId}/upsert${optionalParams}`;
278
276
  const url = this.domain + path;
279
-
280
- try {
281
- const cookies = Cookies__default['default'].get("_saasquatch");
282
- if (cookies) user["cookies"] = cookies;
283
- } catch (e) {
284
- _log$7("Unable to retrieve cookie", e);
285
- }
286
-
277
+ const cookies = Cookies__default['default'].get("_saasquatch");
278
+ if (cookies) user["cookies"] = cookies;
287
279
  return doPut(url, JSON.stringify(user), jwt);
288
280
  }
289
281
  /**
@@ -361,18 +353,10 @@ class WidgetApi {
361
353
 
362
354
  squatchReferralCookie() {
363
355
  const tenantAlias = encodeURIComponent(this.tenantAlias);
364
- let cookie = "";
365
356
 
366
- try {
367
- const _saasquatch = Cookies__default['default'].get("_saasquatch");
368
-
369
- if (_saasquatch) {
370
- cookie = `?cookies=${encodeURIComponent(_saasquatch)}`;
371
- }
372
- } catch (e) {
373
- _log$7("Unable to retrieve cookie", e);
374
- }
357
+ const _saasquatch = Cookies__default['default'].get("_saasquatch");
375
358
 
359
+ const cookie = _saasquatch ? `?cookies=${encodeURIComponent(_saasquatch)}` : ``;
376
360
  const url = `${this.domain}/a/${tenantAlias}/widgets/squatchcookiejson${cookie}`;
377
361
  return doGet(url);
378
362
  }
@@ -596,7 +580,7 @@ class Widget {
596
580
 
597
581
  let found = null;
598
582
 
599
- for (let i = 0; i < 50; i++) {
583
+ for (let i = 0; i < 5; i++) {
600
584
  found = search();
601
585
  if (found) break;
602
586
  await delay(100);
@@ -615,7 +599,6 @@ class Widget {
615
599
  lastName
616
600
  }, jwt) {
617
601
  const frameWindow = this.frame.contentWindow;
618
- console.log("context", this.context);
619
602
  const engagementMedium = this.context.engagementMedium || "POPUP";
620
603
 
621
604
  if (!frameWindow) {
@@ -753,7 +736,10 @@ class EmbedWidget extends Widget {
753
736
  }
754
737
 
755
738
  const frameDoc = contentWindow.document;
756
- this.frame.srcdoc = `${this.content}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`;
739
+ frameDoc.open();
740
+ frameDoc.write(this.content);
741
+ frameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
742
+ frameDoc.close();
757
743
  domready(frameDoc, async () => {
758
744
  const _sqh = contentWindow.squatch || contentWindow.widgetIdent;
759
745
 
@@ -779,7 +765,10 @@ class EmbedWidget extends Widget {
779
765
 
780
766
  this.frame.height = height;
781
767
  }
782
- });
768
+ }); // observe height right away
769
+
770
+ ro.observe(frameDoc.body); // observe any changes afterwards
771
+
783
772
  ro.observe(await this._findInnerContainer());
784
773
 
785
774
  this._loadEvent(_sqh);
@@ -845,8 +834,13 @@ class PopupWidget extends Widget {
845
834
  load() {
846
835
  this.popupdiv.appendChild(this.popupcontent);
847
836
  document.body.appendChild(this.popupdiv);
848
- this.popupcontent.appendChild(this.frame);
849
- this.frame.srcdoc = `${this.content}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`;
837
+ this.popupcontent.appendChild(this.frame); //@ts-ignore -- will occasionally throw a null pointer exception at runtime
838
+
839
+ const frameDoc = this.frame.contentWindow.document;
840
+ frameDoc.open();
841
+ frameDoc.write(this.content);
842
+ frameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
843
+ frameDoc.close();
850
844
 
851
845
  _log$4("Popup template loaded into iframe");
852
846
 
@@ -1013,7 +1007,10 @@ class CtaWidget extends PopupWidget {
1013
1007
  }
1014
1008
 
1015
1009
  const ctaFrameDoc = ctaFrameWindow.document;
1016
- ctaFrame.srcdoc = `${ctaElement.innerHTML}<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`; // Figure out size of CTA as well
1010
+ ctaFrameDoc.open();
1011
+ ctaFrameDoc.write(ctaElement.innerHTML);
1012
+ ctaFrameDoc.write(`<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"></script>`);
1013
+ ctaFrameDoc.close(); // Figure out size of CTA as well
1017
1014
 
1018
1015
  domready(ctaFrameDoc, () => {
1019
1016
  const ctaContainer = ctaFrameDoc.getElementsByClassName("cta-container")[0]; // @ts-ignore - Assume it's a stylable element, die otherwise
@@ -1491,7 +1488,7 @@ class EventsApi {
1491
1488
  * Track an event for a user
1492
1489
  *
1493
1490
  * @param params Parameters for request
1494
- * @param params.jwt the JSON Web Token (JWT) that is used to authenticate the user
1491
+ * @param options.jwt the JSON Web Token (JWT) that is used to authenticate the user
1495
1492
  *
1496
1493
  * @return An ID to confirm the event has been accepted for asynchronous processing
1497
1494
  */
@@ -2178,9 +2175,9 @@ function submitEmail(fn) {
2178
2175
  * Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
2179
2176
  * This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
2180
2177
  * Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
2181
-
2178
+
2182
2179
  * It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
2183
-
2180
+
2184
2181
  *
2185
2182
  * @returns {void}
2186
2183
  *