@livechat/accounts-sdk 2.1.2 → 2.1.4-beta.0

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.
@@ -1,15 +1,44 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("util")):"function"==typeof define&&define.amd?define(["util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).AccountsSDK=e(t.require$$0$2)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),o={extend:function(t){return t.oauth_exception&&this.oauth_exception[t.oauth_exception]?Object.assign(t,{description:this.oauth_exception[t.oauth_exception]}):t.identity_exception&&this.identity_exception[t.identity_exception]?Object.assign(t,{description:this.identity_exception[t.identity_exception]}):t},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."}};class n{constructor(t={}){this.options=t,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}start(t,e){this._listenerInited||(this.listening=!0,this.callback=e,t&&(this.tid=setTimeout((()=>{this.stop(),e("timeout",null)}),t)),window.addEventListener("message",this.receiveMessage))}stop(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}receiveMessage(t){t.origin!==this.options.server_url&&t.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(t.data.data||t.data.error)&&(this.stop(),t.data.error?this.callback(o.extend(t.data.error),null):(t.data.data.scopes&&(t.data.data.scope=t.data.data.scopes,delete t.data.data.scopes),t.data.data.expires_in&&(t.data.data.expires_in=parseInt(t.data.data.expires_in)||0),this.callback(null,t.data.data)))}}class i{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const r=this.sdk.authorizeURL(this.options,"button"),o=window.screen.width/2-250,i=window.screen.height/2-325;new n(this.options).start(null,((r,o)=>{if(r)return e(r);t(o)}));var a=function(){window.open(r,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(o,",top=").concat(i))};document.requestStorageAccess?document.requestStorageAccess().then(a,a):a()}))}}var a=Object,c=Error,s=EvalError,l=RangeError,p=ReferenceError,u=SyntaxError,f=TypeError,y=URIError,h=Math.abs,d=Math.floor,g=Math.max,m=Math.min,b=Math.pow,v=Math.round,w=Number.isNaN||function(t){return t!=t},S=Object.getOwnPropertyDescriptor;if(S)try{S([],"length")}catch(t){S=null}var _=S,A=Object.defineProperty||!1;if(A)try{A({},"a",{value:1})}catch(t){A=!1}var j,O=A,P="undefined"!=typeof Symbol&&Symbol,x="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null,k=a,I=k.getPrototypeOf||null,E=Object.prototype.toString,R=Math.max,M=function(t,e){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var n=0;n<e.length;n+=1)r[n+t.length]=e[n];return r},U=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==E.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,o=function(t,e){for(var r=[],o=e||0,n=0;o<t.length;o+=1,n+=1)r[n]=t[o];return r}(arguments,1),n=R(0,e.length-o.length),i=[],a=0;a<n;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(t,e){for(var r="",o=0;o<t.length;o+=1)r+=t[o],o+1<t.length&&(r+=e);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var n=e.apply(this,M(o,arguments));return Object(n)===n?n:this}return e.apply(t,M(o,arguments))})),e.prototype){var c=function(){};c.prototype=e.prototype,r.prototype=new c,c.prototype=null}return r},N=Function.prototype.call,F=Function.prototype.apply,C="undefined"!=typeof Reflect&&Reflect&&Reflect.apply||U.call(N,F),D=f,T=_;try{j=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var B,L=!!j&&T&&T(Object.prototype,"__proto__"),W=Object,z=W.getPrototypeOf,q=L&&"function"==typeof L.get?function(t){if(t.length<1||"function"!=typeof t[0])throw new D("a function is required");return C(U,N,t)}([L.get]):"function"==typeof z&&function(t){return z(null==t?t:W(t))},$=x?function(t){return x(t)}:I?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return I(t)}:q?function(t){return q(t)}:null,G=Function.prototype.call,V=Object.prototype.hasOwnProperty,H=U.call(G,V),J=c,Q=s,Y=l,K=p,Z=u,X=y,tt=h,et=d,rt=g,ot=m,nt=b,it=v,at=function(t){return w(t)||0===t?t:t<0?-1:1},ct=O,st=H,lt=Function,pt=function(t){try{return lt('"use strict"; return ('+t+").constructor;")()}catch(t){}},ut=function(){throw new D},ft=T?function(){try{return ut}catch(t){try{return T(arguments,"callee").get}catch(t){return ut}}}():ut,yt="function"==typeof P&&"function"==typeof Symbol&&"symbol"==typeof P("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}(),ht={},dt="undefined"!=typeof Uint8Array&&$?$(Uint8Array):B,gt={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?B:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?B:ArrayBuffer,"%ArrayIteratorPrototype%":yt&&$?$([][Symbol.iterator]()):B,"%AsyncFromSyncIteratorPrototype%":B,"%AsyncFunction%":ht,"%AsyncGenerator%":ht,"%AsyncGeneratorFunction%":ht,"%AsyncIteratorPrototype%":ht,"%Atomics%":"undefined"==typeof Atomics?B:Atomics,"%BigInt%":"undefined"==typeof BigInt?B:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?B:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?B:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?B:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":J,"%eval%":eval,"%EvalError%":Q,"%Float16Array%":"undefined"==typeof Float16Array?B:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?B:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?B:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?B:FinalizationRegistry,"%Function%":lt,"%GeneratorFunction%":ht,"%Int8Array%":"undefined"==typeof Int8Array?B:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?B:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?B:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":yt&&$?$($([][Symbol.iterator]())):B,"%JSON%":"object"==typeof JSON?JSON:B,"%Map%":"undefined"==typeof Map?B:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&yt&&$?$((new Map)[Symbol.iterator]()):B,"%Math%":Math,"%Number%":Number,"%Object%":k,"%Object.getOwnPropertyDescriptor%":T,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?B:Promise,"%Proxy%":"undefined"==typeof Proxy?B:Proxy,"%RangeError%":Y,"%ReferenceError%":K,"%Reflect%":"undefined"==typeof Reflect?B:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?B:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&yt&&$?$((new Set)[Symbol.iterator]()):B,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?B:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":yt&&$?$(""[Symbol.iterator]()):B,"%Symbol%":yt?Symbol:B,"%SyntaxError%":Z,"%ThrowTypeError%":ft,"%TypedArray%":dt,"%TypeError%":D,"%Uint8Array%":"undefined"==typeof Uint8Array?B:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?B:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?B:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?B:Uint32Array,"%URIError%":X,"%WeakMap%":"undefined"==typeof WeakMap?B:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?B:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?B:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":F,"%Object.defineProperty%":ct,"%Object.getPrototypeOf%":I,"%Math.abs%":tt,"%Math.floor%":et,"%Math.max%":rt,"%Math.min%":ot,"%Math.pow%":nt,"%Math.round%":it,"%Math.sign%":at,"%Reflect.getPrototypeOf%":x};if($)try{null.error}catch(t){var mt=$($(t));gt["%Error.prototype%"]=mt}var bt=function t(e){var r;if("%AsyncFunction%"===e)r=pt("async function () {}");else if("%GeneratorFunction%"===e)r=pt("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=pt("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&$&&(r=$(n.prototype))}return gt[e]=r,r},vt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},wt=U.call(N,Array.prototype.concat),St=U.call(F,Array.prototype.splice),_t=U.call(N,String.prototype.replace),At=U.call(N,String.prototype.slice),jt=U.call(N,RegExp.prototype.exec),Ot=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pt=/\\(\\)?/g,xt=function(t,e){var r,o=t;if(st(vt,o)&&(o="%"+(r=vt[o])[0]+"%"),st(gt,o)){var n=gt[o];if(n===ht&&(n=bt(o)),void 0===n&&!e)throw new D("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:n}}throw new Z("intrinsic "+t+" does not exist!")},kt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var Et=function(t,e){if("string"!=typeof t||0===t.length)throw new D("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new D('"allowMissing" argument must be a boolean');if(null===jt(/^%?[^%]*%?$/,t))throw new Z("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=At(t,0,1),r=At(t,-1);if("%"===e&&"%"!==r)throw new Z("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new Z("invalid intrinsic syntax, expected opening `%`");var o=[];return _t(t,Ot,(function(t,e,r,n){o[o.length]=r?_t(n,Pt,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=xt("%"+o+"%",e),i=n.name,a=n.value,c=!1,s=n.alias;s&&(o=s[0],St(r,wt([0,1],s)));for(var l=1,p=!0;l<r.length;l+=1){var u=r[l],f=At(u,0,1),y=At(u,-1);if(('"'===f||"'"===f||"`"===f||'"'===y||"'"===y||"`"===y)&&f!==y)throw new Z("property names with quotes must have matching quotes");if("constructor"!==u&&p||(c=!0),st(gt,i="%"+(o+="."+u)+"%"))a=gt[i];else if(null!=a){if(!(u in a)){if(!e)throw new D("base intrinsic for "+t+" exists, but the property is not available.");return}if(T&&l+1>=r.length){var h=T(a,u);a=(p=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[u]}else p=st(a,u),a=a[u];p&&!c&&(gt[i]=a)}}return a},Rt=Et("%Object.defineProperty%",!0),Mt=function(){if(Rt)try{return Rt({},"a",{value:1}),!0}catch(t){return!1}return!1};Mt.hasArrayLengthDefineBug=function(){if(!Mt())return null;try{return 1!==Rt([],"length",{value:1}).length}catch(t){return!0}};var Ut=Mt,Nt=Ut()&&Et("%Object.defineProperty%",!0);if(Nt)try{Nt({},"a",{value:1})}catch(t){Nt=!1}var Ft=Et("%SyntaxError%"),Ct=Et("%TypeError%"),Dt=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new Ct("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new Ct("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new Ct("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new Ct("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new Ct("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new Ct("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],c=!!T&&T(t,e);if(Nt)Nt(t,e,{configurable:null===i&&c?c.configurable:!i,enumerable:null===o&&c?c.enumerable:!o,value:r,writable:null===n&&c?c.writable:!n});else{if(!a&&(o||n||i))throw new Ft("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}},Tt=Ut(),Bt=Et("%TypeError%"),Lt=Et("%Math.floor%"),Wt=It((function(t){var e=Et("%TypeError%"),r=Et("%Function.prototype.apply%"),o=Et("%Function.prototype.call%"),n=Et("%Reflect.apply%",!0)||U.call(o,r),i=Et("%Object.defineProperty%",!0),a=Et("%Math.max%");if(i)try{i({},"a",{value:1})}catch(t){i=null}t.exports=function(t){if("function"!=typeof t)throw new e("a function is required");return function(t,e){if("function"!=typeof t)throw new Bt("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||Lt(e)!==e)throw new Bt("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,n=!0;if("length"in t&&T){var i=T(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(n=!1)}return(o||n||!r)&&(Tt?Dt(t,"length",e,!0,!0):Dt(t,"length",e)),t}(n(U,o,arguments),1+a(0,t.length-(arguments.length-1)),!0)};var c=function(){return n(U,r,arguments)};i?i(t.exports,"apply",{value:c}):t.exports.apply=c})),zt=Wt(Et("String.prototype.indexOf")),qt=function(t,e){var r=Et(t,!!e);return"function"==typeof r&&zt(t,".prototype.")>-1?Wt(r):r},$t=r.default.inspect,Gt="function"==typeof Map&&Map.prototype,Vt=Object.getOwnPropertyDescriptor&&Gt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ht=Gt&&Vt&&"function"==typeof Vt.get?Vt.get:null,Jt=Gt&&Map.prototype.forEach,Qt="function"==typeof Set&&Set.prototype,Yt=Object.getOwnPropertyDescriptor&&Qt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Kt=Qt&&Yt&&"function"==typeof Yt.get?Yt.get:null,Zt=Qt&&Set.prototype.forEach,Xt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,te="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,ee="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,re=Boolean.prototype.valueOf,oe=Object.prototype.toString,ne=Function.prototype.toString,ie=String.prototype.match,ae=String.prototype.slice,ce=String.prototype.replace,se=String.prototype.toUpperCase,le=String.prototype.toLowerCase,pe=RegExp.prototype.test,ue=Array.prototype.concat,fe=Array.prototype.join,ye=Array.prototype.slice,he=Math.floor,de="function"==typeof BigInt?BigInt.prototype.valueOf:null,ge=Object.getOwnPropertySymbols,me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,be="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ve="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===be||"symbol")?Symbol.toStringTag:null,we=Object.prototype.propertyIsEnumerable,Se=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function _e(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||pe.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var o=t<0?-he(-t):he(t);if(o!==t){var n=String(o),i=ae.call(e,n.length+1);return ce.call(n,r,"$&_")+"."+ce.call(ce.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ce.call(e,r,"$&_")}var Ae=$t.custom,je=Ie(Ae)?Ae:null;function Oe(t,e,r){var o="double"===(r.quoteStyle||e)?'"':"'";return o+t+o}function Pe(t){return ce.call(String(t),/"/g,"&quot;")}function xe(t){return!("[object Array]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}function ke(t){return!("[object RegExp]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}function Ie(t){if(be)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!me)return!1;try{return me.call(t),!0}catch(t){}return!1}var Ee=Object.prototype.hasOwnProperty||function(t){return t in this};function Re(t,e){return Ee.call(t,e)}function Me(t){return oe.call(t)}function Ue(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function Ne(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return Ne(ae.call(t,0,e.maxStringLength),e)+o}return Oe(ce.call(ce.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Fe),"single",e)}function Fe(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+se.call(e.toString(16))}function Ce(t){return"Object("+t+")"}function De(t){return t+" { ? }"}function Te(t,e,r,o){return t+" ("+e+") {"+(o?Be(r,o):fe.call(r,", "))+"}"}function Be(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+fe.call(t,","+r)+"\n"+e.prev}function Le(t,e){var r=xe(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=Re(t,n)?e(t[n],t):""}var i,a="function"==typeof ge?ge(t):[];if(be){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var s in t)Re(t,s)&&(r&&String(Number(s))===s&&s<t.length||be&&i["$"+s]instanceof Symbol||(pe.call(/[^\w$]/,s)?o.push(e(s,t)+": "+e(t[s],t)):o.push(s+": "+e(t[s],t))));if("function"==typeof ge)for(var l=0;l<a.length;l++)we.call(t,a[l])&&o.push("["+e(a[l])+"]: "+e(t[a[l]],t));return o}var We=function t(e,r,o,n){var i=r||{};if(Re(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Re(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Re(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Re(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Re(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=i.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Ne(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var s=String(e);return c?_e(e,s):s}if("bigint"==typeof e){var l=String(e)+"n";return c?_e(e,l):l}var p=void 0===i.depth?5:i.depth;if(void 0===o&&(o=0),o>=p&&p>0&&"object"==typeof e)return xe(e)?"[Array]":"[Object]";var u=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=fe.call(Array(t.indent+1)," ")}return{base:r,prev:fe.call(Array(e+1),r)}}(i,o);if(void 0===n)n=[];else if(Ue(n,e)>=0)return"[Circular]";function f(e,r,a){if(r&&(n=ye.call(n)).push(r),a){var c={depth:i.depth};return Re(i,"quoteStyle")&&(c.quoteStyle=i.quoteStyle),t(e,c,o+1,n)}return t(e,i,o+1,n)}if("function"==typeof e&&!ke(e)){var y=function(t){if(t.name)return t.name;var e=ie.call(ne.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),h=Le(e,f);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(h.length>0?" { "+fe.call(h,", ")+" }":"")}if(Ie(e)){var d=be?ce.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):me.call(e);return"object"!=typeof e||be?d:Ce(d)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var g="<"+le.call(String(e.nodeName)),m=e.attributes||[],b=0;b<m.length;b++)g+=" "+m[b].name+"="+Oe(Pe(m[b].value),"double",i);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+le.call(String(e.nodeName))+">"}if(xe(e)){if(0===e.length)return"[]";var v=Le(e,f);return u&&!function(t){for(var e=0;e<t.length;e++)if(Ue(t[e],"\n")>=0)return!1;return!0}(v)?"["+Be(v,u)+"]":"[ "+fe.call(v,", ")+" ]"}if(function(t){return!("[object Error]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}(e)){var w=Le(e,f);return"cause"in Error.prototype||!("cause"in e)||we.call(e,"cause")?0===w.length?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(w,", ")+" }":"{ ["+String(e)+"] "+fe.call(ue.call("[cause]: "+f(e.cause),w),", ")+" }"}if("object"==typeof e&&a){if(je&&"function"==typeof e[je]&&$t)return $t(e,{depth:p-o});if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!Ht||!t||"object"!=typeof t)return!1;try{Ht.call(t);try{Kt.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var S=[];return Jt&&Jt.call(e,(function(t,r){S.push(f(r,e,!0)+" => "+f(t,e))})),Te("Map",Ht.call(e),S,u)}if(function(t){if(!Kt||!t||"object"!=typeof t)return!1;try{Kt.call(t);try{Ht.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var _=[];return Zt&&Zt.call(e,(function(t){_.push(f(t,e))})),Te("Set",Kt.call(e),_,u)}if(function(t){if(!Xt||!t||"object"!=typeof t)return!1;try{Xt.call(t,Xt);try{te.call(t,te)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return De("WeakMap");if(function(t){if(!te||!t||"object"!=typeof t)return!1;try{te.call(t,te);try{Xt.call(t,Xt)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return De("WeakSet");if(function(t){if(!ee||!t||"object"!=typeof t)return!1;try{return ee.call(t),!0}catch(t){}return!1}(e))return De("WeakRef");if(function(t){return!("[object Number]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}(e))return Ce(f(Number(e)));if(function(t){if(!t||"object"!=typeof t||!de)return!1;try{return de.call(t),!0}catch(t){}return!1}(e))return Ce(f(de.call(e)));if(function(t){return!("[object Boolean]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}(e))return Ce(re.call(e));if(function(t){return!("[object String]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}(e))return Ce(f(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===kt)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==Me(t)||ve&&"object"==typeof t&&ve in t)}(e)&&!ke(e)){var A=Le(e,f),j=Se?Se(e)===Object.prototype:e instanceof Object||e.constructor===Object,O=e instanceof Object?"":"null prototype",P=!j&&ve&&Object(e)===e&&ve in e?ae.call(Me(e),8,-1):O?"Object":"",x=(j||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(P||O?"["+fe.call(ue.call([],P||[],O||[]),": ")+"] ":"");return 0===A.length?x+"{}":u?x+"{"+Be(A,u)+"}":x+"{ "+fe.call(A,", ")+" }"}return String(e)},ze=Et("%TypeError%"),qe=Et("%WeakMap%",!0),$e=Et("%Map%",!0),Ge=qt("WeakMap.prototype.get",!0),Ve=qt("WeakMap.prototype.set",!0),He=qt("WeakMap.prototype.has",!0),Je=qt("Map.prototype.get",!0),Qe=qt("Map.prototype.set",!0),Ye=qt("Map.prototype.has",!0),Ke=function(t,e){for(var r,o=t;null!==(r=o.next);o=r)if(r.key===e)return o.next=r.next,r.next=t.next,t.next=r,r},Ze=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new ze("Side channel does not contain "+We(t))},get:function(o){if(qe&&o&&("object"==typeof o||"function"==typeof o)){if(t)return Ge(t,o)}else if($e){if(e)return Je(e,o)}else if(r)return function(t,e){var r=Ke(t,e);return r&&r.value}(r,o)},has:function(o){if(qe&&o&&("object"==typeof o||"function"==typeof o)){if(t)return He(t,o)}else if($e){if(e)return Ye(e,o)}else if(r)return function(t,e){return!!Ke(t,e)}(r,o);return!1},set:function(o,n){qe&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new qe),Ve(t,o,n)):$e?(e||(e=new $e),Qe(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=Ke(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o},Xe=String.prototype.replace,tr=/%20/g,er="RFC3986",rr={default:er,formatters:{RFC1738:function(t){return Xe.call(t,tr,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:er},or=Object.prototype.hasOwnProperty,nr=Array.isArray,ir=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),ar=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r},cr={arrayToObject:ar,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var n=e[o],i=n.obj[n.prop],a=Object.keys(i),c=0;c<a.length;++c){var s=a[c],l=i[s];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:i,prop:s}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(nr(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(t){return o}},encode:function(t,e,r,o,n){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",c=0;c<i.length;++c){var s=i.charCodeAt(c);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||n===rr.RFC1738&&(40===s||41===s)?a+=i.charAt(c):s<128?a+=ir[s]:s<2048?a+=ir[192|s>>6]+ir[128|63&s]:s<55296||s>=57344?a+=ir[224|s>>12]+ir[128|s>>6&63]+ir[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(c)),a+=ir[240|s>>18]+ir[128|s>>12&63]+ir[128|s>>6&63]+ir[128|63&s])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(nr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r){if(nr(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!or.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var n=e;return nr(e)&&!nr(r)&&(n=ar(e,o)),nr(e)&&nr(r)?(r.forEach((function(r,n){if(or.call(e,n)){var i=e[n];i&&"object"==typeof i&&r&&"object"==typeof r?e[n]=t(i,r,o):e.push(r)}else e[n]=r})),e):Object.keys(r).reduce((function(e,n){var i=r[n];return or.call(e,n)?e[n]=t(e[n],i,o):e[n]=i,e}),n)}},sr=Object.prototype.hasOwnProperty,lr={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},pr=Array.isArray,ur=Array.prototype.push,fr=function(t,e){ur.apply(t,pr(e)?e:[e])},yr=Date.prototype.toISOString,hr=rr.default,dr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:cr.encode,encodeValuesOnly:!1,format:hr,formatter:rr.formatters[hr],indices:!1,serializeDate:function(t){return yr.call(t)},skipNulls:!1,strictNullHandling:!1},gr={},mr=function t(e,r,o,n,i,a,c,s,l,p,u,f,y,h,d,g){for(var m,b=e,v=g,w=0,S=!1;void 0!==(v=v.get(gr))&&!S;){var _=v.get(e);if(w+=1,void 0!==_){if(_===w)throw new RangeError("Cyclic object value");S=!0}void 0===v.get(gr)&&(w=0)}if("function"==typeof s?b=s(r,b):b instanceof Date?b=u(b):"comma"===o&&pr(b)&&(b=cr.maybeMap(b,(function(t){return t instanceof Date?u(t):t}))),null===b){if(i)return c&&!h?c(r,dr.encoder,d,"key",f):r;b=""}if("string"==typeof(m=b)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||cr.isBuffer(b))return c?[y(h?r:c(r,dr.encoder,d,"key",f))+"="+y(c(b,dr.encoder,d,"value",f))]:[y(r)+"="+y(String(b))];var A,j=[];if(void 0===b)return j;if("comma"===o&&pr(b))h&&c&&(b=cr.maybeMap(b,c)),A=[{value:b.length>0?b.join(",")||null:void 0}];else if(pr(s))A=s;else{var O=Object.keys(b);A=l?O.sort(l):O}for(var P=n&&pr(b)&&1===b.length?r+"[]":r,x=0;x<A.length;++x){var k=A[x],I="object"==typeof k&&void 0!==k.value?k.value:b[k];if(!a||null!==I){var E=pr(b)?"function"==typeof o?o(P,k):P:P+(p?"."+k:"["+k+"]");g.set(e,w);var R=Ze();R.set(gr,g),fr(j,t(I,E,o,n,i,a,"comma"===o&&h&&pr(b)?null:c,s,l,p,u,f,y,h,d,R))}}return j},br=Object.prototype.hasOwnProperty,vr=Array.isArray,wr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:cr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Sr=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},_r=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Ar=function(t,e,r,o){if(t){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(n),c=a?n.slice(0,a.index):n,s=[];if(c){if(!r.plainObjects&&br.call(Object.prototype,c)&&!r.allowPrototypes)return;s.push(c)}for(var l=0;r.depth>0&&null!==(a=i.exec(n))&&l<r.depth;){if(l+=1,!r.plainObjects&&br.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(a[1])}return a&&s.push("["+n.slice(a.index)+"]"),function(t,e,r,o){for(var n=o?e:_r(e,r),i=t.length-1;i>=0;--i){var a,c=t[i];if("[]"===c&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(s,10);r.parseArrays||""!==s?!isNaN(l)&&c!==s&&String(l)===s&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=n:"__proto__"!==s&&(a[s]=n):a={0:n}}n=a}return n}(s,e,r,o)}},jr=function(t,e){var r=function(t){if(!t)return wr;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?wr.charset:t.charset;return{allowDots:void 0===t.allowDots?wr.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:wr.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:wr.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:wr.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:wr.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:wr.comma,decoder:"function"==typeof t.decoder?t.decoder:wr.decoder,delimiter:"string"==typeof t.delimiter||cr.isRegExp(t.delimiter)?t.delimiter:wr.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:wr.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:wr.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:wr.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:wr.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:wr.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof t?function(t,e){var r,o={__proto__:null},n=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=e.parameterLimit===1/0?void 0:e.parameterLimit,a=n.split(e.delimiter,i),c=-1,s=e.charset;if(e.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?s="utf-8":"utf8=%26%2310003%3B"===a[r]&&(s="iso-8859-1"),c=r,r=a.length);for(r=0;r<a.length;++r)if(r!==c){var l,p,u=a[r],f=u.indexOf("]="),y=-1===f?u.indexOf("="):f+1;-1===y?(l=e.decoder(u,wr.decoder,s,"key"),p=e.strictNullHandling?null:""):(l=e.decoder(u.slice(0,y),wr.decoder,s,"key"),p=cr.maybeMap(_r(u.slice(y+1),e),(function(t){return e.decoder(t,wr.decoder,s,"value")}))),p&&e.interpretNumericEntities&&"iso-8859-1"===s&&(p=Sr(p)),u.indexOf("[]=")>-1&&(p=vr(p)?[p]:p),br.call(o,l)?o[l]=cr.combine(o[l],p):o[l]=p}return o}(t,r):t,n=r.plainObjects?Object.create(null):{},i=Object.keys(o),a=0;a<i.length;++a){var c=i[a],s=Ar(c,o[c],r,"string"==typeof t);n=cr.merge(n,s,r)}return!0===r.allowSparse?n:cr.compact(n)},Or=function(t,e){var r,o=t,n=function(t){if(!t)return dr;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||dr.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=rr.default;if(void 0!==t.format){if(!sr.call(rr.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=rr.formatters[r],n=dr.filter;return("function"==typeof t.filter||pr(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:dr.addQueryPrefix,allowDots:void 0===t.allowDots?dr.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:dr.charsetSentinel,delimiter:void 0===t.delimiter?dr.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:dr.encode,encoder:"function"==typeof t.encoder?t.encoder:dr.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:dr.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:dr.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:dr.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:dr.strictNullHandling}}(e);"function"==typeof n.filter?o=(0,n.filter)("",o):pr(n.filter)&&(r=n.filter);var i,a=[];if("object"!=typeof o||null===o)return"";i=e&&e.arrayFormat in lr?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var c=lr[i];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s="comma"===c&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),n.sort&&r.sort(n.sort);for(var l=Ze(),p=0;p<r.length;++p){var u=r[p];n.skipNulls&&null===o[u]||fr(a,mr(o[u],u,c,s,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var f=a.join(n.delimiter),y=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),f.length>0?y+f:""};
2
- /** @fileOverview
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("util")):"function"==typeof define&&define.amd?define(["util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).AccountsSDK=e(t.require$$0)}(this,(function(t){"use strict";var e={extend:function(t){return t.oauth_exception&&this.oauth_exception[t.oauth_exception]?Object.assign(t,{description:this.oauth_exception[t.oauth_exception]}):t.identity_exception&&this.identity_exception[t.identity_exception]?Object.assign(t,{description:this.identity_exception[t.identity_exception]}):t},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."}};class r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}start(t,e){this._listenerInited||(this.listening=!0,this.callback=e,t&&(this.tid=setTimeout((()=>{this.stop(),e("timeout",null)}),t)),window.addEventListener("message",this.receiveMessage))}stop(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}receiveMessage(t){t.origin!==this.options.server_url&&t.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(t.data.data||t.data.error)&&(this.stop(),t.data.error?this.callback(e.extend(t.data.error),null):(t.data.data.scopes&&(t.data.data.scope=t.data.data.scopes,delete t.data.data.scopes),t.data.data.expires_in&&(t.data.data.expires_in=parseInt(t.data.data.expires_in)||0),this.callback(null,t.data.data)))}}class n{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button"),o=window.screen.width/2-250,i=window.screen.height/2-325;new r(this.options).start(null,((r,n)=>{if(r)return e(r);t(n)}));const a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(o,",top=").concat(i))};if(document.requestStorageAccess){document.requestStorageAccess().then(a,a)}else a()}))}}var o,i,a,c,s,u,l,p,f,y,d,h,g,m,b,v,w,_,S,A,O,j,P,E,x,I,k,R,D,M,F,U,N,C,L,T,B,z,W,K,q,$,G,H,V,Q,J,Y,X,Z,tt,et,rt,nt,ot,it,at,ct,st,ut,lt,pt,ft,yt,dt,ht,gt,mt,bt,vt,wt,_t,St,At,Ot,jt,Pt,Et,xt,It,kt,Rt,Dt,Mt,Ft,Ut,Nt,Ct,Lt,Tt,Bt,zt,Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Kt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qt(){return i?o:(i=1,o=TypeError)}function $t(){return c?a:(c=1,a=t.inspect)}function Gt(){if(u)return s;u=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&"function"==typeof e.get?e.get:null,n=t&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,c=o&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,d=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var F=$t(),U=F.custom,N=q(U)?U:null,C={__proto__:null,double:'"',single:"'"},L={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function T(t,e,r){var n=r.quoteStyle||e,o=C[n];return o+t+o}function B(t){return b.call(String(t),/"/g,"&quot;")}function z(t){return!k||!("object"==typeof t&&(k in t||void 0!==t[k]))}function W(t){return"[object Array]"===H(t)&&z(t)}function K(t){return"[object RegExp]"===H(t)&&z(t)}function q(t){if(I)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}s=function t(e,o,i,s){var u=o||{};if(G(u,"quoteStyle")&&!G(C,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=!G(u,"customInspect")||u.customInspect;if("boolean"!=typeof d&&"symbol"!==d)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Q(e,u);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return v?M(e,_):_}if("bigint"==typeof e){var j=String(e)+"n";return v?M(e,j):j}var E=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=E&&E>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var U=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(u,i);if(void 0===s)s=[];else if(V(s,e)>=0)return"[Circular]";function L(e,r,n){if(r&&(s=O.call(s)).push(r),n){var o={depth:u.depth};return G(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),t(e,o,i+1,s)}return t(e,u,i+1,s)}if("function"==typeof e&&!K(e)){var $=function(t){if(t.name)return t.name;var e=g.call(h.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),J=et(e,L);return"[Function"+($?": "+$:" (anonymous)")+"]"+(J.length>0?" { "+A.call(J,", ")+" }":"")}if(q(e)){var rt=I?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||I?rt:Y(rt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var nt="<"+w.call(String(e.nodeName)),ot=e.attributes||[],it=0;it<ot.length;it++)nt+=" "+ot[it].name+"="+T(B(ot[it].value),"double",u);return nt+=">",e.childNodes&&e.childNodes.length&&(nt+="..."),nt+="</"+w.call(String(e.nodeName))+">"}if(W(e)){if(0===e.length)return"[]";var at=et(e,L);return U&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(at)?"["+tt(at,U)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return"[object Error]"===H(t)&&z(t)}(e)){var ct=et(e,L);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ct,", ")+" }":"{ ["+String(e)+"] "+A.call(S.call("[cause]: "+L(e.cause),ct),", ")+" }"}if("object"==typeof e&&d){if(N&&"function"==typeof e[N]&&F)return F(e,{depth:E-i});if("symbol"!==d&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!=typeof t)return!1;try{r.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return n&&n.call(e,(function(t,r){st.push(L(r,e,!0)+" => "+L(t,e))})),Z("Map",r.call(e),st,U)}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return c&&c.call(e,(function(t){ut.push(L(t,e))})),Z("Set",a.call(e),ut,U)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return"[object Number]"===H(t)&&z(t)}(e))return Y(L(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return Y(L(P.call(e)));if(function(t){return"[object Boolean]"===H(t)&&z(t)}(e))return Y(y.call(e));if(function(t){return"[object String]"===H(t)&&z(t)}(e))return Y(L(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Wt&&e===Wt)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===H(t)&&z(t)}(e)&&!K(e)){var lt=et(e,L),pt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",yt=!pt&&k&&Object(e)===e&&k in e?m.call(H(e),8,-1):ft?"Object":"",dt=(pt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||ft?"["+A.call(S.call([],yt||[],ft||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":U?dt+"{"+tt(lt,U)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var $=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return $.call(t,e)}function H(t){return d.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Q(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Q(m.call(t,0,e.maxStringLength),e)+n}var o=L[e.quoteStyle||"single"];return o.lastIndex=0,T(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function Y(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Z(t,e,r,n){return t+" ("+e+") {"+(n?tt(r,n):A.call(r,", "))+"}"}function tt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function et(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,a="function"==typeof E?E(t):[];if(I){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var s in t)G(t,s)&&(r&&String(Number(s))===s&&s<t.length||I&&i["$"+s]instanceof Symbol||(_.call(/[^\w$]/,s)?n.push(e(s,t)+": "+e(t[s],t)):n.push(s+": "+e(t[s],t))));if("function"==typeof E)for(var u=0;u<a.length;u++)R.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}return s}function Ht(){if(p)return l;p=1;var t=Gt(),e=qt(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return l=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=n&&n.next,o=function(t,e){if(t)return r(t,e,!0)}(n,t);return o&&e&&e===o&&(n=void 0),!!o},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o}}function Vt(){return y?f:(y=1,f=Object)}function Qt(){return h?d:(h=1,d=Error)}function Jt(){return m?g:(m=1,g=EvalError)}function Yt(){return v?b:(v=1,b=RangeError)}function Xt(){return _?w:(_=1,w=ReferenceError)}function Zt(){return A?S:(A=1,S=SyntaxError)}function te(){return j?O:(j=1,O=URIError)}function ee(){return E?P:(E=1,P=Math.abs)}function re(){return I?x:(I=1,x=Math.floor)}function ne(){return R?k:(R=1,k=Math.max)}function oe(){return M?D:(M=1,D=Math.min)}function ie(){return U?F:(U=1,F=Math.pow)}function ae(){return C?N:(C=1,N=Math.round)}function ce(){return T?L:(T=1,L=Number.isNaN||function(t){return t!=t})}function se(){if(z)return B;z=1;var t=ce();return B=function(e){return t(e)||0===e?e:e<0?-1:1}}function ue(){return K?W:(K=1,W=Object.getOwnPropertyDescriptor)}function le(){if($)return q;$=1;var t=ue();if(t)try{t([],"length")}catch(e){t=null}return q=t}function pe(){if(H)return G;H=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return G=t}function fe(){if(Y)return J;Y=1;var t="undefined"!=typeof Symbol&&Symbol,e=Q?V:(Q=1,V=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return J=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function ye(){return Z?X:(Z=1,X="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function de(){return et?tt:(et=1,tt=Vt().getPrototypeOf||null)}function he(){if(nt)return rt;nt=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return rt=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),c=e(0,o.length-a.length),s=[],u=0;u<c;u++)s[u]="$"+u;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(s,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(n,r(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i},rt}function ge(){if(it)return ot;it=1;var t=he();return ot=Function.prototype.bind||t}function me(){return ct?at:(ct=1,at=Function.prototype.call)}function be(){return ut?st:(ut=1,st=Function.prototype.apply)}function ve(){if(yt)return ft;yt=1;var t=ge(),e=be(),r=me(),n=pt?lt:(pt=1,lt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return ft=n||t.call(r,e)}function we(){if(ht)return dt;ht=1;var t=ge(),e=qt(),r=me(),n=ve();return dt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function _e(){if(mt)return gt;mt=1;var t,e=we(),r=le();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return gt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))}}function Se(){if(vt)return bt;vt=1;var t=ye(),e=de(),r=_e();return bt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function Ae(){if(_t)return wt;_t=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ge();return wt=r.call(t,e)}function Oe(){if(At)return St;var t;At=1;var e=Vt(),r=Qt(),n=Jt(),o=Yt(),i=Xt(),a=Zt(),c=qt(),s=te(),u=ee(),l=re(),p=ne(),f=oe(),y=ie(),d=ae(),h=se(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=le(),v=pe(),w=function(){throw new c},_=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,S=fe()(),A=Se(),O=de(),j=ye(),P=be(),E=me(),x={},I="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&A?A((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&A?A((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":_,"%TypedArray%":I,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":s,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":P,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":O,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":d,"%Math.sign%":h,"%Reflect.getPrototypeOf%":j};if(A)try{null.error}catch(t){var R=A(A(t));k["%Error.prototype%"]=R}var D=function t(e){var r;if("%AsyncFunction%"===e)r=m("async function () {}");else if("%GeneratorFunction%"===e)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=m("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return k[e]=r,r},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=ge(),U=Ae(),N=F.call(E,Array.prototype.concat),C=F.call(P,Array.prototype.splice),L=F.call(E,String.prototype.replace),T=F.call(E,String.prototype.slice),B=F.call(E,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,K=function(t,e){var r,n=t;if(U(M,n)&&(n="%"+(r=M[n])[0]+"%"),U(k,n)){var o=k[n];if(o===x&&(o=D(n)),void 0===o&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+t+" does not exist!")};return St=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,t))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=T(t,0,1),r=T(t,-1);if("%"===e&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return L(t,z,(function(t,e,r,o){n[n.length]=r?L(o,W,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=K("%"+n+"%",e),i=o.name,s=o.value,u=!1,l=o.alias;l&&(n=l[0],C(r,N([0,1],l)));for(var p=1,f=!0;p<r.length;p+=1){var y=r[p],d=T(y,0,1),h=T(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===h||"'"===h||"`"===h)&&d!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==y&&f||(u=!0),U(k,i="%"+(n+="."+y)+"%"))s=k[i];else if(null!=s){if(!(y in s)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&p+1>=r.length){var g=b(s,y);s=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[y]}else f=U(s,y),s=s[y];f&&!u&&(k[i]=s)}}return s},St}function je(){if(jt)return Ot;jt=1;var t=Oe(),e=we(),r=e([t("%String.prototype.indexOf%")]);return Ot=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Pe(){if(Et)return Pt;Et=1;var t=Oe(),e=je(),r=Gt(),n=qt(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),s=e("Map.prototype.delete",!0),u=e("Map.prototype.size",!0);return Pt=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=s(t,e);return 0===u(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&c(t,e)},set:function(e,r){t||(t=new o),a(t,e,r)}};return e}}function Ee(){if(Rt)return kt;Rt=1;var t=qt(),e=Gt(),r=Ht(),n=Pe(),o=function(){if(It)return xt;It=1;var t=Oe(),e=je(),r=Gt(),n=Pe(),o=qt(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),s=e("WeakMap.prototype.has",!0),u=e("WeakMap.prototype.delete",!0);return xt=i?function(){var t,e,l={assert:function(t){if(!l.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return u(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?a(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),c(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return l}:n}(),i=o||n||r;return kt=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n}}function xe(){if(Mt)return Dt;Mt=1;var t=String.prototype.replace,e=/%20/g,r="RFC3986";return Dt={default:r,formatters:{RFC1738:function(r){return t.call(r,e,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}}function Ie(){if(Ut)return Ft;Ut=1;var t=xe(),e=Ee(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=e(),i=function(t,e){return o.set(t,e),t},a=function(t){return o.has(t)},c=function(t){return o.get(t)},s=function(t,e){o.set(t,e)},u=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},p=1024;return Ft={arrayToObject:l,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e,r,n){if(a(t)){var o=c(t)+1;return t[o]=e,s(t,o),t}var u=[].concat(t,e);return u.length>r?i(l(u,{plainObjects:n}),u.length-1):u},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var i=e[o],a=i.obj[i.prop],c=Object.keys(a),s=0;s<c.length;++s){var u=c[s],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:a,prop:u}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&o.push(r[i]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(e,r,n,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",s=0;s<a.length;s+=p){for(var l=a.length>=p?a.slice(s,s+p):a,f=[],y=0;y<l.length;++y){var d=l.charCodeAt(y);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===t.RFC1738&&(40===d||41===d)?f[f.length]=l.charAt(y):d<128?f[f.length]=u[d]:d<2048?f[f.length]=u[192|d>>6]+u[128|63&d]:d<55296||d>=57344?f[f.length]=u[224|d>>12]+u[128|d>>6&63]+u[128|63&d]:(y+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(y)),f[f.length]=u[240|d>>18]+u[128|d>>12&63]+u[128|d>>6&63]+u[128|63&d])}c+=f.join("")}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:a,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(n(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,o,u){if(!o)return e;if("object"!=typeof o&&"function"!=typeof o){if(n(e))e.push(o);else{if(!e||"object"!=typeof e)return[e,o];if(a(e)){var p=c(e)+1;e[p]=o,s(e,p)}else(u&&(u.plainObjects||u.allowPrototypes)||!r.call(Object.prototype,o))&&(e[o]=!0)}return e}if(!e||"object"!=typeof e){if(a(o)){for(var f=Object.keys(o),y=u&&u.plainObjects?{__proto__:null,0:e}:{0:e},d=0;d<f.length;d++){y[parseInt(f[d],10)+1]=o[f[d]]}return i(y,c(o)+1)}return[e].concat(o)}var h=e;return n(e)&&!n(o)&&(h=l(e,u)),n(e)&&n(o)?(o.forEach((function(n,o){if(r.call(e,o)){var i=e[o];i&&"object"==typeof i&&n&&"object"==typeof n?e[o]=t(i,n,u):e.push(n)}else e[o]=n})),e):Object.keys(o).reduce((function(e,n){var i=o[n];return r.call(e,n)?e[n]=t(e[n],i,u):e[n]=i,e}),h)}},Ft}function ke(){if(Ct)return Nt;Ct=1;var t=Ee(),e=Ie(),r=xe(),n=Object.prototype.hasOwnProperty,o={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},i=Array.isArray,a=Array.prototype.push,c=function(t,e){a.apply(t,i(e)?e:[e])},s=Date.prototype.toISOString,u=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(t){return s.call(t)},skipNulls:!1,strictNullHandling:!1},p={},f=function r(n,o,a,s,u,f,y,d,h,g,m,b,v,w,_,S,A,O){for(var j,P=n,E=O,x=0,I=!1;void 0!==(E=E.get(p))&&!I;){var k=E.get(n);if(x+=1,void 0!==k){if(k===x)throw new RangeError("Cyclic object value");I=!0}void 0===E.get(p)&&(x=0)}if("function"==typeof g?P=g(o,P):P instanceof Date?P=v(P):"comma"===a&&i(P)&&(P=e.maybeMap(P,(function(t){return t instanceof Date?v(t):t}))),null===P){if(f)return h&&!S?h(o,l.encoder,A,"key",w):o;P=""}if("string"==typeof(j=P)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||e.isBuffer(P))return h?[_(S?o:h(o,l.encoder,A,"key",w))+"="+_(h(P,l.encoder,A,"value",w))]:[_(o)+"="+_(String(P))];var R,D=[];if(void 0===P)return D;if("comma"===a&&i(P))S&&h&&(P=e.maybeMap(P,h)),R=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(g))R=g;else{var M=Object.keys(P);R=m?M.sort(m):M}var F=d?String(o).replace(/\./g,"%2E"):String(o),U=s&&i(P)&&1===P.length?F+"[]":F;if(u&&i(P)&&0===P.length)return U+"[]";for(var N=0;N<R.length;++N){var C=R[N],L="object"==typeof C&&C&&void 0!==C.value?C.value:P[C];if(!y||null!==L){var T=b&&d?String(C).replace(/\./g,"%2E"):String(C),B=i(P)?"function"==typeof a?a(U,T):U:U+(b?"."+T:"["+T+"]");O.set(n,x);var z=t();z.set(p,O),c(D,r(L,B,a,s,u,f,y,d,"comma"===a&&S&&i(P)?null:h,g,m,b,v,w,_,S,A,z))}}return D};return Nt=function(e,a){var s,u=e,p=function(t){if(!t)return l;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||l.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==t.format){if(!n.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var c,s=r.formatters[a],u=l.filter;if(("function"==typeof t.filter||i(t.filter))&&(u=t.filter),c=t.arrayFormat in o?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===t.allowDots?!0===t.encodeDotInKeys||l.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:l.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:c,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?l.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:l.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:l.encodeValuesOnly,filter:u,format:a,formatter:s,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:l.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:l.strictNullHandling}}(a);"function"==typeof p.filter?u=(0,p.filter)("",u):i(p.filter)&&(s=p.filter);var y=[];if("object"!=typeof u||null===u)return"";var d=o[p.arrayFormat],h="comma"===d&&p.commaRoundTrip;s||(s=Object.keys(u)),p.sort&&s.sort(p.sort);for(var g=t(),m=0;m<s.length;++m){var b=s[m],v=u[b];p.skipNulls&&null===v||c(y,f(v,b,d,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var w=y.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""},Nt}function Re(){if(Tt)return Lt;Tt=1;var t=Ie(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},i=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},a=function(r,n,o,a){if(r){var c=function(t,r){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(r.depth<=0){if(!r.plainObjects&&e.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),a=i?n.slice(0,i.index):n,c=[];if(a){if(!r.plainObjects&&e.call(Object.prototype,a)&&!r.allowPrototypes)return;c.push(a)}for(var s=0;null!==(i=o.exec(n))&&s<r.depth;){s+=1;var u=i[1].slice(1,-1);if(!r.plainObjects&&e.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(i[1])}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+n.slice(i.index)+"]")}return c}(r,o);if(c)return function(e,r,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var c=e.slice(0,-1).join("");a=Array.isArray(r)&&r[c]?r[c].length:0}for(var s=o?r:i(r,n,a),u=e.length-1;u>=0;--u){var l,p=e[u];if("[]"===p&&n.parseArrays)l=t.isOverflow(s)?s:n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:t.combine([],s,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var f="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,y=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,d=parseInt(y,10);n.parseArrays||""!==y?!isNaN(d)&&p!==y&&String(d)===y&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(l=[])[d]=s:"__proto__"!==y&&(l[y]=s):l={0:s}}s=l}return s}(c,n,o,a)}};return Lt=function(c,s){var u=function(e){if(!e)return n;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===e.charset?n.charset:e.charset,o=void 0===e.duplicates?n.duplicates:e.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||n.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:n.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:n.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:n.decoder,delimiter:"string"==typeof e.delimiter||t.isRegExp(e.delimiter)?e.delimiter:n.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:n.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(s);if(""===c||null==c)return u.plainObjects?{__proto__:null}:{};for(var l="string"==typeof c?function(a,c){var s={__proto__:null},u=c.ignoreQueryPrefix?a.replace(/^\?/,""):a;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=c.parameterLimit===1/0?void 0:c.parameterLimit,p=u.split(c.delimiter,c.throwOnLimitExceeded?l+1:l);if(c.throwOnLimitExceeded&&p.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f,y=-1,d=c.charset;if(c.charsetSentinel)for(f=0;f<p.length;++f)0===p[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[f]?d="utf-8":"utf8=%26%2310003%3B"===p[f]&&(d="iso-8859-1"),y=f,f=p.length);for(f=0;f<p.length;++f)if(f!==y){var h,g,m=p[f],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;if(-1===v?(h=c.decoder(m,n.decoder,d,"key"),g=c.strictNullHandling?null:""):null!==(h=c.decoder(m.slice(0,v),n.decoder,d,"key"))&&(g=t.maybeMap(i(m.slice(v+1),c,r(s[h])?s[h].length:0),(function(t){return c.decoder(t,n.decoder,d,"value")}))),g&&c.interpretNumericEntities&&"iso-8859-1"===d&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),null!==h){var w=e.call(s,h);w&&"combine"===c.duplicates?s[h]=t.combine(s[h],g,c.arrayLimit,c.plainObjects):w&&"last"!==c.duplicates||(s[h]=g)}}return s}(c,u):c,p=u.plainObjects?{__proto__:null}:{},f=Object.keys(l),y=0;y<f.length;++y){var d=f[y],h=a(d,l[d],u,"string"==typeof c);p=t.merge(p,h,u)}return!0===u.allowSparse?p:t.compact(p)}}function De(){if(zt)return Bt;zt=1;var t=ke(),e=Re();return Bt={formats:xe(),parse:e,stringify:t}}var Me=Kt(De());
2
+ /**
3
+ * @param {Record<string, unknown>} object Source object to pick properties from.
4
+ * @param {string[]} keys Keys to pick from the source object.
5
+ * @returns {Record<string, unknown>} A new object containing only the picked keys.
3
6
  * @author Auth0 https://github.com/auth0/auth0.js
4
7
  * @license MIT
5
8
  */
6
- function Pr(t,e){return e.reduce(((e,r)=>(t[r]&&(e[r]=t[r]),e)),{})}class xr{constructor(t,e){this.options=e,this.sdk=t}authorize(){const t=this.sdk.authorizeURL(this.options);window.location=t}authorizeData(){return new Promise(((t,e)=>{let r={},n=[];switch(this.options.response_type){case"token":if(n=["access_token","expires_in","token_type"],r=jr(window.location.hash.substring(1)),r=Pr(r,["access_token","expires_in","state","scope","token_type"]),!n.every((t=>r.hasOwnProperty(t))))return void e(o.extend({identity_exception:"unauthorized"}));r.expires_in=parseInt(r.expires_in);break;case"code":if(n=["code"],r=jr(window.location.search,{ignoreQueryPrefix:!0}),r=Pr(r,["state","code"]),!n.every((t=>r.hasOwnProperty(t))))return void e(o.extend({identity_exception:"unauthorized"}))}this.sdk.redirectUriParamsPersister.retrieve(r.state),t(r)}))}}class kr{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const r=this.sdk.authorizeURL(this.options,"button");new n(this.options).start(5e3,((r,o)=>{if(this.removeIframe(),r)return e(r);t(o)}));const o=document.createElement("iframe");o.setAttribute("src",r),o.setAttribute("id",this.iframeID()),o.style.width="1px",o.style.height="1px",o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.opacity="0",o.style.visibility="none",document.body.appendChild(o)}))}iframeID(){return this.options.client_id+this.options.response_type}removeIframe(){const t=document.getElementById(this.iframeID());t&&t.parentNode&&t.parentNode.removeChild(t)}}
7
- /** @fileOverview
9
+ function Fe(t,e){return e.reduce(((e,r)=>(t[r]&&(e[r]=t[r]),e)),{})}class Ue{constructor(t,e){this.options=e,this.sdk=t}authorize(){const t=this.sdk.authorizeURL(this.options);window.location=t}authorizeData(){return new Promise(((t,r)=>{let n={},o=[];switch(this.options.response_type){case"token":if(o=["access_token","expires_in","token_type"],n=Me.parse(window.location.hash.substring(1)),n=Fe(n,["access_token","expires_in","state","scope","token_type"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}));n.expires_in=parseInt(n.expires_in);break;case"code":if(o=["code"],n=Me.parse(window.location.search,{ignoreQueryPrefix:!0}),n=Fe(n,["state","code"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}))}this.sdk.redirectUriParamsPersister.retrieve(n.state),t(n)}))}}class Ne{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button");new r(this.options).start(5e3,((r,n)=>{if(this.removeIframe(),r)return e(r);t(n)}));const o=document.createElement("iframe");o.setAttribute("src",n),o.setAttribute("id",this.iframeID()),o.style.width="1px",o.style.height="1px",o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.opacity="0",o.style.visibility="none",document.body.appendChild(o)}))}iframeID(){return this.options.client_id+this.options.response_type}removeIframe(){const t=document.getElementById(this.iframeID());t&&t.parentNode&&t.parentNode.removeChild(t)}}
10
+ /**
11
+ * @file
8
12
  * @author Auth0 https://github.com/auth0/auth0.js
9
13
  * @license MIT
10
- */function Ir(){}Ir.prototype.getItem=function(){return null},Ir.prototype.removeItem=function(){},Ir.prototype.setItem=function(){};var Er=It((function(t,e){var r;r=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var r=arguments[t];for(var o in r)e[o]=r[o]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(o){function n(){}function i(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},n.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(t){}r=o.write?o.write(r,e):encodeURIComponent(String(r)).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 c="";for(var s in i)i[s]&&(c+="; "+s,!0!==i[s]&&(c+="="+i[s].split(";")[0]));return document.cookie=e+"="+r+c}}function a(t,r){if("undefined"!=typeof document){for(var n={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),s=c.slice(1).join("=");r||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var l=e(c[0]);if(s=(o.read||o)(s,l)||e(s),r)try{s=JSON.parse(s)}catch(t){}if(n[l]=s,t===l)break}catch(t){}}return t?n[t]:n}}return n.set=i,n.get=function(t){return a(t,!1)},n.getJSON=function(t){return a(t,!0)},n.remove=function(e,r){i(e,"",t(r,{expires:-1}))},n.defaults={},n.withConverter=r,n}((function(){}))},t.exports=r()}));function Rr(){}function Mr(t){if(this.storage=new Rr,!0===t.force_local_storage)try{const t=window.localStorage;t&&(this.storage=t)}catch(t){console.warn(t),console.warn("Cant use localStorage. Using CookieStorage instead.")}}function Ur(t){this.handler=new Mr(t)}Rr.prototype.getItem=function(t){return Er.get(t)},Rr.prototype.removeItem=function(t){Er.remove(t)},Rr.prototype.setItem=function(t,e,r){const o=Object.assign({expires:1,SameSite:"none",Secure:!0},r);Er.set(t,e,o)},Mr.prototype.failover=function(){this.storage instanceof Ir?console.warn("DummyStorage: ignore failover"):this.storage instanceof Rr?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new Ir):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new Rr)},Mr.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return console.warn(e),this.failover(),this.getItem(t)}},Mr.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return console.warn(e),this.failover(),this.removeItem(t)}},Mr.prototype.setItem=function(t,e,r){try{return this.storage.setItem(t,e,r)}catch(o){return console.warn(o),this.failover(),this.setItem(t,e,r)}},Ur.prototype.getItem=function(t){const e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},Ur.prototype.removeItem=function(t){return this.handler.removeItem(t)},Ur.prototype.setItem=function(t,e,r){const o=JSON.stringify(e);return this.handler.setItem(t,o,r)};class Nr{constructor(t){this.options=t.transaction,this.storage=new Ur(this.options)}generate(t){this.storage.setItem(this.options.namespace+t.state,{state:t.state,code_verifier:t.code_verifier},{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}var Fr={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};Fr.bitArray={bitSlice:function(t,e,r){return t=Fr.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:Fr.bitArray.clamp(t,r-e)},extract:function(t,e,r){var o=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-o^t[e/32+1|0]>>>o:t[e/32|0]>>>o)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],o=Fr.bitArray.getPartial(r);return 32===o?t.concat(e):Fr.bitArray._shiftRight(e,o,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e,r=t.length;return 0===r?0:(e=t[r-1],32*(r-1)+Fr.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Fr.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(Fr.bitArray.bitLength(t)!==Fr.bitArray.bitLength(e))return!1;var r,o=0;for(r=0;r<t.length;r++)o|=t[r]^e[r];return 0===o},_shiftRight:function(t,e,r,o){var n,i,a;for(void 0===o&&(o=[]);e>=32;e-=32)o.push(r),r=0;if(0===e)return o.concat(t);for(n=0;n<t.length;n++)o.push(r|t[n]>>>e),r=t[n]<<32-e;return i=t.length?t[t.length-1]:0,a=Fr.bitArray.getPartial(i),o.push(Fr.bitArray.partial(e+a&31,e+a>32?r:o.pop(),1)),o},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return t}},Fr.codec.utf8String={fromBits:function(t){var e,r,o="",n=Fr.bitArray.bitLength(t);for(e=0;e<n/8;e++)0==(3&e)&&(r=t[e/4]),o+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(o))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],o=0;for(e=0;e<t.length;e++)o=o<<8|t.charCodeAt(e),3==(3&e)&&(r.push(o),o=0);return 3&e&&r.push(Fr.bitArray.partial(8*(3&e),o)),r}},Fr.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},Fr.hash.sha256.hash=function(t){return(new Fr.hash.sha256).update(t).finalize()},Fr.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=Fr.codec.utf8String.toBits(t));var e,r=this._buffer=Fr.bitArray.concat(this._buffer,t),o=this._length,n=this._length=o+Fr.bitArray.bitLength(t);if(n>9007199254740991)throw new Fr.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var i=new Uint32Array(r),a=0;for(e=512+o-(512+o&511);e<=n;e+=512)this._block(i.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(e=512+o-(512+o&511);e<=n;e+=512)this._block(r.splice(0,16));return this},finalize:function(){var t,e=this._buffer,r=this._h;for(t=(e=Fr.bitArray.concat(e,[Fr.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var t,e,r=0,o=2;function n(t){return 4294967296*(t-Math.floor(t))|0}for(;r<64;o++){for(e=!0,t=2;t*t<=o;t++)if(o%t==0){e=!1;break}e&&(r<8&&(this._init[r]=n(Math.pow(o,.5))),this._key[r]=n(Math.pow(o,1/3)),r++)}},_block:function(t){var e,r,o,n,i=this._h,a=this._key,c=i[0],s=i[1],l=i[2],p=i[3],u=i[4],f=i[5],y=i[6],h=i[7];for(e=0;e<64;e++)e<16?r=t[e]:(o=t[e+1&15],n=t[e+14&15],r=t[15&e]=(o>>>7^o>>>18^o>>>3^o<<25^o<<14)+(n>>>17^n>>>19^n>>>10^n<<15^n<<13)+t[15&e]+t[e+9&15]|0),r=r+h+(u>>>6^u>>>11^u>>>25^u<<26^u<<21^u<<7)+(y^u&(f^y))+a[e],h=y,y=f,f=u,u=p+r|0,p=l,l=s,c=r+((s=c)&l^p&(s^l))+(s>>>2^s>>>13^s>>>22^s<<30^s<<19^s<<10)|0;i[0]=i[0]+c|0,i[1]=i[1]+s|0,i[2]=i[2]+l|0,i[3]=i[3]+p|0,i[4]=i[4]+u|0,i[5]=i[5]+f|0,i[6]=i[6]+y|0,i[7]=i[7]+h|0}};var Cr={base64URLEncode:function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}};class Dr{constructor(t,e){this.options={namespace:t.transaction.namespace+e},this.storage=new Ur(this.options)}set(t,e){this.storage.setItem(this.options.namespace+t,e,{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}class Tr{constructor(t){this.persister=new Dr(t,"redirect_uri_params")}persist(t){const e=new URL(t.redirect_uri),r=jr(e.search.substring(1)),o=jr(e.hash.substring(1));this.persister.set(t.state,{query_params:r,hash_params:o}),t.redirect_uri=e.origin+e.pathname}retrieve(t){var e,r;const o=this.persister.get(t,!1);if(!o)return;const n={...null!==(e=o.query_params)&&void 0!==e?e:{},...jr(window.location.search.substring(1))},i={...null!==(r=o.hash_params)&&void 0!==r?r:{},...jr(window.location.hash.substring(1))};let a=window.location.origin+window.location.pathname;n&&(a+="?"+Or(n)),i&&(a+="#"+Or(i)),window.history.replaceState({},document.title,a)}}
11
- /** @fileOverview
14
+ */function Ce(){}
15
+ /*! js-cookie v3.0.5 | MIT */
16
+ function Le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}Ce.prototype.getItem=function(){return null},Ce.prototype.removeItem=function(){},Ce.prototype.setItem=function(){};var Te=function t(e,r){function n(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=Le({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in o)o[a]&&(i+="; "+a,!0!==o[a]&&(i+="="+o[a].split(";")[0]));return document.cookie=t+"="+e.write(n,t)+i}}return Object.create({set:n,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(n[c]=e.read(a,c),t===c)break}catch(t){}}return t?n[t]:n}},remove:function(t,e){n(t,"",Le({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Le({},this.attributes,e))},withConverter:function(e){return t(Le({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});
17
+ /**
18
+ * @file
12
19
  * @author Auth0 https://github.com/auth0/auth0.js
13
20
  * @license MIT
14
- */function Br(t,e,r){let o="";for(let n=0;n<t;n++){const t=Math.floor(Math.random()*r);o+=e.charAt(t)}return o}var Lr={string:function(t){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",r=window.crypto||window.msCrypto;if(!(r&&"function"==typeof r.getRandomValues))return Br(t,e,65);const o=65*Math.floor(256/65);if(0===o)return Br(t,e,65);const n=[];for(;n.length<t;){const i=t-n.length,a=new Uint8Array(i);r.getRandomValues(a);for(let r=0;r<a.length&&n.length<t;r++){const t=a[r];t>=o||n.push(e.charAt(t%65))}}return n.join("")}};return class{constructor(t={}){if(null==t.client_id)throw new Error("client id not provided");this.options=Object.assign({},{organization_id:"",prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}},t),this.transaction=new Nr(this.options),this.redirectUriParamsPersister=new Tr(this.options)}iframe(t={}){const e=Object.assign({},this.options,t);return new kr(this,e)}popup(t={}){const e=Object.assign({},this.options,t);return new i(this,e)}redirect(t={}){const e=Object.assign({},this.options,t);return new xr(this,e)}authorizeURL(t={},e=""){const r=Object.assign({},this.options,t);r.state||(r.state=Lr.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);const o=Pr(r,["client_id","organization_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(o,r.tracking),null===o.scope&&delete o.scope,null!=e&&(o.flow=e),r.email_hint&&(o.email=r.email_hint);let n=r.server_url;if("manual"===r.popup_flow&&(n+="/signin"),r.path&&(n+=r.path),"code"===r.response_type&&r.pkce.enabled){const t=r.pkce.code_verifier||Lr.string(r.pkce.code_verifier_length);if("S256"===r.pkce.code_challange_method){const e=Fr.hash.sha256.hash(t);Object.assign(o,{code_verifier:t,code_challenge:Cr.base64URLEncode(e),code_challenge_method:r.pkce.code_challange_method})}else Object.assign(o,{code_verifier:t,code_challenge:t,code_challenge_method:r.pkce.code_challange_method})}return this.transaction.generate(o),this.redirectUriParamsPersister.persist(o),delete o.code_verifier,n+"?"+Or(o)}verify(t){const e=this.transaction.get(t.state);return t.state&&this.options.verify_state&&e.state!=t.state?null:e}}}));
21
+ */function Be(){}
22
+ /**
23
+ * @file
24
+ * @author Auth0 https://github.com/auth0/auth0.js
25
+ * @license MIT
26
+ */
27
+ function ze(t){if(this.storage=new Be,!0===t.force_local_storage)try{const t=window.localStorage;t&&(this.storage=t)}catch(t){console.warn(t),console.warn("Cant use localStorage. Using CookieStorage instead.")}}
28
+ /**
29
+ * @file
30
+ * @author Auth0 https://github.com/auth0/auth0.js
31
+ * @license MIT
32
+ */
33
+ function We(t){this.handler=new ze(t)}Be.prototype.getItem=function(t){return Te.get(t)},Be.prototype.removeItem=function(t){Te.remove(t)},Be.prototype.setItem=function(t,e,r){const n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);Te.set(t,e,n)},ze.prototype.failover=function(){this.storage instanceof Ce?console.warn("DummyStorage: ignore failover"):this.storage instanceof Be?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new Ce):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new Be)},ze.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return console.warn(e),this.failover(),this.getItem(t)}},ze.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return console.warn(e),this.failover(),this.removeItem(t)}},ze.prototype.setItem=function(t,e,r){try{return this.storage.setItem(t,e,r)}catch(n){return console.warn(n),this.failover(),this.setItem(t,e,r)}},We.prototype.getItem=function(t){const e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},We.prototype.removeItem=function(t){return this.handler.removeItem(t)},We.prototype.setItem=function(t,e,r){const n=JSON.stringify(e);return this.handler.setItem(t,n,r)};class Ke{constructor(t){this.options=t.transaction,this.storage=new We(this.options)}generate(t){this.storage.setItem(this.options.namespace+t.state,{state:t.state,code_verifier:t.code_verifier},{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}var qe={hash:{},codec:{},exception:{invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t}}};qe.bitArray={bitSlice:function(t,e,r){return t=qe.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:qe.bitArray.clamp(t,r-e)},extract:function(t,e,r){var n=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-n^t[e/32+1|0]>>>n:t[e/32|0]>>>n)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],n=qe.bitArray.getPartial(r);return 32===n?t.concat(e):qe.bitArray._shiftRight(e,n,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e,r=t.length;return 0===r?0:(e=t[r-1],32*(r-1)+qe.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=qe.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(qe.bitArray.bitLength(t)!==qe.bitArray.bitLength(e))return!1;var r,n=0;for(r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n},_shiftRight:function(t,e,r,n){var o,i,a;for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;return i=t.length?t[t.length-1]:0,a=qe.bitArray.getPartial(i),n.push(qe.bitArray.partial(e+a&31,e+a>32?r:n.pop(),1)),n},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return t}},qe.codec.utf8String={fromBits:function(t){var e,r,n="",o=qe.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(r=t[e/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(qe.bitArray.partial(8*(3&e),n)),r}},qe.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},qe.hash.sha256.hash=function(t){return(new qe.hash.sha256).update(t).finalize()},qe.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=qe.codec.utf8String.toBits(t));var e,r=this._buffer=qe.bitArray.concat(this._buffer,t),n=this._length,o=this._length=n+qe.bitArray.bitLength(t);if(o>9007199254740991)throw new qe.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var i=new Uint32Array(r),a=0;for(e=512+n-(512+n&511);e<=o;e+=512)this._block(i.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(e=512+n-(512+n&511);e<=o;e+=512)this._block(r.splice(0,16));return this},finalize:function(){var t,e=this._buffer,r=this._h;for(t=(e=qe.bitArray.concat(e,[qe.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var t,e,r=0,n=2;function o(t){return 4294967296*(t-Math.floor(t))|0}for(;r<64;n++){for(e=!0,t=2;t*t<=n;t++)if(n%t==0){e=!1;break}e&&(r<8&&(this._init[r]=o(Math.pow(n,.5))),this._key[r]=o(Math.pow(n,1/3)),r++)}},_block:function(t){var e,r,n,o,i=this._h,a=this._key,c=i[0],s=i[1],u=i[2],l=i[3],p=i[4],f=i[5],y=i[6],d=i[7];for(e=0;e<64;e++)e<16?r=t[e]:(n=t[e+1&15],o=t[e+14&15],r=t[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+t[15&e]+t[e+9&15]|0),r=r+d+(p>>>6^p>>>11^p>>>25^p<<26^p<<21^p<<7)+(y^p&(f^y))+a[e],d=y,y=f,f=p,p=l+r|0,l=u,u=s,c=r+((s=c)&u^l&(s^u))+(s>>>2^s>>>13^s>>>22^s<<30^s<<19^s<<10)|0;i[0]=i[0]+c|0,i[1]=i[1]+s|0,i[2]=i[2]+u|0,i[3]=i[3]+l|0,i[4]=i[4]+p|0,i[5]=i[5]+f|0,i[6]=i[6]+y|0,i[7]=i[7]+d|0}};var $e={base64URLEncode:function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}};function Ge(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}
34
+ /**
35
+ * @file
36
+ * @author Auth0 https://github.com/auth0/auth0.js
37
+ * @license MIT
38
+ */(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function He(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ve(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?He(Object(r),!0).forEach((function(e){Ge(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):He(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}class Qe{constructor(t,e){this.options={namespace:t.transaction.namespace+e},this.storage=new We(this.options)}set(t,e){this.storage.setItem(this.options.namespace+t,e,{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}class Je{constructor(t){this.persister=new Qe(t,"redirect_uri_params")}persist(t){const e=new URL(t.redirect_uri),r=Me.parse(e.search.substring(1)),n=Me.parse(e.hash.substring(1));this.persister.set(t.state,{query_params:r,hash_params:n}),t.redirect_uri=e.origin+e.pathname}retrieve(t){var e,r;const n=this.persister.get(t,!1);if(!n)return;const o=Ve(Ve({},null!==(e=n.query_params)&&void 0!==e?e:{}),Me.parse(window.location.search.substring(1))),i=Ve(Ve({},null!==(r=n.hash_params)&&void 0!==r?r:{}),Me.parse(window.location.hash.substring(1)));let a=window.location.origin+window.location.pathname;o&&(a+="?"+Me.stringify(o)),i&&(a+="#"+Me.stringify(i)),window.history.replaceState({},document.title,a)}}
39
+ /**
40
+ * @file
41
+ * @author Auth0 https://github.com/auth0/auth0.js
42
+ * @license MIT
43
+ */function Ye(t,e,r){let n="";for(let o=0;o<t;o++){const t=Math.floor(Math.random()*r);n+=e.charAt(t)}return n}var Xe={string:function(t){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",r=window.crypto||window.msCrypto;if(!(r&&"function"==typeof r.getRandomValues))return Ye(t,e,65);const n=65*Math.floor(256/65);if(0===n)return Ye(t,e,65);const o=[];for(;o.length<t;){const i=t-o.length,a=new Uint8Array(i);r.getRandomValues(a);for(let r=0;r<a.length&&o.length<t;r++){const t=a[r];t>=n||o.push(e.charAt(t%65))}}return o.join("")}};return class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==t.client_id)throw new Error("client id not provided");this.options=Object.assign({},{organization_id:"",prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}},t),this.transaction=new Ke(this.options),this.redirectUriParamsPersister=new Je(this.options)}iframe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Ne(this,e)}popup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new n(this,e)}redirect(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Ue(this,e)}authorizeURL(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object.assign({},this.options,t);r.state||(r.state=Xe.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);const n=Fe(r,["client_id","organization_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(n,r.tracking),null===n.scope&&delete n.scope,null!=e&&(n.flow=e),r.email_hint&&(n.email=r.email_hint);let o=r.server_url;if("manual"===r.popup_flow&&(o+="/signin"),r.path&&(o+=r.path),"code"===r.response_type&&r.pkce.enabled){const t=r.pkce.code_verifier||Xe.string(r.pkce.code_verifier_length);switch(r.pkce.code_challange_method){case"S256":{const e=qe.hash.sha256.hash(t);Object.assign(n,{code_verifier:t,code_challenge:$e.base64URLEncode(e),code_challenge_method:r.pkce.code_challange_method});break}default:Object.assign(n,{code_verifier:t,code_challenge:t,code_challenge_method:r.pkce.code_challange_method})}}return this.transaction.generate(n),this.redirectUriParamsPersister.persist(n),delete n.code_verifier,o+"?"+Me.stringify(n)}verify(t){const e=this.transaction.get(t.state);return t.state&&this.options.verify_state&&e.state!=t.state?null:e}}}));
15
44
  //# sourceMappingURL=accounts-sdk.min.js.map