@flarehr/superhero-salpac-profile-admin 1.0.435 → 1.0.461

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{hasBrowserEnv:()=>_t,hasStandardBrowserEnv:()=>mt,hasStandardBrowserWebWorkerEnv:()=>bt});var n,r,o,i,s,a,c,l={},u=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,r){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return _(e,a,o,i,null)}function _(e,t,n,i,s){var a={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=r.vnode&&r.vnode(a),a}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function b(e,t){if(null==t)return e.__?b(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?b(e):null}function g(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return g(e)}}function v(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!w.__r++||s!==r.debounceRendering)&&((s=r.debounceRendering)||a)(w)}function w(){var e,t,n,r,o,s,a,l;for(i.sort(c);e=i.shift();)e.__d&&(t=i.length,r=void 0,o=void 0,a=(s=(n=e).__v).__e,(l=n.__P)&&(r=[],(o=d({},s)).__v=s.__v+1,C(l,s,o,n.__n,void 0!==l.ownerSVGElement,null!=s.__h?[a]:null,r,null==a?b(s):a,s.__h),N(r,s),s.__e!=a&&g(s)),i.length>t&&i.sort(c));w.__r=0}function E(e,t,n,r,o,i,s,a,c,f){var d,p,h,y,g,v,w,E=r&&r.__k||u,k=E.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(y=n.__k[d]=null==(y=t[d])||"boolean"==typeof y||"function"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?_(null,y,null,null,y):Array.isArray(y)?_(m,{children:y},null,null,null):y.__b>0?_(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(h=E[d])||h&&y.key==h.key&&y.type===h.type)E[d]=void 0;else for(p=0;p<k;p++){if((h=E[p])&&y.key==h.key&&y.type===h.type){E[p]=void 0;break}h=null}C(e,y,h=h||l,o,i,s,a,c,f),g=y.__e,(p=y.ref)&&h.ref!=p&&(w||(w=[]),h.ref&&w.push(h.ref,null,y),w.push(p,y.__c||g,y)),null!=g?(null==v&&(v=g),"function"==typeof y.type&&y.__k===h.__k?y.__d=c=O(y,c,e):c=x(e,y,h,E,g,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=e&&(c=b(h))}for(n.__e=v,d=k;d--;)null!=E[d]&&("function"==typeof n.type&&null!=E[d].__e&&E[d].__e==n.__d&&(n.__d=S(r).nextSibling),U(E[d],E[d]));if(w)for(d=0;d<w.length;d++)j(w[d],w[++d],w[++d])}function O(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?O(r,t,n):x(n,r,r,o,r.__e,t));return t}function x(e,t,n,r,o,i){var s,a,c;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(a=i,c=0;(a=a.nextSibling)&&c<r.length;c+=1)if(a==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function S(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=S(n)))return r;return null}function k(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||f.test(t)?n:n+"px"}function A(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||k(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||k(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?T:R,i):e.removeEventListener(t,i?T:R,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function R(e){return this.l[e.type+!1](r.event?r.event(e):e)}function T(e){return this.l[e.type+!0](r.event?r.event(e):e)}function C(e,t,n,o,i,s,a,c,l){var u,f,p,h,_,b,g,v,w,O,x,S,k,A,R,T=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,c=t.__e=n.__e,t.__h=null,s=[c]),(u=r.__b)&&u(t);try{e:if("function"==typeof T){if(v=t.props,w=(u=T.contextType)&&o[u.__c],O=u?w?w.props.value:u.__:o,n.__c?g=(f=t.__c=n.__c).__=f.__E:("prototype"in T&&T.prototype.render?t.__c=f=new T(v,O):(t.__c=f=new y(v,O),f.constructor=T,f.render=F),w&&w.sub(f),f.props=v,f.state||(f.state={}),f.context=O,f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=T.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,T.getDerivedStateFromProps(v,f.__s))),h=f.props,_=f.state,f.__v=t,p)null==T.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==T.getDerivedStateFromProps&&v!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(v,O),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(v,f.__s,O)||t.__v===n.__v){for(t.__v!==n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),f.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(v,f.__s,O),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,_,b)}))}if(f.context=O,f.props=v,f.__P=e,S=r.__r,k=0,"prototype"in T&&T.prototype.render){for(f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do{f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(o=d(d({},o),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(b=f.getSnapshotBeforeUpdate(h,_)),R=null!=u&&u.type===m&&null==u.key?u.props.children:u,E(e,Array.isArray(R)?R:[R],t,n,o,i,s,a,c,l),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=P(n.__e,t,n,o,i,s,a,l);(u=r.diffed)&&u(t)}catch(e){t.__v=null,(l||null!=s)&&(t.__e=c,t.__h=!!l,s[s.indexOf(c)]=null),r.__e(e,t,n)}}function N(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function P(e,t,r,o,i,s,a,c){var u,f,d,h=r.props,_=t.props,m=t.type,y=0;if("svg"===m&&(i=!0),null!=s)for(;y<s.length;y++)if((u=s[y])&&"setAttribute"in u==!!m&&(m?u.localName===m:3===u.nodeType)){e=u,s[y]=null;break}if(null==e){if(null===m)return document.createTextNode(_);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,_.is&&_),s=null,c=!1}if(null===m)h===_||c&&e.data===_||(e.data=_);else{if(s=s&&n.call(e.childNodes),f=(h=r.props||l).dangerouslySetInnerHTML,d=_.dangerouslySetInnerHTML,!c){if(null!=s)for(h={},y=0;y<e.attributes.length;y++)h[e.attributes[y].name]=e.attributes[y].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||A(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||A(e,i,t[i],n[i],r)}(e,_,h,i,c),d)t.__k=[];else if(y=t.props.children,E(e,Array.isArray(y)?y:[y],t,r,o,i&&"foreignObject"!==m,s,a,s?s[0]:r.__k&&b(r,0),c),null!=s)for(y=s.length;y--;)null!=s[y]&&p(s[y]);c||("value"in _&&void 0!==(y=_.value)&&(y!==e.value||"progress"===m&&!y||"option"===m&&y!==h.value)&&A(e,"value",y,h.value,!1),"checked"in _&&void 0!==(y=_.checked)&&y!==e.checked&&A(e,"checked",y,h.checked,!1))}return e}function j(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function U(e,t,n){var o,i;if(r.unmount&&r.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||j(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){r.__e(e,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&U(o[i],t,n||"function"!=typeof e.type);n||null==e.__e||p(e.__e),e.__=e.__e=e.__d=void 0}function F(e,t,n){return this.constructor(e,n)}function L(e,t,o){var i,s,a;r.__&&r.__(e,t),s=(i="function"==typeof o)?null:o&&o.__k||t.__k,a=[],C(t,e=(!i&&o||t).__k=h(m,null,[e]),s||l,l,void 0!==t.ownerSVGElement,!i&&o?[o]:s?null:t.firstChild?n.call(t.childNodes):null,a,!i&&o?o:s?s.__e:t.firstChild,i),N(a,e)}function D(e,t){L(e,t,D)}function B(e,t,r){var o,i,s,a=d({},e.props);for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),_(e.type,a,o||e.key,i||e.ref,null)}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function I(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,["context","children"]);return B(t,n)}function M(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=h(I,H({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},i=0,s=t.attributes,a=t.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[q(s[i].name)]=s[i].value);for(i=a.length;i--;){var c=e(a[i],null),l=a[i].slot;l?o[l]=h(J,{name:l},c):r[i]=c}var u=n?h(J,null,r):r;return h(n||t.nodeName.toLowerCase(),o,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?D:L)(this._vdom,this._root)}function q(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function z(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[q(e)]=n,this._vdom=B(this._vdom,r),L(this._vdom,this._root)}}function W(){L(this._vdom=null,this._root)}function J(e,t){var n=this;return h("slot",H({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}n=u.slice,r={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},o=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof e&&(e=e(d({},n),this.props)),e&&d(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),v(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},y.prototype.render=m,i=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},w.__r=0;var V=0;function K(e,t,n,o,i,s){var a,c,l={};for(c in t)"ref"==c?a=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--V,__source:i,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(c in a)void 0===l[c]&&(l[c]=a[c]);return r.vnode&&r.vnode(u),u}var G=function(){return G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G.apply(this,arguments)};const $=function(e){return K("div",G({class:"flex flex-col mt-4"},{children:K("div",G({class:"-my-2 sm:-mx-6 lg:-mx-8"},{children:K("div",G({class:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"},{children:K("div",G({class:"shadow overflow-hidden border-b border-gray-200"},{children:K("table",G({class:"min-w-full divide-y divide-gray-200"},{children:[K("thead",{children:K("tr",{children:[K("th",G({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Profile Id"})),K("th",G({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Name"})),K("th",G({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Email"})),K("th",G({class:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"External Id"})),K("th",G({class:"px-6 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Catch E Id"}))]})}),K("tbody",{children:e.Profiles.map((function(e,t){var n="px-6 py-4 whitespace-nowrap text-sm";return K("tr",G({class:t%2==0?"bg-white":"bg-gray-50"},{children:[K("td",G({class:n},{children:e.id})),K("td",G({class:n},{children:e.name})),K("td",G({class:n},{children:e.email})),K("td",G({class:n},{children:e.externalId})),K("td",G({class:n},{children:e.catchEId}))]}),t)}))})]}))}))}))}))}))};var X,Q,Z,Y,ee=0,te=[],ne=[],re=r.__b,oe=r.__r,ie=r.diffed,se=r.__c,ae=r.unmount;function ce(e,t){r.__h&&r.__h(Q,e,ee||t),ee=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ne}),n.__[e]}function le(e){return ee=1,function(e,t,n){var r=ce(X++,2);if(r.t=e,!r.__c&&(r.__=[_e(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var s=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};Q.u=!0;var i=Q.shouldComponentUpdate,s=Q.componentWillUpdate;Q.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}s&&s.call(this,e,t,n)},Q.shouldComponentUpdate=o}return r.__N||r.__}(_e,e)}function ue(){for(var e;e=te.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(he),e.__H.__h=[]}catch(t){e.__H.__h=[],r.__e(t,e.__v)}}r.__b=function(e){Q=null,re&&re(e)},r.__r=function(e){oe&&oe(e),X=0;var t=(Q=e.__c).__H;t&&(Z===Q?(t.__h=[],Q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ne,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(he),t.__h=[])),Z=Q},r.diffed=function(e){ie&&ie(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==te.push(t)&&Y===r.requestAnimationFrame||((Y=r.requestAnimationFrame)||de)(ue)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ne&&(e.__=e.__V),e.i=void 0,e.__V=ne}))),Z=Q=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||he(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(n,e.__v)}})),se&&se(e,t)},r.unmount=function(e){ae&&ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var fe="function"==typeof requestAnimationFrame;function de(e){var t,n=function(){clearTimeout(r),fe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fe&&(t=requestAnimationFrame(n))}function pe(e){var t=Q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Q=t}function he(e){var t=Q;e.__c=e.__(),Q=t}function _e(e,t){return"function"==typeof t?t(e):t}function me(e,t){return function(){return e.apply(t,arguments)}}const{toString:ye}=Object.prototype,{getPrototypeOf:be}=Object,ge=(ve=Object.create(null),e=>{const t=ye.call(e);return ve[t]||(ve[t]=t.slice(8,-1).toLowerCase())});var ve;const we=e=>(e=e.toLowerCase(),t=>ge(t)===e),Ee=e=>t=>typeof t===e,{isArray:Oe}=Array,xe=Ee("undefined"),Se=we("ArrayBuffer"),ke=Ee("string"),Ae=Ee("function"),Re=Ee("number"),Te=e=>null!==e&&"object"==typeof e,Ce=e=>{if("object"!==ge(e))return!1;const t=be(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ne=we("Date"),Pe=we("File"),je=we("Blob"),Ue=we("FileList"),Fe=we("URLSearchParams");function Le(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Oe(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function De(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Be="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,He=e=>!xe(e)&&e!==Be,Ie=(Me="undefined"!=typeof Uint8Array&&be(Uint8Array),e=>Me&&e instanceof Me);var Me;const qe=we("HTMLFormElement"),ze=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),We=we("RegExp"),Je=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Le(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Ve="abcdefghijklmnopqrstuvwxyz",Ke="0123456789",Ge={DIGIT:Ke,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Ke},$e=we("AsyncFunction"),Xe={isArray:Oe,isArrayBuffer:Se,isBuffer:function(e){return null!==e&&!xe(e)&&null!==e.constructor&&!xe(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ae(e.append)&&("formdata"===(t=ge(e))||"object"===t&&Ae(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Se(e.buffer),t},isString:ke,isNumber:Re,isBoolean:e=>!0===e||!1===e,isObject:Te,isPlainObject:Ce,isUndefined:xe,isDate:Ne,isFile:Pe,isBlob:je,isRegExp:We,isFunction:Ae,isStream:e=>Te(e)&&Ae(e.pipe),isURLSearchParams:Fe,isTypedArray:Ie,isFileList:Ue,forEach:Le,merge:function e(){const{caseless:t}=He(this)&&this||{},n={},r=(r,o)=>{const i=t&&De(n,o)||o;Ce(n[i])&&Ce(r)?n[i]=e(n[i],r):Ce(r)?n[i]=e({},r):Oe(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Le(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Le(t,((t,r)=>{n&&Ae(t)?e[r]=me(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&be(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ge,kindOfTest:we,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Oe(e))return e;let t=e.length;if(!Re(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:qe,hasOwnProperty:ze,hasOwnProp:ze,reduceDescriptors:Je,freezeMethods:e=>{Je(e,((t,n)=>{if(Ae(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ae(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Oe(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:De,global:Be,isContextDefined:He,ALPHABET:Ge,generateString:(e=16,t=Ge.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ae(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Te(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=Oe(e)?[]:{};return Le(e,((e,t)=>{const i=n(e,r+1);!xe(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:$e,isThenable:e=>e&&(Te(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch)};function Qe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Xe.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Xe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ze=Qe.prototype,Ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ye[e]={value:e}})),Object.defineProperties(Qe,Ye),Object.defineProperty(Ze,"isAxiosError",{value:!0}),Qe.from=(e,t,n,r,o,i)=>{const s=Object.create(Ze);return Xe.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Qe.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const et=Qe;function tt(e){return Xe.isPlainObject(e)||Xe.isArray(e)}function nt(e){return Xe.endsWith(e,"[]")?e.slice(0,-2):e}function rt(e,t,n){return e?e.concat(t).map((function(e,t){return e=nt(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ot=Xe.toFlatObject(Xe,{},null,(function(e){return/^is[A-Z]/.test(e)})),it=function(e,t,n){if(!Xe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Xe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Xe.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Xe.isSpecCompliantForm(t);if(!Xe.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Xe.isDate(e))return e.toISOString();if(!a&&Xe.isBlob(e))throw new et("Blob is not supported. Use a Buffer instead.");return Xe.isArrayBuffer(e)||Xe.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(Xe.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Xe.isArray(e)&&function(e){return Xe.isArray(e)&&!e.some(tt)}(e)||(Xe.isFileList(e)||Xe.endsWith(n,"[]"))&&(a=Xe.toArray(e)))return n=nt(n),a.forEach((function(e,r){!Xe.isUndefined(e)&&null!==e&&t.append(!0===s?rt([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!tt(e)||(t.append(rt(o,n,i),c(e)),!1)}const u=[],f=Object.assign(ot,{defaultVisitor:l,convertValue:c,isVisitable:tt});if(!Xe.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Xe.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Xe.forEach(n,(function(n,i){!0===(!(Xe.isUndefined(n)||null===n)&&o.call(t,n,Xe.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function st(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function at(e,t){this._pairs=[],e&&it(e,this,t)}const ct=at.prototype;ct.append=function(e,t){this._pairs.push([e,t])},ct.toString=function(e){const t=e?function(t){return e.call(this,t,st)}:st;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const lt=at;function ut(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ft(e,t,n){if(!t)return e;const r=n&&n.encode||ut,o=n&&n.serialize;let i;if(i=o?o(t,n):Xe.isURLSearchParams(t)?t.toString():new lt(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const dt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Xe.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ht={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:lt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_t="undefined"!=typeof window&&"undefined"!=typeof document,mt=(yt="undefined"!=typeof navigator&&navigator.product,_t&&["ReactNative","NativeScript","NS"].indexOf(yt)<0);var yt;const bt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gt={...t,...ht},vt=function(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&Xe.isArray(r)?r.length:i,a?(Xe.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&Xe.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Xe.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(Xe.isFormData(e)&&Xe.isFunction(e.entries)){const n={};return Xe.forEachEntry(e,((e,r)=>{t(function(e){return Xe.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},wt={transitional:pt,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Xe.isObject(e);if(o&&Xe.isHTMLForm(e)&&(e=new FormData(e)),Xe.isFormData(e))return r&&r?JSON.stringify(vt(e)):e;if(Xe.isArrayBuffer(e)||Xe.isBuffer(e)||Xe.isStream(e)||Xe.isFile(e)||Xe.isBlob(e))return e;if(Xe.isArrayBufferView(e))return e.buffer;if(Xe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return it(e,new gt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return gt.isNode&&Xe.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Xe.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return it(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Xe.isString(e))try{return(0,JSON.parse)(e),Xe.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||wt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Xe.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw et.from(e,et.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Xe.forEach(["delete","get","head","post","put","patch"],(e=>{wt.headers[e]={}}));const Et=wt,Ot=Xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xt=Symbol("internals");function St(e){return e&&String(e).trim().toLowerCase()}function kt(e){return!1===e||null==e?e:Xe.isArray(e)?e.map(kt):String(e)}function At(e,t,n,r,o){return Xe.isFunction(r)?r.call(this,t,n):(o&&(t=n),Xe.isString(t)?Xe.isString(r)?-1!==t.indexOf(r):Xe.isRegExp(r)?r.test(t):void 0:void 0)}class Rt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=St(t);if(!o)throw new Error("header name must be a non-empty string");const i=Xe.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=kt(e))}const i=(e,t)=>Xe.forEach(e,((e,n)=>o(e,n,t)));return Xe.isPlainObject(e)||e instanceof this.constructor?i(e,t):Xe.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ot[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=St(e)){const n=Xe.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Xe.isFunction(t))return t.call(this,e,n);if(Xe.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=St(e)){const n=Xe.findKey(this,e);return!(!n||void 0===this[n]||t&&!At(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=St(e)){const o=Xe.findKey(n,e);!o||t&&!At(0,n[o],o,t)||(delete n[o],r=!0)}}return Xe.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!At(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Xe.forEach(this,((r,o)=>{const i=Xe.findKey(n,o);if(i)return t[i]=kt(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=kt(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Xe.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Xe.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[xt]=this[xt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=St(e);t[r]||(function(e,t){const n=Xe.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Xe.isArray(e)?e.forEach(r):r(e),this}}Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Xe.reduceDescriptors(Rt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Xe.freezeMethods(Rt);const Tt=Rt;function Ct(e,t){const n=this||Et,r=t||n,o=Tt.from(r.headers);let i=r.data;return Xe.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Nt(e){return!(!e||!e.__CANCEL__)}function Pt(e,t,n){et.call(this,null==e?"canceled":e,et.ERR_CANCELED,t,n),this.name="CanceledError"}Xe.inherits(Pt,et,{__CANCEL__:!0});const jt=Pt,Ut=gt.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];Xe.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Xe.isString(r)&&s.push("path="+r),Xe.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ft(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Lt=gt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Xe.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Dt(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,f=0;for(;u!==i;)f+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=l&&c-l;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const Bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Tt.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(Xe.isFormData(r))if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=Ft(e.baseURL,e.url);function d(){if(!u)return;const r=Tt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new et("Request failed with status code "+n.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),l()}),(function(e){n(e),l()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),ft(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(n(new et("Request aborted",et.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new et("Network Error",et.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||pt;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new et(t,r.clarifyTimeoutError?et.ETIMEDOUT:et.ECONNABORTED,e,u)),u=null},gt.hasStandardBrowserEnv&&(c&&Xe.isFunction(c)&&(c=c(e)),c||!1!==c&&Lt(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Ut.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in u&&Xe.forEach(o.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),Xe.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",Dt(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Dt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{u&&(n(!t||t.type?new jt(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);p&&-1===gt.protocols.indexOf(p)?n(new et("Unsupported protocol "+p+":",et.ERR_BAD_REQUEST,e)):u.send(r||null)}))}};Xe.forEach(Bt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ht=e=>`- ${e}`,It=e=>Xe.isFunction(e)||null===e||!1===e,Mt={getAdapter:e=>{e=Xe.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!It(n)&&(r=Bt[(t=String(n)).toLowerCase()],void 0===r))throw new et(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ht).join("\n"):" "+Ht(e[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r},adapters:Bt};function qt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jt(null,e)}function zt(e){return qt(e),e.headers=Tt.from(e.headers),e.data=Ct.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Mt.getAdapter(e.adapter||Et.adapter)(e).then((function(t){return qt(e),t.data=Ct.call(e,e.transformResponse,t),t.headers=Tt.from(t.headers),t}),(function(t){return Nt(t)||(qt(e),t&&t.response&&(t.response.data=Ct.call(e,e.transformResponse,t.response),t.response.headers=Tt.from(t.response.headers))),Promise.reject(t)}))}const Wt=e=>e instanceof Tt?e.toJSON():e;function Jt(e,t){t=t||{};const n={};function r(e,t,n){return Xe.isPlainObject(e)&&Xe.isPlainObject(t)?Xe.merge.call({caseless:n},e,t):Xe.isPlainObject(t)?Xe.merge({},t):Xe.isArray(t)?t.slice():t}function o(e,t,n){return Xe.isUndefined(t)?Xe.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!Xe.isUndefined(t))return r(void 0,t)}function s(e,t){return Xe.isUndefined(t)?Xe.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Wt(e),Wt(t),!0)};return Xe.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);Xe.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Vt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Vt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Kt={};Vt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new et(r(o," has been removed"+(t?" in "+t:"")),et.ERR_DEPRECATED);return t&&!Kt[o]&&(Kt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const Gt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new et("option "+i+" must be "+n,et.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new et("Unknown option "+i,et.ERR_BAD_OPTION)}},validators:Vt},$t=Gt.validators;class Xt{constructor(e){this.defaults=e,this.interceptors={request:new dt,response:new dt}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Jt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Gt.assertOptions(n,{silentJSONParsing:$t.transitional($t.boolean),forcedJSONParsing:$t.transitional($t.boolean),clarifyTimeoutError:$t.transitional($t.boolean)},!1),null!=r&&(Xe.isFunction(r)?t.paramsSerializer={serialize:r}:Gt.assertOptions(r,{encode:$t.function,serialize:$t.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Xe.merge(o.common,o[t.method]);o&&Xe.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Tt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,f=0;if(!a){const e=[zt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=s.length;let d=t;for(f=0;f<u;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=zt.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,u=c.length;f<u;)l=l.then(c[f++],c[f++]);return l}getUri(e){return ft(Ft((e=Jt(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Xe.forEach(["delete","get","head","options"],(function(e){Xt.prototype[e]=function(t,n){return this.request(Jt(n||{},{method:e,url:t,data:(n||{}).data}))}})),Xe.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Jt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Xt.prototype[e]=t(),Xt.prototype[e+"Form"]=t(!0)}));const Qt=Xt;class Zt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new jt(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Zt((function(t){e=t}));return{token:t,cancel:e}}}const Yt=Zt,en={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(en).forEach((([e,t])=>{en[t]=e}));const tn=en,nn=function e(t){const n=new Qt(t),r=me(Qt.prototype.request,n);return Xe.extend(r,Qt.prototype,n,{allOwnKeys:!0}),Xe.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Jt(t,n))},r}(Et);nn.Axios=Qt,nn.CanceledError=jt,nn.CancelToken=Yt,nn.isCancel=Nt,nn.VERSION="1.6.2",nn.toFormData=it,nn.AxiosError=et,nn.Cancel=nn.CanceledError,nn.all=function(e){return Promise.all(e)},nn.spread=function(e){return function(t){return e.apply(null,t)}},nn.isAxiosError=function(e){return Xe.isObject(e)&&!0===e.isAxiosError},nn.mergeConfig=Jt,nn.AxiosHeaders=Tt,nn.formToJSON=e=>vt(Xe.isHTMLForm(e)?new FormData(e):e),nn.getAdapter=Mt.getAdapter,nn.HttpStatusCode=tn,nn.default=nn;const rn=nn;var on,sn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},an=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},cn=function(e,t){return sn(void 0,void 0,void 0,(function(){return an(this,(function(n){switch(n.label){case 0:if(!on)throw new Error("Api has not been initialized");return[4,on.get("/accounts/".concat(e,"/profiles/search?search=").concat(t),{})];case 1:return[2,n.sent().data]}}))}))},ln=function(){return ln=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ln.apply(this,arguments)},un=function(e){var t=le(""),n=t[0],r=t[1];return K("div",ln({class:"flex flex-row gap-4 sm:-mr-6 lg:mr-0"},{children:[K("div",ln({className:"flex-grow max-w-md"},{children:[K("label",ln({for:"search",class:"block text-sm font-medium text-gray-700"},{children:"Search"})),K("div",ln({className:"mt-1"},{children:K("input",{class:"py-2 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md",name:"search",placeholder:"First Name, Middle Name, Last Name or Email Id.",type:"text",value:n,onChange:function(e){return function(e){r(e)}(e.currentTarget.value)},required:!0})}))]})),K("div",ln({className:"pt-6"},{children:K("div",ln({className:"flex justify-end"},{children:K("button",ln({class:"ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",type:"search",onClick:function(){return e.onSearch(n)}},{children:"Search"}))}))}))]}))};function fn(e){this.message=e}fn.prototype=new Error,fn.prototype.name="InvalidCharacterError";var dn="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new fn("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,s="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)?s+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function pn(e){this.message=e}pn.prototype=new Error,pn.prototype.name="InvalidTokenError";var hn=function(){function e(e){this.roles=e}return e.create=function(t){if("string"==typeof t)return new e(function(e,t){if("string"!=typeof e)throw new pn("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(dn(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return dn(t)}}(e.split(".")[n]))}catch(e){throw new pn("Invalid token specified: "+e.message)}}(t).roles||[]);throw new Error("Failed to identify the user")},e.prototype.hasRole=function(e){return this.roles.includes(e)},e}(),_n=function(){return _n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_n.apply(this,arguments)},mn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},yn=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=M,o.prototype.attributeChangedCallback=z,o.prototype.disconnectedCallback=W,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("superhero-salpac-profile-admin",o)}((function(e){var t=le([]),n=t[0],o=t[1],i=le(""),s=i[0],a=i[1],c=le({status:"NotLinked",message:""}),l=c[0],u=c[1],f=le(hn.create(e.accessToken))[0],d=function(){return f.hasRole("SalaryPackaging.Access")},p=function(){return mn(void 0,void 0,void 0,(function(){var t;return yn(this,(function(n){switch(n.label){case 0:if(!(e.backendUrl&&e.accessToken&&e.accountId))return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),o=e.backendUrl,i=e.accessToken,on=rn.create({baseURL:"".concat(o).concat("/salary-packaging/admin/v1.0"),headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i)}}),[4,(r=e.accountId,sn(void 0,void 0,void 0,(function(){return an(this,(function(e){switch(e.label){case 0:if(!on)throw new Error("Api has not been initialized");return[4,on.get("/accounts/".concat(r,"/auth"),{})];case 1:return[2,e.sent().data]}}))})))];case 2:return t=n.sent(),u(t),[3,4];case 3:return n.sent(),a("Unable to view the page"),[3,4];case 4:return[2]}var r,o,i}))}))};return function(e,t){var n=ce(X++,3);!r.__s&&function(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}(n.__H,t)&&(n.__=function(){mn(void 0,void 0,void 0,(function(){return yn(this,(function(e){switch(e.label){case 0:return d()?[4,p()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},n.i=t,Q.__H.__h.push(n))}(0,[e.backendUrl,e.accessToken,e.accountId,f]),d()?s?K("h1",_n({class:"text-red-500"},{children:s})):"Linked"===l.status?K("div",{children:[K(un,{onSearch:function(t){return mn(void 0,void 0,void 0,(function(){var n;return yn(this,(function(r){switch(r.label){case 0:return[4,cn(e.accountId,t)];case 1:return n=r.sent(),o(n),[2]}}))}))}}),K($,{Profiles:n})]}):K("div",{children:K("h3",{children:l.message})}):K("h1",_n({class:"text-gray-500"},{children:"Access denied."}))}),0,["backend-url","access-token"])})();
1
+ (()=>{"use strict";var e,t,n,r,o,i,l,c={},a=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(e,t){for(var n in t)e[n]=t[n];return e}function s(e){var t=e.parentNode;t&&t.removeChild(e)}function f(t,n,r){var o,i,l,c={};for(l in n)"key"==l?o=n[l]:"ref"==l?i=n[l]:c[l]=n[l];if(arguments.length>2&&(c.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===c[l]&&(c[l]=t.defaultProps[l]);return p(t,c,o,i,null)}function p(e,r,o,i,l){var c={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++n:l};return null==l&&null!=t.vnode&&t.vnode(c),c}function d(e){return e.children}function h(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?v(e):null}function y(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return y(e)}}function m(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!b.__r++||o!==t.debounceRendering)&&((o=t.debounceRendering)||i)(b)}function b(){var e,t,n,o,i,c,a,_;for(r.sort(l);e=r.shift();)e.__d&&(t=r.length,o=void 0,i=void 0,a=(c=(n=e).__v).__e,(_=n.__P)&&(o=[],(i=u({},c)).__v=c.__v+1,P(_,c,i,n.__n,void 0!==_.ownerSVGElement,null!=c.__h?[a]:null,o,null==a?v(c):a,c.__h),T(o,c),c.__e!=a&&y(c)),r.length>t&&r.sort(l));b.__r=0}function g(e,t,n,r,o,i,l,_,u,s){var f,h,y,m,b,g,E,C=r&&r.__k||a,S=C.length;for(n.__k=[],f=0;f<t.length;f++)if(null!=(m=n.__k[f]=null==(m=t[f])||"boolean"==typeof m||"function"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?p(null,m,null,null,m):Array.isArray(m)?p(d,{children:m},null,null,null):m.__b>0?p(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(y=C[f])||y&&m.key==y.key&&m.type===y.type)C[f]=void 0;else for(h=0;h<S;h++){if((y=C[h])&&m.key==y.key&&m.type===y.type){C[h]=void 0;break}y=null}P(e,m,y=y||c,o,i,l,_,u,s),b=m.__e,(h=m.ref)&&y.ref!=h&&(E||(E=[]),y.ref&&E.push(y.ref,null,m),E.push(h,m.__c||b,m)),null!=b?(null==g&&(g=b),"function"==typeof m.type&&m.__k===y.__k?m.__d=u=w(m,u,e):u=k(e,m,y,C,b,u),"function"==typeof n.type&&(n.__d=u)):u&&y.__e==u&&u.parentNode!=e&&(u=v(y))}for(n.__e=g,f=S;f--;)null!=C[f]&&("function"==typeof n.type&&null!=C[f].__e&&C[f].__e==n.__d&&(n.__d=x(r).nextSibling),U(C[f],C[f]));if(E)for(f=0;f<E.length;f++)O(E[f],E[++f],E[++f])}function w(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?w(r,t,n):k(n,r,r,o,r.__e,t));return t}function k(e,t,n,r,o,i){var l,c,a;if(void 0!==t.__d)l=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),l=null;else{for(c=i,a=0;(c=c.nextSibling)&&a<r.length;a+=1)if(c==o)break e;e.insertBefore(o,i),l=i}return void 0!==l?l:o.nextSibling}function x(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=x(n)))return r;return null}function E(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||_.test(t)?n:n+"px"}function C(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||E(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||E(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?N:S,i):e.removeEventListener(t,i?N:S,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function S(e){return this.l[e.type+!1](t.event?t.event(e):e)}function N(e){return this.l[e.type+!0](t.event?t.event(e):e)}function P(e,n,r,o,i,l,c,a,_){var s,f,p,v,y,m,b,w,k,x,E,C,S,N,P,T=n.type;if(void 0!==n.constructor)return null;null!=r.__h&&(_=r.__h,a=n.__e=r.__e,n.__h=null,l=[a]),(s=t.__b)&&s(n);try{e:if("function"==typeof T){if(w=n.props,k=(s=T.contextType)&&o[s.__c],x=s?k?k.props.value:s.__:o,r.__c?b=(f=n.__c=r.__c).__=f.__E:("prototype"in T&&T.prototype.render?n.__c=f=new T(w,x):(n.__c=f=new h(w,x),f.constructor=T,f.render=H),k&&k.sub(f),f.props=w,f.state||(f.state={}),f.context=x,f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=T.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=u({},f.__s)),u(f.__s,T.getDerivedStateFromProps(w,f.__s))),v=f.props,y=f.state,f.__v=n,p)null==T.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==T.getDerivedStateFromProps&&w!==v&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(w,x),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(w,f.__s,x)||n.__v===r.__v){for(n.__v!==r.__v&&(f.props=w,f.state=f.__s,f.__d=!1),f.__e=!1,n.__e=r.__e,n.__k=r.__k,n.__k.forEach((function(e){e&&(e.__=n)})),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[],f.__h.length&&c.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(w,f.__s,x),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(v,y,m)}))}if(f.context=x,f.props=w,f.__P=e,C=t.__r,S=0,"prototype"in T&&T.prototype.render){for(f.state=f.__s,f.__d=!1,C&&C(n),s=f.render(f.props,f.state,f.context),N=0;N<f._sb.length;N++)f.__h.push(f._sb[N]);f._sb=[]}else do{f.__d=!1,C&&C(n),s=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++S<25);f.state=f.__s,null!=f.getChildContext&&(o=u(u({},o),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(m=f.getSnapshotBeforeUpdate(v,y)),P=null!=s&&s.type===d&&null==s.key?s.props.children:s,g(e,Array.isArray(P)?P:[P],n,r,o,i,l,c,a,_),f.base=n.__e,n.__h=null,f.__h.length&&c.push(f),b&&(f.__E=f.__=null),f.__e=!1}else null==l&&n.__v===r.__v?(n.__k=r.__k,n.__e=r.__e):n.__e=A(r.__e,n,r,o,i,l,c,_);(s=t.diffed)&&s(n)}catch(e){n.__v=null,(_||null!=l)&&(n.__e=a,n.__h=!!_,l[l.indexOf(a)]=null),t.__e(e,n,r)}}function T(e,n){t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function A(t,n,r,o,i,l,a,_){var u,f,p,d=r.props,h=n.props,y=n.type,m=0;if("svg"===y&&(i=!0),null!=l)for(;m<l.length;m++)if((u=l[m])&&"setAttribute"in u==!!y&&(y?u.localName===y:3===u.nodeType)){t=u,l[m]=null;break}if(null==t){if(null===y)return document.createTextNode(h);t=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),l=null,_=!1}if(null===y)d===h||_&&t.data===h||(t.data=h);else{if(l=l&&e.call(t.childNodes),f=(d=r.props||c).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!_){if(null!=l)for(d={},m=0;m<t.attributes.length;m++)d[t.attributes[m].name]=t.attributes[m].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||C(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||C(e,i,t[i],n[i],r)}(t,h,d,i,_),p)n.__k=[];else if(m=n.props.children,g(t,Array.isArray(m)?m:[m],n,r,o,i&&"foreignObject"!==y,l,a,l?l[0]:r.__k&&v(r,0),_),null!=l)for(m=l.length;m--;)null!=l[m]&&s(l[m]);_||("value"in h&&void 0!==(m=h.value)&&(m!==t.value||"progress"===y&&!m||"option"===y&&m!==d.value)&&C(t,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==t.checked&&C(t,"checked",m,d.checked,!1))}return t}function O(e,n,r){try{"function"==typeof e?e(n):e.current=n}catch(e){t.__e(e,r)}}function U(e,n,r){var o,i;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&U(o[i],n,r||"function"!=typeof e.type);r||null==e.__e||s(e.__e),e.__=e.__e=e.__d=void 0}function H(e,t,n){return this.constructor(e,n)}function j(n,r,o){var i,l,a;t.__&&t.__(n,r),l=(i="function"==typeof o)?null:o&&o.__k||r.__k,a=[],P(r,n=(!i&&o||r).__k=f(d,null,[n]),l||c,c,void 0!==r.ownerSVGElement,!i&&o?[o]:l?null:r.firstChild?e.call(r.childNodes):null,a,!i&&o?o:l?l.__e:r.firstChild,i),T(a,n)}function I(e,t){j(e,t,I)}function L(t,n,r){var o,i,l,c=u({},t.props);for(l in n)"key"==l?o=n[l]:"ref"==l?i=n[l]:c[l]=n[l];return arguments.length>2&&(c.children=arguments.length>3?e.call(arguments,2):r),p(t.type,c,o||t.key,i||t.ref,null)}function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,["context","children"]);return L(t,n)}function M(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=f(F,D({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},i=0,l=t.attributes,c=t.childNodes;for(i=l.length;i--;)"slot"!==l[i].name&&(o[l[i].name]=l[i].value,o[W(l[i].name)]=l[i].value);for(i=c.length;i--;){var a=e(c[i],null),_=c[i].slot;_?o[_]=f(R,{name:_},a):r[i]=a}var u=n?f(R,null,r):r;return f(n||t.nodeName.toLowerCase(),o,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?I:j)(this._vdom,this._root)}function W(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function z(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[W(e)]=n,this._vdom=L(this._vdom,r),j(this._vdom,this._root)}}function G(){j(this._vdom=null,this._root)}function R(e,t){var n=this;return f("slot",D({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}e=a.slice,t={__e:function(e,t,n,r){for(var o,i,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),l=o.__d),l)return o.__E=o}catch(t){e=t}throw e}},n=0,h.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof e&&(e=e(u({},n),this.props)),e&&u(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),m(this))},h.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),m(this))},h.prototype.render=d,r=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},b.__r=0;var V=0;function q(e,n,r,o,i,l){var c,a,_={};for(a in n)"ref"==a?c=n[a]:_[a]=n[a];var u={type:e,props:_,key:r,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--V,__source:i,__self:l};if("function"==typeof e&&(c=e.defaultProps))for(a in c)void 0===_[a]&&(_[a]=c[a]);return t.vnode&&t.vnode(u),u}var B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)};const $=function(e){return q("div",B({class:"flex flex-col mt-4"},{children:q("div",B({class:"-my-2 sm:-mx-6 lg:-mx-8"},{children:q("div",B({class:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"},{children:q("div",B({class:"shadow overflow-hidden border-b border-gray-200"},{children:q("table",B({class:"min-w-full divide-y divide-gray-200"},{children:[q("thead",{children:q("tr",{children:[q("th",B({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Profile Id"})),q("th",B({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Name"})),q("th",B({class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Email"})),q("th",B({class:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"External Id"})),q("th",B({class:"px-6 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap"},{children:"Catch E Id"}))]})}),q("tbody",{children:e.profiles.map((function(e,t){var n="px-6 py-4 whitespace-nowrap text-sm";return q("tr",B({class:t%2==0?"bg-white":"bg-gray-50"},{children:[q("td",B({class:n},{children:e.id})),q("td",B({class:n},{children:e.name})),q("td",B({class:n},{children:e.email})),q("td",B({class:n},{children:e.externalId})),q("td",B({class:n},{children:e.catchEId}))]}),t)}))})]}))}))}))}))}))};var J,K,Q,X,Y=0,Z=[],ee=[],te=t.__b,ne=t.__r,re=t.diffed,oe=t.__c,ie=t.unmount;function le(e,n){t.__h&&t.__h(K,e,Y||n),Y=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ee}),r.__[e]}function ce(e){return Y=1,function(e,t,n){var r=le(J++,2);if(r.t=e,!r.__c&&(r.__=[de(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var l=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(l=!0)}})),!(!l&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};K.u=!0;var i=K.shouldComponentUpdate,l=K.componentWillUpdate;K.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}l&&l.call(this,e,t,n)},K.shouldComponentUpdate=o}return r.__N||r.__}(de,e)}function ae(e,n){var r=le(J++,3);!t.__s&&function(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}(r.__H,n)&&(r.__=e,r.i=n,K.__H.__h.push(r))}function _e(){for(var e;e=Z.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){K=null,te&&te(e)},t.__r=function(e){ne&&ne(e),J=0;var t=(K=e.__c).__H;t&&(Q===K?(t.__h=[],K.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ee,e.__N=e.i=void 0}))):(t.__h.forEach(fe),t.__h.forEach(pe),t.__h=[])),Q=K},t.diffed=function(e){re&&re(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==Z.push(n)&&X===t.requestAnimationFrame||((X=t.requestAnimationFrame)||se)(_e)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ee&&(e.__=e.__V),e.i=void 0,e.__V=ee}))),Q=K=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),oe&&oe(e,n)},t.unmount=function(e){ie&&ie(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{fe(e)}catch(e){n=e}})),r.__H=void 0,n&&t.__e(n,r.__v))};var ue="function"==typeof requestAnimationFrame;function se(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))}function fe(e){var t=K,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),K=t}function pe(e){var t=K;e.__c=e.__(),K=t}function de(e,t){return"function"==typeof t?t(e):t}var he,ve=(he=function(e,t){return he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},he(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}he(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ye=function(e){function t(n,r){var o=e.call(this,n)||this;return o._response=r,Object.setPrototypeOf(o,t.prototype),o}return ve(t,e),Object.defineProperty(t.prototype,"response",{get:function(){return this._response},enumerable:!1,configurable:!0}),t}(Error),me=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{a(r.next(e))}catch(e){i(e)}}function c(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,c)}a((r=r.apply(e,t||[])).next())}))},be=function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}},ge=function(e,t){return function(n,r){return function(e,t,n,r,o){return i=void 0,l=void 0,a=function(){var r,o;return function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(i){switch(i.label){case 0:return[4,fetch(e,{method:t,body:void 0,headers:{authorization:"Bearer ".concat(n),"content-type":"application/json"},signal:(null===AbortSignal||void 0===AbortSignal?void 0:AbortSignal.timeout)&&AbortSignal.timeout(15e3)})];case 1:if(!(r=i.sent()).ok)throw new ye("[API] Fetch error: ".concat(r.statusText,". Url: ").concat(t," ").concat(e),r);return[3,2];case 2:return[4,r.json()];case 3:o=i.sent(),i.label=4;case 4:return[2,o]}}))},new((c=void 0)||(c=Promise))((function(e,t){function n(e){try{o(a.next(e))}catch(e){t(e)}}function r(e){try{o(a.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof c?o:new c((function(e){e(o)}))).then(n,r)}o((a=a.apply(i,l||[])).next())}));var i,l,c,a}(new URL("".concat(e).concat("/salary-packaging/admin/v1.0").concat(n)),r,t)}},we=function(e,t){return me(void 0,void 0,void 0,(function(){return be(this,(function(n){switch(n.label){case 0:return[4,e("/accounts/".concat(t,"/auth"),"GET")];case 1:return[2,n.sent()]}}))}))},ke=function(e,t,n){return me(void 0,void 0,void 0,(function(){return be(this,(function(r){switch(r.label){case 0:return[4,e("/accounts/".concat(t,"/profiles/search?search=").concat(n),"GET")];case 1:return[2,r.sent()]}}))}))},xe=function(){return xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xe.apply(this,arguments)},Ee=function(e){var t=ce(""),n=t[0],r=t[1];return q("div",xe({class:"flex flex-row gap-4 sm:-mr-6 lg:mr-0"},{children:[q("div",xe({className:"flex-grow max-w-md"},{children:[q("label",xe({for:"search",class:"block text-sm font-medium text-gray-700"},{children:"Search"})),q("div",xe({className:"mt-1"},{children:q("input",{class:"py-2 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md",name:"search",id:"search",placeholder:"First Name, Middle Name, Last Name or Email Id.",type:"text",value:n,onChange:function(e){return function(e){r(e)}(e.currentTarget.value)},required:!0})}))]})),q("div",xe({className:"pt-6"},{children:q("div",xe({className:"flex justify-end"},{children:q("button",xe({class:"ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",type:"search",onClick:function(){return e.onSearch(n)}},{children:"Search"}))}))})),q("div",xe({className:"flex-grow max-w-md"},{children:e.error&&q("h3",xe({className:"text-red-500"},{children:e.error}))}))]}))};function Ce(e){this.message=e}Ce.prototype=new Error,Ce.prototype.name="InvalidCharacterError";var Se="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Ce("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,l="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)?l+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return l};function Ne(e){this.message=e}Ne.prototype=new Error,Ne.prototype.name="InvalidTokenError";var Pe=function(){function e(e){this.roles=e,this.isAuthorized=e.includes("SalaryPackaging.Access")}return e.create=function(t){return new e(function(e,t){if("string"!=typeof e)throw new Ne("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(Se(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return Se(t)}}(e.split(".")[n]))}catch(e){throw new Ne("Invalid token specified: "+e.message)}}(t).roles||[])},e}(),Te=function(){return Te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Te.apply(this,arguments)},Ae=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{a(r.next(e))}catch(e){i(e)}}function c(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,c)}a((r=r.apply(e,t||[])).next())}))},Oe=function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}};!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=M,o.prototype.attributeChangedCallback=z,o.prototype.disconnectedCallback=G,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("superhero-salpac-profile-admin",o)}((function(e){var t=ce([]),n=t[0],r=t[1],o=ce(),i=o[0],l=o[1],c=ce({status:"NotLinked",message:"Access Denied"}),a=c[0],_=c[1],u=ce(Pe.create(e.accessToken))[0],s=ce("Loading"),f=s[0],p=s[1];switch(ae((function(){Ae(void 0,void 0,void 0,(function(){var t,n;return Oe(this,(function(r){switch(r.label){case 0:if(!(u.isAuthorized&&e.backendUrl&&e.accessToken&&e.accountId))return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),t=ge(e.backendUrl,e.accessToken),[4,we(t,e.accountId)];case 2:return n=r.sent(),_(n),"Linked"===n.status?p("Search"):p("Unauthorized"),[3,4];case 3:return r.sent(),p("Unauthorized"),[3,4];case 4:return[2]}}))}))}),[e.accessToken,e.accountId,e.backendUrl,u]),ae((function(){u&&!u.isAuthorized&&p("Unauthorized")}),[u]),f){case"Loading":return q("h1",Te({className:"text-gray-500"},{children:"Loading..."}));case"Search":return q("div",{children:[q(Ee,{onSearch:function(t){return Ae(void 0,void 0,void 0,(function(){var n,o,i,c;return Oe(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,6]),l(void 0),n=ge(e.backendUrl,e.accessToken),[4,ke(n,e.accountId,t)];case 1:return o=a.sent(),r(o),[3,6];case 2:return(i=a.sent())instanceof ye?[4,i.response.json()]:[3,4];case 3:return c=a.sent(),l(c.message||"Unknown error occurred, please try again"),[3,5];case 4:l("Could not contact backend, please refresh the page and try again later"),a.label=5;case 5:return[3,6];case 6:return[2]}}))}))}}),q("div",{children:q("h1",Te({className:"text-red-500"},{children:i}))}),q($,{profiles:n})]});case"Unauthorized":return q("h1",Te({className:"text-red-500"},{children:a.message}))}}),0,["backend-url","access-token"])})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-salpac-profile-admin",
3
- "version": "1.0.435",
3
+ "version": "1.0.461",
4
4
  "description": "Flare Superhero Profile Admin",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -9,24 +9,28 @@
9
9
  "scripts": {
10
10
  "start": "webpack serve --mode development",
11
11
  "build": "webpack --mode production --node-env production",
12
- "test": "",
12
+ "test": "jest",
13
13
  "lint": "eslint src/**/*.{js,jsx,ts,tsx}",
14
14
  "lint:fix": "eslint src/**/*.{js,jsx,ts,tsx} --fix"
15
15
  },
16
16
  "dependencies": {
17
17
  "@headlessui/react": "^1.7.14",
18
18
  "@heroicons/react": "^2.0.10",
19
- "axios": "^1.6.2",
20
- "enzyme": "^3.11.0",
21
- "enzyme-adapter-preact-pure": "^4.1.0",
22
- "jest-preset-preact": "^4.0.5",
23
19
  "jwt-decode": "^3.1.2",
24
20
  "preact": "^10.10.1",
25
21
  "preact-custom-element": "^4.2.1"
26
22
  },
27
23
  "devDependencies": {
24
+ "@babel/core": "^7.24.7",
25
+ "@babel/plugin-transform-react-jsx": "^7.24.7",
26
+ "@babel/plugin-transform-runtime": "^7.24.7",
27
+ "@babel/preset-env": "^7.24.7",
28
+ "@babel/preset-typescript": "^7.24.7",
28
29
  "@svgr/webpack": "^6.3.1",
29
30
  "@tailwindcss/forms": "^0.5.2",
31
+ "@testing-library/jest-dom": "^6.4.6",
32
+ "@testing-library/preact": "^3.2.4",
33
+ "@types/jest": "^29.5.12",
30
34
  "@types/preact-custom-element": "^4.0.1",
31
35
  "@typescript-eslint/eslint-plugin": "^5.33.0",
32
36
  "@typescript-eslint/parser": "^5.33.0",
@@ -38,12 +42,15 @@
38
42
  "eslint-config-prettier": "^8.5.0",
39
43
  "eslint-plugin-prettier": "^4.2.1",
40
44
  "html-webpack-plugin": "^5.5.0",
41
- "jest": "^27.5.1",
45
+ "jest": "^29.7.0",
46
+ "jest-environment-jsdom": "^29.7.0",
47
+ "jest-preset-preact": "^4.1.1",
42
48
  "postcss": "^8.4.14",
43
49
  "postcss-loader": "^7.0.1",
44
50
  "prettier": "^2.7.1",
45
51
  "tailwindcss": "^3.3.2",
46
52
  "ts-loader": "^9.3.1",
53
+ "ts-node": "^10.9.2",
47
54
  "typescript": "^4.7.4",
48
55
  "webpack": "^5.74.0",
49
56
  "webpack-cli": "^4.10.0",