@flarehr/superhero-pba-support-admin 1.0.985 → 1.0.987
Sign up to get free protection for your applications and to get access to all the features.
- package/build/bundle.js +1 -1
- package/package.json +1 -1
package/build/bundle.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var t,e,n,i,r,s,o,a,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function f(t,e){for(var n in e)t[n]=e[n];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function g(e,n,i){var r,s,o,a={};for(o in n)"key"==o?r=n[o]:"ref"==o?s=n[o]:a[o]=n[o];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return v(e,a,r,s,null)}function v(t,i,r,s,o){var a={type:t,props:i,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++n:o,__i:-1,__u:0};return null==o&&null!=e.vnode&&e.vnode(a),a}function b(t){return t.children}function _(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function T(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!S.__r++||r!==e.debounceRendering)&&((r=e.debounceRendering)||s)(S)}function S(){var t,n,r,s,a,l,c,u;for(i.sort(o);t=i.shift();)t.__d&&(n=i.length,s=void 0,l=(a=(r=t).__v).__e,c=[],u=[],r.__P&&((s=f({},a)).__v=a.__v+1,e.vnode&&e.vnode(s),M(r.__P,s,a,r.__n,r.__P.namespaceURI,32&a.__u?[l]:null,c,null==l?x(a):l,!!(32&a.__u),u),s.__v=a.__v,s.__.__k[s.__i]=s,O(c,s,u),s.__e!=l&&w(s)),i.length>n&&i.sort(o));S.__r=0}function A(t,e,n,i,r,s,o,a,l,c,u){var p,f,y,g,_,w=i&&i.__k||h,T=e.length;for(n.__d=l,function(t,e,n){var i,r,s,o,a,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],i=0;i<l;i++)o=i+d,null!=(r=t.__k[i]=null==(r=e[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?v(null,r,null,null,null):m(r)?v(b,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?v(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=t,r.__b=t.__b+1,a=E(r,n,o,u),r.__i=a,s=null,-1!==a&&(u--,(s=n[a])&&(s.__u|=131072)),null==s||null===s.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==o&&(a===o+1?d++:a>o?u>l-o?d+=a-o:d--:a<o?a==o-1&&(d=a-o):d=0,a!==i+d&&(r.__u|=65536))):(s=n[o])&&null==s.key&&s.__e&&!(131072&s.__u)&&(s.__e==t.__d&&(t.__d=x(s)),L(s,s,!1),n[o]=null,u--);if(u)for(i=0;i<c;i++)null!=(s=n[i])&&!(131072&s.__u)&&(s.__e==t.__d&&(t.__d=x(s)),L(s,s))}(n,e,w),l=n.__d,p=0;p<T;p++)null!=(y=n.__k[p])&&"boolean"!=typeof y&&"function"!=typeof y&&(f=-1===y.__i?d:w[y.__i]||d,y.__i=p,M(t,y,f,r,s,o,a,l,c,u),g=y.__e,y.ref&&f.ref!=y.ref&&(f.ref&&D(f.ref,null,y),u.push(y.ref,y.__c||g,y)),null==_&&null!=g&&(_=g),65536&y.__u||f.__k===y.__k?(l&&!l.isConnected&&(l=x(f)),l=P(y,l,t)):"function"==typeof y.type&&void 0!==y.__d?l=y.__d:g&&(l=g.nextSibling),y.__d=void 0,y.__u&=-196609);n.__d=l,n.__e=_}function P(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=P(i[r],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function C(t,e){return e=e||[],null==t||"boolean"==typeof t||(m(t)?t.some((function(t){C(t,e)})):e.push(t)),e}function E(t,e,n,i){var r=t.key,s=t.type,o=n-1,a=n+1,l=e[n];if(null===l||l&&r==l.key&&s===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;o>=0||a<e.length;){if(o>=0){if((l=e[o])&&!(131072&l.__u)&&r==l.key&&s===l.type)return o;o--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&r==l.key&&s===l.type)return a;a++}}return-1}function N(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function k(t,e,n,i,r){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||N(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||N(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n.u=i.u:(n.u=a,t.addEventListener(e,s?c:l,s)):t.removeEventListener(e,s?c:l,s);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(o){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function R(t){return function(n){if(this.l){var i=this.l[n.type+t];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(e.event?e.event(n):n)}}}function M(n,i,r,s,o,a,l,c,u,h){var p,g,v,w,T,S,P,C,E,N,R,M,O,D,L,j=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(u=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=e.__b)&&p(i);t:if("function"==typeof j)try{if(C=i.props,E=(p=j.contextType)&&s[p.__c],N=p?E?E.props.value:p.__:s,r.__c?P=(g=i.__c=r.__c).__=g.__E:("prototype"in j&&j.prototype.render?i.__c=g=new j(C,N):(i.__c=g=new _(C,N),g.constructor=j,g.render=V),E&&E.sub(g),g.props=C,g.state||(g.state={}),g.context=N,g.__n=s,v=g.__d=!0,g.__h=[],g._sb=[]),null==g.__s&&(g.__s=g.state),null!=j.getDerivedStateFromProps&&(g.__s==g.state&&(g.__s=f({},g.__s)),f(g.__s,j.getDerivedStateFromProps(C,g.__s))),w=g.props,T=g.state,g.__v=i,v)null==j.getDerivedStateFromProps&&null!=g.componentWillMount&&g.componentWillMount(),null!=g.componentDidMount&&g.__h.push(g.componentDidMount);else{if(null==j.getDerivedStateFromProps&&C!==w&&null!=g.componentWillReceiveProps&&g.componentWillReceiveProps(C,N),!g.__e&&(null!=g.shouldComponentUpdate&&!1===g.shouldComponentUpdate(C,g.__s,N)||i.__v===r.__v)){for(i.__v!==r.__v&&(g.props=C,g.state=g.__s,g.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(t){t&&(t.__=i)})),R=0;R<g._sb.length;R++)g.__h.push(g._sb[R]);g._sb=[],g.__h.length&&l.push(g);break t}null!=g.componentWillUpdate&&g.componentWillUpdate(C,g.__s,N),null!=g.componentDidUpdate&&g.__h.push((function(){g.componentDidUpdate(w,T,S)}))}if(g.context=N,g.props=C,g.__P=n,g.__e=!1,M=e.__r,O=0,"prototype"in j&&j.prototype.render){for(g.state=g.__s,g.__d=!1,M&&M(i),p=g.render(g.props,g.state,g.context),D=0;D<g._sb.length;D++)g.__h.push(g._sb[D]);g._sb=[]}else do{g.__d=!1,M&&M(i),p=g.render(g.props,g.state,g.context),g.state=g.__s}while(g.__d&&++O<25);g.state=g.__s,null!=g.getChildContext&&(s=f(f({},s),g.getChildContext())),v||null==g.getSnapshotBeforeUpdate||(S=g.getSnapshotBeforeUpdate(w,T)),A(n,m(L=null!=p&&p.type===b&&null==p.key?p.props.children:p)?L:[L],i,r,s,o,a,l,c,u,h),g.base=i.__e,i.__u&=-161,g.__h.length&&l.push(g),P&&(g.__E=g.__=null)}catch(F){i.__v=null,u||null!=a?(i.__e=c,i.__u|=u?160:32,a[a.indexOf(c)]=null):(i.__e=r.__e,i.__k=r.__k),e.__e(F,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(e,n,i,r,s,o,a,l,c){var u,h,p,f,g,v,b,_=i.props,w=n.props,T=n.type;if("svg"===T?s="http://www.w3.org/2000/svg":"math"===T?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=o)for(u=0;u<o.length;u++)if((g=o[u])&&"setAttribute"in g==!!T&&(T?g.localName===T:3===g.nodeType)){e=g,o[u]=null;break}if(null==e){if(null===T)return document.createTextNode(w);e=document.createElementNS(s,T,w.is&&w),o=null,l=!1}if(null===T)_===w||l&&e.data===w||(e.data=w);else{if(o=o&&t.call(e.childNodes),_=i.props||d,!l&&null!=o)for(_={},u=0;u<e.attributes.length;u++)_[(g=e.attributes[u]).name]=g.value;for(u in _)if(g=_[u],"children"==u);else if("dangerouslySetInnerHTML"==u)p=g;else if("key"!==u&&!(u in w)){if("value"==u&&"defaultValue"in w||"checked"==u&&"defaultChecked"in w)continue;k(e,u,null,g,s)}for(u in w)g=w[u],"children"==u?f=g:"dangerouslySetInnerHTML"==u?h=g:"value"==u?v=g:"checked"==u?b=g:"key"===u||l&&"function"!=typeof g||_[u]===g||k(e,u,g,_[u],s);if(h)l||p&&(h.__html===p.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(p&&(e.innerHTML=""),A(e,m(f)?f:[f],n,i,r,"foreignObject"===T?"http://www.w3.org/1999/xhtml":s,o,a,o?o[0]:i.__k&&x(i,0),l,c),null!=o)for(u=o.length;u--;)null!=o[u]&&y(o[u]);l||(u="value",void 0!==v&&(v!==e[u]||"progress"===T&&!v||"option"===T&&v!==_[u])&&k(e,u,v,_[u],s),u="checked",void 0!==b&&b!==e[u]&&k(e,u,b,_[u],s))}return e}(r.__e,i,r,s,o,a,l,u,h);(p=e.diffed)&&p(i)}function O(t,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)D(i[r],i[++r],i[++r]);e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(t){t.call(n)}))}catch(i){e.__e(i,n.__v)}}))}function D(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(r){e.__e(r,i)}}function L(t,n,i){var r,s;if(e.unmount&&e.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||D(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){e.__e(o,n)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&L(r[s],n,i||"function"!=typeof t.type);i||null==t.__e||y(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function V(t,e,n){return this.constructor(t,n)}function j(n,i,r){var s,o,a,l;e.__&&e.__(n,i),o=(s="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],M(i,n=(!s&&r||i).__k=g(b,null,[n]),o||d,d,i.namespaceURI,!s&&r?[r]:o?null:i.firstChild?t.call(i.childNodes):null,a,!s&&r?r:o?o.__e:i.firstChild,s,l),O(a,n,l)}function F(t,e){j(t,e,F)}function B(e,n,i){var r,s,o,a,l=f({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==o?r=n[o]:"ref"==o?s=n[o]:l[o]=void 0===n[o]&&void 0!==a?a[o]:n[o];return arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):i),v(e.type,l,r||e.key,s||e.ref,null)}function U(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,T(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}t=h.slice,e={__e:function(t,e,n,i){for(var r,s,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),o=r.__d),o)return r.__E=r}catch(a){t=a}throw t}},n=0,_.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),T(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),T(this))},_.prototype.render=b,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(t,e){return t.__v.__b-e.__v.__b},S.__r=0,a=0,l=R(!1),c=R(!0),u=0;var I,H,$,q,W=0,z=[],K=[],Y=e,X=Y.__b,G=Y.__r,J=Y.diffed,Z=Y.__c,Q=Y.unmount,tt=Y.__;function et(t,e){Y.__h&&Y.__h(H,t,W||e),W=0;var n=H.__H||(H.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:K}),n.__[t]}function nt(t){return W=1,function(t,e,n){var i=et(I++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ft(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=H,!H.u)){var r=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!s||s.call(this,t,e,n);var o=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&i.__c.props===t)&&(!s||s.call(this,t,e,n))};H.u=!0;var s=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(t,e,n){if(this.__e){var i=s;s=void 0,r(t,e,n),s=i}o&&o.call(this,t,e,n)},H.shouldComponentUpdate=r}return i.__N||i.__}(ft,t)}function it(t,e){var n=et(I++,3);!Y.__s&&mt(n.__H,e)&&(n.__=t,n.i=e,H.__H.__h.push(n))}function rt(t,e){var n=et(I++,4);!Y.__s&&mt(n.__H,e)&&(n.__=t,n.i=e,H.__h.push(n))}function st(t){return W=5,ot((function(){return{current:t}}),[])}function ot(t,e){var n=et(I++,7);return mt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function at(t,e){return W=8,ot((function(){return t}),e)}function lt(t){var e=H.context[t.__c],n=et(I++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(H)),e.props.value):t.__}function ct(){for(var t;t=z.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ht),t.__H.__h.forEach(pt),t.__H.__h=[]}catch(e){t.__H.__h=[],Y.__e(e,t.__v)}}Y.__b=function(t){H=null,X&&X(t)},Y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),tt&&tt(t,e)},Y.__r=function(t){G&&G(t),I=0;var e=(H=t.__c).__H;e&&($===H?(e.__h=[],H.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=K,t.__N=t.i=void 0}))):(e.__h.forEach(ht),e.__h.forEach(pt),e.__h=[],I=0)),$=H},Y.diffed=function(t){J&&J(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==z.push(e)&&q===Y.requestAnimationFrame||((q=Y.requestAnimationFrame)||dt)(ct)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==K&&(t.__=t.__V),t.i=void 0,t.__V=K}))),$=H=null},Y.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ht),t.__h=t.__h.filter((function(t){return!t.__||pt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],Y.__e(n,t.__v)}})),Z&&Z(t,e)},Y.unmount=function(t){Q&&Q(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ht(t)}catch(n){e=n}})),n.__H=void 0,e&&Y.__e(e,n.__v))};var ut="function"==typeof requestAnimationFrame;function dt(t){var e,n=function(){clearTimeout(i),ut&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);ut&&(e=requestAnimationFrame(n))}function ht(t){var e=H,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),H=e}function pt(t){var e=H;t.__c=t.__(),H=e}function mt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function ft(t,e){return"function"==typeof e?e(t):e}var yt=0;function gt(t,n,i,r,s,o){n||(n={});var a,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?a=n[l]:c[l]=n[l];var u={type:t,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--yt,__i:-1,__u:0,__source:s,__self:o};if("function"==typeof t&&(a=t.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return e.vnode&&e.vnode(u),u}const vt=function({tabTitles:t,currentTab:e,onChange:n}){const[i,r]=nt(e),s=at((t=>{r(t),n(t)}),[n]);return gt("div",{class:"border-b border-gray-200",children:gt("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:t.map((t=>gt("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===t?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>s(t),children:t},t)))})})};var bt=(t=>(t.Assessment="Assessment",t.Quiz="Quiz",t.Poll="Poll",t.Trivia="Trivia",t.Article="Article",t.Url="Url",t.Contact="Contact",t.Deeplink="Deeplink",t.Advertisement="Advertisement",t))(bt||{}),_t=(t=>(t.Cars="Cars",t.Health="Health",t.Everyday="Everyday",t.Devices="Devices",t.Energy="Energy",t.SavingsAccount="Savings Account*",t.HomeLoan="Home Loan*",t.MobileAndInternet="Mobile & Internet",t))(_t||{});const xt=t=>{var e;const n=t,i=(null==(e=n.response)?void 0:e.data)?n.response.data:void 0;return(null==i?void 0:i.message)??n.message},wt=(t,e=3)=>{const n=t.split(" ");return n.length>e?`${n.slice(0,e).join(" ")}...`:t},Tt=(t,e)=>{switch(t){case bt.Trivia:return"Trivia";case bt.Assessment:switch(e){case _t.Cars:return"SalaryPackagingCars";case _t.HomeLoan:return"HomeLoan"}return e.replace(/\s+/g,"");default:return"None"}},St=t=>{switch(t){case _t.SavingsAccount:return["Banking"];case _t.Cars:return["Cars"];case _t.Devices:case _t.Health:case _t.Energy:case _t.Everyday:return[t];case"None":return["Miscellaneous"];case _t.HomeLoan:case _t.MobileAndInternet:default:return[]}},At=t=>{switch(t){case _t.Cars:return["NovatedLease"];case _t.Health:return["HealthInsurance"];case _t.SavingsAccount:return["SavingsAccount"];case _t.Devices:case _t.Energy:return[t];case _t.HomeLoan:return["HomeLoan"];case _t.MobileAndInternet:case _t.Everyday:default:return[]}},Pt=(t,e,n)=>{const i=t.products[0],r=Ct(t,e);r?r.isFeatured=n??!1:i.activities.push({id:e,isFeatured:n??!1})},Ct=(t,e)=>t.products[0].activities.find((t=>t.id===e));function Et(t,e){return function(){return t.apply(e,arguments)}}const{toString:Nt}=Object.prototype,{getPrototypeOf:kt}=Object,Rt=(t=>e=>{const n=Nt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=t=>(t=t.toLowerCase(),e=>Rt(e)===t),Ot=t=>e=>typeof e===t,{isArray:Dt}=Array,Lt=Ot("undefined");const Vt=Mt("ArrayBuffer");const jt=Ot("string"),Ft=Ot("function"),Bt=Ot("number"),Ut=t=>null!==t&&"object"==typeof t,It=t=>{if("object"!==Rt(t))return!1;const e=kt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Ht=Mt("Date"),$t=Mt("File"),qt=Mt("Blob"),Wt=Mt("FileList"),zt=Mt("URLSearchParams"),[Kt,Yt,Xt,Gt]=["ReadableStream","Request","Response","Headers"].map(Mt);function Jt(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),Dt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length;let o;for(i=0;i<s;i++)o=r[i],e.call(null,t[o],o,t)}}function Zt(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,te=t=>!Lt(t)&&t!==Qt;const ee=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&kt(Uint8Array)),ne=Mt("HTMLFormElement"),ie=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),re=Mt("RegExp"),se=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Jt(n,((n,r)=>{let s;!1!==(s=e(n,r,t))&&(i[r]=s||n)})),Object.defineProperties(t,i)},oe="abcdefghijklmnopqrstuvwxyz",ae="0123456789",le={DIGIT:ae,ALPHA:oe,ALPHA_DIGIT:oe+oe.toUpperCase()+ae};const ce=Mt("AsyncFunction"),ue=(de="function"==typeof setImmediate,he=Ft(Qt.postMessage),de?setImmediate:he?(pe=`axios@${Math.random()}`,me=[],Qt.addEventListener("message",(({source:t,data:e})=>{t===Qt&&e===pe&&me.length&&me.shift()()}),!1),t=>{me.push(t),Qt.postMessage(pe,"*")}):t=>setTimeout(t));var de,he,pe,me;const fe="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Qt):"undefined"!=typeof process&&process.nextTick||ue,ye={isArray:Dt,isArrayBuffer:Vt,isBuffer:function(t){return null!==t&&!Lt(t)&&null!==t.constructor&&!Lt(t.constructor)&&Ft(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Ft(t.append)&&("formdata"===(e=Rt(t))||"object"===e&&Ft(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Vt(t.buffer),e},isString:jt,isNumber:Bt,isBoolean:t=>!0===t||!1===t,isObject:Ut,isPlainObject:It,isReadableStream:Kt,isRequest:Yt,isResponse:Xt,isHeaders:Gt,isUndefined:Lt,isDate:Ht,isFile:$t,isBlob:qt,isRegExp:re,isFunction:Ft,isStream:t=>Ut(t)&&Ft(t.pipe),isURLSearchParams:zt,isTypedArray:ee,isFileList:Wt,forEach:Jt,merge:function t(){const{caseless:e}=te(this)&&this||{},n={},i=(i,r)=>{const s=e&&Zt(n,r)||r;It(n[s])&&It(i)?n[s]=t(n[s],i):It(i)?n[s]=t({},i):Dt(i)?n[s]=i.slice():n[s]=i};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Jt(arguments[r],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(Jt(e,((e,i)=>{n&&Ft(e)?t[i]=Et(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&kt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:Rt,kindOfTest:Mt,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(Dt(t))return t;let e=t.length;if(!Bt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:ne,hasOwnProperty:ie,hasOwnProp:ie,reduceDescriptors:se,freezeMethods:t=>{se(t,((e,n)=>{if(Ft(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];Ft(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return Dt(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Zt,global:Qt,isContextDefined:te,ALPHABET:le,generateString:(t=16,e=le.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&Ft(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(Ut(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=Dt(t)?[]:{};return Jt(t,((t,e)=>{const s=n(t,i+1);!Lt(s)&&(r[e]=s)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:ce,isThenable:t=>t&&(Ut(t)||Ft(t))&&Ft(t.then)&&Ft(t.catch),setImmediate:ue,asap:fe};function ge(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}ye.inherits(ge,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:ye.toJSONObject(this.config),code:this.code,status:this.status}}});const ve=ge.prototype,be={};["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((t=>{be[t]={value:t}})),Object.defineProperties(ge,be),Object.defineProperty(ve,"isAxiosError",{value:!0}),ge.from=(t,e,n,i,r,s)=>{const o=Object.create(ve);return ye.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ge.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};function _e(t){return ye.isPlainObject(t)||ye.isArray(t)}function xe(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function we(t,e,n){return t?t.concat(e).map((function(t,e){return t=xe(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Te=ye.toFlatObject(ye,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Se(t,e,n){if(!ye.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=ye.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ye.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(e);if(!ye.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(ye.isDate(t))return t.toISOString();if(!a&&ye.isBlob(t))throw new ge("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(t)||ye.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(ye.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(ye.isArray(t)&&function(t){return ye.isArray(t)&&!t.some(_e)}(t)||(ye.isFileList(t)||ye.endsWith(n,"[]"))&&(a=ye.toArray(t)))return n=xe(n),a.forEach((function(t,i){!ye.isUndefined(t)&&null!==t&&e.append(!0===o?we([n],i,s):null===o?n:n+"[]",l(t))})),!1;return!!_e(t)||(e.append(we(r,n,s),l(t)),!1)}const u=[],d=Object.assign(Te,{defaultVisitor:c,convertValue:l,isVisitable:_e});if(!ye.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!ye.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+i.join("."));u.push(n),ye.forEach(n,(function(n,s){!0===(!(ye.isUndefined(n)||null===n)&&r.call(e,n,ye.isString(s)?s.trim():s,i,d))&&t(n,i?i.concat(s):[s])})),u.pop()}}(t),e}function Ae(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Pe(t,e){this._pairs=[],t&&Se(t,this,e)}const Ce=Pe.prototype;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(t,e,n){if(!e)return t;const i=n&&n.encode||Ee,r=n&&n.serialize;let s;if(s=r?r(e,n):ye.isURLSearchParams(e)?e.toString():new Pe(e,n).toString(i),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}Ce.append=function(t,e){this._pairs.push([t,e])},Ce.toString=function(t){const e=t?function(e){return t.call(this,e,Ae)}:Ae;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class ke{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ye.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Me={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Oe="undefined"!=typeof window&&"undefined"!=typeof document,De="object"==typeof navigator&&navigator||void 0,Le=Oe&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),Ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,je=Oe&&window.location.href||"http://localhost",Fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserEnv:Le,hasStandardBrowserWebWorkerEnv:Ve,navigator:De,origin:je},Symbol.toStringTag,{value:"Module"})),...Me};function Be(t){function e(t,n,i,r){let s=t[r++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=r>=t.length;if(s=!s&&ye.isArray(i)?i.length:s,a)return ye.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o;i[s]&&ye.isObject(i[s])||(i[s]=[]);return e(t,n,i[s],r)&&ye.isArray(i[s])&&(i[s]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}(i[s])),!o}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const n={};return ye.forEachEntry(t,((t,i)=>{e(function(t){return ye.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const Ue={transitional:Re,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=ye.isObject(t);r&&ye.isHTMLForm(t)&&(t=new FormData(t));if(ye.isFormData(t))return i?JSON.stringify(Be(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Se(t,new Fe.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Fe.isNode&&ye.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=ye.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Se(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(ye.isString(t))try{return(e||JSON.parse)(t),ye.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ue.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw ge.from(r,ge.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(t=>{Ue.headers[t]={}}));const Ie=ye.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"]),He=Symbol("internals");function $e(t){return t&&String(t).trim().toLowerCase()}function qe(t){return!1===t||null==t?t:ye.isArray(t)?t.map(qe):String(t)}function We(t,e,n,i,r){return ye.isFunction(i)?i.call(this,e,n):(r&&(e=n),ye.isString(e)?ye.isString(i)?-1!==e.indexOf(i):ye.isRegExp(i)?i.test(e):void 0:void 0)}let ze=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=$e(e);if(!r)throw new Error("header name must be a non-empty string");const s=ye.findKey(i,r);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||e]=qe(t))}const s=(t,e)=>ye.forEach(t,((t,n)=>r(t,n,e)));if(ye.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(ye.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&Ie[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e);else if(ye.isHeaders(t))for(const[o,a]of t.entries())r(a,o,n);else null!=t&&r(e,t,n);return this}get(t,e){if(t=$e(t)){const n=ye.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(ye.isFunction(e))return e.call(this,t,n);if(ye.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=$e(t)){const n=ye.findKey(this,t);return!(!n||void 0===this[n]||e&&!We(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=$e(t)){const r=ye.findKey(n,t);!r||e&&!We(0,n[r],r,e)||(delete n[r],i=!0)}}return ye.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!We(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return ye.forEach(this,((i,r)=>{const s=ye.findKey(n,r);if(s)return e[s]=qe(i),void delete e[r];const o=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete e[r],e[o]=qe(i),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ye.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&ye.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=$e(t);e[i]||(!function(t,e){const n=ye.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return ye.isArray(t)?t.forEach(i):i(t),this}};function Ke(t,e){const n=this||Ue,i=e||n,r=ze.from(i.headers);let s=i.data;return ye.forEach(t,(function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)})),r.normalize(),s}function Ye(t){return!(!t||!t.__CANCEL__)}function Xe(t,e,n){ge.call(this,null==t?"canceled":t,ge.ERR_CANCELED,e,n),this.name="CanceledError"}function Ge(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(ze.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ye.freezeMethods(ze),ye.inherits(Xe,ge,{__CANCEL__:!0});const Je=(t,e,n=3)=>{let i=0;const r=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[o];r||(r=l),n[s]=a,i[s]=l;let u=o,d=0;for(;u!==s;)d+=n[u++],u%=t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-r<e)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(t,e){let n,i,r=0,s=1e3/e;const o=(e,s=Date.now())=>{r=s,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-r;a>=s?o(t,e):(n=t,i||(i=setTimeout((()=>{i=null,o(n)}),s-a)))},()=>n&&o(n)]}((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-i,l=r(a);i=s;t({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:n,lengthComputable:null!=o,[e?"download":"upload"]:!0})}),n)},Ze=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Qe=t=>(...e)=>ye.asap((()=>t(...e))),tn=Fe.hasStandardBrowserEnv?function(){const t=Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=ye.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}(),en=Fe.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const o=[t+"="+encodeURIComponent(e)];ye.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ye.isString(i)&&o.push("path="+i),ye.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function nn(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const rn=t=>t instanceof ze?{...t}:t;function sn(t,e){e=e||{};const n={};function i(t,e,n){return ye.isPlainObject(t)&&ye.isPlainObject(e)?ye.merge.call({caseless:n},t,e):ye.isPlainObject(e)?ye.merge({},e):ye.isArray(e)?e.slice():e}function r(t,e,n){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function s(t,e){if(!ye.isUndefined(e))return i(void 0,e)}function o(t,e){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e)=>r(rn(t),rn(e),!0)};return ye.forEach(Object.keys(Object.assign({},t,e)),(function(i){const s=l[i]||r,o=s(t[i],e[i],i);ye.isUndefined(o)&&s!==a||(n[i]=o)})),n}const on=t=>{const e=sn({},t);let n,{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:l}=e;if(e.headers=a=ze.from(a),e.url=Ne(nn(e.baseURL,e.url),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ye.isFormData(i))if(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Fe.hasStandardBrowserEnv&&(r&&ye.isFunction(r)&&(r=r(e)),r||!1!==r&&tn(e.url))){const t=s&&o&&en.read(o);t&&a.set(s,t)}return e},an="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const i=on(t);let r=i.data;const s=ze.from(i.headers).normalize();let o,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),u&&u(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function y(){if(!f)return;const i=ze.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Ge((function(t){e(t),m()}),(function(t){n(t),m()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(n(new ge("Request aborted",ge.ECONNABORTED,t,f)),f=null)},f.onerror=function(){n(new ge("Network Error",ge.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Re;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ge(e,r.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,t,f)),f=null},void 0===r&&s.setContentType(null),"setRequestHeader"in f&&ye.forEach(s.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),ye.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),d&&"json"!==d&&(f.responseType=i.responseType),p&&([l,u]=Je(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Je(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(o=e=>{f&&(n(!e||e.type?new Xe(null,t,f):e),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o)));const g=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);g&&-1===Fe.protocols.indexOf(g)?n(new ge("Unsupported protocol "+g+":",ge.ERR_BAD_REQUEST,t)):f.send(r||null)}))},ln=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController;const r=function(t){if(!n){n=!0,o();const e=t instanceof Error?t:this.reason;i.abort(e instanceof ge?e:new Xe(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null,r(new ge(`timeout ${e} of ms exceeded`,ge.ETIMEDOUT))}),e);const o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>ye.asap(o),a}},cn=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},un=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},dn=(t,e,n,i)=>{const r=async function*(t,e){for await(const n of un(t))yield*cn(n,e)}(t,e);let s,o=0,a=t=>{s||(s=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await r.next();if(e)return a(),void t.close();let s=i.byteLength;if(n){let t=o+=s;n(t)}t.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},hn="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,pn=hn&&"function"==typeof ReadableStream,mn=hn&&("function"==typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),fn=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},yn=pn&&fn((()=>{let t=!1;const e=new Request(Fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),gn=pn&&fn((()=>ye.isReadableStream(new Response("").body))),vn={stream:gn&&(t=>t.body)};var bn;hn&&(bn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!vn[t]&&(vn[t]=ye.isFunction(bn[t])?e=>e[t]():(e,n)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,n)})})));const _n=async(t,e)=>{const n=ye.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ye.isBlob(t))return t.size;if(ye.isSpecCompliantForm(t)){const e=new Request(Fe.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ye.isArrayBufferView(t)||ye.isArrayBuffer(t)?t.byteLength:(ye.isURLSearchParams(t)&&(t+=""),ye.isString(t)?(await mn(t)).byteLength:void 0)})(e):n},xn={http:null,xhr:an,fetch:hn&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=on(t);c=c?(c+"").toLowerCase():"text";let p,m=ln([r,s&&s.toAbortSignal()],o);const f=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&yn&&"get"!==n&&"head"!==n&&0!==(y=await _n(u,i))){let t,n=new Request(e,{method:"POST",body:i,duplex:"half"});if(ye.isFormData(i)&&(t=n.headers.get("content-type"))&&u.setContentType(t),n.body){const[t,e]=Ze(y,Je(Qe(l)));i=dn(n.body,65536,t,e)}}ye.isString(d)||(d=d?"include":"omit");const r="credentials"in Request.prototype;p=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:i,duplex:"half",credentials:r?d:void 0});let s=await fetch(p);const o=gn&&("stream"===c||"response"===c);if(gn&&(a||o&&f)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=ye.toFiniteNumber(s.headers.get("content-length")),[n,i]=a&&Ze(e,Je(Qe(a),!0))||[];s=new Response(dn(s.body,65536,n,(()=>{i&&i(),f&&f()})),t)}c=c||"text";let g=await vn[ye.findKey(vn,c)||"text"](s,t);return!o&&f&&f(),await new Promise(((e,n)=>{Ge(e,n,{data:g,headers:ze.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:p})}))}catch(g){if(f&&f(),g&&"TypeError"===g.name&&/fetch/i.test(g.message))throw Object.assign(new ge("Network Error",ge.ERR_NETWORK,t,p),{cause:g.cause||g});throw ge.from(g,g&&g.code,t,p)}})};ye.forEach(xn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const wn=t=>`- ${t}`,Tn=t=>ye.isFunction(t)||null===t||!1===t,Sn=t=>{t=ye.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){let e;if(n=t[s],i=n,!Tn(n)&&(i=xn[(e=String(n)).toLowerCase()],void 0===i))throw new ge(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+s]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ge("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(wn).join("\n"):" "+wn(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function An(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xe(null,t)}function Pn(t){An(t),t.headers=ze.from(t.headers),t.data=Ke.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Sn(t.adapter||Ue.adapter)(t).then((function(e){return An(t),e.data=Ke.call(t,t.transformResponse,e),e.headers=ze.from(e.headers),e}),(function(e){return Ye(e)||(An(t),e&&e.response&&(e.response.data=Ke.call(t,t.transformResponse,e.response),e.response.headers=ze.from(e.response.headers))),Promise.reject(e)}))}const Cn="1.7.7",En={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{En[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Nn={};En.transitional=function(t,e,n){function i(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new ge(i(r," has been removed"+(e?" in "+e:"")),ge.ERR_DEPRECATED);return e&&!Nn[r]&&(Nn[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}};const kn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new ge("option "+s+" must be "+n,ge.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ge("Unknown option "+s,ge.ERR_BAD_OPTION)}},validators:En},Rn=kn.validators;let Mn=class{constructor(t){this.defaults=t,this.interceptors={request:new ke,response:new ke}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(i){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=sn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&kn.assertOptions(n,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1),null!=i&&(ye.isFunction(i)?e.paramsSerializer={serialize:i}:kn.assertOptions(i,{encode:Rn.function,serialize:Rn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&ye.merge(r.common,r[e.method]);r&&ye.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=ze.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,d=0;if(!a){const t=[Pn.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);d<u;)c=c.then(t[d++],t[d++]);return c}u=o.length;let h=e;for(d=0;d<u;){const t=o[d++],e=o[d++];try{h=t(h)}catch(p){e.call(this,p);break}}try{c=Pn.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(t){return Ne(nn((t=sn(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}};ye.forEach(["delete","get","head","options"],(function(t){Mn.prototype[t]=function(e,n){return this.request(sn(n||{},{method:t,url:e,data:(n||{}).data}))}})),ye.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(sn(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Mn.prototype[t]=e(),Mn.prototype[t+"Form"]=e(!0)}));const On={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(On).forEach((([t,e])=>{On[e]=t}));const Dn=function t(e){const n=new Mn(e),i=Et(Mn.prototype.request,n);return ye.extend(i,Mn.prototype,n,{allOwnKeys:!0}),ye.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(sn(e,n))},i}(Ue);Dn.Axios=Mn,Dn.CanceledError=Xe,Dn.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new Xe(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},Dn.isCancel=Ye,Dn.VERSION=Cn,Dn.toFormData=Se,Dn.AxiosError=ge,Dn.Cancel=Dn.CanceledError,Dn.all=function(t){return Promise.all(t)},Dn.spread=function(t){return function(e){return t.apply(null,e)}},Dn.isAxiosError=function(t){return ye.isObject(t)&&!0===t.isAxiosError},Dn.mergeConfig=sn,Dn.AxiosHeaders=ze,Dn.formToJSON=t=>Be(ye.isHTMLForm(t)?new FormData(t):t),Dn.getAdapter=Sn,Dn.HttpStatusCode=On,Dn.default=Dn;const{Axios:Ln,AxiosError:Vn,CanceledError:jn,isCancel:Fn,CancelToken:Bn,VERSION:Un,all:In,Cancel:Hn,isAxiosError:$n,spread:qn,toFormData:Wn,AxiosHeaders:zn,HttpStatusCode:Kn,formToJSON:Yn,getAdapter:Xn,mergeConfig:Gn}=Dn;let Jn,Zn,Qn;const ti=(t,e,n)=>{const i=`${t}/${n}`,r=Dn.create({baseURL:i,headers:{Authorization:`Bearer ${e}`}});switch(n){case"customer-profile":Jn=r;break;case"flare-app-identity":Zn=r;break;case"benefits-plan":Qn=r}return r},ei=async(t,e)=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.put(`/_admin/v1.0/categories/${t}`,e)},ni=async(t,e,n,i)=>{if(!Qn)throw new Error("Api has not been initialized");try{if(await Qn.put(`/_admin/v1.0/activities/${t}`,e),n){const e=Ct(n,t);if((null==e?void 0:e.isFeatured)!==i){Pt(n,t,i??!1);const e=n;await ei(n.id,e)}}}catch(r){throw new Error(`${xt(r)}`)}},ii=t=>{const[e,n]=nt(!1),i=st(),r=at((async e=>{try{const n=t.find((t=>t.id===e));if(!n)throw new Error("Category not found");const i={title:n.title,subtitle:n.subtitle,iconUrl:n.iconUrl,enabled:!n.enabled,displayOrder:n.displayOrder,products:n.products};await ei(e,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${xt(i)}`)}finally{n(!1)}}),[t]),s=at((async t=>{try{await(async t=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.post("/_admin/v1.0/categories",t)})(t)}catch(e){throw new Error(`${xt(e)}`)}}),[]),o=at((async(t,e)=>{try{await ei(t,e)}catch(n){throw new Error(`${xt(n)}`)}}),[]);return{isModalOpen:e,handleAction:at((async t=>{switch(t.type){case"updateVisibility":i.current=t.categoryId,n(!0);break;case"updateCategory":await o(t.categoryId,t.category);break;case"createCategory":await s(t.category);break;default:console.error(`Unhandled action type: ${t}`)}}),[s,o]),handleModalConfirm:at((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:at((()=>{n(!1)}),[])}};for(var ri,si=[],oi=0;oi<256;++oi)si.push((oi+256).toString(16).slice(1));var ai=new Uint8Array(16);function li(){if(!ri&&!(ri="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ri(ai)}const ci={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ui(t,e,n){if(ci.randomUUID&&!e&&!t)return ci.randomUUID();var i=(t=t||{}).random||(t.rng||li)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(si[t[e+0]]+si[t[e+1]]+si[t[e+2]]+si[t[e+3]]+"-"+si[t[e+4]]+si[t[e+5]]+"-"+si[t[e+6]]+si[t[e+7]]+"-"+si[t[e+8]]+si[t[e+9]]+"-"+si[t[e+10]]+si[t[e+11]]+si[t[e+12]]+si[t[e+13]]+si[t[e+14]]+si[t[e+15]]).toLowerCase()}(i)}const di=({title:t,children:e})=>gt("div",{className:"mt-2",children:[gt("div",{className:"mt-9",children:gt("h1",{className:"text-2xl font-semibold text-gray-900",children:t})}),gt("div",{className:"w-1/2",children:e})]}),hi=({formFields:t,formData:e,isSubmitting:n,formMode:i,messages:r,categoryId:s,handleInputChange:o})=>gt(b,{children:[t.map((t=>t.display&&!t.display(s)?null:gt(b,{children:[gt("label",{className:"sm:col-start-1",children:t.label}),gt("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===t.type?"w-6 h-full":""),type:t.type,name:t.name,value:(t.type,e[t.name]),checked:"checkbox"===t.type?!!e[t.name]:void 0,disabled:t.disabled&&t.disabled(i.mode),required:t.isRequired,onChange:o})]},t.name))),gt("div",{className:"sm:col-start-4 flex justify-end",children:gt("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:n,children:"create"===i.mode?"Create":"Update"})}),gt("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((t,e)=>gt("div",{className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600 cursor-pointer"),children:t.text},e)))})]}),pi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},mi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],fi=({formMode:t,onChange:e})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:s,handleInputChange:o}=((t,e)=>{const[n,i]=nt(!1),[r,s]=nt([]),[o,a]=nt(pi),{handleAction:l}=ii([]);it((()=>{if("update"===t.mode){const e={categoryId:t.initialCategory.id,title:t.initialCategory.title,subtitle:t.initialCategory.subtitle,iconUrl:t.initialCategory.iconUrl,displayOrder:t.initialCategory.displayOrder};a(e)}}),[t]);const c=at(((t,e)=>{s((n=>[...n,{text:t,type:e}]))}),[]),u=at((()=>{a({...pi})}),[]),d=at((()=>{let t=!0;for(const e of mi)!e.isRequired||"text"!==e.type||o[e.name]&&""!==o[e.name].toString().trim()||(c(`${e.label} is required.`,"error"),t=!1);return t}),[o,c]),h=at((()=>({...o,enabled:!1,products:[{id:ui(),title:o.title,description:o.subtitle,enabled:!0,iconUrl:o.iconUrl,activities:[]}]})),[o]),p=at((t=>({...o,enabled:t.enabled,products:t.products})),[o]);return{isSubmitting:n,messages:r,formData:o,setMessages:s,handleSubmit:async n=>{if(n.preventDefault(),i(!0),s([]),d())try{if("create"===t.mode){const t=h();await l({type:"createCategory",category:t})}if("update"===t.mode){const e=p(t.initialCategory);await l({type:"updateCategory",categoryId:t.initialCategory.id,category:e})}c(`Category successfully ${"create"===t.mode?"created":"updated"}.`,"success"),u(),e()}catch(r){c(`Error ${"create"===t.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;a((t=>({...t,[n]:"number"===r?Number(i):i})))}}})(t,e),a="create"===t.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return gt(di,{title:a,children:gt("form",{onSubmit:s,children:gt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:gt(hi,{formMode:t,formFields:mi,formData:r,isSubmitting:n,messages:i,handleInputChange:o})})})})},yi=({disabled:t,children:e,onClick:n,...i})=>{const[r,s]=nt(!1);return gt("button",{disabled:t||r,onClick:async()=>{if(n&&!r){s(!0);try{await n()}catch(t){console.error("Error executing promise:",t)}finally{s(!1)}}},type:"submit",...i,children:e})};function gi(t,e){for(var n in e)t[n]=e[n];return t}function vi(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function bi(t,e){this.props=t,this.context=e}(bi.prototype=new _).isPureReactComponent=!0,bi.prototype.shouldComponentUpdate=function(t,e){return vi(this.props,t)||vi(this.state,e)};var _i=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),_i&&_i(t)};var xi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var wi=e.__e;e.__e=function(t,e,n,i){if(t.then)for(var r,s=e;s=s.__;)if((r=s.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);wi(t,e,n,i)};var Ti=e.unmount;function Si(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=gi({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Si(t,e,n)}))),t}function Ai(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ai(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Pi(){this.__u=0,this.t=null,this.__b=null}function Ci(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ei(){this.u=null,this.o=null}e.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ti&&Ti(t)},(Pi.prototype=new _).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ci(i.__v),s=!1,o=function(){s||(s=!0,n.__R=null,r?r(a):a())};n.__R=o;var a=function(){if(! --i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=Ai(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},Pi.prototype.componentWillUnmount=function(){this.t=[]},Pi.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Si(this.__b,n,i.__O=i.__P)}this.__b=null}var r=e.__a&&g(b,null,t.fallback);return r&&(r.__u&=-33),[g(b,null,e.__a?null:t.children),r]};var Ni=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Ei.prototype=new _).__a=function(t){var e=this,n=Ci(e.__v),i=e.o.get(t);return i[0]++,function(r){var s=function(){e.props.revealOrder?(i.push(r),Ni(e,t,i)):r()};n?n(s):s()}},Ei.prototype.render=function(t){this.u=null,this.o=new Map;var e=C(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Ei.prototype.componentDidUpdate=Ei.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ni(t,n,e)}))};var ki="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ri=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Mi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Oi=/[A-Z0-9]/g,Di="undefined"!=typeof document,Li=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};_.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(_.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Vi=e.event;function ji(){}function Fi(){return this.cancelBubble}function Bi(){return this.defaultPrevented}e.event=function(t){return Vi&&(t=Vi(t)),t.persist=ji,t.isPropagationStopped=Fi,t.isDefaultPrevented=Bi,t.nativeEvent=t};var Ui={enumerable:!1,configurable:!0,get:function(){return this.class}},Ii=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var r in e){var s=e[r];if(!("value"===r&&"defaultValue"in e&&null==s||Di&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var o=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===s?s="":"translate"===o&&"no"===s?s=!1:"ondoubleclick"===o?r="ondblclick":"onchange"!==o||"input"!==n&&"textarea"!==n||Li(e.type)?"onfocus"===o?r="onfocusin":"onblur"===o?r="onfocusout":Mi.test(r)?r=o:-1===n.indexOf("-")&&Ri.test(r)?r=r.replace(Oi,"-$&").toLowerCase():null===s&&(s=void 0):o=r="oninput","oninput"===o&&i[r=o]&&(r="oninputCapture"),i[r]=s}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=C(e.children).forEach((function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=C(e.children).forEach((function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Ui)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=ki,Ii&&Ii(t)};var Hi=e.__r;e.__r=function(t){Hi&&Hi(t),t.__c};var $i=e.diffed;e.diffed=function(t){$i&&$i(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var qi=rt;const Wi=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),zi=({isOpen:t,heading:e,message:n,onConfirm:i,onCancel:r})=>t?gt("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[gt("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),gt("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:gt("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:gt("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[gt("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:gt("div",{className:"sm:flex sm:items-start",children:[gt("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:gt(Wi,{className:"h-6 w-6 text-red-600"})}),gt("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[gt("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:e}),gt("div",{className:"mt-2",children:gt("p",{className:"text-sm text-gray-500",children:n})})]})]})}),gt("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[gt(yi,{onClick:i,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),gt("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:r,children:"Cancel"})]})]})})})]}):null,Ki=({headers:t,renderTableRows:e})=>gt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:gt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:gt("table",{className:"min-w-full divide-y divide-gray-500",children:[gt("thead",{className:"bg-gray-50",children:gt("tr",{className:"divide-x divide-gray-20",children:t.map((t=>gt("th",{scope:"col",className:t.className,children:t.name},t.name)))})}),gt("tbody",{className:"divide-y divide-gray-200 bg-white",children:e()})]})})}),Yi=({error:t,isModalOpen:e,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:s,buttonText:o,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:u,handleModalCancel:d})=>gt(b,{children:[gt("div",{className:"p-4 text-red-700",children:t}),!t&>("div",{className:"m-4",children:[gt("div",{className:"flex items-center",children:[gt("div",{className:"flex-auto",children:gt("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:s})}),gt("div",{className:"ml-16 mt-0 flex-none",children:gt("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:o})})]}),a,gt(Ki,{headers:r,renderTableRows:u})]}),gt(zi,{isOpen:e,heading:n,message:i,onConfirm:c,onCancel:d})]}),Xi=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Gi=({onClick:t,children:e})=>gt("div",{className:"mt-4",children:gt("div",{className:"flex justify-normal",children:[gt("span",{onClick:t,children:gt(Xi,{className:"h-6 w-6 border-0 cursor-pointer"})}),gt("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:e})]})}),Ji=({buttonName:t,onClick:e,children:n})=>gt(b,{children:[gt(Gi,{onClick:e,children:t}),n]}),Zi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Qi=t=>{const[e,n]=nt(null),[i,r]=nt({mode:"view"}),{isModalOpen:s,handleAction:o,handleModalConfirm:a,handleModalCancel:l}=ii(t.categories);return gt(b,{children:["view"===i.mode&>(Yi,{error:e,isModalOpen:s,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Zi,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),t.onChange()}catch(e){n(`${e}`)}},handleModalCancel:l,renderTableRows:()=>gt(b,{children:t.categories.map((t=>{const e=t.products.reduce(((t,e)=>t+e.activities.length),0);return gt("tr",{className:"divide-x divide-gray-200",children:[gt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:gt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.title}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t.subtitle}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.displayOrder}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),gt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:gt("div",{className:"flex justify-center",children:gt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{r({mode:"update",itemId:t.id})},children:"Edit"})})}),gt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:gt("div",{className:"flex justify-center",children:gt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async t=>{await o({type:"updateVisibility",categoryId:t})})(t.id),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&>(Ji,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:gt(fi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:t.categories.find((t=>t.id===i.itemId))},onChange:t.onChange})})]})},tr=({visible:t,children:e})=>{const n=st(t);return t&&!n.current&&(n.current=!0),n.current?gt("div",{hidden:!t,children:e}):null},er=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),nr=()=>{const[t,e]=nt(!1),[n,i]=nt([]),[r,s]=nt(!1),o=st([]),a=st(),l=at((async t=>{e(!0),o.current=t;try{const e=await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/activities")).data})(),n=ir(t,e);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${xt(n)}`)}finally{e(!1)}}),[]),c=at((async t=>{e(!0);try{const e=await(async t=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${t}`)).data})(t);e.enabled=!e.enabled,await ni(t,e)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${xt(n)}`)}finally{e(!1)}}),[]);return{activities:n,isLoading:t,isModalOpen:r,loadActivities:l,handleAction:at((async t=>{switch(t.type){case"updateVisibility":a.current=t.activityId,s(!0);break;case"updateActivity":await ni(t.activityId,t.activity,t.selectedCategory,t.isFeaturedActivity);break;case"createActivity":await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");try{const i=await Qn.post("/_admin/v1.0/activities",t);if(e){Pt(e,i.data.id,n??!1);const t=e;await ei(e.id,t)}}catch(i){throw new Error(`${xt(i)}`)}})(t.activity,t.selectedCategory,t.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${t}`)}}),[]),handleModalConfirm:at((async()=>{a.current&&(await c(a.current),s(!1))}),[c]),handleModalCancel:at((()=>{s(!1)}),[])}},ir=(t,e)=>{const n=rr(t);return e.map((t=>{var e;return{...t,category:null==(e=n.get(t.id))?void 0:e.find((()=>!0))}}))},rr=t=>{const e=sr(t),n=new Map;return e.forEach((({activity:t,categoryId:e,categoryTitle:i})=>{const r=t.id;n.has(r)||n.set(r,[]);const s=n.get(r);s.some((t=>t.id===e))||s.push({id:e,title:i,isFeatured:t.isFeatured})})),n},sr=t=>t.flatMap((t=>t.products.flatMap((e=>e.activities.map((e=>({activity:e,categoryId:t.id,categoryTitle:t.title}))))))),or="None",ar=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:t=>t!==or}],lr=[{activityType:bt.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:bt.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:bt.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"}]},{activityType:bt.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:bt.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],cr={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1},ur=({formMode:t,categories:e,onChange:n})=>{const{isSubmitting:i,messages:r,formData:s,selectedActivityType:o,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:u,handleActivityTypeChange:d,handleCategoryChange:h}=((t,e,n)=>{const[i,r]=nt(bt.Article),[s,o]=nt({id:or,title:or}),[a,l]=nt([]),[c,u]=nt(!1),[d,h]=nt(cr),{handleAction:p}=nr(),m=ot((()=>{var t;return[...ar,...(null==(t=lr.find((t=>t.activityType===i)))?void 0:t.formFields)||[]]}),[i]),f=at(((t,e)=>{l((n=>[...n,{text:t,type:e}]))}),[]);it((()=>{var e,n,i;if("update"===t.mode){const s=t.initialActivity,a={activityId:s.id,title:s.title,points:s.points,description:s.description,iconUrl:s.iconUrl,url:s.url,articleId:s.articleId,bannerUrl:s.bannerUrl,buttonText:s.buttonText,primaryLabel:null==(e=s.estimateLabel)?void 0:e.primaryLabel,secondaryLabel:null==(n=s.estimateLabel)?void 0:n.secondaryLabel,isFeatured:null==(i=s.category)?void 0:i.isFeatured};h({...a}),r(s.activityType),o(s.category??{id:or,title:or})}}),[t]);const y=at((()=>{h({...cr}),r(bt.Article),o({id:or,title:or})}),[]),g=at((()=>{let t=!0;for(const e of m){const n=d[e.name];!e.isRequired||"text"!==e.type||n&&""!==n.toString().trim()||(f(`${e.label} is required.`,"error"),t=!1)}return t}),[f,m,d]),v=async()=>{const{url:t,articleId:n,bannerUrl:r,buttonText:o,primaryLabel:a,secondaryLabel:l,isFeatured:c}=d,u={...d,activityType:i,calculationType:Tt(i,s.title),enabled:!1,savingsInCents:0,configurationTags:At(s.title),tags:St(s.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:t||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:o||void 0};let h;s.title!==or&&(h=e.find((t=>t.id===s.id)));try{await p({type:"createActivity",activity:u,selectedCategory:h,isFeaturedActivity:c}),f("Activity successfully created.","success"),y()}catch(m){throw f(`Error creating activity: ${m}`,"error"),m}},b=async t=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r}=d,o={...t,...d,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0};let a;s.title!==or&&(a=e.find((t=>t.id===s.id)));try{await p({type:"updateActivity",activityId:t.id,activity:o,selectedCategory:a,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(l){throw f(`Error updating activity: ${l}`,"error"),l}};return{isSubmitting:c,messages:a,formData:d,selectedActivityType:i,currentFormFields:m,selectedCategory:s,setMessages:l,handleSubmit:async e=>{if(e.preventDefault(),u(!0),l([]),g())try{"create"===t.mode?await v():"update"===t.mode&&await b(t.initialActivity),n()}finally{u(!1)}else u(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;h((t=>({...t,[n]:"checkbox"===r?e.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:t=>{const e=t.target;r(e.value)},handleCategoryChange:t=>{const n=t.target.value;if(n===or)o({id:or,title:or});else{const t=e.find((t=>t.id===n));t&&o({id:t.id,title:t.title})}}}})(t,e,n),p="create"===t.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return gt(di,{title:p,children:gt("form",{onSubmit:c,children:[gt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[gt("label",{className:"sm:col-start-1",children:"Type"}),gt("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:o,disabled:"update"===t.mode,onChange:d,children:Object.values(bt).map((t=>gt("option",{value:t,children:t},t)))})]}),gt("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[gt("label",{className:"sm:col-start-1",children:"Category"}),gt("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===t.mode,onChange:h,children:[gt("option",{value:or,children:or}),e.map((t=>gt("option",{value:t.id,children:t.title},t.id)))]}),gt(hi,{formMode:t,formFields:a,formData:s,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:u})]})]})})},dr=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],hr="All",pr=({categories:t,onChange:e})=>{const[n,i]=nt(null),[r,s]=nt({mode:"view"}),[o,a]=nt({id:hr,title:hr}),[l,c]=nt([]),{isLoading:u,activities:d,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:y}=nr();it((()=>{(async()=>{try{await p(t)}catch(e){i(`${e}`)}})()}),[t,p]),it((()=>{c(o.title===hr?d:d.filter((t=>{var e;return(null==(e=t.category)?void 0:e.id)===o.id})))}),[d,o]);const g=gt("div",{className:"flex items-center space-x-2 mt-4",children:[gt(er,{}),gt("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:o.id,onChange:e=>{const n=e.target.value;if(n===hr)a({id:hr,title:hr});else{const e=t.find((t=>t.id===n));e&&a({id:e.id,title:e.title})}},children:[gt("option",{value:hr,children:hr}),t.map((t=>gt("option",{value:t.id,children:t.title},t.id)))]})]});return gt(b,{children:["view"===r.mode&>(b,{children:[u&>("p",{className:"p-5",children:"Loading..."}),!u&>(Yi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:dr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:g,onModalConfirm:async()=>{try{await f(),e()}catch(t){i(`${t}`)}},handleModalCancel:y,renderTableRows:()=>gt(b,{children:l.map((t=>{var e;return gt("tr",{className:"divide-x divide-gray-200",children:[gt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:gt("span",{className:"flex justify-center",children:gt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})})}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:wt(t.title)}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:wt(t.description)}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:t.activityType}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.points}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:(null==(e=t.category)?void 0:e.title)??"None"}),gt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),gt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:gt("div",{className:"flex justify-center",children:gt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{s({mode:"update",itemId:t.id})},children:"Edit"})})}),gt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:gt("div",{className:"flex justify-center",children:gt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>m({type:"updateVisibility",activityId:t.id}),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>s({mode:"create"})})]}),"view"!==r.mode&>(Ji,{buttonName:"Benefits Plan Activities",onClick:()=>{s({mode:"view"})},children:gt(ur,{categories:t,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:d.find((t=>t.id===r.itemId))},onChange:e})})]})};var mr=(t=>(t.Categories="Categories",t.Activities="Activities",t))(mr||{});const fr=()=>{const[t,e]=nt("Categories"),[n,i]=nt([]),[r,s]=nt(!1),[o,a]=nt(null),l=at((e=>e===t),[t]),c=at((async()=>{s(!0),a(null);try{const t=(await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/categories")).data})()).categories.sort(((t,e)=>t.displayOrder-e.displayOrder));i(t)}catch(t){console.error(t),a("Failed to load categories.")}finally{s(!1)}}),[]);it((()=>{c()}),[c]);const u=async()=>{await c()};return gt(b,{children:[gt(vt,{tabTitles:Object.entries(mr).map((([,t])=>t)),currentTab:t,onChange:e}),r&>("p",{className:"p-5",children:"Loading..."}),o&>("div",{className:"p-4 text-red-700",children:o}),!r&>(b,{children:[gt(tr,{visible:l("Categories"),children:gt(Qi,{categories:n,onChange:u})}),gt(tr,{visible:l("Activities"),children:gt(pr,{categories:n,onChange:u})})]})]})};function yr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function gr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const vr=t=>Array.isArray(t);function br(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function _r(t){return"string"==typeof t||Array.isArray(t)}function xr(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function wr(t,e,n,i){if("function"==typeof e){const[r,s]=xr(i);e=e(void 0!==n?n:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,s]=xr(i);e=e(void 0!==n?n:t.custom,r,s)}return e}function Tr(t,e,n){const i=t.getProps();return wr(i,e,void 0!==n?n:i.custom,t)}const Sr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Sr],Pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(Pr),Er=t=>1e3*t,Nr=t=>t/1e3,kr={type:"spring",stiffness:500,damping:25,restSpeed:10},Rr={type:"keyframes",duration:.8},Mr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Or=(t,{keyframes:e})=>e.length>2?Rr:Cr.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:kr:Mr;function Dr(t,e){return t?t[e]||t.default||t:void 0}const Lr=!1,Vr=t=>null!==t;function jr(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(Vr),s=e&&"loop"!==n&&e%2==1?0:r.length-1;return s&&void 0!==i?i:r[s]}const Fr=t=>t;const Br=["read","resolveKeyframes","update","preRender","render","postRender"];function Ur(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Br.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){s.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&i?e:n;return r&&s.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),s.delete(t)},process:t=>{o=t,i?r=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(t)))}};return l}(s),t)),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=o,p=()=>{const s=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1),r.timestamp=s,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:Br.reduce(((e,s)=>{const a=o[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(p)),a.schedule(e,s,o)),e}),{}),cancel:t=>{for(let e=0;e<Br.length;e++)o[Br[e]].cancel(t)},state:r,steps:o}}const{schedule:Ir,cancel:Hr,state:$r,steps:qr}=Ur("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Fr,!0),Wr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,zr=1e-7,Kr=12;function Yr(t,e,n,i){if(t===e&&n===i)return Fr;const r=e=>function(t,e,n,i,r){let s,o,a=0;do{o=e+(n-e)/2,s=Wr(o,i,r)-t,s>0?n=o:e=o}while(Math.abs(s)>zr&&++a<Kr);return o}(e,0,1,t,n);return t=>0===t||1===t?t:Wr(r(t),e,i)}const Xr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Gr=t=>e=>1-t(1-e),Jr=Yr(.33,1.53,.69,.99),Zr=Gr(Jr),Qr=Xr(Zr),ts=t=>(t*=2)<1?.5*Zr(t):.5*(2-Math.pow(2,-10*(t-1))),es=t=>1-Math.sin(Math.acos(t)),ns=Gr(es),is=Xr(es),rs=t=>/^0[^.\s]+$/u.test(t);let ss=Fr;const os=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),as=t=>e=>"string"==typeof e&&e.startsWith(t),ls=as("--"),cs=as("var(--"),us=t=>!!cs(t)&&ds.test(t.split("/*")[0].trim()),ds=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hs=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ps(t,e,n=1){const[i,r]=function(t){const e=hs.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${null!=n?n:i}`,r]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const t=s.trim();return os(t)?parseFloat(t):t}return us(r)?ps(r,e,n+1):r}const ms=(t,e,n)=>n>e?e:n<t?t:n,fs={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ys={...fs,transform:t=>ms(0,1,t)},gs={...fs,default:1},vs=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),bs=vs("deg"),_s=vs("%"),xs=vs("px"),ws=vs("vh"),Ts=vs("vw"),Ss={..._s,parse:t=>_s.parse(t)/100,transform:t=>_s.transform(100*t)},As=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ps=t=>t===fs||t===xs,Cs=(t,e)=>parseFloat(t.split(", ")[e]),Es=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Cs(r[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?Cs(e[1],t):0}},Ns=new Set(["x","y","z"]),ks=Pr.filter((t=>!Ns.has(t)));const Rs={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Es(4,13),y:Es(5,14)};Rs.translateX=Rs.x,Rs.translateY=Rs.y;const Ms=t=>e=>e.test(t),Os=[fs,xs,_s,bs,Ts,ws,{test:t=>"auto"===t,parse:t=>t}],Ds=t=>Os.find(Ms(t)),Ls=new Set;let Vs=!1,js=!1;function Fs(){if(js){const t=Array.from(Ls).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return ks.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}js=!1,Vs=!1,Ls.forEach((t=>t.complete())),Ls.clear()}function Bs(){Ls.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(js=!0)}))}class Us{constructor(t,e,n,i,r,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ls.add(this),Vs||(Vs=!0,Ir.read(Bs),Ir.resolveKeyframes(Fs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==i?void 0:i.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===r&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ls.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ls.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=t=>Math.round(1e5*t)/1e5,Hs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const $s=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qs=(t,e)=>n=>Boolean("string"==typeof n&&$s.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ws=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,s,o,a]=i.match(Hs);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},zs={...fs,transform:t=>Math.round((t=>ms(0,255,t))(t))},Ks={test:qs("rgb","red"),parse:Ws("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+zs.transform(t)+", "+zs.transform(e)+", "+zs.transform(n)+", "+Is(ys.transform(i))+")"};const Ys={test:qs("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Ks.transform},Xs={test:qs("hsl","hue"),parse:Ws("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+_s.transform(Is(e))+", "+_s.transform(Is(n))+", "+Is(ys.transform(i))+")"},Gs={test:t=>Ks.test(t)||Ys.test(t)||Xs.test(t),parse:t=>Ks.test(t)?Ks.parse(t):Xs.test(t)?Xs.parse(t):Ys.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ks.transform(t):Xs.transform(t)},Js=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Zs="number",Qs="color",to="var",eo="var(",no="${}",io=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ro(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const o=e.replace(io,(t=>(Gs.test(t)?(i.color.push(s),r.push(Qs),n.push(Gs.parse(t))):t.startsWith(eo)?(i.var.push(s),r.push(to),n.push(t)):(i.number.push(s),r.push(Zs),n.push(parseFloat(t))),++s,no))).split(no);return{values:n,split:o,indexes:i,types:r}}function so(t){return ro(t).values}function oo(t){const{split:e,types:n}=ro(t),i=e.length;return t=>{let r="";for(let s=0;s<i;s++)if(r+=e[s],void 0!==t[s]){const e=n[s];r+=e===Zs?Is(t[s]):e===Qs?Gs.transform(t[s]):t[s]}return r}}const ao=t=>"number"==typeof t?0:t;const lo={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(Hs))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Js))||void 0===n?void 0:n.length)||0)>0},parse:so,createTransformer:oo,getAnimatableNone:function(t){const e=so(t);return oo(t)(e.map(ao))}},co=new Set(["brightness","contrast","saturate","opacity"]);function uo(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Hs)||[];if(!i)return t;const r=n.replace(i,"");let s=co.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const ho=/\b([a-z-]*)\(.*?\)/gu,po={...lo,getAnimatableNone:t=>{const e=t.match(ho);return e?e.map(uo).join(" "):t}},mo={borderWidth:xs,borderTopWidth:xs,borderRightWidth:xs,borderBottomWidth:xs,borderLeftWidth:xs,borderRadius:xs,radius:xs,borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomRightRadius:xs,borderBottomLeftRadius:xs,width:xs,maxWidth:xs,height:xs,maxHeight:xs,top:xs,right:xs,bottom:xs,left:xs,padding:xs,paddingTop:xs,paddingRight:xs,paddingBottom:xs,paddingLeft:xs,margin:xs,marginTop:xs,marginRight:xs,marginBottom:xs,marginLeft:xs,backgroundPositionX:xs,backgroundPositionY:xs},fo={rotate:bs,rotateX:bs,rotateY:bs,rotateZ:bs,scale:gs,scaleX:gs,scaleY:gs,scaleZ:gs,skew:bs,skewX:bs,skewY:bs,distance:xs,translateX:xs,translateY:xs,translateZ:xs,x:xs,y:xs,z:xs,perspective:xs,transformPerspective:xs,opacity:ys,originX:Ss,originY:Ss,originZ:xs},yo={...fs,transform:Math.round},go={...mo,...fo,zIndex:yo,size:xs,fillOpacity:ys,strokeOpacity:ys,numOctaves:yo},vo={...go,color:Gs,backgroundColor:Gs,outlineColor:Gs,fill:Gs,stroke:Gs,borderColor:Gs,borderTopColor:Gs,borderRightColor:Gs,borderBottomColor:Gs,borderLeftColor:Gs,filter:po,WebkitFilter:po},bo=t=>vo[t];function _o(t,e){let n=bo(t);return n!==po&&(n=lo),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xo=new Set(["auto","none","0"]);class wo extends Us{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),us(n))){const i=ps(n,e.current);void 0!==i&&(t[a]=i),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!As.has(n)||2!==t.length)return;const[i,r]=t,s=Ds(i),o=Ds(r);if(s!==o)if(Ps(s)&&Ps(o))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let r=0;r<t.length;r++)("number"==typeof(i=t[r])?0===i:null===i||"none"===i||"0"===i||rs(i))&&n.push(r);var i;n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!xo.has(e)&&ro(e).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=_o(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=i.length-1,o=i[s];i[s]=Rs[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function To(t){return"function"==typeof t}let So;function Ao(){So=void 0}const Po={now:()=>(void 0===So&&Po.set($r.isProcessing||Lr?$r.timestamp:performance.now()),So),set:t=>{So=t,queueMicrotask(Ao)}},Co=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!lo.test(t)&&"0"!==t||t.startsWith("url(")));class Eo{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Po.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Bs(),Fs()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Po.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:s,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const s=t[t.length-1],o=Co(r,e),a=Co(s,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||To(n))&&i)}(t,n,i,r)){if(!s)return null==a||a(jr(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(t,e);!1!==c&&(this._resolved={keyframes:t,finalKeyframe:e,...c},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function No(t,e){return e?t*(1e3/e):0}const ko=5;function Ro(t,e,n){const i=Math.max(e-ko,0);return No(n-t(i),e-i)}const Mo=.001,Oo=.01,Do=10,Lo=.05,Vo=1;function jo({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,s,o=1-e;o=ms(Lo,Vo,o),t=ms(Oo,Do,Nr(t)),o<1?(r=e=>{const i=e*o,r=i*t,s=i-n,a=Bo(e,o),l=Math.exp(-r);return Mo-s/a*l},s=e=>{const i=e*o*t,s=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Bo(Math.pow(e,2),o);return(-r(e)+Mo>0?-1:1)*((s-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Mo,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let r=1;r<Fo;r++)i-=t(i)/e(i);return i}(r,s,5/t);if(t=Er(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const Fo=12;function Bo(t,e){return t*Math.sqrt(1-e*e)}const Uo=["duration","bounce"],Io=["stiffness","damping","mass"];function Ho(t,e){return e.some((e=>void 0!==t[e]))}function $o({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],s=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ho(t,Io)&&Ho(t,Uo)){const n=jo(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Nr(i.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(a*c)),f=s-r,y=Nr(Math.sqrt(a/c)),g=Math.abs(f)<5;let v;if(n||(n=g?.01:2),e||(e=g?.005:.5),m<1){const t=Bo(y,m);v=e=>{const n=Math.exp(-m*y*e);return s-n*((p+m*y*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>s-Math.exp(-y*t)*(f+(p+y*f)*t);else{const t=y*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*y*e),i=Math.min(t*e,300);return s-n*((p+m*y*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:h&&u||null,next:t=>{const i=v(t);if(h)o.done=t>=u;else{let r=0;m<1&&(r=0===t?Er(p):Ro(v,t,i));const a=Math.abs(r)<=n,l=Math.abs(s-i)<=e;o.done=a&&l}return o.value=o.done?s:i,o}}}function qo({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=d+m,y=void 0===o?f:o(f);y!==f&&(m=y-d);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),b=t=>{const e=g(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?y:n};let _,x;const w=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(_=t,x=$o({keyframes:[h.value,p(h.value)],velocity:Ro(v,t,h.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==_||(e=!0,b(t),w(t)),void 0!==_&&t>=_?x.next(t-_):(!e&&b(t),h)}}}const Wo=Yr(.42,0,1,1),zo=Yr(0,0,.58,1),Ko=Yr(.42,0,.58,1),Yo=t=>Array.isArray(t)&&"number"==typeof t[0],Xo={linear:Fr,easeIn:Wo,easeInOut:Ko,easeOut:zo,circIn:es,circInOut:is,circOut:ns,backIn:Zr,backInOut:Qr,backOut:Jr,anticipate:ts},Go=t=>{if(Yo(t)){ss(4===t.length);const[e,n,i,r]=t;return Yr(e,n,i,r)}return"string"==typeof t?(ss(void 0!==Xo[t]),Xo[t]):t},Jo=(t,e)=>n=>e(t(n)),Zo=(...t)=>t.reduce(Jo),Qo=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ta=(t,e,n)=>t+(e-t)*n;function ea(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function na(t,e){return n=>n>0?e:t}const ia=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},ra=[Ys,Ks,Xs];function sa(t){const e=(n=t,ra.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Xs&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,s=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=ea(a,i,t+1/3),s=ea(a,i,t),o=ea(a,i,t-1/3)}else r=s=o=n;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:i}}(i)),i}const oa=(t,e)=>{const n=sa(t),i=sa(e);if(!n||!i)return na(t,e);const r={...n};return t=>(r.red=ia(n.red,i.red,t),r.green=ia(n.green,i.green,t),r.blue=ia(n.blue,i.blue,t),r.alpha=ta(n.alpha,i.alpha,t),Ks.transform(r))},aa=new Set(["none","hidden"]);function la(t,e){return n=>ta(t,e,n)}function ca(t){return"number"==typeof t?la:"string"==typeof t?us(t)?na:Gs.test(t)?oa:ha:Array.isArray(t)?ua:"object"==typeof t?Gs.test(t)?oa:da:na}function ua(t,e){const n=[...t],i=n.length,r=t.map(((t,n)=>ca(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function da(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=ca(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const ha=(t,e)=>{const n=lo.createTransformer(e),i=ro(t),r=ro(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?aa.has(t)&&!r.values.length||aa.has(e)&&!i.values.length?function(t,e){return aa.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Zo(ua(function(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[s]=l,r[o]++}return i}(i,r),r.values),n):na(t,e)};function pa(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ta(t,e,n);return ca(t)(t,e)}function ma(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(ss(s===e.length),1===s)return()=>e[0];if(2===s&&t[0]===t[1])return()=>e[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=function(t,e,n){const i=[],r=n||pa,s=t.length-1;for(let o=0;o<s;o++){let n=r(t[o],t[o+1]);if(e){const t=Array.isArray(e)?e[o]||Fr:e;n=Zo(t,n)}i.push(n)}return i}(e,i,r),a=o.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Qo(t[n],t[n+1],e);return o[n](i)};return n?e=>l(ms(t[0],t[s-1],e)):l}function fa(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Qo(0,e,i);t.push(ta(n,1,r))}}(e,t.length-1),e}function ya({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Go):Go(i),s={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:fa(e),t),a=ma(o,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map((()=>c||Ko)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(s.value=a(e),s.done=e>=t,s)}}const ga=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Ir.update(e,!0),stop:()=>Hr(e),now:()=>$r.isProcessing?$r.timestamp:Po.now()}},va={decay:qo,inertia:qo,tween:ya,keyframes:ya,spring:$o},ba=t=>t/100;class _a extends Eo{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:r}=this.options,s=(null==i?void 0:i.KeyframeResolver)||Us;this.resolver=new s(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:s=0}=this.options,o=To(e)?e:va[e]||ya;let a,l;o!==ya&&"number"!=typeof t[0]&&(a=Zo(ba,pa(t[0],t[1])),t=[0,100]);const c=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),null===c.calculatedDuration&&(c.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(c));const{calculatedDuration:u}=c,d=u+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return r.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=r;if(h){const t=Math.min(this.currentTime,c)/u;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/u)):"mirror"===p&&(b=s)),v=ms(0,1,n)*u}const _=g?{done:!1,value:a[0]}:b.next(v);o&&(_.value=o(_.value));let{done:x}=_;g||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return w&&void 0!==i&&(_.value=jr(a,this.options,i)),f&&f(_.value),w&&this.finish(),_}get duration(){const{resolved:t}=this;return t?Nr(t.calculatedDuration):0}get time(){return Nr(this.currentTime)}set time(t){t=Er(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ga,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const xa=new Set(["opacity","clipPath","filter","transform"]),wa=(t,e)=>{let n="";const i=Math.max(Math.round(e/10),2);for(let r=0;r<i;r++)n+=t(Qo(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ta(t){let e;return()=>(void 0===e&&(e=t()),e)}const Sa={linearEasing:void 0};function Aa(t,e){const n=Ta(t);return()=>{var t;return null!==(t=Sa[e])&&void 0!==t?t:n()}}const Pa=Aa((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing");function Ca(t){return Boolean("function"==typeof t&&Pa()||!t||"string"==typeof t&&(t in Na||Pa())||Yo(t)||Array.isArray(t)&&t.every(Ca))}const Ea=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Na={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ea([0,.65,.55,1]),circOut:Ea([.55,0,1,.45]),backIn:Ea([.31,.01,.66,-.59]),backOut:Ea([.33,1.53,.69,.99])};function ka(t,e){return t?"function"==typeof t&&Pa()?wa(t,e):Yo(t)?Ea(t):Array.isArray(t)?t.map((t=>ka(t,e)||Na.easeOut)):Na[t]:void 0}function Ra(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ka(a,r);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"})}function Ma(t,e){t.timeline=e,t.onfinish=null}const Oa=Ta((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Da={anticipate:ts,backInOut:Qr,circInOut:is};class La extends Eo{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new wo(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:r,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var u;if("string"==typeof s&&Pa()&&s in Da&&(s=Da[s]),To((u=this.options).type)||"spring"===u.type||!Ca(u.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...c}=this.options,u=function(t,e){const n=new _a({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let s=0;for(;!i.done&&s<2e4;)i=n.sample(s),r.push(i.value),s+=10;return{times:void 0,keyframes:r,duration:s-10,ease:"linear"}}(t,c);1===(t=u.keyframes).length&&(t[1]=t[0]),i=u.duration,r=u.times,s=u.ease,o="keyframes"}const d=Ra(a.owner.current,l,t,{...this.options,duration:i,times:r,ease:s});return d.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Ma(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;a.set(jr(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:r,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Nr(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Nr(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Er(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Fr;const{animation:n}=e;Ma(n,t)}else this.pendingTimeline=t;return Fr}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:r,ease:s,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...c}=this.options,u=new _a({...c,keyframes:n,duration:i,type:r,ease:s,times:o,isGenerator:!0}),d=Er(this.time);t.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:s,type:o}=t;return Oa()&&n&&xa.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==s&&"inertia"!==o}}const Va=Ta((()=>void 0!==window.ScrollTimeline));class ja{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>Va()&&n.attachTimeline?n.attachTimeline(t):e(n)));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Fa=(t,e,n,i={},r,s)=>o=>{const a=Dr(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Er(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Or(t,u)}),u.duration&&(u.duration=Er(u.duration)),u.repeatDelay&&(u.repeatDelay=Er(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!s&&void 0!==e.get()){const t=jr(u.keyframes,a);if(void 0!==t)return Ir.update((()=>{u.onUpdate(t),u.onComplete()})),new ja([])}return!s&&La.supports(u)?new La(u):new _a(u)},Ba=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ua=t=>vr(t)?t[t.length-1]||0:t;function Ia(t,e){-1===t.indexOf(e)&&t.push(e)}function Ha(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class $a{constructor(){this.subscriptions=[]}add(t){return Ia(this.subscriptions,t),()=>Ha(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class qa{constructor(t,e={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Po.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Po.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new $a);const n=this.events[t].add(e);return"change"===t?()=>{n(),Ir.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Po.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return No(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wa(t,e){return new qa(t,e)}function za(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wa(n))}const Ka=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ya="data-"+Ka("framerAppearId");function Xa(t){return t.props[Ya]}const Ga=t=>Boolean(t&&t.getVelocity);function Ja(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ga(i)&&i.add))return n.add(e);var i}function Za({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Qa(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(o=i);const c=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const d in l){const e=t.getValue(d,null!==(s=t.latestValues[d])&&void 0!==s?s:null),i=l[d];if(void 0===i||u&&Za(u,d))continue;const r={delay:n,...Dr(o||{},d)};let a=!1;if(window.MotionHandoffAnimation){const e=Xa(t);if(e){const t=window.MotionHandoffAnimation(e,d,Ir);null!==t&&(r.startTime=t,a=!0)}}Ja(t,d),e.start(Fa(d,e,i,t.shouldReduceMotion&&Cr.has(d)?{type:!1}:r,t,a));const h=e.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{Ir.update((()=>{a&&function(t,e){const n=Tr(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const o in s)za(t,o,Ua(s[o]))}(t,a)}))})),c}function tl(t,e,n={}){var i;const r=Tr(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Qa(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,r=1,s){const o=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(el).forEach(((t,i)=>{t.notify("AnimationStart",e),o.push(tl(t,e,{...s,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(o)}(t,e,r+i,o,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[o,a]:[a,o];return t().then((()=>e()))}return Promise.all([o(),a(n.delay)])}function el(t,e){return t.sortNodePosition(e)}const nl=Ar.length;function il(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&il(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<nl;n++){const i=Ar[n],r=t.props[i];(_r(r)||!1===r)&&(e[i]=r)}return e}const rl=[...Sr].reverse(),sl=Sr.length;function ol(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map((e=>tl(t,e,n)));i=Promise.all(r)}else if("string"==typeof e)i=tl(t,e,n);else{const r="function"==typeof e?Tr(t,e,n.custom):e;i=Promise.all(Qa(t,r,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function al(t){let e=ol(t),n=ul(),i=!0;const r=e=>(n,i)=>{var r;const s=Tr(t,i,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function s(s){const{props:o}=t,a=il(t.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let e=0;e<sl;e++){const h=rl[e],p=n[h],m=void 0!==o[h]?o[h]:a[h],f=_r(m),y=h===s?p.isActive:null;!1===y&&(d=e);let g=m===a[h]&&m!==o[h]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!m&&!p.prevProp||gr(m)||"boolean"==typeof m)continue;const v=ll(p.prevProp,m);let b=v||h===s&&p.isActive&&!g&&f||e>d&&f,_=!1;const x=Array.isArray(m)?m:[m];let w=x.reduce(r(h),{});!1===y&&(w={});const{prevResolvedValues:T={}}=p,S={...T,...w},A=e=>{b=!0,c.has(e)&&(_=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=w[t],n=T[t];if(u.hasOwnProperty(t))continue;let i=!1;i=vr(e)&&vr(n)?!br(e,n):e!==n,i?null!=e?A(t):c.add(t):void 0!==e&&c.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(u={...u,...w}),i&&t.blockInitialAnimation&&(b=!1);b&&(!(g&&v)||_)&&l.push(...x.map((t=>({animation:t,options:{type:h}}))))}if(c.size){const e={};c.forEach((n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=null!=i?i:null})),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,i){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const o=s(e);for(const t in n)n[t].protectedKeys={};return o},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ul(),i=!0}}}function ll(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!br(e,t)}function cl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ul(){return{animate:cl(!0),whileInView:cl(),whileHover:cl(),whileTap:cl(),whileDrag:cl(),whileFocus:cl(),exit:cl()}}class dl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let hl=0;const pl={animation:{Feature:class extends dl{constructor(t){super(t),t.animationState||(t.animationState=al(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends dl{constructor(){super(...arguments),this.id=hl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},ml=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function fl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const yl=t=>e=>ml(e)&&t(e,fl(e));function gl(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function vl(t,e,n,i){return gl(t,e,yl(n),i)}const bl=(t,e)=>Math.abs(t-e);class _l{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Tl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=bl(t.x,e.x),i=bl(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=$r;this.history.push({...i,timestamp:r});const{onStart:s,onMove:o}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=xl(e,this.transformPagePoint),Ir.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=Tl("pointercancel"===t.type?this.lastMoveEventInfo:xl(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!ml(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const s=xl(fl(t),this.transformPagePoint),{point:o}=s,{timestamp:a}=$r;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Tl(s,this.history)),this.removeListeners=Zo(vl(this.contextWindow,"pointermove",this.handlePointerMove),vl(this.contextWindow,"pointerup",this.handlePointerUp),vl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function xl(t,e){return e?{point:e(t.point)}:t}function wl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Tl({point:t},e){return{point:t,delta:wl(t,Al(e)),offset:wl(t,Sl(e)),velocity:Pl(e,.1)}}function Sl(t){return t[0]}function Al(t){return t[t.length-1]}function Pl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Al(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Er(e)));)n--;if(!i)return{x:0,y:0};const s=Nr(r.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Cl(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const El=Cl("dragHorizontal"),Nl=Cl("dragVertical");function kl(t){let e=!1;if("y"===t)e=Nl();else if("x"===t)e=El();else{const t=El(),n=Nl();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Rl(){const t=kl(!0);return!t||(t(),!1)}function Ml(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Ol=.9999,Dl=1.0001,Ll=-.01,Vl=.01;function jl(t){return t.max-t.min}function Fl(t,e,n,i=.5){t.origin=i,t.originPoint=ta(e.min,e.max,t.origin),t.scale=jl(n)/jl(e),t.translate=ta(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ol&&t.scale<=Dl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ll&&t.translate<=Vl||isNaN(t.translate))&&(t.translate=0)}function Bl(t,e,n,i){Fl(t.x,e.x,n.x,i?i.originX:void 0),Fl(t.y,e.y,n.y,i?i.originY:void 0)}function Ul(t,e,n){t.min=n.min+e.min,t.max=t.min+jl(e)}function Il(t,e,n){t.min=e.min-n.min,t.max=t.min+jl(e)}function Hl(t,e,n){Il(t.x,e.x,n.x),Il(t.y,e.y,n.y)}function $l(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ql(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Wl=.35;function zl(t,e,n){return{min:Kl(t,e),max:Kl(t,n)}}function Kl(t,e){return"number"==typeof t?t:t[e]||0}const Yl=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Xl=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Gl(t){return[t("x"),t("y")]}function Jl({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Zl(t){return void 0===t||1===t}function Ql({scale:t,scaleX:e,scaleY:n}){return!Zl(t)||!Zl(e)||!Zl(n)}function tc(t){return Ql(t)||ec(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ec(t){return nc(t.x)||nc(t.y)}function nc(t){return t&&"0%"!==t}function ic(t,e,n){return n+e*(t-n)}function rc(t,e,n,i,r){return void 0!==r&&(t=ic(t,r,i)),ic(t,n,i)+e}function sc(t,e=0,n=1,i,r){t.min=rc(t.min,e,n,i,r),t.max=rc(t.max,e,n,i,r)}function oc(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}const ac=.999999999999,lc=1.0000000000001;function cc(t,e){t.min=t.min+e,t.max=t.max+e}function uc(t,e,n,i,r=.5){sc(t,e,n,ta(t.min,t.max,r),i)}function dc(t,e){uc(t.x,e.x,e.scaleX,e.scale,e.originX),uc(t.y,e.y,e.scaleY,e.scale,e.originY)}function hc(t,e){return Jl(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const pc=({current:t})=>t?t.ownerDocument.defaultView:null,mc=new WeakMap;class fc{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xl(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new _l(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(fl(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=kl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gl((t=>{let e=this.getAxisMotionValue(t).get()||0;if(_s.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=jl(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),r&&Ir.postRender((()=>r(t,e))),Ja(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:s}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:o}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(o),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Gl((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:pc(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&Ir.postRender((()=>r(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!yc(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?ta(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?ta(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&Ml(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:$l(t.x,n,r),y:$l(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Wl){return!1===t?t=0:!0===t&&(t=Wl),{x:zl(t,"left","right"),y:zl(t,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Gl((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ml(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=hc(t,n),{scroll:r}=e;return r&&(cc(i.x,r.offset.x),cc(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:ql(t.x,e.x),y:ql(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=Jl(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Gl((o=>{if(!yc(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,d={type:"inertia",velocity:n?t[o]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,d)}));return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ja(this.visualElement,t),n.start(Fa(t,n,0,e,this.visualElement,!1))}stopAnimation(){Gl((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Gl((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Gl((e=>{const{drag:n}=this.getProps();if(!yc(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e];r.set(t[e]-ta(n,s,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ml(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gl((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=jl(t),r=jl(e);return r>i?n=Qo(e.min,e.max-i,t.min):i>r&&(n=Qo(t.min,t.max-r,e.min)),ms(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gl((e=>{if(!yc(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];n.set(ta(r,s,i[e]))}))}addListeners(){if(!this.visualElement.current)return;mc.set(this.visualElement,this);const t=vl(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();Ml(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Ir.read(e);const r=gl(window,"resize",(()=>this.scalePositionWithinConstraints())),s=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Gl((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{r(),t(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:s=Wl,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function yc(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const gc=t=>(e,n)=>{t&&Ir.postRender((()=>t(e,n)))};const vc=U(null);function bc(){const t=lt(vc);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=function(){var t=et(I++,11);if(!t.__){for(var e=H.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}();it((()=>i(r)),[]);const s=at((()=>n&&n(r)),[r,n]);return!e&&n?[!1,s]:[!0]}const _c=U({}),xc=U({}),wc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tc(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Sc={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!xs.test(t))return t;t=parseFloat(t)}return`${Tc(t,e.target.x)}% ${Tc(t,e.target.y)}%`}},Ac={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=lo.parse(t);if(r.length>5)return i;const s=lo.createTransformer(t),o="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=ta(a,l,.5);return"number"==typeof r[2+o]&&(r[2+o]/=c),"number"==typeof r[3+o]&&(r[3+o]/=c),s(r)}},Pc={};const{schedule:Cc,cancel:Ec}=Ur(queueMicrotask,!1);class Nc extends _{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;var s;s=Rc,Object.assign(Pc,s),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",(()=>{this.safeToRemove()})),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),wc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,s=n.projection;return s?(s.isPresent=r,i||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?s.promote():s.relegate()||Ir.postRender((()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cc.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kc(t){const[e,n]=bc(),i=lt(_c);return gt(Nc,{...t,layoutGroup:i,switchLayoutGroup:lt(xc),isPresent:e,safeToRemove:n})}const Rc={borderRadius:{...Sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sc,borderTopRightRadius:Sc,borderBottomLeftRadius:Sc,borderBottomRightRadius:Sc,boxShadow:Ac},Mc=["TopLeft","TopRight","BottomLeft","BottomRight"],Oc=Mc.length,Dc=t=>"string"==typeof t?parseFloat(t):t,Lc=t=>"number"==typeof t||xs.test(t);function Vc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const jc=Bc(0,.5,ns),Fc=Bc(.5,.95,Fr);function Bc(t,e,n){return i=>i<t?0:i>e?1:n(Qo(t,e,i))}function Uc(t,e){t.min=e.min,t.max=e.max}function Ic(t,e){Uc(t.x,e.x),Uc(t.y,e.y)}function Hc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $c(t,e,n,i,r){return t=ic(t-=e,1/n,i),void 0!==r&&(t=ic(t,1/r,i)),t}function qc(t,e,[n,i,r],s,o){!function(t,e=0,n=1,i=.5,r,s=t,o=t){_s.test(e)&&(e=parseFloat(e),e=ta(o.min,o.max,e/100)-o.min);if("number"!=typeof e)return;let a=ta(s.min,s.max,i);t===s&&(a-=e),t.min=$c(t.min,e,n,a,r),t.max=$c(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,s,o)}const Wc=["x","scaleX","originX"],zc=["y","scaleY","originY"];function Kc(t,e,n,i){qc(t.x,e,Wc,n?n.x:void 0,i?i.x:void 0),qc(t.y,e,zc,n?n.y:void 0,i?i.y:void 0)}function Yc(t){return 0===t.translate&&1===t.scale}function Xc(t){return Yc(t.x)&&Yc(t.y)}function Gc(t,e){return t.min===e.min&&t.max===e.max}function Jc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Zc(t,e){return Jc(t.x,e.x)&&Jc(t.y,e.y)}function Qc(t){return jl(t.x)/jl(t.y)}function tu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class eu{constructor(){this.members=[]}add(t){Ia(this.members,t),t.scheduleRender()}remove(t){if(Ha(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const nu=(t,e)=>t.depth-e.depth;class iu{constructor(){this.children=[],this.isDirty=!1}add(t){Ia(this.children,t),this.isDirty=!0}remove(t){Ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nu),this.isDirty=!1,this.children.forEach(t)}}function ru(t){const e=Ga(t)?t.get():t;return Ba(e)?e.toValue():e}const su={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ou="undefined"!=typeof window&&void 0!==window.MotionDebug,au=["","X","Y","Z"],lu={visibility:"hidden"};let cu=0;function uu(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function du(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Xa(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ir,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&du(i)}function hu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=cu++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ou&&(su.totalNodes=su.resolvedTargetDeltas=su.recalculatedProjection=0),this.nodes.forEach(fu),this.nodes.forEach(wu),this.nodes.forEach(Tu),this.nodes.forEach(yu),ou&&window.MotionDebug.record(su)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iu)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new $a),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=e)instanceof SVGElement&&"svg"!==i.tagName,this.instance=e;const{layoutId:r,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||r)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Po.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(Hr(i),t(s-e))};return Ir.read(i,!0),()=>Hr(i)}(i,250),wc.hasAnimatedSinceResize&&(wc.hasAnimatedSinceResize=!1,this.nodes.forEach(xu))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||s)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||o.getDefaultTransition()||Nu,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Zc(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...Dr(r,"layout"),onPlay:s,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||xu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Su),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&du(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const t=this.path[r];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(vu);this.isUpdating||this.nodes.forEach(bu),this.isUpdating=!1,this.nodes.forEach(_u),this.nodes.forEach(pu),this.nodes.forEach(mu),this.clearAllSnapshots();const t=Po.now();$r.delta=ms(0,1e3/60,t-$r.timestamp),$r.timestamp=t,$r.isProcessing=!0,qr.update.process($r),qr.preRender.process($r),qr.render.process($r),$r.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gu),this.sharedNodes.forEach(Au)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ir.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ir.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Xl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Xc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&(e||tc(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Mu((i=n).x),Mu(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Xl();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Du))){const{scroll:t}=this.root;t&&(cc(n.x,t.offset.x),cc(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Xl();if(Ic(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let i=0;i<this.path.length;i++){const e=this.path[i],{scroll:r,options:s}=e;e!==this.root&&r&&s.layoutScroll&&(r.wasRoot&&Ic(n,t),cc(n.x,r.offset.x),cc(n.y,r.offset.y))}return n}applyTransform(t,e=!1){const n=Xl();Ic(n,t);for(let i=0;i<this.path.length;i++){const t=this.path[i];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&dc(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),tc(t.latestValues)&&dc(n,t.latestValues)}return tc(this.latestValues)&&dc(n,this.latestValues),n}removeTransform(t){const e=Xl();Ic(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!tc(t.latestValues))continue;Ql(t.latestValues)&&t.updateSnapshot();const i=Xl();Ic(i,t.measurePageBox()),Kc(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,i)}return tc(this.latestValues)&&Kc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$r.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:s}=this.options;if(this.layout&&(r||s)){if(this.resolvedRelativeTargetAt=$r.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xl(),this.relativeTargetOrigin=Xl(),Hl(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,a,l;if(this.target||(this.target=Xl(),this.targetWithTransforms=Xl()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,Ul(o.x,a.x,l.x),Ul(o.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ic(this.target,this.layout.layoutBox),oc(this.target,this.targetDelta)):Ic(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xl(),this.relativeTargetOrigin=Xl(),Hl(this.relativeTargetOrigin,this.target,t.target),Ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ou&&su.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ql(this.parent.latestValues)&&!ec(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===$r.timestamp&&(i=!1),i)return;const{layout:r,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!s)return;Ic(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let s,o;e.x=e.y=1;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:r}=s.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&dc(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,oc(t,o)),i&&tc(s.latestValues)&&dc(t,s.latestValues))}e.x<lc&&e.x>ac&&(e.x=1),e.y<lc&&e.y>ac&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Xl());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Hc(this.prevProjectionDelta.x,this.projectionDelta.x),Hc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Bl(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&tu(this.projectionDelta.x,this.prevProjectionDelta.x)&&tu(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ou&&su.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yl(),this.projectionDelta=Yl(),this.projectionDeltaWithTransform=Yl()}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},s=Yl();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const o=Xl(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Eu));let d;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,y;Pu(s.x,t.x,n),Pu(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hl(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,y=n,Cu(p.x,m.x,f.x,y),Cu(p.y,m.y,f.y,y),d&&(l=this.relativeTarget,h=d,Gc(l.x,h.x)&&Gc(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d=Xl()),Ic(d,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,s){r?(t.opacity=ta(0,void 0!==n.opacity?n.opacity:1,jc(i)),t.opacityExit=ta(void 0!==e.opacity?e.opacity:1,0,Fc(i))):s&&(t.opacity=ta(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let o=0;o<Oc;o++){const r=`border${Mc[o]}Radius`;let s=Vc(e,r),a=Vc(n,r);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Lc(s)===Lc(a)?(t[r]=Math.max(ta(Dc(s),Dc(a),i),0),(_s.test(a)||_s.test(s))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=ta(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ir.update((()=>{wc.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=Ga(t)?t:Wa(t);return i.start(Fa("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ou(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Xl();const e=jl(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=jl(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ic(e,n),dc(e,r),Bl(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new eu);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&uu("z",t,i,this.animationValues);for(let r=0;r<au.length;r++)uu(`rotate${au[r]}`,t,i,this.animationValues),uu(`skew${au[r]}`,t,i,this.animationValues);t.render();for(const r in i)t.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return lu;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=ru(null==t?void 0:t.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ru(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!tc(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1),e}const o=s.animationValues||s.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=(null==n?void 0:n.z)||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:s,skewX:o,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),s&&(i+=`rotateY(${s}deg) `),o&&(i+=`skewX(${o}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,o),r&&(i.transform=r(o,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,s.animationValues?i.opacity=s===this?null!==(n=null!==(e=o.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:i.opacity=s===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const c in Pc){if(void 0===o[c])continue;const{correct:t,applyTo:e}=Pc[c],n="none"===i.transform?o[c]:t(o[c],s);if(e){const t=e.length;for(let r=0;r<t;r++)i[e[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=s===this?ru(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(vu),this.root.sharedNodes.clear()}}}function pu(t){t.updateLayout()}function mu(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:r}=t.options,s=n.source!==t.layout.source;"size"===r?Gl((t=>{const i=s?n.measuredBox[t]:n.layoutBox[t],r=jl(i);i.min=e[t].min,i.max=i.min+r})):Ou(r,n.layoutBox,e)&&Gl((i=>{const r=s?n.measuredBox[i]:n.layoutBox[i],o=jl(e[i]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+o)}));const o=Yl();Bl(o,e,n.layoutBox);const a=Yl();s?Bl(a,t.applyTransform(i,!0),n.measuredBox):Bl(a,e,n.layoutBox);const l=!Xc(o);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:s}=i;if(r&&s){const o=Xl();Hl(o,n.layoutBox,r.layoutBox);const a=Xl();Hl(a,e,s.layoutBox),Zc(o,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function fu(t){ou&&su.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function yu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function gu(t){t.clearSnapshot()}function vu(t){t.clearMeasurements()}function bu(t){t.isLayoutDirty=!1}function _u(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xu(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wu(t){t.resolveTargetDelta()}function Tu(t){t.calcProjection()}function Su(t){t.resetSkewAndRotation()}function Au(t){t.removeLeadSnapshot()}function Pu(t,e,n){t.translate=ta(e.translate,0,n),t.scale=ta(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cu(t,e,n,i){t.min=ta(e.min,n.min,i),t.max=ta(e.max,n.max,i)}function Eu(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Nu={duration:.45,ease:[.4,0,.1,1]},ku=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ru=ku("applewebkit/")&&!ku("chrome/")?Math.round:Fr;function Mu(t){t.min=Ru(t.min),t.max=Ru(t.max)}function Ou(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Qc(e),r=Qc(n),s=.2,!(Math.abs(i-r)<=s));var i,r,s}function Du(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Lu=hu({attachResizeListener:(t,e)=>gl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},ju=hu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Vu.current){const t=new Lu({});t.mount(window),t.setOptions({layoutScroll:!0}),Vu.current=t}return Vu.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Fu={pan:{Feature:class extends dl{constructor(){super(...arguments),this.removePointerDownListener=Fr}onPointerDown(t){this.session=new _l(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:gc(t),onStart:gc(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Ir.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=vl(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends dl{constructor(t){super(t),this.removeGroupControls=Fr,this.removeListeners=Fr,this.controls=new fc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Fr}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ju,MeasureLayout:kc}};function Bu(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return vl(t.current,n,((n,r)=>{if("touch"===n.pointerType||Rl())return;const s=t.getProps();t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",e);const o=s[i];o&&Ir.postRender((()=>o(n,r)))}),{passive:!t.getProps()[i]})}const Uu=(t,e)=>!!e&&(t===e||Uu(t,e.parentElement));function Iu(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,fl(n))}const Hu=new WeakMap,$u=new WeakMap,qu=t=>{const e=Hu.get(t.target);e&&e(t)},Wu=t=>{t.forEach(qu)};function zu(t,e,n){const i=function({root:t,...e}){const n=t||document;$u.has(n)||$u.set(n,{});const i=$u.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Wu,{root:t,...e})),i[r]}(e);return Hu.set(t,n),i.observe(t),()=>{Hu.delete(t),i.unobserve(t)}}const Ku={some:0,all:1};const Yu={inView:{Feature:class extends dl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ku[i]};return zu(this.node.current,s,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends dl{constructor(){super(...arguments),this.removeStartListeners=Fr,this.removeEndListeners=Fr,this.removeAccessibleListeners=Fr,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=vl(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),s=r||Uu(this.node.current,t.target)?n:i;s&&Ir.update((()=>s(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),r=vl(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Zo(i,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=gl(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=gl(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Iu("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Ir.postRender((()=>n(t,e)))}))})),Iu("down",((t,e)=>{this.startPress(t,e)}))})),e=gl(this.node.current,"blur",(()=>{this.isPressing&&Iu("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Zo(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ir.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Rl()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ir.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=vl(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=gl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Zo(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends dl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Zo(gl(this.node.current,"focus",(()=>this.onFocus())),gl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends dl{mount(){this.unmount=Zo(Bu(this.node,!0),Bu(this.node,!1))}unmount(){}}}},Xu={layout:{ProjectionNode:ju,MeasureLayout:kc}},Gu=U({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ju=U({}),Zu="undefined"!=typeof window,Qu=Zu?rt:it,td=U({strict:!1});function ed(t,e,n,i,r){var s,o;const{visualElement:a}=lt(Ju),l=lt(td),c=lt(vc),u=lt(Gu).reducedMotion,d=st();i=i||l.renderer,!d.current&&i&&(d.current=i(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const h=d.current,p=lt(xc);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:nd(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:Boolean(o)||a&&Ml(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(d.current,n,r,p);const m=st(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[Ya],y=st(Boolean(f)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,f))&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,f)));return Qu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Cc.render(h.render),y.current&&h.animationState&&h.animationState.animateChanges())})),it((()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask((()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,f)})),y.current=!1))})),h}function nd(t){if(t)return!1!==t.options.allowProjection?t.projection:nd(t.parent)}function id(t,e,n){return at((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):Ml(n)&&(n.current=i))}),[e])}function rd(t){return gr(t.animate)||Ar.some((e=>_r(t[e])))}function sd(t){return Boolean(rd(t)||t.variants)}function od(t){const{initial:e,animate:n}=function(t,e){if(rd(t)){const{initial:e,animate:n}=t;return{initial:!1===e||_r(e)?e:void 0,animate:_r(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,lt(Ju));return ot((()=>({initial:e,animate:n})),[ad(e),ad(n)])}function ad(t){return Array.isArray(t)?t.join(" "):t}const ld={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},cd={};for(const Oh in ld)cd[Oh]={isEnabled:t=>ld[Oh].some((e=>!!t[e]))};const ud=Symbol.for("motionComponentSymbol");function dd({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&function(t){for(const e in t)cd[e]={...cd[e],...t[e]}}(t);const s=function(t){function e(e){var n=gi({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=xi,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((function(t,s){let o;const a={...lt(Gu),...t,layoutId:hd(t)},{isStatic:l}=a,c=od(t),u=i(t,l);if(!l&&Zu){lt(td).strict;const t=function(t){const{drag:e,layout:n}=cd;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);o=t.MeasureLayout,c.visualElement=ed(r,u,a,e,t.ProjectionNode)}return gt(Ju.Provider,{value:c,children:[o&&c.visualElement?gt(o,{visualElement:c.visualElement,...a}):null,n(r,t,id(u,c.visualElement,s),u,l,c.visualElement)]})}));return s[ud]=r,s}function hd({layoutId:t}){const e=lt(_c).id;return e&&void 0!==t?e+"-"+t:t}const pd=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function md(t){return"string"==typeof t&&!t.includes("-")&&!!(pd.indexOf(t)>-1||/[A-Z]/u.test(t))}function fd(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const s in n)t.style.setProperty(s,n[s])}const yd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function gd(t,e,n,i){fd(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(yd.has(r)?r:Ka(r),e.attrs[r])}function vd(t,{layout:e,layoutId:n}){return Cr.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Pc[t]||"opacity"===t)}function bd(t,e,n){var i;const{style:r}=t,s={};for(const o in r)(Ga(r[o])||e.style&&Ga(e.style[o])||vd(o,t)||void 0!==(null===(i=null==n?void 0:n.getValue(o))||void 0===i?void 0:i.liveStyle))&&(s[o]=r[o]);return s}function _d(t,e,n){const i=bd(t,e,n);for(const r in t)if(Ga(t[r])||Ga(e[r])){i[-1!==Pr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return i}const xd=t=>(e,n)=>{const i=lt(Ju),r=lt(vc),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,s){const o={latestValues:wd(i,r,s,t),renderState:e()};return n&&(o.mount=t=>n(i,t,o)),o}(t,e,i,r);return n?s():function(t){const e=st(null);return null===e.current&&(e.current=t()),e.current}(s)};function wd(t,e,n,i){const r={},s=i(t,{});for(const h in s)r[h]=ru(s[h]);let{initial:o,animate:a}=t;const l=rd(t),c=sd(t);e&&c&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===o;const d=u?a:o;if(d&&"boolean"!=typeof d&&!gr(d)){const e=Array.isArray(d)?d:[d];for(let n=0;n<e.length;n++){const i=wr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const i in n){let t=n[i];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(r[i]=t)}for(const i in t)r[i]=t[i]}}}return r}const Td=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Sd=()=>({...Td(),attrs:{}}),Ad=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Pd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cd=Pr.length;function Ed(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const t=e[l];if(Cr.has(l))o=!0;else if(ls(l))r[l]=t;else{const e=Ad(t,go[l]);l.startsWith("origin")?(a=!0,s[l]=e):i[l]=e}}if(e.transform||(o||n?i.transform=function(t,e,n){let i="",r=!0;for(let s=0;s<Cd;s++){const o=Pr[s],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Ad(a,go[o]);l||(r=!1,i+=`${Pd[o]||o}(${t}) `),n&&(e[o]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=s;i.transformOrigin=`${t} ${e} ${n}`}}function Nd(t,e,n){return"string"==typeof t?t:xs.transform(e+n*t)}const kd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rd={offset:"strokeDashoffset",array:"strokeDasharray"};function Md(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ed(t,c,d),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Nd(e,t.x,t.width)} ${Nd(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==s?s:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==o&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?kd:Rd;t[s.offset]=xs.transform(-i);const o=xs.transform(e),a=xs.transform(n);t[s.array]=`${o} ${a}`}(h,o,a,l,!1)}const Od=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Dd={useVisualState:xd({scrapeMotionValuesFromProps:_d,createRenderState:Sd,onMount:(t,e,{renderState:n,latestValues:i})=>{Ir.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),Ir.render((()=>{Md(n,i,Od(e.tagName),t.transformTemplate),gd(e,n)}))}})},Ld={useVisualState:xd({scrapeMotionValuesFromProps:bd,createRenderState:Td})};function Vd(t,e,n){for(const i in e)Ga(e[i])||vd(i,n)||(t[i]=e[i])}function jd(t,e){const n={};return Vd(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return ot((()=>{const n=Td();return Ed(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Fd(t,e){const n={},i=jd(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Bd=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ud(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Bd.has(t)}let Id=t=>!Ud(t);try{(Hd=require("@emotion/is-prop-valid").default)&&(Id=t=>t.startsWith("on")?!Ud(t):Hd(t))}catch(Mh){}var Hd;function $d(t,e,n,i){const r=ot((()=>{const n=Sd();return Md(n,e,Od(i),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Vd(e,t.style,t),r.style={...e,...r.style}}return r}function qd(t=!1){return(e,n,i,{latestValues:r},s)=>{const o=(md(e)?$d:Fd)(n,r,s,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(Id(r)||!0===n&&Ud(r)||!e&&!Ud(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==b?{...a,...o,ref:i}:{},{children:c}=n;return g(e,{...l,children:ot((()=>Ga(c)?c.get():c),[c])})}}function Wd(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return dd({...md(n)?Dd:Ld,preloadedFeatures:t,useRender:qd(i),createVisualElement:e,Component:n})}}const zd={current:null},Kd={current:!1};const Yd=new WeakMap,Xd=[...Os,Gs,lo],Gd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Jd{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Us,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Po.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Ir.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=rd(e),this.isVariantNode=sd(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const d in u){const t=u[d];void 0!==a[d]&&Ga(t)&&t.set(a[d],!1)}}mount(t){this.current=t,Yd.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Kd.current||function(){if(Kd.current=!0,Zu)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>zd.current=t.matches;t.addListener(e),e()}else zd.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||zd.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Yd.delete(this.current),this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Cr.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Ir.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),r(),s&&s(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in cd){const e=cd[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xl()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Gd.length;n++){const e=Gd[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Ga(r))t.addValue(i,r);else if(Ga(s))t.addValue(i,Wa(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Wa(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wa(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=i&&("string"==typeof i&&(os(i)||rs(i))?i=parseFloat(i):(r=i,!Xd.find(Ms(r))&&lo.test(e)&&(i=_o(t,e))),this.setBaseTarget(t,Ga(i)?i.get():i)),Ga(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=wr(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||Ga(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new $a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Zd extends Jd{constructor(){super(...arguments),this.KeyframeResolver=wo}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class Qd extends Zd{constructor(){super(...arguments),this.type="html",this.renderInstance=fd}readValueFromInstance(t,e){if(Cr.has(e)){const t=bo(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),r=(ls(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return hc(t,e)}build(t,e,n){Ed(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return bd(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ga(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class th extends Zd{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Xl}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Cr.has(e)){const t=bo(e);return t&&t.default||0}return e=yd.has(e)?e:Ka(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return _d(t,e,n)}build(t,e,n){Md(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){gd(t,e,0,i)}mount(t){this.isSVGTag=Od(t.tagName),super.mount(t)}}const eh=yr(Wd({...pl,...Yu,...Fu,...Xu},((t,e)=>md(t)?new th(e):new Qd(e,{allowProjection:t!==b}))));var nh=(t=>(t.EmailAddress="EmailAddress",t.MobileNumber="MobileNumber",t.CustomerId="CustomerId",t))(nh||{});const ih=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var rh=(t=>(t.Established="Established",t.Unestablished="Unestablished",t))(rh||{});const sh=t=>!!/\+\d{1,14}$/.test(t),oh=t=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),ah=()=>{const[t,e]=nt([]),[n,i]=nt(!1),[r,s]=nt(""),[o,a]=nt(!1),[l,c]=nt(!1),u=st(),d=st(),h=st({searchType:nh.MobileNumber,searchValue:""}),p=at((async(t,n)=>{let r;if(h.current={searchType:t,searchValue:n},i(!0),a(!1),s(""),t===nh.EmailAddress)r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e=(t=>({emailAddress:t}))(t);return(await Jn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(e))).data})(n);else if(t===nh.MobileNumber)r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e={mobileNumber:t},n=[],i=await Jn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(e));return n.push(i.data),n})(n);else{if(t!==nh.CustomerId)return i(!1),void s("Invalid search type.");r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e=[],n=await Jn.get(`/_admin/v1.0/customer/${t}`);return e.push(n.data),e})(n)}r.then((t=>{e(t),i(!1),t.length>0?(u.current=t[0].id,a(!0)):s("No results found!")})).catch((()=>{s("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async(t,e)=>{u.current&&await(async(t,e,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={mobileNumber:e,reason:n};await Zn.put(`/_admin/v1.0/customers/${t}/mobileNumber`,JSON.stringify(i))})(u.current,t,e)},f=async(t,e)=>{u.current&&await(async(t,e,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={emailAddress:e,reason:n};await Zn.put(`/_admin/v1.0/customers/${t}/emailAddress`,JSON.stringify(i))})(u.current,t,e)};return{searchFilter:h,searchCustomerResult:t,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:o,searchCustomer:p,handleAction:async e=>{const{action:n}=e;switch(n){case"workplaceUnlink":await(async e=>{t.find((t=>t.apolloProfiles.find((t=>t.profileId===e&&t.status===rh.Established))))&&(c(!0),d.current=e)})(e.profileId);break;case"updateMobileNumber":await m(e.mobileNumber,e.reason);break;case"updateEmailAddress":await f(e.emailAddress,e.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{d.current&&(async t=>{if(!Jn)throw new Error("Api has not been initialized");await Jn.put(`/_admin/v1.0/workplace-link/${t}/unestablish`)})(d.current).then((async()=>{await(async()=>{await p(h.current.searchType,h.current.searchValue)})()})).catch((()=>{s("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},lh=()=>{const[t,e]=nt(nh.MobileNumber),[n,i]=nt("+61"),[r,s]=nt({emailAddress:"",mobileNumber:"",customerId:""}),o=at((()=>{s({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=at((t=>!!sh(t)||(s((t=>({...t,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=at(((t,e)=>{const n=t.trim();if(!n){const{label:t,name:n}=(t=>{const e=ih.find((e=>nh[e.searchType]===nh[t]));return e?{name:e.name,label:e.label}:{name:"",label:""}})(e);return s((e=>({...e,[t]:`Empty ${n}`}))),!1}return!(e===nh.EmailAddress&&!oh(n))||(s((t=>({...t,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:t,searchValue:n,errors:r,setSearchType:e,setSearchValue:i,clearErrors:o,isValidSearch:at(((t,e)=>{switch(t){case nh.EmailAddress:case nh.CustomerId:return l(e,t);case nh.MobileNumber:return a(e);default:return!1}}),[l,a])}},ch=({labelText:t,name:e,type:n,value:i,pattern:r,className:s,allowedKeyPattern:o,required:a,onClick:l,onChange:c,...u})=>{const d=at((t=>{o&&!o.test(t.key)&&t.preventDefault()}),[o]);return gt(b,{children:[t&>("label",{className:"block text-sm font-bold text-gray-700",children:t}),gt("input",{required:a??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${s}`,name:e,type:n,value:i,onKeyPress:d,pattern:r,onClick:l,onChange:c,...u})]})},uh=({message:t,className:e,onClick:n})=>gt("div",{className:e,onClick:n,children:t}),dh=t=>{const{searchType:e,searchValue:n,errors:i,setSearchType:r,setSearchValue:s,clearErrors:o,isValidSearch:a}=lh(),[l,c]=nt(!0),u=()=>{o(),c(!1)},d=t=>{const e=t.currentTarget;c(!1),s(e.value),o()};return gt(b,{children:gt("div",{className:"flex flex-col p-2",children:[gt("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),gt("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(e,n)&&(c(!0),t.onSubmit(e,n))},children:[gt("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:e,onChange:t=>{o();const e=t.currentTarget.value;r(e),s("")},"data-testid":"select",children:ih.map((t=>gt("option",{value:t.searchType,children:t.name},t.searchType)))}),gt("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[e===nh.EmailAddress&>(ch,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:u,onChange:d}),e===nh.MobileNumber&>(ch,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:u,onChange:d}),e===nh.CustomerId&>(ch,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:n,className:"sm:w-3/5",onClick:u,onChange:d})]}),gt("div",{className:"mt-2",children:Object.values(i).map(((t,e)=>gt(uh,{message:t,className:"text-sm text-red-600 sm:text-right"},e)))}),gt("div",{className:"sm:flex justify-end sm:mt-6",children:gt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},hh=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),ph=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),mh=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),fh=t=>g("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...t},g("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),yh=t=>g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...t},g("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),gh=t=>g("svg",{className:"feather feather-edit",fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t},g("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),g("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})),vh=t=>{var e,n,i,r,s,o,a;const[l,c]=nt(t.data.apolloProfiles.length>0),u=t.data.apolloProfiles.length>0,d=ot((()=>t.data.apolloProfiles.slice().sort(((t,e)=>{const n=t.status.localeCompare(e.status);return 0!==n?n:t.profileId.localeCompare(e.profileId)}))),[t.data.apolloProfiles]);return gt(b,{children:[gt("tr",{className:"divide-x divide-gray-200",children:[gt("td",{className:"whitespace-nowrap px-2 text-sm",children:gt("span",{onClick:()=>{u&&c(!l)},children:[!u&>(mh,{className:"h-6 w-6 border-0"}),u&>((()=>gt(b,{children:gt(l?ph:hh,{className:"h-6 w-6 border-0 cursor-pointer"})})),{})]})}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.id}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(e=t.data.name)?void 0:e.firstName}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(n=t.data.name)?void 0:n.lastName}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:gt("div",{className:"flex justify-between items-center",children:[null==(i=t.data.email)?void 0:i.value,(null==(s=null==(r=t.data)?void 0:r.email)?void 0:s.isVerified)&>(yh,{className:"h-4 w-4 border-0"}),t.searchType!==nh.EmailAddress&>("span",{onClick:()=>t.onEdit("emailAddress"),children:gt(gh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:gt("div",{className:"flex justify-between items-center",children:[t.data.mobileNumber,t.searchType!==nh.EmailAddress&>("span",{onClick:()=>t.onEdit("mobileNumber"),children:gt(gh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(o=t.data.kyc)?void 0:o.address.state}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(a=t.data.kyc)?void 0:a.dateOfBirth.substring(0,10)}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?"True":"False"})]},t.key),l&>(b,{children:gt("tr",{className:"divide-x divide-gray-200",children:gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[gt("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),gt("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:gt("table",{className:"min-w-full divide-y divide-gray-500",children:[gt("thead",{className:"bg-gray-50",children:gt("tr",{className:"divide-x divide-gray-200",children:[gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),gt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:gt("span",{className:"sr-only",children:"Action"})})]})}),gt("tbody",{className:"divide-y divide-gray-200 bg-white",children:d.map(((e,n)=>gt("tr",{className:"divide-x divide-gray-200",children:[gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.profileId}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountId}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.partnerId}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.status}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountName}),gt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:gt("span",{onClick:()=>t.onAction({action:"workplaceUnlink",profileId:e.profileId}),children:gt(fh,{className:"h-6 w-6 border-0 "+(e.status===rh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},bh=t=>gt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:gt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:gt("table",{className:"min-w-full divide-y divide-gray-500",children:[gt("thead",{className:"bg-gray-50",children:gt("tr",{className:"divide-x divide-gray-200",children:[gt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:gt("span",{className:"sr-only",children:"Action"})}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),gt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),gt("tbody",{className:"divide-y divide-gray-200 bg-white",children:t.data.map(((e,n)=>gt(vh,{title:"Apollo Profiles",data:e,searchType:t.searchType,onAction:t.onAction,onEdit:t.onEdit},n)))})]})})}),_h=t=>{const{inputValue:e,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:s,setInputValue:o,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:u}=((t,e)=>{const[n,i]=nt(t.value),[r,s]=nt(!1),[o,a]=nt(""),[l,c]=nt([]),[u,d]=nt(!1),h=at((()=>{c([])}),[]),p=at((()=>{s(!1),a("")}),[]),m=at(((t,e)=>{c((n=>[...n,{text:t,type:e}]))}),[]),f=at((()=>""!==o.trim()),[o]),y=at((()=>!("emailAddress"===t.type&&!oh(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===t.type&&!sh(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[t.type,n,m,f]),g=at((t=>{var e,n;if(t instanceof Vn){const i=(null==(n=null==(e=t.response)?void 0:e.data)?void 0:n.message)||"Failed to update mobile number.";m(i,"error")}else m("An unexpected error occurred.","error")}),[m]),v=at((async()=>{if(h(),y()){d(!0);try{await e("emailAddress"===t.type?{action:"updateEmailAddress",emailAddress:n,reason:o}:{action:"updateMobileNumber",mobileNumber:n,reason:o}),m(("emailAddress"===t.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){g(i)}finally{d(!1)}}}),[h,y,t.type,p,e,n,o,m,g]);return{inputValue:n,reason:o,isCustomerIdentityVerified:r,messages:l,isSubmitting:u,setIsSubmitting:d,setInputValue:i,setReason:a,setIsVerifiedCustomerIdentity:s,clearMessages:h,handleSubmit:v}})(t.formData,t.onSubmit),d=t=>{const e=t.currentTarget;o(e.value),c()};return gt(b,{children:gt("div",{className:"flex flex-row mt-6 ml-4",children:gt("form",{onSubmit:async t=>{t.preventDefault(),await u()},children:gt("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[gt("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===t.formData.type?"Mobile Number":"Email Address"}),gt("div",{className:"sm:col-start-2",children:["mobileNumber"===t.formData.type&>(ch,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:e,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:d}),"emailAddress"===t.formData.type&>(ch,{name:"emailAddress",placeholder:"",type:"email",value:e,className:"w-full",onClick:c,onChange:d})]}),gt("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((t,e)=>gt(uh,{message:t.text,className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600")},e)))}),gt("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[gt("div",{className:"flex h-6 items-center",children:gt("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:t=>{const e=t.currentTarget;l(e.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),gt("div",{className:"ml-2 text-sm leading-6",children:gt("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),gt("div",{className:"col-start-2",children:gt(ch,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:t=>{const e=t.currentTarget;a(e.value),c()}})}),gt("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:gt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:s,children:"Update"})})]})})})})},xh=()=>gt("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[gt("div",{className:"flex space-x-4",children:[gt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),gt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),gt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),gt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((t,e)=>gt("div",{className:"flex space-x-4",children:[gt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),gt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),gt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),gt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},e)))]}),wh=()=>{const{searchCustomerResult:t,isLoading:e,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:s,searchCustomer:o,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=ah(),[u,d]=nt("searchResult"),[h,p]=nt(1);return gt(b,{children:["searchResult"===u&>(eh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[gt(dh,{onSubmit:o}),!e&&i&>(eh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:gt(bh,{data:t,searchType:s.current.searchType,onAction:a,onEdit:t=>{p(1),d("mobileNumber"===t?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},u),"searchResult"!==u&>(eh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:gt(Ji,{buttonName:"Customer Management",onClick:()=>{p(-1),d("searchResult")},children:gt(_h,{formData:"editMobileNumber"==u?{value:t[0].mobileNumber,type:"mobileNumber"}:{value:t[0].email.value,type:"emailAddress"},onSubmit:a})})},u),gt(zi,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c}),e&>(xh,{}),n&>("div",{className:"p-4 mt-2 text-red-700",children:n})]})};var Th=(t=>(t.Search="Search",t.BenefitsPlan="Benefits Plan",t))(Th||{});function Sh(){return(Sh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var Ah=["context","children"];function Ph(t){return this.getChildContext=function(){return t.context},B(t.children,function(t,e){if(null==t)return{};var n,i,r={},s=Object.keys(t);for(i=0;i<s.length;i++)e.indexOf(n=s[i])>=0||(r[n]=t[n]);return r}(t,Ah))}function Ch(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=g(Ph,Sh({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var i=[],r={},s=0,o=e.attributes,a=e.childNodes;for(s=o.length;s--;)"slot"!==o[s].name&&(r[o[s].name]=o[s].value,r[Eh(o[s].name)]=o[s].value);for(s=a.length;s--;){var l=t(a[s],null),c=a[s].slot;c?r[c]=g(Rh,{name:c},l):i[s]=l}var u=n?g(Rh,null,i):i;return g(n||e.nodeName.toLowerCase(),r,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?F:j)(this._vdom,this._root)}function Eh(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function Nh(t,e,n){if(this._vdom){var i={};i[t]=n=null==n?void 0:n,i[Eh(t)]=n,this._vdom=B(this._vdom,i),j(this._vdom,this._root)}}function kh(){j(this._vdom=null,this._root)}function Rh(t,e){var n=this;return g("slot",Sh({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(t,e,n,i){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=e,e}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=Ch,r.prototype.attributeChangedCallback=Nh,r.prototype.disconnectedCallback=kh,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach((function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,r)}((t=>{const e={backendUrl:t["backend-url"],accessToken:t["access-token"]};it((()=>{ti(e.backendUrl,e.accessToken,"customer-profile"),ti(e.backendUrl,e.accessToken,"flare-app-identity"),ti(e.backendUrl,e.accessToken,"benefits-plan")}),[e.backendUrl,e.accessToken]);const[n,i]=nt("Search"),r=at((t=>t===n),[n]);return gt(b,{children:[gt("style",{children:"@tailwind base;@tailwind components;@tailwind utilities;".toString()}),gt(vt,{tabTitles:Object.entries(Th).map((([,t])=>t)),currentTab:n,onChange:i}),gt(tr,{visible:r("Search"),children:gt(wh,{})}),gt(tr,{visible:r("Benefits Plan"),children:gt(fr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"]);
|
1
|
+
var t,e,n,i,r,o,s,a,l,c,d,u={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function f(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function y(e,n,i){var r,o,s,a={};for(s in n)"key"==s?r=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return v(e,a,r,o,null)}function v(t,i,r,o,s){var a={type:t,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=e.vnode&&e.vnode(a),a}function b(t){return t.children}function w(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function _(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return _(t)}}function k(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!T.__r++||r!==e.debounceRendering)&&((r=e.debounceRendering)||o)(T)}function T(){var t,n,r,o,a,l,c,d;for(i.sort(s);t=i.shift();)t.__d&&(n=i.length,o=void 0,l=(a=(r=t).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,e.vnode&&e.vnode(o),M(r.__P,o,a,r.__n,r.__P.namespaceURI,32&a.__u?[l]:null,c,null==l?x(a):l,!!(32&a.__u),d),o.__v=a.__v,o.__.__k[o.__i]=o,O(c,o,d),o.__e!=l&&_(o)),i.length>n&&i.sort(s));T.__r=0}function S(t,e,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=e.length;for(n.__d=l,function(t,e,n){var i,r,o,s,a,l=e.length,c=n.length,d=c,u=0;for(t.__k=[],i=0;i<l;i++)s=i+u,null!=(r=t.__k[i]=null==(r=e[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?v(null,r,null,null,null):m(r)?v(b,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?v(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=t,r.__b=t.__b+1,a=C(r,n,s,d),r.__i=a,o=null,-1!==a&&(d--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>l-s?u+=a-s:u--:a<s?a==s-1&&(u=a-s):u=0,a!==i+u&&(r.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o,!1),n[s]=null,d--);if(d)for(i=0;i<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o))}(n,e,_),l=n.__d,p=0;p<k;p++)null!=(g=n.__k[p])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?u:_[g.__i]||u,g.__i=p,M(t,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&D(f.ref,null,g),d.push(g.ref,g.__c||y,g)),null==w&&null!=y&&(w=y),65536&g.__u||f.__k===g.__k?(l&&!l.isConnected&&(l=x(f)),l=A(g,l,t)):"function"==typeof g.type&&void 0!==g.__d?l=g.__d:y&&(l=y.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=l,n.__e=w}function A(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=A(i[r],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(m(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function C(t,e,n,i){var r=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&r==l.key&&o===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function E(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function N(t,e,n,i,r){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||E(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||E(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=a,t.addEventListener(e,o?c:l,o)):t.removeEventListener(e,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function R(t){return function(n){if(this.l){var i=this.l[n.type+t];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(e.event?e.event(n):n)}}}function M(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,A,P,C,E,R,M,O,D,L,V=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=e.__b)&&p(i);t:if("function"==typeof V)try{if(P=i.props,C=(p=V.contextType)&&o[p.__c],E=p?C?C.props.value:p.__:o,r.__c?A=(y=i.__c=r.__c).__=y.__E:("prototype"in V&&V.prototype.render?i.__c=y=new V(P,E):(i.__c=y=new w(P,E),y.constructor=V,y.render=j),C&&C.sub(y),y.props=P,y.state||(y.state={}),y.context=E,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=V.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,V.getDerivedStateFromProps(P,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==V.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==V.getDerivedStateFromProps&&P!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(P,E),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(P,y.__s,E)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=P,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(t){t&&(t.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break t}null!=y.componentWillUpdate&&y.componentWillUpdate(P,y.__s,E),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=E,y.props=P,y.__P=n,y.__e=!1,M=e.__r,O=0,"prototype"in V&&V.prototype.render){for(y.state=y.__s,y.__d=!1,M&&M(i),p=y.render(y.props,y.state,y.context),D=0;D<y._sb.length;D++)y.__h.push(y._sb[D]);y._sb=[]}else do{y.__d=!1,M&&M(i),p=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++O<25);y.state=y.__s,null!=y.getChildContext&&(o=f(f({},o),y.getChildContext())),v||null==y.getSnapshotBeforeUpdate||(T=y.getSnapshotBeforeUpdate(_,k)),S(n,m(L=null!=p&&p.type===b&&null==p.key?p.props.children:p)?L:[L],i,r,o,s,a,l,c,d,h),y.base=i.__e,i.__u&=-161,y.__h.length&&l.push(y),A&&(y.__E=y.__=null)}catch(F){i.__v=null,d||null!=a?(i.__e=c,i.__u|=d?160:32,a[a.indexOf(c)]=null):(i.__e=r.__e,i.__k=r.__k),e.__e(F,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(e,n,i,r,o,s,a,l,c){var d,h,p,f,y,v,b,w=i.props,_=n.props,k=n.type;if("svg"===k?o="http://www.w3.org/2000/svg":"math"===k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((y=s[d])&&"setAttribute"in y==!!k&&(k?y.localName===k:3===y.nodeType)){e=y,s[d]=null;break}if(null==e){if(null===k)return document.createTextNode(_);e=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&e.data===_||(e.data=_);else{if(s=s&&t.call(e.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<e.attributes.length;d++)w[(y=e.attributes[d]).name]=y.value;for(d in w)if(y=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=y;else if("key"!==d&&!(d in _)){if("value"==d&&"defaultValue"in _||"checked"==d&&"defaultChecked"in _)continue;N(e,d,null,y,o)}for(d in _)y=_[d],"children"==d?f=y:"dangerouslySetInnerHTML"==d?h=y:"value"==d?v=y:"checked"==d?b=y:"key"===d||l&&"function"!=typeof y||w[d]===y||N(e,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(p&&(e.innerHTML=""),S(e,m(f)?f:[f],n,i,r,"foreignObject"===k?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:i.__k&&x(i,0),l,c),null!=s)for(d=s.length;d--;)null!=s[d]&&g(s[d]);l||(d="value",void 0!==v&&(v!==e[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(e,d,v,w[d],o),d="checked",void 0!==b&&b!==e[d]&&N(e,d,b,w[d],o))}return e}(r.__e,i,r,o,s,a,l,d,h);(p=e.diffed)&&p(i)}function O(t,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)D(i[r],i[++r],i[++r]);e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(t){t.call(n)}))}catch(i){e.__e(i,n.__v)}}))}function D(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(r){e.__e(r,i)}}function L(t,n,i){var r,o;if(e.unmount&&e.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||D(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){e.__e(s,n)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof t.type);i||null==t.__e||g(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function j(t,e,n){return this.constructor(t,n)}function V(n,i,r){var o,s,a,l;e.__&&e.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],M(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?t.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),O(a,n,l)}function F(t,e){V(t,e,F)}function B(e,n,i){var r,o,s,a,l=f({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==s?r=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):i),v(e.type,l,r||e.key,o||e.ref,null)}function U(t,e){var n={__c:e="__cC"+d++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,k(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}t=h.slice,e={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(a){t=a}throw t}},n=0,w.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;const I="*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.row-span-3{grid-row:span 3 / span 3}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-1\\/4{width:25%}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-900:hover{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}@media (min-width: 640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:col-span-3{grid-column:span 3 / span 3}.sm\\:col-start-1{grid-column-start:1}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-start-4{grid-column-start:4}.sm\\:row-start-1{grid-row-start:1}.sm\\:-mx-4{margin-left:-1rem;margin-right:-1rem}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-12{margin-left:3rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-6{margin-top:1.5rem}.sm\\:flex{display:flex}.sm\\:table-cell{display:table-cell}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-1\\/2{width:50%}.sm\\:w-10{width:2.5rem}.sm\\:w-3\\/5{width:60%}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-center{justify-content:center}.sm\\:gap-10{gap:2.5rem}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pr-6{padding-right:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-right{text-align:right}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:mx-0{margin-left:0;margin-right:0}.md\\:rounded-lg{border-radius:.5rem}}@media (min-width: 1024px){.lg\\:table-cell{display:table-cell}}@media (min-width: 1280px){.xl\\:table-cell{display:table-cell}}@media (min-width: 1536px){.\\32xl\\:table-cell{display:table-cell}}";var z,H,$,q,W=0,K=[],Y=[],X=e,G=X.__b,J=X.__r,Z=X.diffed,Q=X.__c,tt=X.unmount,et=X.__;function nt(t,e){X.__h&&X.__h(H,t,W||e),W=0;var n=H.__H||(H.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Y}),n.__[t]}function it(t){return W=1,function(t,e,n){var i=nt(z++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):gt(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=H,!H.u)){var r=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!o||o.call(this,t,e,n))};H.u=!0;var o=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(t,e,n){if(this.__e){var i=o;o=void 0,r(t,e,n),o=i}s&&s.call(this,t,e,n)},H.shouldComponentUpdate=r}return i.__N||i.__}(gt,t)}function rt(t,e){var n=nt(z++,3);!X.__s&&ft(n.__H,e)&&(n.__=t,n.i=e,H.__H.__h.push(n))}function ot(t,e){var n=nt(z++,4);!X.__s&&ft(n.__H,e)&&(n.__=t,n.i=e,H.__h.push(n))}function st(t){return W=5,at((function(){return{current:t}}),[])}function at(t,e){var n=nt(z++,7);return ft(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function lt(t,e){return W=8,at((function(){return t}),e)}function ct(t){var e=H.context[t.__c],n=nt(z++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(H)),e.props.value):t.__}function dt(){for(var t;t=K.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(pt),t.__H.__h.forEach(mt),t.__H.__h=[]}catch(e){t.__H.__h=[],X.__e(e,t.__v)}}X.__b=function(t){H=null,G&&G(t)},X.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),et&&et(t,e)},X.__r=function(t){J&&J(t),z=0;var e=(H=t.__c).__H;e&&($===H?(e.__h=[],H.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Y,t.__N=t.i=void 0}))):(e.__h.forEach(pt),e.__h.forEach(mt),e.__h=[],z=0)),$=H},X.diffed=function(t){Z&&Z(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==K.push(e)&&q===X.requestAnimationFrame||((q=X.requestAnimationFrame)||ht)(dt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Y&&(t.__=t.__V),t.i=void 0,t.__V=Y}))),$=H=null},X.__c=function(t,e){e.some((function(t){try{t.__h.forEach(pt),t.__h=t.__h.filter((function(t){return!t.__||mt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],X.__e(n,t.__v)}})),Q&&Q(t,e)},X.unmount=function(t){tt&&tt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{pt(t)}catch(n){e=n}})),n.__H=void 0,e&&X.__e(e,n.__v))};var ut="function"==typeof requestAnimationFrame;function ht(t){var e,n=function(){clearTimeout(i),ut&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);ut&&(e=requestAnimationFrame(n))}function pt(t){var e=H,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),H=e}function mt(t){var e=H;t.__c=t.__(),H=e}function ft(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function gt(t,e){return"function"==typeof e?e(t):e}var yt=0;function vt(t,n,i,r,o,s){n||(n={});var a,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?a=n[l]:c[l]=n[l];var d={type:t,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--yt,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof t&&(a=t.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return e.vnode&&e.vnode(d),d}const bt=function({tabTitles:t,currentTab:e,onChange:n}){const[i,r]=it(e),o=lt((t=>{r(t),n(t)}),[n]);return vt("div",{class:"border-b border-gray-200",children:vt("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:t.map((t=>vt("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===t?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(t),children:t},t)))})})};var wt=(t=>(t.Assessment="Assessment",t.Quiz="Quiz",t.Poll="Poll",t.Trivia="Trivia",t.Article="Article",t.Url="Url",t.Contact="Contact",t.Deeplink="Deeplink",t.Advertisement="Advertisement",t))(wt||{}),xt=(t=>(t.Cars="Cars",t.Health="Health",t.Everyday="Everyday",t.Devices="Devices",t.Energy="Energy",t.SavingsAccount="Savings Account*",t.HomeLoan="Home Loan*",t.MobileAndInternet="Mobile & Internet",t))(xt||{});const _t=t=>{var e;const n=t,i=(null==(e=n.response)?void 0:e.data)?n.response.data:void 0;return(null==i?void 0:i.message)??n.message},kt=(t,e=3)=>{const n=t.split(" ");return n.length>e?`${n.slice(0,e).join(" ")}...`:t},Tt=(t,e)=>{switch(t){case wt.Trivia:return"Trivia";case wt.Assessment:switch(e){case xt.Cars:return"SalaryPackagingCars";case xt.HomeLoan:return"HomeLoan"}return e.replace(/\s+/g,"");default:return"None"}},St=t=>{switch(t){case xt.SavingsAccount:return["Banking"];case xt.Cars:return["Cars"];case xt.Devices:case xt.Health:case xt.Energy:case xt.Everyday:return[t];case"None":return["Miscellaneous"];case xt.HomeLoan:case xt.MobileAndInternet:default:return[]}},At=t=>{switch(t){case xt.Cars:return["NovatedLease"];case xt.Health:return["HealthInsurance"];case xt.SavingsAccount:return["SavingsAccount"];case xt.Devices:case xt.Energy:return[t];case xt.HomeLoan:return["HomeLoan"];case xt.MobileAndInternet:case xt.Everyday:default:return[]}},Pt=(t,e,n)=>{const i=t.products[0],r=Ct(t,e);r?r.isFeatured=n??!1:i.activities.push({id:e,isFeatured:n??!1})},Ct=(t,e)=>t.products[0].activities.find((t=>t.id===e));function Et(t,e){return function(){return t.apply(e,arguments)}}const{toString:Nt}=Object.prototype,{getPrototypeOf:Rt}=Object,Mt=(t=>e=>{const n=Nt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ot=t=>(t=t.toLowerCase(),e=>Mt(e)===t),Dt=t=>e=>typeof e===t,{isArray:Lt}=Array,jt=Dt("undefined");const Vt=Ot("ArrayBuffer");const Ft=Dt("string"),Bt=Dt("function"),Ut=Dt("number"),It=t=>null!==t&&"object"==typeof t,zt=t=>{if("object"!==Mt(t))return!1;const e=Rt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Ht=Ot("Date"),$t=Ot("File"),qt=Ot("Blob"),Wt=Ot("FileList"),Kt=Ot("URLSearchParams"),[Yt,Xt,Gt,Jt]=["ReadableStream","Request","Response","Headers"].map(Ot);function Zt(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),Lt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let s;for(i=0;i<o;i++)s=r[i],e.call(null,t[s],s,t)}}function Qt(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ee=t=>!jt(t)&&t!==te;const ne=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&Rt(Uint8Array)),ie=Ot("HTMLFormElement"),re=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),oe=Ot("RegExp"),se=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Zt(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)},ae="abcdefghijklmnopqrstuvwxyz",le="0123456789",ce={DIGIT:le,ALPHA:ae,ALPHA_DIGIT:ae+ae.toUpperCase()+le};const de=Ot("AsyncFunction"),ue=(he="function"==typeof setImmediate,pe=Bt(te.postMessage),he?setImmediate:pe?(me=`axios@${Math.random()}`,fe=[],te.addEventListener("message",(({source:t,data:e})=>{t===te&&e===me&&fe.length&&fe.shift()()}),!1),t=>{fe.push(t),te.postMessage(me,"*")}):t=>setTimeout(t));var he,pe,me,fe;const ge="undefined"!=typeof queueMicrotask?queueMicrotask.bind(te):"undefined"!=typeof process&&process.nextTick||ue,ye={isArray:Lt,isArrayBuffer:Vt,isBuffer:function(t){return null!==t&&!jt(t)&&null!==t.constructor&&!jt(t.constructor)&&Bt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Bt(t.append)&&("formdata"===(e=Mt(t))||"object"===e&&Bt(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Vt(t.buffer),e},isString:Ft,isNumber:Ut,isBoolean:t=>!0===t||!1===t,isObject:It,isPlainObject:zt,isReadableStream:Yt,isRequest:Xt,isResponse:Gt,isHeaders:Jt,isUndefined:jt,isDate:Ht,isFile:$t,isBlob:qt,isRegExp:oe,isFunction:Bt,isStream:t=>It(t)&&Bt(t.pipe),isURLSearchParams:Kt,isTypedArray:ne,isFileList:Wt,forEach:Zt,merge:function t(){const{caseless:e}=ee(this)&&this||{},n={},i=(i,r)=>{const o=e&&Qt(n,r)||r;zt(n[o])&&zt(i)?n[o]=t(n[o],i):zt(i)?n[o]=t({},i):Lt(i)?n[o]=i.slice():n[o]=i};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Zt(arguments[r],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(Zt(e,((e,i)=>{n&&Bt(e)?t[i]=Et(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,o,s;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],i&&!i(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&Rt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:Mt,kindOfTest:Ot,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(Lt(t))return t;let e=t.length;if(!Ut(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:ie,hasOwnProperty:re,hasOwnProp:re,reduceDescriptors:se,freezeMethods:t=>{se(t,((e,n)=>{if(Bt(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];Bt(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return Lt(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Qt,global:te,isContextDefined:ee,ALPHABET:ce,generateString:(t=16,e=ce.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&Bt(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(It(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=Lt(t)?[]:{};return Zt(t,((t,e)=>{const o=n(t,i+1);!jt(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:de,isThenable:t=>t&&(It(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),setImmediate:ue,asap:ge};function ve(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}ye.inherits(ve,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:ye.toJSONObject(this.config),code:this.code,status:this.status}}});const be=ve.prototype,we={};["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((t=>{we[t]={value:t}})),Object.defineProperties(ve,we),Object.defineProperty(be,"isAxiosError",{value:!0}),ve.from=(t,e,n,i,r,o)=>{const s=Object.create(be);return ye.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ve.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};function xe(t){return ye.isPlainObject(t)||ye.isArray(t)}function _e(t){return ye.endsWith(t,"[]")?t.slice(0,-2):t}function ke(t,e,n){return t?t.concat(e).map((function(t,e){return t=_e(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Te=ye.toFlatObject(ye,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Se(t,e,n){if(!ye.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=ye.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ye.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(e);if(!ye.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(ye.isDate(t))return t.toISOString();if(!a&&ye.isBlob(t))throw new ve("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(t)||ye.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(ye.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(ye.isArray(t)&&function(t){return ye.isArray(t)&&!t.some(xe)}(t)||(ye.isFileList(t)||ye.endsWith(n,"[]"))&&(a=ye.toArray(t)))return n=_e(n),a.forEach((function(t,i){!ye.isUndefined(t)&&null!==t&&e.append(!0===s?ke([n],i,o):null===s?n:n+"[]",l(t))})),!1;return!!xe(t)||(e.append(ke(r,n,o),l(t)),!1)}const d=[],u=Object.assign(Te,{defaultVisitor:c,convertValue:l,isVisitable:xe});if(!ye.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!ye.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),ye.forEach(n,(function(n,o){!0===(!(ye.isUndefined(n)||null===n)&&r.call(e,n,ye.isString(o)?o.trim():o,i,u))&&t(n,i?i.concat(o):[o])})),d.pop()}}(t),e}function Ae(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Pe(t,e){this._pairs=[],t&&Se(t,this,e)}const Ce=Pe.prototype;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(t,e,n){if(!e)return t;const i=n&&n.encode||Ee,r=n&&n.serialize;let o;if(o=r?r(e,n):ye.isURLSearchParams(e)?e.toString():new Pe(e,n).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}Ce.append=function(t,e){this._pairs.push([t,e])},Ce.toString=function(t){const e=t?function(e){return t.call(this,e,Ae)}:Ae;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Re{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ye.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,Le="object"==typeof navigator&&navigator||void 0,je=De&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0),Ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Fe=De&&window.location.href||"http://localhost",Be={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:De,hasStandardBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Ve,navigator:Le,origin:Fe},Symbol.toStringTag,{value:"Module"})),...Oe};function Ue(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=t.length;if(o=!o&&ye.isArray(i)?i.length:o,a)return ye.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&ye.isObject(i[o])||(i[o]=[]);return e(t,n,i[o],r)&&ye.isArray(i[o])&&(i[o]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}(i[o])),!s}if(ye.isFormData(t)&&ye.isFunction(t.entries)){const n={};return ye.forEachEntry(t,((t,i)=>{e(function(t){return ye.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const Ie={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=ye.isObject(t);r&&ye.isHTMLForm(t)&&(t=new FormData(t));if(ye.isFormData(t))return i?JSON.stringify(Ue(t)):t;if(ye.isArrayBuffer(t)||ye.isBuffer(t)||ye.isStream(t)||ye.isFile(t)||ye.isBlob(t)||ye.isReadableStream(t))return t;if(ye.isArrayBufferView(t))return t.buffer;if(ye.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Se(t,new Be.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Be.isNode&&ye.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=ye.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Se(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(ye.isString(t))try{return(e||JSON.parse)(t),ye.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ie.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(ye.isResponse(t)||ye.isReadableStream(t))return t;if(t&&ye.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw ve.from(r,ve.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(t=>{Ie.headers[t]={}}));const ze=ye.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"]),He=Symbol("internals");function $e(t){return t&&String(t).trim().toLowerCase()}function qe(t){return!1===t||null==t?t:ye.isArray(t)?t.map(qe):String(t)}function We(t,e,n,i,r){return ye.isFunction(i)?i.call(this,e,n):(r&&(e=n),ye.isString(e)?ye.isString(i)?-1!==e.indexOf(i):ye.isRegExp(i)?i.test(e):void 0:void 0)}let Ke=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=$e(e);if(!r)throw new Error("header name must be a non-empty string");const o=ye.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=qe(t))}const o=(t,e)=>ye.forEach(t,((t,n)=>r(t,n,e)));if(ye.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(ye.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&ze[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e);else if(ye.isHeaders(t))for(const[s,a]of t.entries())r(a,s,n);else null!=t&&r(e,t,n);return this}get(t,e){if(t=$e(t)){const n=ye.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(ye.isFunction(e))return e.call(this,t,n);if(ye.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=$e(t)){const n=ye.findKey(this,t);return!(!n||void 0===this[n]||e&&!We(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=$e(t)){const r=ye.findKey(n,t);!r||e&&!We(0,n[r],r,e)||(delete n[r],i=!0)}}return ye.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!We(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return ye.forEach(this,((i,r)=>{const o=ye.findKey(n,r);if(o)return e[o]=qe(i),void delete e[r];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete e[r],e[s]=qe(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ye.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&ye.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=$e(t);e[i]||(!function(t,e){const n=ye.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return ye.isArray(t)?t.forEach(i):i(t),this}};function Ye(t,e){const n=this||Ie,i=e||n,r=Ke.from(i.headers);let o=i.data;return ye.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function Xe(t){return!(!t||!t.__CANCEL__)}function Ge(t,e,n){ve.call(this,null==t?"canceled":t,ve.ERR_CANCELED,e,n),this.name="CanceledError"}function Je(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Ke.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ye.freezeMethods(Ke),ye.inherits(Ge,ve,{__CANCEL__:!0});const Ze=(t,e,n=3)=>{let i=0;const r=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-r<e)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(t,e){let n,i,r=0,o=1e3/e;const s=(e,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-r;a>=o?s(t,e):(n=t,i||(i=setTimeout((()=>{i=null,s(n)}),o-a)))},()=>n&&s(n)]}((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,l=r(a);i=o;t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Qe=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},tn=t=>(...e)=>ye.asap((()=>t(...e))),en=Be.hasStandardBrowserEnv?function(){const t=Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=ye.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}(),nn=Be.hasStandardBrowserEnv?{write(t,e,n,i,r,o){const s=[t+"="+encodeURIComponent(e)];ye.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ye.isString(i)&&s.push("path="+i),ye.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function rn(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const on=t=>t instanceof Ke?{...t}:t;function sn(t,e){e=e||{};const n={};function i(t,e,n){return ye.isPlainObject(t)&&ye.isPlainObject(e)?ye.merge.call({caseless:n},t,e):ye.isPlainObject(e)?ye.merge({},e):ye.isArray(e)?e.slice():e}function r(t,e,n){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function o(t,e){if(!ye.isUndefined(e))return i(void 0,e)}function s(t,e){return ye.isUndefined(e)?ye.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,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:(t,e)=>r(on(t),on(e),!0)};return ye.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=l[i]||r,s=o(t[i],e[i],i);ye.isUndefined(s)&&o!==a||(n[i]=s)})),n}const an=t=>{const e=sn({},t);let n,{data:i,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=e;if(e.headers=a=Ke.from(a),e.url=Ne(rn(e.baseURL,e.url),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ye.isFormData(i))if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Be.hasStandardBrowserEnv&&(r&&ye.isFunction(r)&&(r=r(e)),r||!1!==r&&en(e.url))){const t=o&&s&&nn.read(s);t&&a.set(o,t)}return e},ln="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const i=an(t);let r=i.data;const o=Ke.from(i.headers).normalize();let s,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(s),i.signal&&i.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=Ke.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Je((function(t){e(t),m()}),(function(t){n(t),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new ve("Request aborted",ve.ECONNABORTED,t,f)),f=null)},f.onerror=function(){n(new ve("Network Error",ve.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Me;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ve(e,r.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,t,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&ye.forEach(o.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),ye.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Ze(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Ze(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=e=>{f&&(n(!e||e.type?new Ge(null,t,f):e),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);y&&-1===Be.protocols.indexOf(y)?n(new ve("Unsupported protocol "+y+":",ve.ERR_BAD_REQUEST,t)):f.send(r||null)}))},cn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController;const r=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;i.abort(e instanceof ve?e:new Ge(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,r(new ve(`timeout ${e} of ms exceeded`,ve.ETIMEDOUT))}),e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>ye.asap(s),a}},dn=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},un=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},hn=(t,e,n,i)=>{const r=async function*(t,e){for await(const n of un(t))yield*dn(n,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await r.next();if(e)return a(),void t.close();let o=i.byteLength;if(n){let t=s+=o;n(t)}t.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},pn="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,mn=pn&&"function"==typeof ReadableStream,fn=pn&&("function"==typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),gn=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},yn=mn&&gn((()=>{let t=!1;const e=new Request(Be.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),vn=mn&&gn((()=>ye.isReadableStream(new Response("").body))),bn={stream:vn&&(t=>t.body)};var wn;pn&&(wn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!bn[t]&&(bn[t]=ye.isFunction(wn[t])?e=>e[t]():(e,n)=>{throw new ve(`Response type '${t}' is not supported`,ve.ERR_NOT_SUPPORT,n)})})));const xn=async(t,e)=>{const n=ye.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ye.isBlob(t))return t.size;if(ye.isSpecCompliantForm(t)){const e=new Request(Be.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ye.isArrayBufferView(t)||ye.isArrayBuffer(t)?t.byteLength:(ye.isURLSearchParams(t)&&(t+=""),ye.isString(t)?(await fn(t)).byteLength:void 0)})(e):n},_n={http:null,xhr:ln,fetch:pn&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:d,withCredentials:u="same-origin",fetchOptions:h}=an(t);c=c?(c+"").toLowerCase():"text";let p,m=cn([r,o&&o.toAbortSignal()],s);const f=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(l&&yn&&"get"!==n&&"head"!==n&&0!==(g=await xn(d,i))){let t,n=new Request(e,{method:"POST",body:i,duplex:"half"});if(ye.isFormData(i)&&(t=n.headers.get("content-type"))&&d.setContentType(t),n.body){const[t,e]=Qe(g,Ze(tn(l)));i=hn(n.body,65536,t,e)}}ye.isString(u)||(u=u?"include":"omit");const r="credentials"in Request.prototype;p=new Request(e,{...h,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:r?u:void 0});let o=await fetch(p);const s=vn&&("stream"===c||"response"===c);if(vn&&(a||s&&f)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=o[e]}));const e=ye.toFiniteNumber(o.headers.get("content-length")),[n,i]=a&&Qe(e,Ze(tn(a),!0))||[];o=new Response(hn(o.body,65536,n,(()=>{i&&i(),f&&f()})),t)}c=c||"text";let y=await bn[ye.findKey(bn,c)||"text"](o,t);return!s&&f&&f(),await new Promise(((e,n)=>{Je(e,n,{data:y,headers:Ke.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:p})}))}catch(y){if(f&&f(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new ve("Network Error",ve.ERR_NETWORK,t,p),{cause:y.cause||y});throw ve.from(y,y&&y.code,t,p)}})};ye.forEach(_n,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const kn=t=>`- ${t}`,Tn=t=>ye.isFunction(t)||null===t||!1===t,Sn=t=>{t=ye.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let o=0;o<e;o++){let e;if(n=t[o],i=n,!Tn(n)&&(i=_n[(e=String(n)).toLowerCase()],void 0===i))throw new ve(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+o]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ve("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(kn).join("\n"):" "+kn(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function An(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ge(null,t)}function Pn(t){An(t),t.headers=Ke.from(t.headers),t.data=Ye.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Sn(t.adapter||Ie.adapter)(t).then((function(e){return An(t),e.data=Ye.call(t,t.transformResponse,e),e.headers=Ke.from(e.headers),e}),(function(e){return Xe(e)||(An(t),e&&e.response&&(e.response.data=Ye.call(t,t.transformResponse,e.response),e.response.headers=Ke.from(e.response.headers))),Promise.reject(e)}))}const Cn="1.7.7",En={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{En[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Nn={};En.transitional=function(t,e,n){function i(t,e){return"[Axios v1.7.7] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new ve(i(r," has been removed"+(e?" in "+e:"")),ve.ERR_DEPRECATED);return e&&!Nn[r]&&(Nn[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,o)}};const Rn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new ve("option "+o+" must be "+n,ve.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ve("Unknown option "+o,ve.ERR_BAD_OPTION)}},validators:En},Mn=Rn.validators;let On=class{constructor(t){this.defaults=t,this.interceptors={request:new Re,response:new Re}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(i){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=sn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Rn.assertOptions(n,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),null!=i&&(ye.isFunction(i)?e.paramsSerializer={serialize:i}:Rn.assertOptions(i,{encode:Mn.function,serialize:Mn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&ye.merge(r.common,r[e.method]);r&&ye.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Ke.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let d,u=0;if(!a){const t=[Pn.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,l),d=t.length,c=Promise.resolve(e);u<d;)c=c.then(t[u++],t[u++]);return c}d=s.length;let h=e;for(u=0;u<d;){const t=s[u++],e=s[u++];try{h=t(h)}catch(p){e.call(this,p);break}}try{c=Pn.call(this,h)}catch(p){return Promise.reject(p)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(t){return Ne(rn((t=sn(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}};ye.forEach(["delete","get","head","options"],(function(t){On.prototype[t]=function(e,n){return this.request(sn(n||{},{method:t,url:e,data:(n||{}).data}))}})),ye.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(sn(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}On.prototype[t]=e(),On.prototype[t+"Form"]=e(!0)}));const Dn={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(Dn).forEach((([t,e])=>{Dn[e]=t}));const Ln=function t(e){const n=new On(e),i=Et(On.prototype.request,n);return ye.extend(i,On.prototype,n,{allOwnKeys:!0}),ye.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(sn(e,n))},i}(Ie);Ln.Axios=On,Ln.CanceledError=Ge,Ln.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new Ge(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},Ln.isCancel=Xe,Ln.VERSION=Cn,Ln.toFormData=Se,Ln.AxiosError=ve,Ln.Cancel=Ln.CanceledError,Ln.all=function(t){return Promise.all(t)},Ln.spread=function(t){return function(e){return t.apply(null,e)}},Ln.isAxiosError=function(t){return ye.isObject(t)&&!0===t.isAxiosError},Ln.mergeConfig=sn,Ln.AxiosHeaders=Ke,Ln.formToJSON=t=>Ue(ye.isHTMLForm(t)?new FormData(t):t),Ln.getAdapter=Sn,Ln.HttpStatusCode=Dn,Ln.default=Ln;const{Axios:jn,AxiosError:Vn,CanceledError:Fn,isCancel:Bn,CancelToken:Un,VERSION:In,all:zn,Cancel:Hn,isAxiosError:$n,spread:qn,toFormData:Wn,AxiosHeaders:Kn,HttpStatusCode:Yn,formToJSON:Xn,getAdapter:Gn,mergeConfig:Jn}=Ln;let Zn,Qn,ti;const ei=(t,e,n)=>{const i=`${t}/${n}`,r=Ln.create({baseURL:i,headers:{Authorization:`Bearer ${e}`}});switch(n){case"customer-profile":Zn=r;break;case"flare-app-identity":Qn=r;break;case"benefits-plan":ti=r}return r},ni=async(t,e)=>{if(!ti)throw new Error("Api has not been initialized");return await ti.put(`/_admin/v1.0/categories/${t}`,e)},ii=async(t,e,n,i)=>{if(!ti)throw new Error("Api has not been initialized");try{if(await ti.put(`/_admin/v1.0/activities/${t}`,e),n){const e=Ct(n,t);if((null==e?void 0:e.isFeatured)!==i){Pt(n,t,i??!1);const e=n;await ni(n.id,e)}}}catch(r){throw new Error(`${_t(r)}`)}},ri=t=>{const[e,n]=it(!1),i=st(),r=lt((async e=>{try{const n=t.find((t=>t.id===e));if(!n)throw new Error("Category not found");const i={title:n.title,subtitle:n.subtitle,iconUrl:n.iconUrl,enabled:!n.enabled,displayOrder:n.displayOrder,products:n.products};await ni(e,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_t(i)}`)}finally{n(!1)}}),[t]),o=lt((async t=>{try{await(async t=>{if(!ti)throw new Error("Api has not been initialized");return await ti.post("/_admin/v1.0/categories",t)})(t)}catch(e){throw new Error(`${_t(e)}`)}}),[]),s=lt((async(t,e)=>{try{await ni(t,e)}catch(n){throw new Error(`${_t(n)}`)}}),[]);return{isModalOpen:e,handleAction:lt((async t=>{switch(t.type){case"updateVisibility":i.current=t.categoryId,n(!0);break;case"updateCategory":await s(t.categoryId,t.category);break;case"createCategory":await o(t.category);break;default:console.error(`Unhandled action type: ${t}`)}}),[o,s]),handleModalConfirm:lt((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:lt((()=>{n(!1)}),[])}};for(var oi,si=[],ai=0;ai<256;++ai)si.push((ai+256).toString(16).slice(1));var li=new Uint8Array(16);function ci(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(li)}const di={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ui(t,e,n){if(di.randomUUID&&!e&&!t)return di.randomUUID();var i=(t=t||{}).random||(t.rng||ci)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(si[t[e+0]]+si[t[e+1]]+si[t[e+2]]+si[t[e+3]]+"-"+si[t[e+4]]+si[t[e+5]]+"-"+si[t[e+6]]+si[t[e+7]]+"-"+si[t[e+8]]+si[t[e+9]]+"-"+si[t[e+10]]+si[t[e+11]]+si[t[e+12]]+si[t[e+13]]+si[t[e+14]]+si[t[e+15]]).toLowerCase()}(i)}const hi=({title:t,children:e})=>vt("div",{className:"mt-2",children:[vt("div",{className:"mt-9",children:vt("h1",{className:"text-2xl font-semibold text-gray-900",children:t})}),vt("div",{className:"w-1/2",children:e})]}),pi=({formFields:t,formData:e,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>vt(b,{children:[t.map((t=>t.display&&!t.display(o)?null:vt(b,{children:[vt("label",{className:"sm:col-start-1",children:t.label}),vt("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===t.type?"w-6 h-full":""),type:t.type,name:t.name,value:(t.type,e[t.name]),checked:"checkbox"===t.type?!!e[t.name]:void 0,disabled:t.disabled&&t.disabled(i.mode),required:t.isRequired,onChange:s})]},t.name))),vt("div",{className:"sm:col-start-4 flex justify-end",children:vt("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:n,children:"create"===i.mode?"Create":"Update"})}),vt("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((t,e)=>vt("div",{className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600 cursor-pointer"),children:t.text},e)))})]}),mi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},fi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],gi=({formMode:t,onChange:e})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((t,e)=>{const[n,i]=it(!1),[r,o]=it([]),[s,a]=it(mi),{handleAction:l}=ri([]);rt((()=>{if("update"===t.mode){const e={categoryId:t.initialCategory.id,title:t.initialCategory.title,subtitle:t.initialCategory.subtitle,iconUrl:t.initialCategory.iconUrl,displayOrder:t.initialCategory.displayOrder};a(e)}}),[t]);const c=lt(((t,e)=>{o((n=>[...n,{text:t,type:e}]))}),[]),d=lt((()=>{a({...mi})}),[]),u=lt((()=>{let t=!0;for(const e of fi)!e.isRequired||"text"!==e.type||s[e.name]&&""!==s[e.name].toString().trim()||(c(`${e.label} is required.`,"error"),t=!1);return t}),[s,c]),h=lt((()=>({...s,enabled:!1,products:[{id:ui(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=lt((t=>({...s,enabled:t.enabled,products:t.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===t.mode){const t=h();await l({type:"createCategory",category:t})}if("update"===t.mode){const e=p(t.initialCategory);await l({type:"updateCategory",categoryId:t.initialCategory.id,category:e})}c(`Category successfully ${"create"===t.mode?"created":"updated"}.`,"success"),d(),e()}catch(r){c(`Error ${"create"===t.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;a((t=>({...t,[n]:"number"===r?Number(i):i})))}}})(t,e),a="create"===t.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return vt(hi,{title:a,children:vt("form",{onSubmit:o,children:vt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:vt(pi,{formMode:t,formFields:fi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},yi=({disabled:t,children:e,onClick:n,...i})=>{const[r,o]=it(!1);return vt("button",{disabled:t||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(t){console.error("Error executing promise:",t)}finally{o(!1)}}},type:"submit",...i,children:e})};function vi(t,e){for(var n in e)t[n]=e[n];return t}function bi(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function wi(t,e){this.props=t,this.context=e}(wi.prototype=new w).isPureReactComponent=!0,wi.prototype.shouldComponentUpdate=function(t,e){return bi(this.props,t)||bi(this.state,e)};var xi=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),xi&&xi(t)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ki=e.__e;e.__e=function(t,e,n,i){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);ki(t,e,n,i)};var Ti=e.unmount;function Si(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=vi({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Si(t,e,n)}))),t}function Ai(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ai(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Pi(){this.__u=0,this.t=null,this.__b=null}function Ci(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ei(){this.u=null,this.o=null}e.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ti&&Ti(t)},(Pi.prototype=new w).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ci(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=Ai(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(s,s)},Pi.prototype.componentWillUnmount=function(){this.t=[]},Pi.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Si(this.__b,n,i.__O=i.__P)}this.__b=null}var r=e.__a&&y(b,null,t.fallback);return r&&(r.__u&=-33),[y(b,null,e.__a?null:t.children),r]};var Ni=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Ei.prototype=new w).__a=function(t){var e=this,n=Ci(e.__v),i=e.o.get(t);return i[0]++,function(r){var o=function(){e.props.revealOrder?(i.push(r),Ni(e,t,i)):r()};n?n(o):o()}},Ei.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Ei.prototype.componentDidUpdate=Ei.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ni(t,n,e)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Mi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Di=/[A-Z0-9]/g,Li="undefined"!=typeof document,ji=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Vi=e.event;function Fi(){}function Bi(){return this.cancelBubble}function Ui(){return this.defaultPrevented}e.event=function(t){return Vi&&(t=Vi(t)),t.persist=Fi,t.isPropagationStopped=Bi,t.isDefaultPrevented=Ui,t.nativeEvent=t};var Ii={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var r in e){var o=e[r];if(!("value"===r&&"defaultValue"in e&&null==o||Li&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ji(e.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Oi.test(r)?r=s:-1===n.indexOf("-")&&Mi.test(r)?r=r.replace(Di,"-$&").toLowerCase():null===o&&(o=void 0):s=r="oninput","oninput"===s&&i[r=s]&&(r="oninputCapture"),i[r]=o}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=P(e.children).forEach((function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=P(e.children).forEach((function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Ii)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ri,zi&&zi(t)};var Hi=e.__r;e.__r=function(t){Hi&&Hi(t),t.__c};var $i=e.diffed;e.diffed=function(t){$i&&$i(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var qi=ot;const Wi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),Ki=({isOpen:t,heading:e,message:n,onConfirm:i,onCancel:r})=>t?vt("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[vt("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),vt("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:vt("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:vt("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[vt("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:vt("div",{className:"sm:flex sm:items-start",children:[vt("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:vt(Wi,{className:"h-6 w-6 text-red-600"})}),vt("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[vt("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:e}),vt("div",{className:"mt-2",children:vt("p",{className:"text-sm text-gray-500",children:n})})]})]})}),vt("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[vt(yi,{onClick:i,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),vt("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:r,children:"Cancel"})]})]})})})]}):null,Yi=({headers:t,renderTableRows:e})=>vt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:vt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-20",children:t.map((t=>vt("th",{scope:"col",className:t.className,children:t.name},t.name)))})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:e()})]})})}),Xi=({error:t,isModalOpen:e,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>vt(b,{children:[vt("div",{className:"p-4 text-red-700",children:t}),!t&&vt("div",{className:"m-4",children:[vt("div",{className:"flex items-center",children:[vt("div",{className:"flex-auto",children:vt("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),vt("div",{className:"ml-16 mt-0 flex-none",children:vt("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:s})})]}),a,vt(Yi,{headers:r,renderTableRows:d})]}),vt(Ki,{isOpen:e,heading:n,message:i,onConfirm:c,onCancel:u})]}),Gi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Ji=({onClick:t,children:e})=>vt("div",{className:"mt-4",children:vt("div",{className:"flex justify-normal",children:[vt("span",{onClick:t,children:vt(Gi,{className:"h-6 w-6 border-0 cursor-pointer"})}),vt("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:e})]})}),Zi=({buttonName:t,onClick:e,children:n})=>vt(b,{children:[vt(Ji,{onClick:e,children:t}),n]}),Qi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],tr=t=>{const[e,n]=it(null),[i,r]=it({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=ri(t.categories);return vt(b,{children:["view"===i.mode&&vt(Xi,{error:e,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Qi,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),t.onChange()}catch(e){n(`${e}`)}},handleModalCancel:l,renderTableRows:()=>vt(b,{children:t.categories.map((t=>{const e=t.products.reduce(((t,e)=>t+e.activities.length),0);return vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:vt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.title}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t.subtitle}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.displayOrder}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{r({mode:"update",itemId:t.id})},children:"Edit"})})}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async t=>{await s({type:"updateVisibility",categoryId:t})})(t.id),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&vt(Zi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:vt(gi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:t.categories.find((t=>t.id===i.itemId))},onChange:t.onChange})})]})},er=({visible:t,children:e})=>{const n=st(t);return t&&!n.current&&(n.current=!0),n.current?vt("div",{hidden:!t,children:e}):null},nr=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),ir=()=>{const[t,e]=it(!1),[n,i]=it([]),[r,o]=it(!1),s=st([]),a=st(),l=lt((async t=>{e(!0),s.current=t;try{const e=await(async()=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get("/_admin/v1.0/activities")).data})(),n=rr(t,e);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_t(n)}`)}finally{e(!1)}}),[]),c=lt((async t=>{e(!0);try{const e=await(async t=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get(`/_admin/v1.0/activities/${t}`)).data})(t);e.enabled=!e.enabled,await ii(t,e)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_t(n)}`)}finally{e(!1)}}),[]);return{activities:n,isLoading:t,isModalOpen:r,loadActivities:l,handleAction:lt((async t=>{switch(t.type){case"updateVisibility":a.current=t.activityId,o(!0);break;case"updateActivity":await ii(t.activityId,t.activity,t.selectedCategory,t.isFeaturedActivity);break;case"createActivity":await(async(t,e,n)=>{if(!ti)throw new Error("Api has not been initialized");try{const i=await ti.post("/_admin/v1.0/activities",t);if(e){Pt(e,i.data.id,n??!1);const t=e;await ni(e.id,t)}}catch(i){throw new Error(`${_t(i)}`)}})(t.activity,t.selectedCategory,t.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${t}`)}}),[]),handleModalConfirm:lt((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:lt((()=>{o(!1)}),[])}},rr=(t,e)=>{const n=or(t);return e.map((t=>{var e;return{...t,category:null==(e=n.get(t.id))?void 0:e.find((()=>!0))}}))},or=t=>{const e=sr(t),n=new Map;return e.forEach((({activity:t,categoryId:e,categoryTitle:i})=>{const r=t.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((t=>t.id===e))||o.push({id:e,title:i,isFeatured:t.isFeatured})})),n},sr=t=>t.flatMap((t=>t.products.flatMap((e=>e.activities.map((e=>({activity:e,categoryId:t.id,categoryTitle:t.title}))))))),ar="None",lr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:t=>t!==ar}],cr=[{activityType:wt.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"}]},{activityType:wt.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:wt.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],dr={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1},ur=({formMode:t,categories:e,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((t,e,n)=>{const[i,r]=it(wt.Article),[o,s]=it({id:ar,title:ar}),[a,l]=it([]),[c,d]=it(!1),[u,h]=it(dr),{handleAction:p}=ir(),m=at((()=>{var t;return[...lr,...(null==(t=cr.find((t=>t.activityType===i)))?void 0:t.formFields)||[]]}),[i]),f=lt(((t,e)=>{l((n=>[...n,{text:t,type:e}]))}),[]);rt((()=>{var e,n,i;if("update"===t.mode){const o=t.initialActivity,a={activityId:o.id,title:o.title,points:o.points,description:o.description,iconUrl:o.iconUrl,url:o.url,articleId:o.articleId,bannerUrl:o.bannerUrl,buttonText:o.buttonText,primaryLabel:null==(e=o.estimateLabel)?void 0:e.primaryLabel,secondaryLabel:null==(n=o.estimateLabel)?void 0:n.secondaryLabel,isFeatured:null==(i=o.category)?void 0:i.isFeatured};h({...a}),r(o.activityType),s(o.category??{id:ar,title:ar})}}),[t]);const g=lt((()=>{h({...dr}),r(wt.Article),s({id:ar,title:ar})}),[]),y=lt((()=>{let t=!0;for(const e of m){const n=u[e.name];!e.isRequired||"text"!==e.type||n&&""!==n.toString().trim()||(f(`${e.label} is required.`,"error"),t=!1)}return t}),[f,m,u]),v=async()=>{const{url:t,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c}=u,d={...u,activityType:i,calculationType:Tt(i,o.title),enabled:!1,savingsInCents:0,configurationTags:At(o.title),tags:St(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:t||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0};let h;o.title!==ar&&(h=e.find((t=>t.id===o.id)));try{await p({type:"createActivity",activity:d,selectedCategory:h,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(m){throw f(`Error creating activity: ${m}`,"error"),m}},b=async t=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r}=u,s={...t,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0};let a;o.title!==ar&&(a=e.find((t=>t.id===o.id)));try{await p({type:"updateActivity",activityId:t.id,activity:s,selectedCategory:a,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(l){throw f(`Error updating activity: ${l}`,"error"),l}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async e=>{if(e.preventDefault(),d(!0),l([]),y())try{"create"===t.mode?await v():"update"===t.mode&&await b(t.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;h((t=>({...t,[n]:"checkbox"===r?e.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:t=>{const e=t.target;r(e.value)},handleCategoryChange:t=>{const n=t.target.value;if(n===ar)s({id:ar,title:ar});else{const t=e.find((t=>t.id===n));t&&s({id:t.id,title:t.title})}}}})(t,e,n),p="create"===t.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return vt(hi,{title:p,children:vt("form",{onSubmit:c,children:[vt("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[vt("label",{className:"sm:col-start-1",children:"Type"}),vt("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s,disabled:"update"===t.mode,onChange:u,children:Object.values(wt).map((t=>vt("option",{value:t,children:t},t)))})]}),vt("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[vt("label",{className:"sm:col-start-1",children:"Category"}),vt("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===t.mode,onChange:h,children:[vt("option",{value:ar,children:ar}),e.map((t=>vt("option",{value:t.id,children:t.title},t.id)))]}),vt(pi,{formMode:t,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},hr=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],pr="All",mr=({categories:t,onChange:e})=>{const[n,i]=it(null),[r,o]=it({mode:"view"}),[s,a]=it({id:pr,title:pr}),[l,c]=it([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=ir();rt((()=>{(async()=>{try{await p(t)}catch(e){i(`${e}`)}})()}),[t,p]),rt((()=>{c(s.title===pr?u:u.filter((t=>{var e;return(null==(e=t.category)?void 0:e.id)===s.id})))}),[u,s]);const y=vt("div",{className:"flex items-center space-x-2 mt-4",children:[vt(nr,{}),vt("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s.id,onChange:e=>{const n=e.target.value;if(n===pr)a({id:pr,title:pr});else{const e=t.find((t=>t.id===n));e&&a({id:e.id,title:e.title})}},children:[vt("option",{value:pr,children:pr}),t.map((t=>vt("option",{value:t.id,children:t.title},t.id)))]})]});return vt(b,{children:["view"===r.mode&&vt(b,{children:[d&&vt("p",{className:"p-5",children:"Loading..."}),!d&&vt(Xi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:hr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),e()}catch(t){i(`${t}`)}},handleModalCancel:g,renderTableRows:()=>vt(b,{children:l.map((t=>{var e;return vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:vt("span",{className:"flex justify-center",children:vt("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})})}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:kt(t.title)}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:kt(t.description)}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:t.activityType}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.points}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:(null==(e=t.category)?void 0:e.title)??"None"}),vt("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{o({mode:"update",itemId:t.id})},children:"Edit"})})}),vt("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:vt("div",{className:"flex justify-center",children:vt("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>m({type:"updateVisibility",activityId:t.id}),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>o({mode:"create"})})]}),"view"!==r.mode&&vt(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:vt(ur,{categories:t,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((t=>t.id===r.itemId))},onChange:e})})]})};var fr=(t=>(t.Categories="Categories",t.Activities="Activities",t))(fr||{});const gr=()=>{const[t,e]=it("Categories"),[n,i]=it([]),[r,o]=it(!1),[s,a]=it(null),l=lt((e=>e===t),[t]),c=lt((async()=>{o(!0),a(null);try{const t=(await(async()=>{if(!ti)throw new Error("Api has not been initialized");return(await ti.get("/_admin/v1.0/categories")).data})()).categories.sort(((t,e)=>t.displayOrder-e.displayOrder));i(t)}catch(t){console.error(t),a("Failed to load categories.")}finally{o(!1)}}),[]);rt((()=>{c()}),[c]);const d=async()=>{await c()};return vt(b,{children:[vt(bt,{tabTitles:Object.entries(fr).map((([,t])=>t)),currentTab:t,onChange:e}),r&&vt("p",{className:"p-5",children:"Loading..."}),s&&vt("div",{className:"p-4 text-red-700",children:s}),!r&&vt(b,{children:[vt(er,{visible:l("Categories"),children:vt(tr,{categories:n,onChange:d})}),vt(er,{visible:l("Activities"),children:vt(mr,{categories:n,onChange:d})})]})]})};function yr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function vr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const br=t=>Array.isArray(t);function wr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function xr(t){return"string"==typeof t||Array.isArray(t)}function _r(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function kr(t,e,n,i){if("function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function Tr(t,e,n){const i=t.getProps();return kr(i,e,void 0!==n?n:i.custom,t)}const Sr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Sr],Pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(Pr),Er=t=>1e3*t,Nr=t=>t/1e3,Rr={type:"spring",stiffness:500,damping:25,restSpeed:10},Mr={type:"keyframes",duration:.8},Or={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dr=(t,{keyframes:e})=>e.length>2?Mr:Cr.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Rr:Or;function Lr(t,e){return t?t[e]||t.default||t:void 0}const jr=!1,Vr=t=>null!==t;function Fr(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(Vr),o=e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Br=t=>t;const Ur=["read","resolveKeyframes","update","preRender","render","postRender"];function Ir(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ur.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,r=!1,s=!1)=>{const a=s&&i?e:n;return r&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,i?r=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:Ur.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<Ur.length;e++)s[Ur[e]].cancel(t)},state:r,steps:s}}const{schedule:zr,cancel:Hr,state:$r,steps:qr}=Ir("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Br,!0),Wr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Kr=1e-7,Yr=12;function Xr(t,e,n,i){if(t===e&&n===i)return Br;const r=e=>function(t,e,n,i,r){let o,s,a=0;do{s=e+(n-e)/2,o=Wr(s,i,r)-t,o>0?n=s:e=s}while(Math.abs(o)>Kr&&++a<Yr);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Wr(r(t),e,i)}const Gr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Jr=t=>e=>1-t(1-e),Zr=Xr(.33,1.53,.69,.99),Qr=Jr(Zr),to=Gr(Qr),eo=t=>(t*=2)<1?.5*Qr(t):.5*(2-Math.pow(2,-10*(t-1))),no=t=>1-Math.sin(Math.acos(t)),io=Jr(no),ro=Gr(no),oo=t=>/^0[^.\s]+$/u.test(t);let so=Br;const ao=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),lo=t=>e=>"string"==typeof e&&e.startsWith(t),co=lo("--"),uo=lo("var(--"),ho=t=>!!uo(t)&&po.test(t.split("/*")[0].trim()),po=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fo(t,e,n=1){const[i,r]=function(t){const e=mo.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${null!=n?n:i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ao(t)?parseFloat(t):t}return ho(r)?fo(r,e,n+1):r}const go=(t,e,n)=>n>e?e:n<t?t:n,yo={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vo={...yo,transform:t=>go(0,1,t)},bo={...yo,default:1},wo=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),xo=wo("deg"),_o=wo("%"),ko=wo("px"),To=wo("vh"),So=wo("vw"),Ao={..._o,parse:t=>_o.parse(t)/100,transform:t=>_o.transform(100*t)},Po=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Co=t=>t===yo||t===ko,Eo=(t,e)=>parseFloat(t.split(", ")[e]),No=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Eo(r[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?Eo(e[1],t):0}},Ro=new Set(["x","y","z"]),Mo=Pr.filter((t=>!Ro.has(t)));const Oo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:No(4,13),y:No(5,14)};Oo.translateX=Oo.x,Oo.translateY=Oo.y;const Do=t=>e=>e.test(t),Lo=[yo,ko,_o,xo,So,To,{test:t=>"auto"===t,parse:t=>t}],jo=t=>Lo.find(Do(t)),Vo=new Set;let Fo=!1,Bo=!1;function Uo(){if(Bo){const t=Array.from(Vo).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Mo.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Bo=!1,Fo=!1,Vo.forEach((t=>t.complete())),Vo.clear()}function Io(){Vo.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Bo=!0)}))}class zo{constructor(t,e,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Vo.add(this),Fo||(Fo=!0,zr.read(Io),zr.resolveKeyframes(Uo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Vo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Vo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ho=t=>Math.round(1e5*t)/1e5,$o=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wo=(t,e)=>n=>Boolean("string"==typeof n&&qo.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ko=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match($o);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Yo={...yo,transform:t=>Math.round((t=>go(0,255,t))(t))},Xo={test:Wo("rgb","red"),parse:Ko("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Yo.transform(t)+", "+Yo.transform(e)+", "+Yo.transform(n)+", "+Ho(vo.transform(i))+")"};const Go={test:Wo("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Xo.transform},Jo={test:Wo("hsl","hue"),parse:Ko("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+_o.transform(Ho(e))+", "+_o.transform(Ho(n))+", "+Ho(vo.transform(i))+")"},Zo={test:t=>Xo.test(t)||Go.test(t)||Jo.test(t),parse:t=>Xo.test(t)?Xo.parse(t):Jo.test(t)?Jo.parse(t):Go.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Xo.transform(t):Jo.transform(t)},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ts="number",es="color",ns="var",is="var(",rs="${}",os=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ss(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=e.replace(os,(t=>(Zo.test(t)?(i.color.push(o),r.push(es),n.push(Zo.parse(t))):t.startsWith(is)?(i.var.push(o),r.push(ns),n.push(t)):(i.number.push(o),r.push(ts),n.push(parseFloat(t))),++o,rs))).split(rs);return{values:n,split:s,indexes:i,types:r}}function as(t){return ss(t).values}function ls(t){const{split:e,types:n}=ss(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===ts?Ho(t[o]):e===es?Zo.transform(t[o]):t[o]}return r}}const cs=t=>"number"==typeof t?0:t;const ds={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match($o))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Qo))||void 0===n?void 0:n.length)||0)>0},parse:as,createTransformer:ls,getAnimatableNone:function(t){const e=as(t);return ls(t)(e.map(cs))}},us=new Set(["brightness","contrast","saturate","opacity"]);function hs(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match($o)||[];if(!i)return t;const r=n.replace(i,"");let o=us.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const ps=/\b([a-z-]*)\(.*?\)/gu,ms={...ds,getAnimatableNone:t=>{const e=t.match(ps);return e?e.map(hs).join(" "):t}},fs={borderWidth:ko,borderTopWidth:ko,borderRightWidth:ko,borderBottomWidth:ko,borderLeftWidth:ko,borderRadius:ko,radius:ko,borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomRightRadius:ko,borderBottomLeftRadius:ko,width:ko,maxWidth:ko,height:ko,maxHeight:ko,top:ko,right:ko,bottom:ko,left:ko,padding:ko,paddingTop:ko,paddingRight:ko,paddingBottom:ko,paddingLeft:ko,margin:ko,marginTop:ko,marginRight:ko,marginBottom:ko,marginLeft:ko,backgroundPositionX:ko,backgroundPositionY:ko},gs={rotate:xo,rotateX:xo,rotateY:xo,rotateZ:xo,scale:bo,scaleX:bo,scaleY:bo,scaleZ:bo,skew:xo,skewX:xo,skewY:xo,distance:ko,translateX:ko,translateY:ko,translateZ:ko,x:ko,y:ko,z:ko,perspective:ko,transformPerspective:ko,opacity:vo,originX:Ao,originY:Ao,originZ:ko},ys={...yo,transform:Math.round},vs={...fs,...gs,zIndex:ys,size:ko,fillOpacity:vo,strokeOpacity:vo,numOctaves:ys},bs={...vs,color:Zo,backgroundColor:Zo,outlineColor:Zo,fill:Zo,stroke:Zo,borderColor:Zo,borderTopColor:Zo,borderRightColor:Zo,borderBottomColor:Zo,borderLeftColor:Zo,filter:ms,WebkitFilter:ms},ws=t=>bs[t];function xs(t,e){let n=ws(t);return n!==ms&&(n=ds),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _s=new Set(["auto","none","0"]);class ks extends zo{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),ho(n))){const i=fo(n,e.current);void 0!==i&&(t[a]=i),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Po.has(n)||2!==t.length)return;const[i,r]=t,o=jo(i),s=jo(r);if(o!==s)if(Co(o)&&Co(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let r=0;r<t.length;r++)("number"==typeof(i=t[r])?0===i:null===i||"none"===i||"0"===i||oo(i))&&n.push(r);var i;n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!_s.has(e)&&ss(e).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=xs(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Oo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function Ts(t){return"function"==typeof t}let Ss;function As(){Ss=void 0}const Ps={now:()=>(void 0===Ss&&Ps.set($r.isProcessing||jr?$r.timestamp:performance.now()),Ss),set:t=>{Ss=t,queueMicrotask(As)}},Cs=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ds.test(t)&&"0"!==t||t.startsWith("url(")));class Es{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ps.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Io(),Uo()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Ps.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=Cs(r,e),a=Cs(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Ts(n))&&i)}(t,n,i,r)){if(!o)return null==a||a(Fr(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(t,e);!1!==c&&(this._resolved={keyframes:t,finalKeyframe:e,...c},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Ns(t,e){return e?t*(1e3/e):0}const Rs=5;function Ms(t,e,n){const i=Math.max(e-Rs,0);return Ns(n-t(i),e-i)}const Os=.001,Ds=.01,Ls=10,js=.05,Vs=1;function Fs({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,o,s=1-e;s=go(js,Vs,s),t=go(Ds,Ls,Nr(t)),s<1?(r=e=>{const i=e*s,r=i*t,o=i-n,a=Us(e,s),l=Math.exp(-r);return Os-o/a*l},o=e=>{const i=e*s*t,o=i*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Us(Math.pow(e,2),s);return(-r(e)+Os>0?-1:1)*((o-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Os,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let r=1;r<Bs;r++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=Er(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*s*Math.sqrt(i*e),duration:t}}}const Bs=12;function Us(t,e){return t*Math.sqrt(1-e*e)}const Is=["duration","bounce"],zs=["stiffness","damping","mass"];function Hs(t,e){return e.some((e=>void 0!==t[e]))}function $s({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],o=t[t.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Hs(t,zs)&&Hs(t,Is)){const n=Fs(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Nr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Nr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=Us(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:h&&d||null,next:t=>{const i=v(t);if(h)s.done=t>=d;else{let r=0;m<1&&(r=0===t?Er(p):Ms(v,t,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=e;s.done=a&&l}return s.value=s.done?o:i,s}}}function qs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),b=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let w,x;const _=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,x=$s({keyframes:[h.value,p(h.value)],velocity:Ms(v,t,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==w||(e=!0,b(t),_(t)),void 0!==w&&t>=w?x.next(t-w):(!e&&b(t),h)}}}const Ws=Xr(.42,0,1,1),Ks=Xr(0,0,.58,1),Ys=Xr(.42,0,.58,1),Xs=t=>Array.isArray(t)&&"number"==typeof t[0],Gs={linear:Br,easeIn:Ws,easeInOut:Ys,easeOut:Ks,circIn:no,circInOut:ro,circOut:io,backIn:Qr,backInOut:to,backOut:Zr,anticipate:eo},Js=t=>{if(Xs(t)){so(4===t.length);const[e,n,i,r]=t;return Xr(e,n,i,r)}return"string"==typeof t?(so(void 0!==Gs[t]),Gs[t]):t},Zs=(t,e)=>n=>e(t(n)),Qs=(...t)=>t.reduce(Zs),ta=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ea=(t,e,n)=>t+(e-t)*n;function na(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ia(t,e){return n=>n>0?e:t}const ra=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},oa=[Go,Xo,Jo];function sa(t){const e=(n=t,oa.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Jo&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,s=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=na(a,i,t+1/3),o=na(a,i,t),s=na(a,i,t-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const aa=(t,e)=>{const n=sa(t),i=sa(e);if(!n||!i)return ia(t,e);const r={...n};return t=>(r.red=ra(n.red,i.red,t),r.green=ra(n.green,i.green,t),r.blue=ra(n.blue,i.blue,t),r.alpha=ea(n.alpha,i.alpha,t),Xo.transform(r))},la=new Set(["none","hidden"]);function ca(t,e){return n=>ea(t,e,n)}function da(t){return"number"==typeof t?ca:"string"==typeof t?ho(t)?ia:Zo.test(t)?aa:pa:Array.isArray(t)?ua:"object"==typeof t?Zo.test(t)?aa:ha:ia}function ua(t,e){const n=[...t],i=n.length,r=t.map(((t,n)=>da(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function ha(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=da(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const pa=(t,e)=>{const n=ds.createTransformer(e),i=ss(t),r=ss(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?la.has(t)&&!r.values.length||la.has(e)&&!i.values.length?function(t,e){return la.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Qs(ua(function(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][r[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):ia(t,e)};function ma(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ea(t,e,n);return da(t)(t,e)}function fa(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(so(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||ma,o=t.length-1;for(let s=0;s<o;s++){let n=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Br:e;n=Qs(t,n)}i.push(n)}return i}(e,i,r),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=ta(t[n],t[n+1],e);return s[n](i)};return n?e=>l(go(t[0],t[o-1],e)):l}function ga(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ta(0,e,i);t.push(ea(n,1,r))}}(e,t.length-1),e}function ya({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Js):Js(i),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:ga(e),t),a=fa(s,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map((()=>c||Ys)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const va=t=>{const e=({timestamp:e})=>t(e);return{start:()=>zr.update(e,!0),stop:()=>Hr(e),now:()=>$r.isProcessing?$r.timestamp:Ps.now()}},ba={decay:qs,inertia:qs,tween:ya,keyframes:ya,spring:$s},wa=t=>t/100;class xa extends Es{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||zo;this.resolver=new o(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Ts(e)?e:ba[e]||ya;let a,l;s!==ya&&"number"!=typeof t[0]&&(a=Qs(wa,ma(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});"mirror"===r&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(c));const{calculatedDuration:d}=c,u=d+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:u,totalDuration:u*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=n;if(null===this.startTime)return r.next(0);const{delay:u,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=r;if(h){const t=Math.min(this.currentTime,c)/d;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=go(0,1,n)*d}const w=y?{done:!1,value:a[0]}:b.next(v);s&&(w.value=s(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==i&&(w.value=Fr(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Nr(t.calculatedDuration):0}get time(){return Nr(this.currentTime)}set time(t){t=Er(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=va,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const _a=new Set(["opacity","clipPath","filter","transform"]),ka=(t,e)=>{let n="";const i=Math.max(Math.round(e/10),2);for(let r=0;r<i;r++)n+=t(ta(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ta(t){let e;return()=>(void 0===e&&(e=t()),e)}const Sa={linearEasing:void 0};function Aa(t,e){const n=Ta(t);return()=>{var t;return null!==(t=Sa[e])&&void 0!==t?t:n()}}const Pa=Aa((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing");function Ca(t){return Boolean("function"==typeof t&&Pa()||!t||"string"==typeof t&&(t in Na||Pa())||Xs(t)||Array.isArray(t)&&t.every(Ca))}const Ea=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Na={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ea([0,.65,.55,1]),circOut:Ea([.55,0,1,.45]),backIn:Ea([.31,.01,.66,-.59]),backOut:Ea([.33,1.53,.69,.99])};function Ra(t,e){return t?"function"==typeof t&&Pa()?ka(t,e):Xs(t)?Ea(t):Array.isArray(t)?t.map((t=>Ra(t,e)||Na.easeOut)):Na[t]:void 0}function Ma(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const d=Ra(a,r);return Array.isArray(d)&&(c.easing=d),t.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Oa(t,e){t.timeline=e,t.onfinish=null}const Da=Ta((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const La={anticipate:eo,backInOut:to,circInOut:ro};class ja extends Es{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new ks(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:r,ease:o,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var d;if("string"==typeof o&&Pa()&&o in La&&(o=La[o]),Ts((d=this.options).type)||"spring"===d.type||!Ca(d.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(t,e){const n=new xa({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(t,c);1===(t=d.keyframes).length&&(t[1]=t[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Ma(a.owner.current,l,t,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Oa(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(Fr(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Nr(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Nr(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Er(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Br;const{animation:n}=e;Oa(n,t)}else this.pendingTimeline=t;return Br}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:r,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...c}=this.options,d=new xa({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Er(this.time);t.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=t;return Da()&&n&&_a.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const Va=Ta((()=>void 0!==window.ScrollTimeline));class Fa{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>Va()&&n.attachTimeline?n.attachTimeline(t):e(n)));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ba=(t,e,n,i={},r,o)=>s=>{const a=Lr(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Er(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||(d={...d,...Dr(t,d)}),d.duration&&(d.duration=Er(d.duration)),d.repeatDelay&&(d.repeatDelay=Er(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),u&&!o&&void 0!==e.get()){const t=Fr(d.keyframes,a);if(void 0!==t)return zr.update((()=>{d.onUpdate(t),d.onComplete()})),new Fa([])}return!o&&ja.supports(d)?new ja(d):new xa(d)},Ua=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ia=t=>br(t)?t[t.length-1]||0:t;function za(t,e){-1===t.indexOf(e)&&t.push(e)}function Ha(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class $a{constructor(){this.subscriptions=[]}add(t){return za(this.subscriptions,t),()=>Ha(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class qa{constructor(t,e={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ps.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ps.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new $a);const n=this.events[t].add(e);return"change"===t?()=>{n(),zr.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ps.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ns(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wa(t,e){return new qa(t,e)}function Ka(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wa(n))}const Ya=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xa="data-"+Ya("framerAppearId");function Ga(t){return t.props[Xa]}const Ja=t=>Boolean(t&&t.getVelocity);function Za(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ja(i)&&i.add))return n.add(e);var i}function Qa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function tl(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(s=i);const c=[],d=r&&t.animationState&&t.animationState.getState()[r];for(const u in l){const e=t.getValue(u,null!==(o=t.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&Qa(d,u))continue;const r={delay:n,...Lr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const e=Ga(t);if(e){const t=window.MotionHandoffAnimation(e,u,zr);null!==t&&(r.startTime=t,a=!0)}}Za(t,u),e.start(Ba(u,e,i,t.shouldReduceMotion&&Cr.has(u)?{type:!1}:r,t,a));const h=e.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{zr.update((()=>{a&&function(t,e){const n=Tr(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)Ka(t,s,Ia(o[s]))}(t,a)}))})),c}function el(t,e,n={}){var i;const r=Tr(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(tl(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,i=0,r=1,o){const s=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(nl).forEach(((t,i)=>{t.notify("AnimationStart",e),s.push(el(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function nl(t,e){return t.sortNodePosition(e)}const il=Ar.length;function rl(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&rl(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<il;n++){const i=Ar[n],r=t.props[i];(xr(r)||!1===r)&&(e[i]=r)}return e}const ol=[...Sr].reverse(),sl=Sr.length;function al(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map((e=>el(t,e,n)));i=Promise.all(r)}else if("string"==typeof e)i=el(t,e,n);else{const r="function"==typeof e?Tr(t,e,n.custom):e;i=Promise.all(tl(t,r,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function ll(t){let e=al(t),n=ul(),i=!0;const r=e=>(n,i)=>{var r;const o=Tr(t,i,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const{props:s}=t,a=rl(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<sl;e++){const h=ol[e],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=xr(m),g=h===o?p.isActive:null;!1===g&&(u=e);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||vr(m)||"boolean"==typeof m)continue;const v=cl(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||e>u&&f,w=!1;const x=Array.isArray(m)?m:[m];let _=x.reduce(r(h),{});!1===g&&(_={});const{prevResolvedValues:k={}}=p,T={...k,..._},S=e=>{b=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=_[t],n=k[t];if(d.hasOwnProperty(t))continue;let i=!1;i=br(e)&&br(n)?!wr(e,n):e!==n,i?null!=e?S(t):c.add(t):void 0!==e&&c.has(t)?S(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&t.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((t=>({animation:t,options:{type:h}}))))}if(c.size){const e={};c.forEach((n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=null!=i?i:null})),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ul(),i=!0}}}function cl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!wr(e,t)}function dl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ul(){return{animate:dl(!0),whileInView:dl(),whileHover:dl(),whileTap:dl(),whileDrag:dl(),whileFocus:dl(),exit:dl()}}class hl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let pl=0;const ml={animation:{Feature:class extends hl{constructor(t){super(t),t.animationState||(t.animationState=ll(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends hl{constructor(){super(...arguments),this.id=pl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},fl=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function gl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const yl=t=>e=>fl(e)&&t(e,gl(e));function vl(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function bl(t,e,n,i){return vl(t,e,yl(n),i)}const wl=(t,e)=>Math.abs(t-e);class xl{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Tl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=wl(t.x,e.x),i=wl(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=$r;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=_l(e,this.transformPagePoint),zr.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Tl("pointercancel"===t.type?this.lastMoveEventInfo:_l(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!fl(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=_l(gl(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=$r;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Tl(o,this.history)),this.removeListeners=Qs(bl(this.contextWindow,"pointermove",this.handlePointerMove),bl(this.contextWindow,"pointerup",this.handlePointerUp),bl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hr(this.updatePoint)}}function _l(t,e){return e?{point:e(t.point)}:t}function kl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Tl({point:t},e){return{point:t,delta:kl(t,Al(e)),offset:kl(t,Sl(e)),velocity:Pl(e,.1)}}function Sl(t){return t[0]}function Al(t){return t[t.length-1]}function Pl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Al(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Er(e)));)n--;if(!i)return{x:0,y:0};const o=Nr(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Cl(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const El=Cl("dragHorizontal"),Nl=Cl("dragVertical");function Rl(t){let e=!1;if("y"===t)e=Nl();else if("x"===t)e=El();else{const t=El(),n=Nl();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ml(){const t=Rl(!0);return!t||(t(),!1)}function Ol(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Dl=.9999,Ll=1.0001,jl=-.01,Vl=.01;function Fl(t){return t.max-t.min}function Bl(t,e,n,i=.5){t.origin=i,t.originPoint=ea(e.min,e.max,t.origin),t.scale=Fl(n)/Fl(e),t.translate=ea(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=jl&&t.translate<=Vl||isNaN(t.translate))&&(t.translate=0)}function Ul(t,e,n,i){Bl(t.x,e.x,n.x,i?i.originX:void 0),Bl(t.y,e.y,n.y,i?i.originY:void 0)}function Il(t,e,n){t.min=n.min+e.min,t.max=t.min+Fl(e)}function zl(t,e,n){t.min=e.min-n.min,t.max=t.min+Fl(e)}function Hl(t,e,n){zl(t.x,e.x,n.x),zl(t.y,e.y,n.y)}function $l(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ql(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Wl=.35;function Kl(t,e,n){return{min:Yl(t,e),max:Yl(t,n)}}function Yl(t,e){return"number"==typeof t?t:t[e]||0}const Xl=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Gl=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Jl(t){return[t("x"),t("y")]}function Zl({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ql(t){return void 0===t||1===t}function tc({scale:t,scaleX:e,scaleY:n}){return!Ql(t)||!Ql(e)||!Ql(n)}function ec(t){return tc(t)||nc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function nc(t){return ic(t.x)||ic(t.y)}function ic(t){return t&&"0%"!==t}function rc(t,e,n){return n+e*(t-n)}function oc(t,e,n,i,r){return void 0!==r&&(t=rc(t,r,i)),rc(t,n,i)+e}function sc(t,e=0,n=1,i,r){t.min=oc(t.min,e,n,i,r),t.max=oc(t.max,e,n,i,r)}function ac(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}const lc=.999999999999,cc=1.0000000000001;function dc(t,e){t.min=t.min+e,t.max=t.max+e}function uc(t,e,n,i,r=.5){sc(t,e,n,ea(t.min,t.max,r),i)}function hc(t,e){uc(t.x,e.x,e.scaleX,e.scale,e.originX),uc(t.y,e.y,e.scaleY,e.scale,e.originY)}function pc(t,e){return Zl(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const mc=({current:t})=>t?t.ownerDocument.defaultView:null,fc=new WeakMap;class gc{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gl(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new xl(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(gl(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jl((t=>{let e=this.getAxisMotionValue(t).get()||0;if(_o.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Fl(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),r&&zr.postRender((()=>r(t,e))),Za(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Jl((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:mc(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&zr.postRender((()=>r(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!yc(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?ea(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?ea(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&Ol(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:$l(t.x,n,r),y:$l(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Wl){return!1===t?t=0:!0===t&&(t=Wl),{x:Kl(t,"left","right"),y:Kl(t,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jl((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ol(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=pc(t,n),{scroll:r}=e;return r&&(dc(i.x,r.offset.x),dc(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ql(t.x,e.x),y:ql(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Zl(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Jl((s=>{if(!yc(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,u)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Za(this.visualElement,t),n.start(Ba(t,n,0,e,this.visualElement,!1))}stopAnimation(){Jl((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Jl((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Jl((e=>{const{drag:n}=this.getProps();if(!yc(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-ea(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ol(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Jl((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Fl(t),r=Fl(e);return r>i?n=ta(e.min,e.max-i,t.min):i>r&&(n=ta(t.min,t.max-r,e.min)),go(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Jl((e=>{if(!yc(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(ea(r,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;fc.set(this.visualElement,this);const t=bl(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();Ol(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),zr.read(e);const r=vl(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Jl((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Wl,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function yc(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const vc=t=>(e,n)=>{t&&zr.postRender((()=>t(e,n)))};const bc=U(null);function wc(){const t=ct(bc);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=function(){var t=nt(z++,11);if(!t.__){for(var e=H.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}();rt((()=>i(r)),[]);const o=lt((()=>n&&n(r)),[r,n]);return!e&&n?[!1,o]:[!0]}const xc=U({}),_c=U({}),kc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tc(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Sc={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ko.test(t))return t;t=parseFloat(t)}return`${Tc(t,e.target.x)}% ${Tc(t,e.target.y)}%`}},Ac={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=ds.parse(t);if(r.length>5)return i;const o=ds.createTransformer(t),s="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;const c=ea(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},Pc={};const{schedule:Cc,cancel:Ec}=Ir(queueMicrotask,!1);class Nc extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;var o;o=Mc,Object.assign(Pc,o),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",(()=>{this.safeToRemove()})),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),kc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||zr.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cc.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Rc(t){const[e,n]=wc(),i=ct(xc);return vt(Nc,{...t,layoutGroup:i,switchLayoutGroup:ct(_c),isPresent:e,safeToRemove:n})}const Mc={borderRadius:{...Sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sc,borderTopRightRadius:Sc,borderBottomLeftRadius:Sc,borderBottomRightRadius:Sc,boxShadow:Ac},Oc=["TopLeft","TopRight","BottomLeft","BottomRight"],Dc=Oc.length,Lc=t=>"string"==typeof t?parseFloat(t):t,jc=t=>"number"==typeof t||ko.test(t);function Vc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Fc=Uc(0,.5,io),Bc=Uc(.5,.95,Br);function Uc(t,e,n){return i=>i<t?0:i>e?1:n(ta(t,e,i))}function Ic(t,e){t.min=e.min,t.max=e.max}function zc(t,e){Ic(t.x,e.x),Ic(t.y,e.y)}function Hc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $c(t,e,n,i,r){return t=rc(t-=e,1/n,i),void 0!==r&&(t=rc(t,1/r,i)),t}function qc(t,e,[n,i,r],o,s){!function(t,e=0,n=1,i=.5,r,o=t,s=t){_o.test(e)&&(e=parseFloat(e),e=ea(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=ea(o.min,o.max,i);t===o&&(a-=e),t.min=$c(t.min,e,n,a,r),t.max=$c(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,o,s)}const Wc=["x","scaleX","originX"],Kc=["y","scaleY","originY"];function Yc(t,e,n,i){qc(t.x,e,Wc,n?n.x:void 0,i?i.x:void 0),qc(t.y,e,Kc,n?n.y:void 0,i?i.y:void 0)}function Xc(t){return 0===t.translate&&1===t.scale}function Gc(t){return Xc(t.x)&&Xc(t.y)}function Jc(t,e){return t.min===e.min&&t.max===e.max}function Zc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Qc(t,e){return Zc(t.x,e.x)&&Zc(t.y,e.y)}function td(t){return Fl(t.x)/Fl(t.y)}function ed(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class nd{constructor(){this.members=[]}add(t){za(this.members,t),t.scheduleRender()}remove(t){if(Ha(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const id=(t,e)=>t.depth-e.depth;class rd{constructor(){this.children=[],this.isDirty=!1}add(t){za(this.children,t),this.isDirty=!0}remove(t){Ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(id),this.isDirty=!1,this.children.forEach(t)}}function od(t){const e=Ja(t)?t.get():t;return Ua(e)?e.toValue():e}const sd={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ad="undefined"!=typeof window&&void 0!==window.MotionDebug,ld=["","X","Y","Z"],cd={visibility:"hidden"};let dd=0;function ud(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function hd(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ga(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",zr,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&hd(i)}function pd({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=dd++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ad&&(sd.totalNodes=sd.resolvedTargetDeltas=sd.recalculatedProjection=0),this.nodes.forEach(gd),this.nodes.forEach(kd),this.nodes.forEach(Td),this.nodes.forEach(yd),ad&&window.MotionDebug.record(sd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new rd)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new $a),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=e)instanceof SVGElement&&"svg"!==i.tagName,this.instance=e;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Ps.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&(Hr(i),t(o-e))};return zr.read(i,!0),()=>Hr(i)}(i,250),kc.hasAnimatedSinceResize&&(kc.hasAnimatedSinceResize=!1,this.nodes.forEach(_d))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Nd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Qc(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...Lr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||_d(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Sd),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hd(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const t=this.path[r];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bd);this.isUpdating||this.nodes.forEach(wd),this.isUpdating=!1,this.nodes.forEach(xd),this.nodes.forEach(md),this.nodes.forEach(fd),this.clearAllSnapshots();const t=Ps.now();$r.delta=go(0,1e3/60,t-$r.timestamp),$r.timestamp=t,$r.isProcessing=!0,qr.update.process($r),qr.preRender.process($r),qr.render.process($r),$r.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vd),this.sharedNodes.forEach(Ad)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zr.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Gc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ec(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Od((i=n).x),Od(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Gl();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Ld))){const{scroll:t}=this.root;t&&(dc(n.x,t.offset.x),dc(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Gl();if(zc(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let i=0;i<this.path.length;i++){const e=this.path[i],{scroll:r,options:o}=e;e!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&zc(n,t),dc(n.x,r.offset.x),dc(n.y,r.offset.y))}return n}applyTransform(t,e=!1){const n=Gl();zc(n,t);for(let i=0;i<this.path.length;i++){const t=this.path[i];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&hc(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),ec(t.latestValues)&&hc(n,t.latestValues)}return ec(this.latestValues)&&hc(n,this.latestValues),n}removeTransform(t){const e=Gl();zc(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!ec(t.latestValues))continue;tc(t.latestValues)&&t.updateSnapshot();const i=Gl();zc(i,t.measurePageBox()),Yc(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,i)}return ec(this.latestValues)&&Yc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$r.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=$r.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),Hl(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),zc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Gl(),this.targetWithTransforms=Gl()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Il(s.x,a.x,l.x),Il(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):zc(this.target,this.layout.layoutBox),ac(this.target,this.targetDelta)):zc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),Hl(this.relativeTargetOrigin,this.target,t.target),zc(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ad&&sd.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!tc(this.parent.latestValues)&&!nc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===$r.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;zc(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,s;e.x=e.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&hc(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ac(t,s)),i&&ec(o.latestValues)&&hc(t,o.latestValues))}e.x<cc&&e.x>lc&&(e.x=1),e.y<cc&&e.y>lc&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Gl());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Hc(this.prevProjectionDelta.x,this.projectionDelta.x),Hc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ul(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&ed(this.projectionDelta.x,this.prevProjectionDelta.x)&&ed(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),ad&&sd.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xl(),this.projectionDelta=Xl(),this.projectionDeltaWithTransform=Xl()}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=Xl();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Gl(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ed));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,g;Pd(o.x,t.x,n),Pd(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hl(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,Cd(p.x,m.x,f.x,g),Cd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Jc(l.x,h.x)&&Jc(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=Gl()),zc(u,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=ea(0,void 0!==n.opacity?n.opacity:1,Fc(i)),t.opacityExit=ea(void 0!==e.opacity?e.opacity:1,0,Bc(i))):o&&(t.opacity=ea(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Dc;s++){const r=`border${Oc[s]}Radius`;let o=Vc(e,r),a=Vc(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||jc(o)===jc(a)?(t[r]=Math.max(ea(Lc(o),Lc(a),i),0),(_o.test(a)||_o.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=ea(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zr.update((()=>{kc.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=Ja(t)?t:Wa(t);return i.start(Ba("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Dd(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Gl();const e=Fl(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Fl(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}zc(e,n),hc(e,r),Ul(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new nd);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ud("z",t,i,this.animationValues);for(let r=0;r<ld.length;r++)ud(`rotate${ld[r]}`,t,i,this.animationValues),ud(`skew${ld[r]}`,t,i,this.animationValues);t.render();for(const r in i)t.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return cd;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=od(null==t?void 0:t.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=od(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ec(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Pc){if(void 0===s[c])continue;const{correct:t,applyTo:e}=Pc[c],n="none"===i.transform?s[c]:t(s[c],o);if(e){const t=e.length;for(let r=0;r<t;r++)i[e[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?od(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(bd),this.root.sharedNodes.clear()}}}function md(t){t.updateLayout()}function fd(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;"size"===r?Jl((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],r=Fl(i);i.min=e[t].min,i.max=i.min+r})):Dd(r,n.layoutBox,e)&&Jl((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=Fl(e[i]);r.max=r.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+s)}));const s=Xl();Ul(s,e,n.layoutBox);const a=Xl();o?Ul(a,t.applyTransform(i,!0),n.measuredBox):Ul(a,e,n.layoutBox);const l=!Gc(s);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=Gl();Hl(s,n.layoutBox,r.layoutBox);const a=Gl();Hl(a,e,o.layoutBox),Qc(s,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function gd(t){ad&&sd.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function yd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function vd(t){t.clearSnapshot()}function bd(t){t.clearMeasurements()}function wd(t){t.isLayoutDirty=!1}function xd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _d(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function kd(t){t.resolveTargetDelta()}function Td(t){t.calcProjection()}function Sd(t){t.resetSkewAndRotation()}function Ad(t){t.removeLeadSnapshot()}function Pd(t,e,n){t.translate=ea(e.translate,0,n),t.scale=ea(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cd(t,e,n,i){t.min=ea(e.min,n.min,i),t.max=ea(e.max,n.max,i)}function Ed(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Nd={duration:.45,ease:[.4,0,.1,1]},Rd=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Md=Rd("applewebkit/")&&!Rd("chrome/")?Math.round:Br;function Od(t){t.min=Md(t.min),t.max=Md(t.max)}function Dd(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=td(e),r=td(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Ld(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const jd=pd({attachResizeListener:(t,e)=>vl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vd={current:void 0},Fd=pd({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Vd.current){const t=new jd({});t.mount(window),t.setOptions({layoutScroll:!0}),Vd.current=t}return Vd.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Bd={pan:{Feature:class extends hl{constructor(){super(...arguments),this.removePointerDownListener=Br}onPointerDown(t){this.session=new xl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:vc(t),onStart:vc(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&zr.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=bl(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends hl{constructor(t){super(t),this.removeGroupControls=Br,this.removeListeners=Br,this.controls=new gc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Br}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Fd,MeasureLayout:Rc}};function Ud(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return bl(t.current,n,((n,r)=>{if("touch"===n.pointerType||Ml())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[i];s&&zr.postRender((()=>s(n,r)))}),{passive:!t.getProps()[i]})}const Id=(t,e)=>!!e&&(t===e||Id(t,e.parentElement));function zd(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,gl(n))}const Hd=new WeakMap,$d=new WeakMap,qd=t=>{const e=Hd.get(t.target);e&&e(t)},Wd=t=>{t.forEach(qd)};function Kd(t,e,n){const i=function({root:t,...e}){const n=t||document;$d.has(n)||$d.set(n,{});const i=$d.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Wd,{root:t,...e})),i[r]}(e);return Hd.set(t,n),i.observe(t),()=>{Hd.delete(t),i.unobserve(t)}}const Yd={some:0,all:1};const Xd={inView:{Feature:class extends hl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Yd[i]};return Kd(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends hl{constructor(){super(...arguments),this.removeStartListeners=Br,this.removeEndListeners=Br,this.removeAccessibleListeners=Br,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=bl(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||Id(this.node.current,t.target)?n:i;o&&zr.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),r=bl(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Qs(i,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=vl(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=vl(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&zd("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}))})),zd("down",((t,e)=>{this.startPress(t,e)}))})),e=vl(this.node.current,"blur",(()=>{this.isPressing&&zd("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Qs(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&zr.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ml()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=bl(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=vl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qs(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends hl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qs(vl(this.node.current,"focus",(()=>this.onFocus())),vl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends hl{mount(){this.unmount=Qs(Ud(this.node,!0),Ud(this.node,!1))}unmount(){}}}},Gd={layout:{ProjectionNode:Fd,MeasureLayout:Rc}},Jd=U({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Zd=U({}),Qd="undefined"!=typeof window,tu=Qd?ot:rt,eu=U({strict:!1});function nu(t,e,n,i,r){var o,s;const{visualElement:a}=ct(Zd),l=ct(eu),c=ct(bc),d=ct(Jd).reducedMotion,u=st();i=i||l.renderer,!u.current&&i&&(u.current=i(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ct(_c);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:iu(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Ol(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=st(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[Xa],g=st(Boolean(f)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,f))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,f)));return tu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Cc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),rt((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,f)})),g.current=!1))})),h}function iu(t){if(t)return!1!==t.options.allowProjection?t.projection:iu(t.parent)}function ru(t,e,n){return lt((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):Ol(n)&&(n.current=i))}),[e])}function ou(t){return vr(t.animate)||Ar.some((e=>xr(t[e])))}function su(t){return Boolean(ou(t)||t.variants)}function au(t){const{initial:e,animate:n}=function(t,e){if(ou(t)){const{initial:e,animate:n}=t;return{initial:!1===e||xr(e)?e:void 0,animate:xr(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,ct(Zd));return at((()=>({initial:e,animate:n})),[lu(e),lu(n)])}function lu(t){return Array.isArray(t)?t.join(" "):t}const cu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},du={};for(const Dh in cu)du[Dh]={isEnabled:t=>cu[Dh].some((e=>!!t[e]))};const uu=Symbol.for("motionComponentSymbol");function hu({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&function(t){for(const e in t)du[e]={...du[e],...t[e]}}(t);const o=function(t){function e(e){var n=vi({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=_i,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((function(t,o){let s;const a={...ct(Jd),...t,layoutId:pu(t)},{isStatic:l}=a,c=au(t),d=i(t,l);if(!l&&Qd){ct(eu).strict;const t=function(t){const{drag:e,layout:n}=du;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=t.MeasureLayout,c.visualElement=nu(r,d,a,e,t.ProjectionNode)}return vt(Zd.Provider,{value:c,children:[s&&c.visualElement?vt(s,{visualElement:c.visualElement,...a}):null,n(r,t,ru(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[uu]=r,o}function pu({layoutId:t}){const e=ct(xc).id;return e&&void 0!==t?e+"-"+t:t}const mu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fu(t){return"string"==typeof t&&!t.includes("-")&&!!(mu.indexOf(t)>-1||/[A-Z]/u.test(t))}function gu(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const yu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vu(t,e,n,i){gu(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(yu.has(r)?r:Ya(r),e.attrs[r])}function bu(t,{layout:e,layoutId:n}){return Cr.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Pc[t]||"opacity"===t)}function wu(t,e,n){var i;const{style:r}=t,o={};for(const s in r)(Ja(r[s])||e.style&&Ja(e.style[s])||bu(s,t)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function xu(t,e,n){const i=wu(t,e,n);for(const r in t)if(Ja(t[r])||Ja(e[r])){i[-1!==Pr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return i}const _u=t=>(e,n)=>{const i=ct(Zd),r=ct(bc),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,o){const s={latestValues:ku(i,r,o,t),renderState:e()};return n&&(s.mount=t=>n(i,t,s)),s}(t,e,i,r);return n?o():function(t){const e=st(null);return null===e.current&&(e.current=t()),e.current}(o)};function ku(t,e,n,i){const r={},o=i(t,{});for(const h in o)r[h]=od(o[h]);let{initial:s,animate:a}=t;const l=ou(t),c=su(t);e&&c&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!vr(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=kr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const i in n){let t=n[i];if(Array.isArray(t)){t=t[d?t.length-1:0]}null!==t&&(r[i]=t)}for(const i in t)r[i]=t[i]}}}return r}const Tu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Su=()=>({...Tu(),attrs:{}}),Au=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Pu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cu=Pr.length;function Eu(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Cr.has(l))s=!0;else if(co(l))r[l]=t;else{const e=Au(t,vs[l]);l.startsWith("origin")?(a=!0,o[l]=e):i[l]=e}}if(e.transform||(s||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<Cu;o++){const s=Pr[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Au(a,vs[s]);l||(r=!1,i+=`${Pu[s]||s}(${t}) `),n&&(e[s]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Nu(t,e,n){return"string"==typeof t?t:ko.transform(e+n*t)}const Ru={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ou(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Eu(t,c,u),d)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Nu(e,t.x,t.width)} ${Nu(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Ru:Mu;t[o.offset]=ko.transform(-i);const s=ko.transform(e),a=ko.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Du=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Lu={useVisualState:_u({scrapeMotionValuesFromProps:xu,createRenderState:Su,onMount:(t,e,{renderState:n,latestValues:i})=>{zr.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),zr.render((()=>{Ou(n,i,Du(e.tagName),t.transformTemplate),vu(e,n)}))}})},ju={useVisualState:_u({scrapeMotionValuesFromProps:wu,createRenderState:Tu})};function Vu(t,e,n){for(const i in e)Ja(e[i])||bu(i,n)||(t[i]=e[i])}function Fu(t,e){const n={};return Vu(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return at((()=>{const n=Tu();return Eu(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Bu(t,e){const n={},i=Fu(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Uu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Iu(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Uu.has(t)}let zu=t=>!Iu(t);try{(Hu=require("@emotion/is-prop-valid").default)&&(zu=t=>t.startsWith("on")?!Iu(t):Hu(t))}catch(Oh){}var Hu;function $u(t,e,n,i){const r=at((()=>{const n=Su();return Ou(n,e,Du(i),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};Vu(e,t.style,t),r.style={...e,...r.style}}return r}function qu(t=!1){return(e,n,i,{latestValues:r},o)=>{const s=(fu(e)?$u:Bu)(n,r,o,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(zu(r)||!0===n&&Iu(r)||!e&&!Iu(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(e,{...l,children:at((()=>Ja(c)?c.get():c),[c])})}}function Wu(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return hu({...fu(n)?Lu:ju,preloadedFeatures:t,useRender:qu(i),createVisualElement:e,Component:n})}}const Ku={current:null},Yu={current:!1};const Xu=new WeakMap,Gu=[...Lo,Zo,ds],Ju=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zu{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ps.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,zr.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=ou(e),this.isVariantNode=su(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const u in d){const t=d[u];void 0!==a[u]&&Ja(t)&&t.set(a[u],!1)}}mount(t){this.current=t,Xu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Yu.current||function(){if(Yu.current=!0,Qd)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ku.current=t.matches;t.addListener(e),e()}else Ku.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ku.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Xu.delete(this.current),this.projection&&this.projection.unmount(),Hr(this.notifyUpdate),Hr(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Cr.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&zr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),r(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in du){const e=du[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gl()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Ju.length;n++){const e=Ju[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(Ja(r))t.addValue(i,r);else if(Ja(o))t.addValue(i,Wa(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Wa(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wa(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=i&&("string"==typeof i&&(ao(i)||oo(i))?i=parseFloat(i):(r=i,!Gu.find(Do(r))&&ds.test(e)&&(i=xs(t,e))),this.setBaseTarget(t,Ja(i)?i.get():i)),Ja(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=kr(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||Ja(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new $a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qu extends Zu{constructor(){super(...arguments),this.KeyframeResolver=ks}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class th extends Qu{constructor(){super(...arguments),this.type="html",this.renderInstance=gu}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),r=(co(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return pc(t,e)}build(t,e,n){Eu(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return wu(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ja(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class eh extends Qu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gl}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}return e=yu.has(e)?e:Ya(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return xu(t,e,n)}build(t,e,n){Ou(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){vu(t,e,0,i)}mount(t){this.isSVGTag=Du(t.tagName),super.mount(t)}}const nh=yr(Wu({...ml,...Xd,...Bd,...Gd},((t,e)=>fu(t)?new eh(e):new th(e,{allowProjection:t!==b}))));var ih=(t=>(t.EmailAddress="EmailAddress",t.MobileNumber="MobileNumber",t.CustomerId="CustomerId",t))(ih||{});const rh=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var oh=(t=>(t.Established="Established",t.Unestablished="Unestablished",t))(oh||{});const sh=t=>!!/\+\d{1,14}$/.test(t),ah=t=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),lh=()=>{const[t,e]=it([]),[n,i]=it(!1),[r,o]=it(""),[s,a]=it(!1),[l,c]=it(!1),d=st(),u=st(),h=st({searchType:ih.MobileNumber,searchValue:""}),p=lt((async(t,n)=>{let r;if(h.current={searchType:t,searchValue:n},i(!0),a(!1),o(""),t===ih.EmailAddress)r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e=(t=>({emailAddress:t}))(t);return(await Zn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(e))).data})(n);else if(t===ih.MobileNumber)r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e={mobileNumber:t},n=[],i=await Zn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(e));return n.push(i.data),n})(n);else{if(t!==ih.CustomerId)return i(!1),void o("Invalid search type.");r=(async t=>{if(!Zn)throw new Error("Api has not been initialized");const e=[],n=await Zn.get(`/_admin/v1.0/customer/${t}`);return e.push(n.data),e})(n)}r.then((t=>{e(t),i(!1),t.length>0?(d.current=t[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async(t,e)=>{d.current&&await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={mobileNumber:e,reason:n};await Qn.put(`/_admin/v1.0/customers/${t}/mobileNumber`,JSON.stringify(i))})(d.current,t,e)},f=async(t,e)=>{d.current&&await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");const i={emailAddress:e,reason:n};await Qn.put(`/_admin/v1.0/customers/${t}/emailAddress`,JSON.stringify(i))})(d.current,t,e)};return{searchFilter:h,searchCustomerResult:t,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async e=>{const{action:n}=e;switch(n){case"workplaceUnlink":await(async e=>{t.find((t=>t.apolloProfiles.find((t=>t.profileId===e&&t.status===oh.Established))))&&(c(!0),u.current=e)})(e.profileId);break;case"updateMobileNumber":await m(e.mobileNumber,e.reason);break;case"updateEmailAddress":await f(e.emailAddress,e.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async t=>{if(!Zn)throw new Error("Api has not been initialized");await Zn.put(`/_admin/v1.0/workplace-link/${t}/unestablish`)})(u.current).then((async()=>{await(async()=>{await p(h.current.searchType,h.current.searchValue)})()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},ch=()=>{const[t,e]=it(ih.MobileNumber),[n,i]=it("+61"),[r,o]=it({emailAddress:"",mobileNumber:"",customerId:""}),s=lt((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=lt((t=>!!sh(t)||(o((t=>({...t,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=lt(((t,e)=>{const n=t.trim();if(!n){const{label:t,name:n}=(t=>{const e=rh.find((e=>ih[e.searchType]===ih[t]));return e?{name:e.name,label:e.label}:{name:"",label:""}})(e);return o((e=>({...e,[t]:`Empty ${n}`}))),!1}return!(e===ih.EmailAddress&&!ah(n))||(o((t=>({...t,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:t,searchValue:n,errors:r,setSearchType:e,setSearchValue:i,clearErrors:s,isValidSearch:lt(((t,e)=>{switch(t){case ih.EmailAddress:case ih.CustomerId:return l(e,t);case ih.MobileNumber:return a(e);default:return!1}}),[l,a])}},dh=({labelText:t,name:e,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=lt((t=>{s&&!s.test(t.key)&&t.preventDefault()}),[s]);return vt(b,{children:[t&&vt("label",{className:"block text-sm font-bold text-gray-700",children:t}),vt("input",{required:a??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${o}`,name:e,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},uh=({message:t,className:e,onClick:n})=>vt("div",{className:e,onClick:n,children:t}),hh=t=>{const{searchType:e,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=ch(),[l,c]=it(!0),d=()=>{s(),c(!1)},u=t=>{const e=t.currentTarget;c(!1),o(e.value),s()};return vt(b,{children:vt("div",{className:"flex flex-col p-2",children:[vt("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),vt("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(e,n)&&(c(!0),t.onSubmit(e,n))},children:[vt("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:e,onChange:t=>{s();const e=t.currentTarget.value;r(e),o("")},"data-testid":"select",children:rh.map((t=>vt("option",{value:t.searchType,children:t.name},t.searchType)))}),vt("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[e===ih.EmailAddress&&vt(dh,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===ih.MobileNumber&&vt(dh,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===ih.CustomerId&&vt(dh,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u})]}),vt("div",{className:"mt-2",children:Object.values(i).map(((t,e)=>vt(uh,{message:t,className:"text-sm text-red-600 sm:text-right"},e)))}),vt("div",{className:"sm:flex justify-end sm:mt-6",children:vt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},ph=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),mh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),fh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),gh=t=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),yh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...t},y("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),vh=t=>y("svg",{className:"feather feather-edit",fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),y("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})),bh=t=>{var e,n,i,r,o,s,a;const[l,c]=it(t.data.apolloProfiles.length>0),d=t.data.apolloProfiles.length>0,u=at((()=>t.data.apolloProfiles.slice().sort(((t,e)=>{const n=t.status.localeCompare(e.status);return 0!==n?n:t.profileId.localeCompare(e.profileId)}))),[t.data.apolloProfiles]);return vt(b,{children:[vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"whitespace-nowrap px-2 text-sm",children:vt("span",{onClick:()=>{d&&c(!l)},children:[!d&&vt(fh,{className:"h-6 w-6 border-0"}),d&&vt((()=>vt(b,{children:vt(l?mh:ph,{className:"h-6 w-6 border-0 cursor-pointer"})})),{})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.id}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(e=t.data.name)?void 0:e.firstName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(n=t.data.name)?void 0:n.lastName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("div",{className:"flex justify-between items-center",children:[null==(i=t.data.email)?void 0:i.value,(null==(o=null==(r=t.data)?void 0:r.email)?void 0:o.isVerified)&&vt(yh,{className:"h-4 w-4 border-0"}),t.searchType!==ih.EmailAddress&&vt("span",{onClick:()=>t.onEdit("emailAddress"),children:vt(vh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("div",{className:"flex justify-between items-center",children:[t.data.mobileNumber,t.searchType!==ih.EmailAddress&&vt("span",{onClick:()=>t.onEdit("mobileNumber"),children:vt(vh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(s=t.data.kyc)?void 0:s.address.state}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:null==(a=t.data.kyc)?void 0:a.dateOfBirth.substring(0,10)}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?"True":"False"})]},t.key),l&&vt(b,{children:vt("tr",{className:"divide-x divide-gray-200",children:vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[vt("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),vt("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-200",children:[vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),vt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:vt("span",{className:"sr-only",children:"Action"})})]})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:u.map(((e,n)=>vt("tr",{className:"divide-x divide-gray-200",children:[vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.profileId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.partnerId}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.status}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountName}),vt("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vt("span",{onClick:()=>t.onAction({action:"workplaceUnlink",profileId:e.profileId}),children:vt(gh,{className:"h-6 w-6 border-0 "+(e.status===oh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},wh=t=>vt("div",{className:"-mx-4 mt-8 sm:-mx-4",children:vt("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:vt("table",{className:"min-w-full divide-y divide-gray-500",children:[vt("thead",{className:"bg-gray-50",children:vt("tr",{className:"divide-x divide-gray-200",children:[vt("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:vt("span",{className:"sr-only",children:"Action"})}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),vt("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),vt("tbody",{className:"divide-y divide-gray-200 bg-white",children:t.data.map(((e,n)=>vt(bh,{title:"Apollo Profiles",data:e,searchType:t.searchType,onAction:t.onAction,onEdit:t.onEdit},n)))})]})})}),xh=t=>{const{inputValue:e,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((t,e)=>{const[n,i]=it(t.value),[r,o]=it(!1),[s,a]=it(""),[l,c]=it([]),[d,u]=it(!1),h=lt((()=>{c([])}),[]),p=lt((()=>{o(!1),a("")}),[]),m=lt(((t,e)=>{c((n=>[...n,{text:t,type:e}]))}),[]),f=lt((()=>""!==s.trim()),[s]),g=lt((()=>!("emailAddress"===t.type&&!ah(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===t.type&&!sh(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[t.type,n,m,f]),y=lt((e=>{var n,i;if(e instanceof Vn){const r=(null==(i=null==(n=e.response)?void 0:n.data)?void 0:i.message)||`Failed to update ${"emailAddress"===t.type?"email address":"mobile number"}.`;m(r,"error")}else m("An unexpected error occurred.","error")}),[m,t.type]),v=lt((async()=>{if(h(),g()){u(!0);try{await e("emailAddress"===t.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===t.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,t.type,p,e,n,s,m,y]);return{inputValue:n,reason:s,isCustomerIdentityVerified:r,messages:l,isSubmitting:d,setIsSubmitting:u,setInputValue:i,setReason:a,setIsVerifiedCustomerIdentity:o,clearMessages:h,handleSubmit:v}})(t.formData,t.onSubmit),u=t=>{const e=t.currentTarget;s(e.value),c()};return vt(b,{children:vt("div",{className:"flex flex-row mt-6 ml-4",children:vt("form",{onSubmit:async t=>{t.preventDefault(),await d()},children:vt("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[vt("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===t.formData.type?"Mobile Number":"Email Address"}),vt("div",{className:"sm:col-start-2",children:["mobileNumber"===t.formData.type&&vt(dh,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:e,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===t.formData.type&&vt(dh,{name:"emailAddress",placeholder:"",type:"email",value:e,className:"w-full",onClick:c,onChange:u})]}),vt("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((t,e)=>vt(uh,{message:t.text,className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600")},e)))}),vt("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[vt("div",{className:"flex h-6 items-center",children:vt("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:t=>{const e=t.currentTarget;l(e.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),vt("div",{className:"ml-2 text-sm leading-6",children:vt("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),vt("div",{className:"col-start-2",children:vt(dh,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:t=>{const e=t.currentTarget;a(e.value),c()}})}),vt("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:vt("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:o,children:"Update"})})]})})})})},_h=()=>vt("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[vt("div",{className:"flex space-x-4",children:[vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),vt("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((t,e)=>vt("div",{className:"flex space-x-4",children:[vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),vt("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},e)))]}),kh=()=>{const{searchCustomerResult:t,isLoading:e,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=lh(),[d,u]=it("searchResult"),[h,p]=it(1);return vt(b,{children:["searchResult"===d&&vt(nh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[vt(hh,{onSubmit:s}),!e&&i&&vt(nh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:vt(wh,{data:t,searchType:o.current.searchType,onAction:a,onEdit:t=>{p(1),u("mobileNumber"===t?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),"searchResult"!==d&&vt(nh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:vt(Zi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:vt(xh,{formData:"editMobileNumber"==d?{value:t[0].mobileNumber,type:"mobileNumber"}:{value:t[0].email.value,type:"emailAddress"},onSubmit:a})})},d),vt(Ki,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c}),e&&vt(_h,{}),n&&vt("div",{className:"p-4 mt-2 text-red-700",children:n})]})};var Th=(t=>(t.Search="Search",t.BenefitsPlan="Benefits Plan",t))(Th||{});function Sh(){return(Sh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var Ah=["context","children"];function Ph(t){return this.getChildContext=function(){return t.context},B(t.children,function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e.indexOf(n=o[i])>=0||(r[n]=t[n]);return r}(t,Ah))}function Ch(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=y(Ph,Sh({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var i=[],r={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Eh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),c=a[o].slot;c?r[c]=y(Mh,{name:c},l):i[o]=l}var d=n?y(Mh,null,i):i;return y(n||e.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?F:V)(this._vdom,this._root)}function Eh(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function Nh(t,e,n){if(this._vdom){var i={};i[t]=n=null==n?void 0:n,i[Eh(t)]=n,this._vdom=B(this._vdom,i),V(this._vdom,this._root)}}function Rh(){V(this._vdom=null,this._root)}function Mh(t,e){var n=this;return y("slot",Sh({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(t,e,n,i){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=e,e}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=Ch,r.prototype.attributeChangedCallback=Nh,r.prototype.disconnectedCallback=Rh,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach((function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,r)}((t=>{const e={backendUrl:t["backend-url"],accessToken:t["access-token"]};rt((()=>{ei(e.backendUrl,e.accessToken,"customer-profile"),ei(e.backendUrl,e.accessToken,"flare-app-identity"),ei(e.backendUrl,e.accessToken,"benefits-plan")}),[e.backendUrl,e.accessToken]);const[n,i]=it("Search"),r=lt((t=>t===n),[n]);return vt(b,{children:[vt("style",{children:I.toString()}),vt(bt,{tabTitles:Object.entries(Th).map((([,t])=>t)),currentTab:n,onChange:i}),vt(er,{visible:r("Search"),children:vt(kh,{})}),vt(er,{visible:r("Benefits Plan"),children:vt(gr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"]);
|