Socket
Socket
Sign inDemoInstall

@livechat/accounts-sdk

Package Overview
Dependencies
16
Maintainers
67
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.6-beta.6 to 2.0.6-beta.8

4

dist/accounts-sdk.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).AccountsSDK=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={extend:function(e){return e.oauth_exception&&this.oauth_exception[e.oauth_exception]?Object.assign(e,{description:this.oauth_exception[e.oauth_exception]}):e.identity_exception&&this.identity_exception[e.identity_exception]?Object.assign(e,{description:this.identity_exception[e.identity_exception]}):e},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}},c=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.options=r,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}return n(e,[{key:"start",value:function(e,t){var r=this;this._listenerInited||(this.listening=!0,this.callback=t,e&&(this.tid=setTimeout((function(){r.stop(),t("timeout",null)}),e)),window.addEventListener("message",this.receiveMessage))}},{key:"stop",value:function(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}},{key:"receiveMessage",value:function(e){e.origin!==this.options.server_url&&e.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(e.data.data||e.data.error)&&(this.stop(),e.data.error?this.callback(s.extend(e.data.error),null):(e.data.data.scopes&&(e.data.data.scope=e.data.data.scopes,delete e.data.data.scopes),e.data.data.expires_in&&(e.data.data.expires_in=parseInt(e.data.data.expires_in)||0),this.callback(null,e.data.data)))}}]),e}(),u=function(){function e(r,n){t(this,e),this.options=n,this.sdk=r}return n(e,[{key:"authorize",value:function(){var e=this;return new Promise((function(t,r){var n=e.sdk.authorizeURL(e.options,"button"),i=window.screen.width/2-250,o=window.screen.height/2-325;new c(e.options).start(null,(function(e,n){if(e)return r(e);t(n)}));var a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(i,",top=").concat(o))};document.requestStorageAccess?document.requestStorageAccess().then(a,a):a()}))}}]),e}(),l=Object.prototype.hasOwnProperty,f=Array.isArray,p=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),h=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"===e(l)&&null!==l&&-1===n.indexOf(l)&&(r.push({obj:a,prop:u}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(f(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(r),t},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(t,r,n){if(0===t.length)return t;var i=t;if("symbol"===e(t)?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<i.length;++a){var s=i.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=i.charAt(a):s<128?o+=p[s]:s<2048?o+=p[192|s>>6]+p[128|63&s]:s<55296||s>=57344?o+=p[224|s>>12]+p[128|s>>6&63]+p[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(a)),o+=p[240|s>>18]+p[128|s>>12&63]+p[128|s>>6&63]+p[128|63&s])}return o},isBuffer:function(t){return!(!t||"object"!==e(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(f(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function t(r,n,i){if(!n)return r;if("object"!==e(n)){if(f(r))r.push(n);else{if(!r||"object"!==e(r))return[r,n];(i&&(i.plainObjects||i.allowPrototypes)||!l.call(Object.prototype,n))&&(r[n]=!0)}return r}if(!r||"object"!==e(r))return[r].concat(n);var o=r;return f(r)&&!f(n)&&(o=h(r,i)),f(r)&&f(n)?(n.forEach((function(n,o){if(l.call(r,o)){var a=r[o];a&&"object"===e(a)&&n&&"object"===e(n)?r[o]=t(a,n,i):r.push(n)}else r[o]=n})),r):Object.keys(n).reduce((function(e,r){var o=n[r];return l.call(e,r)?e[r]=t(e[r],o,i):e[r]=o,e}),o)}},y=String.prototype.replace,g=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"},v=d.assign({default:m.RFC3986,formatters:{RFC1738:function(e){return y.call(e,g,"+")},RFC3986:function(e){return String(e)}}},m),b=Object.prototype.hasOwnProperty,w={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},_=Array.isArray,k=Array.prototype.push,O=function(e,t){k.apply(e,_(t)?t:[t])},j=Date.prototype.toISOString,x=v.default,S={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:d.encode,encodeValuesOnly:!1,format:x,formatter:v.formatters[x],indices:!1,serializeDate:function(e){return j.call(e)},skipNulls:!1,strictNullHandling:!1},P=function t(r,n,i,o,a,s,c,u,l,f,p,h,y){var g,m=r;if("function"==typeof c?m=c(n,m):m instanceof Date?m=f(m):"comma"===i&&_(m)&&(m=d.maybeMap(m,(function(e){return e instanceof Date?f(e):e})).join(",")),null===m){if(o)return s&&!h?s(n,S.encoder,y,"key"):n;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"===e(g)||"bigint"==typeof g||d.isBuffer(m))return s?[p(h?n:s(n,S.encoder,y,"key"))+"="+p(s(m,S.encoder,y,"value"))]:[p(n)+"="+p(String(m))];var v,b=[];if(void 0===m)return b;if(_(c))v=c;else{var w=Object.keys(m);v=u?w.sort(u):w}for(var k=0;k<v.length;++k){var j=v[k],x=m[j];if(!a||null!==x){var P=_(m)?"function"==typeof i?i(n,j):n:n+(l?"."+j:"["+j+"]");O(b,t(x,P,i,o,a,s,c,u,l,f,p,h,y))}}return b},A=Object.prototype.hasOwnProperty,I=Array.isArray,C={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:d.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},N=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},R=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),s=a?i.slice(0,a.index):i,c=[];if(s){if(!r.plainObjects&&A.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(a=o.exec(i))&&u<r.depth;){if(u+=1,!r.plainObjects&&A.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var i=n?t:N(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:a[c]=i:a={0:i}}i=a}return i}(c,t,r,n)}},E=function(e,t){var r=function(e){if(!e)return C;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?C.charset:e.charset;return{allowDots:void 0===e.allowDots?C.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:C.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:C.comma,decoder:"function"==typeof e.decoder?e.decoder:C.decoder,delimiter:"string"==typeof e.delimiter||d.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:C.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:C.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:C.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=i.split(t.delimiter,o),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),s=r,r=a.length);for(r=0;r<a.length;++r)if(r!==s){var u,l,f=a[r],p=f.indexOf("]="),h=-1===p?f.indexOf("="):p+1;-1===h?(u=t.decoder(f,C.decoder,c,"key"),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,h),C.decoder,c,"key"),l=d.maybeMap(N(f.slice(h+1),t),(function(e){return t.decoder(e,C.decoder,c,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=D(l)),f.indexOf("[]=")>-1&&(l=I(l)?[l]:l),A.call(n,u)?n[u]=d.combine(n[u],l):n[u]=l}return n}(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var s=o[a],c=R(s,n[s],r,"string"==typeof e);i=d.merge(i,c,r)}return d.compact(i)},L=function(t,r){var n,i=t,o=function(e){if(!e)return S;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||S.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=v.default;if(void 0!==e.format){if(!b.call(v.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=v.formatters[r],i=S.filter;return("function"==typeof e.filter||_(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:S.addQueryPrefix,allowDots:void 0===e.allowDots?S.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:S.charsetSentinel,delimiter:void 0===e.delimiter?S.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:S.encode,encoder:"function"==typeof e.encoder?e.encoder:S.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:S.encodeValuesOnly,filter:i,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:S.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:S.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:S.strictNullHandling}}(r);"function"==typeof o.filter?i=(0,o.filter)("",i):_(o.filter)&&(n=o.filter);var a,s=[];if("object"!==e(i)||null===i)return"";a=r&&r.arrayFormat in w?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices";var c=w[a];n||(n=Object.keys(i)),o.sort&&n.sort(o.sort);for(var u=0;u<n.length;++u){var l=n[u];o.skipNulls&&null===i[l]||O(s,P(i[l],l,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var f=s.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).AccountsSDK=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={extend:function(e){return e.oauth_exception&&this.oauth_exception[e.oauth_exception]?Object.assign(e,{description:this.oauth_exception[e.oauth_exception]}):e.identity_exception&&this.identity_exception[e.identity_exception]?Object.assign(e,{description:this.identity_exception[e.identity_exception]}):e},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}},c=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.options=r,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}return n(e,[{key:"start",value:function(e,t){var r=this;this._listenerInited||(this.listening=!0,this.callback=t,e&&(this.tid=setTimeout((function(){r.stop(),t("timeout",null)}),e)),window.addEventListener("message",this.receiveMessage))}},{key:"stop",value:function(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}},{key:"receiveMessage",value:function(e){e.origin!==this.options.server_url&&e.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(e.data.data||e.data.error)&&(this.stop(),e.data.error?this.callback(s.extend(e.data.error),null):(e.data.data.scopes&&(e.data.data.scope=e.data.data.scopes,delete e.data.data.scopes),e.data.data.expires_in&&(e.data.data.expires_in=parseInt(e.data.data.expires_in)||0),this.callback(null,e.data.data)))}}]),e}(),u=function(){function e(r,n){t(this,e),this.options=n,this.sdk=r}return n(e,[{key:"authorize",value:function(){var e=this;return new Promise((function(t,r){var n=e.sdk.authorizeURL(e.options,"button"),i=window.screen.width/2-250,o=window.screen.height/2-325;new c(e.options).start(null,(function(e,n){if(e)return r(e);t(n)}));var a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(i,",top=").concat(o))};document.requestStorageAccess?document.requestStorageAccess().then(a,a):a()}))}}]),e}(),l=Object.prototype.hasOwnProperty,f=Array.isArray,p=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),h=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"===e(l)&&null!==l&&-1===n.indexOf(l)&&(r.push({obj:a,prop:u}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(f(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(r),t},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(t,r,n){if(0===t.length)return t;var i=t;if("symbol"===e(t)?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<i.length;++a){var s=i.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=i.charAt(a):s<128?o+=p[s]:s<2048?o+=p[192|s>>6]+p[128|63&s]:s<55296||s>=57344?o+=p[224|s>>12]+p[128|s>>6&63]+p[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(a)),o+=p[240|s>>18]+p[128|s>>12&63]+p[128|s>>6&63]+p[128|63&s])}return o},isBuffer:function(t){return!(!t||"object"!==e(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(f(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function t(r,n,i){if(!n)return r;if("object"!==e(n)){if(f(r))r.push(n);else{if(!r||"object"!==e(r))return[r,n];(i&&(i.plainObjects||i.allowPrototypes)||!l.call(Object.prototype,n))&&(r[n]=!0)}return r}if(!r||"object"!==e(r))return[r].concat(n);var o=r;return f(r)&&!f(n)&&(o=h(r,i)),f(r)&&f(n)?(n.forEach((function(n,o){if(l.call(r,o)){var a=r[o];a&&"object"===e(a)&&n&&"object"===e(n)?r[o]=t(a,n,i):r.push(n)}else r[o]=n})),r):Object.keys(n).reduce((function(e,r){var o=n[r];return l.call(e,r)?e[r]=t(e[r],o,i):e[r]=o,e}),o)}},y=String.prototype.replace,g=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"},v=d.assign({default:m.RFC3986,formatters:{RFC1738:function(e){return y.call(e,g,"+")},RFC3986:function(e){return String(e)}}},m),b=Object.prototype.hasOwnProperty,w={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},_=Array.isArray,k=Array.prototype.push,O=function(e,t){k.apply(e,_(t)?t:[t])},j=Date.prototype.toISOString,x=v.default,S={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:d.encode,encodeValuesOnly:!1,format:x,formatter:v.formatters[x],indices:!1,serializeDate:function(e){return j.call(e)},skipNulls:!1,strictNullHandling:!1},A=function t(r,n,i,o,a,s,c,u,l,f,p,h,y){var g,m=r;if("function"==typeof c?m=c(n,m):m instanceof Date?m=f(m):"comma"===i&&_(m)&&(m=d.maybeMap(m,(function(e){return e instanceof Date?f(e):e})).join(",")),null===m){if(o)return s&&!h?s(n,S.encoder,y,"key"):n;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"===e(g)||"bigint"==typeof g||d.isBuffer(m))return s?[p(h?n:s(n,S.encoder,y,"key"))+"="+p(s(m,S.encoder,y,"value"))]:[p(n)+"="+p(String(m))];var v,b=[];if(void 0===m)return b;if(_(c))v=c;else{var w=Object.keys(m);v=u?w.sort(u):w}for(var k=0;k<v.length;++k){var j=v[k],x=m[j];if(!a||null!==x){var A=_(m)?"function"==typeof i?i(n,j):n:n+(l?"."+j:"["+j+"]");O(b,t(x,A,i,o,a,s,c,u,l,f,p,h,y))}}return b},I=Object.prototype.hasOwnProperty,P=Array.isArray,C={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:d.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},N=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},R=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),s=a?i.slice(0,a.index):i,c=[];if(s){if(!r.plainObjects&&I.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(a=o.exec(i))&&u<r.depth;){if(u+=1,!r.plainObjects&&I.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var i=n?t:N(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:a[c]=i:a={0:i}}i=a}return i}(c,t,r,n)}},E=function(e,t){var r=function(e){if(!e)return C;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?C.charset:e.charset;return{allowDots:void 0===e.allowDots?C.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:C.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:C.comma,decoder:"function"==typeof e.decoder?e.decoder:C.decoder,delimiter:"string"==typeof e.delimiter||d.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:C.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:C.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:C.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=i.split(t.delimiter,o),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),s=r,r=a.length);for(r=0;r<a.length;++r)if(r!==s){var u,l,f=a[r],p=f.indexOf("]="),h=-1===p?f.indexOf("="):p+1;-1===h?(u=t.decoder(f,C.decoder,c,"key"),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,h),C.decoder,c,"key"),l=d.maybeMap(N(f.slice(h+1),t),(function(e){return t.decoder(e,C.decoder,c,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=D(l)),f.indexOf("[]=")>-1&&(l=P(l)?[l]:l),I.call(n,u)?n[u]=d.combine(n[u],l):n[u]=l}return n}(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var s=o[a],c=R(s,n[s],r,"string"==typeof e);i=d.merge(i,c,r)}return d.compact(i)},L=function(t,r){var n,i=t,o=function(e){if(!e)return S;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||S.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=v.default;if(void 0!==e.format){if(!b.call(v.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=v.formatters[r],i=S.filter;return("function"==typeof e.filter||_(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:S.addQueryPrefix,allowDots:void 0===e.allowDots?S.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:S.charsetSentinel,delimiter:void 0===e.delimiter?S.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:S.encode,encoder:"function"==typeof e.encoder?e.encoder:S.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:S.encodeValuesOnly,filter:i,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:S.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:S.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:S.strictNullHandling}}(r);"function"==typeof o.filter?i=(0,o.filter)("",i):_(o.filter)&&(n=o.filter);var a,s=[];if("object"!==e(i)||null===i)return"";a=r&&r.arrayFormat in w?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices";var c=w[a];n||(n=Object.keys(i)),o.sort&&n.sort(o.sort);for(var u=0;u<n.length;++u){var l=n[u];o.skipNulls&&null===i[l]||O(s,A(i[l],l,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var f=s.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""};
/** @fileOverview

@@ -11,3 +11,3 @@ * @author Auth0 https://github.com/auth0/auth0.js

*/
function B(){}B.prototype.getItem=function(){return null},B.prototype.removeItem=function(){},B.prototype.setItem=function(){};var T=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in o)o[c]&&(s+="; "+c,!0!==o[c]&&(s+="="+o[c].split(";")[0]));return document.cookie=t+"="+r+s}}function a(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),c=s.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(n.read||n)(c,u)||t(c),r)try{c=JSON.parse(c)}catch(e){}if(i[u]=c,e===u)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}((function(){}))},e.exports=r()}));function H(){}function F(e){if(this.storage=new H,!0===e.force_local_storage)try{var t=window.localStorage;t&&(this.storage=t)}catch(e){console.warn(e),console.warn("Cant use localStorage. Using CookieStorage instead.")}}function Q(e){this.handler=new F(e)}H.prototype.getItem=function(e){return T.get(e)},H.prototype.removeItem=function(e){T.remove(e)},H.prototype.setItem=function(e,t,r){var n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);T.set(e,t,n)},F.prototype.failover=function(){this.storage instanceof B?console.warn("DummyStorage: ignore failover"):this.storage instanceof H?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new B):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new H)},F.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return console.warn(t),this.failover(),this.getItem(e)}},F.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return console.warn(t),this.failover(),this.removeItem(e)}},F.prototype.setItem=function(e,t,r){try{return this.storage.setItem(e,t,r)}catch(n){return console.warn(n),this.failover(),this.setItem(e,t,r)}},Q.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},Q.prototype.removeItem=function(e){return this.handler.removeItem(e)},Q.prototype.setItem=function(e,t,r){var n=JSON.stringify(t);return this.handler.setItem(e,n,r)};var q=function(){function e(r){t(this,e),this.options=r.transaction,this.storage=new Q(this.options)}return n(e,[{key:"generate",value:function(e){this.storage.setItem(this.options.namespace+e.state,{state:e.state,code_verifier:e.code_verifier},{expires:1/48})}},{key:"get",value:function(e){var t=this.storage.getItem(this.options.namespace+e);return this.clear(e),t||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),V={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};V.bitArray={bitSlice:function(e,t,r){return e=V.bitArray._shiftRight(e.slice(t/32),32-(31&t)).slice(1),void 0===r?e:V.bitArray.clamp(e,r-t)},extract:function(e,t,r){var n=Math.floor(-t-r&31);return(-32&(t+r-1^t)?e[t/32|0]<<32-n^e[t/32+1|0]>>>n:e[t/32|0]>>>n)&(1<<r)-1},concat:function(e,t){if(0===e.length||0===t.length)return e.concat(t);var r=e[e.length-1],n=V.bitArray.getPartial(r);return 32===n?e.concat(t):V.bitArray._shiftRight(t,n,0|r,e.slice(0,e.length-1))},bitLength:function(e){var t,r=e.length;return 0===r?0:(t=e[r-1],32*(r-1)+V.bitArray.getPartial(t))},clamp:function(e,t){if(32*e.length<t)return e;var r=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,r>0&&t&&(e[r-1]=V.bitArray.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:function(e,t,r){return 32===e?t:(r?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(V.bitArray.bitLength(e)!==V.bitArray.bitLength(t))return!1;var r,n=0;for(r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},_shiftRight:function(e,t,r,n){var i,o,a;for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(i=0;i<e.length;i++)n.push(r|e[i]>>>t),r=e[i]<<32-t;return o=e.length?e[e.length-1]:0,a=V.bitArray.getPartial(o),n.push(V.bitArray.partial(t+a&31,t+a>32?r:n.pop(),1)),n},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,r;for(t=0;t<e.length;++t)r=e[t],e[t]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return e}},V.codec.utf8String={fromBits:function(e){var t,r,n="",i=V.bitArray.bitLength(e);for(t=0;t<i/8;t++)0==(3&t)&&(r=e[t/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,r=[],n=0;for(t=0;t<e.length;t++)n=n<<8|e.charCodeAt(t),3==(3&t)&&(r.push(n),n=0);return 3&t&&r.push(V.bitArray.partial(8*(3&t),n)),r}},V.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},V.hash.sha256.hash=function(e){return(new V.hash.sha256).update(e).finalize()},V.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=V.codec.utf8String.toBits(e));var t,r=this._buffer=V.bitArray.concat(this._buffer,e),n=this._length,i=this._length=n+V.bitArray.bitLength(e);if(i>9007199254740991)throw new V.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var o=new Uint32Array(r),a=0;for(t=512+n-(512+n&511);t<=i;t+=512)this._block(o.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(t=512+n-(512+n&511);t<=i;t+=512)this._block(r.splice(0,16));return this},finalize:function(){var e,t=this._buffer,r=this._h;for(e=(t=V.bitArray.concat(t,[V.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var e,t,r=0,n=2;function i(e){return 4294967296*(e-Math.floor(e))|0}for(;r<64;n++){for(t=!0,e=2;e*e<=n;e++)if(n%e==0){t=!1;break}t&&(r<8&&(this._init[r]=i(Math.pow(n,.5))),this._key[r]=i(Math.pow(n,1/3)),r++)}},_block:function(e){var t,r,n,i,o=this._h,a=this._key,s=o[0],c=o[1],u=o[2],l=o[3],f=o[4],p=o[5],h=o[6],d=o[7];for(t=0;t<64;t++)t<16?r=e[t]:(n=e[t+1&15],i=e[t+14&15],r=e[15&t]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&t]+e[t+9&15]|0),r=r+d+(f>>>6^f>>>11^f>>>25^f<<26^f<<21^f<<7)+(h^f&(p^h))+a[t],d=h,h=p,p=f,f=l+r|0,l=u,u=c,s=r+((c=s)&u^l&(c^u))+(c>>>2^c>>>13^c>>>22^c<<30^c<<19^c<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+c|0,o[2]=o[2]+u|0,o[3]=o[3]+l|0,o[4]=o[4]+f|0,o[5]=o[5]+p|0,o[6]=o[6]+h|0,o[7]=o[7]+d|0}};var J={base64URLEncode:function(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},Y=function(){function e(r,n){t(this,e),this.options={namespace:r.transaction.namespace+n},this.storage=new Q(this.options)}return n(e,[{key:"set",value:function(e,t){this.storage.setItem(this.options.namespace+e,t,{expires:1/48})}},{key:"get",value:function(e){return this.storage.getItem(this.options.namespace+e)||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),$=function(){function e(r){t(this,e),this.persister=new Y(r,"redirect_uri_params")}return n(e,[{key:"persist",value:function(e){var t=new URL(e.redirect_uri),r=E(t.search.substring(1)),n=E(t.hash.substring(1));this.persister.set(e.state,{query_params:r,hash_params:n}),e.redirect_uri=t.origin+t.pathname}},{key:"retrieve",value:function(e){var t,r,n=this.persister.get(e,!1);if(n){var i=a(a({},null!==(t=n.query_params)&&void 0!==t?t:{}),E(window.location.search.substring(1))),o=a(a({},null!==(r=n.hash_params)&&void 0!==r?r:{}),E(window.location.hash.substring(1)));console.log("queryParams: ",i),console.log("hashParams: ",o);var s=window.location.origin+window.location.pathname;i&&(s+="?"+L(i)),o&&(s+="#"+L(o)),console.log(s),window.history.replaceState({},document.title,s)}}}]),e}();var G={string:
function B(){}B.prototype.getItem=function(){return null},B.prototype.removeItem=function(){},B.prototype.setItem=function(){};var T=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in o)o[c]&&(s+="; "+c,!0!==o[c]&&(s+="="+o[c].split(";")[0]));return document.cookie=t+"="+r+s}}function a(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),c=s.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(n.read||n)(c,u)||t(c),r)try{c=JSON.parse(c)}catch(e){}if(i[u]=c,e===u)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}((function(){}))},e.exports=r()}));function H(){}function F(e){if(this.storage=new H,!0===e.force_local_storage)try{var t=window.localStorage;t&&(this.storage=t)}catch(e){console.warn(e),console.warn("Cant use localStorage. Using CookieStorage instead.")}}function Q(e){this.handler=new F(e)}H.prototype.getItem=function(e){return T.get(e)},H.prototype.removeItem=function(e){T.remove(e)},H.prototype.setItem=function(e,t,r){var n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);T.set(e,t,n)},F.prototype.failover=function(){this.storage instanceof B?console.warn("DummyStorage: ignore failover"):this.storage instanceof H?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new B):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new H)},F.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return console.warn(t),this.failover(),this.getItem(e)}},F.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return console.warn(t),this.failover(),this.removeItem(e)}},F.prototype.setItem=function(e,t,r){try{return this.storage.setItem(e,t,r)}catch(n){return console.warn(n),this.failover(),this.setItem(e,t,r)}},Q.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},Q.prototype.removeItem=function(e){return this.handler.removeItem(e)},Q.prototype.setItem=function(e,t,r){var n=JSON.stringify(t);return this.handler.setItem(e,n,r)};var q=function(){function e(r){t(this,e),this.options=r.transaction,this.storage=new Q(this.options)}return n(e,[{key:"generate",value:function(e){this.storage.setItem(this.options.namespace+e.state,{state:e.state,code_verifier:e.code_verifier},{expires:1/48})}},{key:"get",value:function(e){var t=this.storage.getItem(this.options.namespace+e);return this.clear(e),t||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),V={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};V.bitArray={bitSlice:function(e,t,r){return e=V.bitArray._shiftRight(e.slice(t/32),32-(31&t)).slice(1),void 0===r?e:V.bitArray.clamp(e,r-t)},extract:function(e,t,r){var n=Math.floor(-t-r&31);return(-32&(t+r-1^t)?e[t/32|0]<<32-n^e[t/32+1|0]>>>n:e[t/32|0]>>>n)&(1<<r)-1},concat:function(e,t){if(0===e.length||0===t.length)return e.concat(t);var r=e[e.length-1],n=V.bitArray.getPartial(r);return 32===n?e.concat(t):V.bitArray._shiftRight(t,n,0|r,e.slice(0,e.length-1))},bitLength:function(e){var t,r=e.length;return 0===r?0:(t=e[r-1],32*(r-1)+V.bitArray.getPartial(t))},clamp:function(e,t){if(32*e.length<t)return e;var r=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,r>0&&t&&(e[r-1]=V.bitArray.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:function(e,t,r){return 32===e?t:(r?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(V.bitArray.bitLength(e)!==V.bitArray.bitLength(t))return!1;var r,n=0;for(r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},_shiftRight:function(e,t,r,n){var i,o,a;for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(i=0;i<e.length;i++)n.push(r|e[i]>>>t),r=e[i]<<32-t;return o=e.length?e[e.length-1]:0,a=V.bitArray.getPartial(o),n.push(V.bitArray.partial(t+a&31,t+a>32?r:n.pop(),1)),n},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,r;for(t=0;t<e.length;++t)r=e[t],e[t]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return e}},V.codec.utf8String={fromBits:function(e){var t,r,n="",i=V.bitArray.bitLength(e);for(t=0;t<i/8;t++)0==(3&t)&&(r=e[t/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,r=[],n=0;for(t=0;t<e.length;t++)n=n<<8|e.charCodeAt(t),3==(3&t)&&(r.push(n),n=0);return 3&t&&r.push(V.bitArray.partial(8*(3&t),n)),r}},V.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},V.hash.sha256.hash=function(e){return(new V.hash.sha256).update(e).finalize()},V.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=V.codec.utf8String.toBits(e));var t,r=this._buffer=V.bitArray.concat(this._buffer,e),n=this._length,i=this._length=n+V.bitArray.bitLength(e);if(i>9007199254740991)throw new V.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var o=new Uint32Array(r),a=0;for(t=512+n-(512+n&511);t<=i;t+=512)this._block(o.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(t=512+n-(512+n&511);t<=i;t+=512)this._block(r.splice(0,16));return this},finalize:function(){var e,t=this._buffer,r=this._h;for(e=(t=V.bitArray.concat(t,[V.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var e,t,r=0,n=2;function i(e){return 4294967296*(e-Math.floor(e))|0}for(;r<64;n++){for(t=!0,e=2;e*e<=n;e++)if(n%e==0){t=!1;break}t&&(r<8&&(this._init[r]=i(Math.pow(n,.5))),this._key[r]=i(Math.pow(n,1/3)),r++)}},_block:function(e){var t,r,n,i,o=this._h,a=this._key,s=o[0],c=o[1],u=o[2],l=o[3],f=o[4],p=o[5],h=o[6],d=o[7];for(t=0;t<64;t++)t<16?r=e[t]:(n=e[t+1&15],i=e[t+14&15],r=e[15&t]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&t]+e[t+9&15]|0),r=r+d+(f>>>6^f>>>11^f>>>25^f<<26^f<<21^f<<7)+(h^f&(p^h))+a[t],d=h,h=p,p=f,f=l+r|0,l=u,u=c,s=r+((c=s)&u^l&(c^u))+(c>>>2^c>>>13^c>>>22^c<<30^c<<19^c<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+c|0,o[2]=o[2]+u|0,o[3]=o[3]+l|0,o[4]=o[4]+f|0,o[5]=o[5]+p|0,o[6]=o[6]+h|0,o[7]=o[7]+d|0}};var J={base64URLEncode:function(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},Y=function(){function e(r,n){t(this,e),this.options={namespace:r.transaction.namespace+n},this.storage=new Q(this.options)}return n(e,[{key:"set",value:function(e,t){this.storage.setItem(this.options.namespace+e,t,{expires:1/48})}},{key:"get",value:function(e){var t=this.storage.getItem(this.options.namespace+e);return this.clear(e),t||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),$=function(){function e(r){t(this,e),this.persister=new Y(r,"redirect_uri_params")}return n(e,[{key:"persist",value:function(e){var t=new URL(e.redirect_uri),r=E(t.search.substring(1)),n=E(t.hash.substring(1));this.persister.set(e.state,{query_params:r,hash_params:n}),e.redirect_uri=t.origin+t.pathname}},{key:"retrieve",value:function(e){var t,r,n=this.persister.get(e,!1);if(n){var i=a(a({},null!==(t=n.query_params)&&void 0!==t?t:{}),E(window.location.search.substring(1))),o=a(a({},null!==(r=n.hash_params)&&void 0!==r?r:{}),E(window.location.hash.substring(1))),s=window.location.origin+window.location.pathname;i&&(s+="?"+L(i)),o&&(s+="#"+L(o)),window.history.replaceState({},document.title,s)}}}]),e}();var G={string:
/** @fileOverview

@@ -14,0 +14,0 @@ * @author Auth0 https://github.com/auth0/auth0.js

@@ -1160,3 +1160,3 @@ 'use strict';

const data = this.storage.getItem(this.options.namespace + state);
// this.clear(state);
this.clear(state);
return data || {};

@@ -1207,5 +1207,2 @@ }

console.log('queryParams: ', queryParams);
console.log('hashParams: ', hashParams);
let uri = window.location.origin + window.location.pathname;

@@ -1221,4 +1218,2 @@

console.log(uri);
window.history.replaceState({}, document.title, uri);

@@ -1225,0 +1220,0 @@ }

@@ -1151,3 +1151,3 @@ import qs from 'qs';

const data = this.storage.getItem(this.options.namespace + state);
// this.clear(state);
this.clear(state);
return data || {};

@@ -1198,5 +1198,2 @@ }

console.log('queryParams: ', queryParams);
console.log('hashParams: ', hashParams);
let uri = window.location.origin + window.location.pathname;

@@ -1212,4 +1209,2 @@

console.log(uri);
window.history.replaceState({}, document.title, uri);

@@ -1216,0 +1211,0 @@ }

{
"name": "@livechat/accounts-sdk",
"version": "2.0.6-beta.6",
"version": "2.0.6-beta.8",
"description": "SDK for 'Sign in with LiveChat'.",

@@ -5,0 +5,0 @@ "author": "LiveChat",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc