UNPKG

auth0-js

Version:

Auth0 headless browser sdk

10 lines (8 loc) 48.7 kB
/** * auth0-js v10.2.0 * Author: Auth0 * Date: 2026-06-25 * License: MIT */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).CordovaAuth0Plugin=e()}(this,function(){"use strict";var t,e,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){var r=!1;try{r=this instanceof t}catch (e) {}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),r}var i=n(e?t:(e=1,t={raw:"10.2.0"}));function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var u=Object.prototype.toString;function c(t,e,r,n){if(r="array"===r?"object":r,t&&a(t[e])!==r)throw new Error(n)}function l(t,e,r){if(a(t)!==e)throw new Error(r)}function p(t,e,r){if(-1===e.indexOf(t))throw new Error(r)}var f={check:function(t,e,r){if(e.optional&&!t||l(t,e.type,e.message),"object"===e.type&&r)for(var n=Object.keys(r),o=0;o<n.length;o++){var i=n[o];r[i].optional&&!t[i]||r[i].condition&&!r[i].condition(t)||(c(t,i,r[i].type,r[i].message),r[i].values&&p(t[i],r[i].values,r[i].value_message))}},attribute:c,variable:l,value:p,isArray:function(t){return this.supportsIsArray()?Array.isArray(t):"[object Array]"===u.call(t)},supportsIsArray:function(){return null!=Array.isArray}};function y(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var o=Object.keys(Object(n)),i=0,a=o.length;i<a;i++){var u=o[i],c=Object.getOwnPropertyDescriptor(n,u);void 0!==c&&c.enumerable&&(e[u]=n[u])}}return e}var s={get:function(){return Object.assign?Object.assign:y},objectAssignPolyfill:y};function d(t,e){return e.reduce(function(e,r){return t[r]&&(e[r]=t[r]),e},{})}function h(){var t=function(t){var e=[];for(var r in t)e.push(t[r]);return e}(arguments);return t.unshift({}),s.get().apply(void 0,t)}function g(t){var e=t.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return e&&{href:t,protocol:e[1],host:e[2],hostname:e[3],port:e[4],pathname:e[5],search:e[6],hash:e[7]}}function m(t,e){var r=h(t);return t[e]&&(r[e]=t[e].trim()),r}var b={toSnakeCase:function t(e,r){return"object"!==a(e)||f.isArray(e)||null===e?e:(r=r||[],Object.keys(e).reduce(function(n,o){return n[-1===r.indexOf(o)?function(t){for(var e,r="",n=0,o=!0,i=!0;n<t.length;)e=t.charCodeAt(n),!i&&e>=65&&e<=90||!o&&e>=48&&e<=57?(r+="_",r+=t[n].toLowerCase()):r+=t[n].toLowerCase(),o=e>=48&&e<=57,i=e>=65&&e<=90,n++;return r}(o):o]=t(e[o]),n},{}))},toCamelCase:function t(e,r,n){return"object"!==a(e)||f.isArray(e)||null===e?e:(r=r||[],n=n||{},Object.keys(e).reduce(function(o,i){var a,u=-1===r.indexOf(i)?(a=i.split("_")).reduce(function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},a.shift()):i;return o[u]=t(e[u]||e[i],[],n),n.keepOriginal&&(o[i]=t(e[i],[],n)),o},{}))},blacklist:function(t,e){return Object.keys(t).reduce(function(r,n){return-1===e.indexOf(n)&&(r[n]=t[n]),r},{})},merge:function(t,e){return{base:e?d(t,e):t,with:function(t,e){return t=e?d(t,e):t,h(this.base,t)}}},pick:d,getKeysNotIn:function(t,e){var r=[];for(var n in t)-1===e.indexOf(n)&&r.push(n);return r},extend:h,getOriginFromUrl:function(t){if(t){var e=g(t);if(!e)return null;var r=e.protocol+"//"+e.hostname;return e.port&&(r+=":"+e.port),r}},getLocationFromUrl:g,trimUserDetails:function(t){return function(t,e){return e.reduce(m,t)}(t,["username","email","phoneNumber"])},updatePropertyOn:function t(e,r,n){"string"==typeof r&&(r=r.split("."));var o=r[0];e.hasOwnProperty(o)&&(1===r.length?e[o]=n:t(e[o],r.slice(1),n))}};function v(){return window}var w,O={redirect:function(t){v().location=t},getDocument:function(){return v().document},getWindow:v,getOrigin:function(){var t=v().location,e=t.origin;return e||(e=b.getOriginFromUrl(t.href)),e}},S={exports:{}},A=S.exports;var j,E,_=(w||(w=1,function(t){var e,r;e=A,r=function(){return function(){return function(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<t.length;n++){var o=t[n];if("string"!=typeof o)throw new TypeError("Url must be a string. Received "+o);""!==o&&(n>0&&(o=o.replace(/^[\/]+/,"")),o=n<t.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),e.push(o))}var i=e.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=r():e.urljoin=r()}(S)),S.exports),P=n(_);function x(){return E?j:(E=1,j=TypeError)}var I,k,R,D,M,F,L,N,T,U,C,W,B,H,$,K,G,z,q,V,Q,J,X,Y,Z,tt,et,rt,nt,ot,it,at,ut,ct,lt,pt,ft,yt,st,dt,ht,gt,mt,bt,vt,wt,Ot,St,At,jt,Et,_t,Pt,xt,It,kt,Rt,Dt,Mt,Ft,Lt,Nt,Tt,Ut,Ct,Wt,Bt,Ht,$t,Kt,Gt,zt,qt,Vt,Qt,Jt,Xt,Yt,Zt,te,ee,re,ne,oe,ie,ae,ue,ce,le=o(Object.freeze({__proto__:null,default:{}}));function pe(){if(k)return I;k=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=t&&e&&"function"==typeof e.get?e.get:null,o=t&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&a&&"function"==typeof a.get?a.get:null,c=i&&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,s=Object.prototype.toString,d=Function.prototype.toString,h=String.prototype.match,g=String.prototype.slice,m=String.prototype.replace,b=String.prototype.toUpperCase,v=String.prototype.toLowerCase,w=RegExp.prototype.test,O=Array.prototype.concat,S=Array.prototype.join,A=Array.prototype.slice,j=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,_=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,x="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===x||"symbol")?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function F(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.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=g.call(e,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(e,r,"$&_")}var L=le,N=L.custom,T=G(N)?N:null,U={__proto__:null,double:'"',single:"'"},C={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function W(t,e,r){var n=r.quoteStyle||e,o=U[n];return o+t+o}function B(t){return m.call(String(t),/"/g,"&quot;")}function H(t){return!R||!("object"==typeof t&&(R in t||void 0!==t[R]))}function $(t){return"[object Array]"===V(t)&&H(t)}function K(t){return"[object RegExp]"===V(t)&&H(t)}function G(t){if(x)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}I=function t(e,i,a,s){var b=i||{};if(q(b,"quoteStyle")&&!q(U,b.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(b,"maxStringLength")&&("number"==typeof b.maxStringLength?b.maxStringLength<0&&b.maxStringLength!==1/0:null!==b.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var w=!q(b,"customInspect")||b.customInspect;if("boolean"!=typeof w&&"symbol"!==w)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(b,"indent")&&null!==b.indent&&"\t"!==b.indent&&!(parseInt(b.indent,10)===b.indent&&b.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(b,"numericSeparator")&&"boolean"!=typeof b.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var j=b.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 J(e,b);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return j?F(e,_):_}if("bigint"==typeof e){var I=String(e)+"n";return j?F(e,I):I}var k=void 0===b.depth?5:b.depth;if(void 0===a&&(a=0),a>=k&&k>0&&"object"==typeof e)return $(e)?"[Array]":"[Object]";var N=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=S.call(Array(t.indent+1)," ")}return{base:r,prev:S.call(Array(e+1),r)}}(b,a);if(void 0===s)s=[];else if(Q(s,e)>=0)return"[Circular]";function C(e,r,n){if(r&&(s=A.call(s)).push(r),n){var o={depth:b.depth};return q(b,"quoteStyle")&&(o.quoteStyle=b.quoteStyle),t(e,o,a+1,s)}return t(e,b,a+1,s)}if("function"==typeof e&&!K(e)){var z=function(t){if(t.name)return t.name;var e=h.call(d.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),X=rt(e,C);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(X.length>0?" { "+S.call(X,", ")+" }":"")}if(G(e)){var nt=x?m.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(e);return"object"!=typeof e||x?nt:Y(nt)}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 ot="<"+v.call(String(e.nodeName)),it=e.attributes||[],at=0;at<it.length;at++)ot+=" "+it[at].name+"="+W(B(it[at].value),"double",b);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+v.call(String(e.nodeName))+">"}if($(e)){if(0===e.length)return"[]";var ut=rt(e,C);return N&&!function(t){for(var e=0;e<t.length;e++)if(Q(t[e],"\n")>=0)return!1;return!0}(ut)?"["+et(ut,N)+"]":"[ "+S.call(ut,", ")+" ]"}if(function(t){return"[object Error]"===V(t)&&H(t)}(e)){var ct=rt(e,C);return"cause"in Error.prototype||!("cause"in e)||D.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+S.call(ct,", ")+" }":"{ ["+String(e)+"] "+S.call(O.call("[cause]: "+C(e.cause),ct),", ")+" }"}if("object"==typeof e&&w){if(T&&"function"==typeof e[T]&&L)return L(e,{depth:k-a});if("symbol"!==w&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!n||!t||"object"!=typeof t)return!1;try{n.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var lt=[];return o&&o.call(e,function(t,r){lt.push(C(r,e,!0)+" => "+C(t,e))}),tt("Map",n.call(e),lt,N)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{n.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var pt=[];return c&&c.call(e,function(t){pt.push(C(t,e))}),tt("Set",u.call(e),pt,N)}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 Z("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 Z("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return Z("WeakRef");if(function(t){return"[object Number]"===V(t)&&H(t)}(e))return Y(C(Number(e)));if(function(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return Y(C(E.call(e)));if(function(t){return"[object Boolean]"===V(t)&&H(t)}(e))return Y(y.call(e));if(function(t){return"[object String]"===V(t)&&H(t)}(e))return Y(C(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==r&&e===r)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===V(t)&&H(t)}(e)&&!K(e)){var ft=rt(e,C),yt=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,st=e instanceof Object?"":"null prototype",dt=!yt&&R&&Object(e)===e&&R in e?g.call(V(e),8,-1):st?"Object":"",ht=(yt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||st?"["+S.call(O.call([],dt||[],st||[]),": ")+"] ":"");return 0===ft.length?ht+"{}":N?ht+"{"+et(ft,N)+"}":ht+"{ "+S.call(ft,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return z.call(t,e)}function V(t){return s.call(t)}function Q(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 J(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return J(g.call(t,0,e.maxStringLength),e)+n}var o=C[e.quoteStyle||"single"];return o.lastIndex=0,W(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(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":"")+b.call(e.toString(16))}function Y(t){return"Object("+t+")"}function Z(t){return t+" { ? }"}function tt(t,e,r,n){return t+" ("+e+") {"+(n?et(r,n):S.call(r,", "))+"}"}function et(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+S.call(t,","+r)+"\n"+e.prev}function rt(t,e){var r=$(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=q(t,o)?e(t[o],t):""}var i,a="function"==typeof _?_(t):[];if(x){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in t)q(t,c)&&(r&&String(Number(c))===c&&c<t.length||x&&i["$"+c]instanceof Symbol||(w.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof _)for(var l=0;l<a.length;l++)D.call(t,a[l])&&n.push("["+e(a[l])+"]: "+e(t[a[l]],t));return n}return I}function fe(){if(D)return R;D=1;var t=pe(),e=x(),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 R=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},R}function ye(){return F?M:(F=1,M=Object)}function se(){return N?L:(N=1,L=Error)}function de(){return U?T:(U=1,T=EvalError)}function he(){return W?C:(W=1,C=RangeError)}function ge(){return H?B:(H=1,B=ReferenceError)}function me(){return K?$:(K=1,$=SyntaxError)}function be(){return z?G:(z=1,G=URIError)}function ve(){return V?q:(V=1,q=Math.abs)}function we(){return J?Q:(J=1,Q=Math.floor)}function Oe(){return Y?X:(Y=1,X=Math.max)}function Se(){return tt?Z:(tt=1,Z=Math.min)}function Ae(){return rt?et:(rt=1,et=Math.pow)}function je(){return ot?nt:(ot=1,nt=Math.round)}function Ee(){return at?it:(at=1,it=Number.isNaN||function(t){return t!=t})}function _e(){if(ct)return ut;ct=1;var t=Ee();return ut=function(e){return t(e)||0===e?e:e<0?-1:1}}function Pe(){return pt?lt:(pt=1,lt=Object.getOwnPropertyDescriptor)}function xe(){if(yt)return ft;yt=1;var t=Pe();if(t)try{t([],"length")}catch(e){t=null}return ft=t}function Ie(){if(dt)return st;dt=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return st=t}function ke(){if(bt)return mt;bt=1;var t="undefined"!=typeof Symbol&&Symbol,e=gt?ht:(gt=1,ht=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 mt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function Re(){return wt?vt:(wt=1,vt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function De(){return St?Ot:(St=1,Ot=ye().getPrototypeOf||null)}function Me(){if(jt)return At;jt=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 At=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),u=e(0,o.length-a.length),c=[],l=0;l<u;l++)c[l]="$"+l;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}(c,",")+"){ 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 p=function(){};p.prototype=o.prototype,i.prototype=new p,p.prototype=null}return i},At}function Fe(){if(_t)return Et;_t=1;var t=Me();return Et=Function.prototype.bind||t}function Le(){return xt?Pt:(xt=1,Pt=Function.prototype.call)}function Ne(){return kt?It:(kt=1,It=Function.prototype.apply)}function Te(){if(Ft)return Mt;Ft=1;var t=Fe(),e=Ne(),r=Le(),n=Dt?Rt:(Dt=1,Rt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Mt=n||t.call(r,e)}function Ue(){if(Nt)return Lt;Nt=1;var t=Fe(),e=x(),r=Le(),n=Te();return Lt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function Ce(){if(Ut)return Tt;Ut=1;var t,e=Ue(),r=xe();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 Tt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))},Tt}function We(){if(Wt)return Ct;Wt=1;var t=Re(),e=De(),r=Ce();return Ct=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 Be(){if(Ht)return Bt;Ht=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Fe();return Bt=r.call(t,e)}function He(){if(Kt)return $t;var t;Kt=1;var e=ye(),r=se(),n=de(),o=he(),i=ge(),a=me(),u=x(),c=be(),l=ve(),p=we(),f=Oe(),y=Se(),s=Ae(),d=je(),h=_e(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=xe(),v=Ie(),w=function(){throw new u},O=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,S=ke()(),A=We(),j=De(),E=Re(),_=Ne(),P=Le(),I={},k="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,R={__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%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%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%":I,"%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%":O,"%TypedArray%":k,"%TypeError%":u,"%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%":c,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":_,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":j,"%Math.abs%":l,"%Math.floor%":p,"%Math.max%":f,"%Math.min%":y,"%Math.pow%":s,"%Math.round%":d,"%Math.sign%":h,"%Reflect.getPrototypeOf%":E};if(A)try{null.error}catch(t){var D=A(A(t));R["%Error.prototype%"]=D}var M=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 R[e]=r,r},F={__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"]},L=Fe(),N=Be(),T=L.call(P,Array.prototype.concat),U=L.call(_,Array.prototype.splice),C=L.call(P,String.prototype.replace),W=L.call(P,String.prototype.slice),B=L.call(P,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,K=function(t,e){var r,n=t;if(N(F,n)&&(n="%"+(r=F[n])[0]+"%"),N(R,n)){var o=R[n];if(o===I&&(o=M(n)),void 0===o&&!e)throw new u("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 $t=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"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=W(t,0,1),r=W(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 C(t,H,function(t,e,r,o){n[n.length]=r?C(o,$,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=K("%"+n+"%",e),i=o.name,c=o.value,l=!1,p=o.alias;p&&(n=p[0],U(r,T([0,1],p)));for(var f=1,y=!0;f<r.length;f+=1){var s=r[f],d=W(s,0,1),h=W(s,-1);if(('"'===d||"'"===d||"`"===d||'"'===h||"'"===h||"`"===h)&&d!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==s&&y||(l=!0),N(R,i="%"+(n+="."+s)+"%"))c=R[i];else if(null!=c){if(!(s in c)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&f+1>=r.length){var g=b(c,s);c=(y=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[s]}else y=N(c,s),c=c[s];y&&!l&&(R[i]=c)}}return c},$t}function $e(){if(zt)return Gt;zt=1;var t=He(),e=Ue(),r=e([t("%String.prototype.indexOf%")]);return Gt=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Ke(){if(Vt)return qt;Vt=1;var t=He(),e=$e(),r=pe(),n=x(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),u=e("Map.prototype.has",!0),c=e("Map.prototype.delete",!0),l=e("Map.prototype.size",!0);return qt=!!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=c(t,e);return 0===l(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&u(t,e)},set:function(e,r){t||(t=new o),a(t,e,r)}};return e},qt}function Ge(){if(Yt)return Xt;Yt=1;var t=x(),e=pe(),r=fe(),n=Ke(),o=function(){if(Jt)return Qt;Jt=1;var t=He(),e=$e(),r=pe(),n=Ke(),o=x(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),u=e("WeakMap.prototype.set",!0),c=e("WeakMap.prototype.has",!0),l=e("WeakMap.prototype.delete",!0);return Qt=i?function(){var t,e,p={assert:function(t){if(!p.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 l(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?c(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),u(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return p}:n,Qt}(),i=o||n||r;return Xt=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},Xt}function ze(){if(te)return Zt;te=1;var t=String.prototype.replace,e=/%20/g,r="RFC3986";return Zt={default:r,formatters:{RFC1738:function(r){return t.call(r,e,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r},Zt}function qe(){if(re)return ee;re=1;var t=ze(),e=Ge(),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)},u=function(t){return o.get(t)},c=function(t,e){o.set(t,e)},l=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),p=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},f=1024;return ee={arrayToObject:p,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=u(t)+1;return t[o]=e,c(t,o),t}var l=[].concat(t,e);return l.length>r?i(p(l,{plainObjects:n}),l.length-1):l},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],u=Object.keys(a),c=0;c<u.length;++c){var l=u[c],p=a[l];"object"==typeof p&&null!==p&&-1===r.indexOf(p)&&(e[e.length]={obj:a,prop:l},r[r.length]=p)}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[o.length]=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 u="",c=0;c<a.length;c+=f){for(var p=a.length>=f?a.slice(c,c+f):a,y=[],s=0;s<p.length;++s){var d=p.charCodeAt(s);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)?y[y.length]=p.charAt(s):d<128?y[y.length]=l[d]:d<2048?y[y.length]=l[192|d>>6]+l[128|63&d]:d<55296||d>=57344?y[y.length]=l[224|d>>12]+l[128|d>>6&63]+l[128|63&d]:(s+=1,d=65536+((1023&d)<<10|1023&p.charCodeAt(s)),y[y.length]=l[240|d>>18]+l[128|d>>12&63]+l[128|d>>6&63]+l[128|63&d])}u+=y.join("")}return u},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)},markOverflow:i,maybeMap:function(t,e){if(n(t)){for(var r=[],o=0;o<t.length;o+=1)r[r.length]=e(t[o]);return r}return e(t)},merge:function t(e,o,l){if(!o)return e;if("object"!=typeof o&&"function"!=typeof o){if(n(e)){var f=e.length;if(l&&"number"==typeof l.arrayLimit&&f>l.arrayLimit)return i(p(e.concat(o),l),f);e[f]=o}else{if(!e||"object"!=typeof e)return[e,o];if(a(e)){var y=u(e)+1;e[y]=o,c(e,y)}else{if(l&&l.strictMerge)return[e,o];(l&&(l.plainObjects||l.allowPrototypes)||!r.call(Object.prototype,o))&&(e[o]=!0)}}return e}if(!e||"object"!=typeof e){if(a(o)){for(var s=Object.keys(o),d=l&&l.plainObjects?{__proto__:null,0:e}:{0:e},h=0;h<s.length;h++){d[parseInt(s[h],10)+1]=o[s[h]]}return i(d,u(o)+1)}var g=[e].concat(o);return l&&"number"==typeof l.arrayLimit&&g.length>l.arrayLimit?i(p(g,l),g.length-1):g}var m=e;return n(e)&&!n(o)&&(m=p(e,l)),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,l):e[e.length]=n}else e[o]=n}),e):Object.keys(o).reduce(function(e,n){var p=o[n];if(r.call(e,n)?e[n]=t(e[n],p,l):e[n]=p,a(o)&&!a(e)&&i(e,u(o)),a(e)){var f=parseInt(n,10);String(f)===n&&f>=0&&f>u(e)&&c(e,f)}return e},m)}},ee}function Ve(){if(oe)return ne;oe=1;var t=Ge(),e=qe(),r=ze(),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,u=function(t,e){a.apply(t,i(e)?e:[e])},c=Date.prototype.toISOString,l=r.default,p={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:l,formatter:r.formatters[l],indices:!1,serializeDate:function(t){return c.call(t)},skipNulls:!1,strictNullHandling:!1},f={},y=function r(n,o,a,c,l,y,s,d,h,g,m,b,v,w,O,S,A,j){for(var E,_=n,P=j,x=0,I=!1;void 0!==(P=P.get(f))&&!I;){var k=P.get(n);if(x+=1,void 0!==k){if(k===x)throw new RangeError("Cyclic object value");I=!0}void 0===P.get(f)&&(x=0)}if("function"==typeof g?_=g(o,_):_ instanceof Date?_=v(_):"comma"===a&&i(_)&&(_=e.maybeMap(_,function(t){return t instanceof Date?v(t):t})),null===_){if(y)return O(h&&!S?h(o,p.encoder,A,"key",w):o);_=""}if("string"==typeof(E=_)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||e.isBuffer(_))return h?[O(S?o:h(o,p.encoder,A,"key",w))+"="+O(h(_,p.encoder,A,"value",w))]:[O(o)+"="+O(String(_))];var R,D=[];if(void 0===_)return D;if("comma"===a&&i(_))S&&h&&(_=e.maybeMap(_,function(t){return null==t?t:h(t)})),R=[{value:_.length>0?_.join(",")||null:void 0}];else if(i(g))R=g;else{var M=Object.keys(_);R=m?M.sort(m):M}var F=d?String(o).replace(/\./g,"%2E"):String(o),L=c&&i(_)&&1===_.length?F+"[]":F;if(l&&i(_)&&0===_.length)return L+"[]";for(var N=0;N<R.length;++N){var T=R[N],U="object"==typeof T&&T&&void 0!==T.value?T.value:_[T];if(!s||null!==U){var C=b&&d?String(T).replace(/\./g,"%2E"):String(T),W=i(_)?"function"==typeof a?a(L,C):L:L+(b?"."+C:"["+C+"]");j.set(n,x);var B=t();B.set(f,j),u(D,r(U,W,a,c,l,y,s,d,"comma"===a&&S&&i(_)?null:h,g,m,b,v,w,O,S,A,B))}}return D};return ne=function(e,a){var c,l=e,f=function(t){if(!t)return p;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||p.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 u,c=r.formatters[a],l=p.filter;if(("function"==typeof t.filter||i(t.filter))&&(l=t.filter),u=t.arrayFormat in o?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=void 0===t.allowDots?!0===t.encodeDotInKeys||p.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:f,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:u,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:l,format:a,formatter:c,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(a);"function"==typeof f.filter?l=(0,f.filter)("",l):i(f.filter)&&(c=f.filter);var s=[];if("object"!=typeof l||null===l)return"";var d=o[f.arrayFormat],h="comma"===d&&f.commaRoundTrip;c||(c=Object.keys(l)),f.sort&&c.sort(f.sort);for(var g=t(),m=0;m<c.length;++m){var b=c[m];if(null!=b){var v=l[b];f.skipNulls&&null===v||u(s,y(v,b,d,h,f.allowEmptyArrays,f.strictNullHandling,f.skipNulls,f.encodeDotInKeys,f.encode?f.encoder:null,f.filter,f.sort,f.allowDots,f.serializeDate,f.format,f.formatter,f.encodeValuesOnly,f.charset,g))}}var w=s.join(f.delimiter),O=!0===f.addQueryPrefix?"?":"";return f.charsetSentinel&&("iso-8859-1"===f.charset?O+="utf8=%26%2310003%3B"+f.delimiter:O+="utf8=%E2%9C%93"+f.delimiter),w.length>0?O+w:""},ne}function Qe(){if(ae)return ie;ae=1;var t=qe(),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,strictMerge:!0,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 u=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=[],i=n.indexOf("["),a=i>=0?n.slice(0,i):n;if(a){if(!r.plainObjects&&e.call(Object.prototype,a)&&!r.allowPrototypes)return;o[o.length]=a}for(var u=n.length,c=i,l=0;c>=0&&l<r.depth;){for(var p=1,f=c+1,y=-1;f<u&&y<0;){var s=n.charCodeAt(f);91===s?p+=1:93===s&&0==(p-=1)&&(y=f),f+=1}if(y<0)return o[o.length]="["+n.slice(c)+"]",o;var d=n.slice(c,y+1),h=d.slice(1,-1);if(!r.plainObjects&&e.call(Object.prototype,h)&&!r.allowPrototypes)return;o[o.length]=d,l+=1,c=n.indexOf("[",y+1)}if(c>=0){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");o[o.length]="["+n.slice(c)+"]"}return o}(r,o);if(u)return function(e,r,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var u=e.slice(0,-1).join("");a=Array.isArray(r)&&r[u]?r[u].length:0}for(var c=o?r:i(r,n,a),l=e.length-1;l>=0;--l){var p,f=e[l];if("[]"===f&&n.parseArrays)p=t.isOverflow(c)?c:n.allowEmptyArrays&&(""===c||n.strictNullHandling&&null===c)?[]:t.combine([],c,n.arrayLimit,n.plainObjects);else{p=n.plainObjects?{__proto__:null}:{};var y="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,s=n.decodeDotInKeys?y.replace(/%2E/g,"."):y,d=parseInt(s,10),h=!isNaN(d)&&f!==s&&String(d)===s&&d>=0&&n.parseArrays;if(n.parseArrays||""!==s)if(h&&d<n.arrayLimit)(p=[])[d]=c;else{if(h&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");h?(p[d]=c,t.markOverflow(p,d)):"__proto__"!==s&&(p[s]=c)}else p={0:c}}c=p}return c}(u,n,o,a)}};return ie=function(u,c){var l=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,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:n.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(c);if(""===u||null==u)return l.plainObjects?{__proto__:null}:{};for(var p="string"==typeof u?function(a,u){var c={__proto__:null},l=u.ignoreQueryPrefix?a.replace(/^\?/,""):a;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var p=u.parameterLimit===1/0?void 0:u.parameterLimit,f=l.split(u.delimiter,u.throwOnLimitExceeded&&void 0!==p?p+1:p);if(u.throwOnLimitExceeded&&void 0!==p&&f.length>p)throw new RangeError("Parameter limit exceeded. Only "+p+" parameter"+(1===p?"":"s")+" allowed.");var y,s=-1,d=u.charset;if(u.charsetSentinel)for(y=0;y<f.length;++y)0===f[y].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[y]?d="utf-8":"utf8=%26%2310003%3B"===f[y]&&(d="iso-8859-1"),s=y,y=f.length);for(y=0;y<f.length;++y)if(y!==s){var h,g,m=f[y],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;if(-1===v?(h=u.decoder(m,n.decoder,d,"key"),g=u.strictNullHandling?null:""):null!==(h=u.decoder(m.slice(0,v),n.decoder,d,"key"))&&(g=t.maybeMap(i(m.slice(v+1),u,r(c[h])?c[h].length:0),function(t){return u.decoder(t,n.decoder,d,"value")})),g&&u.interpretNumericEntities&&"iso-8859-1"===d&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),u.comma&&r(g)&&g.length>u.arrayLimit){if(u.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+u.arrayLimit+" element"+(1===u.arrayLimit?"":"s")+" allowed in an array.");g=t.combine([],g,u.arrayLimit,u.plainObjects)}if(null!==h){var w=e.call(c,h);w&&("combine"===u.duplicates||m.indexOf("[]=")>-1)?c[h]=t.combine(c[h],g,u.arrayLimit,u.plainObjects):w&&"last"!==u.duplicates||(c[h]=g)}}return c}(u,l):u,f=l.plainObjects?{__proto__:null}:{},y=Object.keys(p),s=0;s<y.length;++s){var d=y[s],h=a(d,p[d],l,"string"==typeof u);f=t.merge(f,h,l)}return!0===l.allowSparse?f:t.compact(f)}}function Je(){if(ce)return ue;ce=1;var t=Ve(),e=Qe();return ue={formats:ze(),parse:e,stringify:t}}var Xe=n(Je());function Ye(t){this.webAuth=t,this._current_popup=null,this.options=null}function Ze(t){this.webAuth=t}function tr(){this.webAuth=null,this.version=i.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return Ye.prototype.preload=function(t){var e=this,r=O.getWindow(),n=t.url||"about:blank",o=t.popupOptions||{};o.location="yes",delete o.width,delete o.height;var i=Xe.stringify(o,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=r.open(n,"_blank",i),this._current_popup.kill=function(t){e._current_popup.success=t,this.close(),e._current_popup=null}),this._current_popup},Ye.prototype.load=function(t,e,r,n){var o=this;this.url=t,this.options=r,this._current_popup?this._current_popup.location.href=t:(r.url=t,this.preload(r)),this.transientErrorHandler=function(t){o.errorHandler(t,n)},this.transientStartHandler=function(t){o.startHandler(t,n)},this.transientExitHandler=function(){o.exitHandler(n)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},Ye.prototype.errorHandler=function(t,e){this._current_popup&&(this._current_popup.kill(!0),e({error:"window_error",errorDescription:t.message}))},Ye.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},Ye.prototype.exitHandler=function(t){this._current_popup&&(this.unhook(),this._current_popup.success||t({error:"window_closed",errorDescription:"Browser window closed"}))},Ye.prototype.startHandler=function(t,e){var r=this;if(this._current_popup){var n=P("https:",this.webAuth.baseOptions.domain,"/mobile");if(!t.url||0===t.url.indexOf(n+"#")){var o=t.url.split("#");if(1!==o.length){var i={hash:o.pop()};this.options.nonce&&(i.nonce=this.options.nonce),this.webAuth.parseHash(i,function(t,n){(t||n)&&(r._current_popup.kill(!0),e(t,n))})}}}},Ze.prototype.processParams=function(t){return t.redirectUri=P("https://"+t.domain,"mobile"),delete t.owp,t},Ze.prototype.getPopupHandler=function(){return new Ye(this.webAuth)},tr.prototype.setWebAuth=function(t){this.webAuth=t},tr.prototype.supports=function(t){var e=O.getWindow();return(!!e.cordova||!!e.electron)&&this.extensibilityPoints.indexOf(t)>-1},tr.prototype.init=function(){return new Ze(this.webAuth)},tr}); //# sourceMappingURL=cordova-auth0-plugin.min.js.map